From 24f02757c9966ddc05871e6bd49226b752f183e4 Mon Sep 17 00:00:00 2001
From: Anton Schubert
Date: Mon, 13 Apr 2020 19:31:07 +0200
Subject: use voc-player for relive, update clappr plugins, remove old assets,
clean up dash/relive player embeds
---
.../38861cba61c66739c1452c3a71e39852.ttf | Bin 0 -> 32652 bytes
assets/voc-player/clappr-playback-rate-plugin.js | 2 +
assets/voc-player/clappr-thumbnails-plugin.js | 280 ++++
assets/voc-player/player.js | 1431 ++++++++++++++++++++
assets/voc-player/player.js.map | 1 +
5 files changed, 1714 insertions(+)
create mode 100644 assets/voc-player/38861cba61c66739c1452c3a71e39852.ttf
create mode 100644 assets/voc-player/clappr-playback-rate-plugin.js
create mode 100644 assets/voc-player/clappr-thumbnails-plugin.js
create mode 100644 assets/voc-player/player.js
create mode 100644 assets/voc-player/player.js.map
(limited to 'assets/voc-player')
diff --git a/assets/voc-player/38861cba61c66739c1452c3a71e39852.ttf b/assets/voc-player/38861cba61c66739c1452c3a71e39852.ttf
new file mode 100644
index 0000000..7b25f3c
Binary files /dev/null and b/assets/voc-player/38861cba61c66739c1452c3a71e39852.ttf differ
diff --git a/assets/voc-player/clappr-playback-rate-plugin.js b/assets/voc-player/clappr-playback-rate-plugin.js
new file mode 100644
index 0000000..f002c15
--- /dev/null
+++ b/assets/voc-player/clappr-playback-rate-plugin.js
@@ -0,0 +1,2 @@
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("clappr")):"function"==typeof define&&define.amd?define(["clappr"],e):"object"==typeof exports?exports.PlaybackRatePlugin=e(require("clappr")):t.PlaybackRatePlugin=e(t.Clappr)}(window,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=57)}([function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,n(59))},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(5);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){var r=n(2),o=n(38),i=n(10),a=n(17),c=Object.defineProperty;e.f=r?c:function(t,e,n){if(i(t),e=a(e,!0),i(n),o)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(0),o=n(25),i=n(1),a=n(26),c=n(30),u=n(48),f=o("wks"),l=r.Symbol,s=u?l:l&&l.withoutSetter||a;t.exports=function(t){return i(f,t)||(c&&i(l,t)?f[t]=l[t]:f[t]=s("Symbol."+t)),f[t]}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(2),o=n(3),i=n(14);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(0),o=n(13).f,i=n(7),a=n(11),c=n(24),u=n(42),f=n(47);t.exports=function(t,e){var n,l,s,p,y,d=t.target,v=t.global,b=t.stat;if(n=v?r:b?r[d]||c(d,{}):(r[d]||{}).prototype)for(l in e){if(p=e[l],s=t.noTargetGet?(y=o(n,l))&&y.value:n[l],!f(v?l:d+(b?".":"#")+l,t.forced)&&void 0!==s){if(typeof p==typeof s)continue;u(p,s)}(t.sham||s&&s.sham)&&i(p,"sham",!0),a(n,l,p,t)}}},function(t,e,n){var r=n(37),o=n(16);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(6);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,n){var r=n(0),o=n(7),i=n(1),a=n(24),c=n(40),u=n(18),f=u.get,l=u.enforce,s=String(String).split("String");(t.exports=function(t,e,n,c){var u=!!c&&!!c.unsafe,f=!!c&&!!c.enumerable,p=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),l(n).source=s.join("string"==typeof e?e:"")),t!==r?(u?!p&&t[e]&&(f=!0):delete t[e],f?t[e]=n:o(t,e,n)):f?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&f(this).source||c(this)}))},function(t,e,n){var r,o=n(10),i=n(64),a=n(29),c=n(21),u=n(65),f=n(39),l=n(19),s=l("IE_PROTO"),p=function(){},y=function(t){return"\n * \n * ```\n * Now, create the player:\n * ```html\n *
\n *
\n * \n * \n * ```\n */\n// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nvar Player = function (_BaseObject) {\n (0, _inherits3.default)(Player, _BaseObject);\n (0, _createClass3.default)(Player, [{\n key: 'loader',\n set: function set(loader) {\n this._loader = loader;\n },\n get: function get() {\n if (!this._loader) this._loader = new _loader2.default(this.options.plugins || {}, this.options.playerId);\n\n return this._loader;\n }\n\n /**\n * Determine if the playback has ended.\n * @property ended\n * @type Boolean\n */\n\n }, {\n key: 'ended',\n get: function get() {\n return this.core.activeContainer.ended;\n }\n\n /**\n * Determine if the playback is having to buffer in order for\n * playback to be smooth.\n * (i.e if a live stream is playing smoothly, this will be false)\n * @property buffering\n * @type Boolean\n */\n\n }, {\n key: 'buffering',\n get: function get() {\n return this.core.activeContainer.buffering;\n }\n\n /*\n * determine if the player is ready.\n * @property isReady\n * @type {Boolean} `true` if the player is ready. ie PLAYER_READY event has fired\n */\n\n }, {\n key: 'isReady',\n get: function get() {\n return !!this._ready;\n }\n\n /**\n * An events map that allows the user to add custom callbacks in player's options.\n * @property eventsMapping\n * @type {Object}\n */\n\n }, {\n key: 'eventsMapping',\n get: function get() {\n return {\n onReady: _events2.default.PLAYER_READY,\n onResize: _events2.default.PLAYER_RESIZE,\n onPlay: _events2.default.PLAYER_PLAY,\n onPause: _events2.default.PLAYER_PAUSE,\n onStop: _events2.default.PLAYER_STOP,\n onEnded: _events2.default.PLAYER_ENDED,\n onSeek: _events2.default.PLAYER_SEEK,\n onError: _events2.default.PLAYER_ERROR,\n onTimeUpdate: _events2.default.PLAYER_TIMEUPDATE,\n onVolumeUpdate: _events2.default.PLAYER_VOLUMEUPDATE,\n onSubtitleAvailable: _events2.default.PLAYER_SUBTITLE_AVAILABLE\n };\n }\n\n /**\n * @typedef {Object} PlaybackConfig\n * @prop {boolean} disableContextMenu\n * disables the context menu (right click) on the video element if a HTML5Video playback is used.\n * @prop {boolean} preload\n * video will be preloaded according to `preload` attribute options **default**: `'metadata'`\n * @prop {boolean} controls\n * enabled/disables displaying controls\n * @prop {boolean} crossOrigin\n * enables cross-origin capability for media-resources\n * @prop {boolean} playInline\n * enables in-line video elements\n * @prop {boolean} audioOnly\n * enforce audio-only playback (when possible)\n * @prop {Object} externalTracks\n * pass externaly loaded track to playback\n * @prop {Number} [maxBufferLength]\n * The default behavior for the **HLS playback** is to keep buffering indefinitely, even on VoD.\n * This replicates the behavior for progressive download, which continues buffering when pausing the video, thus making the video available for playback even on slow networks.\n * To change this behavior use `maxBufferLength` where **value is in seconds**.\n * @prop {Number} [maxBackBufferLength]\n * After how much distance of the playhead data should be pruned from the buffer (influences memory consumption\n * of adaptive media-engines like Hls.js or Shaka)\n * @prop {Number} [minBufferLength]\n * After how much data in the buffer at least we attempt to consume it (influences QoS-related behavior\n * of adaptive media-engines like Hls.js or Shaka). If this is too low, and the available bandwidth is varying a lot\n * and too close to the streamed bitrate, we may continuously hit under-runs.\n * @prop {Number} [initialBandwidthEstimate]\n * define an initial bandwidth \"guess\" (or previously stored/established value) for underlying adaptive-bitreate engines\n * of adaptive playback implementations, like Hls.js or Shaka\n * @prop {Number} [maxAdaptiveBitrate]\n * Limits the streamed bitrate (for adaptive media-engines in underlying playback implementations)\n * @prop {Object} [maxAdaptiveVideoDimensions]\n * Limits the video dimensions in adaptive media-engines. Should be a literal object with `height` and `width`.\n * @prop {Boolean}[enableAutomaticABR] **default**: `true`\n * Allows to enable/disable automatic bitrate switching in adaptive media-engines\n * @prop {String} [preferredTextLanguage] **default**: `'pt-BR'`\n * Allows to set a preferred text language, that may be enabled by the media-engine if available.\n * @prop {String} [preferredAudioLanguage] **default**: `'pt-BR'`\n * Allows to set a preferred audio language, that may be enabled by the media-engine if available.\n */\n\n /**\n * ## Player's constructor\n *\n * You might pass the options object to build the player.\n * ```javascript\n * var options = {source: \"http://example.com/video.mp4\", param1: \"val1\"};\n * var player = new Clappr.Player(options);\n * ```\n *\n * @method constructor\n * @param {Object} options Data\n * options to build a player instance\n * @param {Number} [options.width]\n * player's width **default**: `640`\n * @param {Number} [options.height]\n * player's height **default**: `360`\n * @param {String} [options.parentId]\n * the id of the element on the page that the player should be inserted into\n * @param {Object} [options.parent]\n * a reference to a dom element that the player should be inserted into\n * @param {String} [options.source]\n * The media source URL, or {source: <>, mimeType: <>}\n * @param {Object} [options.sources]\n * An array of media source URL's, or an array of {source: <>, mimeType: <>}\n * @param {Boolean} [options.autoPlay]\n * automatically play after page load **default**: `false`\n * @param {Boolean} [options.loop]\n * automatically replay after it ends **default**: `false`\n * @param {Boolean} [options.chromeless]\n * player acts in chromeless mode **default**: `false`\n * @param {Boolean} [options.allowUserInteraction]\n * whether or not the player should handle click events when in chromeless mode **default**: `false` on desktops browsers, `true` on mobile.\n * @param {Boolean} [options.disableKeyboardShortcuts]\n * disable keyboard shortcuts. **default**: `false`. `true` if `allowUserInteraction` is `false`.\n * @param {Boolean} [options.mute]\n * start the video muted **default**: `false`\n * @param {String} [options.mimeType]\n * add `mimeType: \"application/vnd.apple.mpegurl\"` if you need to use a url without extension.\n * @param {Boolean} [options.actualLiveTime]\n * show duration and seek time relative to actual time.\n * @param {String} [options.actualLiveServerTime]\n * specify server time as a string, format: \"2015/11/26 06:01:03\". This option is meant to be used with actualLiveTime.\n * @param {Boolean} [options.persistConfig]\n * persist player's settings (volume) through the same domain **default**: `true`\n * @param {String} [options.preload] @deprecated\n * video will be preloaded according to `preload` attribute options **default**: `'metadata'`\n * @param {Number} [options.maxBufferLength] @deprecated\n * the default behavior for the **HLS playback** is to keep buffering indefinitely, even on VoD.\n * This replicates the behavior for progressive download, which continues buffering when pausing the video, thus making the video available for playback even on slow networks.\n * To change this behavior use `maxBufferLength` where **value is in seconds**.\n * @param {String} [options.gaAccount]\n * enable Google Analytics events dispatch **(play/pause/stop/buffering/etc)** by adding your `gaAccount`\n * @param {String} [options.gaTrackerName]\n * besides `gaAccount` you can optionally, pass your favorite trackerName as `gaTrackerName`\n * @param {Object} [options.mediacontrol]\n * customize control bar colors, example: `mediacontrol: {seekbar: \"#E113D3\", buttons: \"#66B2FF\"}`\n * @param {Boolean} [options.hideMediaControl]\n * control media control auto hide **default**: `true`\n * @param {Boolean} [options.hideVolumeBar]\n * when embedded with width less than 320, volume bar will hide. You can force this behavior for all sizes by adding `true` **default**: `false`\n * @param {String} [options.watermark]\n * put `watermark: 'http://url/img.png'` on your embed parameters to automatically add watermark on your video.\n * You can customize corner position by defining position parameter. Positions can be `bottom-left`, `bottom-right`, `top-left` and `top-right`.\n * @param {String} [options.watermarkLink]\n * `watermarkLink: 'http://example.net/'` - define URL to open when the watermark is clicked. If not provided watermark will not be clickable.\n * @param {Boolean} [options.disableVideoTagContextMenu] @deprecated\n * disables the context menu (right click) on the video element if a HTML5Video playback is used.\n * @param {Boolean} [options.autoSeekFromUrl]\n * Automatically seek to the seconds provided in the url (e.g example.com?t=100) **default**: `true`\n * @param {Boolean} [options.exitFullscreenOnEnd]\n * Automatically exit full screen when the media finishes. **default**: `true`\n * @param {String} [options.poster]\n * define a poster by adding its address `poster: 'http://url/img.png'`. It will appear after video embed, disappear on play and go back when user stops the video.\n * @param {String} [options.playbackNotSupportedMessage]\n * define a custom message to be displayed when a playback is not supported.\n * @param {Object} [options.events]\n * Specify listeners which will be registered with their corresponding player events.\n * E.g. onReady -> \"PLAYER_READY\", onTimeUpdate -> \"PLAYER_TIMEUPDATE\"\n * @param {PlaybackConfig} [options.playback]\n * Generic `Playback` component related configuration\n * @param {Boolean} [options.disableErrorScreen]\n * disables the error screen plugin.\n * @param {Number} [options.autoPlayTimeout]\n * autoplay check timeout.\n */\n\n }]);\n\n function Player(options) {\n (0, _classCallCheck3.default)(this, Player);\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _BaseObject.call(this, options));\n\n var playbackDefaultOptions = { recycleVideo: true };\n var defaultOptions = {\n playerId: (0, _utils.uniqueId)(''),\n persistConfig: true,\n width: 640,\n height: 360,\n baseUrl: baseUrl,\n allowUserInteraction: _browser2.default.isMobile,\n playback: playbackDefaultOptions\n };\n _this._options = _clapprZepto2.default.extend(defaultOptions, options);\n _this.options.sources = _this._normalizeSources(options);\n if (!_this.options.chromeless) {\n // \"allowUserInteraction\" cannot be false if not in chromeless mode.\n _this.options.allowUserInteraction = true;\n }\n if (!_this.options.allowUserInteraction) {\n // if user iteraction is not allowed ensure keyboard shortcuts are disabled\n _this.options.disableKeyboardShortcuts = true;\n }\n _this._registerOptionEventListeners(_this.options.events);\n _this._coreFactory = new _core_factory2.default(_this);\n _this.playerInfo = _player_info2.default.getInstance(_this.options.playerId);\n _this.playerInfo.currentSize = { width: options.width, height: options.height };\n _this.playerInfo.options = _this.options;\n if (_this.options.parentId) _this.setParentId(_this.options.parentId);else if (_this.options.parent) _this.attachTo(_this.options.parent);\n\n return _this;\n }\n\n /**\n * Specify a `parentId` to the player.\n * @method setParentId\n * @param {String} parentId the element parent id.\n * @return {Player} itself\n */\n\n\n Player.prototype.setParentId = function setParentId(parentId) {\n var el = document.querySelector(parentId);\n if (el) this.attachTo(el);\n\n return this;\n };\n\n /**\n * You can use this method to attach the player to a given element. You don't need to do this when you specify it during the player instantiation passing the `parentId` param.\n * @method attachTo\n * @param {Object} element a given element.\n * @return {Player} itself\n */\n\n\n Player.prototype.attachTo = function attachTo(element) {\n this.options.parentElement = element;\n this.core = this._coreFactory.create();\n this._addEventListeners();\n return this;\n };\n\n Player.prototype._addEventListeners = function _addEventListeners() {\n if (!this.core.isReady) this.listenToOnce(this.core, _events2.default.CORE_READY, this._onReady);else this._onReady();\n\n this.listenTo(this.core, _events2.default.CORE_ACTIVE_CONTAINER_CHANGED, this._containerChanged);\n this.listenTo(this.core, _events2.default.CORE_FULLSCREEN, this._onFullscreenChange);\n this.listenTo(this.core, _events2.default.CORE_RESIZE, this._onResize);\n return this;\n };\n\n Player.prototype._addContainerEventListeners = function _addContainerEventListeners() {\n var container = this.core.activeContainer;\n if (container) {\n this.listenTo(container, _events2.default.CONTAINER_PLAY, this._onPlay);\n this.listenTo(container, _events2.default.CONTAINER_PAUSE, this._onPause);\n this.listenTo(container, _events2.default.CONTAINER_STOP, this._onStop);\n this.listenTo(container, _events2.default.CONTAINER_ENDED, this._onEnded);\n this.listenTo(container, _events2.default.CONTAINER_SEEK, this._onSeek);\n this.listenTo(container, _events2.default.CONTAINER_ERROR, this._onError);\n this.listenTo(container, _events2.default.CONTAINER_TIMEUPDATE, this._onTimeUpdate);\n this.listenTo(container, _events2.default.CONTAINER_VOLUME, this._onVolumeUpdate);\n this.listenTo(container, _events2.default.CONTAINER_SUBTITLE_AVAILABLE, this._onSubtitleAvailable);\n }\n return this;\n };\n\n Player.prototype._registerOptionEventListeners = function _registerOptionEventListeners() {\n var _this2 = this;\n\n var newEvents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var events = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var hasNewEvents = (0, _keys2.default)(newEvents).length > 0;\n hasNewEvents && (0, _keys2.default)(events).forEach(function (userEvent) {\n var eventType = _this2.eventsMapping[userEvent];\n eventType && _this2.off(eventType, events[userEvent]);\n });\n\n (0, _keys2.default)(newEvents).forEach(function (userEvent) {\n var eventType = _this2.eventsMapping[userEvent];\n if (eventType) {\n var eventFunction = newEvents[userEvent];\n eventFunction = typeof eventFunction === 'function' && eventFunction;\n eventFunction && _this2.on(eventType, eventFunction);\n }\n });\n return this;\n };\n\n Player.prototype._containerChanged = function _containerChanged() {\n this.stopListening();\n this._addEventListeners();\n };\n\n Player.prototype._onReady = function _onReady() {\n this._ready = true;\n this._addContainerEventListeners();\n this.trigger(_events2.default.PLAYER_READY);\n };\n\n Player.prototype._onFullscreenChange = function _onFullscreenChange(fullscreen) {\n this.trigger(_events2.default.PLAYER_FULLSCREEN, fullscreen);\n };\n\n Player.prototype._onVolumeUpdate = function _onVolumeUpdate(volume) {\n this.trigger(_events2.default.PLAYER_VOLUMEUPDATE, volume);\n };\n\n Player.prototype._onSubtitleAvailable = function _onSubtitleAvailable() {\n this.trigger(_events2.default.PLAYER_SUBTITLE_AVAILABLE);\n };\n\n Player.prototype._onResize = function _onResize(size) {\n this.trigger(_events2.default.PLAYER_RESIZE, size);\n };\n\n Player.prototype._onPlay = function _onPlay() {\n this.trigger(_events2.default.PLAYER_PLAY);\n };\n\n Player.prototype._onPause = function _onPause() {\n this.trigger(_events2.default.PLAYER_PAUSE);\n };\n\n Player.prototype._onStop = function _onStop() {\n this.trigger(_events2.default.PLAYER_STOP, this.getCurrentTime());\n };\n\n Player.prototype._onEnded = function _onEnded() {\n this.trigger(_events2.default.PLAYER_ENDED);\n };\n\n Player.prototype._onSeek = function _onSeek(time) {\n this.trigger(_events2.default.PLAYER_SEEK, time);\n };\n\n Player.prototype._onTimeUpdate = function _onTimeUpdate(timeProgress) {\n this.trigger(_events2.default.PLAYER_TIMEUPDATE, timeProgress);\n };\n\n Player.prototype._onError = function _onError(error) {\n this.trigger(_events2.default.PLAYER_ERROR, error);\n };\n\n Player.prototype._normalizeSources = function _normalizeSources(options) {\n var sources = options.sources || (options.source !== undefined ? [options.source] : []);\n return sources.length === 0 ? [{ source: '', mimeType: '' }] : sources;\n };\n\n /**\n * resizes the current player canvas.\n * @method resize\n * @param {Object} size should be a literal object with `height` and `width`.\n * @return {Player} itself\n * @example\n * ```javascript\n * player.resize({height: 360, width: 640})\n * ```\n */\n\n\n Player.prototype.resize = function resize(size) {\n this.core.resize(size);\n return this;\n };\n\n /**\n * loads a new source.\n * @method load\n * @param {Array|String} sources source or sources of video.\n * An array item can be a string or {source: <>, mimeType: <>}\n * @param {String} mimeType a mime type, example: `'application/vnd.apple.mpegurl'`\n * @param {Boolean} [autoPlay=false] whether playing should be started immediately\n * @return {Player} itself\n */\n\n\n Player.prototype.load = function load(sources, mimeType, autoPlay) {\n if (autoPlay !== undefined) this.configure({ autoPlay: !!autoPlay });\n\n this.core.load(sources, mimeType);\n return this;\n };\n\n /**\n * destroys the current player and removes it from the DOM.\n * @method destroy\n * @return {Player} itself\n */\n\n\n Player.prototype.destroy = function destroy() {\n this.stopListening();\n this.core.destroy();\n return this;\n };\n\n /**\n * Gives user consent to playback. Required by mobile device after a click event before Player.load().\n * @method consent\n * @return {Player} itself\n */\n\n\n Player.prototype.consent = function consent() {\n this.core.getCurrentPlayback().consent();\n return this;\n };\n\n /**\n * plays the current video (`source`).\n * @method play\n * @return {Player} itself\n */\n\n\n Player.prototype.play = function play() {\n this.core.activeContainer.play();\n return this;\n };\n\n /**\n * pauses the current video (`source`).\n * @method pause\n * @return {Player} itself\n */\n\n\n Player.prototype.pause = function pause() {\n this.core.activeContainer.pause();\n return this;\n };\n\n /**\n * stops the current video (`source`).\n * @method stop\n * @return {Player} itself\n */\n\n\n Player.prototype.stop = function stop() {\n this.core.activeContainer.stop();\n return this;\n };\n\n /**\n * seeks the current video (`source`). For example, `player.seek(120)` will seek to second 120 (2minutes) of the current video.\n * @method seek\n * @param {Number} time should be a number between 0 and the video duration.\n * @return {Player} itself\n */\n\n\n Player.prototype.seek = function seek(time) {\n this.core.activeContainer.seek(time);\n return this;\n };\n\n /**\n * seeks the current video (`source`). For example, `player.seek(50)` will seek to the middle of the current video.\n * @method seekPercentage\n * @param {Number} time should be a number between 0 and 100.\n * @return {Player} itself\n */\n\n\n Player.prototype.seekPercentage = function seekPercentage(percentage) {\n this.core.activeContainer.seekPercentage(percentage);\n return this;\n };\n\n /**\n * mutes the current video (`source`).\n * @method mute\n * @return {Player} itself\n */\n\n\n Player.prototype.mute = function mute() {\n this._mutedVolume = this.getVolume();\n this.setVolume(0);\n return this;\n };\n\n /**\n * unmutes the current video (`source`).\n * @method unmute\n * @return {Player} itself\n */\n\n\n Player.prototype.unmute = function unmute() {\n this.setVolume(typeof this._mutedVolume === 'number' ? this._mutedVolume : 100);\n this._mutedVolume = null;\n return this;\n };\n\n /**\n * checks if the player is playing.\n * @method isPlaying\n * @return {Boolean} `true` if the current source is playing, otherwise `false`\n */\n\n\n Player.prototype.isPlaying = function isPlaying() {\n return this.core.activeContainer.isPlaying();\n };\n\n /**\n * returns `true` if DVR is enable otherwise `false`.\n * @method isDvrEnabled\n * @return {Boolean}\n */\n\n\n Player.prototype.isDvrEnabled = function isDvrEnabled() {\n return this.core.activeContainer.isDvrEnabled();\n };\n\n /**\n * returns `true` if DVR is in use otherwise `false`.\n * @method isDvrInUse\n * @return {Boolean}\n */\n\n\n Player.prototype.isDvrInUse = function isDvrInUse() {\n return this.core.activeContainer.isDvrInUse();\n };\n\n /**\n * enables to configure a player after its creation\n * @method configure\n * @param {Object} options all the options to change in form of a javascript object\n * @return {Player} itself\n */\n\n\n Player.prototype.configure = function configure() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n this._registerOptionEventListeners(options.events, this.options.events);\n this.core.configure(options);\n return this;\n };\n\n /**\n * get a plugin by its name.\n * @method getPlugin\n * @param {String} name of the plugin.\n * @return {Object} the plugin instance\n * @example\n * ```javascript\n * var poster = player.getPlugin('poster');\n * poster.hidePlayButton();\n * ```\n */\n\n\n Player.prototype.getPlugin = function getPlugin(name) {\n var plugins = this.core.plugins.concat(this.core.activeContainer.plugins);\n return plugins.filter(function (plugin) {\n return plugin.name === name;\n })[0];\n };\n\n /**\n * the current time in seconds.\n * @method getCurrentTime\n * @return {Number} current time (in seconds) of the current source\n */\n\n\n Player.prototype.getCurrentTime = function getCurrentTime() {\n return this.core.activeContainer.getCurrentTime();\n };\n\n /**\n * The time that \"0\" now represents relative to when playback started.\n * For a stream with a sliding window this will increase as content is\n * removed from the beginning.\n * @method getStartTimeOffset\n * @return {Number} time (in seconds) that time \"0\" represents.\n */\n\n\n Player.prototype.getStartTimeOffset = function getStartTimeOffset() {\n return this.core.activeContainer.getStartTimeOffset();\n };\n\n /**\n * the duration time in seconds.\n * @method getDuration\n * @return {Number} duration time (in seconds) of the current source\n */\n\n\n Player.prototype.getDuration = function getDuration() {\n return this.core.activeContainer.getDuration();\n };\n\n return Player;\n}(_base_object2.default);\n\nexports.default = Player;\n\n\n(0, _assign2.default)(Player.prototype, _error_mixin2.default);\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/components/player_info.js\":\n/*!***************************************!*\\\n !*** ./src/components/player_info.js ***!\n \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nvar PlayerInfo = function PlayerInfo() {\n (0, _classCallCheck3.default)(this, PlayerInfo);\n\n this.options = {};\n this.playbackPlugins = [];\n this.currentSize = { width: 0, height: 0 };\n};\n\nPlayerInfo._players = {};\n\nPlayerInfo.getInstance = function (playerId) {\n return PlayerInfo._players[playerId] || (PlayerInfo._players[playerId] = new PlayerInfo());\n};\n\nexports.default = PlayerInfo;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n\n/***/ \"./src/icons/01-play.svg\":\n/*!*******************************!*\\\n !*** ./src/icons/01-play.svg ***!\n \\*******************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \"\n\n/***/ }),\n\n/***/ \"./src/icons/02-pause.svg\":\n/*!********************************!*\\\n !*** ./src/icons/02-pause.svg ***!\n \\********************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \"\n\n/***/ }),\n\n/***/ \"./src/icons/03-stop.svg\":\n/*!*******************************!*\\\n !*** ./src/icons/03-stop.svg ***!\n \\*******************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \"\n\n/***/ }),\n\n/***/ \"./src/icons/04-volume.svg\":\n/*!*********************************!*\\\n !*** ./src/icons/04-volume.svg ***!\n \\*********************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \"\n\n/***/ }),\n\n/***/ \"./src/icons/05-mute.svg\":\n/*!*******************************!*\\\n !*** ./src/icons/05-mute.svg ***!\n \\*******************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \"\n\n/***/ }),\n\n/***/ \"./src/icons/06-expand.svg\":\n/*!*********************************!*\\\n !*** ./src/icons/06-expand.svg ***!\n \\*********************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \"\n\n/***/ }),\n\n/***/ \"./src/icons/07-shrink.svg\":\n/*!*********************************!*\\\n !*** ./src/icons/07-shrink.svg ***!\n \\*********************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \"\n\n/***/ }),\n\n/***/ \"./src/icons/08-hd.svg\":\n/*!*****************************!*\\\n !*** ./src/icons/08-hd.svg ***!\n \\*****************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \"\n\n/***/ }),\n\n/***/ \"./src/icons/09-cc.svg\":\n/*!*****************************!*\\\n !*** ./src/icons/09-cc.svg ***!\n \\*****************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \"\n\n/***/ }),\n\n/***/ \"./src/icons/10-reload.svg\":\n/*!*********************************!*\\\n !*** ./src/icons/10-reload.svg ***!\n \\*********************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \"\n\n/***/ }),\n\n/***/ \"./src/main.js\":\n/*!*********************!*\\\n !*** ./src/main.js ***!\n \\*********************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _player = __webpack_require__(/*! ./components/player */ \"./src/components/player.js\");\n\nvar _player2 = _interopRequireDefault(_player);\n\nvar _utils = __webpack_require__(/*! ./base/utils */ \"./src/base/utils.js\");\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nvar _events = __webpack_require__(/*! ./base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _playback = __webpack_require__(/*! ./base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _container_plugin = __webpack_require__(/*! ./base/container_plugin */ \"./src/base/container_plugin.js\");\n\nvar _container_plugin2 = _interopRequireDefault(_container_plugin);\n\nvar _core_plugin = __webpack_require__(/*! ./base/core_plugin */ \"./src/base/core_plugin.js\");\n\nvar _core_plugin2 = _interopRequireDefault(_core_plugin);\n\nvar _ui_core_plugin = __webpack_require__(/*! ./base/ui_core_plugin */ \"./src/base/ui_core_plugin.js\");\n\nvar _ui_core_plugin2 = _interopRequireDefault(_ui_core_plugin);\n\nvar _ui_container_plugin = __webpack_require__(/*! ./base/ui_container_plugin */ \"./src/base/ui_container_plugin.js\");\n\nvar _ui_container_plugin2 = _interopRequireDefault(_ui_container_plugin);\n\nvar _base_object = __webpack_require__(/*! ./base/base_object */ \"./src/base/base_object.js\");\n\nvar _base_object2 = _interopRequireDefault(_base_object);\n\nvar _ui_object = __webpack_require__(/*! ./base/ui_object */ \"./src/base/ui_object.js\");\n\nvar _ui_object2 = _interopRequireDefault(_ui_object);\n\nvar _browser = __webpack_require__(/*! ./components/browser */ \"./src/components/browser/index.js\");\n\nvar _browser2 = _interopRequireDefault(_browser);\n\nvar _container = __webpack_require__(/*! ./components/container */ \"./src/components/container/index.js\");\n\nvar _container2 = _interopRequireDefault(_container);\n\nvar _core = __webpack_require__(/*! ./components/core */ \"./src/components/core/index.js\");\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _error = __webpack_require__(/*! ./components/error */ \"./src/components/error/index.js\");\n\nvar _error2 = _interopRequireDefault(_error);\n\nvar _loader = __webpack_require__(/*! ./components/loader */ \"./src/components/loader/index.js\");\n\nvar _loader2 = _interopRequireDefault(_loader);\n\nvar _mediator = __webpack_require__(/*! ./components/mediator */ \"./src/components/mediator.js\");\n\nvar _mediator2 = _interopRequireDefault(_mediator);\n\nvar _player_info = __webpack_require__(/*! ./components/player_info */ \"./src/components/player_info.js\");\n\nvar _player_info2 = _interopRequireDefault(_player_info);\n\nvar _base_flash_playback = __webpack_require__(/*! ./playbacks/base_flash_playback */ \"./src/playbacks/base_flash_playback/index.js\");\n\nvar _base_flash_playback2 = _interopRequireDefault(_base_flash_playback);\n\nvar _flash = __webpack_require__(/*! ./playbacks/flash */ \"./src/playbacks/flash/index.js\");\n\nvar _flash2 = _interopRequireDefault(_flash);\n\nvar _flashls = __webpack_require__(/*! ./playbacks/flashls */ \"./src/playbacks/flashls/index.js\");\n\nvar _flashls2 = _interopRequireDefault(_flashls);\n\nvar _hls = __webpack_require__(/*! ./playbacks/hls */ \"./src/playbacks/hls/index.js\");\n\nvar _hls2 = _interopRequireDefault(_hls);\n\nvar _html5_audio = __webpack_require__(/*! ./playbacks/html5_audio */ \"./src/playbacks/html5_audio/index.js\");\n\nvar _html5_audio2 = _interopRequireDefault(_html5_audio);\n\nvar _html5_video = __webpack_require__(/*! ./playbacks/html5_video */ \"./src/playbacks/html5_video/index.js\");\n\nvar _html5_video2 = _interopRequireDefault(_html5_video);\n\nvar _html_img = __webpack_require__(/*! ./playbacks/html_img */ \"./src/playbacks/html_img/index.js\");\n\nvar _html_img2 = _interopRequireDefault(_html_img);\n\nvar _no_op = __webpack_require__(/*! ./playbacks/no_op */ \"./src/playbacks/no_op/index.js\");\n\nvar _no_op2 = _interopRequireDefault(_no_op);\n\nvar _media_control = __webpack_require__(/*! ./plugins/media_control */ \"./src/plugins/media_control/index.js\");\n\nvar _media_control2 = _interopRequireDefault(_media_control);\n\nvar _click_to_pause = __webpack_require__(/*! ./plugins/click_to_pause */ \"./src/plugins/click_to_pause/index.js\");\n\nvar _click_to_pause2 = _interopRequireDefault(_click_to_pause);\n\nvar _dvr_controls = __webpack_require__(/*! ./plugins/dvr_controls */ \"./src/plugins/dvr_controls/index.js\");\n\nvar _dvr_controls2 = _interopRequireDefault(_dvr_controls);\n\nvar _favicon = __webpack_require__(/*! ./plugins/favicon */ \"./src/plugins/favicon/index.js\");\n\nvar _favicon2 = _interopRequireDefault(_favicon);\n\nvar _log = __webpack_require__(/*! ./plugins/log */ \"./src/plugins/log/index.js\");\n\nvar _log2 = _interopRequireDefault(_log);\n\nvar _poster = __webpack_require__(/*! ./plugins/poster */ \"./src/plugins/poster/index.js\");\n\nvar _poster2 = _interopRequireDefault(_poster);\n\nvar _spinner_three_bounce = __webpack_require__(/*! ./plugins/spinner_three_bounce */ \"./src/plugins/spinner_three_bounce/index.js\");\n\nvar _spinner_three_bounce2 = _interopRequireDefault(_spinner_three_bounce);\n\nvar _watermark = __webpack_require__(/*! ./plugins/watermark */ \"./src/plugins/watermark/index.js\");\n\nvar _watermark2 = _interopRequireDefault(_watermark);\n\nvar _styler = __webpack_require__(/*! ./base/styler */ \"./src/base/styler.js\");\n\nvar _styler2 = _interopRequireDefault(_styler);\n\nvar _vendor = __webpack_require__(/*! ./vendor */ \"./src/vendor/index.js\");\n\nvar _vendor2 = _interopRequireDefault(_vendor);\n\nvar _template = __webpack_require__(/*! ./base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ \"./node_modules/clappr-zepto/zepto.js\");\n\nvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar version = \"0.3.12\"; // Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nexports.default = {\n Player: _player2.default,\n Mediator: _mediator2.default,\n Events: _events2.default,\n Browser: _browser2.default,\n PlayerInfo: _player_info2.default,\n MediaControl: _media_control2.default,\n ContainerPlugin: _container_plugin2.default,\n UIContainerPlugin: _ui_container_plugin2.default,\n CorePlugin: _core_plugin2.default,\n UICorePlugin: _ui_core_plugin2.default,\n Playback: _playback2.default,\n Container: _container2.default,\n Core: _core2.default,\n PlayerError: _error2.default,\n Loader: _loader2.default,\n BaseObject: _base_object2.default,\n UIObject: _ui_object2.default,\n Utils: _utils2.default,\n BaseFlashPlayback: _base_flash_playback2.default,\n Flash: _flash2.default,\n FlasHLS: _flashls2.default,\n HLS: _hls2.default,\n HTML5Audio: _html5_audio2.default,\n HTML5Video: _html5_video2.default,\n HTMLImg: _html_img2.default,\n NoOp: _no_op2.default,\n ClickToPausePlugin: _click_to_pause2.default,\n DVRControls: _dvr_controls2.default,\n Favicon: _favicon2.default,\n Log: _log2.default,\n Poster: _poster2.default,\n SpinnerThreeBouncePlugin: _spinner_three_bounce2.default,\n WaterMarkPlugin: _watermark2.default,\n Styler: _styler2.default,\n Vendor: _vendor2.default,\n version: version,\n template: _template2.default,\n $: _clapprZepto2.default\n};\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/base_flash_playback/base_flash_playback.js\":\n/*!******************************************************************!*\\\n !*** ./src/playbacks/base_flash_playback/base_flash_playback.js ***!\n \\******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _template = __webpack_require__(/*! ../../base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _browser = __webpack_require__(/*! ../../components/browser */ \"./src/components/browser/index.js\");\n\nvar _browser2 = _interopRequireDefault(_browser);\n\nvar _flash = __webpack_require__(/*! ./public/flash.html */ \"./src/playbacks/base_flash_playback/public/flash.html\");\n\nvar _flash2 = _interopRequireDefault(_flash);\n\n__webpack_require__(/*! ./public/flash.scss */ \"./src/playbacks/base_flash_playback/public/flash.scss\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IE_CLASSID = 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'; // Copyright 2015 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nvar BaseFlashPlayback = function (_Playback) {\n (0, _inherits3.default)(BaseFlashPlayback, _Playback);\n\n function BaseFlashPlayback() {\n (0, _classCallCheck3.default)(this, BaseFlashPlayback);\n return (0, _possibleConstructorReturn3.default)(this, _Playback.apply(this, arguments));\n }\n\n BaseFlashPlayback.prototype.setElement = function setElement(element) {\n this.$el = element;\n this.el = element[0];\n };\n\n BaseFlashPlayback.prototype.render = function render() {\n this.$el.attr('data', this.swfPath);\n this.$el.html(this.template({\n cid: this.cid,\n swfPath: this.swfPath,\n baseUrl: this.baseUrl,\n playbackId: this.uniqueId,\n wmode: this.wmode,\n callbackName: 'window.Clappr.flashlsCallbacks.' + this.cid }));\n\n if (_browser2.default.isIE) {\n this.$('embed').remove();\n\n if (_browser2.default.isLegacyIE) this.$el.attr('classid', IE_CLASSID);\n }\n\n this.el.id = this.cid;\n\n return this;\n };\n\n (0, _createClass3.default)(BaseFlashPlayback, [{\n key: 'tagName',\n get: function get() {\n return 'object';\n }\n }, {\n key: 'swfPath',\n get: function get() {\n return '';\n }\n }, {\n key: 'wmode',\n get: function get() {\n return 'transparent';\n }\n }, {\n key: 'template',\n get: function get() {\n return (0, _template2.default)(_flash2.default);\n }\n }, {\n key: 'attributes',\n get: function get() {\n var type = 'application/x-shockwave-flash';\n\n if (_browser2.default.isLegacyIE) type = '';\n\n return {\n class: 'clappr-flash-playback',\n type: type,\n width: '100%',\n height: '100%',\n data: this.swfPath,\n 'data-flash-playback': this.name\n };\n }\n }]);\n return BaseFlashPlayback;\n}(_playback2.default);\n\nexports.default = BaseFlashPlayback;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/base_flash_playback/index.js\":\n/*!****************************************************!*\\\n !*** ./src/playbacks/base_flash_playback/index.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = __webpack_require__(/*! ./base_flash_playback */ \"./src/playbacks/base_flash_playback/base_flash_playback.js\");\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/base_flash_playback/public/flash.html\":\n/*!*************************************************************!*\\\n !*** ./src/playbacks/base_flash_playback/public/flash.html ***!\n \\*************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \\\">\\n \\n \\n \\n \\n \\n \\\">\\n \\n &callback=<%= callbackName %>\\\">\\n\\\"\\n type=\\\"application/x-shockwave-flash\\\"\\n disabled=\\\"disabled\\\"\\n tabindex=\\\"-1\\\"\\n enablecontextmenu=\\\"false\\\"\\n allowScriptAccess=\\\"always\\\"\\n quality=\\\"autohigh\\\"\\n pluginspage=\\\"http://www.macromedia.com/go/getflashplayer\\\"\\n wmode=\\\"<%= wmode %>\\\"\\n swliveconnect=\\\"true\\\"\\n allowfullscreen=\\\"false\\\"\\n bgcolor=\\\"#000000\\\"\\n FlashVars=\\\"playbackId=<%= playbackId %>&callback=<%= callbackName %>\\\"\\n data=\\\"<%= swfPath %>\\\"\\n src=\\\"<%= swfPath %>\\\"\\n width=\\\"100%\\\"\\n height=\\\"100%\\\">\\n \\n\";\n\n/***/ }),\n\n/***/ \"./src/playbacks/base_flash_playback/public/flash.scss\":\n/*!*************************************************************!*\\\n !*** ./src/playbacks/base_flash_playback/public/flash.scss ***!\n \\*************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\nvar content = __webpack_require__(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./flash.scss */ \"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/playbacks/base_flash_playback/public/flash.scss\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"singleton\":true,\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n/***/ }),\n\n/***/ \"./src/playbacks/flash/flash.js\":\n/*!**************************************!*\\\n !*** ./src/playbacks/flash/flash.js ***!\n \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _utils = __webpack_require__(/*! ../../base/utils */ \"./src/base/utils.js\");\n\nvar _base_flash_playback = __webpack_require__(/*! ../../playbacks/base_flash_playback */ \"./src/playbacks/base_flash_playback/index.js\");\n\nvar _base_flash_playback2 = _interopRequireDefault(_base_flash_playback);\n\nvar _browser = __webpack_require__(/*! ../../components/browser */ \"./src/components/browser/index.js\");\n\nvar _browser2 = _interopRequireDefault(_browser);\n\nvar _mediator = __webpack_require__(/*! ../../components/mediator */ \"./src/components/mediator.js\");\n\nvar _mediator2 = _interopRequireDefault(_mediator);\n\nvar _template = __webpack_require__(/*! ../../base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ \"./node_modules/clappr-zepto/zepto.js\");\n\nvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _Player = __webpack_require__(/*! ./public/Player.swf */ \"./src/playbacks/flash/public/Player.swf\");\n\nvar _Player2 = _interopRequireDefault(_Player);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MAX_ATTEMPTS = 60; // Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nvar Flash = function (_BaseFlashPlayback) {\n (0, _inherits3.default)(Flash, _BaseFlashPlayback);\n (0, _createClass3.default)(Flash, [{\n key: 'name',\n get: function get() {\n return 'flash';\n }\n }, {\n key: 'swfPath',\n get: function get() {\n return (0, _template2.default)(_Player2.default)({ baseUrl: this._baseUrl });\n }\n\n /**\n * Determine if the playback has ended.\n * @property ended\n * @type Boolean\n */\n\n }, {\n key: 'ended',\n get: function get() {\n return this._currentState === 'ENDED';\n }\n\n /**\n * Determine if the playback is buffering.\n * This is related to the PLAYBACK_BUFFERING and PLAYBACK_BUFFERFULL events\n * @property buffering\n * @type Boolean\n */\n\n }, {\n key: 'buffering',\n get: function get() {\n return !!this._bufferingState && this._currentState !== 'ENDED';\n }\n }]);\n\n function Flash() {\n (0, _classCallCheck3.default)(this, Flash);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _BaseFlashPlayback.call.apply(_BaseFlashPlayback, [this].concat(args)));\n\n _this._src = _this.options.src;\n _this._baseUrl = _this.options.baseUrl;\n _this._autoPlay = _this.options.autoPlay;\n _this.settings = { default: ['seekbar'] };\n _this.settings.left = ['playpause', 'position', 'duration'];\n _this.settings.right = ['fullscreen', 'volume'];\n _this.settings.seekEnabled = true;\n _this._isReadyState = false;\n _this._addListeners();\n return _this;\n }\n\n Flash.prototype._bootstrap = function _bootstrap() {\n var _this2 = this;\n\n if (this.el.playerPlay) {\n this.el.width = '100%';\n this.el.height = '100%';\n if (this._currentState === 'PLAYING') {\n this._firstPlay();\n } else {\n this._currentState = 'IDLE';\n this._autoPlay && this.play();\n }\n (0, _clapprZepto2.default)('
').insertAfter(this.$el);\n if (this.getDuration() > 0) this._metadataLoaded();else _mediator2.default.once(this.uniqueId + ':timeupdate', this._metadataLoaded, this);\n } else {\n this._attempts = this._attempts || 0;\n if (++this._attempts <= MAX_ATTEMPTS) setTimeout(function () {\n return _this2._bootstrap();\n }, 50);else this.trigger(_events2.default.PLAYBACK_ERROR, { message: 'Max number of attempts reached' }, this.name);\n }\n };\n\n Flash.prototype._metadataLoaded = function _metadataLoaded() {\n this._isReadyState = true;\n this.trigger(_events2.default.PLAYBACK_READY, this.name);\n this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE, this.name);\n };\n\n Flash.prototype.getPlaybackType = function getPlaybackType() {\n return _playback2.default.VOD;\n };\n\n Flash.prototype.isHighDefinitionInUse = function isHighDefinitionInUse() {\n return false;\n };\n\n Flash.prototype._updateTime = function _updateTime() {\n this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: this.el.getPosition(), total: this.el.getDuration() }, this.name);\n };\n\n Flash.prototype._addListeners = function _addListeners() {\n _mediator2.default.on(this.uniqueId + ':progress', this._progress, this);\n _mediator2.default.on(this.uniqueId + ':timeupdate', this._updateTime, this);\n _mediator2.default.on(this.uniqueId + ':statechanged', this._checkState, this);\n _mediator2.default.on(this.uniqueId + ':flashready', this._bootstrap, this);\n };\n\n Flash.prototype.stopListening = function stopListening() {\n _BaseFlashPlayback.prototype.stopListening.call(this);\n _mediator2.default.off(this.uniqueId + ':progress');\n _mediator2.default.off(this.uniqueId + ':timeupdate');\n _mediator2.default.off(this.uniqueId + ':statechanged');\n _mediator2.default.off(this.uniqueId + ':flashready');\n };\n\n Flash.prototype._checkState = function _checkState() {\n if (this._isIdle || this._currentState === 'PAUSED') {\n return;\n } else if (this._currentState !== 'PLAYING_BUFFERING' && this.el.getState() === 'PLAYING_BUFFERING') {\n this._bufferingState = true;\n this.trigger(_events2.default.PLAYBACK_BUFFERING, this.name);\n this._currentState = 'PLAYING_BUFFERING';\n } else if (this.el.getState() === 'PLAYING') {\n this._bufferingState = false;\n this.trigger(_events2.default.PLAYBACK_BUFFERFULL, this.name);\n this._currentState = 'PLAYING';\n } else if (this.el.getState() === 'IDLE') {\n this._currentState = 'IDLE';\n } else if (this.el.getState() === 'ENDED') {\n this.trigger(_events2.default.PLAYBACK_ENDED, this.name);\n this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 0, total: this.el.getDuration() }, this.name);\n this._currentState = 'ENDED';\n this._isIdle = true;\n }\n };\n\n Flash.prototype._progress = function _progress() {\n if (this._currentState !== 'IDLE' && this._currentState !== 'ENDED') {\n this.trigger(_events2.default.PLAYBACK_PROGRESS, {\n start: 0,\n current: this.el.getBytesLoaded(),\n total: this.el.getBytesTotal()\n });\n }\n };\n\n Flash.prototype._firstPlay = function _firstPlay() {\n var _this3 = this;\n\n if (this.el.playerPlay) {\n this._isIdle = false;\n this.el.playerPlay(this._src);\n this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {\n return _this3._checkInitialSeek();\n });\n this._currentState = 'PLAYING';\n } else {\n this.listenToOnce(this, _events2.default.PLAYBACK_READY, this._firstPlay);\n }\n };\n\n Flash.prototype._checkInitialSeek = function _checkInitialSeek() {\n var seekTime = (0, _utils.seekStringToSeconds)(window.location.href);\n if (seekTime !== 0) this.seekSeconds(seekTime);\n };\n\n Flash.prototype.play = function play() {\n this.trigger(_events2.default.PLAYBACK_PLAY_INTENT);\n if (this._currentState === 'PAUSED' || this._currentState === 'PLAYING_BUFFERING') {\n this._currentState = 'PLAYING';\n this.el.playerResume();\n this.trigger(_events2.default.PLAYBACK_PLAY, this.name);\n } else if (this._currentState !== 'PLAYING') {\n this._firstPlay();\n this.trigger(_events2.default.PLAYBACK_PLAY, this.name);\n }\n };\n\n Flash.prototype.volume = function volume(value) {\n var _this4 = this;\n\n if (this.isReady) this.el.playerVolume(value);else this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {\n return _this4.volume(value);\n });\n };\n\n Flash.prototype.pause = function pause() {\n this._currentState = 'PAUSED';\n this.el.playerPause();\n this.trigger(_events2.default.PLAYBACK_PAUSE, this.name);\n };\n\n Flash.prototype.stop = function stop() {\n this.el.playerStop();\n this.trigger(_events2.default.PLAYBACK_STOP);\n this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 0, total: 0 }, this.name);\n };\n\n Flash.prototype.isPlaying = function isPlaying() {\n return !!(this.isReady && this._currentState.indexOf('PLAYING') > -1);\n };\n\n Flash.prototype.getDuration = function getDuration() {\n return this.el.getDuration();\n };\n\n Flash.prototype.seekPercentage = function seekPercentage(percentage) {\n var _this5 = this;\n\n if (this.el.getDuration() > 0) {\n var seekSeconds = this.el.getDuration() * (percentage / 100);\n this.seek(seekSeconds);\n } else {\n this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {\n return _this5.seekPercentage(percentage);\n });\n }\n };\n\n Flash.prototype.seek = function seek(time) {\n var _this6 = this;\n\n if (this.isReady && this.el.playerSeek) {\n this.el.playerSeek(time);\n this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: time, total: this.el.getDuration() }, this.name);\n if (this._currentState === 'PAUSED') this.el.playerPause();\n } else {\n this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {\n return _this6.seek(time);\n });\n }\n };\n\n Flash.prototype.destroy = function destroy() {\n clearInterval(this.bootstrapId);\n _BaseFlashPlayback.prototype.stopListening.call(this);\n this.$el.remove();\n };\n\n (0, _createClass3.default)(Flash, [{\n key: 'isReady',\n get: function get() {\n return this._isReadyState;\n }\n }]);\n return Flash;\n}(_base_flash_playback2.default);\n\nexports.default = Flash;\n\n\nFlash.canPlay = function (resource) {\n if (!_browser2.default.hasFlash || !resource || resource.constructor !== String) {\n return false;\n } else {\n var resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || [];\n return resourceParts.length > 1 && !_browser2.default.isMobile && resourceParts[1].toLowerCase().match(/^(mp4|mov|f4v|3gpp|3gp)$/);\n }\n};\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/flash/index.js\":\n/*!**************************************!*\\\n !*** ./src/playbacks/flash/index.js ***!\n \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _flash = __webpack_require__(/*! ./flash */ \"./src/playbacks/flash/flash.js\");\n\nvar _flash2 = _interopRequireDefault(_flash);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _flash2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/flash/public/Player.swf\":\n/*!***********************************************!*\\\n !*** ./src/playbacks/flash/public/Player.swf ***!\n \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<%=baseUrl%>/4b76590b32dab62bc95c1b7951efae78.swf\";\n\n/***/ }),\n\n/***/ \"./src/playbacks/flashls/flashls.js\":\n/*!******************************************!*\\\n !*** ./src/playbacks/flashls/flashls.js ***!\n \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _base_flash_playback = __webpack_require__(/*! ../../playbacks/base_flash_playback */ \"./src/playbacks/base_flash_playback/index.js\");\n\nvar _base_flash_playback2 = _interopRequireDefault(_base_flash_playback);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _template = __webpack_require__(/*! ../../base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _mediator = __webpack_require__(/*! ../../components/mediator */ \"./src/components/mediator.js\");\n\nvar _mediator2 = _interopRequireDefault(_mediator);\n\nvar _browser = __webpack_require__(/*! ../../components/browser */ \"./src/components/browser/index.js\");\n\nvar _browser2 = _interopRequireDefault(_browser);\n\nvar _error = __webpack_require__(/*! ../../components/error */ \"./src/components/error/index.js\");\n\nvar _error2 = _interopRequireDefault(_error);\n\nvar _flashls_events = __webpack_require__(/*! ./flashls_events */ \"./src/playbacks/flashls/flashls_events.js\");\n\nvar _flashls_events2 = _interopRequireDefault(_flashls_events);\n\nvar _HLSPlayer = __webpack_require__(/*! ./public/HLSPlayer.swf */ \"./src/playbacks/flashls/public/HLSPlayer.swf\");\n\nvar _HLSPlayer2 = _interopRequireDefault(_HLSPlayer);\n\nvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ \"./node_modules/clappr-zepto/zepto.js\");\n\nvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nvar MAX_ATTEMPTS = 60;\nvar AUTO = -1;\n\nvar FlasHLS = function (_BaseFlashPlayback) {\n (0, _inherits3.default)(FlasHLS, _BaseFlashPlayback);\n (0, _createClass3.default)(FlasHLS, [{\n key: 'name',\n get: function get() {\n return 'flashls';\n }\n }, {\n key: 'swfPath',\n get: function get() {\n return (0, _template2.default)(_HLSPlayer2.default)({ baseUrl: this._baseUrl });\n }\n }, {\n key: 'levels',\n get: function get() {\n return this._levels || [];\n }\n }, {\n key: 'currentLevel',\n get: function get() {\n if (this._currentLevel === null || this._currentLevel === undefined) return AUTO;else return this._currentLevel; //0 is a valid level ID\n },\n set: function set(id) {\n this._currentLevel = id;\n this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH_START);\n this.el.playerSetCurrentLevel(id);\n }\n\n /**\n * Determine if the playback has ended.\n * @property ended\n * @type Boolean\n */\n\n }, {\n key: 'ended',\n get: function get() {\n return this._hasEnded;\n }\n\n /**\n * Determine if the playback is buffering.\n * This is related to the PLAYBACK_BUFFERING and PLAYBACK_BUFFERFULL events\n * @property buffering\n * @type Boolean\n */\n\n }, {\n key: 'buffering',\n get: function get() {\n return !!this._bufferingState && !this._hasEnded;\n }\n }]);\n\n function FlasHLS() {\n (0, _classCallCheck3.default)(this, FlasHLS);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _BaseFlashPlayback.call.apply(_BaseFlashPlayback, [this].concat(args)));\n\n _this._src = _this.options.src;\n _this._baseUrl = _this.options.baseUrl;\n _this._initHlsParameters(_this.options);\n // TODO can this be private?\n _this.highDefinition = false;\n _this._autoPlay = _this.options.autoPlay;\n _this._loop = _this.options.loop;\n _this._defaultSettings = {\n left: ['playstop'],\n default: ['seekbar'],\n right: ['fullscreen', 'volume', 'hd-indicator'],\n seekEnabled: false\n };\n _this.settings = _clapprZepto2.default.extend({}, _this._defaultSettings);\n _this._playbackType = _playback2.default.LIVE;\n _this._hasEnded = false;\n _this._addListeners();\n return _this;\n }\n\n FlasHLS.prototype._initHlsParameters = function _initHlsParameters(options) {\n this._autoStartLoad = options.autoStartLoad === undefined ? true : options.autoStartLoad;\n this._capLevelToStage = options.capLevelToStage === undefined ? false : options.capLevelToStage;\n this._maxLevelCappingMode = options.maxLevelCappingMode === undefined ? 'downscale' : options.maxLevelCappingMode;\n this._minBufferLength = options.minBufferLength === undefined ? -1 : options.minBufferLength;\n this._minBufferLengthCapping = options.minBufferLengthCapping === undefined ? -1 : options.minBufferLengthCapping;\n this._maxBufferLength = options.maxBufferLength === undefined ? 120 : options.maxBufferLength;\n this._maxBackBufferLength = options.maxBackBufferLength === undefined ? 30 : options.maxBackBufferLength;\n this._lowBufferLength = options.lowBufferLength === undefined ? 3 : options.lowBufferLength;\n this._mediaTimePeriod = options.mediaTimePeriod === undefined ? 100 : options.mediaTimePeriod;\n this._fpsDroppedMonitoringPeriod = options.fpsDroppedMonitoringPeriod === undefined ? 5000 : options.fpsDroppedMonitoringPeriod;\n this._fpsDroppedMonitoringThreshold = options.fpsDroppedMonitoringThreshold === undefined ? 0.2 : options.fpsDroppedMonitoringThreshold;\n this._capLevelonFPSDrop = options.capLevelonFPSDrop === undefined ? false : options.capLevelonFPSDrop;\n this._smoothAutoSwitchonFPSDrop = options.smoothAutoSwitchonFPSDrop === undefined ? this.capLevelonFPSDrop : options.smoothAutoSwitchonFPSDrop;\n this._switchDownOnLevelError = options.switchDownOnLevelError === undefined ? true : options.switchDownOnLevelError;\n this._seekMode = options.seekMode === undefined ? 'ACCURATE' : options.seekMode;\n this._keyLoadMaxRetry = options.keyLoadMaxRetry === undefined ? 3 : options.keyLoadMaxRetry;\n this._keyLoadMaxRetryTimeout = options.keyLoadMaxRetryTimeout === undefined ? 64000 : options.keyLoadMaxRetryTimeout;\n this._fragmentLoadMaxRetry = options.fragmentLoadMaxRetry === undefined ? 3 : options.fragmentLoadMaxRetry;\n this._fragmentLoadMaxRetryTimeout = options.fragmentLoadMaxRetryTimeout === undefined ? 4000 : options.fragmentLoadMaxRetryTimeout;\n this._fragmentLoadSkipAfterMaxRetry = options.fragmentLoadSkipAfterMaxRetry === undefined ? true : options.fragmentLoadSkipAfterMaxRetry;\n this._maxSkippedFragments = options.maxSkippedFragments === undefined ? 5 : options.maxSkippedFragments;\n this._flushLiveURLCache = options.flushLiveURLCache === undefined ? false : options.flushLiveURLCache;\n this._initialLiveManifestSize = options.initialLiveManifestSize === undefined ? 1 : options.initialLiveManifestSize;\n this._manifestLoadMaxRetry = options.manifestLoadMaxRetry === undefined ? 3 : options.manifestLoadMaxRetry;\n this._manifestLoadMaxRetryTimeout = options.manifestLoadMaxRetryTimeout === undefined ? 64000 : options.manifestLoadMaxRetryTimeout;\n this._manifestRedundantLoadmaxRetry = options.manifestRedundantLoadmaxRetry === undefined ? 3 : options.manifestRedundantLoadmaxRetry;\n this._startFromBitrate = options.startFromBitrate === undefined ? -1 : options.startFromBitrate;\n this._startFromLevel = options.startFromLevel === undefined ? -1 : options.startFromLevel;\n this._autoStartMaxDuration = options.autoStartMaxDuration === undefined ? -1 : options.autoStartMaxDuration;\n this._seekFromLevel = options.seekFromLevel === undefined ? -1 : options.seekFromLevel;\n this._useHardwareVideoDecoder = options.useHardwareVideoDecoder === undefined ? false : options.useHardwareVideoDecoder;\n this._hlsLogEnabled = options.hlsLogEnabled === undefined ? true : options.hlsLogEnabled;\n this._logDebug = options.logDebug === undefined ? false : options.logDebug;\n this._logDebug2 = options.logDebug2 === undefined ? false : options.logDebug2;\n this._logWarn = options.logWarn === undefined ? true : options.logWarn;\n this._logError = options.logError === undefined ? true : options.logError;\n this._hlsMinimumDvrSize = options.hlsMinimumDvrSize === undefined ? 60 : options.hlsMinimumDvrSize;\n };\n\n FlasHLS.prototype._addListeners = function _addListeners() {\n var _this2 = this;\n\n _mediator2.default.on(this.cid + ':flashready', function () {\n return _this2._bootstrap();\n });\n _mediator2.default.on(this.cid + ':timeupdate', function (timeMetrics) {\n return _this2._updateTime(timeMetrics);\n });\n _mediator2.default.on(this.cid + ':playbackstate', function (state) {\n return _this2._setPlaybackState(state);\n });\n _mediator2.default.on(this.cid + ':levelchanged', function (level) {\n return _this2._levelChanged(level);\n });\n _mediator2.default.on(this.cid + ':error', function (code, url, message) {\n return _this2._flashPlaybackError(code, url, message);\n });\n _mediator2.default.on(this.cid + ':fragmentloaded', function (loadmetrics) {\n return _this2._onFragmentLoaded(loadmetrics);\n });\n _mediator2.default.on(this.cid + ':levelendlist', function (level) {\n return _this2._onLevelEndlist(level);\n });\n };\n\n FlasHLS.prototype.stopListening = function stopListening() {\n _BaseFlashPlayback.prototype.stopListening.call(this);\n _mediator2.default.off(this.cid + ':flashready');\n _mediator2.default.off(this.cid + ':timeupdate');\n _mediator2.default.off(this.cid + ':playbackstate');\n _mediator2.default.off(this.cid + ':levelchanged');\n _mediator2.default.off(this.cid + ':playbackerror');\n _mediator2.default.off(this.cid + ':fragmentloaded');\n _mediator2.default.off(this.cid + ':manifestloaded');\n _mediator2.default.off(this.cid + ':levelendlist');\n };\n\n FlasHLS.prototype._bootstrap = function _bootstrap() {\n var _this3 = this;\n\n if (this.el.playerLoad) {\n this.el.width = '100%';\n this.el.height = '100%';\n this._isReadyState = true;\n this._srcLoaded = false;\n this._currentState = 'IDLE';\n this._setFlashSettings();\n this._updatePlaybackType();\n if (this._autoPlay || this._shouldPlayOnManifestLoaded) this.play();\n\n this.trigger(_events2.default.PLAYBACK_READY, this.name);\n } else {\n this._bootstrapAttempts = this._bootstrapAttempts || 0;\n if (++this._bootstrapAttempts <= MAX_ATTEMPTS) {\n setTimeout(function () {\n return _this3._bootstrap();\n }, 50);\n } else {\n var formattedError = this.createError({\n code: 'playerLoadFail_maxNumberAttemptsReached',\n description: this.name + ' error: Max number of attempts reached',\n level: _error2.default.Levels.FATAL,\n raw: {}\n });\n this.trigger(_events2.default.PLAYBACK_ERROR, formattedError);\n }\n }\n };\n\n FlasHLS.prototype._setFlashSettings = function _setFlashSettings() {\n this.el.playerSetAutoStartLoad(this._autoStartLoad);\n this.el.playerSetCapLevelToStage(this._capLevelToStage);\n this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode);\n this.el.playerSetMinBufferLength(this._minBufferLength);\n this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping);\n this.el.playerSetMaxBufferLength(this._maxBufferLength);\n this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength);\n this.el.playerSetLowBufferLength(this._lowBufferLength);\n this.el.playerSetMediaTimePeriod(this._mediaTimePeriod);\n this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod);\n this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold);\n this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop);\n this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop);\n this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError);\n this.el.playerSetSeekMode(this._seekMode);\n this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry);\n this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout);\n this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry);\n this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout);\n this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry);\n this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments);\n this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache);\n this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize);\n this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry);\n this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout);\n this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry);\n this.el.playerSetStartFromBitrate(this._startFromBitrate);\n this.el.playerSetStartFromLevel(this._startFromLevel);\n this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration);\n this.el.playerSetSeekFromLevel(this._seekFromLevel);\n this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder);\n this.el.playerSetLogInfo(this._hlsLogEnabled);\n this.el.playerSetLogDebug(this._logDebug);\n this.el.playerSetLogDebug2(this._logDebug2);\n this.el.playerSetLogWarn(this._logWarn);\n this.el.playerSetLogError(this._logError);\n };\n\n FlasHLS.prototype.setAutoStartLoad = function setAutoStartLoad(autoStartLoad) {\n this._autoStartLoad = autoStartLoad;\n this.el.playerSetAutoStartLoad(this._autoStartLoad);\n };\n\n FlasHLS.prototype.setCapLevelToStage = function setCapLevelToStage(capLevelToStage) {\n this._capLevelToStage = capLevelToStage;\n this.el.playerSetCapLevelToStage(this._capLevelToStage);\n };\n\n FlasHLS.prototype.setMaxLevelCappingMode = function setMaxLevelCappingMode(maxLevelCappingMode) {\n this._maxLevelCappingMode = maxLevelCappingMode;\n this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode);\n };\n\n FlasHLS.prototype.setSetMinBufferLength = function setSetMinBufferLength(minBufferLength) {\n this._minBufferLength = minBufferLength;\n this.el.playerSetMinBufferLength(this._minBufferLength);\n };\n\n FlasHLS.prototype.setMinBufferLengthCapping = function setMinBufferLengthCapping(minBufferLengthCapping) {\n this._minBufferLengthCapping = minBufferLengthCapping;\n this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping);\n };\n\n FlasHLS.prototype.setMaxBufferLength = function setMaxBufferLength(maxBufferLength) {\n this._maxBufferLength = maxBufferLength;\n this.el.playerSetMaxBufferLength(this._maxBufferLength);\n };\n\n FlasHLS.prototype.setMaxBackBufferLength = function setMaxBackBufferLength(maxBackBufferLength) {\n this._maxBackBufferLength = maxBackBufferLength;\n this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength);\n };\n\n FlasHLS.prototype.setLowBufferLength = function setLowBufferLength(lowBufferLength) {\n this._lowBufferLength = lowBufferLength;\n this.el.playerSetLowBufferLength(this._lowBufferLength);\n };\n\n FlasHLS.prototype.setMediaTimePeriod = function setMediaTimePeriod(mediaTimePeriod) {\n this._mediaTimePeriod = mediaTimePeriod;\n this.el.playerSetMediaTimePeriod(this._mediaTimePeriod);\n };\n\n FlasHLS.prototype.setFpsDroppedMonitoringPeriod = function setFpsDroppedMonitoringPeriod(fpsDroppedMonitoringPeriod) {\n this._fpsDroppedMonitoringPeriod = fpsDroppedMonitoringPeriod;\n this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod);\n };\n\n FlasHLS.prototype.setFpsDroppedMonitoringThreshold = function setFpsDroppedMonitoringThreshold(fpsDroppedMonitoringThreshold) {\n this._fpsDroppedMonitoringThreshold = fpsDroppedMonitoringThreshold;\n this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold);\n };\n\n FlasHLS.prototype.setCapLevelonFPSDrop = function setCapLevelonFPSDrop(capLevelonFPSDrop) {\n this._capLevelonFPSDrop = capLevelonFPSDrop;\n this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop);\n };\n\n FlasHLS.prototype.setSmoothAutoSwitchonFPSDrop = function setSmoothAutoSwitchonFPSDrop(smoothAutoSwitchonFPSDrop) {\n this._smoothAutoSwitchonFPSDrop = smoothAutoSwitchonFPSDrop;\n this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop);\n };\n\n FlasHLS.prototype.setSwitchDownOnLevelError = function setSwitchDownOnLevelError(switchDownOnLevelError) {\n this._switchDownOnLevelError = switchDownOnLevelError;\n this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError);\n };\n\n FlasHLS.prototype.setSeekMode = function setSeekMode(seekMode) {\n this._seekMode = seekMode;\n this.el.playerSetSeekMode(this._seekMode);\n };\n\n FlasHLS.prototype.setKeyLoadMaxRetry = function setKeyLoadMaxRetry(keyLoadMaxRetry) {\n this._keyLoadMaxRetry = keyLoadMaxRetry;\n this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry);\n };\n\n FlasHLS.prototype.setKeyLoadMaxRetryTimeout = function setKeyLoadMaxRetryTimeout(keyLoadMaxRetryTimeout) {\n this._keyLoadMaxRetryTimeout = keyLoadMaxRetryTimeout;\n this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout);\n };\n\n FlasHLS.prototype.setFragmentLoadMaxRetry = function setFragmentLoadMaxRetry(fragmentLoadMaxRetry) {\n this._fragmentLoadMaxRetry = fragmentLoadMaxRetry;\n this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry);\n };\n\n FlasHLS.prototype.setFragmentLoadMaxRetryTimeout = function setFragmentLoadMaxRetryTimeout(fragmentLoadMaxRetryTimeout) {\n this._fragmentLoadMaxRetryTimeout = fragmentLoadMaxRetryTimeout;\n this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout);\n };\n\n FlasHLS.prototype.setFragmentLoadSkipAfterMaxRetry = function setFragmentLoadSkipAfterMaxRetry(fragmentLoadSkipAfterMaxRetry) {\n this._fragmentLoadSkipAfterMaxRetry = fragmentLoadSkipAfterMaxRetry;\n this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry);\n };\n\n FlasHLS.prototype.setMaxSkippedFragments = function setMaxSkippedFragments(maxSkippedFragments) {\n this._maxSkippedFragments = maxSkippedFragments;\n this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments);\n };\n\n FlasHLS.prototype.setFlushLiveURLCache = function setFlushLiveURLCache(flushLiveURLCache) {\n this._flushLiveURLCache = flushLiveURLCache;\n this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache);\n };\n\n FlasHLS.prototype.setInitialLiveManifestSize = function setInitialLiveManifestSize(initialLiveManifestSize) {\n this._initialLiveManifestSize = initialLiveManifestSize;\n this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize);\n };\n\n FlasHLS.prototype.setManifestLoadMaxRetry = function setManifestLoadMaxRetry(manifestLoadMaxRetry) {\n this._manifestLoadMaxRetry = manifestLoadMaxRetry;\n this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry);\n };\n\n FlasHLS.prototype.setManifestLoadMaxRetryTimeout = function setManifestLoadMaxRetryTimeout(manifestLoadMaxRetryTimeout) {\n this._manifestLoadMaxRetryTimeout = manifestLoadMaxRetryTimeout;\n this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout);\n };\n\n FlasHLS.prototype.setManifestRedundantLoadmaxRetry = function setManifestRedundantLoadmaxRetry(manifestRedundantLoadmaxRetry) {\n this._manifestRedundantLoadmaxRetry = manifestRedundantLoadmaxRetry;\n this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry);\n };\n\n FlasHLS.prototype.setStartFromBitrate = function setStartFromBitrate(startFromBitrate) {\n this._startFromBitrate = startFromBitrate;\n this.el.playerSetStartFromBitrate(this._startFromBitrate);\n };\n\n FlasHLS.prototype.setStartFromLevel = function setStartFromLevel(startFromLevel) {\n this._startFromLevel = startFromLevel;\n this.el.playerSetStartFromLevel(this._startFromLevel);\n };\n\n FlasHLS.prototype.setAutoStartMaxDuration = function setAutoStartMaxDuration(autoStartMaxDuration) {\n this._autoStartMaxDuration = autoStartMaxDuration;\n this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration);\n };\n\n FlasHLS.prototype.setSeekFromLevel = function setSeekFromLevel(seekFromLevel) {\n this._seekFromLevel = seekFromLevel;\n this.el.playerSetSeekFromLevel(this._seekFromLevel);\n };\n\n FlasHLS.prototype.setUseHardwareVideoDecoder = function setUseHardwareVideoDecoder(useHardwareVideoDecoder) {\n this._useHardwareVideoDecoder = useHardwareVideoDecoder;\n this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder);\n };\n\n FlasHLS.prototype.setSetLogInfo = function setSetLogInfo(hlsLogEnabled) {\n this._hlsLogEnabled = hlsLogEnabled;\n this.el.playerSetLogInfo(this._hlsLogEnabled);\n };\n\n FlasHLS.prototype.setLogDebug = function setLogDebug(logDebug) {\n this._logDebug = logDebug;\n this.el.playerSetLogDebug(this._logDebug);\n };\n\n FlasHLS.prototype.setLogDebug2 = function setLogDebug2(logDebug2) {\n this._logDebug2 = logDebug2;\n this.el.playerSetLogDebug2(this._logDebug2);\n };\n\n FlasHLS.prototype.setLogWarn = function setLogWarn(logWarn) {\n this._logWarn = logWarn;\n this.el.playerSetLogWarn(this._logWarn);\n };\n\n FlasHLS.prototype.setLogError = function setLogError(logError) {\n this._logError = logError;\n this.el.playerSetLogError(this._logError);\n };\n\n FlasHLS.prototype._levelChanged = function _levelChanged(level) {\n var currentLevel = this.el.getLevels()[level];\n if (currentLevel) {\n this.highDefinition = currentLevel.height >= 720 || currentLevel.bitrate / 1000 >= 2000;\n this.trigger(_events2.default.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition);\n\n if (!this._levels || this._levels.length === 0) this._fillLevels();\n\n this.trigger(_events2.default.PLAYBACK_BITRATE, {\n height: currentLevel.height,\n width: currentLevel.width,\n bandwidth: currentLevel.bitrate,\n bitrate: currentLevel.bitrate,\n level: level\n });\n this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH_END);\n }\n };\n\n FlasHLS.prototype._updateTime = function _updateTime(timeMetrics) {\n if (this._currentState === 'IDLE') return;\n\n var duration = this._normalizeDuration(timeMetrics.duration);\n var position = Math.min(Math.max(timeMetrics.position, 0), duration);\n var previousDVRStatus = this._dvrEnabled;\n var livePlayback = this._playbackType === _playback2.default.LIVE;\n this._dvrEnabled = livePlayback && duration > this._hlsMinimumDvrSize;\n\n if (duration === 100 || livePlayback === undefined) return;\n\n if (this._dvrEnabled !== previousDVRStatus) {\n this._updateSettings();\n this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE, this.name);\n }\n\n if (livePlayback && !this._dvrEnabled) position = duration;\n\n this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: position, total: duration }, this.name);\n };\n\n FlasHLS.prototype.play = function play() {\n this.trigger(_events2.default.PLAYBACK_PLAY_INTENT);\n if (this._currentState === 'PAUSED') this.el.playerResume();else if (!this._srcLoaded && this._currentState !== 'PLAYING') this._firstPlay();else this.el.playerPlay();\n };\n\n FlasHLS.prototype.getPlaybackType = function getPlaybackType() {\n return this._playbackType ? this._playbackType : null;\n };\n\n FlasHLS.prototype.getCurrentTime = function getCurrentTime() {\n return this.el.getPosition();\n };\n\n FlasHLS.prototype.getCurrentLevelIndex = function getCurrentLevelIndex() {\n return this._currentLevel;\n };\n\n FlasHLS.prototype.getCurrentLevel = function getCurrentLevel() {\n return this.levels[this.currentLevel];\n };\n\n FlasHLS.prototype.getCurrentBitrate = function getCurrentBitrate() {\n return this.levels[this.currentLevel].bitrate;\n };\n\n FlasHLS.prototype.setCurrentLevel = function setCurrentLevel(level) {\n this.currentLevel = level;\n };\n\n FlasHLS.prototype.isHighDefinitionInUse = function isHighDefinitionInUse() {\n return this.highDefinition;\n };\n\n FlasHLS.prototype.getLevels = function getLevels() {\n return this.levels;\n };\n\n FlasHLS.prototype._setPlaybackState = function _setPlaybackState(state) {\n if (['PLAYING_BUFFERING', 'PAUSED_BUFFERING'].indexOf(state) >= 0) {\n this._bufferingState = true;\n this.trigger(_events2.default.PLAYBACK_BUFFERING, this.name);\n this._updateCurrentState(state);\n } else if (['PLAYING', 'PAUSED'].indexOf(state) >= 0) {\n if (['PLAYING_BUFFERING', 'PAUSED_BUFFERING', 'IDLE'].indexOf(this._currentState) >= 0) {\n this._bufferingState = false;\n this.trigger(_events2.default.PLAYBACK_BUFFERFULL, this.name);\n }\n this._updateCurrentState(state);\n } else if (state === 'IDLE') {\n this._srcLoaded = false;\n if (this._loop && ['PLAYING_BUFFERING', 'PLAYING'].indexOf(this._currentState) >= 0) {\n this.play();\n this.seek(0);\n } else {\n this._updateCurrentState(state);\n this._hasEnded = true;\n this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 0, total: this.getDuration() }, this.name);\n this.trigger(_events2.default.PLAYBACK_ENDED, this.name);\n }\n }\n };\n\n FlasHLS.prototype._updateCurrentState = function _updateCurrentState(state) {\n this._currentState = state;\n if (state !== 'IDLE') this._hasEnded = false;\n\n this._updatePlaybackType();\n if (state === 'PLAYING') this.trigger(_events2.default.PLAYBACK_PLAY, this.name);else if (state === 'PAUSED') this.trigger(_events2.default.PLAYBACK_PAUSE, this.name);\n };\n\n FlasHLS.prototype._updatePlaybackType = function _updatePlaybackType() {\n this._playbackType = this.el.getType();\n if (this._playbackType) {\n this._playbackType = this._playbackType.toLowerCase();\n if (this._playbackType === _playback2.default.VOD) this._startReportingProgress();else this._stopReportingProgress();\n }\n this.trigger(_events2.default.PLAYBACK_PLAYBACKSTATE, { type: this._playbackType });\n };\n\n FlasHLS.prototype._startReportingProgress = function _startReportingProgress() {\n if (!this._reportingProgress) this._reportingProgress = true;\n };\n\n FlasHLS.prototype._stopReportingProgress = function _stopReportingProgress() {\n this._reportingProgress = false;\n };\n\n FlasHLS.prototype._onFragmentLoaded = function _onFragmentLoaded(loadmetrics) {\n this.trigger(_events2.default.PLAYBACK_FRAGMENT_LOADED, loadmetrics);\n if (this._reportingProgress && this.getCurrentTime()) {\n var buffered = this.getCurrentTime() + this.el.getbufferLength();\n this.trigger(_events2.default.PLAYBACK_PROGRESS, {\n start: this.getCurrentTime(),\n current: buffered,\n total: this.el.getDuration()\n });\n }\n };\n\n FlasHLS.prototype._onLevelEndlist = function _onLevelEndlist() {\n this._updatePlaybackType();\n };\n\n FlasHLS.prototype._firstPlay = function _firstPlay() {\n var _this4 = this;\n\n this._shouldPlayOnManifestLoaded = true;\n if (this.el.playerLoad) {\n _mediator2.default.once(this.cid + ':manifestloaded', function (duration, loadmetrics) {\n return _this4._manifestLoaded(duration, loadmetrics);\n });\n this._setFlashSettings(); //ensure flushLiveURLCache will work (#327)\n this.el.playerLoad(this._src);\n this._srcLoaded = true;\n }\n };\n\n FlasHLS.prototype.volume = function volume(value) {\n var _this5 = this;\n\n if (this.isReady) this.el.playerVolume(value);else this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {\n return _this5.volume(value);\n });\n };\n\n FlasHLS.prototype.pause = function pause() {\n if (this._playbackType !== _playback2.default.LIVE || this._dvrEnabled) {\n this.el.playerPause();\n if (this._playbackType === _playback2.default.LIVE && this._dvrEnabled) this._updateDvr(true);\n }\n };\n\n FlasHLS.prototype.stop = function stop() {\n this._srcLoaded = false;\n this.el.playerStop();\n this.trigger(_events2.default.PLAYBACK_STOP);\n this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 0, total: 0 }, this.name);\n };\n\n FlasHLS.prototype.isPlaying = function isPlaying() {\n if (this._currentState) return !!this._currentState.match(/playing/i);\n\n return false;\n };\n\n FlasHLS.prototype.getDuration = function getDuration() {\n return this._normalizeDuration(this.el.getDuration());\n };\n\n FlasHLS.prototype._normalizeDuration = function _normalizeDuration(duration) {\n if (this._playbackType === _playback2.default.LIVE) {\n // estimate 10 seconds of buffer time for live streams for seek positions\n duration = Math.max(0, duration - 10);\n }\n return duration;\n };\n\n FlasHLS.prototype.seekPercentage = function seekPercentage(percentage) {\n var duration = this.el.getDuration();\n var time = 0;\n if (percentage > 0) time = duration * percentage / 100;\n\n this.seek(time);\n };\n\n FlasHLS.prototype.seek = function seek(time) {\n var duration = this.getDuration();\n if (this._playbackType === _playback2.default.LIVE) {\n // seek operations to a time within 3 seconds from live stream will position playhead back to live\n var dvrInUse = duration - time > 3;\n this._updateDvr(dvrInUse);\n }\n this.el.playerSeek(time);\n this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: time, total: duration }, this.name);\n };\n\n FlasHLS.prototype._updateDvr = function _updateDvr(dvrInUse) {\n var previousDvrInUse = !!this._dvrInUse;\n this._dvrInUse = dvrInUse;\n if (this._dvrInUse !== previousDvrInUse) {\n this._updateSettings();\n this.trigger(_events2.default.PLAYBACK_DVR, this._dvrInUse);\n this.trigger(_events2.default.PLAYBACK_STATS_ADD, { 'dvr': this._dvrInUse });\n }\n };\n\n FlasHLS.prototype._flashPlaybackError = function _flashPlaybackError(code, url, message) {\n var error = {\n code: code,\n description: message,\n level: _error2.default.Levels.FATAL,\n raw: { code: code, url: url, message: message }\n };\n var formattedError = this.createError(error);\n this.trigger(_events2.default.PLAYBACK_ERROR, formattedError);\n this.trigger(_events2.default.PLAYBACK_STOP);\n };\n\n FlasHLS.prototype._manifestLoaded = function _manifestLoaded(duration, loadmetrics) {\n if (this._shouldPlayOnManifestLoaded) {\n this._shouldPlayOnManifestLoaded = false;\n // this method initialises the player (and starts playback)\n // this needs to happen before PLAYBACK_LOADEDMETADATA is fired\n // as the user may call seek() in a LOADEDMETADATA listener.\n /// when playerPlay() is called the player seeks to 0\n this.el.playerPlay();\n }\n\n this._fillLevels();\n this.trigger(_events2.default.PLAYBACK_LOADEDMETADATA, { duration: duration, data: loadmetrics });\n };\n\n FlasHLS.prototype._fillLevels = function _fillLevels() {\n var levels = this.el.getLevels();\n var levelsLength = levels.length;\n this._levels = [];\n\n for (var index = 0; index < levelsLength; index++) {\n this._levels.push({ id: index, label: levels[index].height + 'p', level: levels[index] });\n }this.trigger(_events2.default.PLAYBACK_LEVELS_AVAILABLE, this._levels);\n };\n\n FlasHLS.prototype.destroy = function destroy() {\n this.stopListening();\n this.$el.remove();\n };\n\n FlasHLS.prototype._updateSettings = function _updateSettings() {\n this.settings = _clapprZepto2.default.extend({}, this._defaultSettings);\n if (this._playbackType === _playback2.default.VOD || this._dvrInUse) {\n this.settings.left = ['playpause', 'position', 'duration'];\n this.settings.seekEnabled = true;\n } else if (this._dvrEnabled) {\n this.settings.left = ['playpause'];\n this.settings.seekEnabled = true;\n } else {\n this.settings.seekEnabled = false;\n }\n };\n\n FlasHLS.prototype._createCallbacks = function _createCallbacks() {\n var _this6 = this;\n\n if (!window.Clappr) window.Clappr = {};\n\n if (!window.Clappr.flashlsCallbacks) window.Clappr.flashlsCallbacks = {};\n\n this.flashlsEvents = new _flashls_events2.default(this.cid);\n window.Clappr.flashlsCallbacks[this.cid] = function (eventName, args) {\n _this6.flashlsEvents[eventName].apply(_this6.flashlsEvents, args);\n };\n };\n\n FlasHLS.prototype.render = function render() {\n _BaseFlashPlayback.prototype.render.call(this);\n this._createCallbacks();\n return this;\n };\n\n (0, _createClass3.default)(FlasHLS, [{\n key: 'isReady',\n get: function get() {\n return this._isReadyState;\n }\n }, {\n key: 'dvrEnabled',\n get: function get() {\n return !!this._dvrEnabled;\n }\n }]);\n return FlasHLS;\n}(_base_flash_playback2.default);\n\nexports.default = FlasHLS;\n\n\nFlasHLS.canPlay = function (resource, mimeType) {\n var resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || [];\n return _browser2.default.hasFlash && (resourceParts.length > 1 && resourceParts[1].toLowerCase() === 'm3u8' || mimeType === 'application/x-mpegURL' || mimeType === 'application/vnd.apple.mpegurl');\n};\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/flashls/flashls_events.js\":\n/*!*************************************************!*\\\n !*** ./src/playbacks/flashls/flashls_events.js ***!\n \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _mediator = __webpack_require__(/*! ../../components/mediator */ \"./src/components/mediator.js\");\n\nvar _mediator2 = _interopRequireDefault(_mediator);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar HLSEvents = function () {\n function HLSEvents(instanceId) {\n (0, _classCallCheck3.default)(this, HLSEvents);\n\n this.instanceId = instanceId;\n }\n\n HLSEvents.prototype.ready = function ready() {\n _mediator2.default.trigger(this.instanceId + ':flashready');\n };\n\n HLSEvents.prototype.videoSize = function videoSize(width, height) {\n _mediator2.default.trigger(this.instanceId + ':videosizechanged', width, height);\n };\n\n HLSEvents.prototype.complete = function complete() {\n _mediator2.default.trigger(this.instanceId + ':complete');\n };\n\n HLSEvents.prototype.error = function error(code, url, message) {\n _mediator2.default.trigger(this.instanceId + ':error', code, url, message);\n };\n\n HLSEvents.prototype.manifest = function manifest(duration, loadmetrics) {\n _mediator2.default.trigger(this.instanceId + ':manifestloaded', duration, loadmetrics);\n };\n\n HLSEvents.prototype.audioLevelLoaded = function audioLevelLoaded(loadmetrics) {\n _mediator2.default.trigger(this.instanceId + ':audiolevelloaded', loadmetrics);\n };\n\n HLSEvents.prototype.levelLoaded = function levelLoaded(loadmetrics) {\n _mediator2.default.trigger(this.instanceId + ':levelloaded', loadmetrics);\n };\n\n HLSEvents.prototype.levelEndlist = function levelEndlist(level) {\n _mediator2.default.trigger(this.instanceId + ':levelendlist', level);\n };\n\n HLSEvents.prototype.fragmentLoaded = function fragmentLoaded(loadmetrics) {\n _mediator2.default.trigger(this.instanceId + ':fragmentloaded', loadmetrics);\n };\n\n HLSEvents.prototype.fragmentPlaying = function fragmentPlaying(playmetrics) {\n _mediator2.default.trigger(this.instanceId + ':fragmentplaying', playmetrics);\n };\n\n HLSEvents.prototype.position = function position(timemetrics) {\n _mediator2.default.trigger(this.instanceId + ':timeupdate', timemetrics);\n };\n\n HLSEvents.prototype.state = function state(newState) {\n _mediator2.default.trigger(this.instanceId + ':playbackstate', newState);\n };\n\n HLSEvents.prototype.seekState = function seekState(newState) {\n _mediator2.default.trigger(this.instanceId + ':seekstate', newState);\n };\n\n HLSEvents.prototype.switch = function _switch(newLevel) {\n _mediator2.default.trigger(this.instanceId + ':levelchanged', newLevel);\n };\n\n HLSEvents.prototype.audioTracksListChange = function audioTracksListChange(trackList) {\n _mediator2.default.trigger(this.instanceId + ':audiotracklistchanged', trackList);\n };\n\n HLSEvents.prototype.audioTrackChange = function audioTrackChange(trackId) {\n _mediator2.default.trigger(this.instanceId + ':audiotrackchanged', trackId);\n };\n\n return HLSEvents;\n}();\n\nexports.default = HLSEvents;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/flashls/index.js\":\n/*!****************************************!*\\\n !*** ./src/playbacks/flashls/index.js ***!\n \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _flashls = __webpack_require__(/*! ./flashls */ \"./src/playbacks/flashls/flashls.js\");\n\nvar _flashls2 = _interopRequireDefault(_flashls);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _flashls2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/flashls/public/HLSPlayer.swf\":\n/*!****************************************************!*\\\n !*** ./src/playbacks/flashls/public/HLSPlayer.swf ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<%=baseUrl%>/8fa12a459188502b9f0d39b8a67d9e6c.swf\";\n\n/***/ }),\n\n/***/ \"./src/playbacks/hls/hls.js\":\n/*!**********************************!*\\\n !*** ./src/playbacks/hls/hls.js ***!\n \\**********************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _toConsumableArray2 = __webpack_require__(/*! babel-runtime/helpers/toConsumableArray */ \"./node_modules/babel-runtime/helpers/toConsumableArray.js\");\n\nvar _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);\n\nvar _stringify = __webpack_require__(/*! babel-runtime/core-js/json/stringify */ \"./node_modules/babel-runtime/core-js/json/stringify.js\");\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ \"./node_modules/babel-runtime/helpers/extends.js\");\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _html5_video = __webpack_require__(/*! ../../playbacks/html5_video */ \"./src/playbacks/html5_video/index.js\");\n\nvar _html5_video2 = _interopRequireDefault(_html5_video);\n\nvar _hls = __webpack_require__(/*! hls.js */ \"./node_modules/hls.js/dist/hls.js\");\n\nvar _hls2 = _interopRequireDefault(_hls);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _utils = __webpack_require__(/*! ../../base/utils */ \"./src/base/utils.js\");\n\nvar _log = __webpack_require__(/*! ../../plugins/log */ \"./src/plugins/log/index.js\");\n\nvar _log2 = _interopRequireDefault(_log);\n\nvar _error = __webpack_require__(/*! ../../components/error */ \"./src/components/error/index.js\");\n\nvar _error2 = _interopRequireDefault(_error);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AUTO = -1; // Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nvar HLS = function (_HTML5VideoPlayback) {\n (0, _inherits3.default)(HLS, _HTML5VideoPlayback);\n (0, _createClass3.default)(HLS, [{\n key: 'name',\n get: function get() {\n return 'hls';\n }\n }, {\n key: 'levels',\n get: function get() {\n return this._levels || [];\n }\n }, {\n key: 'currentLevel',\n get: function get() {\n if (this._currentLevel === null || this._currentLevel === undefined) return AUTO;else return this._currentLevel; //0 is a valid level ID\n },\n set: function set(id) {\n this._currentLevel = id;\n this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH_START);\n if (this.options.playback.hlsUseNextLevel) this._hls.nextLevel = this._currentLevel;else this._hls.currentLevel = this._currentLevel;\n }\n }, {\n key: 'isReady',\n get: function get() {\n return this._isReadyState;\n }\n }, {\n key: '_startTime',\n get: function get() {\n if (this._playbackType === _playback2.default.LIVE && this._playlistType !== 'EVENT') return this._extrapolatedStartTime;\n\n return this._playableRegionStartTime;\n }\n }, {\n key: '_now',\n get: function get() {\n return (0, _utils.now)();\n }\n\n // the time in the video element which should represent the start of the sliding window\n // extrapolated to increase in real time (instead of jumping as the early segments are removed)\n\n }, {\n key: '_extrapolatedStartTime',\n get: function get() {\n if (!this._localStartTimeCorrelation) return this._playableRegionStartTime;\n\n var corr = this._localStartTimeCorrelation;\n var timePassed = this._now - corr.local;\n var extrapolatedWindowStartTime = (corr.remote + timePassed) / 1000;\n // cap at the end of the extrapolated window duration\n return Math.min(extrapolatedWindowStartTime, this._playableRegionStartTime + this._extrapolatedWindowDuration);\n }\n\n // the time in the video element which should represent the end of the content\n // extrapolated to increase in real time (instead of jumping as segments are added)\n\n }, {\n key: '_extrapolatedEndTime',\n get: function get() {\n var actualEndTime = this._playableRegionStartTime + this._playableRegionDuration;\n if (!this._localEndTimeCorrelation) return actualEndTime;\n\n var corr = this._localEndTimeCorrelation;\n var timePassed = this._now - corr.local;\n var extrapolatedEndTime = (corr.remote + timePassed) / 1000;\n return Math.max(actualEndTime - this._extrapolatedWindowDuration, Math.min(extrapolatedEndTime, actualEndTime));\n }\n }, {\n key: '_duration',\n get: function get() {\n return this._extrapolatedEndTime - this._startTime;\n }\n\n // Returns the duration (seconds) of the window that the extrapolated start time is allowed\n // to move in before being capped.\n // The extrapolated start time should never reach the cap at the end of the window as the\n // window should slide as chunks are removed from the start.\n // This also applies to the extrapolated end time in the same way.\n //\n // If chunks aren't being removed for some reason that the start time will reach and remain fixed at\n // playableRegionStartTime + extrapolatedWindowDuration\n //\n // <-- window duration -->\n // I.e playableRegionStartTime |-----------------------|\n // | --> . . .\n // . --> | --> . .\n // . . --> | --> .\n // . . . --> |\n // . . . .\n // extrapolatedStartTime\n\n }, {\n key: '_extrapolatedWindowDuration',\n get: function get() {\n if (this._segmentTargetDuration === null) return 0;\n\n return this._extrapolatedWindowNumSegments * this._segmentTargetDuration;\n }\n }], [{\n key: 'HLSJS',\n get: function get() {\n return _hls2.default;\n }\n }]);\n\n function HLS() {\n (0, _classCallCheck3.default)(this, HLS);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // backwards compatibility (TODO: remove on 0.3.0)\n var _this = (0, _possibleConstructorReturn3.default)(this, _HTML5VideoPlayback.call.apply(_HTML5VideoPlayback, [this].concat(args)));\n\n _this.options.playback = (0, _extends3.default)({}, _this.options, _this.options.playback);\n _this._minDvrSize = typeof _this.options.hlsMinimumDvrSize === 'undefined' ? 60 : _this.options.hlsMinimumDvrSize;\n // The size of the start time extrapolation window measured as a multiple of segments.\n // Should be 2 or higher, or 0 to disable. Should only need to be increased above 2 if more than one segment is\n // removed from the start of the playlist at a time. E.g if the playlist is cached for 10 seconds and new chunks are\n // added/removed every 5.\n _this._extrapolatedWindowNumSegments = !_this.options.playback || typeof _this.options.playback.extrapolatedWindowNumSegments === 'undefined' ? 2 : _this.options.playback.extrapolatedWindowNumSegments;\n\n _this._playbackType = _playback2.default.VOD;\n _this._lastTimeUpdate = { current: 0, total: 0 };\n _this._lastDuration = null;\n // for hls streams which have dvr with a sliding window,\n // the content at the start of the playlist is removed as new\n // content is appended at the end.\n // this means the actual playable start time will increase as the\n // start content is deleted\n // For streams with dvr where the entire recording is kept from the\n // beginning this should stay as 0\n _this._playableRegionStartTime = 0;\n // {local, remote} remote is the time in the video element that should represent 0\n // local is the system time when the 'remote' measurment took place\n _this._localStartTimeCorrelation = null;\n // {local, remote} remote is the time in the video element that should represents the end\n // local is the system time when the 'remote' measurment took place\n _this._localEndTimeCorrelation = null;\n // if content is removed from the beginning then this empty area should\n // be ignored. \"playableRegionDuration\" excludes the empty area\n _this._playableRegionDuration = 0;\n // #EXT-X-PROGRAM-DATE-TIME\n _this._programDateTime = 0;\n // true when the actual duration is longer than hlsjs's live sync point\n // when this is false playableRegionDuration will be the actual duration\n // when this is true playableRegionDuration will exclude the time after the sync point\n _this._durationExcludesAfterLiveSyncPoint = false;\n // #EXT-X-TARGETDURATION\n _this._segmentTargetDuration = null;\n // #EXT-X-PLAYLIST-TYPE\n _this._playlistType = null;\n _this._recoverAttemptsRemaining = _this.options.hlsRecoverAttempts || 16;\n return _this;\n }\n\n HLS.prototype._setup = function _setup() {\n var _this2 = this;\n\n this._ccIsSetup = false;\n this._ccTracksUpdated = false;\n this._hls = new _hls2.default((0, _utils.assign)({}, this.options.playback.hlsjsConfig));\n this._hls.on(_hls2.default.Events.MEDIA_ATTACHED, function () {\n return _this2._hls.loadSource(_this2.options.src);\n });\n this._hls.on(_hls2.default.Events.LEVEL_LOADED, function (evt, data) {\n return _this2._updatePlaybackType(evt, data);\n });\n this._hls.on(_hls2.default.Events.LEVEL_UPDATED, function (evt, data) {\n return _this2._onLevelUpdated(evt, data);\n });\n this._hls.on(_hls2.default.Events.LEVEL_SWITCHING, function (evt, data) {\n return _this2._onLevelSwitch(evt, data);\n });\n this._hls.on(_hls2.default.Events.FRAG_LOADED, function (evt, data) {\n return _this2._onFragmentLoaded(evt, data);\n });\n this._hls.on(_hls2.default.Events.ERROR, function (evt, data) {\n return _this2._onHLSJSError(evt, data);\n });\n this._hls.on(_hls2.default.Events.SUBTITLE_TRACK_LOADED, function (evt, data) {\n return _this2._onSubtitleLoaded(evt, data);\n });\n this._hls.on(_hls2.default.Events.SUBTITLE_TRACKS_UPDATED, function () {\n return _this2._ccTracksUpdated = true;\n });\n this._hls.attachMedia(this.el);\n };\n\n HLS.prototype.render = function render() {\n this._ready();\n return _HTML5VideoPlayback.prototype.render.call(this);\n };\n\n HLS.prototype._ready = function _ready() {\n this._isReadyState = true;\n this.trigger(_events2.default.PLAYBACK_READY, this.name);\n };\n\n HLS.prototype._recover = function _recover(evt, data, error) {\n if (!this._recoveredDecodingError) {\n this._recoveredDecodingError = true;\n this._hls.recoverMediaError();\n } else if (!this._recoveredAudioCodecError) {\n this._recoveredAudioCodecError = true;\n this._hls.swapAudioCodec();\n this._hls.recoverMediaError();\n } else {\n _log2.default.error('hlsjs: failed to recover', { evt: evt, data: data });\n error.level = _error2.default.Levels.FATAL;\n var formattedError = this.createError(error);\n this.trigger(_events2.default.PLAYBACK_ERROR, formattedError);\n this.stop();\n }\n };\n\n // override\n\n\n HLS.prototype._setupSrc = function _setupSrc(srcUrl) {// eslint-disable-line no-unused-vars\n // this playback manages the src on the video element itself\n };\n\n HLS.prototype._startTimeUpdateTimer = function _startTimeUpdateTimer() {\n var _this3 = this;\n\n if (this._timeUpdateTimer) return;\n\n this._timeUpdateTimer = setInterval(function () {\n _this3._onDurationChange();\n _this3._onTimeUpdate();\n }, 100);\n };\n\n HLS.prototype._stopTimeUpdateTimer = function _stopTimeUpdateTimer() {\n if (!this._timeUpdateTimer) return;\n\n clearInterval(this._timeUpdateTimer);\n this._timeUpdateTimer = null;\n };\n\n HLS.prototype.getProgramDateTime = function getProgramDateTime() {\n return this._programDateTime;\n };\n // the duration on the video element itself should not be used\n // as this does not necesarily represent the duration of the stream\n // https://github.com/clappr/clappr/issues/668#issuecomment-157036678\n\n\n HLS.prototype.getDuration = function getDuration() {\n return this._duration;\n };\n\n HLS.prototype.getCurrentTime = function getCurrentTime() {\n // e.g. can be < 0 if user pauses near the start\n // eventually they will then be kicked to the end by hlsjs if they run out of buffer\n // before the official start time\n return Math.max(0, this.el.currentTime - this._startTime);\n };\n\n // the time that \"0\" now represents relative to when playback started\n // for a stream with a sliding window this will increase as content is\n // removed from the beginning\n\n\n HLS.prototype.getStartTimeOffset = function getStartTimeOffset() {\n return this._startTime;\n };\n\n HLS.prototype.seekPercentage = function seekPercentage(percentage) {\n var seekTo = this._duration;\n if (percentage > 0) seekTo = this._duration * (percentage / 100);\n\n this.seek(seekTo);\n };\n\n HLS.prototype.seek = function seek(time) {\n if (time < 0) {\n _log2.default.warn('Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point.');\n time = this.getDuration();\n }\n // assume live if time within 3 seconds of end of stream\n this.dvrEnabled && this._updateDvr(time < this.getDuration() - 3);\n time += this._startTime;\n _HTML5VideoPlayback.prototype.seek.call(this, time);\n };\n\n HLS.prototype.seekToLivePoint = function seekToLivePoint() {\n this.seek(this.getDuration());\n };\n\n HLS.prototype._updateDvr = function _updateDvr(status) {\n this.trigger(_events2.default.PLAYBACK_DVR, status);\n this.trigger(_events2.default.PLAYBACK_STATS_ADD, { 'dvr': status });\n };\n\n HLS.prototype._updateSettings = function _updateSettings() {\n if (this._playbackType === _playback2.default.VOD) this.settings.left = ['playpause', 'position', 'duration'];else if (this.dvrEnabled) this.settings.left = ['playpause'];else this.settings.left = ['playstop'];\n\n this.settings.seekEnabled = this.isSeekEnabled();\n this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE);\n };\n\n HLS.prototype._onHLSJSError = function _onHLSJSError(evt, data) {\n var error = {\n code: data.type + '_' + data.details,\n description: this.name + ' error: type: ' + data.type + ', details: ' + data.details,\n raw: data\n };\n var formattedError = void 0;\n if (data.response) error.description += ', response: ' + (0, _stringify2.default)(data.response);\n // only report/handle errors if they are fatal\n // hlsjs should automatically handle non fatal errors\n if (data.fatal) {\n if (this._recoverAttemptsRemaining > 0) {\n this._recoverAttemptsRemaining -= 1;\n switch (data.type) {\n case _hls2.default.ErrorTypes.NETWORK_ERROR:\n switch (data.details) {\n // The following network errors cannot be recovered with HLS.startLoad()\n // For more details, see https://github.com/video-dev/hls.js/blob/master/doc/design.md#error-detection-and-handling\n // For \"level load\" fatal errors, see https://github.com/video-dev/hls.js/issues/1138\n case _hls2.default.ErrorDetails.MANIFEST_LOAD_ERROR:\n case _hls2.default.ErrorDetails.MANIFEST_LOAD_TIMEOUT:\n case _hls2.default.ErrorDetails.MANIFEST_PARSING_ERROR:\n case _hls2.default.ErrorDetails.LEVEL_LOAD_ERROR:\n case _hls2.default.ErrorDetails.LEVEL_LOAD_TIMEOUT:\n _log2.default.error('hlsjs: unrecoverable network fatal error.', { evt: evt, data: data });\n formattedError = this.createError(error);\n this.trigger(_events2.default.PLAYBACK_ERROR, formattedError);\n this.stop();\n break;\n default:\n _log2.default.warn('hlsjs: trying to recover from network error.', { evt: evt, data: data });\n error.level = _error2.default.Levels.WARN;\n this.createError(error);\n this._hls.startLoad();\n break;\n }\n break;\n case _hls2.default.ErrorTypes.MEDIA_ERROR:\n _log2.default.warn('hlsjs: trying to recover from media error.', { evt: evt, data: data });\n error.level = _error2.default.Levels.WARN;\n this.createError(error);\n this._recover(evt, data, error);\n break;\n default:\n _log2.default.error('hlsjs: could not recover from error.', { evt: evt, data: data });\n formattedError = this.createError(error);\n this.trigger(_events2.default.PLAYBACK_ERROR, formattedError);\n this.stop();\n break;\n }\n } else {\n _log2.default.error('hlsjs: could not recover from error after maximum number of attempts.', { evt: evt, data: data });\n formattedError = this.createError(error);\n this.trigger(_events2.default.PLAYBACK_ERROR, formattedError);\n this.stop();\n }\n } else {\n // Transforms HLSJS.ErrorDetails.KEY_LOAD_ERROR non-fatal error to\n // playback fatal error if triggerFatalErrorOnResourceDenied playback\n // option is set. HLSJS.ErrorTypes.KEY_SYSTEM_ERROR are fatal errors\n // and therefore already handled.\n if (this.options.playback.triggerFatalErrorOnResourceDenied && this._keyIsDenied(data)) {\n _log2.default.error('hlsjs: could not load decrypt key.', { evt: evt, data: data });\n formattedError = this.createError(error);\n this.trigger(_events2.default.PLAYBACK_ERROR, formattedError);\n this.stop();\n return;\n }\n\n error.level = _error2.default.Levels.WARN;\n this.createError(error);\n _log2.default.warn('hlsjs: non-fatal error occurred', { evt: evt, data: data });\n }\n };\n\n HLS.prototype._keyIsDenied = function _keyIsDenied(data) {\n return data.type === _hls2.default.ErrorTypes.NETWORK_ERROR && data.details === _hls2.default.ErrorDetails.KEY_LOAD_ERROR && data.response && data.response.code >= 400;\n };\n\n HLS.prototype._onTimeUpdate = function _onTimeUpdate() {\n var update = { current: this.getCurrentTime(), total: this.getDuration(), firstFragDateTime: this.getProgramDateTime() };\n var isSame = this._lastTimeUpdate && update.current === this._lastTimeUpdate.current && update.total === this._lastTimeUpdate.total;\n if (isSame) return;\n\n this._lastTimeUpdate = update;\n this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, update, this.name);\n };\n\n HLS.prototype._onDurationChange = function _onDurationChange() {\n var duration = this.getDuration();\n if (this._lastDuration === duration) return;\n\n this._lastDuration = duration;\n _HTML5VideoPlayback.prototype._onDurationChange.call(this);\n };\n\n HLS.prototype._onProgress = function _onProgress() {\n if (!this.el.buffered.length) return;\n\n var buffered = [];\n var bufferedPos = 0;\n for (var i = 0; i < this.el.buffered.length; i++) {\n buffered = [].concat((0, _toConsumableArray3.default)(buffered), [{\n // for a stream with sliding window dvr something that is buffered my slide off the start of the timeline\n start: Math.max(0, this.el.buffered.start(i) - this._playableRegionStartTime),\n end: Math.max(0, this.el.buffered.end(i) - this._playableRegionStartTime)\n }]);\n if (this.el.currentTime >= buffered[i].start && this.el.currentTime <= buffered[i].end) bufferedPos = i;\n }\n var progress = {\n start: buffered[bufferedPos].start,\n current: buffered[bufferedPos].end,\n total: this.getDuration()\n };\n this.trigger(_events2.default.PLAYBACK_PROGRESS, progress, buffered);\n };\n\n HLS.prototype.play = function play() {\n if (!this._hls) this._setup();\n\n _HTML5VideoPlayback.prototype.play.call(this);\n this._startTimeUpdateTimer();\n };\n\n HLS.prototype.pause = function pause() {\n if (!this._hls) return;\n\n _HTML5VideoPlayback.prototype.pause.call(this);\n if (this.dvrEnabled) this._updateDvr(true);\n };\n\n HLS.prototype.stop = function stop() {\n this._stopTimeUpdateTimer();\n if (this._hls) {\n _HTML5VideoPlayback.prototype.stop.call(this);\n this._hls.destroy();\n delete this._hls;\n }\n };\n\n HLS.prototype.destroy = function destroy() {\n this._stopTimeUpdateTimer();\n if (this._hls) {\n this._hls.destroy();\n delete this._hls;\n }\n _HTML5VideoPlayback.prototype.destroy.call(this);\n };\n\n HLS.prototype._updatePlaybackType = function _updatePlaybackType(evt, data) {\n this._playbackType = data.details.live ? _playback2.default.LIVE : _playback2.default.VOD;\n this._onLevelUpdated(evt, data);\n\n // Live stream subtitle tracks detection hack (may not immediately available)\n if (this._ccTracksUpdated && this._playbackType === _playback2.default.LIVE && this.hasClosedCaptionsTracks) this._onSubtitleLoaded();\n };\n\n HLS.prototype._fillLevels = function _fillLevels() {\n this._levels = this._hls.levels.map(function (level, index) {\n return { id: index, level: level, label: level.bitrate / 1000 + 'Kbps' };\n });\n this.trigger(_events2.default.PLAYBACK_LEVELS_AVAILABLE, this._levels);\n };\n\n HLS.prototype._onLevelUpdated = function _onLevelUpdated(evt, data) {\n this._segmentTargetDuration = data.details.targetduration;\n this._playlistType = data.details.type || null;\n\n var startTimeChanged = false;\n var durationChanged = false;\n var fragments = data.details.fragments;\n var previousPlayableRegionStartTime = this._playableRegionStartTime;\n var previousPlayableRegionDuration = this._playableRegionDuration;\n\n if (fragments.length === 0) return;\n\n // #EXT-X-PROGRAM-DATE-TIME\n if (fragments[0].rawProgramDateTime) this._programDateTime = fragments[0].rawProgramDateTime;\n\n if (this._playableRegionStartTime !== fragments[0].start) {\n startTimeChanged = true;\n this._playableRegionStartTime = fragments[0].start;\n }\n\n if (startTimeChanged) {\n if (!this._localStartTimeCorrelation) {\n // set the correlation to map to middle of the extrapolation window\n this._localStartTimeCorrelation = {\n local: this._now,\n remote: (fragments[0].start + this._extrapolatedWindowDuration / 2) * 1000\n };\n } else {\n // check if the correlation still works\n var corr = this._localStartTimeCorrelation;\n var timePassed = this._now - corr.local;\n // this should point to a time within the extrapolation window\n var startTime = (corr.remote + timePassed) / 1000;\n if (startTime < fragments[0].start) {\n // our start time is now earlier than the first chunk\n // (maybe the chunk was removed early)\n // reset correlation so that it sits at the beginning of the first available chunk\n this._localStartTimeCorrelation = {\n local: this._now,\n remote: fragments[0].start * 1000\n };\n } else if (startTime > previousPlayableRegionStartTime + this._extrapolatedWindowDuration) {\n // start time was past the end of the old extrapolation window (so would have been capped)\n // see if now that time would be inside the window, and if it would be set the correlation\n // so that it resumes from the time it was at at the end of the old window\n // update the correlation so that the time starts counting again from the value it's on now\n this._localStartTimeCorrelation = {\n local: this._now,\n remote: Math.max(fragments[0].start, previousPlayableRegionStartTime + this._extrapolatedWindowDuration) * 1000\n };\n }\n }\n }\n\n var newDuration = data.details.totalduration;\n // if it's a live stream then shorten the duration to remove access\n // to the area after hlsjs's live sync point\n // seeks to areas after this point sometimes have issues\n if (this._playbackType === _playback2.default.LIVE) {\n var fragmentTargetDuration = data.details.targetduration;\n var hlsjsConfig = this.options.playback.hlsjsConfig || {};\n var liveSyncDurationCount = hlsjsConfig.liveSyncDurationCount || _hls2.default.DefaultConfig.liveSyncDurationCount;\n var hiddenAreaDuration = fragmentTargetDuration * liveSyncDurationCount;\n if (hiddenAreaDuration <= newDuration) {\n newDuration -= hiddenAreaDuration;\n this._durationExcludesAfterLiveSyncPoint = true;\n } else {\n this._durationExcludesAfterLiveSyncPoint = false;\n }\n }\n\n if (newDuration !== this._playableRegionDuration) {\n durationChanged = true;\n this._playableRegionDuration = newDuration;\n }\n\n // Note the end time is not the playableRegionDuration\n // The end time will always increase even if content is removed from the beginning\n var endTime = fragments[0].start + newDuration;\n var previousEndTime = previousPlayableRegionStartTime + previousPlayableRegionDuration;\n var endTimeChanged = endTime !== previousEndTime;\n if (endTimeChanged) {\n if (!this._localEndTimeCorrelation) {\n // set the correlation to map to the end\n this._localEndTimeCorrelation = {\n local: this._now,\n remote: endTime * 1000\n };\n } else {\n // check if the correlation still works\n var _corr = this._localEndTimeCorrelation;\n var _timePassed = this._now - _corr.local;\n // this should point to a time within the extrapolation window from the end\n var extrapolatedEndTime = (_corr.remote + _timePassed) / 1000;\n if (extrapolatedEndTime > endTime) {\n this._localEndTimeCorrelation = {\n local: this._now,\n remote: endTime * 1000\n };\n } else if (extrapolatedEndTime < endTime - this._extrapolatedWindowDuration) {\n // our extrapolated end time is now earlier than the extrapolation window from the actual end time\n // (maybe a chunk became available early)\n // reset correlation so that it sits at the beginning of the extrapolation window from the end time\n this._localEndTimeCorrelation = {\n local: this._now,\n remote: (endTime - this._extrapolatedWindowDuration) * 1000\n };\n } else if (extrapolatedEndTime > previousEndTime) {\n // end time was past the old end time (so would have been capped)\n // set the correlation so that it resumes from the time it was at at the end of the old window\n this._localEndTimeCorrelation = {\n local: this._now,\n remote: previousEndTime * 1000\n };\n }\n }\n }\n\n // now that the values have been updated call any methods that use on them so they get the updated values\n // immediately\n durationChanged && this._onDurationChange();\n startTimeChanged && this._onProgress();\n };\n\n HLS.prototype._onFragmentLoaded = function _onFragmentLoaded(evt, data) {\n this.trigger(_events2.default.PLAYBACK_FRAGMENT_LOADED, data);\n };\n\n HLS.prototype._onSubtitleLoaded = function _onSubtitleLoaded() {\n // This event may be triggered multiple times\n // Setup CC only once (disable CC by default)\n if (!this._ccIsSetup) {\n this.trigger(_events2.default.PLAYBACK_SUBTITLE_AVAILABLE);\n var trackId = this._playbackType === _playback2.default.LIVE ? -1 : this.closedCaptionsTrackId;\n this.closedCaptionsTrackId = trackId;\n this._ccIsSetup = true;\n }\n };\n\n HLS.prototype._onLevelSwitch = function _onLevelSwitch(evt, data) {\n if (!this.levels.length) this._fillLevels();\n\n this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH_END);\n this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH, data);\n var currentLevel = this._hls.levels[data.level];\n if (currentLevel) {\n // TODO should highDefinition be private and maybe have a read only accessor if it's used somewhere\n this.highDefinition = currentLevel.height >= 720 || currentLevel.bitrate / 1000 >= 2000;\n this.trigger(_events2.default.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition);\n this.trigger(_events2.default.PLAYBACK_BITRATE, {\n height: currentLevel.height,\n width: currentLevel.width,\n bandwidth: currentLevel.bitrate,\n bitrate: currentLevel.bitrate,\n level: data.level\n });\n }\n };\n\n HLS.prototype.getPlaybackType = function getPlaybackType() {\n return this._playbackType;\n };\n\n HLS.prototype.isSeekEnabled = function isSeekEnabled() {\n return this._playbackType === _playback2.default.VOD || this.dvrEnabled;\n };\n\n (0, _createClass3.default)(HLS, [{\n key: 'dvrEnabled',\n get: function get() {\n // enabled when:\n // - the duration does not include content after hlsjs's live sync point\n // - the playable region duration is longer than the configured duration to enable dvr after\n // - the playback type is LIVE.\n return this._durationExcludesAfterLiveSyncPoint && this._duration >= this._minDvrSize && this.getPlaybackType() === _playback2.default.LIVE;\n }\n }]);\n return HLS;\n}(_html5_video2.default);\n\nexports.default = HLS;\n\n\nHLS.canPlay = function (resource, mimeType) {\n var resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || [];\n var isHls = resourceParts.length > 1 && resourceParts[1].toLowerCase() === 'm3u8' || (0, _utils.listContainsIgnoreCase)(mimeType, ['application/vnd.apple.mpegurl', 'application/x-mpegURL']);\n\n return !!(_hls2.default.isSupported() && isHls);\n};\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/hls/index.js\":\n/*!************************************!*\\\n !*** ./src/playbacks/hls/index.js ***!\n \\************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _hls = __webpack_require__(/*! ./hls */ \"./src/playbacks/hls/hls.js\");\n\nvar _hls2 = _interopRequireDefault(_hls);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _hls2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/html5_audio/html5_audio.js\":\n/*!**************************************************!*\\\n !*** ./src/playbacks/html5_audio/html5_audio.js ***!\n \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _html5_video = __webpack_require__(/*! ../../playbacks/html5_video */ \"./src/playbacks/html5_video/index.js\");\n\nvar _html5_video2 = _interopRequireDefault(_html5_video);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// TODO: remove this playback and change HTML5Video to HTML5Playback (breaking change, only after 0.3.0)\nvar HTML5Audio = function (_HTML5Video) {\n (0, _inherits3.default)(HTML5Audio, _HTML5Video);\n\n function HTML5Audio() {\n (0, _classCallCheck3.default)(this, HTML5Audio);\n return (0, _possibleConstructorReturn3.default)(this, _HTML5Video.apply(this, arguments));\n }\n\n HTML5Audio.prototype.updateSettings = function updateSettings() {\n this.settings.left = ['playpause', 'position', 'duration'];\n this.settings.seekEnabled = this.isSeekEnabled();\n this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE);\n };\n\n HTML5Audio.prototype.getPlaybackType = function getPlaybackType() {\n return _playback2.default.AOD;\n };\n\n (0, _createClass3.default)(HTML5Audio, [{\n key: 'name',\n get: function get() {\n return 'html5_audio';\n }\n }, {\n key: 'tagName',\n get: function get() {\n return 'audio';\n }\n }, {\n key: 'isAudioOnly',\n get: function get() {\n return true;\n }\n }]);\n return HTML5Audio;\n}(_html5_video2.default); // Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nexports.default = HTML5Audio;\n\n\nHTML5Audio.canPlay = function (resourceUrl, mimeType) {\n var mimetypes = {\n 'wav': ['audio/wav'],\n 'mp3': ['audio/mp3', 'audio/mpeg;codecs=\"mp3\"'],\n 'aac': ['audio/mp4;codecs=\"mp4a.40.5\"'],\n 'oga': ['audio/ogg']\n };\n return _html5_video2.default._canPlay('audio', mimetypes, resourceUrl, mimeType);\n};\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/html5_audio/index.js\":\n/*!********************************************!*\\\n !*** ./src/playbacks/html5_audio/index.js ***!\n \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _html5_audio = __webpack_require__(/*! ./html5_audio */ \"./src/playbacks/html5_audio/html5_audio.js\");\n\nvar _html5_audio2 = _interopRequireDefault(_html5_audio);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _html5_audio2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/html5_video/html5_video.js\":\n/*!**************************************************!*\\\n !*** ./src/playbacks/html5_video/html5_video.js ***!\n \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _from = __webpack_require__(/*! babel-runtime/core-js/array/from */ \"./node_modules/babel-runtime/core-js/array/from.js\");\n\nvar _from2 = _interopRequireDefault(_from);\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _toConsumableArray2 = __webpack_require__(/*! babel-runtime/helpers/toConsumableArray */ \"./node_modules/babel-runtime/helpers/toConsumableArray.js\");\n\nvar _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);\n\nvar _keys = __webpack_require__(/*! babel-runtime/core-js/object/keys */ \"./node_modules/babel-runtime/core-js/object/keys.js\");\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _utils = __webpack_require__(/*! ../../base/utils */ \"./src/base/utils.js\");\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _browser = __webpack_require__(/*! ../../components/browser */ \"./src/components/browser/index.js\");\n\nvar _browser2 = _interopRequireDefault(_browser);\n\nvar _error = __webpack_require__(/*! ../../components/error */ \"./src/components/error/index.js\");\n\nvar _error2 = _interopRequireDefault(_error);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _log = __webpack_require__(/*! ../../plugins/log */ \"./src/plugins/log/index.js\");\n\nvar _log2 = _interopRequireDefault(_log);\n\nvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ \"./node_modules/clappr-zepto/zepto.js\");\n\nvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\nvar _template = __webpack_require__(/*! ../../base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _tracks = __webpack_require__(/*! ./public/tracks.html */ \"./src/playbacks/html5_video/public/tracks.html\");\n\nvar _tracks2 = _interopRequireDefault(_tracks);\n\n__webpack_require__(/*! ./public/style.scss */ \"./src/playbacks/html5_video/public/style.scss\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nvar MIMETYPES = {\n 'mp4': ['avc1.42E01E', 'avc1.58A01E', 'avc1.4D401E', 'avc1.64001E', 'mp4v.20.8', 'mp4v.20.240', 'mp4a.40.2'].map(function (codec) {\n return 'video/mp4; codecs=\"' + codec + ', mp4a.40.2\"';\n }),\n 'ogg': ['video/ogg; codecs=\"theora, vorbis\"', 'video/ogg; codecs=\"dirac\"', 'video/ogg; codecs=\"theora, speex\"'],\n '3gpp': ['video/3gpp; codecs=\"mp4v.20.8, samr\"'],\n 'webm': ['video/webm; codecs=\"vp8, vorbis\"'],\n 'mkv': ['video/x-matroska; codecs=\"theora, vorbis\"'],\n 'm3u8': ['application/x-mpegurl']\n};\nMIMETYPES['ogv'] = MIMETYPES['ogg'];\nMIMETYPES['3gp'] = MIMETYPES['3gpp'];\n\nvar AUDIO_MIMETYPES = {\n 'wav': ['audio/wav'],\n 'mp3': ['audio/mp3', 'audio/mpeg;codecs=\"mp3\"'],\n 'aac': ['audio/mp4;codecs=\"mp4a.40.5\"'],\n 'oga': ['audio/ogg']\n};\n\nvar KNOWN_AUDIO_MIMETYPES = (0, _keys2.default)(AUDIO_MIMETYPES).reduce(function (acc, k) {\n return [].concat((0, _toConsumableArray3.default)(acc), (0, _toConsumableArray3.default)(AUDIO_MIMETYPES[k]));\n}, []);\n\nvar UNKNOWN_ERROR = { code: 'unknown', message: 'unknown'\n\n // TODO: rename this Playback to HTML5Playback (breaking change, only after 0.3.0)\n};\nvar HTML5Video = function (_Playback) {\n (0, _inherits3.default)(HTML5Video, _Playback);\n (0, _createClass3.default)(HTML5Video, [{\n key: 'name',\n get: function get() {\n return 'html5_video';\n }\n }, {\n key: 'tagName',\n get: function get() {\n return this.isAudioOnly ? 'audio' : 'video';\n }\n }, {\n key: 'isAudioOnly',\n get: function get() {\n var resourceUrl = this.options.src;\n var mimeTypes = HTML5Video._mimeTypesForUrl(resourceUrl, AUDIO_MIMETYPES, this.options.mimeType);\n return this.options.playback && this.options.playback.audioOnly || this.options.audioOnly || KNOWN_AUDIO_MIMETYPES.indexOf(mimeTypes[0]) >= 0;\n }\n }, {\n key: 'attributes',\n get: function get() {\n return {\n 'data-html5-video': ''\n };\n }\n }, {\n key: 'events',\n get: function get() {\n return {\n 'canplay': '_onCanPlay',\n 'canplaythrough': '_handleBufferingEvents',\n 'durationchange': '_onDurationChange',\n 'ended': '_onEnded',\n 'error': '_onError',\n 'loadeddata': '_onLoadedData',\n 'loadedmetadata': '_onLoadedMetadata',\n 'pause': '_onPause',\n 'playing': '_onPlaying',\n 'progress': '_onProgress',\n 'seeking': '_onSeeking',\n 'seeked': '_onSeeked',\n 'stalled': '_handleBufferingEvents',\n 'timeupdate': '_onTimeUpdate',\n 'waiting': '_onWaiting'\n };\n }\n\n /**\n * Determine if the playback has ended.\n * @property ended\n * @type Boolean\n */\n\n }, {\n key: 'ended',\n get: function get() {\n return this.el.ended;\n }\n\n /**\n * Determine if the playback is having to buffer in order for\n * playback to be smooth.\n * This is related to the PLAYBACK_BUFFERING and PLAYBACK_BUFFERFULL events\n * @property buffering\n * @type Boolean\n */\n\n }, {\n key: 'buffering',\n get: function get() {\n return this._isBuffering;\n }\n }]);\n\n function HTML5Video() {\n (0, _classCallCheck3.default)(this, HTML5Video);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _Playback.call.apply(_Playback, [this].concat(args)));\n\n _this._destroyed = false;\n _this._loadStarted = false;\n _this._isBuffering = false;\n _this._playheadMoving = false;\n _this._playheadMovingTimer = null;\n _this._stopped = false;\n _this._ccTrackId = -1;\n _this._setupSrc(_this.options.src);\n // backwards compatibility (TODO: remove on 0.3.0)\n _this.options.playback || (_this.options.playback = _this.options || {});\n _this.options.playback.disableContextMenu = _this.options.playback.disableContextMenu || _this.options.disableVideoTagContextMenu;\n\n var playbackConfig = _this.options.playback;\n var preload = playbackConfig.preload || (_browser2.default.isSafari ? 'auto' : _this.options.preload);\n\n var posterUrl = void 0; // FIXME: poster plugin should always convert poster to object with expected properties ?\n if (_this.options.poster) {\n if (typeof _this.options.poster === 'string') posterUrl = _this.options.poster;else if (typeof _this.options.poster.url === 'string') posterUrl = _this.options.poster.url;\n }\n\n _clapprZepto2.default.extend(_this.el, {\n muted: _this.options.mute,\n defaultMuted: _this.options.mute,\n loop: _this.options.loop,\n poster: posterUrl,\n preload: preload || 'metadata',\n controls: (playbackConfig.controls || _this.options.useVideoTagDefaultControls) && 'controls',\n crossOrigin: playbackConfig.crossOrigin,\n 'x-webkit-playsinline': playbackConfig.playInline\n });\n\n playbackConfig.playInline && _this.$el.attr({ playsinline: 'playsinline' });\n playbackConfig.crossOrigin && _this.$el.attr({ crossorigin: playbackConfig.crossOrigin });\n\n // TODO should settings be private?\n _this.settings = { default: ['seekbar'] };\n _this.settings.left = ['playpause', 'position', 'duration'];\n _this.settings.right = ['fullscreen', 'volume', 'hd-indicator'];\n\n playbackConfig.externalTracks && _this._setupExternalTracks(playbackConfig.externalTracks);\n\n _this.options.autoPlay && _this.attemptAutoPlay();\n return _this;\n }\n\n HTML5Video.prototype.configure = function configure(options) {\n _Playback.prototype.configure.call(this, options);\n this.el.loop = !!options.loop;\n };\n\n // See Playback.attemptAutoPlay()\n\n\n HTML5Video.prototype.attemptAutoPlay = function attemptAutoPlay() {\n var _this2 = this;\n\n this.canAutoPlay(function (result, error) {\n error && _log2.default.warn(_this2.name, 'autoplay error.', { result: result, error: error });\n\n // https://github.com/clappr/clappr/issues/1076\n result && process.nextTick(function () {\n return !_this2._destroyed && _this2.play();\n });\n });\n };\n\n // See Playback.canAutoPlay()\n\n\n HTML5Video.prototype.canAutoPlay = function canAutoPlay(cb) {\n if (this.options.disableCanAutoPlay) cb(true, null);\n\n var opts = {\n timeout: this.options.autoPlayTimeout || 500,\n inline: this.options.playback.playInline || false,\n muted: this.options.mute || false // Known issue: mediacontrols may asynchronously mute video\n\n\n // Use current video element if recycling feature enabled with mobile devices\n };if (_browser2.default.isMobile && _utils.DomRecycler.options.recycleVideo) opts.element = this.el;\n\n // Desktop browser autoplay policy may require user action\n // Mobile browser autoplay require user consent and video recycling feature enabled\n // It may returns a false positive with source-less player consent\n (0, _utils.canAutoPlayMedia)(cb, opts);\n };\n\n HTML5Video.prototype._setupExternalTracks = function _setupExternalTracks(tracks) {\n this._externalTracks = tracks.map(function (track) {\n return {\n kind: track.kind || 'subtitles', // Default is 'subtitles'\n label: track.label,\n lang: track.lang,\n src: track.src\n };\n });\n };\n\n /**\n * Sets the source url on the element, and also the 'src' property.\n * @method setupSrc\n * @private\n * @param {String} srcUrl The source URL.\n */\n\n\n HTML5Video.prototype._setupSrc = function _setupSrc(srcUrl) {\n if (this.el.src === srcUrl) return;\n\n this._ccIsSetup = false;\n this.el.src = srcUrl;\n this._src = this.el.src;\n };\n\n HTML5Video.prototype._onLoadedMetadata = function _onLoadedMetadata(e) {\n this._handleBufferingEvents();\n this.trigger(_events2.default.PLAYBACK_LOADEDMETADATA, { duration: e.target.duration, data: e });\n this._updateSettings();\n var autoSeekFromUrl = typeof this._options.autoSeekFromUrl === 'undefined' || this._options.autoSeekFromUrl;\n if (this.getPlaybackType() !== _playback2.default.LIVE && autoSeekFromUrl) this._checkInitialSeek();\n };\n\n HTML5Video.prototype._onDurationChange = function _onDurationChange() {\n this._updateSettings();\n this._onTimeUpdate();\n // onProgress uses the duration\n this._onProgress();\n };\n\n HTML5Video.prototype._updateSettings = function _updateSettings() {\n // we can't figure out if hls resource is VoD or not until it is being loaded or duration has changed.\n // that's why we check it again and update media control accordingly.\n if (this.getPlaybackType() === _playback2.default.VOD || this.getPlaybackType() === _playback2.default.AOD) this.settings.left = ['playpause', 'position', 'duration'];else this.settings.left = ['playstop'];\n\n this.settings.seekEnabled = this.isSeekEnabled();\n this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE);\n };\n\n HTML5Video.prototype.isSeekEnabled = function isSeekEnabled() {\n return isFinite(this.getDuration());\n };\n\n HTML5Video.prototype.getPlaybackType = function getPlaybackType() {\n var onDemandType = this.tagName === 'audio' ? _playback2.default.AOD : _playback2.default.VOD;\n return [0, undefined, Infinity].indexOf(this.el.duration) >= 0 ? _playback2.default.LIVE : onDemandType;\n };\n\n HTML5Video.prototype.isHighDefinitionInUse = function isHighDefinitionInUse() {\n return false;\n };\n\n // On mobile device, HTML5 video element \"retains\" user action consent if\n // load() method is called. See Player.consent().\n\n\n HTML5Video.prototype.consent = function consent() {\n if (!this.isPlaying()) {\n _Playback.prototype.consent.call(this);\n this.el.load();\n }\n };\n\n HTML5Video.prototype.play = function play() {\n this.trigger(_events2.default.PLAYBACK_PLAY_INTENT);\n this._stopped = false;\n this._setupSrc(this._src);\n this._handleBufferingEvents();\n var promise = this.el.play();\n // For more details, see https://developers.google.com/web/updates/2016/03/play-returns-promise\n if (promise && promise.catch) promise.catch(function () {});\n };\n\n HTML5Video.prototype.pause = function pause() {\n this.el.pause();\n };\n\n HTML5Video.prototype.stop = function stop() {\n this.pause();\n this._stopped = true;\n // src will be added again in play()\n this.el.removeAttribute('src');\n this.el.load(); // load with no src to stop loading of the previous source and avoid leaks\n this._stopPlayheadMovingChecks();\n this._handleBufferingEvents();\n this.trigger(_events2.default.PLAYBACK_STOP);\n };\n\n HTML5Video.prototype.volume = function volume(value) {\n if (value === 0) {\n this.$el.attr({ muted: 'true' });\n this.el.muted = true;\n } else {\n this.$el.attr({ muted: null });\n this.el.muted = false;\n this.el.volume = value / 100;\n }\n };\n\n /**\n * @deprecated\n * @private\n */\n\n\n HTML5Video.prototype.mute = function mute() {\n this.el.muted = true;\n };\n\n /**\n * @deprecated\n * @private\n */\n\n\n HTML5Video.prototype.unmute = function unmute() {\n this.el.muted = false;\n };\n\n HTML5Video.prototype.isMuted = function isMuted() {\n return this.el.muted === true || this.el.volume === 0;\n };\n\n HTML5Video.prototype.isPlaying = function isPlaying() {\n return !this.el.paused && !this.el.ended;\n };\n\n HTML5Video.prototype._startPlayheadMovingChecks = function _startPlayheadMovingChecks() {\n if (this._playheadMovingTimer !== null) return;\n\n this._playheadMovingTimeOnCheck = null;\n this._determineIfPlayheadMoving();\n this._playheadMovingTimer = setInterval(this._determineIfPlayheadMoving.bind(this), 500);\n };\n\n HTML5Video.prototype._stopPlayheadMovingChecks = function _stopPlayheadMovingChecks() {\n if (this._playheadMovingTimer === null) return;\n\n clearInterval(this._playheadMovingTimer);\n this._playheadMovingTimer = null;\n this._playheadMoving = false;\n };\n\n HTML5Video.prototype._determineIfPlayheadMoving = function _determineIfPlayheadMoving() {\n var before = this._playheadMovingTimeOnCheck;\n var now = this.el.currentTime;\n this._playheadMoving = before !== now;\n this._playheadMovingTimeOnCheck = now;\n this._handleBufferingEvents();\n };\n\n // this seems to happen when the user is having to wait\n // for something to happen AFTER A USER INTERACTION\n // e.g the player might be buffering, but when `play()` is called\n // only at this point will this be called.\n // Or the user may seek somewhere but the new area requires buffering,\n // so it will fire then as well.\n // On devices where playing is blocked until requested with a user action,\n // buffering may start, but never finish until the user initiates a play,\n // but this only happens when play is actually requested\n\n\n HTML5Video.prototype._onWaiting = function _onWaiting() {\n this._loadStarted = true;\n this._handleBufferingEvents();\n };\n\n // called after the first frame has loaded\n // note this doesn't fire on ios before the user has requested play\n // ideally the \"loadstart\" event would be used instead, but this fires\n // before a user has requested play on iOS, and also this is always fired\n // even if the preload setting is \"none\". In both these cases this causes\n // infinite buffering until the user does something which isn't great.\n\n\n HTML5Video.prototype._onLoadedData = function _onLoadedData() {\n this._loadStarted = true;\n this._handleBufferingEvents();\n };\n\n // note this doesn't fire on ios before user has requested play\n\n\n HTML5Video.prototype._onCanPlay = function _onCanPlay() {\n this._handleBufferingEvents();\n };\n\n HTML5Video.prototype._onPlaying = function _onPlaying() {\n this._checkForClosedCaptions();\n this._startPlayheadMovingChecks();\n this._handleBufferingEvents();\n this.trigger(_events2.default.PLAYBACK_PLAY);\n };\n\n HTML5Video.prototype._onPause = function _onPause() {\n this._stopPlayheadMovingChecks();\n this._handleBufferingEvents();\n this.trigger(_events2.default.PLAYBACK_PAUSE);\n };\n\n HTML5Video.prototype._onSeeking = function _onSeeking() {\n this._handleBufferingEvents();\n this.trigger(_events2.default.PLAYBACK_SEEK);\n };\n\n HTML5Video.prototype._onSeeked = function _onSeeked() {\n this._handleBufferingEvents();\n this.trigger(_events2.default.PLAYBACK_SEEKED);\n };\n\n HTML5Video.prototype._onEnded = function _onEnded() {\n this._handleBufferingEvents();\n this.trigger(_events2.default.PLAYBACK_ENDED, this.name);\n };\n\n // The playback should be classed as buffering if the following are true:\n // - the ready state is less then HAVE_FUTURE_DATA or the playhead isn't moving and it should be\n // - the media hasn't \"ended\",\n // - the media hasn't been stopped\n // - loading has started\n\n\n HTML5Video.prototype._handleBufferingEvents = function _handleBufferingEvents() {\n var playheadShouldBeMoving = !this.el.ended && !this.el.paused;\n var buffering = this._loadStarted && !this.el.ended && !this._stopped && (playheadShouldBeMoving && !this._playheadMoving || this.el.readyState < this.el.HAVE_FUTURE_DATA);\n if (this._isBuffering !== buffering) {\n this._isBuffering = buffering;\n if (buffering) this.trigger(_events2.default.PLAYBACK_BUFFERING, this.name);else this.trigger(_events2.default.PLAYBACK_BUFFERFULL, this.name);\n }\n };\n\n HTML5Video.prototype._onError = function _onError() {\n var _ref = this.el.error || UNKNOWN_ERROR,\n code = _ref.code,\n message = _ref.message;\n\n var isUnknownError = code === UNKNOWN_ERROR.code;\n\n var formattedError = this.createError({\n code: code,\n description: message,\n raw: this.el.error,\n level: isUnknownError ? _error2.default.Levels.WARN : _error2.default.Levels.FATAL\n });\n\n if (isUnknownError) _log2.default.warn(this.name, 'HTML5 unknown error: ', formattedError);else this.trigger(_events2.default.PLAYBACK_ERROR, formattedError);\n };\n\n HTML5Video.prototype.destroy = function destroy() {\n this._destroyed = true;\n this.handleTextTrackChange && this.el.textTracks.removeEventListener('change', this.handleTextTrackChange);\n _Playback.prototype.destroy.call(this);\n this.el.removeAttribute('src');\n this.el.load(); // load with no src to stop loading of the previous source and avoid leaks\n this._src = null;\n _utils.DomRecycler.garbage(this.$el);\n };\n\n HTML5Video.prototype.seek = function seek(time) {\n this.el.currentTime = time;\n };\n\n HTML5Video.prototype.seekPercentage = function seekPercentage(percentage) {\n var time = this.el.duration * (percentage / 100);\n this.seek(time);\n };\n\n HTML5Video.prototype._checkInitialSeek = function _checkInitialSeek() {\n var seekTime = (0, _utils.seekStringToSeconds)();\n if (seekTime !== 0) this.seek(seekTime);\n };\n\n HTML5Video.prototype.getCurrentTime = function getCurrentTime() {\n return this.el.currentTime;\n };\n\n HTML5Video.prototype.getDuration = function getDuration() {\n return this.el.duration;\n };\n\n HTML5Video.prototype._onTimeUpdate = function _onTimeUpdate() {\n if (this.getPlaybackType() === _playback2.default.LIVE) this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 1, total: 1 }, this.name);else this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: this.el.currentTime, total: this.el.duration }, this.name);\n };\n\n HTML5Video.prototype._onProgress = function _onProgress() {\n if (!this.el.buffered.length) return;\n\n var buffered = [];\n var bufferedPos = 0;\n for (var i = 0; i < this.el.buffered.length; i++) {\n buffered = [].concat((0, _toConsumableArray3.default)(buffered), [{ start: this.el.buffered.start(i), end: this.el.buffered.end(i) }]);\n if (this.el.currentTime >= buffered[i].start && this.el.currentTime <= buffered[i].end) bufferedPos = i;\n }\n var progress = {\n start: buffered[bufferedPos].start,\n current: buffered[bufferedPos].end,\n total: this.el.duration\n };\n this.trigger(_events2.default.PLAYBACK_PROGRESS, progress, buffered);\n };\n\n HTML5Video.prototype._typeFor = function _typeFor(src) {\n var mimeTypes = HTML5Video._mimeTypesForUrl(src, MIMETYPES, this.options.mimeType);\n if (mimeTypes.length === 0) mimeTypes = HTML5Video._mimeTypesForUrl(src, AUDIO_MIMETYPES, this.options.mimeType);\n\n var mimeType = mimeTypes[0] || '';\n return mimeType.split(';')[0];\n };\n\n HTML5Video.prototype._ready = function _ready() {\n if (this._isReadyState) return;\n\n this._isReadyState = true;\n this.trigger(_events2.default.PLAYBACK_READY, this.name);\n };\n\n HTML5Video.prototype._checkForClosedCaptions = function _checkForClosedCaptions() {\n // Check if CC available only if current playback is HTML5Video\n if (this.isHTML5Video && !this._ccIsSetup) {\n if (this.hasClosedCaptionsTracks) {\n this.trigger(_events2.default.PLAYBACK_SUBTITLE_AVAILABLE);\n var trackId = this.closedCaptionsTrackId;\n this.closedCaptionsTrackId = trackId;\n this.handleTextTrackChange = this._handleTextTrackChange.bind(this);\n this.el.textTracks.addEventListener('change', this.handleTextTrackChange);\n }\n this._ccIsSetup = true;\n }\n };\n\n HTML5Video.prototype._handleTextTrackChange = function _handleTextTrackChange() {\n var tracks = this.closedCaptionsTracks;\n var track = tracks.find(function (track) {\n return track.track.mode === 'showing';\n }) || { id: -1 };\n\n if (this._ccTrackId !== track.id) {\n this._ccTrackId = track.id;\n this.trigger(_events2.default.PLAYBACK_SUBTITLE_CHANGED, {\n id: track.id\n });\n }\n };\n\n HTML5Video.prototype.render = function render() {\n if (this.options.playback.disableContextMenu) {\n this.$el.on('contextmenu', function () {\n return false;\n });\n }\n\n if (this._externalTracks && this._externalTracks.length > 0) {\n this.$el.html(this.template({\n tracks: this._externalTracks\n }));\n }\n\n this._ready();\n return this;\n };\n\n (0, _createClass3.default)(HTML5Video, [{\n key: 'isReady',\n get: function get() {\n return this._isReadyState;\n }\n }, {\n key: 'isHTML5Video',\n get: function get() {\n return this.name === HTML5Video.prototype.name;\n }\n }, {\n key: 'closedCaptionsTracks',\n get: function get() {\n var id = 0;\n var trackId = function trackId() {\n return id++;\n };\n var textTracks = this.el.textTracks ? (0, _from2.default)(this.el.textTracks) : [];\n\n return textTracks.filter(function (track) {\n return track.kind === 'subtitles' || track.kind === 'captions';\n }).map(function (track) {\n return { id: trackId(), name: track.label, track: track };\n });\n }\n }, {\n key: 'closedCaptionsTrackId',\n get: function get() {\n return this._ccTrackId;\n },\n set: function set(trackId) {\n if (!(0, _utils.isNumber)(trackId)) return;\n\n var tracks = this.closedCaptionsTracks;\n var showingTrack = void 0;\n\n // Note: -1 is for hide all tracks\n if (trackId !== -1) {\n showingTrack = tracks.find(function (track) {\n return track.id === trackId;\n });\n if (!showingTrack) return; // Track id not found\n\n if (showingTrack.track.mode === 'showing') return; // Track already showing\n }\n\n // Since it is possible to display multiple tracks,\n // ensure that all tracks are hidden.\n tracks.filter(function (track) {\n return track.track.mode !== 'hidden';\n }).forEach(function (track) {\n return track.track.mode = 'hidden';\n });\n\n showingTrack && (showingTrack.track.mode = 'showing');\n\n this._ccTrackId = trackId;\n this.trigger(_events2.default.PLAYBACK_SUBTITLE_CHANGED, {\n id: trackId\n });\n }\n }, {\n key: 'template',\n get: function get() {\n return (0, _template2.default)(_tracks2.default);\n }\n }]);\n return HTML5Video;\n}(_playback2.default);\n\nexports.default = HTML5Video;\n\n\nHTML5Video._mimeTypesForUrl = function (resourceUrl, mimeTypesByExtension, mimeType) {\n var extension = (resourceUrl.split('?')[0].match(/.*\\.(.*)$/) || [])[1];\n var mimeTypes = mimeType || extension && mimeTypesByExtension[extension.toLowerCase()] || [];\n return mimeTypes.constructor === Array ? mimeTypes : [mimeTypes];\n};\n\nHTML5Video._canPlay = function (type, mimeTypesByExtension, resourceUrl, mimeType) {\n var mimeTypes = HTML5Video._mimeTypesForUrl(resourceUrl, mimeTypesByExtension, mimeType);\n var media = document.createElement(type);\n return !!mimeTypes.filter(function (mediaType) {\n return !!media.canPlayType(mediaType).replace(/no/, '');\n })[0];\n};\n\nHTML5Video.canPlay = function (resourceUrl, mimeType) {\n return HTML5Video._canPlay('audio', AUDIO_MIMETYPES, resourceUrl, mimeType) || HTML5Video._canPlay('video', MIMETYPES, resourceUrl, mimeType);\n};\nmodule.exports = exports['default'];\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/node-libs-browser/node_modules/process/browser.js */ \"./node_modules/node-libs-browser/node_modules/process/browser.js\")))\n\n/***/ }),\n\n/***/ \"./src/playbacks/html5_video/index.js\":\n/*!********************************************!*\\\n !*** ./src/playbacks/html5_video/index.js ***!\n \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _html5_video = __webpack_require__(/*! ./html5_video */ \"./src/playbacks/html5_video/html5_video.js\");\n\nvar _html5_video2 = _interopRequireDefault(_html5_video);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _html5_video2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/html5_video/public/style.scss\":\n/*!*****************************************************!*\\\n !*** ./src/playbacks/html5_video/public/style.scss ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\nvar content = __webpack_require__(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./style.scss */ \"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/playbacks/html5_video/public/style.scss\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"singleton\":true,\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n/***/ }),\n\n/***/ \"./src/playbacks/html5_video/public/tracks.html\":\n/*!******************************************************!*\\\n !*** ./src/playbacks/html5_video/public/tracks.html ***!\n \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<% for (var i = 0; i < tracks.length; i++) { %>\\n \\\" kind=\\\"<%= tracks[i].kind %>\\\" label=\\\"<%= tracks[i].label %>\\\" srclang=\\\"<%= tracks[i].lang %>\\\" src=\\\"<%= tracks[i].src %>\\\" />\\n<% }; %>\\n\";\n\n/***/ }),\n\n/***/ \"./src/playbacks/html_img/html_img.js\":\n/*!********************************************!*\\\n !*** ./src/playbacks/html_img/html_img.js ***!\n \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\n__webpack_require__(/*! ./public/style.scss */ \"./src/playbacks/html_img/public/style.scss\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar HTMLImg = function (_Playback) {\n (0, _inherits3.default)(HTMLImg, _Playback);\n\n HTMLImg.prototype.getPlaybackType = function getPlaybackType() {\n return _playback2.default.NO_OP;\n };\n\n (0, _createClass3.default)(HTMLImg, [{\n key: 'name',\n get: function get() {\n return 'html_img';\n }\n }, {\n key: 'tagName',\n get: function get() {\n return 'img';\n }\n }, {\n key: 'attributes',\n get: function get() {\n return {\n 'data-html-img': ''\n };\n }\n }, {\n key: 'events',\n get: function get() {\n return {\n 'load': '_onLoad',\n 'abort': '_onError',\n 'error': '_onError'\n };\n }\n }]);\n\n function HTMLImg(params) {\n (0, _classCallCheck3.default)(this, HTMLImg);\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _Playback.call(this, params));\n\n _this.el.src = params.src;\n return _this;\n }\n\n HTMLImg.prototype.render = function render() {\n this.trigger(_events2.default.PLAYBACK_READY, this.name);\n return this;\n };\n\n HTMLImg.prototype._onLoad = function _onLoad() {\n this.trigger(_events2.default.PLAYBACK_ENDED, this.name);\n };\n\n HTMLImg.prototype._onError = function _onError(evt) {\n var m = evt.type === 'error' ? 'load error' : 'loading aborted';\n this.trigger(_events2.default.PLAYBACK_ERROR, { message: m }, this.name);\n };\n\n return HTMLImg;\n}(_playback2.default); // Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nexports.default = HTMLImg;\n\n\nHTMLImg.canPlay = function (resource) {\n return (/\\.(png|jpg|jpeg|gif|bmp|tiff|pgm|pnm|webp)(|\\?.*)$/i.test(resource)\n );\n};\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/html_img/index.js\":\n/*!*****************************************!*\\\n !*** ./src/playbacks/html_img/index.js ***!\n \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _html_img = __webpack_require__(/*! ./html_img */ \"./src/playbacks/html_img/html_img.js\");\n\nvar _html_img2 = _interopRequireDefault(_html_img);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _html_img2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/html_img/public/style.scss\":\n/*!**************************************************!*\\\n !*** ./src/playbacks/html_img/public/style.scss ***!\n \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\nvar content = __webpack_require__(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./style.scss */ \"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/playbacks/html_img/public/style.scss\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"singleton\":true,\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n/***/ }),\n\n/***/ \"./src/playbacks/no_op/index.js\":\n/*!**************************************!*\\\n !*** ./src/playbacks/no_op/index.js ***!\n \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _no_op = __webpack_require__(/*! ./no_op */ \"./src/playbacks/no_op/no_op.js\");\n\nvar _no_op2 = _interopRequireDefault(_no_op);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _no_op2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/no_op/no_op.js\":\n/*!**************************************!*\\\n !*** ./src/playbacks/no_op/no_op.js ***!\n \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _utils = __webpack_require__(/*! ../../base/utils */ \"./src/base/utils.js\");\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _template = __webpack_require__(/*! ../../base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _error = __webpack_require__(/*! ./public/error.html */ \"./src/playbacks/no_op/public/error.html\");\n\nvar _error2 = _interopRequireDefault(_error);\n\n__webpack_require__(/*! ./public/style.scss */ \"./src/playbacks/no_op/public/style.scss\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar NoOp = function (_Playback) {\n (0, _inherits3.default)(NoOp, _Playback);\n (0, _createClass3.default)(NoOp, [{\n key: 'name',\n get: function get() {\n return 'no_op';\n }\n }, {\n key: 'template',\n get: function get() {\n return (0, _template2.default)(_error2.default);\n }\n }, {\n key: 'attributes',\n get: function get() {\n return { 'data-no-op': '' };\n }\n }]);\n\n function NoOp() {\n (0, _classCallCheck3.default)(this, NoOp);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _Playback.call.apply(_Playback, [this].concat(args)));\n\n _this._noiseFrameNum = -1;\n return _this;\n }\n\n NoOp.prototype.render = function render() {\n var playbackNotSupported = this.options.playbackNotSupportedMessage || this.i18n.t('playback_not_supported');\n this.$el.html(this.template({ message: playbackNotSupported }));\n this.trigger(_events2.default.PLAYBACK_READY, this.name);\n var showForNoOp = !!(this.options.poster && this.options.poster.showForNoOp);\n if (this.options.autoPlay || !showForNoOp) this._animate();\n\n return this;\n };\n\n NoOp.prototype._noise = function _noise() {\n this._noiseFrameNum = (this._noiseFrameNum + 1) % 5;\n if (this._noiseFrameNum) {\n // only update noise every 5 frames to save cpu\n return;\n }\n\n var idata = this.context.createImageData(this.context.canvas.width, this.context.canvas.height);\n var buffer32 = void 0;\n try {\n buffer32 = new Uint32Array(idata.data.buffer);\n } catch (err) {\n buffer32 = new Uint32Array(this.context.canvas.width * this.context.canvas.height * 4);\n var data = idata.data;\n for (var i = 0; i < data.length; i++) {\n buffer32[i] = data[i];\n }\n }\n\n var len = buffer32.length,\n m = Math.random() * 6 + 4;\n var run = 0,\n color = 0;\n for (var _i = 0; _i < len;) {\n if (run < 0) {\n run = m * Math.random();\n var p = Math.pow(Math.random(), 0.4);\n color = 255 * p << 24;\n }\n run -= 1;\n buffer32[_i++] = color;\n }\n this.context.putImageData(idata, 0, 0);\n };\n\n NoOp.prototype._loop = function _loop() {\n var _this2 = this;\n\n if (this._stop) return;\n\n this._noise();\n this._animationHandle = (0, _utils.requestAnimationFrame)(function () {\n return _this2._loop();\n });\n };\n\n NoOp.prototype.destroy = function destroy() {\n if (this._animationHandle) {\n (0, _utils.cancelAnimationFrame)(this._animationHandle);\n this._stop = true;\n }\n };\n\n NoOp.prototype._animate = function _animate() {\n this.canvas = this.$el.find('canvas[data-no-op-canvas]')[0];\n this.context = this.canvas.getContext('2d');\n this._loop();\n };\n\n return NoOp;\n}(_playback2.default);\n\nexports.default = NoOp;\n\n\nNoOp.canPlay = function (source) {\n // eslint-disable-line no-unused-vars\n return true;\n};\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/no_op/public/error.html\":\n/*!***********************************************!*\\\n !*** ./src/playbacks/no_op/public/error.html ***!\n \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \\n<%=message%>
\\n\";\n\n/***/ }),\n\n/***/ \"./src/playbacks/no_op/public/style.scss\":\n/*!***********************************************!*\\\n !*** ./src/playbacks/no_op/public/style.scss ***!\n \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\nvar content = __webpack_require__(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./style.scss */ \"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/playbacks/no_op/public/style.scss\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"singleton\":true,\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n/***/ }),\n\n/***/ \"./src/plugins/click_to_pause/click_to_pause.js\":\n/*!******************************************************!*\\\n !*** ./src/plugins/click_to_pause/click_to_pause.js ***!\n \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _container_plugin = __webpack_require__(/*! ../../base/container_plugin */ \"./src/base/container_plugin.js\");\n\nvar _container_plugin2 = _interopRequireDefault(_container_plugin);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ClickToPausePlugin = function (_ContainerPlugin) {\n (0, _inherits3.default)(ClickToPausePlugin, _ContainerPlugin);\n (0, _createClass3.default)(ClickToPausePlugin, [{\n key: 'name',\n get: function get() {\n return 'click_to_pause';\n }\n }]);\n\n function ClickToPausePlugin(container) {\n (0, _classCallCheck3.default)(this, ClickToPausePlugin);\n return (0, _possibleConstructorReturn3.default)(this, _ContainerPlugin.call(this, container));\n }\n\n ClickToPausePlugin.prototype.bindEvents = function bindEvents() {\n this.listenTo(this.container, _events2.default.CONTAINER_CLICK, this.click);\n this.listenTo(this.container, _events2.default.CONTAINER_SETTINGSUPDATE, this.settingsUpdate);\n };\n\n ClickToPausePlugin.prototype.click = function click() {\n if (this.container.getPlaybackType() !== _playback2.default.LIVE || this.container.isDvrEnabled()) {\n if (this.container.isPlaying()) this.container.pause();else this.container.play();\n }\n };\n\n ClickToPausePlugin.prototype.settingsUpdate = function settingsUpdate() {\n var pointerEnabled = this.container.getPlaybackType() !== _playback2.default.LIVE || this.container.isDvrEnabled();\n if (pointerEnabled === this.pointerEnabled) return;\n\n var method = pointerEnabled ? 'addClass' : 'removeClass';\n this.container.$el[method]('pointer-enabled');\n this.pointerEnabled = pointerEnabled;\n };\n\n return ClickToPausePlugin;\n}(_container_plugin2.default); //Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nexports.default = ClickToPausePlugin;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/click_to_pause/index.js\":\n/*!*********************************************!*\\\n !*** ./src/plugins/click_to_pause/index.js ***!\n \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _click_to_pause = __webpack_require__(/*! ./click_to_pause */ \"./src/plugins/click_to_pause/click_to_pause.js\");\n\nvar _click_to_pause2 = _interopRequireDefault(_click_to_pause);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _click_to_pause2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/closed_captions/closed_captions.js\":\n/*!********************************************************!*\\\n !*** ./src/plugins/closed_captions/closed_captions.js ***!\n \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _ui_core_plugin = __webpack_require__(/*! ../../base/ui_core_plugin */ \"./src/base/ui_core_plugin.js\");\n\nvar _ui_core_plugin2 = _interopRequireDefault(_ui_core_plugin);\n\nvar _template = __webpack_require__(/*! ../../base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _utils = __webpack_require__(/*! ../../base/utils */ \"./src/base/utils.js\");\n\nvar _closed_captions = __webpack_require__(/*! ./public/closed_captions.html */ \"./src/plugins/closed_captions/public/closed_captions.html\");\n\nvar _closed_captions2 = _interopRequireDefault(_closed_captions);\n\n__webpack_require__(/*! ./public/closed_captions.scss */ \"./src/plugins/closed_captions/public/closed_captions.scss\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ClosedCaptions = function (_UICorePlugin) {\n (0, _inherits3.default)(ClosedCaptions, _UICorePlugin);\n (0, _createClass3.default)(ClosedCaptions, [{\n key: 'name',\n get: function get() {\n return 'closed_captions';\n }\n }, {\n key: 'template',\n get: function get() {\n return (0, _template2.default)(_closed_captions2.default);\n }\n }, {\n key: 'events',\n get: function get() {\n return {\n 'click [data-cc-button]': 'toggleContextMenu',\n 'click [data-cc-select]': 'onTrackSelect'\n };\n }\n }, {\n key: 'attributes',\n get: function get() {\n return {\n 'class': 'cc-controls',\n 'data-cc-controls': ''\n };\n }\n }]);\n\n function ClosedCaptions(core) {\n (0, _classCallCheck3.default)(this, ClosedCaptions);\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _UICorePlugin.call(this, core));\n\n var config = core.options.closedCaptionsConfig;\n _this._title = config && config.title ? config.title : null;\n _this._ariaLabel = config && config.ariaLabel ? config.ariaLabel : 'cc-button';\n _this._labelCb = config && config.labelCallback && typeof config.labelCallback === 'function' ? config.labelCallback : function (track) {\n return track.name;\n };\n return _this;\n }\n\n ClosedCaptions.prototype.bindEvents = function bindEvents() {\n this.listenTo(this.core, _events2.default.CORE_ACTIVE_CONTAINER_CHANGED, this.containerChanged);\n this.listenTo(this.core.mediaControl, _events2.default.MEDIACONTROL_RENDERED, this.render);\n this.listenTo(this.core.mediaControl, _events2.default.MEDIACONTROL_HIDE, this.hideContextMenu);\n this.container = this.core.getCurrentContainer();\n if (this.container) {\n this.listenTo(this.container, _events2.default.CONTAINER_SUBTITLE_AVAILABLE, this.onSubtitleAvailable);\n this.listenTo(this.container, _events2.default.CONTAINER_SUBTITLE_CHANGED, this.onSubtitleChanged);\n this.listenTo(this.container, _events2.default.CONTAINER_STOP, this.onContainerStop);\n }\n };\n\n ClosedCaptions.prototype.onContainerStop = function onContainerStop() {\n this.ccAvailable(false);\n };\n\n ClosedCaptions.prototype.containerChanged = function containerChanged() {\n this.ccAvailable(false);\n this.stopListening();\n this.bindEvents();\n };\n\n ClosedCaptions.prototype.onSubtitleAvailable = function onSubtitleAvailable() {\n this.renderCcButton();\n this.ccAvailable(true);\n };\n\n ClosedCaptions.prototype.onSubtitleChanged = function onSubtitleChanged(track) {\n this.setCurrentContextMenuElement(track.id);\n };\n\n ClosedCaptions.prototype.onTrackSelect = function onTrackSelect(event) {\n var trackId = parseInt(event.target.dataset.ccSelect, 10);\n this.container.closedCaptionsTrackId = trackId;\n this.hideContextMenu();\n event.stopPropagation();\n return false;\n };\n\n ClosedCaptions.prototype.ccAvailable = function ccAvailable(hasCC) {\n var method = hasCC ? 'addClass' : 'removeClass';\n this.$el[method]('available');\n };\n\n ClosedCaptions.prototype.toggleContextMenu = function toggleContextMenu() {\n this.$el.find('ul').toggle();\n };\n\n ClosedCaptions.prototype.hideContextMenu = function hideContextMenu() {\n this.$el.find('ul').hide();\n };\n\n ClosedCaptions.prototype.contextMenuElement = function contextMenuElement(id) {\n return this.$el.find('ul a' + (!isNaN(id) ? '[data-cc-select=\"' + id + '\"]' : '')).parent();\n };\n\n ClosedCaptions.prototype.setCurrentContextMenuElement = function setCurrentContextMenuElement(trackId) {\n if (this._trackId !== trackId) {\n this.contextMenuElement().removeClass('current');\n this.contextMenuElement(trackId).addClass('current');\n var method = trackId > -1 ? 'addClass' : 'removeClass';\n this.$ccButton[method]('enabled');\n this._trackId = trackId;\n }\n };\n\n ClosedCaptions.prototype.renderCcButton = function renderCcButton() {\n var tracks = this.container ? this.container.closedCaptionsTracks : [];\n for (var i = 0; i < tracks.length; i++) {\n tracks[i].label = this._labelCb(tracks[i]);\n }this.$el.html(this.template({\n ariaLabel: this._ariaLabel,\n disabledLabel: this.core.i18n.t('disabled'),\n title: this._title,\n tracks: tracks\n }));\n\n this.$ccButton = this.$el.find('button.cc-button[data-cc-button]');\n this.$ccButton.append(_utils.SvgIcons.cc);\n this.$el.append(this.style);\n };\n\n ClosedCaptions.prototype.render = function render() {\n this.renderCcButton();\n\n var $fullscreen = this.core.mediaControl.$el.find('button[data-fullscreen]');\n if ($fullscreen[0]) this.$el.insertAfter($fullscreen);else this.core.mediaControl.$el.find('.media-control-right-panel[data-media-control]').prepend(this.$el);\n\n return this;\n };\n\n return ClosedCaptions;\n}(_ui_core_plugin2.default);\n\nexports.default = ClosedCaptions;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/closed_captions/index.js\":\n/*!**********************************************!*\\\n !*** ./src/plugins/closed_captions/index.js ***!\n \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _closed_captions = __webpack_require__(/*! ./closed_captions */ \"./src/plugins/closed_captions/closed_captions.js\");\n\nvar _closed_captions2 = _interopRequireDefault(_closed_captions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _closed_captions2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/closed_captions/public/closed_captions.html\":\n/*!*****************************************************************!*\\\n !*** ./src/plugins/closed_captions/public/closed_captions.html ***!\n \\*****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\\\"> \\n
\\n\";\n\n/***/ }),\n\n/***/ \"./src/plugins/closed_captions/public/closed_captions.scss\":\n/*!*****************************************************************!*\\\n !*** ./src/plugins/closed_captions/public/closed_captions.scss ***!\n \\*****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\nvar content = __webpack_require__(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./closed_captions.scss */ \"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/closed_captions/public/closed_captions.scss\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"singleton\":true,\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n/***/ }),\n\n/***/ \"./src/plugins/dvr_controls/dvr_controls.js\":\n/*!**************************************************!*\\\n !*** ./src/plugins/dvr_controls/dvr_controls.js ***!\n \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _ui_core_plugin = __webpack_require__(/*! ../../base/ui_core_plugin */ \"./src/base/ui_core_plugin.js\");\n\nvar _ui_core_plugin2 = _interopRequireDefault(_ui_core_plugin);\n\nvar _template = __webpack_require__(/*! ../../base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _index = __webpack_require__(/*! ./public/index.html */ \"./src/plugins/dvr_controls/public/index.html\");\n\nvar _index2 = _interopRequireDefault(_index);\n\n__webpack_require__(/*! ./public/dvr_controls.scss */ \"./src/plugins/dvr_controls/public/dvr_controls.scss\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar DVRControls = function (_UICorePlugin) {\n (0, _inherits3.default)(DVRControls, _UICorePlugin);\n (0, _createClass3.default)(DVRControls, [{\n key: 'template',\n get: function get() {\n return (0, _template2.default)(_index2.default);\n }\n }, {\n key: 'name',\n get: function get() {\n return 'dvr_controls';\n }\n }, {\n key: 'events',\n get: function get() {\n return {\n 'click .live-button': 'click'\n };\n }\n }, {\n key: 'attributes',\n get: function get() {\n return {\n 'class': 'dvr-controls',\n 'data-dvr-controls': ''\n };\n }\n }]);\n\n function DVRControls(core) {\n (0, _classCallCheck3.default)(this, DVRControls);\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _UICorePlugin.call(this, core));\n\n _this.settingsUpdate();\n return _this;\n }\n\n DVRControls.prototype.bindEvents = function bindEvents() {\n this.listenTo(this.core.mediaControl, _events2.default.MEDIACONTROL_CONTAINERCHANGED, this.containerChanged);\n this.listenTo(this.core.mediaControl, _events2.default.MEDIACONTROL_RENDERED, this.settingsUpdate);\n this.listenTo(this.core, _events2.default.CORE_OPTIONS_CHANGE, this.render);\n if (this.core.getCurrentContainer()) {\n this.listenToOnce(this.core.getCurrentContainer(), _events2.default.CONTAINER_TIMEUPDATE, this.render);\n this.listenTo(this.core.getCurrentContainer(), _events2.default.CONTAINER_PLAYBACKDVRSTATECHANGED, this.dvrChanged);\n }\n };\n\n DVRControls.prototype.containerChanged = function containerChanged() {\n this.stopListening();\n this.bindEvents();\n };\n\n DVRControls.prototype.dvrChanged = function dvrChanged(dvrEnabled) {\n if (this.core.getPlaybackType() !== _playback2.default.LIVE) return;\n this.settingsUpdate();\n this.core.mediaControl.$el.addClass('live');\n if (dvrEnabled) {\n this.core.mediaControl.$el.addClass('dvr');\n this.core.mediaControl.$el.find('.media-control-indicator[data-position], .media-control-indicator[data-duration]').hide();\n } else {\n this.core.mediaControl.$el.removeClass('dvr');\n }\n };\n\n DVRControls.prototype.click = function click() {\n var mediaControl = this.core.mediaControl;\n var container = mediaControl.container;\n if (!container.isPlaying()) container.play();\n\n if (mediaControl.$el.hasClass('dvr')) container.seek(container.getDuration());\n };\n\n DVRControls.prototype.settingsUpdate = function settingsUpdate() {\n var _this2 = this;\n\n this.stopListening();\n this.core.mediaControl.$el.removeClass('live');\n if (this.shouldRender()) {\n this.render();\n this.$el.click(function () {\n return _this2.click();\n });\n }\n this.bindEvents();\n };\n\n DVRControls.prototype.shouldRender = function shouldRender() {\n var useDvrControls = this.core.options.useDvrControls === undefined || !!this.core.options.useDvrControls;\n return useDvrControls && this.core.getPlaybackType() === _playback2.default.LIVE;\n };\n\n DVRControls.prototype.render = function render() {\n this.$el.html(this.template({\n live: this.core.i18n.t('live'),\n backToLive: this.core.i18n.t('back_to_live')\n }));\n if (this.shouldRender()) {\n this.core.mediaControl.$el.addClass('live');\n this.core.mediaControl.$('.media-control-left-panel[data-media-control]').append(this.$el);\n }\n return this;\n };\n\n return DVRControls;\n}(_ui_core_plugin2.default);\n\nexports.default = DVRControls;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/dvr_controls/index.js\":\n/*!*******************************************!*\\\n !*** ./src/plugins/dvr_controls/index.js ***!\n \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _dvr_controls = __webpack_require__(/*! ./dvr_controls */ \"./src/plugins/dvr_controls/dvr_controls.js\");\n\nvar _dvr_controls2 = _interopRequireDefault(_dvr_controls);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _dvr_controls2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/dvr_controls/public/dvr_controls.scss\":\n/*!***********************************************************!*\\\n !*** ./src/plugins/dvr_controls/public/dvr_controls.scss ***!\n \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\nvar content = __webpack_require__(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./dvr_controls.scss */ \"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/dvr_controls/public/dvr_controls.scss\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"singleton\":true,\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n/***/ }),\n\n/***/ \"./src/plugins/dvr_controls/public/index.html\":\n/*!****************************************************!*\\\n !*** ./src/plugins/dvr_controls/public/index.html ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<%= live %>
\\n\\\"><%= backToLive %> \\n\";\n\n/***/ }),\n\n/***/ \"./src/plugins/end_video.js\":\n/*!**********************************!*\\\n !*** ./src/plugins/end_video.js ***!\n \\**********************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _events = __webpack_require__(/*! ../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _core_plugin = __webpack_require__(/*! ../base/core_plugin */ \"./src/base/core_plugin.js\");\n\nvar _core_plugin2 = _interopRequireDefault(_core_plugin);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar EndVideo = function (_CorePlugin) {\n (0, _inherits3.default)(EndVideo, _CorePlugin);\n\n function EndVideo() {\n (0, _classCallCheck3.default)(this, EndVideo);\n return (0, _possibleConstructorReturn3.default)(this, _CorePlugin.apply(this, arguments));\n }\n\n EndVideo.prototype.bindEvents = function bindEvents() {\n this.listenTo(this.core, _events2.default.CORE_ACTIVE_CONTAINER_CHANGED, this.containerChanged);\n var container = this.core.activeContainer;\n if (container) {\n this.listenTo(container, _events2.default.CONTAINER_ENDED, this.ended);\n this.listenTo(container, _events2.default.CONTAINER_STOP, this.ended);\n }\n };\n\n EndVideo.prototype.containerChanged = function containerChanged() {\n this.stopListening();\n this.bindEvents();\n };\n\n EndVideo.prototype.ended = function ended() {\n var exitOnEnd = typeof this.core.options.exitFullscreenOnEnd === 'undefined' || this.core.options.exitFullscreenOnEnd;\n if (exitOnEnd && this.core.isFullscreen()) this.core.toggleFullscreen();\n };\n\n (0, _createClass3.default)(EndVideo, [{\n key: 'name',\n get: function get() {\n return 'end_video';\n }\n }]);\n return EndVideo;\n}(_core_plugin2.default);\n\nexports.default = EndVideo;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/error_screen/error_screen.js\":\n/*!**************************************************!*\\\n !*** ./src/plugins/error_screen/error_screen.js ***!\n \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _ui_core_plugin = __webpack_require__(/*! ../../base/ui_core_plugin */ \"./src/base/ui_core_plugin.js\");\n\nvar _ui_core_plugin2 = _interopRequireDefault(_ui_core_plugin);\n\nvar _template = __webpack_require__(/*! ../../base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _error = __webpack_require__(/*! ../../components/error/ */ \"./src/components/error/index.js\");\n\nvar _error2 = _interopRequireDefault(_error);\n\nvar _utils = __webpack_require__(/*! ../../base/utils */ \"./src/base/utils.js\");\n\nvar _error_screen = __webpack_require__(/*! ./public/error_screen.html */ \"./src/plugins/error_screen/public/error_screen.html\");\n\nvar _error_screen2 = _interopRequireDefault(_error_screen);\n\n__webpack_require__(/*! ./public/error_screen.scss */ \"./src/plugins/error_screen/public/error_screen.scss\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ErrorScreen = function (_UICorePlugin) {\n (0, _inherits3.default)(ErrorScreen, _UICorePlugin);\n (0, _createClass3.default)(ErrorScreen, [{\n key: 'name',\n get: function get() {\n return 'error_screen';\n }\n }, {\n key: 'template',\n get: function get() {\n return (0, _template2.default)(_error_screen2.default);\n }\n }, {\n key: 'container',\n get: function get() {\n return this.core.getCurrentContainer();\n }\n }, {\n key: 'attributes',\n get: function get() {\n return {\n 'class': 'player-error-screen',\n 'data-error-screen': ''\n };\n }\n }]);\n\n function ErrorScreen(core) {\n var _ret;\n\n (0, _classCallCheck3.default)(this, ErrorScreen);\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _UICorePlugin.call(this, core));\n\n if (_this.options.disableErrorScreen) return _ret = _this.disable(), (0, _possibleConstructorReturn3.default)(_this, _ret);\n return _this;\n }\n\n ErrorScreen.prototype.bindEvents = function bindEvents() {\n this.listenTo(this.core, _events2.default.ERROR, this.onError);\n this.listenTo(this.core, _events2.default.CORE_ACTIVE_CONTAINER_CHANGED, this.onContainerChanged);\n };\n\n ErrorScreen.prototype.bindReload = function bindReload() {\n this.reloadButton = this.$el.find('.player-error-screen__reload');\n this.reloadButton && this.reloadButton.on('click', this.reload.bind(this));\n };\n\n ErrorScreen.prototype.reload = function reload() {\n var _this2 = this;\n\n this.listenToOnce(this.core, _events2.default.CORE_READY, function () {\n return _this2.container.play();\n });\n this.core.load(this.options.sources, this.options.mimeType);\n this.unbindReload();\n };\n\n ErrorScreen.prototype.unbindReload = function unbindReload() {\n this.reloadButton && this.reloadButton.off('click');\n };\n\n ErrorScreen.prototype.onContainerChanged = function onContainerChanged() {\n this.err = null;\n this.unbindReload();\n this.hide();\n };\n\n ErrorScreen.prototype.onError = function onError() {\n var err = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n if (err.level === _error2.default.Levels.FATAL) {\n this.err = err;\n this.container.disableMediaControl();\n this.container.stop();\n this.show();\n }\n };\n\n ErrorScreen.prototype.show = function show() {\n this.render();\n this.$el.show();\n };\n\n ErrorScreen.prototype.hide = function hide() {\n this.$el.hide();\n };\n\n ErrorScreen.prototype.render = function render() {\n if (!this.err) return;\n\n this.$el.html(this.template({\n title: this.err.UI.title,\n message: this.err.UI.message,\n code: this.err.code,\n icon: this.err.UI.icon || '',\n reloadIcon: _utils.SvgIcons.reload\n }));\n\n this.core.$el.append(this.el);\n\n this.bindReload();\n\n return this;\n };\n\n return ErrorScreen;\n}(_ui_core_plugin2.default);\n\nexports.default = ErrorScreen;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/error_screen/index.js\":\n/*!*******************************************!*\\\n !*** ./src/plugins/error_screen/index.js ***!\n \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _error_screen = __webpack_require__(/*! ./error_screen */ \"./src/plugins/error_screen/error_screen.js\");\n\nvar _error_screen2 = _interopRequireDefault(_error_screen);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _error_screen2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/error_screen/public/error_screen.html\":\n/*!***********************************************************!*\\\n !*** ./src/plugins/error_screen/public/error_screen.html ***!\n \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\\n <% if (icon) { %>\\n
<%= icon %>
\\n <% } %>\\n
<%= title %>
\\n
<%= message %>
\\n
Error code: <%= code %>
\\n
<%= reloadIcon %>
\\n
\\n\";\n\n/***/ }),\n\n/***/ \"./src/plugins/error_screen/public/error_screen.scss\":\n/*!***********************************************************!*\\\n !*** ./src/plugins/error_screen/public/error_screen.scss ***!\n \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\nvar content = __webpack_require__(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./error_screen.scss */ \"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/error_screen/public/error_screen.scss\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"singleton\":true,\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n/***/ }),\n\n/***/ \"./src/plugins/favicon/favicon.js\":\n/*!****************************************!*\\\n !*** ./src/plugins/favicon/favicon.js ***!\n \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _core_plugin = __webpack_require__(/*! ../../base/core_plugin */ \"./src/base/core_plugin.js\");\n\nvar _core_plugin2 = _interopRequireDefault(_core_plugin);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ \"./node_modules/clappr-zepto/zepto.js\");\n\nvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\nvar _utils = __webpack_require__(/*! ../../base/utils */ \"./src/base/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar oldIcon = (0, _clapprZepto2.default)('link[rel=\"shortcut icon\"]');\n\nvar Favicon = function (_CorePlugin) {\n (0, _inherits3.default)(Favicon, _CorePlugin);\n (0, _createClass3.default)(Favicon, [{\n key: 'name',\n get: function get() {\n return 'favicon';\n }\n }, {\n key: 'oldIcon',\n get: function get() {\n return oldIcon;\n }\n }]);\n\n function Favicon(core) {\n (0, _classCallCheck3.default)(this, Favicon);\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _CorePlugin.call(this, core));\n\n _this._container = null;\n _this.configure();\n return _this;\n }\n\n Favicon.prototype.configure = function configure() {\n if (this.core.options.changeFavicon) {\n if (!this.enabled) {\n this.stopListening(this.core, _events2.default.CORE_OPTIONS_CHANGE);\n this.enable();\n }\n } else if (this.enabled) {\n this.disable();\n this.listenTo(this.core, _events2.default.CORE_OPTIONS_CHANGE, this.configure);\n }\n };\n\n Favicon.prototype.bindEvents = function bindEvents() {\n this.listenTo(this.core, _events2.default.CORE_OPTIONS_CHANGE, this.configure);\n this.listenTo(this.core, _events2.default.CORE_ACTIVE_CONTAINER_CHANGED, this.containerChanged);\n this.core.activeContainer && this.containerChanged();\n };\n\n Favicon.prototype.containerChanged = function containerChanged() {\n this._container && this.stopListening(this._container);\n this._container = this.core.activeContainer;\n this.listenTo(this._container, _events2.default.CONTAINER_PLAY, this.setPlayIcon);\n this.listenTo(this._container, _events2.default.CONTAINER_PAUSE, this.setPauseIcon);\n this.listenTo(this._container, _events2.default.CONTAINER_STOP, this.resetIcon);\n this.listenTo(this._container, _events2.default.CONTAINER_ENDED, this.resetIcon);\n this.listenTo(this._container, _events2.default.CONTAINER_ERROR, this.resetIcon);\n this.resetIcon();\n };\n\n Favicon.prototype.disable = function disable() {\n _CorePlugin.prototype.disable.call(this);\n this.resetIcon();\n };\n\n Favicon.prototype.destroy = function destroy() {\n _CorePlugin.prototype.destroy.call(this);\n this.resetIcon();\n };\n\n Favicon.prototype.createIcon = function createIcon(svg) {\n var canvas = (0, _clapprZepto2.default)(' ');\n canvas[0].width = 16;\n canvas[0].height = 16;\n var ctx = canvas[0].getContext('2d');\n ctx.fillStyle = '#000';\n var d = (0, _clapprZepto2.default)(svg).find('path').attr('d');\n var path = new Path2D(d);\n ctx.fill(path);\n var icon = (0, _clapprZepto2.default)(' ');\n icon.attr('href', canvas[0].toDataURL('image/png'));\n return icon;\n };\n\n Favicon.prototype.setPlayIcon = function setPlayIcon() {\n if (!this.playIcon) this.playIcon = this.createIcon(_utils.SvgIcons.play);\n\n this.changeIcon(this.playIcon);\n };\n\n Favicon.prototype.setPauseIcon = function setPauseIcon() {\n if (!this.pauseIcon) this.pauseIcon = this.createIcon(_utils.SvgIcons.pause);\n\n this.changeIcon(this.pauseIcon);\n };\n\n Favicon.prototype.resetIcon = function resetIcon() {\n (0, _clapprZepto2.default)('link[rel=\"shortcut icon\"]').remove();\n (0, _clapprZepto2.default)('head').append(this.oldIcon);\n };\n\n Favicon.prototype.changeIcon = function changeIcon(icon) {\n if (icon) {\n (0, _clapprZepto2.default)('link[rel=\"shortcut icon\"]').remove();\n (0, _clapprZepto2.default)('head').append(icon);\n }\n };\n\n return Favicon;\n}(_core_plugin2.default);\n\nexports.default = Favicon;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/favicon/index.js\":\n/*!**************************************!*\\\n !*** ./src/plugins/favicon/index.js ***!\n \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _favicon = __webpack_require__(/*! ./favicon.js */ \"./src/plugins/favicon/favicon.js\");\n\nvar _favicon2 = _interopRequireDefault(_favicon);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _favicon2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/google_analytics/google_analytics.js\":\n/*!**********************************************************!*\\\n !*** ./src/plugins/google_analytics/google_analytics.js ***!\n \\**********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _container_plugin = __webpack_require__(/*! ../../base/container_plugin */ \"./src/base/container_plugin.js\");\n\nvar _container_plugin2 = _interopRequireDefault(_container_plugin);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nvar GoogleAnalytics = function (_ContainerPlugin) {\n (0, _inherits3.default)(GoogleAnalytics, _ContainerPlugin);\n (0, _createClass3.default)(GoogleAnalytics, [{\n key: 'name',\n get: function get() {\n return 'google_analytics';\n }\n }]);\n\n function GoogleAnalytics(container) {\n (0, _classCallCheck3.default)(this, GoogleAnalytics);\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _ContainerPlugin.call(this, container));\n\n if (_this.container.options.gaAccount) {\n _this.account = _this.container.options.gaAccount;\n _this.trackerName = _this.container.options.gaTrackerName ? _this.container.options.gaTrackerName + '.' : 'Clappr.';\n _this.domainName = _this.container.options.gaDomainName;\n _this.currentHDState = undefined;\n _this.embedScript();\n }\n return _this;\n }\n\n GoogleAnalytics.prototype.embedScript = function embedScript() {\n var _this2 = this;\n\n if (!window._gat) {\n var script = document.createElement('script');\n script.setAttribute('type', 'text/javascript');\n script.setAttribute('async', 'async');\n script.setAttribute('src', '//www.google-analytics.com/ga.js');\n script.onload = function () {\n return _this2.addEventListeners();\n };\n document.body.appendChild(script);\n } else {\n this.addEventListeners();\n }\n };\n\n GoogleAnalytics.prototype.addEventListeners = function addEventListeners() {\n var _this3 = this;\n\n if (this.container) {\n this.listenTo(this.container, _events2.default.CONTAINER_READY, this.onReady);\n this.listenTo(this.container, _events2.default.CONTAINER_PLAY, this.onPlay);\n this.listenTo(this.container, _events2.default.CONTAINER_STOP, this.onStop);\n this.listenTo(this.container, _events2.default.CONTAINER_PAUSE, this.onPause);\n this.listenTo(this.container, _events2.default.CONTAINER_ENDED, this.onEnded);\n this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERING, this.onBuffering);\n this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERFULL, this.onBufferFull);\n this.listenTo(this.container, _events2.default.CONTAINER_ERROR, this.onError);\n this.listenTo(this.container, _events2.default.CONTAINER_PLAYBACKSTATE, this.onPlaybackChanged);\n this.listenTo(this.container, _events2.default.CONTAINER_VOLUME, function (event) {\n return _this3.onVolumeChanged(event);\n });\n this.listenTo(this.container, _events2.default.CONTAINER_SEEK, function (event) {\n return _this3.onSeek(event);\n });\n this.listenTo(this.container, _events2.default.CONTAINER_FULL_SCREEN, this.onFullscreen);\n this.listenTo(this.container, _events2.default.CONTAINER_HIGHDEFINITIONUPDATE, this.onHD);\n this.listenTo(this.container, _events2.default.CONTAINER_PLAYBACKDVRSTATECHANGED, this.onDVR);\n }\n _gaq.push([this.trackerName + '_setAccount', this.account]);\n if (this.domainName) _gaq.push([this.trackerName + '_setDomainName', this.domainName]);\n };\n\n GoogleAnalytics.prototype.onReady = function onReady() {\n this.push(['Video', 'Playback', this.container.playback.name]);\n };\n\n GoogleAnalytics.prototype.onPlay = function onPlay() {\n this.push(['Video', 'Play', this.container.playback.src]);\n };\n\n GoogleAnalytics.prototype.onStop = function onStop() {\n this.push(['Video', 'Stop', this.container.playback.src]);\n };\n\n GoogleAnalytics.prototype.onEnded = function onEnded() {\n this.push(['Video', 'Ended', this.container.playback.src]);\n };\n\n GoogleAnalytics.prototype.onBuffering = function onBuffering() {\n this.push(['Video', 'Buffering', this.container.playback.src]);\n };\n\n GoogleAnalytics.prototype.onBufferFull = function onBufferFull() {\n this.push(['Video', 'Bufferfull', this.container.playback.src]);\n };\n\n GoogleAnalytics.prototype.onError = function onError() {\n this.push(['Video', 'Error', this.container.playback.src]);\n };\n\n GoogleAnalytics.prototype.onHD = function onHD(isHD) {\n var status = isHD ? 'ON' : 'OFF';\n if (status !== this.currentHDState) {\n this.currentHDState = status;\n this.push(['Video', 'HD - ' + status, this.container.playback.src]);\n }\n };\n\n GoogleAnalytics.prototype.onPlaybackChanged = function onPlaybackChanged(playbackState) {\n if (playbackState.type !== null) this.push(['Video', 'Playback Type - ' + playbackState.type, this.container.playback.src]);\n };\n\n GoogleAnalytics.prototype.onDVR = function onDVR(dvrInUse) {\n var status = dvrInUse ? 'ON' : 'OFF';\n this.push(['Interaction', 'DVR - ' + status, this.container.playback.src]);\n };\n\n GoogleAnalytics.prototype.onPause = function onPause() {\n this.push(['Video', 'Pause', this.container.playback.src]);\n };\n\n GoogleAnalytics.prototype.onSeek = function onSeek() {\n this.push(['Video', 'Seek', this.container.playback.src]);\n };\n\n GoogleAnalytics.prototype.onVolumeChanged = function onVolumeChanged() {\n this.push(['Interaction', 'Volume', this.container.playback.src]);\n };\n\n GoogleAnalytics.prototype.onFullscreen = function onFullscreen() {\n this.push(['Interaction', 'Fullscreen', this.container.playback.src]);\n };\n\n GoogleAnalytics.prototype.push = function push(array) {\n var res = [this.trackerName + '_trackEvent'].concat(array);\n _gaq.push(res);\n };\n\n return GoogleAnalytics;\n}(_container_plugin2.default);\n\nexports.default = GoogleAnalytics;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/google_analytics/index.js\":\n/*!***********************************************!*\\\n !*** ./src/plugins/google_analytics/index.js ***!\n \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _google_analytics = __webpack_require__(/*! ./google_analytics */ \"./src/plugins/google_analytics/google_analytics.js\");\n\nvar _google_analytics2 = _interopRequireDefault(_google_analytics);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _google_analytics2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/log/index.js\":\n/*!**********************************!*\\\n !*** ./src/plugins/log/index.js ***!\n \\**********************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _log = __webpack_require__(/*! ./log */ \"./src/plugins/log/log.js\");\n\nvar _log2 = _interopRequireDefault(_log);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _log2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/log/log.js\":\n/*!********************************!*\\\n !*** ./src/plugins/log/log.js ***!\n \\********************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _vendor = __webpack_require__(/*! ../../vendor */ \"./src/vendor/index.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar BOLD = 'font-weight: bold; font-size: 13px;';\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nvar INFO = 'color: #006600;' + BOLD;\nvar DEBUG = 'color: #0000ff;' + BOLD;\nvar WARN = 'color: #ff8000;' + BOLD;\nvar ERROR = 'color: #ff0000;' + BOLD;\n\nvar LEVEL_DEBUG = 0;\nvar LEVEL_INFO = 1;\nvar LEVEL_WARN = 2;\nvar LEVEL_ERROR = 3;\nvar LEVEL_DISABLED = LEVEL_ERROR;\n\nvar COLORS = [DEBUG, INFO, WARN, ERROR, ERROR];\nvar DESCRIPTIONS = ['debug', 'info', 'warn', 'error', 'disabled'];\n\nvar Log = function () {\n function Log() {\n var _this = this;\n\n var level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : LEVEL_INFO;\n var offLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : LEVEL_DISABLED;\n (0, _classCallCheck3.default)(this, Log);\n\n this.kibo = new _vendor.Kibo();\n this.kibo.down(['ctrl shift d'], function () {\n return _this.onOff();\n });\n this.BLACKLIST = ['timeupdate', 'playback:timeupdate', 'playback:progress', 'container:hover', 'container:timeupdate', 'container:progress'];\n this.level = level;\n this.offLevel = offLevel;\n }\n\n Log.prototype.debug = function debug(klass) {\n this.log(klass, LEVEL_DEBUG, Array.prototype.slice.call(arguments, 1));\n };\n\n Log.prototype.info = function info(klass) {\n this.log(klass, LEVEL_INFO, Array.prototype.slice.call(arguments, 1));\n };\n\n Log.prototype.warn = function warn(klass) {\n this.log(klass, LEVEL_WARN, Array.prototype.slice.call(arguments, 1));\n };\n\n Log.prototype.error = function error(klass) {\n this.log(klass, LEVEL_ERROR, Array.prototype.slice.call(arguments, 1));\n };\n\n Log.prototype.onOff = function onOff() {\n if (this.level === this.offLevel) {\n this.level = this.previousLevel;\n } else {\n this.previousLevel = this.level;\n this.level = this.offLevel;\n }\n // handle instances where console.log is unavailable\n if (window.console && window.console.log) window.console.log('%c[Clappr.Log] set log level to ' + DESCRIPTIONS[this.level], WARN);\n };\n\n Log.prototype.level = function level(newLevel) {\n this.level = newLevel;\n };\n\n Log.prototype.log = function log(klass, level, message) {\n if (this.BLACKLIST.indexOf(message[0]) >= 0) return;\n if (level < this.level) return;\n\n if (!message) {\n message = klass;\n klass = null;\n }\n var color = COLORS[level];\n var klassDescription = '';\n if (klass) klassDescription = '[' + klass + ']';\n\n if (window.console && window.console.log) window.console.log.apply(console, ['%c[' + DESCRIPTIONS[level] + ']' + klassDescription, color].concat(message));\n };\n\n return Log;\n}();\n\nexports.default = Log;\n\n\nLog.LEVEL_DEBUG = LEVEL_DEBUG;\nLog.LEVEL_INFO = LEVEL_INFO;\nLog.LEVEL_WARN = LEVEL_WARN;\nLog.LEVEL_ERROR = LEVEL_ERROR;\n\nLog.getInstance = function () {\n if (this._instance === undefined) {\n this._instance = new this();\n this._instance.previousLevel = this._instance.level;\n this._instance.level = this._instance.offLevel;\n }\n return this._instance;\n};\n\nLog.setLevel = function (level) {\n this.getInstance().level = level;\n};\n\nLog.debug = function () {\n this.getInstance().debug.apply(this.getInstance(), arguments);\n};\nLog.info = function () {\n this.getInstance().info.apply(this.getInstance(), arguments);\n};\nLog.warn = function () {\n this.getInstance().warn.apply(this.getInstance(), arguments);\n};\nLog.error = function () {\n this.getInstance().error.apply(this.getInstance(), arguments);\n};\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/media_control/index.js\":\n/*!********************************************!*\\\n !*** ./src/plugins/media_control/index.js ***!\n \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _media_control = __webpack_require__(/*! ./media_control */ \"./src/plugins/media_control/media_control.js\");\n\nvar _media_control2 = _interopRequireDefault(_media_control);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _media_control2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/media_control/media_control.js\":\n/*!****************************************************!*\\\n !*** ./src/plugins/media_control/media_control.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(/*! babel-runtime/core-js/json/stringify */ \"./node_modules/babel-runtime/core-js/json/stringify.js\");\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _utils = __webpack_require__(/*! ../../base/utils */ \"./src/base/utils.js\");\n\nvar _vendor = __webpack_require__(/*! ../../vendor */ \"./src/vendor/index.js\");\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _ui_core_plugin = __webpack_require__(/*! ../../base/ui_core_plugin */ \"./src/base/ui_core_plugin.js\");\n\nvar _ui_core_plugin2 = _interopRequireDefault(_ui_core_plugin);\n\nvar _browser = __webpack_require__(/*! ../../components/browser */ \"./src/components/browser/index.js\");\n\nvar _browser2 = _interopRequireDefault(_browser);\n\nvar _mediator = __webpack_require__(/*! ../../components/mediator */ \"./src/components/mediator.js\");\n\nvar _mediator2 = _interopRequireDefault(_mediator);\n\nvar _template = __webpack_require__(/*! ../../base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ \"./node_modules/clappr-zepto/zepto.js\");\n\nvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\n__webpack_require__(/*! ./public/media-control.scss */ \"./src/plugins/media_control/public/media-control.scss\");\n\nvar _mediaControl = __webpack_require__(/*! ./public/media-control.html */ \"./src/plugins/media_control/public/media-control.html\");\n\nvar _mediaControl2 = _interopRequireDefault(_mediaControl);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n/**\n * The MediaControl is responsible for displaying the Player controls.\n */\n\nvar MediaControl = function (_UICorePlugin) {\n (0, _inherits3.default)(MediaControl, _UICorePlugin);\n (0, _createClass3.default)(MediaControl, [{\n key: 'name',\n get: function get() {\n return 'media_control';\n }\n }, {\n key: 'disabled',\n get: function get() {\n var playbackIsNOOP = this.container && this.container.getPlaybackType() === _playback2.default.NO_OP;\n return this.userDisabled || playbackIsNOOP;\n }\n }, {\n key: 'container',\n get: function get() {\n return this.core && this.core.activeContainer;\n }\n }, {\n key: 'playback',\n get: function get() {\n return this.core && this.core.activePlayback;\n }\n }, {\n key: 'attributes',\n get: function get() {\n return {\n 'class': 'media-control',\n 'data-media-control': ''\n };\n }\n }, {\n key: 'events',\n get: function get() {\n return {\n 'click [data-play]': 'play',\n 'click [data-pause]': 'pause',\n 'click [data-playpause]': 'togglePlayPause',\n 'click [data-stop]': 'stop',\n 'click [data-playstop]': 'togglePlayStop',\n 'click [data-fullscreen]': 'toggleFullscreen',\n 'click .bar-container[data-seekbar]': 'seek',\n 'click .bar-container[data-volume]': 'onVolumeClick',\n 'click .drawer-icon[data-volume]': 'toggleMute',\n 'mouseenter .drawer-container[data-volume]': 'showVolumeBar',\n 'mouseleave .drawer-container[data-volume]': 'hideVolumeBar',\n 'mousedown .bar-container[data-volume]': 'startVolumeDrag',\n 'mousemove .bar-container[data-volume]': 'mousemoveOnVolumeBar',\n 'mousedown .bar-scrubber[data-seekbar]': 'startSeekDrag',\n 'mousemove .bar-container[data-seekbar]': 'mousemoveOnSeekBar',\n 'mouseleave .bar-container[data-seekbar]': 'mouseleaveOnSeekBar',\n 'mouseenter .media-control-layer[data-controls]': 'setUserKeepVisible',\n 'mouseleave .media-control-layer[data-controls]': 'resetUserKeepVisible'\n };\n }\n }, {\n key: 'template',\n get: function get() {\n return (0, _template2.default)(_mediaControl2.default);\n }\n }, {\n key: 'volume',\n get: function get() {\n return this.container && this.container.isReady ? this.container.volume : this.intendedVolume;\n }\n }, {\n key: 'muted',\n get: function get() {\n return this.volume === 0;\n }\n }]);\n\n function MediaControl(core) {\n (0, _classCallCheck3.default)(this, MediaControl);\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _UICorePlugin.call(this, core));\n\n _this.persistConfig = _this.options.persistConfig;\n _this.currentPositionValue = null;\n _this.currentDurationValue = null;\n _this.keepVisible = false;\n _this.fullScreenOnVideoTagSupported = null; // unknown\n _this.setInitialVolume();\n _this.settings = {\n left: ['play', 'stop', 'pause'],\n right: ['volume'],\n default: ['position', 'seekbar', 'duration']\n };\n _this.kibo = new _vendor.Kibo(_this.options.focusElement);\n _this.bindKeyEvents();\n\n if (_this.container) {\n if (!_clapprZepto2.default.isEmptyObject(_this.container.settings)) _this.settings = _clapprZepto2.default.extend({}, _this.container.settings);\n } else {\n _this.settings = {};\n }\n\n _this.userDisabled = false;\n if (_this.container && _this.container.mediaControlDisabled || _this.options.chromeless) _this.disable();\n\n _this.stopDragHandler = function (event) {\n return _this.stopDrag(event);\n };\n _this.updateDragHandler = function (event) {\n return _this.updateDrag(event);\n };\n (0, _clapprZepto2.default)(document).bind('mouseup', _this.stopDragHandler);\n (0, _clapprZepto2.default)(document).bind('mousemove', _this.updateDragHandler);\n return _this;\n }\n\n MediaControl.prototype.getExternalInterface = function getExternalInterface() {\n var _this2 = this;\n\n return {\n setVolume: this.setVolume,\n getVolume: function getVolume() {\n return _this2.volume;\n }\n };\n };\n\n MediaControl.prototype.bindEvents = function bindEvents() {\n var _this3 = this;\n\n this.stopListening();\n this.listenTo(this.core, _events2.default.CORE_ACTIVE_CONTAINER_CHANGED, this.onActiveContainerChanged);\n this.listenTo(this.core, _events2.default.CORE_MOUSE_MOVE, this.show);\n this.listenTo(this.core, _events2.default.CORE_MOUSE_LEAVE, function () {\n return _this3.hide(_this3.options.hideMediaControlDelay);\n });\n this.listenTo(this.core, _events2.default.CORE_FULLSCREEN, this.show);\n this.listenTo(this.core, _events2.default.CORE_OPTIONS_CHANGE, this.configure);\n _mediator2.default.on(this.options.playerId + ':' + _events2.default.PLAYER_RESIZE, this.playerResize, this);\n this.bindContainerEvents();\n };\n\n MediaControl.prototype.bindContainerEvents = function bindContainerEvents() {\n if (!this.container) return;\n this.listenTo(this.container, _events2.default.CONTAINER_PLAY, this.changeTogglePlay);\n this.listenTo(this.container, _events2.default.CONTAINER_PAUSE, this.changeTogglePlay);\n this.listenTo(this.container, _events2.default.CONTAINER_STOP, this.changeTogglePlay);\n this.listenTo(this.container, _events2.default.CONTAINER_DBLCLICK, this.toggleFullscreen);\n this.listenTo(this.container, _events2.default.CONTAINER_TIMEUPDATE, this.onTimeUpdate);\n this.listenTo(this.container, _events2.default.CONTAINER_PROGRESS, this.updateProgressBar);\n this.listenTo(this.container, _events2.default.CONTAINER_SETTINGSUPDATE, this.settingsUpdate);\n this.listenTo(this.container, _events2.default.CONTAINER_PLAYBACKDVRSTATECHANGED, this.settingsUpdate);\n this.listenTo(this.container, _events2.default.CONTAINER_HIGHDEFINITIONUPDATE, this.highDefinitionUpdate);\n this.listenTo(this.container, _events2.default.CONTAINER_MEDIACONTROL_DISABLE, this.disable);\n this.listenTo(this.container, _events2.default.CONTAINER_MEDIACONTROL_ENABLE, this.enable);\n this.listenTo(this.container, _events2.default.CONTAINER_ENDED, this.ended);\n this.listenTo(this.container, _events2.default.CONTAINER_VOLUME, this.onVolumeChanged);\n this.listenTo(this.container, _events2.default.CONTAINER_OPTIONS_CHANGE, this.setInitialVolume);\n if (this.container.playback.el.nodeName.toLowerCase() === 'video') {\n // wait until the metadata has loaded and then check if fullscreen on video tag is supported\n this.listenToOnce(this.container, _events2.default.CONTAINER_LOADEDMETADATA, this.onLoadedMetadataOnVideoTag);\n }\n };\n\n MediaControl.prototype.disable = function disable() {\n this.userDisabled = true;\n this.hide();\n this.unbindKeyEvents();\n this.$el.hide();\n };\n\n MediaControl.prototype.enable = function enable() {\n if (this.options.chromeless) return;\n this.userDisabled = false;\n this.bindKeyEvents();\n this.show();\n };\n\n MediaControl.prototype.play = function play() {\n this.container && this.container.play();\n };\n\n MediaControl.prototype.pause = function pause() {\n this.container && this.container.pause();\n };\n\n MediaControl.prototype.stop = function stop() {\n this.container && this.container.stop();\n };\n\n MediaControl.prototype.setInitialVolume = function setInitialVolume() {\n var initialVolume = this.persistConfig ? _utils.Config.restore('volume') : 100;\n var options = this.container && this.container.options || this.options;\n this.setVolume(options.mute ? 0 : initialVolume, true);\n };\n\n MediaControl.prototype.onVolumeChanged = function onVolumeChanged() {\n this.updateVolumeUI();\n };\n\n MediaControl.prototype.onLoadedMetadataOnVideoTag = function onLoadedMetadataOnVideoTag() {\n var video = this.playback && this.playback.el;\n // video.webkitSupportsFullscreen is deprecated but iOS appears to only use this\n // see https://github.com/clappr/clappr/issues/1127\n if (!_utils.Fullscreen.fullscreenEnabled() && video.webkitSupportsFullscreen) {\n this.fullScreenOnVideoTagSupported = true;\n this.settingsUpdate();\n }\n };\n\n MediaControl.prototype.updateVolumeUI = function updateVolumeUI() {\n // this will be called after a render\n if (!this.rendered) return;\n\n // update volume bar scrubber/fill on bar mode\n this.$volumeBarContainer.find('.bar-fill-2').css({});\n var containerWidth = this.$volumeBarContainer.width();\n var barWidth = this.$volumeBarBackground.width();\n var offset = (containerWidth - barWidth) / 2.0;\n var pos = barWidth * this.volume / 100.0 + offset;\n this.$volumeBarFill.css({ width: this.volume + '%' });\n this.$volumeBarScrubber.css({ left: pos });\n\n // update volume bar segments on segmented bar mode\n this.$volumeBarContainer.find('.segmented-bar-element').removeClass('fill');\n var item = Math.ceil(this.volume / 10.0);\n this.$volumeBarContainer.find('.segmented-bar-element').slice(0, item).addClass('fill');\n this.$volumeIcon.html('');\n this.$volumeIcon.removeClass('muted');\n if (!this.muted) {\n this.$volumeIcon.append(_utils.SvgIcons.volume);\n } else {\n this.$volumeIcon.append(_utils.SvgIcons.volumeMute);\n this.$volumeIcon.addClass('muted');\n }\n this.applyButtonStyle(this.$volumeIcon);\n };\n\n MediaControl.prototype.changeTogglePlay = function changeTogglePlay() {\n this.$playPauseToggle.html('');\n this.$playStopToggle.html('');\n if (this.container && this.container.isPlaying()) {\n this.$playPauseToggle.append(_utils.SvgIcons.pause);\n this.$playStopToggle.append(_utils.SvgIcons.stop);\n this.trigger(_events2.default.MEDIACONTROL_PLAYING);\n } else {\n this.$playPauseToggle.append(_utils.SvgIcons.play);\n this.$playStopToggle.append(_utils.SvgIcons.play);\n this.trigger(_events2.default.MEDIACONTROL_NOTPLAYING);\n _browser2.default.isMobile && this.show();\n }\n this.applyButtonStyle(this.$playPauseToggle);\n this.applyButtonStyle(this.$playStopToggle);\n };\n\n MediaControl.prototype.mousemoveOnSeekBar = function mousemoveOnSeekBar(event) {\n if (this.settings.seekEnabled) {\n var offsetX = event.pageX - this.$seekBarContainer.offset().left - this.$seekBarHover.width() / 2;\n this.$seekBarHover.css({ left: offsetX });\n }\n this.trigger(_events2.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR, event);\n };\n\n MediaControl.prototype.mouseleaveOnSeekBar = function mouseleaveOnSeekBar(event) {\n this.trigger(_events2.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR, event);\n };\n\n MediaControl.prototype.onVolumeClick = function onVolumeClick(event) {\n this.setVolume(this.getVolumeFromUIEvent(event));\n };\n\n MediaControl.prototype.mousemoveOnVolumeBar = function mousemoveOnVolumeBar(event) {\n this.draggingVolumeBar && this.setVolume(this.getVolumeFromUIEvent(event));\n };\n\n MediaControl.prototype.playerResize = function playerResize(size) {\n this.$fullscreenToggle.html('');\n var icon = this.core.isFullscreen() ? _utils.SvgIcons.exitFullscreen : _utils.SvgIcons.fullscreen;\n this.$fullscreenToggle.append(icon);\n this.applyButtonStyle(this.$fullscreenToggle);\n this.$el.find('.media-control').length !== 0 && this.$el.removeClass('w320');\n if (size.width <= 320 || this.options.hideVolumeBar) this.$el.addClass('w320');\n };\n\n MediaControl.prototype.togglePlayPause = function togglePlayPause() {\n this.container.isPlaying() ? this.container.pause() : this.container.play();\n return false;\n };\n\n MediaControl.prototype.togglePlayStop = function togglePlayStop() {\n this.container.isPlaying() ? this.container.stop() : this.container.play();\n };\n\n MediaControl.prototype.startSeekDrag = function startSeekDrag(event) {\n if (!this.settings.seekEnabled) return;\n this.draggingSeekBar = true;\n this.$el.addClass('dragging');\n this.$seekBarLoaded.addClass('media-control-notransition');\n this.$seekBarPosition.addClass('media-control-notransition');\n this.$seekBarScrubber.addClass('media-control-notransition');\n event && event.preventDefault();\n };\n\n MediaControl.prototype.startVolumeDrag = function startVolumeDrag(event) {\n this.draggingVolumeBar = true;\n this.$el.addClass('dragging');\n event && event.preventDefault();\n };\n\n MediaControl.prototype.stopDrag = function stopDrag(event) {\n this.draggingSeekBar && this.seek(event);\n this.$el.removeClass('dragging');\n this.$seekBarLoaded.removeClass('media-control-notransition');\n this.$seekBarPosition.removeClass('media-control-notransition');\n this.$seekBarScrubber.removeClass('media-control-notransition dragging');\n this.draggingSeekBar = false;\n this.draggingVolumeBar = false;\n };\n\n MediaControl.prototype.updateDrag = function updateDrag(event) {\n if (this.draggingSeekBar) {\n event.preventDefault();\n var offsetX = event.pageX - this.$seekBarContainer.offset().left;\n var pos = offsetX / this.$seekBarContainer.width() * 100;\n pos = Math.min(100, Math.max(pos, 0));\n this.setSeekPercentage(pos);\n } else if (this.draggingVolumeBar) {\n event.preventDefault();\n this.setVolume(this.getVolumeFromUIEvent(event));\n }\n };\n\n MediaControl.prototype.getVolumeFromUIEvent = function getVolumeFromUIEvent(event) {\n var offsetY = event.pageX - this.$volumeBarContainer.offset().left;\n var volumeFromUI = offsetY / this.$volumeBarContainer.width() * 100;\n return volumeFromUI;\n };\n\n MediaControl.prototype.toggleMute = function toggleMute() {\n if (this.muted) {\n this.setVolume(this._mutedVolume || 100);\n this._mutedVolume = null;\n return;\n }\n\n this._mutedVolume = this.volume;\n this.setVolume(0);\n };\n\n MediaControl.prototype.setVolume = function setVolume(value) {\n var _this4 = this;\n\n var isInitialVolume = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n value = Math.min(100, Math.max(value, 0));\n // this will hold the intended volume\n // it may not actually get set to this straight away\n // if the container is not ready etc\n this.intendedVolume = value;\n this.persistConfig && !isInitialVolume && _utils.Config.persist('volume', value);\n var setWhenContainerReady = function setWhenContainerReady() {\n if (_this4.container && _this4.container.isReady) {\n _this4.container.setVolume(value);\n } else {\n _this4.listenToOnce(_this4.container, _events2.default.CONTAINER_READY, function () {\n _this4.container.setVolume(value);\n });\n }\n };\n\n if (!this.container) this.listenToOnce(this, _events2.default.MEDIACONTROL_CONTAINERCHANGED, function () {\n return setWhenContainerReady();\n });else setWhenContainerReady();\n };\n\n MediaControl.prototype.toggleFullscreen = function toggleFullscreen() {\n this.trigger(_events2.default.MEDIACONTROL_FULLSCREEN, this.name);\n this.container.fullscreen();\n this.core.toggleFullscreen();\n this.resetUserKeepVisible();\n };\n\n MediaControl.prototype.onActiveContainerChanged = function onActiveContainerChanged() {\n this.fullScreenOnVideoTagSupported = null;\n _mediator2.default.off(this.options.playerId + ':' + _events2.default.PLAYER_RESIZE, this.playerResize, this);\n this.bindEvents();\n // set the new container to match the volume of the last one\n this.setInitialVolume();\n this.changeTogglePlay();\n this.bindContainerEvents();\n this.settingsUpdate();\n this.container && this.container.trigger(_events2.default.CONTAINER_PLAYBACKDVRSTATECHANGED, this.container.isDvrInUse());\n this.container && this.container.mediaControlDisabled && this.disable();\n this.trigger(_events2.default.MEDIACONTROL_CONTAINERCHANGED);\n };\n\n MediaControl.prototype.showVolumeBar = function showVolumeBar() {\n this.hideVolumeId && clearTimeout(this.hideVolumeId);\n this.$volumeBarContainer.removeClass('volume-bar-hide');\n };\n\n MediaControl.prototype.hideVolumeBar = function hideVolumeBar() {\n var _this5 = this;\n\n var timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 400;\n\n if (!this.$volumeBarContainer) return;\n if (this.draggingVolumeBar) {\n this.hideVolumeId = setTimeout(function () {\n return _this5.hideVolumeBar();\n }, timeout);\n } else {\n this.hideVolumeId && clearTimeout(this.hideVolumeId);\n this.hideVolumeId = setTimeout(function () {\n return _this5.$volumeBarContainer.addClass('volume-bar-hide');\n }, timeout);\n }\n };\n\n MediaControl.prototype.ended = function ended() {\n this.changeTogglePlay();\n };\n\n MediaControl.prototype.updateProgressBar = function updateProgressBar(progress) {\n var loadedStart = progress.start / progress.total * 100;\n var loadedEnd = progress.current / progress.total * 100;\n this.$seekBarLoaded.css({ left: loadedStart + '%', width: loadedEnd - loadedStart + '%' });\n };\n\n MediaControl.prototype.onTimeUpdate = function onTimeUpdate(timeProgress) {\n if (this.draggingSeekBar) return;\n // TODO why should current time ever be negative?\n var position = timeProgress.current < 0 ? timeProgress.total : timeProgress.current;\n\n this.currentPositionValue = position;\n this.currentDurationValue = timeProgress.total;\n this.renderSeekBar();\n };\n\n MediaControl.prototype.renderSeekBar = function renderSeekBar() {\n // this will be triggered as soon as these become available\n if (this.currentPositionValue === null || this.currentDurationValue === null) return;\n\n // default to 100%\n this.currentSeekBarPercentage = 100;\n if (this.container && (this.container.getPlaybackType() !== _playback2.default.LIVE || this.container.isDvrInUse())) this.currentSeekBarPercentage = this.currentPositionValue / this.currentDurationValue * 100;\n\n this.setSeekPercentage(this.currentSeekBarPercentage);\n\n var newPosition = (0, _utils.formatTime)(this.currentPositionValue);\n var newDuration = (0, _utils.formatTime)(this.currentDurationValue);\n if (newPosition !== this.displayedPosition) {\n this.$position.text(newPosition);\n this.displayedPosition = newPosition;\n }\n if (newDuration !== this.displayedDuration) {\n this.$duration.text(newDuration);\n this.displayedDuration = newDuration;\n }\n };\n\n MediaControl.prototype.seek = function seek(event) {\n if (!this.settings.seekEnabled) return;\n var offsetX = event.pageX - this.$seekBarContainer.offset().left;\n var pos = offsetX / this.$seekBarContainer.width() * 100;\n pos = Math.min(100, Math.max(pos, 0));\n this.container && this.container.seekPercentage(pos);\n this.setSeekPercentage(pos);\n return false;\n };\n\n MediaControl.prototype.setKeepVisible = function setKeepVisible() {\n this.keepVisible = true;\n };\n\n MediaControl.prototype.resetKeepVisible = function resetKeepVisible() {\n this.keepVisible = false;\n };\n\n MediaControl.prototype.setUserKeepVisible = function setUserKeepVisible() {\n this.userKeepVisible = true;\n };\n\n MediaControl.prototype.resetUserKeepVisible = function resetUserKeepVisible() {\n this.userKeepVisible = false;\n };\n\n MediaControl.prototype.isVisible = function isVisible() {\n return !this.$el.hasClass('media-control-hide');\n };\n\n MediaControl.prototype.show = function show(event) {\n var _this6 = this;\n\n if (this.disabled) return;\n\n var timeout = 2000;\n var mousePointerMoved = event && event.clientX !== this.lastMouseX && event.clientY !== this.lastMouseY;\n if (!event || mousePointerMoved || navigator.userAgent.match(/firefox/i)) {\n clearTimeout(this.hideId);\n this.$el.show();\n this.trigger(_events2.default.MEDIACONTROL_SHOW, this.name);\n this.container && this.container.trigger(_events2.default.CONTAINER_MEDIACONTROL_SHOW, this.name);\n this.$el.removeClass('media-control-hide');\n this.hideId = setTimeout(function () {\n return _this6.hide();\n }, timeout);\n if (event) {\n this.lastMouseX = event.clientX;\n this.lastMouseY = event.clientY;\n }\n }\n var showing = true;\n this.updateCursorStyle(showing);\n };\n\n MediaControl.prototype.hide = function hide() {\n var _this7 = this;\n\n var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n if (!this.isVisible()) return;\n\n var timeout = delay || 2000;\n clearTimeout(this.hideId);\n if (!this.disabled && this.options.hideMediaControl === false) return;\n\n var hasKeepVisibleRequested = this.userKeepVisible || this.keepVisible;\n var hasDraggingAction = this.draggingSeekBar || this.draggingVolumeBar;\n\n if (!this.disabled && (delay || hasKeepVisibleRequested || hasDraggingAction)) {\n this.hideId = setTimeout(function () {\n return _this7.hide();\n }, timeout);\n } else {\n this.trigger(_events2.default.MEDIACONTROL_HIDE, this.name);\n this.container && this.container.trigger(_events2.default.CONTAINER_MEDIACONTROL_HIDE, this.name);\n this.$el.addClass('media-control-hide');\n this.hideVolumeBar(0);\n var showing = false;\n this.updateCursorStyle(showing);\n }\n };\n\n MediaControl.prototype.updateCursorStyle = function updateCursorStyle(showing) {\n if (showing) this.core.$el.removeClass('nocursor');else if (this.core.isFullscreen()) this.core.$el.addClass('nocursor');\n };\n\n MediaControl.prototype.settingsUpdate = function settingsUpdate() {\n var newSettings = this.getSettings();\n if (newSettings && !this.fullScreenOnVideoTagSupported && !_utils.Fullscreen.fullscreenEnabled()) {\n // remove fullscreen from settings if it is present\n newSettings.default && (0, _utils.removeArrayItem)(newSettings.default, 'fullscreen');\n newSettings.left && (0, _utils.removeArrayItem)(newSettings.left, 'fullscreen');\n newSettings.right && (0, _utils.removeArrayItem)(newSettings.right, 'fullscreen');\n }\n var settingsChanged = (0, _stringify2.default)(this.settings) !== (0, _stringify2.default)(newSettings);\n if (settingsChanged) {\n this.settings = newSettings;\n this.render();\n }\n };\n\n MediaControl.prototype.getSettings = function getSettings() {\n return _clapprZepto2.default.extend(true, {}, this.container && this.container.settings);\n };\n\n MediaControl.prototype.highDefinitionUpdate = function highDefinitionUpdate(isHD) {\n this.isHD = isHD;\n var method = isHD ? 'addClass' : 'removeClass';\n this.$hdIndicator[method]('enabled');\n };\n\n MediaControl.prototype.createCachedElements = function createCachedElements() {\n var $layer = this.$el.find('.media-control-layer');\n this.$duration = $layer.find('.media-control-indicator[data-duration]');\n this.$fullscreenToggle = $layer.find('button.media-control-button[data-fullscreen]');\n this.$playPauseToggle = $layer.find('button.media-control-button[data-playpause]');\n this.$playStopToggle = $layer.find('button.media-control-button[data-playstop]');\n this.$position = $layer.find('.media-control-indicator[data-position]');\n this.$seekBarContainer = $layer.find('.bar-container[data-seekbar]');\n this.$seekBarHover = $layer.find('.bar-hover[data-seekbar]');\n this.$seekBarLoaded = $layer.find('.bar-fill-1[data-seekbar]');\n this.$seekBarPosition = $layer.find('.bar-fill-2[data-seekbar]');\n this.$seekBarScrubber = $layer.find('.bar-scrubber[data-seekbar]');\n this.$volumeBarContainer = $layer.find('.bar-container[data-volume]');\n this.$volumeContainer = $layer.find('.drawer-container[data-volume]');\n this.$volumeIcon = $layer.find('.drawer-icon[data-volume]');\n this.$volumeBarBackground = this.$el.find('.bar-background[data-volume]');\n this.$volumeBarFill = this.$el.find('.bar-fill-1[data-volume]');\n this.$volumeBarScrubber = this.$el.find('.bar-scrubber[data-volume]');\n this.$hdIndicator = this.$el.find('button.media-control-button[data-hd-indicator]');\n this.resetIndicators();\n this.initializeIcons();\n };\n\n MediaControl.prototype.resetIndicators = function resetIndicators() {\n this.displayedPosition = this.$position.text();\n this.displayedDuration = this.$duration.text();\n };\n\n MediaControl.prototype.initializeIcons = function initializeIcons() {\n var $layer = this.$el.find('.media-control-layer');\n $layer.find('button.media-control-button[data-play]').append(_utils.SvgIcons.play);\n $layer.find('button.media-control-button[data-pause]').append(_utils.SvgIcons.pause);\n $layer.find('button.media-control-button[data-stop]').append(_utils.SvgIcons.stop);\n this.$playPauseToggle.append(_utils.SvgIcons.play);\n this.$playStopToggle.append(_utils.SvgIcons.play);\n this.$volumeIcon.append(_utils.SvgIcons.volume);\n this.$fullscreenToggle.append(_utils.SvgIcons.fullscreen);\n this.$hdIndicator.append(_utils.SvgIcons.hd);\n };\n\n MediaControl.prototype.setSeekPercentage = function setSeekPercentage(value) {\n value = Math.max(Math.min(value, 100.0), 0);\n // not changed since last update\n if (this.displayedSeekBarPercentage === value) return;\n\n this.displayedSeekBarPercentage = value;\n this.$seekBarPosition.removeClass('media-control-notransition');\n this.$seekBarScrubber.removeClass('media-control-notransition');\n this.$seekBarPosition.css({ width: value + '%' });\n this.$seekBarScrubber.css({ left: value + '%' });\n };\n\n MediaControl.prototype.seekRelative = function seekRelative(delta) {\n if (!this.settings.seekEnabled) return;\n\n var currentTime = this.container.getCurrentTime();\n var duration = this.container.getDuration();\n var position = Math.min(Math.max(currentTime + delta, 0), duration);\n position = Math.min(position * 100 / duration, 100);\n this.container.seekPercentage(position);\n };\n\n MediaControl.prototype.bindKeyAndShow = function bindKeyAndShow(key, callback) {\n var _this8 = this;\n\n this.kibo.down(key, function () {\n _this8.show();\n return callback();\n });\n };\n\n MediaControl.prototype.bindKeyEvents = function bindKeyEvents() {\n var _this9 = this;\n\n if (_browser2.default.isMobile || this.options.disableKeyboardShortcuts) return;\n\n this.unbindKeyEvents();\n this.kibo = new _vendor.Kibo(this.options.focusElement || this.options.parentElement);\n this.bindKeyAndShow('space', function () {\n return _this9.togglePlayPause();\n });\n this.bindKeyAndShow('left', function () {\n return _this9.seekRelative(-5);\n });\n this.bindKeyAndShow('right', function () {\n return _this9.seekRelative(5);\n });\n this.bindKeyAndShow('shift left', function () {\n return _this9.seekRelative(-10);\n });\n this.bindKeyAndShow('shift right', function () {\n return _this9.seekRelative(10);\n });\n this.bindKeyAndShow('shift ctrl left', function () {\n return _this9.seekRelative(-15);\n });\n this.bindKeyAndShow('shift ctrl right', function () {\n return _this9.seekRelative(15);\n });\n var keys = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'];\n keys.forEach(function (i) {\n _this9.bindKeyAndShow(i, function () {\n _this9.settings.seekEnabled && _this9.container && _this9.container.seekPercentage(i * 10);\n });\n });\n };\n\n MediaControl.prototype.unbindKeyEvents = function unbindKeyEvents() {\n if (this.kibo) {\n this.kibo.off('space');\n this.kibo.off('left');\n this.kibo.off('right');\n this.kibo.off('shift left');\n this.kibo.off('shift right');\n this.kibo.off('shift ctrl left');\n this.kibo.off('shift ctrl right');\n this.kibo.off(['1', '2', '3', '4', '5', '6', '7', '8', '9', '0']);\n }\n };\n\n MediaControl.prototype.parseColors = function parseColors() {\n if (this.options.mediacontrol) {\n this.buttonsColor = this.options.mediacontrol.buttons;\n var seekbarColor = this.options.mediacontrol.seekbar;\n this.$el.find('.bar-fill-2[data-seekbar]').css('background-color', seekbarColor);\n this.$el.find('.media-control-icon svg path').css('fill', this.buttonsColor);\n this.$el.find('.segmented-bar-element[data-volume]').css('boxShadow', 'inset 2px 0 0 ' + this.buttonsColor);\n }\n };\n\n MediaControl.prototype.applyButtonStyle = function applyButtonStyle(element) {\n this.buttonsColor && element && (0, _clapprZepto2.default)(element).find('svg path').css('fill', this.buttonsColor);\n };\n\n MediaControl.prototype.destroy = function destroy() {\n (0, _clapprZepto2.default)(document).unbind('mouseup', this.stopDragHandler);\n (0, _clapprZepto2.default)(document).unbind('mousemove', this.updateDragHandler);\n this.unbindKeyEvents();\n this.stopListening();\n _UICorePlugin.prototype.destroy.call(this);\n };\n\n /**\n * enables to configure the media control after its creation\n * @method configure\n * @param {Object} options all the options to change in form of a javascript object\n */\n\n\n MediaControl.prototype.configure = function configure(options) {\n // Check if chromeless mode or if configure is called with new source(s)\n if (this.options.chromeless || options.source || options.sources) this.disable();else this.enable();\n\n this.trigger(_events2.default.MEDIACONTROL_OPTIONS_CHANGE);\n };\n\n MediaControl.prototype.render = function render() {\n var _this10 = this;\n\n var timeout = this.options.hideMediaControlDelay || 2000;\n this.settings && this.$el.html(this.template({ settings: this.settings }));\n this.createCachedElements();\n this.$playPauseToggle.addClass('paused');\n this.$playStopToggle.addClass('stopped');\n\n this.changeTogglePlay();\n\n if (this.container) {\n this.hideId = setTimeout(function () {\n return _this10.hide();\n }, timeout);\n this.disabled && this.hide();\n }\n\n // Video volume cannot be changed with Safari on mobile devices\n // Display mute/unmute icon only if Safari version >= 10\n if (_browser2.default.isSafari && _browser2.default.isMobile) {\n if (_browser2.default.version < 10) this.$volumeContainer.css('display', 'none');else this.$volumeBarContainer.css('display', 'none');\n }\n\n this.$seekBarPosition.addClass('media-control-notransition');\n this.$seekBarScrubber.addClass('media-control-notransition');\n\n var previousSeekPercentage = 0;\n if (this.displayedSeekBarPercentage) previousSeekPercentage = this.displayedSeekBarPercentage;\n\n this.displayedSeekBarPercentage = null;\n this.setSeekPercentage(previousSeekPercentage);\n\n process.nextTick(function () {\n !_this10.settings.seekEnabled && _this10.$seekBarContainer.addClass('seek-disabled');\n !_browser2.default.isMobile && !_this10.options.disableKeyboardShortcuts && _this10.bindKeyEvents();\n _this10.playerResize({ width: _this10.options.width, height: _this10.options.height });\n _this10.hideVolumeBar(0);\n });\n\n this.parseColors();\n this.highDefinitionUpdate(this.isHD);\n\n this.core.$el.append(this.el);\n\n this.rendered = true;\n this.updateVolumeUI();\n this.trigger(_events2.default.MEDIACONTROL_RENDERED);\n return this;\n };\n\n return MediaControl;\n}(_ui_core_plugin2.default);\n\nexports.default = MediaControl;\n\n\nMediaControl.extend = function (properties) {\n return (0, _utils.extend)(MediaControl, properties);\n};\nmodule.exports = exports['default'];\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/node-libs-browser/node_modules/process/browser.js */ \"./node_modules/node-libs-browser/node_modules/process/browser.js\")))\n\n/***/ }),\n\n/***/ \"./src/plugins/media_control/public/closed-hand.cur\":\n/*!**********************************************************!*\\\n !*** ./src/plugins/media_control/public/closed-hand.cur ***!\n \\**********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<%=baseUrl%>/a8c874b93b3d848f39a71260c57e3863.cur\";\n\n/***/ }),\n\n/***/ \"./src/plugins/media_control/public/media-control.html\":\n/*!*************************************************************!*\\\n !*** ./src/plugins/media_control/public/media-control.html ***!\n \\*************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"
\\n\\n\";\n\n/***/ }),\n\n/***/ \"./src/plugins/media_control/public/media-control.scss\":\n/*!*************************************************************!*\\\n !*** ./src/plugins/media_control/public/media-control.scss ***!\n \\*************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\nvar content = __webpack_require__(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./media-control.scss */ \"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/media_control/public/media-control.scss\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"singleton\":true,\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n/***/ }),\n\n/***/ \"./src/plugins/poster/index.js\":\n/*!*************************************!*\\\n !*** ./src/plugins/poster/index.js ***!\n \\*************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _poster = __webpack_require__(/*! ./poster */ \"./src/plugins/poster/poster.js\");\n\nvar _poster2 = _interopRequireDefault(_poster);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _poster2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/poster/poster.js\":\n/*!**************************************!*\\\n !*** ./src/plugins/poster/poster.js ***!\n \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _ui_container_plugin = __webpack_require__(/*! ../../base/ui_container_plugin */ \"./src/base/ui_container_plugin.js\");\n\nvar _ui_container_plugin2 = _interopRequireDefault(_ui_container_plugin);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _template = __webpack_require__(/*! ../../base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _error = __webpack_require__(/*! ../../components/error/error */ \"./src/components/error/error.js\");\n\nvar _error2 = _interopRequireDefault(_error);\n\nvar _poster = __webpack_require__(/*! ./public/poster.html */ \"./src/plugins/poster/public/poster.html\");\n\nvar _poster2 = _interopRequireDefault(_poster);\n\nvar _utils = __webpack_require__(/*! ../../base/utils */ \"./src/base/utils.js\");\n\n__webpack_require__(/*! ./public/poster.scss */ \"./src/plugins/poster/public/poster.scss\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n//Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nvar PosterPlugin = function (_UIContainerPlugin) {\n (0, _inherits3.default)(PosterPlugin, _UIContainerPlugin);\n (0, _createClass3.default)(PosterPlugin, [{\n key: 'name',\n get: function get() {\n return 'poster';\n }\n }, {\n key: 'template',\n get: function get() {\n return (0, _template2.default)(_poster2.default);\n }\n }, {\n key: 'shouldRender',\n get: function get() {\n var showForNoOp = !!(this.options.poster && this.options.poster.showForNoOp);\n return this.container.playback.name !== 'html_img' && (this.container.playback.getPlaybackType() !== _playback2.default.NO_OP || showForNoOp);\n }\n }, {\n key: 'attributes',\n get: function get() {\n return {\n 'class': 'player-poster',\n 'data-poster': ''\n };\n }\n }, {\n key: 'events',\n get: function get() {\n return {\n 'click': 'clicked'\n };\n }\n }, {\n key: 'showOnVideoEnd',\n get: function get() {\n return !this.options.poster || this.options.poster.showOnVideoEnd || this.options.poster.showOnVideoEnd === undefined;\n }\n }]);\n\n function PosterPlugin(container) {\n (0, _classCallCheck3.default)(this, PosterPlugin);\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _UIContainerPlugin.call(this, container));\n\n _this.hasStartedPlaying = false;\n _this.playRequested = false;\n _this.render();\n process.nextTick(function () {\n return _this.update();\n });\n return _this;\n }\n\n PosterPlugin.prototype.bindEvents = function bindEvents() {\n this.listenTo(this.container, _events2.default.CONTAINER_STOP, this.onStop);\n this.listenTo(this.container, _events2.default.CONTAINER_PLAY, this.onPlay);\n this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERING, this.update);\n this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERFULL, this.update);\n this.listenTo(this.container, _events2.default.CONTAINER_OPTIONS_CHANGE, this.render);\n this.listenTo(this.container, _events2.default.CONTAINER_ERROR, this.onError);\n this.showOnVideoEnd && this.listenTo(this.container, _events2.default.CONTAINER_ENDED, this.onStop);\n };\n\n PosterPlugin.prototype.onError = function onError(error) {\n this.hasFatalError = error.level === _error2.default.Levels.FATAL;\n\n if (this.hasFatalError) {\n this.hasStartedPlaying = false;\n this.playRequested = false;\n this.showPlayButton();\n }\n };\n\n PosterPlugin.prototype.onPlay = function onPlay() {\n this.hasStartedPlaying = true;\n this.update();\n };\n\n PosterPlugin.prototype.onStop = function onStop() {\n this.hasStartedPlaying = false;\n this.playRequested = false;\n this.update();\n };\n\n PosterPlugin.prototype.updatePlayButton = function updatePlayButton(show) {\n if (show && (!this.options.chromeless || this.options.allowUserInteraction)) this.showPlayButton();else this.hidePlayButton();\n };\n\n PosterPlugin.prototype.showPlayButton = function showPlayButton() {\n if (this.hasFatalError && !this.options.disableErrorScreen) return;\n\n this.$playButton.show();\n this.$el.addClass('clickable');\n };\n\n PosterPlugin.prototype.hidePlayButton = function hidePlayButton() {\n this.$playButton.hide();\n this.$el.removeClass('clickable');\n };\n\n PosterPlugin.prototype.clicked = function clicked() {\n // Let \"click_to_pause\" plugin handle click event if media has started playing\n if (!this.hasStartedPlaying) {\n if (!this.options.chromeless || this.options.allowUserInteraction) {\n this.playRequested = true;\n this.update();\n this.container.play();\n }\n return false;\n }\n };\n\n PosterPlugin.prototype.shouldHideOnPlay = function shouldHideOnPlay() {\n // Audio broadcasts should keep the poster up; video should hide poster while playing.\n return !this.container.playback.isAudioOnly;\n };\n\n PosterPlugin.prototype.update = function update() {\n if (!this.shouldRender) return;\n\n var showPlayButton = !this.playRequested && !this.hasStartedPlaying && !this.container.buffering;\n this.updatePlayButton(showPlayButton);\n this.updatePoster();\n };\n\n PosterPlugin.prototype.updatePoster = function updatePoster() {\n if (!this.hasStartedPlaying) this.showPoster();else this.hidePoster();\n };\n\n PosterPlugin.prototype.showPoster = function showPoster() {\n this.container.disableMediaControl();\n this.$el.show();\n };\n\n PosterPlugin.prototype.hidePoster = function hidePoster() {\n this.container.enableMediaControl();\n if (this.shouldHideOnPlay()) this.$el.hide();\n };\n\n PosterPlugin.prototype.render = function render() {\n if (!this.shouldRender) return;\n\n this.$el.html(this.template());\n\n var isRegularPoster = this.options.poster && this.options.poster.custom === undefined;\n\n if (isRegularPoster) {\n var posterUrl = this.options.poster.url || this.options.poster;\n this.$el.css({ 'background-image': 'url(' + posterUrl + ')' });\n } else if (this.options.poster) {\n this.$el.css({ 'background': this.options.poster.custom });\n }\n\n this.container.$el.append(this.el);\n this.$playWrapper = this.$el.find('.play-wrapper');\n this.$playWrapper.append(_utils.SvgIcons.play);\n this.$playButton = this.$playWrapper.find('svg');\n this.$playButton.addClass('poster-icon');\n this.$playButton.attr('data-poster', '');\n\n var buttonsColor = this.options.mediacontrol && this.options.mediacontrol.buttons;\n if (buttonsColor) this.$el.find('svg path').css('fill', buttonsColor);\n\n if (this.options.mediacontrol && this.options.mediacontrol.buttons) {\n buttonsColor = this.options.mediacontrol.buttons;\n this.$playButton.css('color', buttonsColor);\n }\n this.update();\n return this;\n };\n\n return PosterPlugin;\n}(_ui_container_plugin2.default);\n\nexports.default = PosterPlugin;\nmodule.exports = exports['default'];\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/node-libs-browser/node_modules/process/browser.js */ \"./node_modules/node-libs-browser/node_modules/process/browser.js\")))\n\n/***/ }),\n\n/***/ \"./src/plugins/poster/public/poster.html\":\n/*!***********************************************!*\\\n !*** ./src/plugins/poster/public/poster.html ***!\n \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"
\\n\";\n\n/***/ }),\n\n/***/ \"./src/plugins/poster/public/poster.scss\":\n/*!***********************************************!*\\\n !*** ./src/plugins/poster/public/poster.scss ***!\n \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\nvar content = __webpack_require__(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./poster.scss */ \"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/poster/public/poster.scss\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"singleton\":true,\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n/***/ }),\n\n/***/ \"./src/plugins/seek_time/index.js\":\n/*!****************************************!*\\\n !*** ./src/plugins/seek_time/index.js ***!\n \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _seek_time = __webpack_require__(/*! ./seek_time */ \"./src/plugins/seek_time/seek_time.js\");\n\nvar _seek_time2 = _interopRequireDefault(_seek_time);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _seek_time2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/seek_time/public/seek_time.html\":\n/*!*****************************************************!*\\\n !*** ./src/plugins/seek_time/public/seek_time.html ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \\n \\n\";\n\n/***/ }),\n\n/***/ \"./src/plugins/seek_time/public/seek_time.scss\":\n/*!*****************************************************!*\\\n !*** ./src/plugins/seek_time/public/seek_time.scss ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\nvar content = __webpack_require__(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./seek_time.scss */ \"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/seek_time/public/seek_time.scss\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"singleton\":true,\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n/***/ }),\n\n/***/ \"./src/plugins/seek_time/seek_time.js\":\n/*!********************************************!*\\\n !*** ./src/plugins/seek_time/seek_time.js ***!\n \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _utils = __webpack_require__(/*! ../../base/utils */ \"./src/base/utils.js\");\n\nvar _ui_core_plugin = __webpack_require__(/*! ../../base/ui_core_plugin */ \"./src/base/ui_core_plugin.js\");\n\nvar _ui_core_plugin2 = _interopRequireDefault(_ui_core_plugin);\n\nvar _template = __webpack_require__(/*! ../../base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _seek_time = __webpack_require__(/*! ./public/seek_time.html */ \"./src/plugins/seek_time/public/seek_time.html\");\n\nvar _seek_time2 = _interopRequireDefault(_seek_time);\n\n__webpack_require__(/*! ./public/seek_time.scss */ \"./src/plugins/seek_time/public/seek_time.scss\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar SeekTime = function (_UICorePlugin) {\n (0, _inherits3.default)(SeekTime, _UICorePlugin);\n (0, _createClass3.default)(SeekTime, [{\n key: 'name',\n get: function get() {\n return 'seek_time';\n }\n }, {\n key: 'template',\n get: function get() {\n return (0, _template2.default)(_seek_time2.default);\n }\n }, {\n key: 'attributes',\n get: function get() {\n return {\n 'class': 'seek-time',\n 'data-seek-time': ''\n };\n }\n }, {\n key: 'mediaControl',\n get: function get() {\n return this.core.mediaControl;\n }\n }, {\n key: 'mediaControlContainer',\n get: function get() {\n return this.mediaControl.container;\n }\n }, {\n key: 'isLiveStreamWithDvr',\n get: function get() {\n return this.mediaControlContainer && this.mediaControlContainer.getPlaybackType() === _playback2.default.LIVE && this.mediaControlContainer.isDvrEnabled();\n }\n }, {\n key: 'durationShown',\n get: function get() {\n return this.isLiveStreamWithDvr && !this.actualLiveTime;\n }\n }, {\n key: 'useActualLiveTime',\n get: function get() {\n return this.actualLiveTime && this.isLiveStreamWithDvr;\n }\n }]);\n\n function SeekTime(core) {\n (0, _classCallCheck3.default)(this, SeekTime);\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _UICorePlugin.call(this, core));\n\n _this.hoveringOverSeekBar = false;\n _this.hoverPosition = null;\n _this.duration = null;\n _this.firstFragDateTime = null;\n _this.actualLiveTime = !!_this.mediaControl.options.actualLiveTime;\n if (_this.actualLiveTime) {\n if (_this.mediaControl.options.actualLiveServerTime) _this.actualLiveServerTimeDiff = new Date().getTime() - new Date(_this.mediaControl.options.actualLiveServerTime).getTime();else _this.actualLiveServerTimeDiff = 0;\n }\n return _this;\n }\n\n SeekTime.prototype.bindEvents = function bindEvents() {\n this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_RENDERED, this.render);\n this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR, this.showTime);\n this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR, this.hideTime);\n this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_CONTAINERCHANGED, this.onContainerChanged);\n if (this.mediaControlContainer) {\n this.listenTo(this.mediaControlContainer, _events2.default.CONTAINER_PLAYBACKDVRSTATECHANGED, this.update);\n this.listenTo(this.mediaControlContainer, _events2.default.CONTAINER_TIMEUPDATE, this.updateDuration);\n }\n };\n\n SeekTime.prototype.onContainerChanged = function onContainerChanged() {\n this.stopListening();\n this.bindEvents();\n };\n\n SeekTime.prototype.updateDuration = function updateDuration(timeProgress) {\n this.duration = timeProgress.total;\n this.firstFragDateTime = timeProgress.firstFragDateTime;\n this.update();\n };\n\n SeekTime.prototype.showTime = function showTime(event) {\n this.hoveringOverSeekBar = true;\n this.calculateHoverPosition(event);\n this.update();\n };\n\n SeekTime.prototype.hideTime = function hideTime() {\n this.hoveringOverSeekBar = false;\n this.update();\n };\n\n SeekTime.prototype.calculateHoverPosition = function calculateHoverPosition(event) {\n var offset = event.pageX - this.mediaControl.$seekBarContainer.offset().left;\n // proportion into the seek bar that the mouse is hovered over 0-1\n this.hoverPosition = Math.min(1, Math.max(offset / this.mediaControl.$seekBarContainer.width(), 0));\n };\n\n SeekTime.prototype.getSeekTime = function getSeekTime() {\n var seekTime = void 0,\n secondsSinceMidnight = void 0,\n d = void 0,\n e = void 0;\n if (this.useActualLiveTime) {\n if (this.firstFragDateTime) {\n e = new Date(this.firstFragDateTime);\n d = new Date(this.firstFragDateTime);\n d.setHours(0, 0, 0, 0);\n secondsSinceMidnight = (e.getTime() - d.getTime()) / 1000 + this.duration;\n } else {\n d = new Date(new Date().getTime() - this.actualLiveServerTimeDiff);\n e = new Date(d);\n secondsSinceMidnight = (e - d.setHours(0, 0, 0, 0)) / 1000;\n }\n seekTime = secondsSinceMidnight - this.duration + this.hoverPosition * this.duration;\n if (seekTime < 0) seekTime += 86400;\n } else {\n seekTime = this.hoverPosition * this.duration;\n }\n\n return { seekTime: seekTime, secondsSinceMidnight: secondsSinceMidnight };\n };\n\n SeekTime.prototype.update = function update() {\n if (!this.rendered) {\n // update() is always called after a render\n return;\n }\n if (!this.shouldBeVisible()) {\n this.$el.hide();\n this.$el.css('left', '-100%');\n } else {\n var seekTime = this.getSeekTime();\n var currentSeekTime = (0, _utils.formatTime)(seekTime.seekTime, this.useActualLiveTime);\n // only update dom if necessary, ie time actually changed\n if (currentSeekTime !== this.displayedSeekTime) {\n this.$seekTimeEl.text(currentSeekTime);\n this.displayedSeekTime = currentSeekTime;\n }\n\n if (this.durationShown) {\n this.$durationEl.show();\n var currentDuration = (0, _utils.formatTime)(this.actualLiveTime ? seekTime.secondsSinceMidnight : this.duration, this.actualLiveTime);\n if (currentDuration !== this.displayedDuration) {\n this.$durationEl.text(currentDuration);\n this.displayedDuration = currentDuration;\n }\n } else {\n this.$durationEl.hide();\n }\n\n // the element must be unhidden before its width is requested, otherwise it's width will be reported as 0\n this.$el.show();\n var containerWidth = this.mediaControl.$seekBarContainer.width();\n var elWidth = this.$el.width();\n var elLeftPos = this.hoverPosition * containerWidth;\n elLeftPos -= elWidth / 2;\n elLeftPos = Math.max(0, Math.min(elLeftPos, containerWidth - elWidth));\n this.$el.css('left', elLeftPos);\n }\n };\n\n SeekTime.prototype.shouldBeVisible = function shouldBeVisible() {\n return this.mediaControlContainer && this.mediaControlContainer.settings.seekEnabled && this.hoveringOverSeekBar && this.hoverPosition !== null && this.duration !== null;\n };\n\n SeekTime.prototype.render = function render() {\n this.rendered = true;\n this.displayedDuration = null;\n this.displayedSeekTime = null;\n this.$el.html(this.template());\n this.$el.hide();\n this.mediaControl.$el.append(this.el);\n this.$seekTimeEl = this.$el.find('[data-seek-time]');\n this.$durationEl = this.$el.find('[data-duration]');\n this.$durationEl.hide();\n this.update();\n };\n\n return SeekTime;\n}(_ui_core_plugin2.default); // Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nexports.default = SeekTime;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/sources.js\":\n/*!********************************!*\\\n !*** ./src/plugins/sources.js ***!\n \\********************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _core_plugin = __webpack_require__(/*! ../base/core_plugin */ \"./src/base/core_plugin.js\");\n\nvar _core_plugin2 = _interopRequireDefault(_core_plugin);\n\nvar _events = __webpack_require__(/*! ../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar SourcesPlugin = function (_CorePlugin) {\n (0, _inherits3.default)(SourcesPlugin, _CorePlugin);\n\n function SourcesPlugin() {\n (0, _classCallCheck3.default)(this, SourcesPlugin);\n return (0, _possibleConstructorReturn3.default)(this, _CorePlugin.apply(this, arguments));\n }\n\n SourcesPlugin.prototype.bindEvents = function bindEvents() {\n this.listenTo(this.core, _events2.default.CORE_CONTAINERS_CREATED, this.onContainersCreated);\n };\n\n SourcesPlugin.prototype.onContainersCreated = function onContainersCreated() {\n var firstValidSource = this.core.containers.filter(function (container) {\n return container.playback.name !== 'no_op';\n })[0] || this.core.containers[0];\n if (firstValidSource) {\n this.core.containers.forEach(function (container) {\n if (container !== firstValidSource) container.destroy();\n });\n }\n };\n\n (0, _createClass3.default)(SourcesPlugin, [{\n key: 'name',\n get: function get() {\n return 'sources';\n }\n }]);\n return SourcesPlugin;\n}(_core_plugin2.default);\n\nexports.default = SourcesPlugin;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/spinner_three_bounce/index.js\":\n/*!***************************************************!*\\\n !*** ./src/plugins/spinner_three_bounce/index.js ***!\n \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _spinner_three_bounce = __webpack_require__(/*! ./spinner_three_bounce */ \"./src/plugins/spinner_three_bounce/spinner_three_bounce.js\");\n\nvar _spinner_three_bounce2 = _interopRequireDefault(_spinner_three_bounce);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _spinner_three_bounce2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/spinner_three_bounce/public/spinner.html\":\n/*!**************************************************************!*\\\n !*** ./src/plugins/spinner_three_bounce/public/spinner.html ***!\n \\**************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"
\\n\";\n\n/***/ }),\n\n/***/ \"./src/plugins/spinner_three_bounce/public/spinner.scss\":\n/*!**************************************************************!*\\\n !*** ./src/plugins/spinner_three_bounce/public/spinner.scss ***!\n \\**************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\nvar content = __webpack_require__(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./spinner.scss */ \"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/spinner_three_bounce/public/spinner.scss\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"singleton\":true,\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n/***/ }),\n\n/***/ \"./src/plugins/spinner_three_bounce/spinner_three_bounce.js\":\n/*!******************************************************************!*\\\n !*** ./src/plugins/spinner_three_bounce/spinner_three_bounce.js ***!\n \\******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _ui_container_plugin = __webpack_require__(/*! ../../base/ui_container_plugin */ \"./src/base/ui_container_plugin.js\");\n\nvar _ui_container_plugin2 = _interopRequireDefault(_ui_container_plugin);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _template = __webpack_require__(/*! ../../base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _spinner = __webpack_require__(/*! ./public/spinner.html */ \"./src/plugins/spinner_three_bounce/public/spinner.html\");\n\nvar _spinner2 = _interopRequireDefault(_spinner);\n\n__webpack_require__(/*! ./public/spinner.scss */ \"./src/plugins/spinner_three_bounce/public/spinner.scss\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar SpinnerThreeBouncePlugin = function (_UIContainerPlugin) {\n (0, _inherits3.default)(SpinnerThreeBouncePlugin, _UIContainerPlugin);\n (0, _createClass3.default)(SpinnerThreeBouncePlugin, [{\n key: 'name',\n get: function get() {\n return 'spinner';\n }\n }, {\n key: 'attributes',\n get: function get() {\n return {\n 'data-spinner': '',\n 'class': 'spinner-three-bounce'\n };\n }\n }]);\n\n function SpinnerThreeBouncePlugin(container) {\n (0, _classCallCheck3.default)(this, SpinnerThreeBouncePlugin);\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _UIContainerPlugin.call(this, container));\n\n _this.template = (0, _template2.default)(_spinner2.default);\n _this.showTimeout = null;\n _this.listenTo(_this.container, _events2.default.CONTAINER_STATE_BUFFERING, _this.onBuffering);\n _this.listenTo(_this.container, _events2.default.CONTAINER_STATE_BUFFERFULL, _this.onBufferFull);\n _this.listenTo(_this.container, _events2.default.CONTAINER_STOP, _this.onStop);\n _this.listenTo(_this.container, _events2.default.CONTAINER_ENDED, _this.onStop);\n _this.listenTo(_this.container, _events2.default.CONTAINER_ERROR, _this.onStop);\n _this.render();\n return _this;\n }\n\n SpinnerThreeBouncePlugin.prototype.onBuffering = function onBuffering() {\n this.show();\n };\n\n SpinnerThreeBouncePlugin.prototype.onBufferFull = function onBufferFull() {\n this.hide();\n };\n\n SpinnerThreeBouncePlugin.prototype.onStop = function onStop() {\n this.hide();\n };\n\n SpinnerThreeBouncePlugin.prototype.show = function show() {\n var _this2 = this;\n\n if (this.showTimeout === null) this.showTimeout = setTimeout(function () {\n return _this2.$el.show();\n }, 300);\n };\n\n SpinnerThreeBouncePlugin.prototype.hide = function hide() {\n if (this.showTimeout !== null) {\n clearTimeout(this.showTimeout);\n this.showTimeout = null;\n }\n this.$el.hide();\n };\n\n SpinnerThreeBouncePlugin.prototype.render = function render() {\n this.$el.html(this.template());\n this.container.$el.append(this.$el);\n this.$el.hide();\n if (this.container.buffering) this.onBuffering();\n\n return this;\n };\n\n return SpinnerThreeBouncePlugin;\n}(_ui_container_plugin2.default); // Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nexports.default = SpinnerThreeBouncePlugin;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/stats/index.js\":\n/*!************************************!*\\\n !*** ./src/plugins/stats/index.js ***!\n \\************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stats = __webpack_require__(/*! ./stats */ \"./src/plugins/stats/stats.js\");\n\nvar _stats2 = _interopRequireDefault(_stats);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _stats2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/stats/stats.js\":\n/*!************************************!*\\\n !*** ./src/plugins/stats/stats.js ***!\n \\************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _container_plugin = __webpack_require__(/*! ../../base/container_plugin */ \"./src/base/container_plugin.js\");\n\nvar _container_plugin2 = _interopRequireDefault(_container_plugin);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ \"./node_modules/clappr-zepto/zepto.js\");\n\nvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar StatsPlugin = function (_ContainerPlugin) {\n (0, _inherits3.default)(StatsPlugin, _ContainerPlugin);\n (0, _createClass3.default)(StatsPlugin, [{\n key: 'name',\n get: function get() {\n return 'stats';\n }\n }]);\n\n function StatsPlugin(container) {\n (0, _classCallCheck3.default)(this, StatsPlugin);\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _ContainerPlugin.call(this, container));\n\n _this.setInitialAttrs();\n _this.reportInterval = _this.options.reportInterval || 5000;\n _this.state = 'IDLE';\n return _this;\n }\n\n StatsPlugin.prototype.bindEvents = function bindEvents() {\n this.listenTo(this.container.playback, _events2.default.PLAYBACK_PLAY, this.onPlay);\n this.listenTo(this.container, _events2.default.CONTAINER_STOP, this.onStop);\n this.listenTo(this.container, _events2.default.CONTAINER_ENDED, this.onStop);\n this.listenTo(this.container, _events2.default.CONTAINER_DESTROYED, this.onStop);\n this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERING, this.onBuffering);\n this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERFULL, this.onBufferFull);\n this.listenTo(this.container, _events2.default.CONTAINER_STATS_ADD, this.onStatsAdd);\n this.listenTo(this.container, _events2.default.CONTAINER_BITRATE, this.onStatsAdd);\n this.listenTo(this.container.playback, _events2.default.PLAYBACK_STATS_ADD, this.onStatsAdd);\n };\n\n StatsPlugin.prototype.setInitialAttrs = function setInitialAttrs() {\n this.firstPlay = true;\n this.startupTime = 0;\n this.rebufferingTime = 0;\n this.watchingTime = 0;\n this.rebuffers = 0;\n this.externalMetrics = {};\n };\n\n StatsPlugin.prototype.onPlay = function onPlay() {\n this.state = 'PLAYING';\n this.watchingTimeInit = Date.now();\n if (!this.intervalId) this.intervalId = setInterval(this.report.bind(this), this.reportInterval);\n };\n\n StatsPlugin.prototype.onStop = function onStop() {\n clearInterval(this.intervalId);\n this.report();\n this.intervalId = undefined;\n this.state = 'STOPPED';\n };\n\n StatsPlugin.prototype.onBuffering = function onBuffering() {\n if (this.firstPlay) this.startupTimeInit = Date.now();else this.rebufferingTimeInit = Date.now();\n\n this.state = 'BUFFERING';\n this.rebuffers++;\n };\n\n StatsPlugin.prototype.onBufferFull = function onBufferFull() {\n if (this.firstPlay && this.startupTimeInit) {\n this.firstPlay = false;\n this.startupTime = Date.now() - this.startupTimeInit;\n this.watchingTimeInit = Date.now();\n } else if (this.rebufferingTimeInit) {\n this.rebufferingTime += this.getRebufferingTime();\n }\n\n this.rebufferingTimeInit = undefined;\n this.state = 'PLAYING';\n };\n\n StatsPlugin.prototype.getRebufferingTime = function getRebufferingTime() {\n return Date.now() - this.rebufferingTimeInit;\n };\n\n StatsPlugin.prototype.getWatchingTime = function getWatchingTime() {\n var totalTime = Date.now() - this.watchingTimeInit;\n return totalTime - this.rebufferingTime;\n };\n\n StatsPlugin.prototype.isRebuffering = function isRebuffering() {\n return !!this.rebufferingTimeInit;\n };\n\n StatsPlugin.prototype.onStatsAdd = function onStatsAdd(metric) {\n _clapprZepto2.default.extend(this.externalMetrics, metric);\n };\n\n StatsPlugin.prototype.getStats = function getStats() {\n var metrics = {\n startupTime: this.startupTime,\n rebuffers: this.rebuffers,\n rebufferingTime: this.isRebuffering() ? this.rebufferingTime + this.getRebufferingTime() : this.rebufferingTime,\n watchingTime: this.isRebuffering() ? this.getWatchingTime() - this.getRebufferingTime() : this.getWatchingTime()\n };\n _clapprZepto2.default.extend(metrics, this.externalMetrics);\n return metrics;\n };\n\n StatsPlugin.prototype.report = function report() {\n this.container.statsReport(this.getStats());\n };\n\n return StatsPlugin;\n}(_container_plugin2.default); // Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nexports.default = StatsPlugin;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/strings.js\":\n/*!********************************!*\\\n !*** ./src/plugins/strings.js ***!\n \\********************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _utils = __webpack_require__(/*! ../base/utils */ \"./src/base/utils.js\");\n\nvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ \"./node_modules/clappr-zepto/zepto.js\");\n\nvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\nvar _core_plugin = __webpack_require__(/*! ../base/core_plugin */ \"./src/base/core_plugin.js\");\n\nvar _core_plugin2 = _interopRequireDefault(_core_plugin);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * The internationalization (i18n) plugin\n * @class Strings\n * @constructor\n * @extends CorePlugin\n * @module plugins\n */\nvar Strings = function (_CorePlugin) {\n (0, _inherits3.default)(Strings, _CorePlugin);\n (0, _createClass3.default)(Strings, [{\n key: 'name',\n get: function get() {\n return 'strings';\n }\n }]);\n\n function Strings(core) {\n (0, _classCallCheck3.default)(this, Strings);\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _CorePlugin.call(this, core));\n\n _this._initializeMessages();\n return _this;\n }\n /**\n * Gets a translated string for the given key.\n * @method t\n * @param {String} key the key to all messages\n * @return {String} translated label\n */\n\n\n Strings.prototype.t = function t(key) {\n var lang = this._language();\n var fallbackLang = this._messages['en'];\n var i18n = lang && this._messages[lang] || fallbackLang;\n return i18n[key] || fallbackLang[key] || key;\n };\n\n Strings.prototype._language = function _language() {\n return this.core.options.language || (0, _utils.getBrowserLanguage)();\n };\n\n Strings.prototype._initializeMessages = function _initializeMessages() {\n var defaultMessages = {\n 'en': {\n 'live': 'live',\n 'back_to_live': 'back to live',\n 'disabled': 'Disabled',\n 'playback_not_supported': 'Your browser does not support the playback of this video. Please try using a different browser.',\n 'default_error_title': 'Could not play video.',\n 'default_error_message': 'There was a problem trying to load the video.'\n },\n 'pt': {\n 'live': 'ao vivo',\n 'back_to_live': 'voltar para o ao vivo',\n 'disabled': 'Desativado',\n 'playback_not_supported': 'Seu navegador não supporta a reprodução deste video. Por favor, tente usar um navegador diferente.',\n 'default_error_title': 'Não foi possível reproduzir o vídeo.',\n 'default_error_message': 'Ocorreu um problema ao tentar carregar o vídeo.'\n },\n 'es': {\n 'live': 'vivo',\n 'back_to_live': 'volver en vivo',\n 'disabled': 'Discapacitado',\n 'playback_not_supported': 'Su navegador no soporta la reproducción de un video. Por favor, trate de usar un navegador diferente.'\n },\n 'ru': {\n 'live': 'прямой эфир',\n 'back_to_live': 'к прямому эфиру',\n 'disabled': 'Отключено',\n 'playback_not_supported': 'Ваш браузер не поддерживает воспроизведение этого видео. Пожалуйста, попробуйте другой браузер.'\n },\n 'fr': {\n 'live': 'en direct',\n 'back_to_live': 'retour au direct',\n 'disabled': 'Désactivé',\n 'playback_not_supported': 'Votre navigateur ne supporte pas la lecture de cette vidéo. Merci de tenter sur un autre navigateur.',\n 'default_error_title': 'Impossible de lire la vidéo.',\n 'default_error_message': 'Un problème est survenu lors du chargement de la vidéo.'\n },\n 'tr': {\n 'live': 'canlı',\n 'back_to_live': 'canlı yayına dön',\n 'disabled': 'Engelli',\n 'playback_not_supported': 'Tarayıcınız bu videoyu oynatma desteğine sahip değil. Lütfen farklı bir tarayıcı ile deneyin.'\n },\n 'et': {\n 'live': 'Otseülekanne',\n 'back_to_live': 'Tagasi otseülekande juurde',\n 'disabled': 'Keelatud',\n 'playback_not_supported': 'Teie brauser ei toeta selle video taasesitust. Proovige kasutada muud brauserit.'\n },\n 'ar': {\n 'live': 'مباشر',\n 'back_to_live': 'الرجوع إلى المباشر',\n 'disabled': 'معطّل',\n 'playback_not_supported': 'المتصفح الذي تستخدمه لا يدعم تشغيل هذا الفيديو. الرجاء إستخدام متصفح آخر.',\n 'default_error_title': 'غير قادر الى التشغيل.',\n 'default_error_message': 'حدثت مشكلة أثناء تحميل الفيديو.'\n }\n };\n\n this._messages = _clapprZepto2.default.extend(true, defaultMessages, this.core.options.strings || {});\n this._messages['pt-BR'] = this._messages['pt'];\n this._messages['en-US'] = this._messages['en'];\n this._messages['es-419'] = this._messages['es'];\n this._messages['fr-FR'] = this._messages['fr'];\n this._messages['tr-TR'] = this._messages['tr'];\n this._messages['et-EE'] = this._messages['et'];\n this._messages['ar-IQ'] = this._messages['ar'];\n };\n\n return Strings;\n}(_core_plugin2.default);\n\nexports.default = Strings;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/watermark/index.js\":\n/*!****************************************!*\\\n !*** ./src/plugins/watermark/index.js ***!\n \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _watermark = __webpack_require__(/*! ./watermark */ \"./src/plugins/watermark/watermark.js\");\n\nvar _watermark2 = _interopRequireDefault(_watermark);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _watermark2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/plugins/watermark/public/watermark.html\":\n/*!*****************************************************!*\\\n !*** ./src/plugins/watermark/public/watermark.html ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\\n\";\n\n/***/ }),\n\n/***/ \"./src/plugins/watermark/public/watermark.scss\":\n/*!*****************************************************!*\\\n !*** ./src/plugins/watermark/public/watermark.scss ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\nvar content = __webpack_require__(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./watermark.scss */ \"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/plugins/watermark/public/watermark.scss\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"singleton\":true,\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n/***/ }),\n\n/***/ \"./src/plugins/watermark/watermark.js\":\n/*!********************************************!*\\\n !*** ./src/plugins/watermark/watermark.js ***!\n \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _ui_container_plugin = __webpack_require__(/*! ../../base/ui_container_plugin */ \"./src/base/ui_container_plugin.js\");\n\nvar _ui_container_plugin2 = _interopRequireDefault(_ui_container_plugin);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _template = __webpack_require__(/*! ../../base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _watermark = __webpack_require__(/*! ./public/watermark.html */ \"./src/plugins/watermark/public/watermark.html\");\n\nvar _watermark2 = _interopRequireDefault(_watermark);\n\n__webpack_require__(/*! ./public/watermark.scss */ \"./src/plugins/watermark/public/watermark.scss\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar WaterMarkPlugin = function (_UIContainerPlugin) {\n (0, _inherits3.default)(WaterMarkPlugin, _UIContainerPlugin);\n (0, _createClass3.default)(WaterMarkPlugin, [{\n key: 'name',\n get: function get() {\n return 'watermark';\n }\n }, {\n key: 'template',\n get: function get() {\n return (0, _template2.default)(_watermark2.default);\n }\n }]);\n\n function WaterMarkPlugin(container) {\n (0, _classCallCheck3.default)(this, WaterMarkPlugin);\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _UIContainerPlugin.call(this, container));\n\n _this.configure();\n return _this;\n }\n\n WaterMarkPlugin.prototype.bindEvents = function bindEvents() {\n this.listenTo(this.container, _events2.default.CONTAINER_PLAY, this.onPlay);\n this.listenTo(this.container, _events2.default.CONTAINER_STOP, this.onStop);\n this.listenTo(this.container, _events2.default.CONTAINER_OPTIONS_CHANGE, this.configure);\n };\n\n WaterMarkPlugin.prototype.configure = function configure() {\n this.position = this.options.position || 'bottom-right';\n if (this.options.watermark) {\n this.imageUrl = this.options.watermark;\n this.imageLink = this.options.watermarkLink;\n this.render();\n } else {\n this.$el.remove();\n }\n };\n\n WaterMarkPlugin.prototype.onPlay = function onPlay() {\n if (!this.hidden) this.$el.show();\n };\n\n WaterMarkPlugin.prototype.onStop = function onStop() {\n this.$el.hide();\n };\n\n WaterMarkPlugin.prototype.render = function render() {\n this.$el.hide();\n var templateOptions = { position: this.position, imageUrl: this.imageUrl, imageLink: this.imageLink };\n this.$el.html(this.template(templateOptions));\n this.container.$el.append(this.$el);\n return this;\n };\n\n return WaterMarkPlugin;\n}(_ui_container_plugin2.default); // Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nexports.default = WaterMarkPlugin;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/vendor/index.js\":\n/*!*****************************!*\\\n !*** ./src/vendor/index.js ***!\n \\*****************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _kibo = __webpack_require__(/*! ./kibo */ \"./src/vendor/kibo.js\");\n\nvar _kibo2 = _interopRequireDefault(_kibo);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = { Kibo: _kibo2.default };\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/vendor/kibo.js\":\n/*!****************************!*\\\n !*** ./src/vendor/kibo.js ***!\n \\****************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/* eslint-disable */\n// Kibo is released under the MIT License. Copyright (c) 2013 marquete.\n// see https://github.com/marquete/kibo\n\nvar Kibo = function Kibo(element) {\n this.element = element || window.document;\n this.initialize();\n};\n\nKibo.KEY_NAMES_BY_CODE = {\n 8: 'backspace', 9: 'tab', 13: 'enter',\n 16: 'shift', 17: 'ctrl', 18: 'alt',\n 20: 'caps_lock',\n 27: 'esc',\n 32: 'space',\n 37: 'left', 38: 'up', 39: 'right', 40: 'down',\n 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5', 54: '6', 55: '7', 56: '8', 57: '9',\n 65: 'a', 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h', 73: 'i', 74: 'j',\n 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o', 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't',\n 85: 'u', 86: 'v', 87: 'w', 88: 'x', 89: 'y', 90: 'z', 112: 'f1', 113: 'f2', 114: 'f3',\n 115: 'f4', 116: 'f5', 117: 'f6', 118: 'f7', 119: 'f8', 120: 'f9', 121: 'f10', 122: 'f11', 123: 'f12'\n};\n\nKibo.KEY_CODES_BY_NAME = {};\n(function () {\n for (var key in Kibo.KEY_NAMES_BY_CODE) {\n if (Object.prototype.hasOwnProperty.call(Kibo.KEY_NAMES_BY_CODE, key)) {\n Kibo.KEY_CODES_BY_NAME[Kibo.KEY_NAMES_BY_CODE[key]] = +key;\n }\n }\n})();\n\nKibo.MODIFIERS = ['shift', 'ctrl', 'alt'];\n\nKibo.registerEvent = function () {\n if (document.addEventListener) {\n return function (element, eventName, func) {\n element.addEventListener(eventName, func, false);\n };\n } else if (document.attachEvent) {\n return function (element, eventName, func) {\n element.attachEvent('on' + eventName, func);\n };\n }\n}();\n\nKibo.unregisterEvent = function () {\n if (document.removeEventListener) {\n return function (element, eventName, func) {\n element.removeEventListener(eventName, func, false);\n };\n } else if (document.detachEvent) {\n return function (element, eventName, func) {\n element.detachEvent('on' + eventName, func);\n };\n }\n}();\n\nKibo.stringContains = function (string, substring) {\n return string.indexOf(substring) !== -1;\n};\n\nKibo.neatString = function (string) {\n return string.replace(/^\\s+|\\s+$/g, '').replace(/\\s+/g, ' ');\n};\n\nKibo.capitalize = function (string) {\n return string.toLowerCase().replace(/^./, function (match) {\n return match.toUpperCase();\n });\n};\n\nKibo.isString = function (what) {\n return Kibo.stringContains(Object.prototype.toString.call(what), 'String');\n};\n\nKibo.arrayIncludes = function () {\n if (Array.prototype.indexOf) {\n return function (haystack, needle) {\n return haystack.indexOf(needle) !== -1;\n };\n } else {\n return function (haystack, needle) {\n for (var i = 0; i < haystack.length; i++) {\n if (haystack[i] === needle) {\n return true;\n }\n }\n return false;\n };\n }\n}();\n\nKibo.extractModifiers = function (keyCombination) {\n var modifiers, i;\n modifiers = [];\n for (i = 0; i < Kibo.MODIFIERS.length; i++) {\n if (Kibo.stringContains(keyCombination, Kibo.MODIFIERS[i])) {\n modifiers.push(Kibo.MODIFIERS[i]);\n }\n }\n return modifiers;\n};\n\nKibo.extractKey = function (keyCombination) {\n var keys, i;\n keys = Kibo.neatString(keyCombination).split(' ');\n for (i = 0; i < keys.length; i++) {\n if (!Kibo.arrayIncludes(Kibo.MODIFIERS, keys[i])) {\n return keys[i];\n }\n }\n};\n\nKibo.modifiersAndKey = function (keyCombination) {\n var result, key;\n\n if (Kibo.stringContains(keyCombination, 'any')) {\n return Kibo.neatString(keyCombination).split(' ').slice(0, 2).join(' ');\n }\n\n result = Kibo.extractModifiers(keyCombination);\n\n key = Kibo.extractKey(keyCombination);\n if (key && !Kibo.arrayIncludes(Kibo.MODIFIERS, key)) {\n result.push(key);\n }\n\n return result.join(' ');\n};\n\nKibo.keyName = function (keyCode) {\n return Kibo.KEY_NAMES_BY_CODE[keyCode + ''];\n};\n\nKibo.keyCode = function (keyName) {\n return +Kibo.KEY_CODES_BY_NAME[keyName];\n};\n\nKibo.prototype.initialize = function () {\n var i,\n that = this;\n\n this.lastKeyCode = -1;\n this.lastModifiers = {};\n for (i = 0; i < Kibo.MODIFIERS.length; i++) {\n this.lastModifiers[Kibo.MODIFIERS[i]] = false;\n }\n\n this.keysDown = { any: [] };\n this.keysUp = { any: [] };\n this.downHandler = this.handler('down');\n this.upHandler = this.handler('up');\n\n Kibo.registerEvent(this.element, 'keydown', this.downHandler);\n Kibo.registerEvent(this.element, 'keyup', this.upHandler);\n Kibo.registerEvent(window, 'unload', function unloader() {\n Kibo.unregisterEvent(that.element, 'keydown', that.downHandler);\n Kibo.unregisterEvent(that.element, 'keyup', that.upHandler);\n Kibo.unregisterEvent(window, 'unload', unloader);\n });\n};\n\nKibo.prototype.handler = function (upOrDown) {\n var that = this;\n return function (e) {\n var i, registeredKeys, lastModifiersAndKey;\n\n e = e || window.event;\n\n that.lastKeyCode = e.keyCode;\n for (i = 0; i < Kibo.MODIFIERS.length; i++) {\n that.lastModifiers[Kibo.MODIFIERS[i]] = e[Kibo.MODIFIERS[i] + 'Key'];\n }\n if (Kibo.arrayIncludes(Kibo.MODIFIERS, Kibo.keyName(that.lastKeyCode))) {\n that.lastModifiers[Kibo.keyName(that.lastKeyCode)] = true;\n }\n\n registeredKeys = that['keys' + Kibo.capitalize(upOrDown)];\n\n for (i = 0; i < registeredKeys.any.length; i++) {\n if (registeredKeys.any[i](e) === false && e.preventDefault) {\n e.preventDefault();\n }\n }\n\n lastModifiersAndKey = that.lastModifiersAndKey();\n if (registeredKeys[lastModifiersAndKey]) {\n for (i = 0; i < registeredKeys[lastModifiersAndKey].length; i++) {\n if (registeredKeys[lastModifiersAndKey][i](e) === false && e.preventDefault) {\n e.preventDefault();\n }\n }\n }\n };\n};\n\nKibo.prototype.registerKeys = function (upOrDown, newKeys, func) {\n var i,\n keys,\n registeredKeys = this['keys' + Kibo.capitalize(upOrDown)];\n\n if (Kibo.isString(newKeys)) {\n newKeys = [newKeys];\n }\n\n for (i = 0; i < newKeys.length; i++) {\n keys = newKeys[i];\n keys = Kibo.modifiersAndKey(keys + '');\n\n if (registeredKeys[keys]) {\n registeredKeys[keys].push(func);\n } else {\n registeredKeys[keys] = [func];\n }\n }\n\n return this;\n};\n\n// jshint maxdepth:5\nKibo.prototype.unregisterKeys = function (upOrDown, newKeys, func) {\n var i,\n j,\n keys,\n registeredKeys = this['keys' + Kibo.capitalize(upOrDown)];\n\n if (Kibo.isString(newKeys)) {\n newKeys = [newKeys];\n }\n\n for (i = 0; i < newKeys.length; i++) {\n keys = newKeys[i];\n keys = Kibo.modifiersAndKey(keys + '');\n\n if (func === null) {\n delete registeredKeys[keys];\n } else {\n if (registeredKeys[keys]) {\n for (j = 0; j < registeredKeys[keys].length; j++) {\n if (String(registeredKeys[keys][j]) === String(func)) {\n registeredKeys[keys].splice(j, 1);\n break;\n }\n }\n }\n }\n }\n\n return this;\n};\n\nKibo.prototype.off = function (keys) {\n return this.unregisterKeys('down', keys, null);\n};\n\nKibo.prototype.delegate = function (upOrDown, keys, func) {\n return func !== null || func !== undefined ? this.registerKeys(upOrDown, keys, func) : this.unregisterKeys(upOrDown, keys, func);\n};\n\nKibo.prototype.down = function (keys, func) {\n return this.delegate('down', keys, func);\n};\n\nKibo.prototype.up = function (keys, func) {\n return this.delegate('up', keys, func);\n};\n\nKibo.prototype.lastKey = function (modifier) {\n if (!modifier) {\n return Kibo.keyName(this.lastKeyCode);\n }\n\n return this.lastModifiers[modifier];\n};\n\nKibo.prototype.lastModifiersAndKey = function () {\n var result, i;\n\n result = [];\n for (i = 0; i < Kibo.MODIFIERS.length; i++) {\n if (this.lastKey(Kibo.MODIFIERS[i])) {\n result.push(Kibo.MODIFIERS[i]);\n }\n }\n\n if (!Kibo.arrayIncludes(result, this.lastKey())) {\n result.push(this.lastKey());\n }\n\n return result.join(' ');\n};\n\nexports.default = Kibo;\nmodule.exports = exports['default'];\n\n/***/ })\n\n/******/ });\n});\n//# sourceMappingURL=clappr.js.map","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"clappr\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"clappr\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"DashShakaPlayback\"] = factory(require(\"clappr\"));\n\telse\n\t\troot[\"DashShakaPlayback\"] = factory(root[\"Clappr\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE_clappr__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"dist/\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = \"./src/clappr-dash-shaka-playback.js\");\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ \"./node_modules/shaka-player/dist/shaka-player.compiled.js\":\n/*!*****************************************************************!*\\\n !*** ./node_modules/shaka-player/dist/shaka-player.compiled.js ***!\n \\*****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global, module) {(function(){var innerGlobal=typeof window!=\"undefined\"?window:global;var exportTo={};(function(window,global){var q,ca=\"function\"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)},da=\"undefined\"!=typeof window&&window===this?this:\"undefined\"!=typeof global&&null!=global?global:this;function ea(){ea=function(){};da.Symbol||(da.Symbol=fa)}var fa=function(){var b=0;return function(c){return\"jscomp_symbol_\"+(c||\"\")+b++}}();\nfunction ia(){ea();var b=da.Symbol.iterator;b||(b=da.Symbol.iterator=da.Symbol(\"iterator\"));\"function\"!=typeof Array.prototype[b]&&ca(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return ja(this)}});ia=function(){}}function ja(b){var c=0;return ka(function(){return cg&&(g=Math.max(g+f,0));g=g}});la(\"Array.prototype.find\",function(b){return b?b:function(b,d){return Qa(this,b,d).ve}});var Ta=\"function\"==typeof Object.assign?Object.assign:function(b,c){for(var d=1;dthis.a?b:Math.min($a(this.b),$a(this.c))};function bb(){}function cb(){}function db(){}window.console&&window.console.log.bind&&(cb=console.warn.bind(console),bb=console.error.bind(console));var hb=/^(?:([^:/?#.]+):)?(?:\\/\\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$/;function ib(b){var c;b instanceof ib?(jb(this,b.ta),this.bb=b.bb,this.sa=b.sa,kb(this,b.Ab),this.ja=b.ja,lb(this,b.a.clone()),this.Sa=b.Sa):b&&(c=String(b).match(hb))?(jb(this,c[1]||\"\",!0),this.bb=mb(c[2]||\"\"),this.sa=mb(c[3]||\"\",!0),kb(this,c[4]),this.ja=mb(c[5]||\"\",!0),lb(this,c[6]||\"\",!0),this.Sa=mb(c[7]||\"\")):this.a=new nb(null)}q=ib.prototype;q.ta=\"\";q.bb=\"\";q.sa=\"\";q.Ab=null;q.ja=\"\";q.Sa=\"\";\nq.toString=function(){var b=[],c=this.ta;c&&b.push(ob(c,pb,!0),\":\");if(c=this.sa){b.push(\"//\");var d=this.bb;d&&b.push(ob(d,pb,!0),\"@\");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,\"%$1\"));c=this.Ab;null!=c&&b.push(\":\",String(c))}if(c=this.ja)this.sa&&\"/\"!=c.charAt(0)&&b.push(\"/\"),b.push(ob(c,\"/\"==c.charAt(0)?qb:rb,!0));(c=this.a.toString())&&b.push(\"?\",c);(c=this.Sa)&&b.push(\"#\",ob(c,sb));return b.join(\"\")};\nq.resolve=function(b){var c=this.clone();\"data\"===c.ta&&(c=new ib);var d=!!b.ta;d?jb(c,b.ta):d=!!b.bb;d?c.bb=b.bb:d=!!b.sa;d?c.sa=b.sa:d=null!=b.Ab;var e=b.ja;if(d)kb(c,b.Ab);else if(d=!!b.ja){if(\"/\"!=e.charAt(0))if(this.sa&&!this.ja)e=\"/\"+e;else{var f=c.ja.lastIndexOf(\"/\");-1!=f&&(e=c.ja.substr(0,f+1)+e)}if(\"..\"==e||\".\"==e)e=\"\";else if(-1!=e.indexOf(\"./\")||-1!=e.indexOf(\"/.\")){f=0==e.lastIndexOf(\"/\",0);e=e.split(\"/\");for(var g=[],h=0;hc)throw Error(\"Bad port number \"+c);b.Ab=c}else b.Ab=null}function lb(b,c,d){c instanceof nb?b.a=c:(d||(c=ob(c,tb)),b.a=new nb(c))}\nfunction mb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):\"\"}function ob(b,c,d){return\"string\"==typeof b?(b=encodeURI(b).replace(c,yb),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,\"%$1\")),b):null}function yb(b){b=b.charCodeAt(0);return\"%\"+(b>>4&15).toString(16)+(b&15).toString(16)}var pb=/[#\\/\\?@]/g,rb=/[#\\?:]/g,qb=/[#\\?]/g,tb=/[#\\?@]/g,sb=/#/g;function nb(b){this.a=b||null}q=nb.prototype;q.ha=null;q.fc=null;\nq.add=function(b,c){if(!this.ha&&(this.ha={},this.fc=0,this.a))for(var d=this.a.split(\"&\"),e=0;e=b.i)if(b.c)b.a=1,b.b=b.f;else return d[\"return\"](Promise.reject());e=b.a;b.a++;if(0==e)return d[\"return\"]();f=b.b*(1+(2*Math.random()-1)*b.h);return u(d,new Promise(function(b){(new C(b)).R(f/1E3)}),2);case 2:b.b*=b.g,w(d)}})})}function Bb(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function D(b,c,d,e){for(var f=[],g=3;g=e.priority)Ub[b]={priority:d,Rf:c}}J.registerScheme=Vb;J.unregisterScheme=function(b){delete Ub[b]};J.prototype.Tf=function(b){this.a.add(b)};J.prototype.registerRequestFilter=J.prototype.Tf;\nJ.prototype.vg=function(b){this.a[\"delete\"](b)};J.prototype.unregisterRequestFilter=J.prototype.vg;J.prototype.Ie=function(){this.a.clear()};J.prototype.clearAllRequestFilters=J.prototype.Ie;J.prototype.Uf=function(b){this.b.add(b)};J.prototype.registerResponseFilter=J.prototype.Uf;J.prototype.wg=function(b){this.b[\"delete\"](b)};J.prototype.unregisterResponseFilter=J.prototype.wg;J.prototype.Je=function(){this.b.clear()};J.prototype.clearAllResponseFilters=J.prototype.Je;\nJ.defaultRetryParameters=function(){return Bb()};function Wb(b,c){return{uris:b,method:\"GET\",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null,sessionId:null}}J.makeRequest=Wb;J.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};J.prototype.destroy=J.prototype.destroy;\nJ.prototype.request=function(b,c){var d=this,e=new Xb;if(this.f){var f=Promise.reject(new D(2,7,7001));f[\"catch\"](function(){});return new Yb(f,function(){return Promise.resolve()},e)}c.method=c.method||\"GET\";c.headers=c.headers||{};c.retryParameters=c.retryParameters?Nb(c.retryParameters):Bb();c.uris=Nb(c.uris);f=Zb(this,b,c);var g=f.U(function(){return $b(d,b,c,new Ab(c.retryParameters,!1),0,null,e)}),h=g.U(function(c){return ac(d,b,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},\nfunction(){});var m=0;g.promise.then(function(){m=Date.now()},function(){});f=h.U(function(c){var e=Date.now()-m,f=c.response;f.timeMs+=l;f.timeMs+=e;c.qf||!d.c||f.fromCache||1!=b||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=2);throw b;});f=new Yb(f.promise,f.Zd,e);Tb(this.g,f);return f};J.prototype.request=J.prototype.request;\nfunction Zb(b,c,d){var e=Hb(void 0),f={};b=r(b.a);for(var g=b.next();!g.done;f={qd:f.qd},g=b.next())f.qd=g.value,e=e.U(function(b){return function(){return b.qd(c,d)}}(f));return e.U(void 0,function(b){if(b&&7001==b.code)throw b;throw new D(2,1,1006,b);})}\nfunction $b(b,c,d,e,f,g,h){var k=new ib(d.uris[f]),l=k.ta,m=!1;l||(l=location.protocol,l=l.slice(0,-1),jb(k,l),d.uris[f]=k.toString());l=l.toLowerCase();var n=(l=Ub[l])?l.Rf:null;if(!n)return Db(new D(2,1,1E3,k));var p;return Ib(Cb(e)).U(function(){if(b.f)return Eb();p=Date.now();return n(d.uris[f],d,c,function(d,e,f){b.c&&1==c&&(b.c(d,e),m=!0,h.a=f)})}).U(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-p);return{response:b,qf:m}},function(k){if(k&&7001==k.code)throw k;if(b.f)return Eb();if(k&&\n1==k.severity)return b.dispatchEvent(new I(\"retry\",{error:k instanceof D?k:null})),f=(f+1)%d.uris.length,$b(b,c,d,e,f,k,h);throw k||g;})}function ac(b,c,d){var e=Hb(void 0);b=r(b.b);for(var f=b.next();!f.done;f=b.next())e=e.U(f.value.bind(null,c,d.response));return e.U(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof D&&(c=b.severity);throw new D(c,1,1007,b);})}function Xb(){this.a=0}J.NumBytesRemainingClass=Xb;function Yb(b,c,d){H.call(this,b,c);this.b=d}va(Yb,H);\nJ.PendingRequest=Yb;Yb.all=Jb;Yb.notAbortable=Ib;Yb.completed=Hb;Yb.aborted=Eb;Yb.failed=Db;function bc(){}A(\"shaka.util.IReleasable\",bc);bc.prototype.release=function(){};function K(){this.a=new Lb}A(\"shaka.util.EventManager\",K);K.prototype.release=function(){this.$a();this.a=null};K.prototype.release=K.prototype.release;K.prototype.w=function(b,c,d,e){this.a&&(b=new cc(b,c,d,e),this.a.push(c,b))};K.prototype.listen=K.prototype.w;K.prototype.da=function(b,c,d,e){function f(e){g.ea(b,c,f);d(e)}var g=this;this.w(b,c,f,e)};K.prototype.listenOnce=K.prototype.da;\nK.prototype.ea=function(b,c,d){if(this.a){var e=this.a.get(c)||[];e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.target!=b||d!=f.listener&&d||(f.ea(),this.a.remove(c,f))}};K.prototype.unlisten=K.prototype.ea;K.prototype.$a=function(){if(this.a){var b=this.a.getAll();b=r(b);for(var c=b.next();!c.done;c=b.next())c.value.ea();this.a.a={}}};K.prototype.removeAll=K.prototype.$a;\nfunction cc(b,c,d,e){this.target=b;this.type=c;this.listener=d;this.a=dc(b,e);this.target.addEventListener(c,d,this.a)}cc.prototype.ea=function(){this.target.removeEventListener(this.type,this.listener,this.a);this.listener=this.target=null;this.a=!1};cc.prototype.unlisten=cc.prototype.ea;function dc(b,c){if(void 0==c)return!1;if(\"boolean\"==typeof c)return c;var d=new Set([\"passive\",\"capture\"]);Object.keys(c).filter(function(b){return!d.has(b)});return ec(b)?c:c.capture||!1}\nfunction ec(b){var c=fc;if(void 0==c){c=!1;try{var d={},e={get:function(){c=!0;return!1}};Object.defineProperty(d,\"passive\",e);Object.defineProperty(d,\"capture\",e);e=function(){};b.addEventListener(\"test\",e,d);b.removeEventListener(\"test\",e,d)}catch(f){c=!1}fc=c}return c||!1}var fc=void 0;function gc(b){b=new Uint8Array(b);if((new DataView(b.buffer,b.byteOffset,b.byteLength)).getUint32(0,!0)+4!=b.byteLength)throw new RangeError(\"Malformed FairPlay init data\");b=hc(b.subarray(4),!0);return(new ib(b)).sa}A(\"shaka.util.FairPlayUtils.defaultGetContentId\",gc);\nfunction ic(b,c,d){function e(b){(new DataView(g.buffer)).setUint32(h,b.byteLength,!0);h+=4;f(b)}function f(b){g.set(b,h);h+=b.byteLength}if(!d||!d.byteLength)throw new D(2,6,6015);c=\"string\"==typeof c?new Uint8Array(jc(c,!0)):new Uint8Array(c);var g=new Uint8Array(8+b.byteLength+c.byteLength+d.byteLength),h=0;f(new Uint8Array(b));e(c);e(new Uint8Array(d));return g}A(\"shaka.util.FairPlayUtils.initDataTransform\",ic);function kc(b,c){for(var d=[],e=r(b),f=e.next();!f.done;f=e.next())d.push(c(f.value));return d}function lc(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())if(!c(e.value))return!1;return!0};function mc(b){var c=new Map;Object.keys(b).forEach(function(d){c.set(d,b[d])});return c}function nc(b){var c={};b.forEach(function(b,e){c[e]=b});return c};function oc(b,c){var d=b;c&&(d+='; codecs=\"'+c+'\"');return d}function pc(b){var c=[b.mimeType];qc.forEach(function(d,e){var f=b[e];f&&c.push(d+'=\"'+f+'\"')});return c.join(\";\")}function rc(b){b=b.split(\".\");var c=b[0];b.pop();return[c,b.join(\".\")]}var qc=(new Map).set(\"codecs\",\"codecs\").set(\"frameRate\",\"framerate\").set(\"bandwidth\",\"bitrate\").set(\"width\",\"width\").set(\"height\",\"height\").set(\"channelsCount\",\"channels\");function sc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function tc(b){return\"\"!=uc().canPlayType(b)}function vc(){return!!navigator.vendor&&navigator.vendor.includes(\"Apple\")&&!wc(\"Tizen\")}function xc(){if(!vc())return null;var b=navigator.userAgent.match(/Version\\/(\\d+)/);return b?parseInt(b[1],10):(b=navigator.userAgent.match(/OS (\\d+)(?:_\\d+)?/))?parseInt(b[1],10):null}function wc(b){return(navigator.userAgent||\"\").includes(b)}\nfunction uc(){if(yc)return yc;zc||(zc=new C(function(){yc=null}));(yc=document.querySelector(\"video\")||document.querySelector(\"audio\"))||(yc=document.createElement(\"video\"));zc.R(1);return yc}var zc=null,yc=null;function Bc(b){if(!b)return\"\";b=new Uint8Array(b);239==b[0]&&187==b[1]&&191==b[2]&&(b=b.subarray(3));b=Cc(b);b=escape(b);try{return decodeURIComponent(b)}catch(c){throw new D(2,2,2004);}}A(\"shaka.util.StringUtils.fromUTF8\",Bc);\nfunction hc(b,c,d){if(!b)return\"\";if(!d&&0!=b.byteLength%2)throw new D(2,2,2004);if(b instanceof ArrayBuffer)var e=b;else d=new Uint8Array(b.byteLength),d.set(new Uint8Array(b)),e=d.buffer;b=Math.floor(b.byteLength/2);d=new Uint16Array(b);e=new DataView(e);for(var f=0;f=b[c]}.bind(null,c);if(0==c[0]&&0==c[2])return hc(b,!1);if(0==c[1]&&0==c[3])return hc(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return Bc(b);throw new D(2,2,2003);}A(\"shaka.util.StringUtils.fromBytesAutoDetect\",Dc);\nfunction Ec(b){b=encodeURIComponent(b);b=unescape(b);for(var c=new Uint8Array(b.length),d=0;dd&&(d+=Math.pow(2,32));d=\"0x\"+d.toString(16)}b.g(new D(2,6,6006,c.message,c,d))}})}function fd(b,c){if(ad(c).startsWith(\"com.apple.fps\")){var d=c.serverCertificate,e=gc(b);b=ic(b,e,d)}return b}q.fe=function(b){this.h&&this.f.delayLicenseRequestUntilPlayed&&this.h.paused&&!this.oa?this.F.push(b):Uc(this,b)};\nfunction Uc(b,c){var d=c.target,e=b.b.get(d),f=b.a.licenseServerUri,g=b.f.advanced[b.a.keySystem];\"individualization-request\"==c.messageType&&g&&g.individualizationServer&&(f=g.individualizationServer);f=Wb([f],b.f.retryParameters);f.body=c.message;f.method=\"POST\";f.licenseRequestType=c.messageType;f.sessionId=d.sessionId;\"com.microsoft.playready\"!=b.a.keySystem&&\"com.chromecast.playready\"!=b.a.keySystem||gd(f);b.a.keySystem.startsWith(\"com.apple.fps\")&&b.f.fairPlayTransform&&hd(f);var h=Date.now();\nb.B.ub.request(2,f).promise.then(function(b){if(this.c)return Promise.reject();this.a.keySystem.startsWith(\"com.apple.fps\")&&this.f.fairPlayTransform&&id(b);this.K+=(Date.now()-h)/1E3;return d.update(b.data).then(function(){var b=this;this.B.onEvent(new I(\"drmsessionupdate\"));e&&(e.ya&&e.ya.resolve(),(new C(function(){e.loaded=!0;ed(b)&&b.m.resolve()})).R(jd))}.bind(this))}.bind(b),function(b){this.c||(b=new D(2,6,6007,b),this.g(b),e&&e.ya&&e.ya.reject(b))}.bind(b))[\"catch\"](function(b){this.c||(b=\nnew D(2,6,6008,b.message),this.g(b),e&&e.ya&&e.ya.reject(b))}.bind(b))}function gd(b){var c=hc(b.body,!0,!0);if(c.includes(\"PlayReadyKeyMessage\")){c=(new DOMParser).parseFromString(c,\"application/xml\");for(var d=c.getElementsByTagName(\"HttpHeader\"),e=0;e\"===c.substr(0,5)&&\"\"===c.substr(-6)&&(c=c.slice(5,-6));try{c=JSON.parse(c).ckc}catch(d){}b.data=L.Ba(c).buffer}\nq.de=function(b){b=b.target;var c=this.b.get(b),d=!1;b.keyStatuses.forEach(function(b,e){if(\"string\"==typeof e){var f=e;e=b;b=f}if(\"com.microsoft.playready\"==this.a.keySystem&&16==e.byteLength&&!wc(\"Tizen\")&&!wc(\"VITIS\")){f=new DataView(e);var g=f.getUint32(0,!0),l=f.getUint16(4,!0),m=f.getUint16(6,!0);f.setUint32(0,g,!1);f.setUint16(4,l,!1);f.setUint16(6,m,!1)}\"com.microsoft.playready\"==this.a.keySystem&&\"status-pending\"==b&&(b=\"usable\");\"status-pending\"!=b&&(c.loaded=!0);\"expired\"==b&&(d=!0);f=\nL.Ac(new Uint8Array(e));this.pa.set(f,b)}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.ya&&(this.b[\"delete\"](b),b.close()[\"catch\"](function(){}));ed(this)&&(this.m.resolve(),this.O.R(kd))};function Hc(b){var c=b.pa,d=b.W;d.clear();c.forEach(function(b,c){return d.set(c,b)});c=Array.from(d.values());c.length&&c.every(function(b){return\"expired\"==b})&&b.g(new D(2,6,6014));b.B.qc(nc(d))}\nfunction ld(){function b(b){return t(function h(){var c,f,m;return z(h,function(h){switch(h.j){case 1:return za(h,2),u(h,navigator.requestMediaKeySystemAccess(b,d),4);case 4:return c=h.o,m=(f=c.getConfiguration().sessionTypes)?f.includes(\"persistent-license\"):!1,wc(\"Tizen 3\")&&(m=!1),e.set(b,{persistentState:m}),u(h,c.createMediaKeys(),5);case 5:Ba(h,0);break;case 2:Ca(h),e.set(b,null),w(h)}})})}var c=[{contentType:'video/mp4; codecs=\"avc1.42E01E\"'},{contentType:'video/webm; codecs=\"vp8\"'}],d=[{videoCapabilities:c,\npersistentState:\"required\",sessionTypes:[\"persistent-license\"]},{videoCapabilities:c}],e=new Map;c=\"org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime\".split(\" \").map(function(c){return b(c)});return Promise.all(c).then(function(){return nc(e)})}\nfunction md(b,c){var d=c.audio,e=c.video;if(d&&d.encrypted&&!bd(b,oc(d.mimeType,d.codecs))||e&&e.encrypted&&!bd(b,oc(e.mimeType,e.codecs)))return!1;var f=ad(b.a);return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==f})}\nfunction nd(b,c){if(!b.length)return c;if(!c.length)return b;for(var d=[],e=0;eb.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function rd(b,c,d){d=void 0===d?0:d;return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)||c>b.end(b.length-1)?!1:c+d>=b.start(0)}function sd(b,c){if(!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0))return 0;for(var d=0,e=b.length-1;0<=e&&b.end(e)>c;--e)d+=b.end(e)-Math.max(b.start(e),c);return d}\nfunction td(b){if(!b)return[];for(var c=[],d=0;d>4).toString(16);f+=(h&15).toString(16);d=d.replace(e[0],f)}return d}function Ed(b,c){b.f=!0;b.b=new F;b.g=[];b.c=[];var d=new Uint8Array(c);b.a.push(d);b.a.flush();b.f&&b.b.reject(new D(2,3,3018));return b.b}\nBd.prototype.i=function(b){this.c=b.captions;var c=new Uint8Array(b.data.byteLength+b.initSegment.byteLength);c.set(b.initSegment,0);c.set(b.data,b.initSegment.byteLength);this.g.push(c)};Bd.prototype.h=function(){var b={data:L.concat.apply(null,this.g),captions:this.c};this.b.resolve(b);this.f=!1};function Fd(b,c,d){this.startTime=b;this.direction=Gd;this.endTime=c;this.payload=d;this.region=new Hd;this.position=null;this.positionAlign=Id;this.size=100;this.textAlign=Jd;this.writingMode=Kd;this.lineInterpretation=Ld;this.line=null;this.lineHeight=\"\";this.lineAlign=Md;this.displayAlign=Nd;this.fontSize=this.backgroundImage=this.backgroundColor=this.color=\"\";this.fontWeight=Od;this.fontStyle=Pd;this.fontFamily=\"\";this.textDecoration=[];this.wrapLine=!0;this.id=\"\";this.nestedCues=[];this.spacer=\n!1}A(\"shaka.text.Cue\",Fd);var Id=\"auto\";Fd.positionAlign={LEFT:\"line-left\",RIGHT:\"line-right\",CENTER:\"center\",AUTO:Id};var Jd=\"center\",Qd={LEFT:\"left\",RIGHT:\"right\",CENTER:Jd,START:\"start\",END:\"end\"};Fd.textAlign=Qd;var Nd=\"after\",Rd={BEFORE:\"before\",CENTER:\"center\",AFTER:Nd};Fd.displayAlign=Rd;var Gd=\"ltr\";Fd.direction={HORIZONTAL_LEFT_TO_RIGHT:Gd,HORIZONTAL_RIGHT_TO_LEFT:\"rtl\"};var Kd=\"horizontal-tb\";Fd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Kd,VERTICAL_LEFT_TO_RIGHT:\"vertical-lr\",VERTICAL_RIGHT_TO_LEFT:\"vertical-rl\"};\nvar Ld=0;Fd.lineInterpretation={LINE_NUMBER:Ld,PERCENTAGE:1};var Md=\"start\",Sd={CENTER:\"center\",START:Md,END:\"end\"};Fd.lineAlign=Sd;var Od=400;Fd.fontWeight={NORMAL:Od,BOLD:700};var Pd=\"normal\",Td={NORMAL:Pd,ITALIC:\"italic\",OBLIQUE:\"oblique\"};Fd.fontStyle=Td;Fd.textDecoration={UNDERLINE:\"underline\",LINE_THROUGH:\"lineThrough\",OVERLINE:\"overline\"};\nfunction Hd(){this.id=\"\";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Ud;this.scroll=Vd}A(\"shaka.text.CueRegion\",Hd);var Ud=1;Hd.units={PX:0,PERCENTAGE:Ud,LINES:2};var Vd=\"\";Hd.scrollMode={NONE:Vd,UP:\"up\"};function Wd(b){this.g=null;this.c=b;this.f=this.m=0;this.h=Infinity;this.b=this.a=null;this.l=\"\";this.i=new Map}var Xd={};A(\"shaka.text.TextEngine.registerParser\",function(b,c){Xd[b]=c});A(\"shaka.text.TextEngine.unregisterParser\",function(b){delete Xd[b]});function Yd(b){return Xd[b]||window.muxjs&&\"application/cea-608\"==b?!0:!1}Wd.prototype.destroy=function(){this.c=this.g=null;this.i.clear();return Promise.resolve()};function Zd(b,c){\"application/cea-608\"!=c&&(b.g=new Xd[c])}\nWd.prototype.kc=function(b){var c={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(b),c)[0].startTime}catch(d){throw new D(2,2,2009,d);}};\nfunction $d(b,c,d,e){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==d||null==e)this.g.parseInit(new Uint8Array(c));else{var b={periodStart:this.m,segmentStart:d,segmentEnd:e};b=this.g.parseMedia(new Uint8Array(c),b).filter(function(b){return b.startTime>=this.f&&b.startTime=this.b||(b<=this.a&&c>=this.b?this.a=this.b=null:b<=this.a&&cthis.a&&c>=this.b&&(this.b=b))}.bind(this))};function ae(b,c,d){b.l=c;if(c=b.i.get(c))for(var e=r(c.keys()),f=e.next();!f.done;f=e.next())(f=c.get(f.value).filter(function(b){return b.endTime<=d}))&&b.c.append(f)}\nfunction be(b,c,d,e,f){var g=d+\" \"+e,h=new Map;c=r(c);for(var k=c.next();!k.done;k=c.next()){var l=k.value;k=l.stream;h.has(k)||h.set(k,new Map);h.get(k).has(g)||h.get(k).set(g,[]);l.startTime+=f;l.endTime+=f;l.startTime>=b.f&&l.startTimed.end(0)-d.start(0)?null:1==d.length&&0>d.start(0)?0:d.length?d.start(0):null;return d}function je(b,c){return\"text\"==c?b.a.b:qd(ie(b,c))}function ke(b,c,d){if(\"text\"==c)return b=b.a,null==b.b||b.bc&&(c+=.001);this.b[b].timestampOffset=c;this.xb(b)};q.hg=function(b,c,d){this.b[b].appendWindowStart=0;this.b[b].appendWindowEnd=d;this.b[b].appendWindowStart=c;this.xb(b)};\nq.lg=function(b){this.c[b][0].p.reject(new D(2,3,3014,this.f.error?this.f.error.code:0))};q.xb=function(b){var c=this.c[b][0];c&&(c.p.resolve(),re(this,b))};function me(b,c,d){if(b.u)return Promise.reject();d={start:d,p:new F};b.c[c].push(d);if(1==b.c[c].length)try{d.start()}catch(e){\"QuotaExceededError\"==e.name?d.p.reject(new D(2,3,3017,c)):d.p.reject(new D(2,3,3015,e)),re(b,c)}return d.p}\nfunction qe(b,c){if(b.u)return Promise.reject();var d=[],e;for(e in b.b){var f=new F,g={start:function(b){b.resolve()}.bind(null,f),p:f};b.c[e].push(g);d.push(f);1==b.c[e].length&&g.start()}return Promise.all(d).then(function(){try{c()}catch(l){var b=Promise.reject(new D(2,3,3015,l))}for(var d in this.b)re(this,d);return b}.bind(b),function(b){throw b;}.bind(b))}function re(b,c){b.c[c].shift();var d=b.c[c][0];if(d)try{d.start()}catch(e){d.p.reject(new D(2,3,3015,e)),re(b,c)}};function se(b,c){b=M(b);c=M(c);return b.split(\"-\")[0]==c.split(\"-\")[0]}function te(b,c){b=M(b);c=M(c);var d=b.split(\"-\"),e=c.split(\"-\");return d[0]==e[0]&&1==d.length&&2==e.length}function M(b){var c=b.split(\"-\");b=c[0]||\"\";c=c[1]||\"\";b=b.toLowerCase();b=ue.get(b)||b;return(c=c.toUpperCase())?b+\"-\"+c:b}function ve(b){return b.language?M(b.language):b.audio&&b.audio.language?M(b.audio.language):b.video&&b.video.language?M(b.video.language):\"und\"}\nfunction we(b,c){for(var d=M(b),e=new Set,f=r(c),g=f.next();!g.done;g=f.next())e.add(M(g.value));f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,te(g,d))return g;f=r(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=M(h);k=M(k);h=h.split(\"-\");k=k.split(\"-\");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=r(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,te(d,f))return f;return null}\nvar ue=new Map([[\"aar\",\"aa\"],[\"abk\",\"ab\"],[\"afr\",\"af\"],[\"aka\",\"ak\"],[\"alb\",\"sq\"],[\"amh\",\"am\"],[\"ara\",\"ar\"],[\"arg\",\"an\"],[\"arm\",\"hy\"],[\"asm\",\"as\"],[\"ava\",\"av\"],[\"ave\",\"ae\"],[\"aym\",\"ay\"],[\"aze\",\"az\"],[\"bak\",\"ba\"],[\"bam\",\"bm\"],[\"baq\",\"eu\"],[\"bel\",\"be\"],[\"ben\",\"bn\"],[\"bih\",\"bh\"],[\"bis\",\"bi\"],[\"bod\",\"bo\"],[\"bos\",\"bs\"],[\"bre\",\"br\"],[\"bul\",\"bg\"],[\"bur\",\"my\"],[\"cat\",\"ca\"],[\"ces\",\"cs\"],[\"cha\",\"ch\"],[\"che\",\"ce\"],[\"chi\",\"zh\"],[\"chu\",\"cu\"],[\"chv\",\"cv\"],[\"cor\",\"kw\"],[\"cos\",\"co\"],[\"cre\",\"cr\"],[\"cym\",\"cy\"],[\"cze\",\n\"cs\"],[\"dan\",\"da\"],[\"deu\",\"de\"],[\"div\",\"dv\"],[\"dut\",\"nl\"],[\"dzo\",\"dz\"],[\"ell\",\"el\"],[\"eng\",\"en\"],[\"epo\",\"eo\"],[\"est\",\"et\"],[\"eus\",\"eu\"],[\"ewe\",\"ee\"],[\"fao\",\"fo\"],[\"fas\",\"fa\"],[\"fij\",\"fj\"],[\"fin\",\"fi\"],[\"fra\",\"fr\"],[\"fre\",\"fr\"],[\"fry\",\"fy\"],[\"ful\",\"ff\"],[\"geo\",\"ka\"],[\"ger\",\"de\"],[\"gla\",\"gd\"],[\"gle\",\"ga\"],[\"glg\",\"gl\"],[\"glv\",\"gv\"],[\"gre\",\"el\"],[\"grn\",\"gn\"],[\"guj\",\"gu\"],[\"hat\",\"ht\"],[\"hau\",\"ha\"],[\"heb\",\"he\"],[\"her\",\"hz\"],[\"hin\",\"hi\"],[\"hmo\",\"ho\"],[\"hrv\",\"hr\"],[\"hun\",\"hu\"],[\"hye\",\"hy\"],[\"ibo\",\"ig\"],[\"ice\",\n\"is\"],[\"ido\",\"io\"],[\"iii\",\"ii\"],[\"iku\",\"iu\"],[\"ile\",\"ie\"],[\"ina\",\"ia\"],[\"ind\",\"id\"],[\"ipk\",\"ik\"],[\"isl\",\"is\"],[\"ita\",\"it\"],[\"jav\",\"jv\"],[\"jpn\",\"ja\"],[\"kal\",\"kl\"],[\"kan\",\"kn\"],[\"kas\",\"ks\"],[\"kat\",\"ka\"],[\"kau\",\"kr\"],[\"kaz\",\"kk\"],[\"khm\",\"km\"],[\"kik\",\"ki\"],[\"kin\",\"rw\"],[\"kir\",\"ky\"],[\"kom\",\"kv\"],[\"kon\",\"kg\"],[\"kor\",\"ko\"],[\"kua\",\"kj\"],[\"kur\",\"ku\"],[\"lao\",\"lo\"],[\"lat\",\"la\"],[\"lav\",\"lv\"],[\"lim\",\"li\"],[\"lin\",\"ln\"],[\"lit\",\"lt\"],[\"ltz\",\"lb\"],[\"lub\",\"lu\"],[\"lug\",\"lg\"],[\"mac\",\"mk\"],[\"mah\",\"mh\"],[\"mal\",\"ml\"],[\"mao\",\n\"mi\"],[\"mar\",\"mr\"],[\"may\",\"ms\"],[\"mkd\",\"mk\"],[\"mlg\",\"mg\"],[\"mlt\",\"mt\"],[\"mon\",\"mn\"],[\"mri\",\"mi\"],[\"msa\",\"ms\"],[\"mya\",\"my\"],[\"nau\",\"na\"],[\"nav\",\"nv\"],[\"nbl\",\"nr\"],[\"nde\",\"nd\"],[\"ndo\",\"ng\"],[\"nep\",\"ne\"],[\"nld\",\"nl\"],[\"nno\",\"nn\"],[\"nob\",\"nb\"],[\"nor\",\"no\"],[\"nya\",\"ny\"],[\"oci\",\"oc\"],[\"oji\",\"oj\"],[\"ori\",\"or\"],[\"orm\",\"om\"],[\"oss\",\"os\"],[\"pan\",\"pa\"],[\"per\",\"fa\"],[\"pli\",\"pi\"],[\"pol\",\"pl\"],[\"por\",\"pt\"],[\"pus\",\"ps\"],[\"que\",\"qu\"],[\"roh\",\"rm\"],[\"ron\",\"ro\"],[\"rum\",\"ro\"],[\"run\",\"rn\"],[\"rus\",\"ru\"],[\"sag\",\"sg\"],[\"san\",\n\"sa\"],[\"sin\",\"si\"],[\"slk\",\"sk\"],[\"slo\",\"sk\"],[\"slv\",\"sl\"],[\"sme\",\"se\"],[\"smo\",\"sm\"],[\"sna\",\"sn\"],[\"snd\",\"sd\"],[\"som\",\"so\"],[\"sot\",\"st\"],[\"spa\",\"es\"],[\"sqi\",\"sq\"],[\"srd\",\"sc\"],[\"srp\",\"sr\"],[\"ssw\",\"ss\"],[\"sun\",\"su\"],[\"swa\",\"sw\"],[\"swe\",\"sv\"],[\"tah\",\"ty\"],[\"tam\",\"ta\"],[\"tat\",\"tt\"],[\"tel\",\"te\"],[\"tgk\",\"tg\"],[\"tgl\",\"tl\"],[\"tha\",\"th\"],[\"tib\",\"bo\"],[\"tir\",\"ti\"],[\"ton\",\"to\"],[\"tsn\",\"tn\"],[\"tso\",\"ts\"],[\"tuk\",\"tk\"],[\"tur\",\"tr\"],[\"twi\",\"tw\"],[\"uig\",\"ug\"],[\"ukr\",\"uk\"],[\"urd\",\"ur\"],[\"uzb\",\"uz\"],[\"ven\",\"ve\"],[\"vie\",\n\"vi\"],[\"vol\",\"vo\"],[\"wel\",\"cy\"],[\"wln\",\"wa\"],[\"wol\",\"wo\"],[\"xho\",\"xh\"],[\"yid\",\"yi\"],[\"yor\",\"yo\"],[\"zha\",\"za\"],[\"zho\",\"zh\"],[\"zul\",\"zu\"]]);var N={bd:function(b,c,d){function e(b,c,d){return b>=c&&b<=d}var f=b.video;return f&&f.width&&f.height&&(!e(f.width,c.minWidth,Math.min(c.maxWidth,d.width))||!e(f.height,c.minHeight,Math.min(c.maxHeight,d.height))||!e(f.width*f.height,c.minPixels,c.maxPixels))||b&&b.frameRate&&!e(b.frameRate,c.minFrameRate,c.maxFrameRate)||!e(b.bandwidth,c.minBandwidth,c.maxBandwidth)?!1:!0},Gd:function(b,c,d){var e=!1;b.forEach(function(b){var f=b.allowedByApplication;b.allowedByApplication=N.bd(b,c,d);f!=b.allowedByApplication&&\n(e=!0)});return e},filterNewPeriod:function(b,c,d,e){e.variants=e.variants.filter(function(e){if(b&&b.S&&!md(b,e))return!1;var f=e.audio;e=e.video;return f&&!ee(f)||e&&!ee(e)||f&&c&&!N.Hd(f,c)||e&&d&&!N.Hd(e,d)?!1:!0});e.textStreams=e.textStreams.filter(function(b){return Yd(oc(b.mimeType,b.codecs))})},Hd:function(b,c){return b.mimeType!=c.mimeType||b.codecs.split(\".\")[0]!=c.codecs.split(\".\")[0]?!1:!0},Ed:function(b){var c=b.audio,d=b.video,e=c?c.codecs:null,f=d?d.codecs:null,g=[];f&&g.push(f);e&&\ng.push(e);var h=[];d&&h.push(d.mimeType);c&&h.push(c.mimeType);h=h[0]||null;var k=[];c&&k.push(c.kind);d&&k.push(d.kind);k=k[0]||null;var l=new Set;c&&c.roles.forEach(function(b){return l.add(b)});d&&d.roles.forEach(function(b){return l.add(b)});b={id:b.id,active:!1,type:\"variant\",bandwidth:b.bandwidth,language:b.language,label:null,kind:k,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:h,codecs:g.join(\", \"),audioCodec:e,videoCodec:f,primary:b.primary,roles:Array.from(l),audioRoles:null,\nvideoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null};d&&(b.videoId=d.id,b.originalVideoId=d.originalId,b.width=d.width||null,b.height=d.height||null,b.frameRate=d.frameRate||null,b.pixelAspectRatio=d.pixelAspectRatio||null,b.videoBandwidth=d.bandwidth||null);c&&(b.audioId=c.id,b.originalAudioId=c.originalId,b.channelsCount=c.channelsCount,b.audioSamplingRate=c.audioSamplingRate,b.audioBandwidth=\nc.bandwidth||null,b.label=c.label,b.audioRoles=c.roles);return b},xc:function(b){return{id:b.id,active:!1,type:\"text\",bandwidth:0,language:b.language,label:b.label,kind:b.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:b.mimeType,codecs:b.codecs||null,audioCodec:null,videoCodec:null,primary:b.primary,roles:b.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,\noriginalTextId:b.originalId}},Wc:function(b){b.__shaka_id||(b.__shaka_id=N.yf++);return b.__shaka_id},yf:0,sf:function(b){var c=N.Sd(b);c.active=\"disabled\"!=b.mode;c.type=\"text\";c.originalTextId=b.id;\"captions\"==b.kind&&(c.mimeType=\"application/cea-608\");return c},rf:function(b){var c=N.Sd(b);c.active=b.enabled;c.type=\"variant\";c.originalAudioId=b.id;\"main\"==b.kind?(c.primary=!0,c.roles=[\"main\"],c.audioRoles=[\"main\"]):c.audioRoles=[];return c},Sd:function(b){return{id:N.Wc(b),active:!1,type:\"\",bandwidth:0,\nlanguage:M(b.language),label:b.label,kind:b.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}},rb:function(b){return b.allowedByApplication&&b.allowedByKeySystem},df:function(b){return b.filter(function(b){return N.rb(b)})},\nNd:function(b,c){var d=b.filter(function(b){return b.audio&&b.audio.channelsCount}),e=new Map;d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f.audio.channelsCount;e.has(g)||e.set(g,[]);e.get(g).push(f)}d=Array.from(e.keys());if(0==d.length)return b;f=d.filter(function(b){return b<=c});return f.length?e.get(Math.max.apply(null,f)):e.get(Math.min.apply(null,d))},Jb:function(b,c,d){var e=b,f=b.filter(function(b){return b.primary});f.length&&(e=f);var g=e.length?e[0].language:\"\";e=e.filter(function(b){return b.language==\ng});if(c){var h=we(M(c),b.map(function(b){return b.language}));h&&(e=b.filter(function(b){return M(b.language)==h}))}if(d){if(b=N.Md(e,d),b.length)return b}else if(b=e.filter(function(b){return 0==b.roles.length}),b.length)return b;b=e.map(function(b){return b.roles}).reduce(ud.Gc,[]);return b.length?N.Md(e,b[0]):e},Md:function(b,c){return b.filter(function(b){return b.roles.includes(c)})},Qd:function(b,c,d){for(var e=0;e=f.bandwidth/this.a.bandwidthDowngradeTarget&&c<=g&&(d=f)}this.g=Date.now();return d};O.prototype.chooseVariant=O.prototype.chooseVariant;O.prototype.enable=function(){this.f=!0};\nO.prototype.enable=O.prototype.enable;O.prototype.disable=function(){this.f=!1};O.prototype.disable=O.prototype.disable;O.prototype.segmentDownloaded=function(b,c){var d=this.b;if(!(16E3>c)){var e=8E3*c/b,f=b/1E3;d.a+=c;Za(d.b,f,e);Za(d.c,f,e)}if(null!=this.g&&this.f)a:{if(!this.i){if(!(128E3<=this.b.a))break a;this.i=!0}else if(Date.now()-this.g<1E3*this.a.switchInterval)break a;d=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.h(d)}};\nO.prototype.segmentDownloaded=O.prototype.segmentDownloaded;O.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};O.prototype.getBandwidthEstimate=O.prototype.getBandwidthEstimate;O.prototype.setVariants=function(b){this.c=b};O.prototype.setVariants=O.prototype.setVariants;O.prototype.configure=function(b){this.a=b};O.prototype.configure=O.prototype.configure;\nfunction xe(b,c){b&&(c=c.filter(function(c){return N.bd(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};function ye(b,c){this.a=b;this.b=c}ye.prototype.toString=function(){return\"v\"+this.a+\".\"+this.b};function ze(b,c){var d=new ye(2,6),e=Ae,f=e.a,g=d.b-f.b;(0<(d.a-f.a||g)?e.c:e.b)(e.a,d,b,c)}function Be(b,c,d,e){cb([d,\"has been deprecated and will be removed in\",c,\". We are currently at version\",b,\". Additional information:\",e].join(\" \"))}function Ce(b,c,d,e){bb([d,\"has been deprecated and has been removed in\",c,\". We are now at version\",b,\". Additional information:\",e].join(\"\"))}var Ae=null;var De=\"ended play playing pause pausing ratechange seeked seeking timeupdate volumechange\".split(\" \"),Ee=\"buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume\".split(\" \"),Fe=[\"loop\",\"playbackRate\"],Ge=[\"pause\",\"play\"],He=\"abrstatuschanged adaptation buffering drmsessionupdate emsg error expirationupdated largegap loading manifestparsed onstatechange onstateidle streaming textchanged texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged\".split(\" \"),\nIe={getAssetUri:2,getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},Je={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Ke=[[\"getConfiguration\",\"configure\"]],Le=[[\"isTextTrackVisible\",\"setTextTrackVisibility\"]],\nMe=\"addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay\".split(\" \"),Ne=[\"attach\",\"detach\",\"load\",\"unload\"];\nfunction Oe(b){return JSON.stringify(b,function(b,d){if(\"function\"!=typeof d){if(d instanceof Event||d instanceof I){var c={},f;for(f in d){var g=d[f];g&&\"object\"==typeof g?\"detail\"==f&&(c[f]=g):f in Event||(c[f]=g)}return c}if(d instanceof TimeRanges)for(c={__type__:\"TimeRanges\",length:d.length,start:[],end:[]},f=0;fd?\"-Infinity\":\"Infinity\":d;return c}})}function Pe(b){return JSON.parse(b,function(b,d){return\"NaN\"==d?NaN:\"-Infinity\"==d?-Infinity:\"Infinity\"==d?Infinity:d&&\"object\"==typeof d&&\"TimeRanges\"==d.__type__?Qe(d):d&&\"object\"==typeof d&&\"Uint8Array\"==d.__type__?new Uint8Array(d.entries):d})}function Qe(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}};function Re(b,c,d,e,f,g){this.O=b;this.f=new C(c);this.S=d;this.l=!1;this.F=e;this.K=f;this.B=g;this.b=this.h=!1;this.D=\"\";this.i=null;this.m=this.ce.bind(this);this.s=this.Ff.bind(this);this.a={video:{},player:{}};this.u=0;this.c={};this.g=null;Se.add(this)}var Te=!1,Ue=null;q=Re.prototype;q.destroy=function(){Se[\"delete\"](this);Ve(this);Ue&&We(this);this.f&&(this.f.stop(),this.f=null);this.K=this.F=null;this.b=this.h=!1;this.s=this.m=this.g=this.c=this.a=this.i=null;return Promise.resolve()};\nq.ga=function(){return this.b};q.nd=function(){return this.D};q.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable&&this.O.length){this.h=!0;this.f.yc();var b=new chrome.cast.SessionRequest(this.O);b=new chrome.cast.ApiConfig(b,Xe.bind(this),Ye.bind(this),\"origin_scoped\");chrome.cast.initialize(b,function(){},function(){});Te&&this.f.R(.02);(b=Ue)&&b.status!=chrome.cast.SessionStatus.STOPPED?Ze(this,b):Ue=null}};q.ud=function(b){this.i=b;this.b&&$e({type:\"appData\",appData:this.i})};\nq.cast=function(b){if(!this.h)return Promise.reject(new D(1,8,8E3));if(!Te)return Promise.reject(new D(1,8,8001));if(this.b)return Promise.reject(new D(1,8,8002));this.g=new F;chrome.cast.requestSession(this.kd.bind(this,b),this.be.bind(this));return this.g};q.Kb=function(){this.b&&(Ve(this),Ue&&(We(this),Ue.stop(function(){},function(){}),Ue=null))};\nq.get=function(b,c){if(\"video\"==b){if(Ge.includes(c))return this.le.bind(this,b,c)}else if(\"player\"==b){if(Je[c]&&!this.get(\"player\",\"isLive\")())return function(){};if(Me.includes(c))return this.le.bind(this,b,c);if(Ne.includes(c))return this.Wf.bind(this,b,c);if(Ie[c])return this.ie.bind(this,b,c)}return this.ie(b,c)};q.set=function(b,c,d){this.a[b][c]=d;$e({type:\"set\",targetName:b,property:c,value:d})};\nq.kd=function(b,c){Ue=c;c.addUpdateListener(this.m);c.addMessageListener(\"urn:x-cast:com.google.shaka.v2\",this.s);this.ce();$e({type:\"init\",initState:b,appData:this.i});this.g.resolve()};q.be=function(b){var c=8003;switch(b.code){case \"cancel\":c=8004;break;case \"timeout\":c=8005;break;case \"receiver_unavailable\":c=8006}this.g.reject(new D(2,8,c,b))};q.ie=function(b,c){return this.a[b][c]};\nq.le=function(b,c,d){for(var e=[],f=2;fthis.J.byteLength&&vf();var c=new Uint8Array(this.J.buffer,this.J.byteOffset+this.a,b);this.a+=b;return c};Q.prototype.readBytes=Q.prototype.Za;\nQ.prototype.M=function(b){this.a+b>this.J.byteLength&&vf();this.a+=b};Q.prototype.skip=Q.prototype.M;Q.prototype.me=function(b){this.ab||b>this.J.byteLength)&&vf();this.a=b};Q.prototype.seek=Q.prototype.seek;Q.prototype.md=function(){for(var b=this.a;this.ua()&&0!=this.J.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.J.buffer,this.J.byteOffset+b,this.a-b);this.a+=1;return Bc(b)};\nQ.prototype.readTerminatedString=Q.prototype.md;function vf(){throw new D(2,3,3E3);};function R(){this.c=[];this.b=[];this.a=!1}A(\"shaka.util.Mp4Parser\",R);R.prototype.H=function(b,c){var d=wf(b);this.c[d]=0;this.b[d]=c;return this};R.prototype.box=R.prototype.H;R.prototype.fa=function(b,c){var d=wf(b);this.c[d]=1;this.b[d]=c;return this};R.prototype.fullBox=R.prototype.fa;R.prototype.stop=function(){this.a=!0};R.prototype.stop=R.prototype.stop;\nR.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new Q(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.ua()&&!this.a;)this.sc(0,d,c)};R.prototype.parse=R.prototype.parse;\nR.prototype.sc=function(b,c,d){var e=c.ca(),f=c.G(),g=c.G();switch(f){case 0:f=c.J.byteLength-e;break;case 1:f=c.Bb()}var h=this.b[g];if(h){var k=null,l=null;1==this.c[g]&&(l=c.G(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.J.byteLength&&(g=c.J.byteLength);g-=c.ca();c=0>24&255,b>>16&255,b>>8&255,b&255)}R.typeToString=Af;function Bf(b){var c=this;this.a=[];this.b=[];this.data=[];(new R).H(\"moov\",xf).fa(\"pssh\",function(b){if(!(1=c.data.length)return b;b=[];var d={};c=r(c.data);for(var e=c.next();!e.done;d={lc:d.lc},e=c.next())d.lc=e.value,b.some(function(b){return function(c){return L.za(c,b.lc)}}(d))||b.push(d.lc);return L.concat.apply(L,b instanceof Array?b:Oa(r(b)))};var S={gc:function(b,c){var d=S.P(b,c);return 1!=d.length?null:d[0]},Oc:function(b,c,d){b=S.Od(b,c,d);return 1!=b.length?null:b[0]},P:function(b,c){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.tagName==c})},Od:function(b,c,d){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.localName==d&&b.namespaceURI==c})},getAttributeNS:function(b,c,d){return b.hasAttributeNS(c,d)?b.getAttributeNS(c,d):null},ic:function(b){return Array.prototype.every.call(b.childNodes,\nfunction(b){return b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE})?b.textContent.trim():null},I:function(b,c,d,e){e=void 0===e?null:e;var f=null;b=b.getAttribute(c);null!=b&&(f=d(b));return null==f?e:f},Of:function(b){if(!b)return null;/^\\d+-\\d+-\\d+T\\d+:\\d+:\\d+(\\.\\d+)?$/.test(b)&&(b+=\"Z\");b=Date.parse(b);return isNaN(b)?null:Math.floor(b/1E3)},Ea:function(b){if(!b)return null;b=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(b);\nif(!b)return null;b=31536E3*Number(b[1]||null)+2592E3*Number(b[2]||null)+86400*Number(b[3]||null)+3600*Number(b[4]||null)+60*Number(b[5]||null)+Number(b[6]||null);return isFinite(b)?b:null},uc:function(b){var c=/([0-9]+)-([0-9]+)/.exec(b);if(!c)return null;b=Number(c[1]);if(!isFinite(b))return null;c=Number(c[2]);return isFinite(c)?{start:b,end:c}:null},parseInt:function(b){b=Number(b);return 0===b%1?b:null},tc:function(b){b=Number(b);return 0===b%1&&0 LA_URL\"))?b.textContent:\"\"}\nfunction Gf(b,c,d){var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Df.get(f.ne);if(g){var h;if(h=S.Oc(f.node,\"urn:microsoft:playready\",\"pro\")){h=L.Ba(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),l=h.length,m=k.length+16+l,n=new ArrayBuffer(m),p=new Uint8Array(n);n=new DataView(n);var v=0;n.setUint32(v,m);v+=4;n.setUint32(v,1886614376);v+=4;n.setUint32(v,0);v+=4;p.set(k,v);v+=k.length;n.setUint32(v,l);v+=4;p.set(h,v);h=[{initData:p,\ninitDataType:\"cenc\",keyId:f.keyId}]}else h=null;h=wd(g,f.init||b||h);if(g=Kf.get(g))h.licenseServerUri=g(f);e.push(h)}else for(f=c(f.node)||[],f=r(f),g=f.next();!g.done;g=f.next())e.push(g.value)}return e}\nvar Kf=(new Map).set(\"com.widevine.alpha\",function(b){return(b=S.Oc(b.node,\"urn:microsoft\",\"laurl\"))?b.getAttribute(\"licenseUrl\")||\"\":\"\"}).set(\"com.microsoft.playready\",function(b){b=S.Oc(b.node,\"urn:microsoft:playready\",\"pro\");if(!b)return\"\";b=L.Ba(b.textContent);b=If(b.buffer).filter(function(b){return 1===b.type})[0];if(!b)return\"\";b=hc(b.value,!0);return(b=S.he(b,\"WRMHEADER\"))?Jf(b):\"\"});function Ff(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())(d=Lf(d.value))&&c.push(d);return c}\nfunction Lf(b){var c=b.getAttribute(\"schemeIdUri\"),d=S.getAttributeNS(b,\"urn:mpeg:cenc:2013\",\"default_KID\"),e=S.Od(b,\"urn:mpeg:cenc:2013\",\"pssh\").map(S.ic);if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,\"\").toLowerCase(),d.includes(\" \")))throw new D(2,4,4009);var f=[];try{f=e.map(function(b){return{initDataType:\"cenc\",initData:L.Ba(b),keyId:null}})}catch(g){throw new D(2,4,4007);}return{node:b,ne:c,keyId:d,init:0v)if(p+1=v)break;v=Math.ceil((v-x)/B)-1}else{if(Infinity==l)break;else if(x/f>=l)break;v=Math.ceil((l*f-x)/B)-1}0>>31;m&=2147483647;var p=e.reader.G();e.reader.M(4);if(1==n)throw new D(2,3,3006);f.push(new T(f.length,h/g-c,(h+p)/g-c,function(){return d},b,b+m-1));h+=p;b+=m}e.parser.stop();return f};function U(b){this.a=b}A(\"shaka.media.SegmentIndex\",U);U.prototype.destroy=function(){this.a=null;return Promise.resolve()};U.prototype.destroy=U.prototype.destroy;U.prototype.find=function(b){for(var c=this.a.length-1;0<=c;--c){var d=this.a[c];if(b>=d.startTime&&bb||b>=this.a.length?null:this.a[b]};U.prototype.get=U.prototype.get;U.prototype.offset=function(b){for(var c=0;cg.startTime?0==d&&c.push(g):(.1b){this.a.splice(0,c);return}this.a=[]};U.prototype.evict=U.prototype.Lc;function Vf(b,c){for(;b.a.length;)if(b.a[b.a.length-1].startTime>=c)b.a.pop();else break;for(;b.a.length;)if(0>=b.a[0].endTime)b.a.shift();else break;if(0!=b.a.length){var d=b.a[b.a.length-1];b.a[b.a.length-1]=new T(d.position,d.startTime,c,d.c,d.b,d.a)}};function Wf(b){this.b=b;this.a=new Q(b,0);Xf||(Xf=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var Xf;Wf.prototype.ua=function(){return this.a.ua()};\nfunction Yf(b){var c=Zf(b);if(7=d&&!(c&1<<8-d);d++);if(8b||d&&b>=d?null:Math.floor(b/e)},getSegmentReference:function(b){var c=b*e,n=c+e;d&&(n=Math.min(n,d));return 0>n||d&&c>=d?null:new T(b,c,n,function(){var d=Mf(h,l,b+f,k,c*g);return vd(m,[d])},0,null)}}}\nfunction qg(b,c){for(var d=[],e=0;eb.s||b.i.R(Math.max(3,b.s-c,$a(b.u)))}\nfunction Ag(b,c,d){c=c||{contentType:\"\",mimeType:\"\",codecs:\"\",emsgSchemeIdUris:[],frameRate:void 0,gd:null,audioSamplingRate:null};d=d||c.qa;var e=S.yb,f=S.Me,g=S.P(b,\"BaseURL\").map(S.ic),h=b.getAttribute(\"contentType\")||c.contentType,k=b.getAttribute(\"mimeType\")||c.mimeType,l=b.getAttribute(\"codecs\")||c.codecs;f=S.I(b,\"frameRate\",f)||c.frameRate;var m=b.getAttribute(\"par\")||c.pixelAspectRatio,n=S.P(b,\"InbandEventStream\"),p=c.emsgSchemeIdUris.slice();n=r(n);for(var v=n.next();!v.done;v=n.next())v=\nv.value.getAttribute(\"schemeIdUri\"),p.includes(v)||p.push(v);n=S.P(b,\"AudioChannelConfiguration\");n=Fg(n)||c.gd;v=S.I(b,\"audioSamplingRate\",e)||c.audioSamplingRate;h||(h=Dg(k,l));return{qa:vd(d,g),Ub:S.gc(b,\"SegmentBase\")||c.Ub,La:S.gc(b,\"SegmentList\")||c.La,Wb:S.gc(b,\"SegmentTemplate\")||c.Wb,width:S.I(b,\"width\",e)||c.width,height:S.I(b,\"height\",e)||c.height,contentType:h,mimeType:k,codecs:l,frameRate:f,pixelAspectRatio:m,emsgSchemeIdUris:p,id:b.getAttribute(\"id\"),gd:n,audioSamplingRate:v}}\nfunction Fg(b){for(var c=0;c>=1;return b}}}return null}function Eg(b){var c=b.Ub?1:0;c+=b.La?1:0;c+=b.Wb?1:0;if(0==c)return\"text\"==b.contentType||\"application\"==b.contentType?!0:!1;1!=c&&(b.Ub&&(b.La=null),b.Wb=null);return!0}\nfunction Gg(b,c,d,e){c=vd(c,[d]);c=Wb(c,b.a.retryParameters);c.method=e;c=b.b.networkingEngine.request(4,c);Tb(b.g,c);return c.promise.then(function(b){if(\"HEAD\"==e){if(!b.headers||!b.headers.date)return 0;b=b.headers.date}else b=Bc(b.data);b=Date.parse(b);return isNaN(b)?0:b-Date.now()})}\nfunction zg(b,c,d){d=d.map(function(b){return{scheme:b.getAttribute(\"schemeIdUri\"),value:b.getAttribute(\"value\")}});var e=b.a.dash.clockSyncUri;!d.length&&e&&d.push({scheme:\"urn:mpeg:dash:utc:http-head:2014\",value:e});return ud.Ke(d,function(b){var d=b.scheme;b=b.value;switch(d){case \"urn:mpeg:dash:utc:http-head:2014\":case \"urn:mpeg:dash:utc:http-head:2012\":return Gg(this,c,b,\"HEAD\");case \"urn:mpeg:dash:utc:http-xsdate:2014\":case \"urn:mpeg:dash:utc:http-iso:2014\":case \"urn:mpeg:dash:utc:http-xsdate:2012\":case \"urn:mpeg:dash:utc:http-iso:2012\":return Gg(this,\nc,b,\"GET\");case \"urn:mpeg:dash:utc:direct:2014\":case \"urn:mpeg:dash:utc:direct:2012\":return d=Date.parse(b),isNaN(d)?0:d-Date.now();case \"urn:mpeg:dash:utc:http-ntp:2014\":case \"urn:mpeg:dash:utc:ntp:2014\":case \"urn:mpeg:dash:utc:sntp:2014\":return cb(\"NTP UTCTiming scheme is not supported\"),Promise.reject();default:return cb(\"Unrecognized scheme in UTCTiming element\",d),Promise.reject()}}.bind(b))[\"catch\"](function(){cb(\"A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!\");\nreturn 0})}q.Pf=function(b,c,d){var e=S.yb,f=d.getAttribute(\"schemeIdUri\")||\"\",g=d.getAttribute(\"value\")||\"\",h=S.I(d,\"timescale\",e)||1;S.P(d,\"Event\").forEach(function(d){var k=S.I(d,\"presentationTime\",e)||0,m=S.I(d,\"duration\",e)||0;k=k/h+b;m=k+m/h;null!=c&&(k=Math.min(k,b+c),m=Math.min(m,b+c));d={schemeIdUri:f,value:g,startTime:k,endTime:m,id:d.getAttribute(\"id\")||\"\",eventElement:d};this.b.onTimelineRegionAdded(d)}.bind(this))};\nq.Zf=function(b,c,d){b=rg(b,c,d,this.a.retryParameters);b=this.b.networkingEngine.request(1,b);Tb(this.g,b);return b.promise.then(function(b){return b.data})};function Dg(b,c){return Yd(oc(b,c))?\"text\":b.split(\"/\")[0]}V.pd(\"mpd\",sg);V.Cb(\"application/dash+xml\",sg);V.Cb(\"video/vnd.mpeg.dash.mpd\",sg);function Hg(b,c,d,e){this.b=b;this.type=c;this.a=d;this.segments=e||null}function Ig(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=void 0===e?null:e}Ig.prototype.toString=function(){function b(b){return b.name+\"=\"+(isNaN(Number(b.value))?'\"'+b.value+'\"':b.value)}var c=\"#\"+this.name,d=this.a?this.a.map(b):[];this.value&&d.unshift(this.value);0c.length||\"data\"!=c[0])throw new D(2,1,1004,b);c=c.slice(1).join(\":\").split(\",\");if(2>c.length)throw new D(2,1,1004,b);var d=c[0];c=window.decodeURIComponent(c.slice(1).join(\",\"));d=d.split(\";\");var e=null;1x.dd&&(x.stream.presentationTimeOffset=-v,x.Vb.offset(v))}else for(b.c.xa(l),b.c.offset(-h),y=r(b.b.values()),E=y.next();!E.done;E=y.next())B=E.value,B.stream.presentationTimeOffset=\nh,B.Vb.offset(-h),Vf(B.Vb,l);b.m={presentationTimeline:b.c,periods:[g],offlineSessionIds:[],minBufferTime:0};w(e)}})})}\nfunction gh(b,c){return t(function e(){var f,g,h,k,l,m,n,p,v,x,B,y;return z(e,function(e){switch(e.j){case 1:return f=Mg,g=ud,h=c.a,k=f.nb(c.a,\"EXT-X-MEDIA\"),l=k.filter(function(b){return\"SUBTITLES\"==ih(b,\"TYPE\")}.bind(b)),m=l.map(function(b){var c=this;return t(function ba(){var e;return z(ba,function(f){switch(f.j){case 1:if(c.a.disableText)return f[\"return\"](null);za(f,2);return u(f,jh(c,b),4);case 4:return f[\"return\"](f.o);case 2:e=Ca(f);if(c.a.hls.ignoreTextStreamFailures)return f[\"return\"](null);\nthrow e;}})})}.bind(b)),n=k.filter(function(b){return\"CLOSED-CAPTIONS\"==ih(b,\"TYPE\")}),kh(b,n),u(e,Promise.all(m),2);case 2:return p=e.o,v=f.nb(h,\"EXT-X-STREAM-INF\"),x=v.map(function(b){return lh(this,b,c)}.bind(b)),u(e,Promise.all(x),3);case 3:return B=e.o,y=B.reduce(g.Gc,[]),y=y.filter(function(b){return null!=b}),e[\"return\"]({startTime:0,variants:y,textStreams:p.filter(function(b){return null!=b})})}})})}\nfunction lh(b,c,d){return t(function f(){var g,h,k,l,m,n,p,v,x,B,y,G,E,aa,sa,ba,ub,Ua,X,oa,ha,Ka,Da,Ea,vb,eb,fb;return z(f,function(f){switch(f.j){case 1:g=xd;h=Mg;k=Kg(c,\"CODECS\",\"avc1.42E01E,mp4a.40.2\");l=mh(k.split(/\\s*,\\s*/));m=c.getAttribute(\"RESOLUTION\");p=n=null;v=Kg(c,\"FRAME-RATE\");x=Number(ih(c,\"BANDWIDTH\"));m&&(B=m.value.split(\"x\"),n=B[0],p=B[1]);y=h.nb(d.a,\"EXT-X-MEDIA\");y=y.filter(function(b){return\"CLOSED-CAPTIONS\"!=ih(b,\"TYPE\")});y=y.filter(function(b){var c=Kg(b,\"URI\")||\"\";return\"SUBTITLES\"==\n(Kg(b,\"TYPE\")||\"\")||\"\"!=c});G=Kg(c,\"AUDIO\");E=Kg(c,\"VIDEO\");G?y=h.Pc(y,\"AUDIO\",G):E&&(y=h.Pc(y,\"VIDEO\",E));if(aa=nh(g.ra,l)){if(sa=Kg(c,\"SUBTITLES\"))if(ba=h.Pc(y,\"SUBTITLES\",sa),ba.length&&(ub=b.D.get(ba[0].id)))ub.stream.codecs=aa;Pb(l,aa)}Ua=y.map(function(b){return oh(this,b,l)}.bind(b));X=[];oa=[];return u(f,Promise.all(Ua),2);case 2:Ka=f.o;Ka=Ka.filter(function(b){return null!=b});G?X=Ka:E&&(oa=Ka);Ea=!1;X.length||oa.length?X.length?(eb=ih(c,\"URI\"),fb=X[0].Bc,eb==fb?(Da=g.Eb,Ea=!0):Da=g.Pa):\nDa=g.Eb:1==l.length?(vb=nh(g.Pa,l),Da=m||v||vb?g.Pa:g.Eb):(Da=g.Pa,l=[l.join(\",\")]);if(Ea){f.A(3);break}return u(f,ph(b,c,l,Da),4);case 4:ha=f.o;case 3:if(ha)ha.stream.type==g.Eb?X=[ha]:oa=[ha];else if(null===ha)return f[\"return\"]([]);oa&&qh(oa);X&&qh(X);return f[\"return\"](rh(b,X,oa,x,n,p,v))}})})}function qh(b){b.forEach(function(b){if(b){var c=b.stream.codecs.split(\",\");c=c.filter(function(b){return\"mp4a.40.34\"!=b});b.stream.codecs=c.join(\",\")}})}\nfunction rh(b,c,d,e,f,g,h){d.forEach(function(b){if(b=b.stream)b.width=Number(f)||void 0,b.height=Number(g)||void 0,b.frameRate=Number(h)||void 0}.bind(b));var k=b.a?b.a.disableAudio:!1;if(!c.length||k)c=[null];k=b.a?b.a.disableVideo:!1;if(!d.length||k)d=[null];k=[];c=r(c);for(var l=c.next();!l.done;l=c.next()){l=l.value;for(var m=r(d),n=m.next();!n.done;n=m.next()){var p=n.value;n=l?l.stream:null;var v=p?p.stream:null,x=l?l.drmInfos:null,B=p?p.drmInfos:null;p=(p?p.Bc:\"\")+\" - \"+(l?l.Bc:\"\");var y=\nvoid 0;if(n&&v)if(x.length&&B.length?0>4,0!=g&&2!=g||e(),3==g&&(g=d.la(),d.M(g)),1!=d.G()>>8)d.seek(f+188),g=d.la(),71!=g&&(d.seek(f+192),g=d.la()),71!=g&&(d.seek(f+204),g=d.la()),71!=g&&e(),d.me(1);else return d.M(3),f=d.la()>>6,0!=f&&1!=f||e(),0==d.la()&&e(),f=d.la(),g=d.Tb(),d=d.Tb(),(1073741824*((f&14)>>1)+((g&65534)<<14|(d&65534)>>1))/9E4}\nfunction Gh(b,c,d){b=oc(b,c);if(!Yd(b))return 0;c=new Wd(null);Zd(c,b);return c.kc(d)}function mh(b){var c=new Set,d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=rc(e)[0];c.has(f)||(d.push(e),c.add(f))}return d}function nh(b,c){for(var d=Hh[b],e=0;ef-.5)){c=!0;break a}}c=!1}return c};function fi(b,c,d,e,f){var g=this;this.a=b;this.u=c;this.s=d;this.l=f;this.f=new K;this.i=!1;this.m=b.readyState;this.c=!1;this.b=e;this.h=!1;this.f.w(b,\"waiting\",function(){return gi(g)});this.g=(new C(function(){gi(g)})).Na(.25)}fi.prototype.release=function(){this.f&&(this.f.release(),this.f=null);null!=this.g&&(this.g.stop(),this.g=null);this.b&&(this.b.release(),this.b=null);this.a=this.u=this.l=null};fi.prototype.jd=function(){this.h=!0;gi(this)};\nfunction gi(b){if(0!=b.a.readyState){if(b.a.seeking){if(!b.i)return}else b.i=!1;if(!b.a.paused){b.a.readyState!=b.m&&(b.c=!1,b.m=b.a.readyState);var c=b.s.smallGapLimit,d=b.a.currentTime,e=b.a.buffered;a:{if(e&&e.length&&!(1==e.length&&1E-6>e.end(0)-e.start(0))){var f=wc(\"Edge/\")||wc(\"Trident/\")||wc(\"Tizen\")||wc(\"CrKey\")?.5:.1;for(var g=0;gd&&(0==g||e.end(g-1)-d<=f)){f=g;break a}}f=null}if(null==f){if(b.b){b=b.b;e=b.g;d=ci(e);f=e.a.currentTime;g=Date.now()/1E3;if(b.a!=\nf||b.h!=d)b.f=g,b.a=f,b.h=d,b.b=!1;f=g-b.f;f>=b.i&&d&&!b.b&&(b.c(b.a,f),b.b=!0,b.a=e.a.currentTime)}}else if(0!=f||b.h){g=e.start(f);var h=b.u.Ca();if(!(g>=h)){h=g-d;c=h<=c;var k=!1;.001>h||(c||b.c||(b.c=!0,d=new I(\"largegap\",{currentTime:d,gapSize:h}),d.cancelable=!0,b.l(d),b.s.jumpLargeGaps&&!d.defaultPrevented&&(k=!0)),!c&&!k)||(0!=f&&e.end(f-1),b.a.currentTime=g)}}}}};function hi(b){var c=this;this.c=b;this.a=new Set;this.b=(new C(function(){ii(c,!1)})).Na(.25)}hi.prototype.release=function(){this.b.stop();for(var b=r(this.a),c=b.next();!c.done;c=b.next())c.value.release();this.a.clear()};function ii(b,c){for(var d=r(b.a),e=d.next();!e.done;e=d.next())e.value.g(b.c.currentTime,c)};function ji(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next()){d=r(d.value.variants);for(var e=d.next();!e.done;e=d.next())c.push(e.value)}return c}function ki(b,c){for(var d=null,e=r(b),f=e.next();!f.done;f=e.next())f=f.value,c>=f.startTime&&(d=f);return d};function li(b){this.c=b;this.a=null;this.b=function(){}}li.prototype.release=function(){this.a=this.c=null;this.b=function(){}};li.prototype.g=function(b){var c=this.a,d=this.c.periods;b=ki(d,b)||d[0];c!=b&&this.b(b);this.a=b};function mi(b,c){b.b=c};function ni(b){var c=this;this.a=b;this.f=!1;this.c=this.a.jc();this.b=new C(function(){c.a.Yd(.25*c.c)})}ni.prototype.release=function(){this.b&&(this.b.stop(),this.b=null);this.a=null};ni.prototype.set=function(b){this.c=b;oi(this)};function oi(b){b.b.stop();var c=b.f?0:b.c;if(0<=c)try{b.a.jc()!=c&&b.a.wd(c);return}catch(d){}b.b.Na(.25);0!=b.a.jc()&&b.a.wd(0)};function pi(b,c,d){this.a=b;this.f=c;this.g=d;this.h=!1;this.b=new K;this.c=new qi(b);0Math.abs(b.a.currentTime-c)?ui(b):(b.b.da(b.a,\"seeking\",function(){ui(b)}),vi(b.c,0==b.a.currentTime?c:b.a.currentTime))}function ui(b){b.h=!0;b.b.w(b.a,\"seeking\",function(){return b.f()})}function qi(b){var c=this;this.b=b;this.h=10;this.g=this.f=this.c=0;this.a=new C(function(){0>=c.c?c.a.stop():c.b.currentTime!=c.f?c.a.stop():(c.b.currentTime=c.g,c.c--)})}qi.prototype.release=function(){this.a&&(this.a.stop(),this.a=null);this.b=null};\nfunction vi(b,c){b.f=b.b.currentTime;b.g=c;b.c=b.h;b.b.currentTime=c;b.a.Na(.1)};function wi(b){function c(){null==d.c?d.f=!0:(d.b.da(d.a,\"seeking\",function(){d.f=!0}),d.a.currentTime=Math.max(0,d.a.currentTime+d.c))}var d=this;this.a=b;this.f=!1;this.c=null;this.b=new K;0==this.a.readyState?this.b.da(this.a,\"loadeddata\",c):c()}wi.prototype.release=function(){this.b&&(this.b.release(),this.b=null);this.a=null};wi.prototype.m=function(b){this.c=this.f?this.c:b};wi.prototype.h=function(){return(this.f?this.a.currentTime:this.c)||0};wi.prototype.s=function(){};\nfunction xi(b,c,d,e,f,g){var h=this;this.b=b;this.a=c.presentationTimeline;this.B=c.minBufferTime||0;this.g=d;this.u=f;this.l=null;this.f=new fi(b,c.presentationTimeline,d,yi(b,d),g);this.c=new pi(b,function(){a:{var b=h.f;b.i=!0;b.h=!1;b.c=!1;var c=ti(h.c);b=zi(h,c);if(.001d-c&&(c=d-3);bb.a.Y()?b.a.ob():b.a.Ca():0>c&&(c=b.a.Ca()+c);return Ci(b,Bi(b,c))}xi.prototype.s=function(){this.f.jd()};function Ci(b,c){var d=b.a.Y();return c>=d?d-b.g.durationBackoff:c}function zi(b,c){var d=rd.bind(null,b.b.buffered),e=Math.max(b.B,b.g.rebufferingGoal),f=b.g.safeSeekOffset,g=b.a.ob(),h=b.a.Ca(),k=b.a.Y();3>h-g&&(g=h-3);var l=b.a.Nb(e),m=b.a.Nb(f);e=b.a.Nb(e+f);return c>=k?Ci(b,c):c>h?h:c=l||d(c)?c:e}\nfunction Bi(b,c){var d=b.a.ob();if(cd?d:c}function yi(b,c){if(!c.stallEnabled)return null;var d=c.stallSkip,e=new bi(new ei(b),c.stallThreshold);di(e,function(){b.currentTime+=d});return e};function Di(){this.b=function(){};this.a=new Set}Di.prototype.release=function(){this.b=function(){};this.a.clear()};function Ei(b,c){b.b=c};function Fi(b){var c=this;this.h=b;this.f=new Map;this.a=function(){};this.b=function(){};this.c=function(){};this.i=[{eb:null,cb:Gi,Wa:function(b,e){return c.a(b,e)}},{eb:Hi,cb:Gi,Wa:function(b,e){return c.a(b,e)}},{eb:Ii,cb:Gi,Wa:function(b,e){return c.a(b,e)}},{eb:Gi,cb:Hi,Wa:function(b,e){return c.b(b,e)}},{eb:Gi,cb:Ii,Wa:function(b,e){return c.b(b,e)}},{eb:Hi,cb:Ii,Wa:function(b,e){return c.c(b,e)}},{eb:Ii,cb:Hi,Wa:function(b,e){return c.c(b,e)}}]}\nFi.prototype.release=function(){this.h=null;this.f.clear();this.a=function(){};this.b=function(){};this.c=function(){}};Fi.prototype.g=function(b,c){for(var d=r(this.h.a),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.f.get(e),g=be.endTime?Ii:Gi;this.f.set(e,g);for(var h=r(this.i),k=h.next();!k.done;k=h.next())k=k.value,k.eb==f&&k.cb==g&&k.Wa(e,c)}};function Ji(b,c,d,e){b.a=c;b.b=d;b.c=e}var Hi=1,Gi=2,Ii=3;function Ki(b,c){this.a=c;this.c=b;this.g=null;this.l=1;this.u=Promise.resolve();this.h=[];this.i=new Map;this.b=new Map;this.s=!1;this.F=null;this.D=this.f=this.m=!1;this.B=0}Ki.prototype.destroy=function(){for(var b=r(this.b.values()),c=b.next();!c.done;c=b.next())Li(c.value);this.b.clear();this.i.clear();this.g=this.h=this.u=this.c=this.a=null;this.f=!0;return Promise.resolve()};\nKi.prototype.configure=function(b){this.g=b;this.F=new Ab({maxAttempts:Math.max(b.retryParameters.maxAttempts,2),baseDelay:b.retryParameters.baseDelay,backoffFactor:b.retryParameters.backoffFactor,fuzzFactor:b.retryParameters.fuzzFactor,timeout:0},!0)};\nKi.prototype.start=function(){var b=this;return t(function d(){var e,f,g;return z(d,function(d){switch(d.j){case 1:return e=b.a.Ua(),f=Mi(b,e),g=b.a.ae(b.c.periods[f]),g.variant||g.text?u(d,Ni(b,g.variant?g.variant.audio:null,g.variant?g.variant.video:null,g.text,e),2):d[\"return\"](new D(2,5,5005));case 2:if(b.f)return d[\"return\"]();b.a&&b.a.Cf&&b.a.Cf();w(d)}})})};function Oi(b){return Pi(b,\"audio\")}function Qi(b){return Pi(b,\"video\")}\nfunction Pi(b,c){var d=b.b.get(c);return d?d.Ka||d.stream:null}\nfunction Ri(b,c){return t(function e(){var f,g,h,k,l,m,n,p,v,x;return z(e,function(e){switch(e.j){case 1:return f=xd,u(e,oe(b.a.L,f.ra),2);case 2:return b.B++,b.D=!1,g=b.B,h=b.a.L,k=new Map,l=new Set,k.set(f.ra,c),l.add(c),u(e,h.init(k,!1),3);case 3:return b.f?e[\"return\"]():u(e,Si(b,l),4);case 4:if(b.f)return e[\"return\"]();n=(m=b.a.L.g.isTextVisible())||b.g.alwaysStreamText;b.B!=g||b.b.has(f.ra)||b.D||!n||(p=b.a.Ua(),v=Mi(b,p),x=Ti(c,v,0),b.b.set(f.ra,x),Ui(b,x,0));w(e)}})})}\nfunction Vi(b,c){var d=b.b.get(\"video\");if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.Ka&&(Wi(b,f,!1,0,!1),d.Ka=e)}else if(e=d.Ka)d.Ka=null,Wi(b,e,!0,0,!1)}}function Xi(b,c,d,e){var f=!1;if(c.video){var g=Wi(b,c.video,d,e,!1);f=f||g}c.audio&&(b=Wi(b,c.audio,d,e,!1),f=f||b);return f}\nfunction Wi(b,c,d,e,f){var g=b.b.get(c.type);if(!g&&\"text\"==c.type&&b.g.ignoreTextStreamFailures)return Ri(b,c),!0;if(!g)return!1;var h=Yi(b,c),k=Array.from(b.b.values()).every(function(b){return b.ia==g.ia});if(d&&h!=g.ia&&k)return b.b.forEach(function(c){Zi(b,c)}),!0;g.Ka&&(c.trickModeVideo?(g.Ka=c,c=c.trickModeVideo):g.Ka=null);k=b.h[h];if(!k||!k.Db)return!1;k=b.i.get(c.id);if(!k||!k.Db||g.stream==c&&!f)return!1;\"text\"==c.type&&fe(b.a.L,oc(c.mimeType,c.codecs));g.stream=c;g.nc=!0;$i(b,g,h)&&g.Rb.abort();\nd&&(g.Ra?g.Cc=!0:g.Ja?(g.Oa=!0,g.dc=e,g.Cc=!0):(Li(g),aj(b,g,!0,e)[\"catch\"](function(c){if(b.a)b.a.onError(c)})));return!0}function $i(b,c,d){if(!c.Rb)return!1;var e=b.a.Ua(),f=je(b.a.L,c.type),g=bj(b,c,e,f,d);d=g?g.a?g.a-g.b:null:null;g&&!d&&(d=(g.endTime-g.kc())*c.stream.bandwidth/8);if(isNaN(d))return!1;(g=c.stream.initSegmentReference)&&(d+=(g.a?g.a-g.b:null)||0);g=b.a.getBandwidthEstimate();return 8*d/gd?!0:!1}\nfunction cj(b){function c(c){var f=b.a.L;\"text\"==c?(c=f.a,c=null==c.a||null==c.b?!1:d>=c.a&&dc?b.a.L.xa(c):b.a.L.xa(Math.pow(2,32))}\nfunction fj(b,c){if(!b.f&&!c.Ja&&null!=c.Ga&&!c.Ra)if(c.Ga=null,c.Oa)aj(b,c,c.Cc,c.dc);else{try{var d=gj(b,c);null!=d&&(Ui(b,c,d),c.Pb=!1)}catch(e){hj(b,e);return}d=Array.from(b.b.values());ij(b,c);b.s&&d.every(function(b){return b.endOfStream})&&b.a.L.endOfStream().then(function(){if(!this.f){var b=this.a.L.Y();0!=b&&b=b.c.presentationTimeline.Y())return c.endOfStream=!0,\"video\"==c.type&&(e=b.b.get(\"text\"))&&\"application/cea-608\"==e.stream.mimeType&&(e.endOfStream=!0),null;c.endOfStream=!1;c.ia=g;if(g!=f)return null;if(h>=k)return.5;g=je(b.a.L,c.type);g=bj(b,c,d,g,f);if(!g)return 1;var l=\nInfinity;Array.from(b.b.values()).forEach(function(c){jj(c)||(c=kj(b,c,d),l=Math.min(l,c))});if(e>=l+b.c.presentationTimeline.a)return 1;c.rd=0;lj(b,c,d,f,g);return null}function kj(b,c,d){if(!c.sb||!c.Da)return Math.max(d,c.rd);d=Yi(b,c.sb);return b.c.periods[d].startTime+c.Da.endTime}\nfunction bj(b,c,d,e,f){if(c.Da&&c.stream==c.sb)return mj(b,c,f,c.Da.position+1);c.Da?(d=Yi(b,c.sb),d=c.stream.findSegmentPosition(Math.max(0,b.c.periods[d].startTime+c.Da.endTime-b.c.periods[f].startTime))):d=c.stream.findSegmentPosition(Math.max(0,(e||d)-b.c.periods[f].startTime));if(null==d)return null;var g=null;null==e&&(g=mj(b,c,f,Math.max(0,d-1)));return g||mj(b,c,f,d)}\nfunction mj(b,c,d,e){d=b.c.periods[d];c=c.stream.getSegmentReference(e);if(!c)return null;e=b.c.presentationTimeline;b=e.Ob();e=e.pb();return d.startTime+c.endTimee?null:c}\nfunction lj(b,c,d,e,f){var g=b.c.periods[e],h=c.stream,k=b.c.presentationTimeline.Y(),l=b.c.periods[e+1];e=nj(b,c,e,Math.max(0,g.startTime-.1),l?l.startTime+.01:k);c.Ja=!0;c.nc=!1;k=oj(b,c,f);Promise.all([e,k]).then(function(b){if(!this.f&&!this.m)return pj(this,c,d,g,h,f,b[1])}.bind(b)).then(function(){this.f||this.m||(c.Ja=!1,c.od=!1,c.Oa||this.a.jd(),Ui(this,c,0),qj(this,h))}.bind(b))[\"catch\"](function(b){this.f||this.m||(c.Ja=!1,\"text\"==c.type&&this.g.ignoreTextStreamFailures?this.b[\"delete\"](\"text\"):\n7001==b.code?(c.Ja=!1,c.Ga=null,Ui(this,c,0)):3017==b.code?rj(this,c,b):(c.Pb=!0,b.severity=2,hj(this,b)))}.bind(b))}function rj(b,c,d){if(!Array.from(b.b.values()).some(function(b){return b!=c&&b.od})){var e=Math.round(100*b.l);if(20=d?Promise.resolve():b.a.L.remove(c.type,f,f+d).then(function(){}.bind(b))}\nfunction qj(b,c){if(!b.s){var d=Array.from(b.b.values());if(1!=d.length||\"text\"!=d[0].type)b.s=d.every(function(b){return\"text\"==b.type?!0:!b.Oa&&!b.Ra&&b.Da});if(b.s){d=Yi(b,c);b.h[d]||ej(b,d).then(function(){this.f||this.a.$d()}.bind(b))[\"catch\"](ud.oc);for(d=0;d=d&&202!=d)return{uri:f||e,ld:e,data:c,headers:b,fromCache:!!b[\"x-shaka-from-cache\"]};f=null;try{f=Dc(c)}catch(h){}throw new D(401==d||403==d?2:1,1,1001,e,d,f,b,g);};function vj(b,c,d,e){var f=new vj.b;mc(c.headers).forEach(function(b,c){f.append(c,b)});var g=new vj.a,h={Id:!1,te:!1};b=vj.l(b,d,{body:c.body||void 0,headers:f,method:c.method,signal:g.signal,credentials:c.allowCrossSiteCredentials?\"include\":void 0},h,e);b=new H(b,function(){h.Id=!0;g.abort();return Promise.resolve()});if(c=c.retryParameters.timeout){var k=new C(function(){h.te=!0;g.abort()});k.R(c/1E3);b[\"finally\"](function(){k.stop()})}return b}A(\"shaka.net.HttpFetchPlugin\",vj);\nvj.l=function(b,c,d,e,f){return t(function h(){var k,l,m,n,p,v,x,B,y,G,E,aa,sa,ba;return z(h,function(h){switch(h.j){case 1:return k=vj.g,l=vj.c,v=p=0,x=Date.now(),za(h,2),u(h,k(b,d),4);case 4:return m=h.o,B=m.clone().body.getReader(),G=(y=m.headers.get(\"Content-Length\"))?parseInt(y,10):0,E=function(b){function c(){return t(function ha(){var d,e;return z(ha,function(h){switch(h.j){case 1:return za(h,2),u(h,B.read(),4);case 4:d=h.o;Ba(h,3);break;case 2:return Ca(h),h[\"return\"]();case 3:d.done||(p+=\nd.value.byteLength);e=Date.now();if(100c;if(!n||!p){f.A(3);break}return u(f,k.updateManifestExpiration(g.key(),c),3);case 3:return Fa(f),u(f,h.destroy(),10);case 10:Ga(f,0);break;case 2:Ca(f),\nf.A(3)}})})};V.Cb(\"application/x-offline-manifest\",nk);function ok(b){var c=fk(b);return c&&\"manifest\"==c.a?ok.h(b):c&&\"segment\"==c.a?ok.i(c.key(),c):Db(new D(2,1,9004,b))}A(\"shaka.offline.OfflineScheme\",ok);ok.h=function(b){b={uri:b,ld:b,data:new ArrayBuffer(0),headers:{\"content-type\":\"application/x-offline-manifest\"}};return Hb(b)};ok.i=function(b,c){var d=new Nj;return Hb(void 0).U(function(){return d.init()}).U(function(){return Rj(d,c.wa(),c.ba())}).U(function(b){return b.getSegments([c.key()])}).U(function(b){return{uri:c,ld:c,data:b[0].data,headers:{}}})[\"finally\"](function(){return d.destroy()})};\nVb(\"offline\",ok);function pk(b,c,d){return t(function f(){var g,h,k,l,m,n;return z(f,function(f){switch(f.j){case 1:g=[];for(var p=[],x=r(d),B=x.next();!B.done;B=x.next()){B=B.value;for(var y=!1,G=r(p),E=G.next();!E.done;E=G.next())if(E=E.value,qk(E.info,B)){E.sessionIds.push(B.sessionId);y=!0;break}y||p.push({info:B,sessionIds:[B.sessionId]})}h=r(p);k=h.next();case 2:if(k.done){f.A(4);break}l=k.value;m=rk(b,c,l);return u(f,m,5);case 5:n=f.o;g=g.concat(n);k=h.next();f.A(2);break;case 4:return f[\"return\"](g)}})})}\nfunction rk(b,c,d){return t(function f(){var g,h;return z(f,function(f){switch(f.j){case 1:return g=new Gc({ub:c,onError:function(){},qc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),za(f,2),g.configure(b),u(f,Oc(g,d.info.keySystem,d.info.licenseUri,d.info.serverCertificate,d.info.audioCapabilities,d.info.videoCapabilities),4);case 4:Ba(f,3);break;case 2:return Ca(f),u(f,g.destroy(),5);case 5:return f[\"return\"]([]);case 3:return za(f,6),u(f,Vc(g),8);case 8:Ba(f,7);break;case 6:return Ca(f),\nu(f,g.destroy(),9);case 9:return f[\"return\"]([]);case 7:return h=[],u(f,Promise.all(d.sessionIds.map(function(b){return t(function n(){return z(n,function(c){switch(c.j){case 1:return za(c,2),u(c,Yc(g,b),4);case 4:h.push(b);Ba(c,0);break;case 2:Ca(c),w(c)}})})})),10);case 10:return u(f,g.destroy(),11);case 11:return f[\"return\"](h)}})})}\nfunction qk(b,c){function d(b,c){return b.robustness==c.robustness&&b.contentType==c.contentType}return b.keySystem==c.keySystem&&b.licenseUri==c.licenseUri&&Rb(b.audioCapabilities,c.audioCapabilities,d)&&Rb(b.videoCapabilities,c.videoCapabilities,d)};function sk(b,c){var d=tk(),e=this;this.g=c;this.c=b;this.i=d;this.h=null;this.f=[];this.b=this.a=null;this.l=!0;this.m=Promise.resolve().then(function(){return uk(e)})}sk.prototype.destroy=function(){var b=this;return t(function d(){var e;return z(d,function(d){switch(d.j){case 1:return b.l=!1,b.b&&b.b.abort(),vk(b),u(d,b.m,2);case 2:b.a&&b.a.va.Ya();for(var f=r(b.f),h=f.next();!h.done;h=f.next())e=h.value,e.va.Ya();b.a=null;b.f=[];b.g=null;w(d)}})})};\nfunction wk(b,c){var d={wb:function(){},pc:function(){},Ya:function(){},onError:function(){},rc:function(){},Jg:function(){}};b.f.push({create:c,va:d});b.b&&b.b.abort();vk(b);return d}\nfunction uk(b){return t(function d(){return z(d,function(d){switch(d.j){case 1:if(b.l){if(0==b.f.length||b.a&&!b.a.Va)var e=!1;else{b.a&&(b.a.va.Ya(),b.a=null);e=b.f.shift();var g=e.create(b.i);g?(e.va.wb(),b.a={node:g.node,payload:g.payload,Va:g.Va,va:e.va}):e.va.rc();e=!0}e?e=Promise.resolve():b.a?e=xk(b):(b.g.Bf(b.c),b.h=new F,e=b.h);return u(d,e,1)}d.A(0)}})})}\nfunction xk(b){return t(function d(){var e,f;return z(d,function(d){switch(d.j){case 1:return b.c=b.g.cf(b.c,b.i,b.a.node,b.a.payload),za(d,2),b.b=b.g.Le(b.c,b.i,b.a.payload),u(d,b.b.promise,4);case 4:b.b=null;b.c==b.a.node&&(b.a.va.pc(),b.a=null);Ba(d,0);break;case 2:e=Ca(d);if(7001==e.code)b.a.va.Ya();else b.a.va.onError(e);b.a=null;b.b=null;f=b;return u(d,b.g.handleError(b.i,e),5);case 5:f.c=d.o,w(d)}})})}function vk(b){b.h&&(b.h.resolve(),b.h=null)};function yk(b){this.a=null;for(var c=0;cb});return!0};yk.prototype.remove=yk.prototype.remove;\nyk.prototype.append=function(b){for(var c=Ak,d=[],e=0;e=b.endTime)return null;var c=new VTTCue(b.startTime,b.endTime,b.payload);c.lineAlign=b.lineAlign;c.positionAlign=b.positionAlign;c.size=b.size;try{c.align=b.textAlign}catch(d){}\"center\"==b.textAlign&&\"center\"!=c.align&&(c.align=\"middle\");\"vertical-lr\"==b.writingMode?c.vertical=\"lr\":\"vertical-rl\"==b.writingMode&&(c.vertical=\"rl\");1==b.lineInterpretation&&(c.snapToLines=!1);null!=b.line&&(c.line=b.line);null!=b.position&&(c.position=b.position);return c}\nfunction zk(b,c){var d=b.mode;b.mode=\"showing\"==d?\"showing\":\"hidden\";for(var e=b.cues,f=e.length-1;0<=f;f--){var g=e[f];g&&c(g)&&b.removeCue(g)}b.mode=d};function Bk(b,c,d,e,f){var g=f in e,h=!0,k;for(k in c){var l=f+\".\"+k,m=g?e[f]:d[k];g||k in d?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=Nb(m):m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=Nb(m)),l=Bk(b[k],c[k],m,e,l),h=h&&l):typeof c[k]!=typeof m||null==c[k]||\"function\"!=typeof c[k]&&c[k].constructor!=m.constructor?(bb(\"Invalid config, wrong type for \"+l),h=!1):(\"function\"==typeof d[k]&&d[k].length!=c[k].length&&cb(\"Unexpected number of arguments for \"+l),b[k]=c[k]):(bb(\"Invalid config, unrecognized key \"+\nl),h=!1)}return h}A(\"shaka.util.ConfigUtils.mergeConfigObjects\",Bk);function Ck(b,c){for(var d={},e=d,f=0,g=0;;){f=b.indexOf(\".\",f);if(0>f)break;if(0==f||\"\\\\\"!=b[f-1])g=b.substring(g,f).replace(/\\\\\\./g,\".\"),e[g]={},e=e[g],g=f+1;f+=1}e[b.substring(g).replace(/\\\\\\./g,\".\")]=c;return d}A(\"shaka.util.ConfigUtils.convertToConfigObject\",Ck);function Dk(){}A(\"shaka.util.PlayerConfiguration\",Dk);\nfunction Ek(){var b=5E5,c=Infinity;navigator.connection&&(b=1E6*navigator.connection.downlink,navigator.connection.saveData&&(c=360));var d={retryParameters:Bb(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:fd,fairPlayTransform:!0},e={retryParameters:Bb(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,dash:{customScheme:function(b){if(b)return null},clockSyncUri:\"\",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,\nignoreMinBufferTime:!1,autoCorrectDrift:!0,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1},hls:{ignoreTextStreamFailures:!1}},f={retryParameters:Bb(),failureCallback:function(b){return[b]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0};wc(\"Web0S\")&&\n(f.stallEnabled=!1);var g={trackSelectionCallback:function(b){return t(function m(){return z(m,function(c){switch(c.j){case 1:return c[\"return\"](b)}})})},progressCallback:function(b,c){return[b,c]},usePersistentLicense:!0},h={drm:d,manifest:e,streaming:f,offline:g,abrFactory:O,abr:{enabled:!0,defaultBandwidthEstimate:b,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:c,minPixels:0,maxPixels:Infinity,minFrameRate:0,\nmaxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:\"\",preferredTextLanguage:\"\",preferredVariantRole:\"\",preferredTextRole:\"\",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}};g.trackSelectionCallback=function(b){return t(function m(){return z(m,\nfunction(c){switch(c.j){case 1:return c[\"return\"](Fk(b,h.preferredAudioLanguage))}})})};return h}function Gk(b,c,d){var e={\".drm.servers\":\"\",\".drm.clearKeys\":\"\",\".drm.advanced\":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:\"\",audioRobustness:\"\",serverCertificate:new Uint8Array(0),individualizationServer:\"\"}};return Bk(b,c,d||Ek(),e,\"\")}Dk.mergeConfigObjects=Gk;\nfunction Fk(b,c){var d=b.filter(function(b){return\"variant\"==b.type}),e=[],f=we(c,d.map(function(b){return b.language}));f&&(e=d.filter(function(b){return M(b.language)==f}));0==e.length&&(e=d.filter(function(b){return b.primary}));0==e.length&&(d.map(function(b){return b.language}),e=d);var g=e.filter(function(b){return b.height&&480>=b.height});g.length&&(g.sort(function(b,c){return c.height-b.height}),e=g.filter(function(b){return b.height==g[0].height}));d=[];if(e.length){var h=Math.floor(e.length/\n2);e.sort(function(b,c){return b.bandwidth-c.bandwidth});d.push(e[h])}e=r(b);for(h=e.next();!h.done;h=e.next())h=h.value,\"text\"==h.type&&d.push(h);return d};function Hk(){this.a=null;this.b=[]}function Ik(b,c){if(null==b.a)b.a={timestamp:Date.now()/1E3,state:c,duration:0};else{var d=Date.now()/1E3;b.a.duration=d-b.a.timestamp;b.a.state!=c&&(b.b.push(b.a),b.a={timestamp:d,state:c,duration:0})}}function Jk(b,c){var d=0;b.a&&b.a.state==c&&(d+=b.a.duration);for(var e=r(b.b),f=e.next();!f.done;f=e.next())f=f.value,d+=f.state==c?f.duration:0;return d}\nfunction Kk(b){function c(b){return{timestamp:b.timestamp,state:b.state,duration:b.duration}}for(var d=[],e=r(b.b),f=e.next();!f.done;f=e.next())d.push(c(f.value));b.a&&d.push(c(b.a));return d};function Lk(){this.b=this.c=null;this.a=[]};function Mk(){this.f=this.s=this.h=this.b=this.i=this.l=this.m=this.g=this.u=NaN;this.a=new Hk;this.c=new Lk};function Y(b,c){var d=this;Mb.call(this);this.i=Nk;this.a=null;this.gb=!1;this.g=new K;this.Dc=this.l=this.Fb=this.b=this.s=this.f=this.Yb=this.B=this.Zb=this.W=this.ib=this.m=this.D=this.h=this.K=null;this.Xd=1E9;this.ac=new Set;this.kb=!0;this.pa=null;this.Ud=!1;this.Rd=0;this.oa=null;this.$=new Jh;this.c=Ok(this);this.bc={width:Infinity,height:Infinity};this.u=null;this.Gb=new Uh(this.c.preferredAudioLanguage,this.c.preferredVariantRole,this.c.preferredAudioChannelCount);this.na=this.c.preferredTextLanguage;\nthis.fb=this.c.preferredTextRole;c&&c(this);this.K=Pk(this);this.g.w(window,\"online\",function(){d.sd()});this.F={name:\"detach\"};this.O={name:\"attach\"};this.Ha={name:\"unload\"};this.Mc={name:\"manifest-parser\"};this.Kc={name:\"manifest\"};this.hb={name:\"media-source\"};this.Ec={name:\"drm-engine\"};this.S={name:\"load\"};this.Rc={name:\"src-equals-drm-engine\"};this.jb={name:\"src-equals\"};var e=new Map;e.set(this.O,function(b,c){return Ib(Qk(d,b,c))});e.set(this.F,function(b){b.v&&(d.g.ea(b.v,\"error\"),b.v=null);\nd.a=null;b=Promise.resolve();return Ib(b)});e.set(this.Ha,function(b){return Ib(Rk(d,b))});e.set(this.hb,function(b){b=Sk(d,b);return Ib(b)});e.set(this.Mc,function(b,c){var e=Tk(d,b,c);return Ib(e)});e.set(this.Kc,function(b){return Uk(d,b)});e.set(this.Ec,function(){var b=Vk(d);return Ib(b)});e.set(this.S,function(b,c){return Ib(Wk(d,b,c))});e.set(this.Rc,function(b){b=Xk(d,b);return Ib(b)});e.set(this.jb,function(b,c){return Yk(d,b,c)});this.lb=new sk(this.F,{cf:function(b,c,e,k){var f=null;b==\nd.F&&(f=e==d.F?d.F:d.O);b==d.O&&(f=e==d.F||c.v!=k.v?d.F:e==d.O?d.O:e==d.hb||e==d.S?d.hb:e==d.jb?d.Rc:null);b==d.hb&&(f=e==d.S&&c.v==k.v?d.Mc:d.Ha);b==d.Mc&&(f=Zk(d.S,d.Kc,d.Ha,e,c,k));b==d.Kc&&(f=Zk(d.S,d.Ec,d.Ha,e,c,k));b==d.Ec&&(f=Zk(d.S,d.S,d.Ha,e,c,k));b==d.Rc&&(f=e==d.jb&&c.v==k.v?d.jb:d.Ha);if(b==d.S||b==d.jb)f=d.Ha;b==d.Ha&&(f=k.v&&c.v==k.v?d.O:d.F);return f},Le:function(b,c,h){d.dispatchEvent(new I(\"onstatechange\",{state:b.name}));return e.get(b)(c,h)},handleError:function(b){return t(function h(){return z(h,\nfunction(c){switch(c.j){case 1:return u(c,Rk(d,b),2);case 2:return c[\"return\"](b.v?d.O:d.F)}})})},Bf:function(b){d.dispatchEvent(new I(\"onstateidle\",{state:b.name}))}});b&&this.Hb(b,!0)}Xa(Y,Mb);A(\"shaka.Player\",Y);\nY.prototype.destroy=function(){var b=this;return t(function d(){var e;return z(d,function(d){switch(d.j){case 1:if(b.i==$k)return d[\"return\"]();b.i=$k;e=wk(b.lb,function(){return{node:b.F,payload:tk(),Va:!1}});return u(d,new Promise(function(d){e.wb=function(){};e.pc=function(){d();b.dispatchEvent(new I(\"loaded\"))};e.Ya=function(){d()};e.onError=function(){d()};e.rc=function(){d()}}),2);case 2:return u(d,b.lb.destroy(),3);case 3:b.g&&(b.g.release(),b.g=null);b.Dc=null;b.l=null;b.c=null;if(!b.K){d.A(0);\nbreak}return u(d,b.K.destroy(),5);case 5:b.K=null,w(d)}})})};Y.prototype.destroy=Y.prototype.destroy;Y.version=\"v2.5.10\";var al=[\"2\",\"5\"];Ae=new function(b){this.a=b;this.c=Be;this.b=Ce}(new ye(Number(al[0]),Number(al[1])));var bl=[\"output-restricted\",\"internal-error\"],cl={};Y.registerSupportPlugin=function(b,c){cl[b]=c};\nY.isBrowserSupported=function(){if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach))return!1;var b=xc();return b&&12>b||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:sc()?!0:tc(\"application/x-mpegurl\")};\nY.probeSupport=function(){return ld().then(function(b){for(var c=V.Sf(),d={},e=r('video/mp4; codecs=\"avc1.42E01E\",video/mp4; codecs=\"avc3.42E01E\",video/mp4; codecs=\"hev1.1.6.L93.90\",video/mp4; codecs=\"hvc1.1.6.L93.90\",video/mp4; codecs=\"hev1.2.4.L153.B0\"; eotf=\"smpte2084\",video/mp4; codecs=\"hvc1.2.4.L153.B0\"; eotf=\"smpte2084\",video/mp4; codecs=\"vp9\",video/mp4; codecs=\"vp09.00.10.08\",video/mp4; codecs=\"av01.0.01M.08\",audio/mp4; codecs=\"mp4a.40.2\",audio/mp4; codecs=\"ac-3\",audio/mp4; codecs=\"ec-3\",audio/mp4; codecs=\"opus\",audio/mp4; codecs=\"flac\",video/webm; codecs=\"vp8\",video/webm; codecs=\"vp9\",video/webm; codecs=\"vp09.00.10.08\",audio/webm; codecs=\"vorbis\",audio/webm; codecs=\"opus\",video/mp2t; codecs=\"avc1.42E01E\",video/mp2t; codecs=\"avc3.42E01E\",video/mp2t; codecs=\"hvc1.1.6.L93.90\",video/mp2t; codecs=\"mp4a.40.2\",video/mp2t; codecs=\"ac-3\",video/mp2t; codecs=\"ec-3\",text/vtt,application/mp4; codecs=\"wvtt\",application/ttml+xml,application/mp4; codecs=\"stpp\"'.split(\",\")),f=\ne.next();!f.done;f=e.next()){f=f.value;d[f]=sc()?Yd(f)?!0:MediaSource.isTypeSupported(f)||Cd(f):tc(f);var g=f.split(\";\")[0];d[g]=d[g]||d[f]}b={manifest:c,media:d,drm:b};for(var h in cl)b[h]=cl[h]();return b})};Y.prototype.Hb=function(b,c){c=void 0===c?!0:c;if(this.i==$k)return Promise.reject(dl());var d=tk();d.v=b;sc()||(c=!1);var e=c?this.hb:this.O,f=wk(this.lb,function(){return{node:e,payload:d,Va:!1}});f.wb=function(){};return el(f)};Y.prototype.attach=Y.prototype.Hb;\nY.prototype.detach=function(){var b=this;if(this.i==$k)return Promise.reject(dl());var c=wk(this.lb,function(){return{node:b.F,payload:tk(),Va:!1}});c.wb=function(){};return el(c)};Y.prototype.detach=Y.prototype.detach;Y.prototype.Cd=function(b){var c=this;b=void 0===b?!0:b;if(this.i==$k)return Promise.reject(dl());sc()||(b=!1);var d=tk(),e=wk(this.lb,function(e){var f=e.v&&b?c.hb:e.v?c.O:c.F;d.v=e.v;return{node:f,payload:d,Va:!1}});e.wb=function(){};return el(e)};Y.prototype.unload=Y.prototype.Cd;\nY.prototype.load=function(b,c,d){if(this.i==$k)return Promise.reject(dl());this.dispatchEvent(new I(\"loading\"));var e=tk();e.uri=b;e.zd=Date.now()/1E3;d&&\"string\"!=typeof d&&(ze(\"Loading with a manifest parser factory\",\"Please register a manifest parser and for the mime-type.\"),e.Aa=function(){return new d});d&&\"string\"==typeof d&&(e.mimeType=d);void 0!==c&&(e.startTime=c);var f=fl(this,e)?this.jb:this.S,g=wk(this.lb,function(b){if(null==b.v)return null;e.v=b.v;return{node:f,payload:e,Va:!0}});g.wb=\nfunction(){};return new Promise(function(b,c){g.rc=function(){return c(new D(2,7,7002))};g.pc=function(){return b()};g.Ya=function(){return c(dl())};g.onError=function(b){return c(b)}})};Y.prototype.load=Y.prototype.load;\nfunction fl(b,c){if(c.Aa)return!1;if(!sc())return!0;var d=c.mimeType,e=c.uri||\"\";d||(d={mp4:\"video/mp4\",m4v:\"video/mp4\",m4a:\"audio/mp4\",webm:\"video/webm\",weba:\"audio/webm\",mkv:\"video/webm\",ts:\"video/mp2t\",ogv:\"video/ogg\",ogg:\"audio/ogg\",mpg:\"video/mpeg\",mpeg:\"video/mpeg\",m3u8:\"application/x-mpegurl\",mp3:\"audio/mpeg\",aac:\"audio/aac\",flac:\"audio/flac\",wav:\"audio/wav\"}[V.getExtension(e)]);return d?\"\"==(c.v||uc()).canPlayType(d)?!1:V.isSupported(e,d)?vc()&&b.c.streaming.useNativeHlsOnSafari:!0:!1}\nfunction Qk(b,c,d){null==c.v&&(c.v=d.v,b.g.w(c.v,\"error\",function(){var c=gl(b);c&&b.Ma(c)}));b.a=c.v;return Promise.resolve()}\nfunction Rk(b,c){return t(function e(){return z(e,function(e){switch(e.j){case 1:b.i!=$k&&(b.i=Nk);b.dispatchEvent(new I(\"unloading\"));c.Aa=null;c.mimeType=null;c.startTime=null;c.uri=null;c.v&&(b.g.ea(c.v,\"loadeddata\"),b.g.ea(c.v,\"playing\"),b.g.ea(c.v,\"pause\"),b.g.ea(c.v,\"ended\"),b.g.ea(c.v,\"ratechange\"));b.ib&&(b.ib.release(),b.ib=null);b.Zb&&(b.Zb.stop(),b.Zb=null);if(!b.s){e.A(2);break}return u(e,b.s.stop(),3);case 3:b.s=null;case 2:if(!b.l){e.A(4);break}return u(e,b.l.stop(),4);case 4:if(!b.f){e.A(6);\nbreak}return u(e,b.f.destroy(),7);case 7:b.f=null;case 6:b.m&&(b.m.release(),b.m=null);if(!b.D){e.A(8);break}return u(e,b.D.destroy(),9);case 9:b.D=null;case 8:if(!c.v||!c.v.src){e.A(10);break}return u(e,new Promise(function(b){return(new C(b)).R(.1)}),11);case 11:c.v.removeAttribute(\"src\"),c.v.load();case 10:if(!b.h){e.A(12);break}return u(e,b.h.destroy(),13);case 13:b.h=null;case 12:b.$.a.clear(),b.Fb=null,b.B=null,b.ac.clear(),b.b=null,b.u=null,b.Fc=null,b.kb=!0,hl(b),w(e)}})})}\nfunction Sk(b,c){return t(function e(){var f,g,h,k;return z(e,function(e){switch(e.j){case 1:return f=window.muxjs?new od:new pd,g=b.c.textDisplayFactory,h=new g,b.Fc=g,k=new ce(c.v,f,h),u(e,k.s,2);case 2:b.D=k,w(e)}})})}\nfunction Tk(b,c,d){return t(function f(){var g,h,k,l;return z(f,function(f){switch(f.j){case 1:c.Aa=d.Aa;c.mimeType=d.mimeType;c.uri=d.uri;g=c.uri;h=b.K;b.Fb=g;if(c.Aa){b.s=c.Aa();f.A(2);break}k=b;return u(f,V.create(g,h,b.c.manifest.retryParameters,c.mimeType),3);case 3:k.s=f.o;case 2:l=Nb(b.c.manifest),d.v&&\"AUDIO\"===d.v.nodeName&&(l.disableVideo=!0),b.s.configure(l),w(f)}})})}\nfunction Uk(b,c){var d=c.uri,e=b.K;b.Yb=new Di;Ei(b.Yb,function(c){il(b,\"timelineregionadded\",c)});var f={networkingEngine:e,filterNewPeriod:function(c){return b.Nc(c)},filterAllPeriods:function(c){return jl(b,c)},onTimelineRegionAdded:function(c){var d=b.Yb;a:{var e=r(d.a);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.schemeIdUri==c.schemeIdUri&&f.id==c.id&&f.startTime==c.startTime&&f.endTime==c.endTime){e=f;break a}e=null}null==e&&(d.a.add(c),d.b(c))},onEvent:function(c){return b.dispatchEvent(c)},\nonError:function(c){return b.Ma(c)}};return new H(Promise.resolve().then(function(){return t(function h(){var c;return z(h,function(e){switch(e.j){case 1:return c=b,u(e,b.s.start(d,f),2);case 2:c.b=e.o;b.dispatchEvent(new I(\"manifestparsed\"));if(0==b.b.periods.length)throw new D(2,4,4014);kl(b.b.periods);w(e)}})})}),function(){return b.s.stop()})}\nfunction Vk(b){return t(function d(){return z(d,function(d){switch(d.j){case 1:return b.h=new Gc({ub:b.K,onError:function(d){b.Ma(d)},qc:function(d){ll(b,d)},onExpirationUpdated:function(d,e){ml(b,d,e)},onEvent:function(d){b.dispatchEvent(d)}}),b.h.configure(b.c.drm),u(d,Nc(b.h,ji(b.b.periods),b.b.offlineSessionIds),2);case 2:jl(b,b.b.periods),w(d)}})})}\nfunction Wk(b,c,d){return t(function f(){var g,h,k,l,m,n,p,v,x;return z(f,function(f){switch(f.j){case 1:return c.startTime=d.startTime,g=c.v,h=c.uri,b.Fb=h,b.u=new Mk,k=function(){return nl(b)},l=function(){var c=b.a.playbackRate;0!=c&&b.W.set(c)},b.g.w(g,\"playing\",k),b.g.w(g,\"pause\",k),b.g.w(g,\"ended\",k),b.g.w(g,\"ratechange\",l),m=b.c.abrFactory,b.l&&b.Dc==m||(b.Dc=m,b.l=new m,b.l.configure(b.c.abr)),ol(b,b.b.periods),b.Gb=new Uh(b.c.preferredAudioLanguage,b.c.preferredVariantRole,b.c.preferredAudioChannelCount),\nb.na=b.c.preferredTextLanguage,pl(b.b.presentationTimeline,b.c.playRangeStart,b.c.playRangeEnd),u(f,b.h.Hb(g),2);case 2:return b.l.init(function(c,d,f){d=void 0===d?!1:d;f=void 0===f?0:f;a:{var g=r(b.b.periods);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.variants.includes(c)){g=h;break a}g=null}ql(b,g,c,!0);b.f&&Xi(b.f,c,d,f)&&rl(b)}),b.m=sl(b,c.startTime),b.ib=tl(b),b.W=new ni({jc:function(){return c.v.playbackRate},wd:function(b){c.v.playbackRate=b},Yd:function(b){c.v.currentTime+=b}}),\nn=Math.max(b.b.minBufferTime,b.c.streaming.rebufferingGoal),ul(b,n),b.f=vl(b),b.f.configure(b.c.streaming),wl(b),b.i=xl,b.dispatchEvent(new I(\"streaming\")),u(f,b.f.start(),3);case 3:b.c.streaming.startAtSegmentBoundary&&(p=b.m.h(),v=yl(b,p),b.m.m(v)),b.b.periods.forEach(b.Nc.bind(b)),zl(b),rl(b),x=Al(b)||b.b.periods[0],x.variants.some(function(b){return b.primary}),Bl(b,x.variants),b.g.da(g,\"loadeddata\",function(){b.u.b=Date.now()/1E3-d.zd}),w(f)}})})}\nfunction Xk(b,c){return t(function e(){var f,g;return z(e,function(e){switch(e.j){case 1:return f=xd,b.h=new Gc({ub:b.K,onError:function(c){b.Ma(c)},qc:function(c){ll(b,c)},onExpirationUpdated:function(c,e){ml(b,c,e)},onEvent:function(c){b.dispatchEvent(c)}}),b.h.configure(b.c.drm),g={id:0,language:\"und\",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,\npresentationTimeOffset:0,mimeType:\"video/mp4\",codecs:\"\",encrypted:!0,keyId:null,language:\"und\",label:null,type:f.Pa,primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},u(e,Nc(b.h,[g],[]),2);case 2:return u(e,b.h.Hb(c.v),0)}})})}\nfunction Yk(b,c,d){function e(){return nl(b)}c.uri=d.uri;c.startTime=d.startTime;b.Fb=c.uri;b.u=new Mk;b.m=new wi(c.v);null!=c.startTime&&b.m.m(c.startTime);b.W=new ni({jc:function(){return c.v.playbackRate},wd:function(b){c.v.playbackRate=b},Yd:function(b){c.v.currentTime+=b}});ul(b,b.c.streaming.rebufferingGoal);b.g.w(c.v,\"playing\",e);b.g.w(c.v,\"pause\",e);b.g.w(c.v,\"ended\",e);b.g.da(c.v,\"loadeddata\",function(){b.u.b=Date.now()/1E3-d.zd});b.a.audioTracks&&(b.g.w(b.a.audioTracks,\"addtrack\",function(){return zl(b)}),\nb.g.w(b.a.audioTracks,\"removetrack\",function(){return zl(b)}),b.g.w(b.a.audioTracks,\"change\",function(){return zl(b)}));if(b.a.textTracks){var f=b.a.textTracks;b.g.w(f,\"addtrack\",function(){return zl(b)});b.g.w(f,\"removetrack\",function(){return zl(b)});b.g.w(f,\"change\",function(){return zl(b)})}c.v.src=c.uri;b.i=Cl;b.dispatchEvent(new I(\"streaming\"));var g=new F;b.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?g.resolve():b.a.error?g.reject(gl(b)):(b.g.da(b.a,\"loadeddata\",function(){g.resolve()}),\nb.g.da(b.a,\"error\",function(){g.reject(gl(b))}));return new H(g,function(){g.reject(new D(2,7,7001));return Promise.resolve()})}function kl(b){function c(b){return b.video&&b.audio||b.video&&b.video.codecs.includes(\",\")}b.some(function(b){return b.variants.some(c)})&&b.forEach(function(b){b.variants=b.variants.filter(c)})}\nfunction wl(b){function c(b){var c=\"\";b.video&&(c=rc(b.video.codecs)[0]);var d=\"\";b.audio&&(d=rc(b.audio.codecs)[0]);return c+\"-\"+d}var d=b.b.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=N.Nd(d,b.c.preferredAudioChannelCount);var e=new Lb;d.forEach(function(b){var d=c(b);e.push(d,b)});var f=null,g=Infinity;e.forEach(function(b,c){var d=0,e=0;c.forEach(function(b){d+=b.bandwidth||0;++e});var h=d/e;h=b.a.duration-1;break;case xl:a:if(b.a.ended||ge(b.D))c=!0;else{if(b.b.presentationTimeline.V()){var d=b.b.presentationTimeline.pb();if(qd(b.a.buffered)>=d){c=!0;break a}}c=!1}break;default:c=!1}var e=sd(b.a.buffered,b.a.currentTime);d=b.B;var f=c,g=d.b.get(d.a);c=d.a;e=f||e>=g?Zh:$h;d.a=e;c!=e&&hl(b)}\nfunction vl(b){return new Ki(b.b,{Ua:function(){return b.m.h()},getBandwidthEstimate:function(){return b.l.getBandwidthEstimate()},L:b.D,ub:b.K,ae:b.zf.bind(b),$d:b.Fe.bind(b),onError:b.Ma.bind(b),onEvent:function(c){return b.dispatchEvent(c)},Df:b.Ef.bind(b),jd:b.Jf.bind(b)})}Y.prototype.configure=function(b,c){2==arguments.length&&\"string\"==typeof b&&(b=Ck(b,c));var d=Gk(this.c,b,Ok(this));El(this);return d};Y.prototype.configure=Y.prototype.configure;\nfunction El(b){if(b.s){var c=Nb(b.c.manifest);b.a&&\"AUDIO\"===b.a.nodeName&&(c.disableVideo=!0);b.s.configure(c)}b.h&&b.h.configure(b.c.drm);if(b.f){b.f.configure(b.c.streaming);try{b.b.periods.forEach(b.Nc.bind(b))}catch(g){b.Ma(g)}var d=Oi(b.f),e=Qi(b.f);c=Al(b);d=N.Qd(d,e,c.variants);b.l&&d&&d.allowedByApplication&&d.allowedByKeySystem?Bl(b,c.variants):Fl(b,c)}if(b.D&&(c=b.c.textDisplayFactory,b.Fc!=c)){d=new c;e=b.D;var f=e.g;e.g=d;f&&(d.setTextVisibility(f.isTextVisible()),f.destroy());e.a&&(e.a.c=\nd);b.Fc=c;b.f&&(c=b.f,(d=c.b.get(\"text\"))&&Wi(c,d.stream,!0,0,!0))}b.l&&(b.l.configure(b.c.abr),b.c.abr.enabled&&!b.kb?b.l.enable():b.l.disable(),Gl(b));b.B&&(c=b.c.streaming.rebufferingGoal,b.b&&(c=Math.max(c,b.b.minBufferTime)),ai(b.B,c,Math.min(.5,c/2)))}Y.prototype.getConfiguration=function(){var b=Ok(this);Gk(b,this.c,Ok(this));return b};Y.prototype.getConfiguration=Y.prototype.getConfiguration;Y.prototype.$f=function(){for(var b in this.c)delete this.c[b];Gk(this.c,Ok(this),Ok(this));El(this)};\nY.prototype.resetConfiguration=Y.prototype.$f;Y.prototype.We=function(){return this.i};Y.prototype.getLoadMode=Y.prototype.We;Y.prototype.af=function(){return this.a};Y.prototype.getMediaElement=Y.prototype.af;Y.prototype.Mb=function(){return this.K};Y.prototype.getNetworkingEngine=Y.prototype.Mb;Y.prototype.hc=function(){return this.Fb};Y.prototype.getAssetUri=Y.prototype.hc;Y.prototype.Ze=function(){ze(\"getManifestUri\",'Please use \"getAssetUri\" instead.');return this.hc()};\nY.prototype.getManifestUri=Y.prototype.Ze;Y.prototype.V=function(){return this.b?this.b.presentationTimeline.V():this.a&&this.a.src?Infinity==this.a.duration:!1};Y.prototype.isLive=Y.prototype.V;Y.prototype.Xa=function(){return this.b?this.b.presentationTimeline.Xa():!1};Y.prototype.isInProgress=Y.prototype.Xa;\nY.prototype.uf=function(){if(this.b){if(!this.b.periods.length)return!1;var b=this.b.periods[0].variants;return b.length?!b[0].video:!1}return this.a&&this.a.src?this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight:!1};Y.prototype.isAudioOnly=Y.prototype.uf;Y.prototype.bg=function(){if(this.b){var b=this.b.presentationTimeline;return{start:b.ob(),end:b.Ca()}}return this.a&&this.a.src&&(b=this.a.seekable,b.length)?{start:b.start(0),end:b.end(b.length-1)}:{start:0,end:0}};\nY.prototype.seekRange=Y.prototype.bg;Y.prototype.keySystem=function(){return ad(this.drmInfo())};Y.prototype.keySystem=Y.prototype.keySystem;Y.prototype.drmInfo=function(){return this.h?this.h.a:null};Y.prototype.drmInfo=Y.prototype.drmInfo;Y.prototype.Lb=function(){return this.h?this.h.Lb():Infinity};Y.prototype.getExpiration=Y.prototype.Lb;Y.prototype.Xc=function(){return this.B?this.B.a==$h:!1};Y.prototype.isBuffering=Y.prototype.Xc;\nY.prototype.ef=function(){if(this.W){var b=this.W;b=b.f?0:b.c}else b=0;return b};Y.prototype.getPlaybackRate=Y.prototype.ef;Y.prototype.ug=function(b){0==b?cb(\"A trick play rate of 0 is unsupported!\"):(this.a.paused&&this.a.play(),this.W.set(b),this.i==xl&&Vi(this.f,1=h.b.periods.length?h.b.presentationTimeline.Y():h.b.periods[v].startTime;B=x-m.startTime;if(Infinity==B)throw new D(1,4,4033);y=new T(1,0,B,function(){return[b]},0,null);G={id:h.Xd++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),\nfindSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1==b?y:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:e,codecs:f||\"\",kind:d,encrypted:!1,keyId:null,language:c,label:g||null,type:n.ra,primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null};h.ac.add(G);m.textStreams.push(G);return u(l,Ri(h.f,G),2);case 2:return(E=Pi(h.f,\"text\"))&&Kh(h.$,m,E),\nh.ac[\"delete\"](G),Fl(h,m),zl(h),l[\"return\"](N.xc(G))}})})};Y.prototype.addTextTrack=Y.prototype.addTextTrack;Y.prototype.vd=function(b,c){this.bc.width=b;this.bc.height=c};Y.prototype.setMaxHardwareResolution=Y.prototype.vd;Y.prototype.sd=function(){if(this.i==xl){var b=this.f;if(b.f)b=!1;else if(b.m)b=!1;else{for(var c=r(b.b.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Pb&&(d.Pb=!1,Ui(b,d,.1));b=!0}}else b=!1;return b};Y.prototype.retryStreaming=Y.prototype.sd;Y.prototype.Xe=function(){return this.b};\nY.prototype.getManifest=Y.prototype.Xe;Y.prototype.Ye=function(){return this.s?this.s.constructor:null};Y.prototype.getManifestParserFactory=Y.prototype.Ye;function ql(b,c,d,e){Lh(b.$,c).variant=d;b=b.u.c;b.c!=d&&(b.c=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:\"variant\",fromAdaptation:e,bandwidth:d.bandwidth}))}function Ll(b,c,d,e){Kh(b.$,c,d);b=b.u.c;b.b!=d&&(b.b=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:\"text\",fromAdaptation:e,bandwidth:null}))}\nfunction Ok(b){var c=Ek();c.streaming.failureCallback=function(c){var d=[1001,1002,1003];b.V()&&d.includes(c.code)&&(c.severity=1,b.sd())};c.textDisplayFactory=function(){return new yk(b.a)};return c}\nfunction ol(b,c){for(var d=0;dd&&(d+=Math.pow(2,32)),d=d.toString(16));return new D(2,3,3016,c,d,b.a.error.message)}\nfunction ll(b,c){if(b.f){var d=Al(b),e=!1,f=Object.keys(c),g=1==f.length&&\"00\"==f[0];f.length&&b.b.periods.forEach(function(b){b.variants.forEach(function(b){N.nf(b).forEach(function(d){var f=b.allowedByKeySystem;d.keyId&&(d=c[g?\"00\":d.keyId],b.allowedByKeySystem=!!d&&!bl.includes(d));f!=b.allowedByKeySystem&&(e=!0)})})});f=Oi(b.f);var h=Qi(b.f);(f=N.Qd(f,h,d.variants))&&!f.allowedByKeySystem&&Sl(b,d);e&&(zl(b),Bl(b,d.variants))}}\nfunction ml(b,c,d){if(b.s&&b.s.onExpirationUpdated)b.s.onExpirationUpdated(c,d);b.dispatchEvent(new I(\"expirationupdated\"))}function pl(b,c,d){0=g&&(g=c.bandwidth);b.a[d.id]=f;b.a[e.id]=g}}function am(b,c,d){d=d.endTime-d.startTime;return bm(b,c)*d}function bm(b,c){var d=b.a[c];null==d&&(d=0);return d};function cm(b){this.a=!1;this.b=new F;this.c=b}cm.prototype.destroy=function(){var b=this;if(this.a)return this.b;this.a=!0;return this.c().then(function(){b.b.resolve()},function(){b.b.resolve()})};function dm(b,c,d){b=r(b.periods);for(var e=b.next();!e.done;e=b.next())e=e.value,e.variants=e.variants.filter(function(b){return N.bd(b,c,d)})}function em(b){b=r(b.periods);for(var c=b.next();!c.done;c=b.next())c=c.value,c.variants=c.variants.filter(function(b){var c=!0;b.audio&&(c=c&&ee(b.audio));b.video&&(c=c&&ee(b.video));return c})}function fm(b,c){for(var d=r(b.periods),e=d.next();!e.done;e=d.next())e=e.value,e.variants=e.variants.filter(function(b){return md(c,b)})}\nfunction gm(b){var c=new hm;b.periods.forEach(function(b,d){var e=im(b.variants);if(0==d){e=r(e.a);for(var f=e.next();!f.done;f=e.next())c.add(f.value)}else jm(c,e)});b=r(b.periods);for(var d=b.next();!d.done;d=b.next())d=d.value,d.variants=d.variants.filter(function(b){return km(c,new lm(b))})}\nfunction mm(b,c){return t(function e(){var f,g,h,k;return z(e,function(e){switch(e.j){case 1:f=null,g=r(b.periods),h=g.next();case 2:if(h.done){e.A(0);break}k=h.value;f&&(k.variants=k.variants.filter(function(b){return km(f,new lm(b))}));return u(e,c(k),5);case 5:f=im(k.variants),h=g.next(),e.A(2)}})})}function lm(b){var c=b.audio;b=b.video;this.b=c?c.mimeType:null;this.a=c?c.codecs.split(\".\")[0]:null;this.f=b?b.mimeType:null;this.c=b?b.codecs.split(\".\")[0]:null}function hm(){this.a=[]}\nhm.prototype.add=function(b){km(this,b)||this.a.push(b)};function jm(b,c){b.a=b.a.filter(function(b){return km(c,b)})}function km(b,c){return b.a.some(function(b){return c.b==b.b&&c.a==b.a&&c.f==b.f&&c.c==b.c})}function im(b){var c=new hm;b=r(b);for(var d=b.next();!d.done;d=b.next())c.add(new lm(d.value));return c};function Z(b){var c=this;if(b&&b.constructor!=Y)throw new D(2,9,9008);this.b=this.a=null;b?(this.a=b.c,this.b=b.Mb()):(this.a=Ek(),this.b=new J);this.f=!1;this.c=[];this.g=[];var d=!b;this.h=new cm(function(){return t(function f(){var b;return z(f,function(f){switch(f.j){case 1:return b=function(){},u(f,Promise.all(c.g.map(function(c){return c.then(b,b)})),2);case 2:if(!d){f.A(3);break}return u(f,c.b.destroy(),3);case 3:c.a=null,c.b=null,w(f)}})})})}A(\"shaka.offline.Storage\",Z);\nfunction nm(){if(sc())a:{var b=r(Oj.values());for(var c=b.next();!c.done;c=b.next())if(c=c.value,c=c()){c.destroy();b=!0;break a}b=!1}else b=!1;return b}Z.support=nm;Z.prototype.destroy=function(){return this.h.destroy()};Z.prototype.destroy=Z.prototype.destroy;\nZ.prototype.configure=function(b,c){2==arguments.length&&\"string\"==typeof b&&(b=Ck(b,c));var d=b,e=!1;null!=d.trackSelectionCallback&&(e=!0,d.offline=d.offline||{},d.offline.trackSelectionCallback=d.trackSelectionCallback,delete d.trackSelectionCallback);null!=d.progressCallback&&(e=!0,d.offline=d.offline||{},d.offline.progressCallback=d.progressCallback,delete d.progressCallback);null!=d.usePersistentLicense&&(e=!0,d.offline=d.offline||{},d.offline.usePersistentLicense=d.usePersistentLicense,delete d.usePersistentLicense);\ne&&ze(\"Storage.configure with OfflineConfig\",\"Please configure storage with a player configuration.\");return Gk(this.a,b)};Z.prototype.configure=Z.prototype.configure;Z.prototype.getConfiguration=function(){var b=Ek();Gk(b,this.a,Ek());return b};Z.prototype.getConfiguration=Z.prototype.getConfiguration;Z.prototype.Mb=function(){return this.b};Z.prototype.getNetworkingEngine=Z.prototype.Mb;\nZ.prototype.store=function(b,c,d){var e=this;return om(this,pm(this,b,c||{},function(){return t(function g(){var c,k;return z(g,function(g){switch(g.j){case 1:return d&&\"string\"!=typeof d?(ze(\"Storing with a manifest parser factory\",\"Please register a manifest parser and for the mime-type.\"),c=d,g[\"return\"](new c)):u(g,V.create(b,e.b,e.a.manifest.retryParameters,d),2);case 2:return k=g.o,g[\"return\"](k)}})})}))};Z.prototype.store=Z.prototype.store;Z.prototype.kf=function(){return this.f};\nZ.prototype.getStoreInProgress=Z.prototype.kf;\nfunction pm(b,c,d,e){return t(function g(){var h,k,l,m,n,p,v,x,B,y;return z(g,function(g){switch(g.j){case 1:qm();if(b.f)return g[\"return\"](Promise.reject(new D(2,9,9006)));b.f=!0;return u(g,rm(b,c,e),2);case 2:h=g.o;sm(b);k=!h.presentationTimeline.V()&&!h.presentationTimeline.Xa();if(!k)throw new D(2,9,9005,c);l=null;m=new Nj;p=n=null;za(g,3,4);return u(g,tm(b,h,function(b){p=p||b}),6);case 6:l=g.o;sm(b);if(p)throw p;return u(g,um(b,h,l),7);case 7:return u(g,m.init(),8);case 8:return sm(b),u(g,Pj(m),\n9);case 9:return n=g.o,sm(b),u(g,vm(b,n.ba,l,h,c,d),10);case 10:v=g.o;sm(b);if(p)throw p;return u(g,n.ba.addManifests([v]),11);case 11:return x=g.o,sm(b),B=new ek(\"manifest\",n.path.wa,n.path.ba,x[0]),g[\"return\"](Yl(B,v));case 4:return Fa(g),b.f=!1,b.c=[],u(g,m.destroy(),12);case 12:if(!l){g.A(13);break}return u(g,l.destroy(),13);case 13:Ga(g,0);break;case 3:y=Ca(g);if(!n){g.A(15);break}return u(g,n.ba.removeSegments(b.c,function(){}),15);case 15:throw p||y;}})})}\nfunction um(b,c,d){return t(function f(){var g;return z(f,function(f){switch(f.j){case 1:return g={width:Infinity,height:Infinity},dm(c,b.a.restrictions,g),em(c),fm(c,d),gm(c),u(f,mm(c,function(c){return t(function m(){var d,f,g,h,k,y,G,E;return z(m,function(m){switch(m.j){case 1:d=N;f=[];for(var n=r(c.variants),p=n.next();!p.done;p=n.next())g=p.value,f.push(d.Ed(g));n=r(c.textStreams);for(p=n.next();!p.done;p=n.next())h=p.value,f.push(d.xc(h));return u(m,b.a.offline.trackSelectionCallback(f),2);\ncase 2:k=m.o;y=new Set;G=new Set;n=r(k);for(p=n.next();!p.done;p=n.next())E=p.value,\"variant\"==E.type&&y.add(E.id),\"text\"==E.type&&G.add(E.id);c.variants=c.variants.filter(function(b){return y.has(b.id)});c.textStreams=c.textStreams.filter(function(b){return G.has(b.id)});w(m)}})})}),2);case 2:wm(c),w(f)}})})}\nfunction vm(b,c,d,e,f,g){return t(function k(){var l,m,n,p,v,x,B,y,G,E;return z(k,function(k){switch(k.j){case 1:return l=Wl(f,e,g),m=e.periods.some(function(b){return b.variants.some(function(b){return b.drmInfos&&b.drmInfos.length})}),n=e.periods.some(function(b){return b.variants.some(function(b){return b.drmInfos.some(function(b){return b.initData&&b.initData.length})})}),p=m&&!n,v=null,p&&(x=d.a,v=xm.get(x.keySystem)),B=new zj(b.b,function(c,d){l.size=d;b.a.offline.progressCallback(l,c)},function(c,\ne){p&&b.a.offline.usePersistentLicense&&v==e&&Xc(d,\"cenc\",c)}),Aa(k,2),G=y=ym(b,B,c,d,e,f,g),u(k,Cj(B),4);case 4:G.size=k.o;y.expiration=d.Lb();E=cd(d);y.sessionIds=b.a.offline.usePersistentLicense?E:[];if(m&&b.a.offline.usePersistentLicense&&!E.length)throw new D(2,9,9007);return k[\"return\"](y);case 2:return Fa(k),u(k,B.destroy(),5);case 5:Ga(k,0)}})})}Z.prototype.remove=function(b){return om(this,zm(this,b))};Z.prototype.remove=Z.prototype.remove;\nfunction zm(b,c){return t(function e(){var f,g,h,k,l,m;return z(e,function(e){switch(e.j){case 1:qm();f=fk(c);if(null==f||\"manifest\"!=f.a)return e[\"return\"](Promise.reject(new D(2,9,9004,c)));g=f;h=new Nj;Aa(e,2);return u(e,h.init(),4);case 4:return u(e,Rj(h,g.wa(),g.ba()),5);case 5:return k=e.o,u(e,k.getManifests([g.key()]),6);case 6:return l=e.o,m=l[0],u(e,Promise.all([Am(b,m,h),Bm(b,k,g,m)]),2);case 2:return Fa(e),u(e,h.destroy(),8);case 8:Ga(e,0)}})})}\nfunction Cm(b,c){for(var d=[],e=r(b.periods),f=e.next();!f.done;f=e.next()){f=r(f.value.streams);for(var g=f.next();!g.done;g=f.next())g=g.value,c&&\"video\"==g.contentType?d.push({contentType:oc(g.mimeType,g.codecs),robustness:b.drmInfo.videoRobustness}):c||\"audio\"!=g.contentType||d.push({contentType:oc(g.mimeType,g.codecs),robustness:b.drmInfo.audioRobustness})}return d}function Am(b,c,d){return t(function f(){return z(f,function(f){switch(f.j){case 1:return u(f,Dm(b.b,b.a.drm,d,c),0)}})})}\nfunction Bm(b,c,d,e){function f(){k+=1;b.a.offline.progressCallback(l,k/h)}var g=Em(e),h=g.length+1,k=0,l=Yl(d,e);return Promise.all([c.removeSegments(g,f),c.removeManifests([d.key()],f)])}Z.prototype.Xf=function(){return om(this,Fm(this))};Z.prototype.removeEmeSessions=Z.prototype.Xf;\nfunction Fm(b){return t(function d(){var e,f,g,h,k,l,m,n,p;return z(d,function(d){switch(d.j){case 1:return qm(),e=b.b,f=b.a.drm,g=new Nj,h=!1,Aa(d,2),u(d,g.init(),4);case 4:k=[];Sj(g,function(b){return k.push(b)});l=Promise.resolve();m={};n=r(k);for(p=n.next();!p.done;m={wc:m.wc},p=n.next())m.wc=p.value,l=l.then(function(b){return function(){return t(function y(){var d,g;return z(y,function(k){switch(k.j){case 1:return u(k,b.wc.getAll(),2);case 2:return d=k.o,u(k,pk(f,e,d),3);case 3:return g=k.o,\nu(k,b.wc.remove(g),4);case 4:g.length!=d.length&&(h=!0),w(k)}})})}}(m));return u(d,l,2);case 2:return Fa(d),u(d,g.destroy(),6);case 6:Ga(d,3);break;case 3:return d[\"return\"](!h)}})})}Z.prototype.list=function(){return om(this,Gm())};Z.prototype.list=Z.prototype.list;\nfunction Gm(){return t(function c(){var d,e,f;return z(c,function(c){switch(c.j){case 1:return qm(),d=[],e=new Nj,Aa(c,2),u(c,e.init(),4);case 4:return f=Promise.resolve(),Qj(e,function(c,e){f=f.then(function(){return t(function m(){var f;return z(m,function(g){switch(g.j){case 1:return u(g,e.getAllManifests(),2);case 2:f=g.o,f.forEach(function(e,f){var g=Yl(new ek(\"manifest\",c.wa,c.ba,f),e);d.push(g)}),w(g)}})})})}),u(c,f,2);case 2:return Fa(c),u(c,e.destroy(),6);case 6:Ga(c,3);break;case 3:return c[\"return\"](d)}})})}\nfunction rm(b,c,d){return t(function f(){var g,h,k,l,m,n;return z(f,function(f){switch(f.j){case 1:return g=null,h=b.b,k={networkingEngine:h,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(b){g=b}},u(f,d(),2);case 2:return l=f.o,l.configure(b.a.manifest),sm(b),Aa(f,3),u(f,l.start(c,k),5);case 5:return m=f.o,sm(b),n=Hm(m),u(f,Promise.all(kc(n,function(b){return b.createSegmentIndex()})),6);case 6:sm(b);if(g)throw g;\nreturn f[\"return\"](m);case 3:return Fa(f),u(f,l.stop(),7);case 7:Ga(f,0)}})})}function tm(b,c,d){return t(function f(){var g,h,k;return z(f,function(f){switch(f.j){case 1:return g=new Gc({ub:b.b,onError:d,qc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),h=ji(c.periods),k=b.a,g.configure(k.drm),u(f,Lc(g,h,k.offline.usePersistentLicense),2);case 2:return u(f,Vc(g),3);case 3:return u(f,Wc(g),4);case 4:return f[\"return\"](g)}})})}\nfunction ym(b,c,d,e,f,g,h){var k=new Zl,l=f.periods.map(function(e){return Im(b,c,d,k,f,e)}),m=e.a,n=b.a.offline.usePersistentLicense;m&&n&&(m.initData=[]);return{originalManifestUri:g,duration:f.presentationTimeline.Y(),size:0,expiration:e.Lb(),periods:l,sessionIds:n?cd(e):[],drmInfo:m,appMetadata:h}}\nfunction Im(b,c,d,e,f,g){for(var h=r(g.variants),k=h.next();!k.done;k=h.next())$l(e,k.value);h=r(g.textStreams);for(k=h.next();!k.done;k=h.next())e.a[k.value.id]=52;h=Jm(g);var l=new Map;h=r(h);for(k=h.next();!k.done;k=h.next()){k=k.value;var m=Km(b,c,d,e,f,k);l.set(k.id,m)}g.variants.forEach(function(b){b.audio&&l.get(b.audio.id).variantIds.push(b.id);b.video&&l.get(b.video.id).variantIds.push(b.id)});return{startTime:g.startTime,streams:Array.from(l.values())}}\nfunction Km(b,c,d,e,f,g){var h={id:g.id,originalId:g.originalId,primary:g.primary,presentationTimeOffset:g.presentationTimeOffset||0,contentType:g.type,mimeType:g.mimeType,codecs:g.codecs,frameRate:g.frameRate,pixelAspectRatio:g.pixelAspectRatio,kind:g.kind,language:g.language,label:g.label,width:g.width||null,height:g.height||null,initSegmentKey:null,encrypted:g.encrypted,keyId:g.keyId,segments:[],variantIds:[]};f=f.presentationTimeline.Ob();var k=g.id,l=g.initSegmentReference;l&&(l=rg(l.c(),l.b,\nl.a,b.a.streaming.retryParameters),Aj(c,k,l,.5*bm(e,g.id),!0,function(c){return t(function p(){var e;return z(p,function(f){switch(f.j){case 1:return u(f,d.addSegments([{data:c}]),2);case 2:e=f.o,b.c.push(e[0]),h.initSegmentKey=e[0],w(f)}})})}));Lm(g,f,function(f){var l=rg(f.c(),f.b,f.a,b.a.streaming.retryParameters);Aj(c,k,l,am(e,g.id,f),!1,function(c){return t(function x(){var e;return z(x,function(g){switch(g.j){case 1:return u(g,d.addSegments([{data:c}]),2);case 2:e=g.o,b.c.push(e[0]),h.segments.push({startTime:f.startTime,\nendTime:f.endTime,dataKey:e[0]}),w(g)}})})})});return h}function Lm(b,c,d){c=b.findSegmentPosition(c);for(var e=null==c?null:b.getSegmentReference(c);e;)d(e),e=b.getSegmentReference(++c)}function sm(b){if(b.h.a)throw new D(2,9,7001);}function qm(){if(!nm())throw new D(2,9,9E3);}function om(b,c){return t(function e(){return z(e,function(e){switch(e.j){case 1:return b.g.push(c),Aa(e,2),u(e,c,4);case 4:return e[\"return\"](e.o);case 2:Fa(e),Pb(b.g,c),Ga(e,0)}})})}\nfunction Em(b){var c=[];b.periods.forEach(function(b){b.streams.forEach(function(b){null!=b.initSegmentKey&&c.push(b.initSegmentKey);b.segments.forEach(function(b){c.push(b.dataKey)})})});return c}Z.deleteAll=function(){return t(function c(){var d;return z(c,function(c){switch(c.j){case 1:return d=new Nj,Aa(c,2),u(c,d.erase(),2);case 2:return Fa(c),u(c,d.destroy(),5);case 5:Ga(c,0)}})})};\nfunction Dm(b,c,d,e){return t(function g(){var h,k,l;return z(g,function(g){switch(g.j){case 1:if(!e.drmInfo)return g[\"return\"]();h=Tj(d);k=e.sessionIds.map(function(b){return{sessionId:b,keySystem:e.drmInfo.keySystem,licenseUri:e.drmInfo.licenseServerUri,serverCertificate:e.drmInfo.serverCertificate,audioCapabilities:Cm(e,!1),videoCapabilities:Cm(e,!0)}});return u(g,pk(c,b,k),2);case 2:return l=g.o,u(g,h.remove(l),3);case 3:return u(g,h.add(k.filter(function(b){return-1==l.indexOf(b.sessionId)})),\n0)}})})}function Hm(b){var c=new Set;b=r(b.periods);for(var d=b.next();!d.done;d=b.next()){d=d.value;for(var e=r(d.textStreams),f=e.next();!f.done;f=e.next())c.add(f.value);d=r(d.variants);for(e=d.next();!e.done;e=d.next())e=e.value,e.audio&&c.add(e.audio),e.video&&c.add(e.video)}return c}\nfunction Jm(b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())c.add(e.value);b=r(b.variants);for(d=b.next();!d.done;d=b.next())d=d.value,d.audio&&c.add(d.audio),d.video&&c.add(d.video);return c}function wm(b){if(0==b.periods.length)throw new D(2,4,4014);b=r(b.periods);for(var c=b.next();!c.done;c=b.next())Mm(c.value)}\nfunction Mm(b){b.variants.map(function(b){return b.video});var c=new Set(b.variants.map(function(b){return b.audio}));b=b.textStreams;for(var d=r(c),e=d.next();!e.done;e=d.next()){e=r(c);for(var f=e.next();!f.done;f=e.next());}c=r(b);for(d=c.next();!d.done;d=c.next())for(d=r(b),e=d.next();!e.done;e=d.next());}\nvar xm=(new Map).set(\"org.w3.clearkey\",\"1077efecc0b24d02ace33c1e52e2fb4b\").set(\"com.widevine.alpha\",\"edef8ba979d64acea3c827dcd51d21ed\").set(\"com.microsoft.playready\",\"9a04f07998404286ab92e65be0885f95\").set(\"com.adobe.primetime\",\"f239e769efa348509c16a903c6932efb\");cl.offline=nm;A(\"shaka.polyfill.installAll\",function(){for(var b=0;b=b?(Sm(),Tm()):Sm()):wc(\"Tizen\")&&Vm())});function Xm(b,c){try{var d=new Ym(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}\nfunction Ym(b,c){this.keySystem=b;if(b.startsWith(\"com.apple.fps\"))for(var d=r(c),e=d.next();!e.done;e=d.next()){var f=e.value;if(\"required\"==f.persistentState)e=null;else{e={audioCapabilities:[],videoCapabilities:[],persistentState:\"optional\",distinctiveIdentifier:\"optional\",initDataTypes:f.initDataTypes,sessionTypes:[\"temporary\"],label:f.label};var g=!1,h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),l=k.next();!l.done;l=k.next())if(l=l.value,l.contentType){g=!0;var m=l.contentType.split(\";\")[0];\nWebKitMediaKeys.isTypeSupported(this.keySystem,m)&&(e.audioCapabilities.push(l),h=!0)}if(f.videoCapabilities)for(f=r(f.videoCapabilities),l=f.next();!l.done;l=f.next())k=l.value,k.contentType&&(g=!0,l=k.contentType.split(\";\")[0],WebKitMediaKeys.isTypeSupported(this.keySystem,l)&&(e.videoCapabilities.push(k),h=!0));g||(h=WebKitMediaKeys.isTypeSupported(this.keySystem,\"video/mp4\"));e=h?e:null}if(e){this.a=e;return}}d=Error(\"Unsupported keySystem\");d.name=\"NotSupportedError\";d.code=DOMException.NOT_SUPPORTED_ERR;\nthrow d;}Ym.prototype.createMediaKeys=function(){var b=new Zm(this.keySystem);return Promise.resolve(b)};Ym.prototype.getConfiguration=function(){return this.a};function $m(b){var c=this.mediaKeys;c&&c!=b&&an(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?an(b,this):Promise.resolve()}function Zm(b){this.b=new WebKitMediaKeys(b);this.a=new K}\nZm.prototype.createSession=function(b){b=b||\"temporary\";if(\"temporary\"!=b)throw new TypeError(\"Session type \"+b+\" is unsupported on this platform.\");return new bn(this.b,b)};Zm.prototype.setServerCertificate=function(b){b&&new Uint8Array(b);return Promise.resolve(!0)};\nfunction an(b,c){b.a.$a();if(!c)return Promise.resolve();b.a.w(c,\"webkitneedkey\",cn);try{return 1<=c.readyState?c.webkitSetMediaKeys(b.b):b.a.da(c,\"loadedmetadata\",function(){c.webkitSetMediaKeys(b.b)}),Promise.resolve()}catch(d){return Promise.reject(d)}}function bn(b){Mb.call(this);this.b=null;this.g=b;this.c=this.a=null;this.f=new K;this.sessionId=\"\";this.expiration=NaN;this.closed=new F;this.keyStatuses=new dn}Xa(bn,Mb);q=bn.prototype;\nq.generateRequest=function(b,c){this.a=new F;try{this.b=this.g.createSession(\"video/mp4\",new Uint8Array(c)),this.sessionId=this.b.sessionId||\"\",this.f.w(this.b,\"webkitkeymessage\",this.og.bind(this)),this.f.w(this.b,\"webkitkeyadded\",this.mg.bind(this)),this.f.w(this.b,\"webkitkeyerror\",this.ng.bind(this)),en(this,\"status-pending\")}catch(d){this.a.reject(d)}return this.a};q.load=function(){return Promise.reject(Error(\"MediaKeySession.load not yet supported\"))};q.update=function(b){this.c=new F;try{this.b.update(new Uint8Array(b))}catch(c){this.c.reject(c)}return this.c};\nq.close=function(){try{this.b.close(),this.closed.resolve(),this.f.$a()}catch(b){this.closed.reject(b)}return this.closed};q.remove=function(){return Promise.reject(Error(\"MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform\"))};function cn(b){var c=new Event(\"encrypted\");c.initDataType=\"cenc\";c.initData=b.initData;this.dispatchEvent(c)}\nq.og=function(b){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new I(\"message\",{messageType:void 0==this.keyStatuses.a?\"license-request\":\"license-renewal\",message:b.message.buffer}))};q.mg=function(){this.c&&(en(this,\"usable\"),this.c.resolve(),this.c=null)};\nq.ng=function(){var b=Error(\"EME PatchedMediaKeysApple key error\");b.errorCode=this.b.error;if(null!=this.a)this.a.reject(b),this.a=null;else if(null!=this.c)this.c.reject(b),this.c=null;else switch(this.b.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:en(this,\"output-not-allowed\");break;default:en(this,\"internal-error\")}};function en(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new I(\"keystatuseschange\"))}\nfunction dn(){this.size=0;this.a=void 0}var fn;q=dn.prototype;q.forEach=function(b){this.a&&b(this.a,fn)};q.get=function(b){if(this.has(b))return this.a};q.has=function(b){var c=fn;return this.a&&L.za(new Uint8Array(b),new Uint8Array(c))?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};\nOm(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(fn=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=$m,window.MediaKeys=Zm,window.MediaKeySystemAccess=Ym,navigator.requestMediaKeySystemAccess=Xm)});function gn(b,c){try{var d=new hn(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}\nfunction hn(b,c){this.keySystem=b;for(var d=!1,e=0;e tag.\");if(\"default\"!=g&&\"preserve\"!=g)throw new D(2,2,2005,\"Invalid xml:space value: \"+g);g=\"default\"==g;h=new Rn(h,k,l,m);k=Sn(f.getElementsByTagName(\"metadata\")[0]);l=Sn(f.getElementsByTagName(\"styling\")[0]);m=Sn(f.getElementsByTagName(\"layout\")[0]);for(var n=[],p=0;pd.length)return f;var g=b;for(b=null;g&&!(b=g.getAttribute(c))&&(g=g.parentNode,g instanceof Element););if(c=b)for(c=c.split(\" \"),c=r(c),b=c.next();!b.done;b=c.next()){b=b.value;g=r(d);for(var h=g.next();!h.done;h=g.next())if(h=h.value,e+h.getAttribute(\"xml:id\")==b){f.push(h);break}}return f}\nfunction ho(b,c){var d=null;if(Yn.test(b)){d=Yn.exec(b);var e=Number(d[1]),f=Number(d[2]),g=Number(d[3]),h=Number(d[4]);h+=(Number(d[5])||0)/c.b;g+=h/c.frameRate;d=g+60*f+3600*e}else Zn.test(b)?d=no(Zn,b):$n.test(b)?d=no($n,b):ao.test(b)?(d=ao.exec(b),d=Number(d[1])/c.frameRate):bo.test(b)?(d=bo.exec(b),d=Number(d[1])/c.a):co.test(b)&&(d=no(co,b));return d}\nfunction no(b,c){var d=b.exec(c);return null==d||\"\"==d[0]?null:(Number(d[4])||0)/1E3+(Number(d[3])||0)+60*(Number(d[2])||0)+3600*(Number(d[1])||0)}function Rn(b,c,d,e){this.frameRate=Number(b)||30;this.b=Number(c)||1;this.a=Number(e);0==this.a&&(this.a=b?this.frameRate*this.b:1);d&&(b=/^(\\d+) (\\d+)$/g.exec(d))&&(this.frameRate*=Number(b[1])/Number(b[2]))}Xd[\"application/ttml+xml\"]=Qn;function oo(){this.a=new Qn}A(\"shaka.text.Mp4TtmlParser\",oo);oo.prototype.parseInit=function(b){var c=!1;(new R).H(\"moov\",xf).H(\"trak\",xf).H(\"mdia\",xf).H(\"minf\",xf).H(\"stbl\",xf).fa(\"stsd\",yf).H(\"stpp\",function(b){c=!0;b.parser.stop()}).parse(b);if(!c)throw new D(2,2,2007);};oo.prototype.parseInit=oo.prototype.parseInit;oo.prototype.parseMedia=function(b,c){var d=!1,e=[];(new R).H(\"mdat\",zf(function(b){d=!0;e=e.concat(this.a.parseMedia(b,c))}.bind(this))).parse(b);if(!d)throw new D(2,2,2007);return e};\noo.prototype.parseMedia=oo.prototype.parseMedia;Xd['application/mp4; codecs=\"stpp\"']=oo;Xd['application/mp4; codecs=\"stpp.ttml.im1t\"']=oo;Xd['application/mp4; codecs=\"stpp.TTML.im1t\"']=oo;function po(){}A(\"shaka.text.VttTextParser\",po);po.prototype.parseInit=function(){};po.prototype.parseInit=po.prototype.parseInit;\npo.prototype.parseMedia=function(b,c){var d=Bc(b);d=d.replace(/\\r\\n|\\r(?=[^\\n]|$)/gm,\"\\n\");d=d.split(/\\n{2,}/m);if(!/^WEBVTT($|[ \\t\\n])/m.test(d[0]))throw new D(2,2,2E3);var e=c.segmentStart;if(null==e&&(e=0,d[0].includes(\"X-TIMESTAMP-MAP\"))){var f=d[0].match(/LOCAL:((?:(\\d{1,}):)?(\\d{2}):(\\d{2})\\.(\\d{3}))/m),g=d[0].match(/MPEGTS:(\\d+)/m);if(f&&g){e=qo(new Ng(f[1]));if(null==e)throw new D(2,2,2E3);e=c.periodStart+(Number(g[1])/9E4-e)}}g=[];var h=d[0].split(\"\\n\");for(f=1;f= this._minDvrSize && this.getPlaybackType() === 'live';\n }\n }, {\n key: '_duration',\n get: function get() {\n if (!this.shakaPlayerInstance) return 0;\n\n return this.seekRange.end - this.seekRange.start;\n }\n }, {\n key: '_startTime',\n get: function get() {\n return this.seekRange.start;\n }\n }, {\n key: 'presentationTimeline',\n get: function get() {\n return this.shakaPlayerInstance.getManifest().presentationTimeline;\n }\n }, {\n key: 'bandwidthEstimate',\n get: function get() {\n if (!this.shakaPlayerInstance) return;\n return this.shakaPlayerInstance.getStats().estimatedBandwidth;\n }\n }], [{\n key: 'canPlay',\n value: function canPlay(resource) {\n var mimeType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n _shakaPlayer2.default.polyfill.installAll();\n var browserSupported = _shakaPlayer2.default.Player.isBrowserSupported();\n var resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || [];\n return browserSupported && (resourceParts[1] === 'mpd' || mimeType.indexOf('application/dash+xml') > -1);\n }\n }, {\n key: 'Events',\n get: function get() {\n return {\n SHAKA_READY: 'shaka:ready'\n };\n }\n }]);\n\n function DashShakaPlayback() {\n var _ref;\n\n _classCallCheck(this, DashShakaPlayback);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var _this = _possibleConstructorReturn(this, (_ref = DashShakaPlayback.__proto__ || Object.getPrototypeOf(DashShakaPlayback)).call.apply(_ref, [this].concat(args)));\n\n _this._levels = [];\n _this._pendingAdaptationEvent = false;\n _this._isShakaReadyState = false;\n\n _this._minDvrSize = typeof _this.options.shakaMinimumDvrSize === 'undefined' ? 60 : _this.options.shakaMinimumDvrSize;\n return _this;\n }\n\n _createClass(DashShakaPlayback, [{\n key: 'getProgramDateTime',\n value: function getProgramDateTime() {\n return new Date((this.presentationTimeline.getPresentationStartTime() + this.seekRange.start) * 1000);\n }\n }, {\n key: '_updateDvr',\n value: function _updateDvr(status) {\n this.trigger(_clappr.Events.PLAYBACK_DVR, status);\n this.trigger(_clappr.Events.PLAYBACK_STATS_ADD, { 'dvr': status });\n }\n }, {\n key: 'seek',\n value: function seek(time) {\n if (time < 0) {\n _clappr.Log.warn('Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point.');\n time = this._duration;\n }\n // assume live if time within 3 seconds of end of stream\n this.dvrEnabled && this._updateDvr(time < this._duration - 3);\n time += this._startTime;\n _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'seek', this).call(this, time);\n }\n }, {\n key: 'pause',\n value: function pause() {\n _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'pause', this).call(this);\n\n if (this.dvrEnabled) this._updateDvr(true);\n }\n }, {\n key: 'play',\n value: function play() {\n if (!this._player) {\n this._setup();\n }\n\n if (!this.isReady) {\n this.once(DashShakaPlayback.Events.SHAKA_READY, this.play);\n return;\n }\n\n this._stopped = false;\n this._src = this.el.src;\n _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'play', this).call(this);\n this._startTimeUpdateTimer();\n }\n }, {\n key: '_startTimeUpdateTimer',\n value: function _startTimeUpdateTimer() {\n var _this3 = this;\n\n this._stopTimeUpdateTimer();\n this._timeUpdateTimer = setInterval(function () {\n _this3._onTimeUpdate();\n }, 100);\n }\n }, {\n key: '_stopTimeUpdateTimer',\n value: function _stopTimeUpdateTimer() {\n this._timeUpdateTimer && clearInterval(this._timeUpdateTimer);\n }\n\n // skipping HTML5Video `_setupSrc` (on tag video)\n\n }, {\n key: '_setupSrc',\n value: function _setupSrc() {}\n\n // skipping ready event on video tag in favor of ready on shaka\n\n }, {\n key: '_ready',\n value: function _ready() {\n // override with no-op\n }\n }, {\n key: '_onShakaReady',\n value: function _onShakaReady() {\n this._isShakaReadyState = true;\n this.trigger(DashShakaPlayback.Events.SHAKA_READY);\n this.trigger(_clappr.Events.PLAYBACK_READY, this.name);\n }\n }, {\n key: 'error',\n\n\n // skipping error handling on video tag in favor of error on shaka\n value: function error(event) {\n _clappr.Log.error('an error was raised by the video tag', event, this.el.error);\n }\n }, {\n key: 'isHighDefinitionInUse',\n value: function isHighDefinitionInUse() {\n return false;\n }\n }, {\n key: 'stop',\n value: function stop() {\n var _this4 = this;\n\n this._stopTimeUpdateTimer();\n clearInterval(this.sendStatsId);\n this._stopped = true;\n\n if (this._player) {\n this._sendStats();\n\n this._player.unload().then(function () {\n _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'stop', _this4).call(_this4);\n _this4._player = null;\n _this4._isShakaReadyState = false;\n }).catch(function () {\n _clappr.Log.error('shaka could not be unloaded');\n });\n } else {\n _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'stop', this).call(this);\n }\n }\n }, {\n key: 'getPlaybackType',\n value: function getPlaybackType() {\n return (this.isReady && this._player.isLive() ? 'live' : 'vod') || '';\n }\n }, {\n key: 'selectAudioLanguage',\n value: function selectAudioLanguage(language) {\n var role = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n this._player.selectAudioLanguage(language, role);\n }\n }, {\n key: 'selectTrack',\n value: function selectTrack(track) {\n if (track.type === 'text') {\n this._player.selectTextTrack(track);\n } else if (track.type === 'variant') {\n this._player.selectVariantTrack(track);\n if (track.mimeType.startsWith('video/')) {\n // we trigger the adaptation event here\n // because Shaka doesn't trigger its event on \"manual\" selection.\n this._onAdaptation();\n }\n } else {\n throw new Error('Unhandled track type:', track.type);\n }\n }\n\n /**\n * @override\n */\n\n }, {\n key: '_enableShakaTextTrack',\n value: function _enableShakaTextTrack(isEnable) {\n // Shaka player use only one TextTrack object with video element to handle all text tracks\n // It must be enabled or disabled in addition to call selectTextTrack()\n if (!this.el.textTracks) {\n return;\n }\n\n this._shakaTTVisible = isEnable;\n\n Array.from(this.el.textTracks).filter(function (track) {\n return track.kind === 'subtitles';\n }).forEach(function (track) {\n return track.mode = isEnable === true ? 'showing' : 'hidden';\n });\n }\n }, {\n key: '_checkForClosedCaptions',\n value: function _checkForClosedCaptions() {\n if (this._ccIsSetup) {\n return;\n }\n\n if (this.hasClosedCaptionsTracks) {\n this.trigger(_clappr.Events.PLAYBACK_SUBTITLE_AVAILABLE);\n var trackId = this.closedCaptionsTrackId;\n this.closedCaptionsTrackId = trackId;\n }\n this._ccIsSetup = true;\n }\n }, {\n key: 'destroy',\n value: function destroy() {\n var _this5 = this;\n\n this._stopTimeUpdateTimer();\n clearInterval(this.sendStatsId);\n\n if (this._player) {\n this._player.destroy().then(function () {\n return _this5._destroy();\n }).catch(function () {\n _this5._destroy();\n _clappr.Log.error('shaka could not be destroyed');\n });\n } else {\n this._destroy();\n }\n\n _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'destroy', this).call(this);\n }\n }, {\n key: '_setup',\n value: function _setup() {\n var _this6 = this;\n\n this._isShakaReadyState = false;\n this._ccIsSetup = false;\n this._player = this._createPlayer();\n this._options.shakaConfiguration && this._player.configure(this._options.shakaConfiguration);\n this._options.shakaOnBeforeLoad && this._options.shakaOnBeforeLoad(this._player);\n\n var playerLoaded = this._player.load(this._options.src);\n playerLoaded.then(function () {\n return _this6._loaded();\n }).catch(function (e) {\n return _this6._setupError(e);\n });\n }\n }, {\n key: '_createPlayer',\n value: function _createPlayer() {\n var player = new _shakaPlayer2.default.Player(this.el);\n player.addEventListener('error', this._onError.bind(this));\n player.addEventListener('adaptation', this._onAdaptation.bind(this));\n player.addEventListener('buffering', this._onBuffering.bind(this));\n return player;\n }\n }, {\n key: '_onTimeUpdate',\n value: function _onTimeUpdate() {\n if (!this.shakaPlayerInstance) return;\n\n var update = {\n current: this.getCurrentTime(),\n total: this.getDuration(),\n firstFragDateTime: this.getProgramDateTime()\n };\n var isSame = this._lastTimeUpdate && update.current === this._lastTimeUpdate.current && update.total === this._lastTimeUpdate.total;\n if (isSame) return;\n\n this._lastTimeUpdate = update;\n this.trigger(_clappr.Events.PLAYBACK_TIMEUPDATE, update, this.name);\n }\n }, {\n key: '_onBuffering',\n value: function _onBuffering(e) {\n if (this._stopped) return;\n var event = e.buffering ? _clappr.Events.PLAYBACK_BUFFERING : _clappr.Events.PLAYBACK_BUFFERFULL;\n this.trigger(event);\n }\n }, {\n key: '_loaded',\n value: function _loaded() {\n this._onShakaReady();\n this._startToSendStats();\n this._fillLevels();\n this._checkForClosedCaptions();\n }\n }, {\n key: '_fillLevels',\n value: function _fillLevels() {\n if (this._levels.length === 0) {\n this._levels = this.videoTracks.slice(0).reverse();\n this.trigger(_clappr.Events.PLAYBACK_LEVELS_AVAILABLE, this.levels);\n }\n }\n }, {\n key: '_startToSendStats',\n value: function _startToSendStats() {\n var _this7 = this;\n\n var intervalMs = this._options.shakaSendStatsInterval || SEND_STATS_INTERVAL_MS;\n this.sendStatsId = setInterval(function () {\n return _this7._sendStats();\n }, intervalMs);\n }\n }, {\n key: '_sendStats',\n value: function _sendStats() {\n this.trigger(_clappr.Events.PLAYBACK_STATS_ADD, this._player.getStats());\n }\n }, {\n key: '_setupError',\n value: function _setupError(err) {\n this._onError(err);\n }\n }, {\n key: '_onError',\n value: function _onError(err) {\n var _this8 = this;\n\n var error = {\n shakaError: err,\n videoError: this.el.error\n };\n\n var _ref2 = error.shakaError.detail || error.shakaError,\n category = _ref2.category,\n code = _ref2.code,\n severity = _ref2.severity;\n\n if (error.videoError || !code && !category) return _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), '_onError', this).call(this);\n\n var isCritical = severity === _shakaPlayer2.default.util.Error.Severity.CRITICAL;\n var errorData = {\n code: category + '_' + code,\n description: 'Category: ' + category + ', code: ' + code + ', severity: ' + severity,\n level: isCritical ? _clappr.PlayerError.Levels.FATAL : _clappr.PlayerError.Levels.WARN,\n raw: err\n };\n var formattedError = this.createError(errorData);\n _clappr.Log.error('Shaka error event:', formattedError);\n this.trigger(_clappr.Events.PLAYBACK_ERROR, formattedError);\n\n // try to handle http fail by restarting\n if (err.detail && err.detail.severity == 2 && err.detail.code == 1002) {\n console.log(\"retrying\");\n this.stop();\n setTimeout(function () {\n return _this8.play();\n }, 1000);\n }\n }\n }, {\n key: '_onAdaptation',\n value: function _onAdaptation() {\n var activeVideo = this.videoTracks.filter(function (t) {\n return t.active === true;\n })[0];\n\n this._fillLevels();\n\n // update stats that may have changed before we trigger event\n // so that user can rely on stats data when handling event\n this._sendStats();\n\n if (this._pendingAdaptationEvent) {\n this.trigger(_clappr.Events.PLAYBACK_LEVEL_SWITCH_END);\n this._pendingAdaptationEvent = false;\n }\n\n _clappr.Log.debug('an adaptation has happened:', activeVideo);\n this.highDefinition = activeVideo.height >= 720;\n this.trigger(_clappr.Events.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition);\n this.trigger(_clappr.Events.PLAYBACK_BITRATE, {\n bandwidth: activeVideo.bandwidth,\n width: activeVideo.width,\n height: activeVideo.height,\n language: activeVideo.language,\n level: activeVideo.id,\n bitrate: activeVideo.videoBandwidth\n });\n }\n }, {\n key: '_updateSettings',\n value: function _updateSettings() {\n if (this.getPlaybackType() === 'vod') this.settings.left = ['playpause', 'position', 'duration'];else if (this.dvrEnabled) this.settings.left = ['playpause'];else this.settings.left = ['playstop'];\n\n this.settings.seekEnabled = this.isSeekEnabled();\n this.trigger(_clappr.Events.PLAYBACK_SETTINGSUPDATE);\n }\n }, {\n key: '_destroy',\n value: function _destroy() {\n this._isShakaReadyState = false;\n _clappr.Log.debug('shaka was destroyed');\n }\n }, {\n key: 'isReady',\n get: function get() {\n return this._isShakaReadyState;\n }\n }, {\n key: 'textTracks',\n get: function get() {\n return this.isReady && this._player.getTextTracks();\n }\n }, {\n key: 'audioLanguages',\n get: function get() {\n return this.isReady && this._player.getAudioLanguages();\n }\n }, {\n key: 'audioTracks',\n get: function get() {\n return this.isReady && this._player.getVariantTracks().filter(function (t) {\n return t.mimeType.startsWith('audio/');\n });\n }\n }, {\n key: 'videoTracks',\n get: function get() {\n return this.isReady && this._player.getVariantTracks().filter(function (t) {\n return t.mimeType.startsWith('video/');\n });\n }\n }, {\n key: 'closedCaptionsTracks',\n get: function get() {\n var id = 0;\n var trackId = function trackId() {\n return id++;\n };\n var tracks = this.textTracks || [];\n\n return tracks.filter(function (track) {\n return track.kind === 'subtitle';\n }).map(function (track) {\n return { id: trackId(), name: track.label || track.language, track: track };\n });\n }\n\n /**\n * @override\n */\n\n }, {\n key: 'closedCaptionsTrackId',\n get: function get() {\n return _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'closedCaptionsTrackId', this);\n }\n\n /**\n * @override\n */\n ,\n set: function set(trackId) {\n if (!this._player) {\n return;\n }\n\n var tracks = this.closedCaptionsTracks;\n var showingTrack = void 0;\n\n // Note: -1 is for hide all tracks\n if (trackId !== -1) {\n showingTrack = tracks.find(function (track) {\n return track.id === trackId;\n });\n if (!showingTrack) {\n _clappr.Log.warn('Track id \"' + trackId + '\" not found');\n return;\n }\n if (this._shakaTTVisible && showingTrack.track.active === true) {\n _clappr.Log.info('Track id \"' + trackId + '\" already showing');\n return;\n }\n }\n\n if (showingTrack) {\n this._player.selectTextTrack(showingTrack.track);\n this._player.setTextTrackVisibility(true);\n this._enableShakaTextTrack(true);\n } else {\n this._player.setTextTrackVisibility(false);\n this._enableShakaTextTrack(false);\n }\n\n this._ccTrackId = trackId;\n this.trigger(_clappr.Events.PLAYBACK_SUBTITLE_CHANGED, {\n id: trackId\n });\n }\n }]);\n\n return DashShakaPlayback;\n}(_clappr.HTML5Video);\n\nexports.default = DashShakaPlayback;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"clappr\":\n/*!******************************************************************************************!*\\\n !*** external {\"amd\":\"clappr\",\"commonjs\":\"clappr\",\"commonjs2\":\"clappr\",\"root\":\"Clappr\"} ***!\n \\******************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_clappr__;\n\n/***/ })\n\n/******/ });\n});\n//# sourceMappingURL=dash-shaka-playback.js.map","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"clappr\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"clappr\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"LevelSelector\"] = factory(require(\"clappr\"));\n\telse\n\t\troot[\"LevelSelector\"] = factory(root[\"Clappr\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_84__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"<%=baseUrl%>/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 40);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nvar core = module.exports = { version: '2.6.11' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar anObject = __webpack_require__(10);\nvar IE8_DOM_DEFINE = __webpack_require__(29);\nvar toPrimitive = __webpack_require__(15);\nvar dP = Object.defineProperty;\n\nexports.f = __webpack_require__(3) ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !__webpack_require__(11)(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\nvar hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar dP = __webpack_require__(2);\nvar createDesc = __webpack_require__(12);\nmodule.exports = __webpack_require__(3) ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = __webpack_require__(56);\nvar defined = __webpack_require__(17);\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar store = __webpack_require__(22)('wks');\nvar uid = __webpack_require__(14);\nvar Symbol = __webpack_require__(0).Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(0);\nvar core = __webpack_require__(1);\nvar ctx = __webpack_require__(28);\nvar hide = __webpack_require__(5);\nvar has = __webpack_require__(4);\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var key, own, out;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && has(exports, key)) continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0: return new C();\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(6);\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports) {\n\nmodule.exports = true;\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports) {\n\nvar id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = __webpack_require__(6);\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports) {\n\n// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports) {\n\n// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports) {\n\nmodule.exports = {};\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = __webpack_require__(10);\nvar dPs = __webpack_require__(55);\nvar enumBugKeys = __webpack_require__(23);\nvar IE_PROTO = __webpack_require__(21)('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = __webpack_require__(30)('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n __webpack_require__(60).appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = __webpack_require__(34);\nvar enumBugKeys = __webpack_require__(23);\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar shared = __webpack_require__(22)('keys');\nvar uid = __webpack_require__(14);\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar core = __webpack_require__(1);\nvar global = __webpack_require__(0);\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: __webpack_require__(13) ? 'pure' : 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n});\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\n// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar def = __webpack_require__(2).f;\nvar has = __webpack_require__(4);\nvar TAG = __webpack_require__(8)('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports.f = __webpack_require__(8);\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(0);\nvar core = __webpack_require__(1);\nvar LIBRARY = __webpack_require__(13);\nvar wksExt = __webpack_require__(25);\nvar defineProperty = __webpack_require__(2).f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports) {\n\nexports.f = {}.propertyIsEnumerable;\n\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// optional / simple context binding\nvar aFunction = __webpack_require__(48);\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = !__webpack_require__(3) && !__webpack_require__(11)(function () {\n return Object.defineProperty(__webpack_require__(30)('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(6);\nvar document = __webpack_require__(0).document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\n\nvar _iterator = __webpack_require__(50);\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = __webpack_require__(66);\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _typeof = typeof _symbol2.default === \"function\" && typeof _iterator2.default === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar LIBRARY = __webpack_require__(13);\nvar $export = __webpack_require__(9);\nvar redefine = __webpack_require__(33);\nvar hide = __webpack_require__(5);\nvar Iterators = __webpack_require__(18);\nvar $iterCreate = __webpack_require__(54);\nvar setToStringTag = __webpack_require__(24);\nvar getPrototypeOf = __webpack_require__(61);\nvar ITERATOR = __webpack_require__(8)('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(5);\n\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar has = __webpack_require__(4);\nvar toIObject = __webpack_require__(7);\nvar arrayIndexOf = __webpack_require__(57)(false);\nvar IE_PROTO = __webpack_require__(21)('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports) {\n\nvar toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.1.13 ToObject(argument)\nvar defined = __webpack_require__(17);\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports) {\n\nexports.f = Object.getOwnPropertySymbols;\n\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = __webpack_require__(34);\nvar hiddenKeys = __webpack_require__(23).concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar pIE = __webpack_require__(27);\nvar createDesc = __webpack_require__(12);\nvar toIObject = __webpack_require__(7);\nvar toPrimitive = __webpack_require__(15);\nvar has = __webpack_require__(4);\nvar IE8_DOM_DEFINE = __webpack_require__(29);\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = __webpack_require__(3) ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(exports,\"__esModule\",{value:true});var _main=__webpack_require__(41);var _main2=_interopRequireDefault(_main);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default=_main2.default;module.exports=exports['default'];\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {Object.defineProperty(exports,\"__esModule\",{value:true});var _classCallCheck2=__webpack_require__(43);var _classCallCheck3=_interopRequireDefault(_classCallCheck2);var _createClass2=__webpack_require__(44);var _createClass3=_interopRequireDefault(_createClass2);var _possibleConstructorReturn2=__webpack_require__(49);var _possibleConstructorReturn3=_interopRequireDefault(_possibleConstructorReturn2);var _inherits2=__webpack_require__(76);var _inherits3=_interopRequireDefault(_inherits2);var _clappr=__webpack_require__(84);var _levelSelector=__webpack_require__(85);var _levelSelector2=_interopRequireDefault(_levelSelector);var _style=__webpack_require__(86);var _style2=_interopRequireDefault(_style);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var AUTO=-1;var LevelSelector=function(_UICorePlugin){(0,_inherits3.default)(LevelSelector,_UICorePlugin);function LevelSelector(){(0,_classCallCheck3.default)(this,LevelSelector);return(0,_possibleConstructorReturn3.default)(this,_UICorePlugin.apply(this,arguments));}LevelSelector.prototype.bindEvents=function bindEvents(){this.listenTo(this.core,_clappr.Events.CORE_READY,this.bindPlaybackEvents);if(_clappr.Events.CORE_ACTIVE_CONTAINER_CHANGED)this.listenTo(this.core,_clappr.Events.CORE_ACTIVE_CONTAINER_CHANGED,this.reload);else this.listenTo(this.core.mediaControl,_clappr.Events.MEDIACONTROL_CONTAINERCHANGED,this.reload);this.listenTo(this.core.mediaControl,_clappr.Events.MEDIACONTROL_RENDERED,this.render);this.listenTo(this.core.mediaControl,_clappr.Events.MEDIACONTROL_HIDE,this.hideSelectLevelMenu);};LevelSelector.prototype.bindPlaybackEvents=function bindPlaybackEvents(){if(!this.playback)return;this.listenTo(this.playback,_clappr.Events.PLAYBACK_LEVELS_AVAILABLE,this.fillLevels);this.listenTo(this.playback,_clappr.Events.PLAYBACK_LEVEL_SWITCH_START,this.startLevelSwitch);this.listenTo(this.playback,_clappr.Events.PLAYBACK_LEVEL_SWITCH_END,this.stopLevelSwitch);this.listenTo(this.playback,_clappr.Events.PLAYBACK_BITRATE,this.updateCurrentLevel);var playbackLevelsAvailableWasTriggered=this.playback.levels&&this.playback.levels.length>0;playbackLevelsAvailableWasTriggered&&this.fillLevels(this.playback.levels);};LevelSelector.prototype.reload=function reload(){var _this2=this;this.stopListening();// Ensure it stop listening before rebind events (avoid duplicate events)\nprocess.nextTick(function(){_this2.bindEvents();_this2.bindPlaybackEvents();});};LevelSelector.prototype.shouldRender=function shouldRender(){if(!this.container||!this.playback)return false;var respondsToCurrentLevel=this.playback.currentLevel!==undefined;// Only care if we have at least 2 to choose from\nvar hasLevels=!!(this.levels&&this.levels.length>1);return respondsToCurrentLevel&&hasLevels;};LevelSelector.prototype.render=function render(){if(this.shouldRender()){var style=_clappr.Styler.getStyleFor(_style2.default,{baseUrl:this.core.options.baseUrl});this.$el.html(this.template({'levels':this.levels,'title':this.getTitle()}));this.$el.append(style);this.core.mediaControl.$('.media-control-right-panel').append(this.el);this.$('.level_selector ul').css('max-height',this.core.el.offsetHeight*0.8);this.highlightCurrentLevel();}return this;};LevelSelector.prototype.fillLevels=function fillLevels(levels){var initialLevel=arguments.length>1&&arguments[1]!==undefined?arguments[1]:AUTO;if(this.selectedLevelId===undefined)this.selectedLevelId=initialLevel;var onLevelsAvailable=this.core.options&&this.core.options.levelSelectorConfig&&this.core.options.levelSelectorConfig.onLevelsAvailable;if(onLevelsAvailable){if(typeof onLevelsAvailable==='function')levels=onLevelsAvailable(levels.slice());else throw new TypeError('onLevelsAvailable must be a function');}this.levels=levels;this.configureLevelsLabels();this.render();};LevelSelector.prototype.configureLevelsLabels=function configureLevelsLabels(){if(this.core.options.levelSelectorConfig===undefined)return;var labelCallback=this.core.options.levelSelectorConfig.labelCallback;if(labelCallback&&typeof labelCallback!=='function')throw new TypeError('labelCallback must be a function');var hasLabels=this.core.options.levelSelectorConfig.labels;var labels=hasLabels?this.core.options.levelSelectorConfig.labels:{};if(labelCallback||hasLabels){var level=void 0;var label=void 0;for(var levelId in this.levels){level=this.levels[levelId];label=labels[level.id];if(labelCallback)level.label=labelCallback(level,label);else if(label)level.label=label;}}};LevelSelector.prototype.findLevelBy=function findLevelBy(id){var foundLevel=void 0;this.levels.forEach(function(level){if(level.id===id)foundLevel=level;});return foundLevel;};LevelSelector.prototype.onLevelSelect=function onLevelSelect(event){this.selectedLevelId=parseInt(event.target.dataset.levelSelectorSelect,10);if(this.playback.currentLevel==this.selectedLevelId)return false;this.playback.currentLevel=this.selectedLevelId;this.toggleContextMenu();event.stopPropagation();return false;};LevelSelector.prototype.onShowLevelSelectMenu=function onShowLevelSelectMenu(){this.toggleContextMenu();};LevelSelector.prototype.hideSelectLevelMenu=function hideSelectLevelMenu(){this.$('.level_selector ul').hide();};LevelSelector.prototype.toggleContextMenu=function toggleContextMenu(){this.$('.level_selector ul').toggle();};LevelSelector.prototype.buttonElement=function buttonElement(){return this.$('.level_selector button');};LevelSelector.prototype.levelElement=function levelElement(id){return this.$('.level_selector ul a'+(!isNaN(id)?'[data-level-selector-select=\"'+id+'\"]':'')).parent();};LevelSelector.prototype.getTitle=function getTitle(){return(this.core.options.levelSelectorConfig||{}).title;};LevelSelector.prototype.startLevelSwitch=function startLevelSwitch(){this.buttonElement().addClass('changing');};LevelSelector.prototype.stopLevelSwitch=function stopLevelSwitch(){this.buttonElement().removeClass('changing');};LevelSelector.prototype.updateText=function updateText(level){if(level===AUTO)this.buttonElement().text(this.currentLevel?'AUTO ('+this.currentLevel.label+')':'AUTO');else this.buttonElement().text(this.findLevelBy(level).label);};LevelSelector.prototype.updateCurrentLevel=function updateCurrentLevel(info){var level=this.findLevelBy(info.level);this.currentLevel=level?level:null;this.highlightCurrentLevel();};LevelSelector.prototype.highlightCurrentLevel=function highlightCurrentLevel(){var _this3=this;this.levelElement().removeClass('current');this.currentLevel&&this.levelElement(this.currentLevel.id).addClass('current');this.updateText(this.selectedLevelId);// hide levels with other languages\nvar currentLanguage=this.currentLevel&&this.currentLevel.language;if(currentLanguage){this.levelElement().removeClass('hidden');this.levels.forEach(function(level){if(level.language!=currentLanguage)_this3.levelElement(level.id).addClass('hidden');});}};(0,_createClass3.default)(LevelSelector,[{key:'name',get:function get(){return'level_selector';}},{key:'template',get:function get(){return(0,_clappr.template)(_levelSelector2.default);}},{key:'attributes',get:function get(){return{'class':this.name,'data-level-selector':''};}},{key:'events',get:function get(){return{'click [data-level-selector-select]':'onLevelSelect','click [data-level-selector-button]':'onShowLevelSelectMenu'};}},{key:'container',get:function get(){return this.core.activeContainer?this.core.activeContainer:this.core.mediaControl.container;}},{key:'playback',get:function get(){return this.core.activePlayback?this.core.activePlayback:this.core.getCurrentPlayback();}}],[{key:'version',get:function get(){return VERSION;}}]);return LevelSelector;}(_clappr.UICorePlugin);exports.default=LevelSelector;module.exports=exports['default'];\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(42)))\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports) {\n\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\n\nvar _defineProperty = __webpack_require__(45);\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = 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 (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\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/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = { \"default\": __webpack_require__(46), __esModule: true };\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(47);\nvar $Object = __webpack_require__(1).Object;\nmodule.exports = function defineProperty(it, key, desc) {\n return $Object.defineProperty(it, key, desc);\n};\n\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $export = __webpack_require__(9);\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !__webpack_require__(3), 'Object', { defineProperty: __webpack_require__(2).f });\n\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\n\nvar _typeof2 = __webpack_require__(31);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && ((typeof call === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(call)) === \"object\" || typeof call === \"function\") ? call : self;\n};\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = { \"default\": __webpack_require__(51), __esModule: true };\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(52);\n__webpack_require__(62);\nmodule.exports = __webpack_require__(25).f('iterator');\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $at = __webpack_require__(53)(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\n__webpack_require__(32)(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toInteger = __webpack_require__(16);\nvar defined = __webpack_require__(17);\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar create = __webpack_require__(19);\nvar descriptor = __webpack_require__(12);\nvar setToStringTag = __webpack_require__(24);\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n__webpack_require__(5)(IteratorPrototype, __webpack_require__(8)('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar dP = __webpack_require__(2);\nvar anObject = __webpack_require__(10);\nvar getKeys = __webpack_require__(20);\n\nmodule.exports = __webpack_require__(3) ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = __webpack_require__(35);\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = __webpack_require__(7);\nvar toLength = __webpack_require__(58);\nvar toAbsoluteIndex = __webpack_require__(59);\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.1.15 ToLength\nvar toInteger = __webpack_require__(16);\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toInteger = __webpack_require__(16);\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar document = __webpack_require__(0).document;\nmodule.exports = document && document.documentElement;\n\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = __webpack_require__(4);\nvar toObject = __webpack_require__(36);\nvar IE_PROTO = __webpack_require__(21)('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(63);\nvar global = __webpack_require__(0);\nvar hide = __webpack_require__(5);\nvar Iterators = __webpack_require__(18);\nvar TO_STRING_TAG = __webpack_require__(8)('toStringTag');\n\nvar DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +\n 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +\n 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +\n 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +\n 'TextTrackList,TouchList').split(',');\n\nfor (var i = 0; i < DOMIterables.length; i++) {\n var NAME = DOMIterables[i];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}\n\n\n/***/ }),\n/* 63 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar addToUnscopables = __webpack_require__(64);\nvar step = __webpack_require__(65);\nvar Iterators = __webpack_require__(18);\nvar toIObject = __webpack_require__(7);\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = __webpack_require__(32)(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports) {\n\nmodule.exports = function () { /* empty */ };\n\n\n/***/ }),\n/* 65 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = { \"default\": __webpack_require__(67), __esModule: true };\n\n/***/ }),\n/* 67 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(68);\n__webpack_require__(73);\n__webpack_require__(74);\n__webpack_require__(75);\nmodule.exports = __webpack_require__(1).Symbol;\n\n\n/***/ }),\n/* 68 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n// ECMAScript 6 symbols shim\nvar global = __webpack_require__(0);\nvar has = __webpack_require__(4);\nvar DESCRIPTORS = __webpack_require__(3);\nvar $export = __webpack_require__(9);\nvar redefine = __webpack_require__(33);\nvar META = __webpack_require__(69).KEY;\nvar $fails = __webpack_require__(11);\nvar shared = __webpack_require__(22);\nvar setToStringTag = __webpack_require__(24);\nvar uid = __webpack_require__(14);\nvar wks = __webpack_require__(8);\nvar wksExt = __webpack_require__(25);\nvar wksDefine = __webpack_require__(26);\nvar enumKeys = __webpack_require__(70);\nvar isArray = __webpack_require__(71);\nvar anObject = __webpack_require__(10);\nvar isObject = __webpack_require__(6);\nvar toObject = __webpack_require__(36);\nvar toIObject = __webpack_require__(7);\nvar toPrimitive = __webpack_require__(15);\nvar createDesc = __webpack_require__(12);\nvar _create = __webpack_require__(19);\nvar gOPNExt = __webpack_require__(72);\nvar $GOPD = __webpack_require__(39);\nvar $GOPS = __webpack_require__(37);\nvar $DP = __webpack_require__(2);\nvar $keys = __webpack_require__(20);\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n __webpack_require__(38).f = gOPNExt.f = $getOwnPropertyNames;\n __webpack_require__(27).f = $propertyIsEnumerable;\n $GOPS.f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !__webpack_require__(13)) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\nvar FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });\n\n$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return $GOPS.f(toObject(it));\n }\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(5)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n\n\n/***/ }),\n/* 69 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar META = __webpack_require__(14)('meta');\nvar isObject = __webpack_require__(6);\nvar has = __webpack_require__(4);\nvar setDesc = __webpack_require__(2).f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !__webpack_require__(11)(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n\n\n/***/ }),\n/* 70 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// all enumerable object keys, includes symbols\nvar getKeys = __webpack_require__(20);\nvar gOPS = __webpack_require__(37);\nvar pIE = __webpack_require__(27);\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n\n\n/***/ }),\n/* 71 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.2.2 IsArray(argument)\nvar cof = __webpack_require__(35);\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n\n\n/***/ }),\n/* 72 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = __webpack_require__(7);\nvar gOPN = __webpack_require__(38).f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n\n\n/***/ }),\n/* 73 */\n/***/ (function(module, exports) {\n\n\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(26)('asyncIterator');\n\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(26)('observable');\n\n\n/***/ }),\n/* 76 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\n\nvar _setPrototypeOf = __webpack_require__(77);\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nvar _create = __webpack_require__(81);\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = __webpack_require__(31);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(superClass)));\n }\n\n subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\n/***/ }),\n/* 77 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = { \"default\": __webpack_require__(78), __esModule: true };\n\n/***/ }),\n/* 78 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(79);\nmodule.exports = __webpack_require__(1).Object.setPrototypeOf;\n\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = __webpack_require__(9);\n$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(80).set });\n\n\n/***/ }),\n/* 80 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = __webpack_require__(6);\nvar anObject = __webpack_require__(10);\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = __webpack_require__(28)(Function.call, __webpack_require__(39).f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n\n\n/***/ }),\n/* 81 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = { \"default\": __webpack_require__(82), __esModule: true };\n\n/***/ }),\n/* 82 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(83);\nvar $Object = __webpack_require__(1).Object;\nmodule.exports = function create(P, D) {\n return $Object.create(P, D);\n};\n\n\n/***/ }),\n/* 83 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $export = __webpack_require__(9);\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', { create: __webpack_require__(19) });\n\n\n/***/ }),\n/* 84 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_84__;\n\n/***/ }),\n/* 85 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\\n Auto\\n \\n\\n <% if (title) { %>\\n <%= title %> \\n <% }; %>\\n AUTO \\n <% for (var i = 0; i < levels.length; i++) { %>\\n \\\"><%= levels[i].label %> \\n <% }; %>\\n \\n\";\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// style-loader: Adds some css to the DOM by adding a