Ninjaxd666

http://tvninjaxd.blogspot.com/clappr.js

Jul 30th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 476.65 KB | None | 0 0
  1. !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="/",e(0)}([function(t,e,n){t.exports=n(2)},function(t,e,n){!function(e,n){t.exports=n()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="<%=baseUrl%>/",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i),a=n(2),s=r(a),l=n(5),u=r(l),c=n(31),d=r(c),f=n(85),h=r(f),p=n(105),g=r(p),y=n(100),v=r(y),m=n(80),b=r(m),_=n(4),E=r(_),T=n(18),A=r(T),k=n(3),w=r(k),S=n(22),R=r(S),L=n(13),O=r(L),C=n(48),P=r(C),D=n(30),I=r(D),x=n(27),N=r(x),M=n(45),F=r(M),B=n(56),U=r(B),j=n(54),G=r(j),Y=n(63),V=r(Y),K=n(67),$=r(K),H=n(61),z=r(H),W=n(51),q=r(W),X=n(71),Z=r(X),J=n(74),Q=r(J),tt=n(90),et=r(tt),nt=n(6),rt=r(nt),it=n(15),ot=r(it),at=n(8),st=r(at),lt=n(17),ut=r(lt),ct=n(16),dt=r(ct),ft="0.2.65";e.default={Player:o.default,Mediator:I.default,Events:u.default,Browser:w.default,PlayerInfo:F.default,MediaControl:N.default,ContainerPlugin:h.default,UIContainerPlugin:b.default,CorePlugin:g.default,UICorePlugin:v.default,Playback:d.default,Container:R.default,Core:O.default,Loader:P.default,BaseObject:E.default,UIObject:A.default,Utils:s.default,BaseFlashPlayback:U.default,Flash:G.default,FlasHLS:V.default,HLS:$.default,HTML5Audio:z.default,HTML5Video:q.default,HTMLImg:Z.default,NoOp:Q.default,Poster:et.default,Log:rt.default,Styler:ot.default,Vendor:st.default,version:ft,template:ut.default,$:dt.default},t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(2),u=n(4),c=r(u),d=n(5),f=r(d),h=n(3),p=r(h),g=n(11),y=r(g),v=n(48),m=r(v),b=n(45),_=r(b),E=n(16),T=r(E),A=(0,l.currentScriptUrl)().replace(/\/[^\/]+$/,""),k=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n)),a={playerId:(0,l.uniqueId)(""),persistConfig:!0,width:640,height:360,baseUrl:A,allowUserInteraction:p.default.isMobile};return r._options=T.default.extend(a,n),r.options.sources=r._normalizeSources(n),r.options.chromeless||(r.options.allowUserInteraction=!0),r.options.allowUserInteraction||(r.options.disableKeyboardShortcuts=!0),r._registerOptionEventListeners(),r._coreFactory=new y.default(r),r.playerInfo=_.default.getInstance(r.options.playerId),r.playerInfo.currentSize={width:n.width,height:n.height},r.playerInfo.options=r.options,r.options.parentId?r.setParentId(r.options.parentId):r.options.parent&&r.attachTo(r.options.parent),r}return a(e,t),s(e,[{key:"loader",set:function(t){this._loader=t},get:function(){return this._loader||(this._loader=new m.default(this.options.plugins||{},this.options.playerId)),this._loader}},{key:"ended",get:function(){return this.core.mediaControl.container.ended}},{key:"buffering",get:function(){return this.core.mediaControl.container.buffering}},{key:"isReady",get:function(){return!!this._ready}},{key:"eventsMapping",get:function(){return{onReady:f.default.PLAYER_READY,onResize:f.default.PLAYER_RESIZE,onPlay:f.default.PLAYER_PLAY,onPause:f.default.PLAYER_PAUSE,onStop:f.default.PLAYER_STOP,onEnded:f.default.PLAYER_ENDED,onSeek:f.default.PLAYER_SEEK,onError:f.default.PLAYER_ERROR,onTimeUpdate:f.default.PLAYER_TIMEUPDATE,onVolumeUpdate:f.default.PLAYER_VOLUMEUPDATE}}}]),e.prototype.setParentId=function(t){var e=document.querySelector(t);return e&&this.attachTo(e),this},e.prototype.attachTo=function(t){return this.options.parentElement=t,this.core=this._coreFactory.create(),this._addEventListeners(),this},e.prototype._addEventListeners=function(){return this.core.isReady?this._onReady():this.listenToOnce(this.core,f.default.CORE_READY,this._onReady),this.listenTo(this.core.mediaControl,f.default.MEDIACONTROL_CONTAINERCHANGED,this._containerChanged),this.listenTo(this.core,f.default.CORE_FULLSCREEN,this._onFullscreenChange),this},e.prototype._addContainerEventListeners=function(){var t=this.core.mediaControl.container;return t&&(this.listenTo(t,f.default.CONTAINER_PLAY,this._onPlay),this.listenTo(t,f.default.CONTAINER_PAUSE,this._onPause),this.listenTo(t,f.default.CONTAINER_STOP,this._onStop),this.listenTo(t,f.default.CONTAINER_ENDED,this._onEnded),this.listenTo(t,f.default.CONTAINER_SEEK,this._onSeek),this.listenTo(t,f.default.CONTAINER_ERROR,this._onError),this.listenTo(t,f.default.CONTAINER_TIMEUPDATE,this._onTimeUpdate),this.listenTo(t,f.default.CONTAINER_VOLUME,this._onVolumeUpdate)),this},e.prototype._registerOptionEventListeners=function(){var t=this,e=this.options.events||{};return Object.keys(e).forEach(function(n){var r=t.eventsMapping[n];if(r){var i=e[n];i="function"==typeof i&&i,i&&t.on(r,i)}}),this},e.prototype._containerChanged=function(){this.stopListening(),this._addEventListeners()},e.prototype._onReady=function(){this._ready=!0,this._addContainerEventListeners(),this.trigger(f.default.PLAYER_READY)},e.prototype._onFullscreenChange=function(t){this.trigger(f.default.PLAYER_FULLSCREEN,t)},e.prototype._onVolumeUpdate=function(t){this.trigger(f.default.PLAYER_VOLUMEUPDATE,t)},e.prototype._onPlay=function(){this.trigger(f.default.PLAYER_PLAY)},e.prototype._onPause=function(){this.trigger(f.default.PLAYER_PAUSE)},e.prototype._onStop=function(){this.trigger(f.default.PLAYER_STOP,this.getCurrentTime())},e.prototype._onEnded=function(){this.trigger(f.default.PLAYER_ENDED)},e.prototype._onSeek=function(t){this.trigger(f.default.PLAYER_SEEK,t)},e.prototype._onTimeUpdate=function(t){this.trigger(f.default.PLAYER_TIMEUPDATE,t)},e.prototype._onError=function(t){this.trigger(f.default.PLAYER_ERROR,t)},e.prototype._normalizeSources=function(t){var e=t.sources||(void 0!==t.source?[t.source]:[]);return 0===e.length?[{source:"",mimeType:""}]:e},e.prototype.resize=function(t){return this.core.resize(t),this},e.prototype.load=function(t,e,n){return void 0!==n&&this.configure({autoPlay:!!n}),this.core.load(t,e),this},e.prototype.destroy=function(){return this.core.destroy(),this},e.prototype.play=function(){return this.core.mediaControl.container.play(),this},e.prototype.pause=function(){return this.core.mediaControl.container.pause(),this},e.prototype.stop=function(){return this.core.mediaControl.container.stop(),this},e.prototype.seek=function(t){return this.core.mediaControl.container.seek(t),this},e.prototype.seekPercentage=function(t){return this.core.mediaControl.container.seekPercentage(t),this},e.prototype.setVolume=function(t){return this.core&&this.core.mediaControl&&this.core.mediaControl.setVolume(t),this},e.prototype.getVolume=function(){return this.core&&this.core.mediaControl?this.core.mediaControl.volume:0},e.prototype.mute=function(){return this._mutedVolume=this.getVolume(),this.setVolume(0),this},e.prototype.unmute=function(){return this.setVolume("number"==typeof this._mutedVolume?this._mutedVolume:100),this._mutedVolume=null,this},e.prototype.isPlaying=function(){return this.core.mediaControl.container.isPlaying()},e.prototype.isDvrEnabled=function(){return this.core.mediaControl.container.isDvrEnabled()},e.prototype.isDvrInUse=function(){return this.core.mediaControl.container.isDvrInUse()},e.prototype.configure=function(t){return this.core.configure(t),this},e.prototype.getPlugin=function(t){var e=this.core.plugins.concat(this.core.mediaControl.container.plugins);return e.filter(function(e){return e.name===t})[0]},e.prototype.getCurrentTime=function(){return this.core.mediaControl.container.getCurrentTime()},e.prototype.getStartTimeOffset=function(){return this.core.mediaControl.container.getStartTimeOffset()},e.prototype.getDuration=function(){return this.core.mediaControl.container.getDuration()},e}(c.default);e.default=k,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){if(e)for(var n in e){var r=Object.getOwnPropertyDescriptor(e,n);r?Object.defineProperty(t,n,r):t[n]=e[n]}return t}function l(t,e){var n=function(t){function n(){i(this,n);for(var r=arguments.length,a=Array(r),s=0;s<r;s++)a[s]=arguments[s];var l=o(this,t.call.apply(t,[this].concat(a)));return e.initialize&&e.initialize.apply(l,a),l}return a(n,t),n}(t);return s(n.prototype,e),n}function u(t,e){if(!isFinite(t))return"--:--";t*=1e3,t=parseInt(t/1e3);var n=t%60;t=parseInt(t/60);var r=t%60;t=parseInt(t/60);var i=t%24,o=parseInt(t/24),a="";return o&&o>0&&(a+=o+":",i<1&&(a+="00:")),(i&&i>0||e)&&(a+=("0"+i).slice(-2)+":"),a+=("0"+r).slice(-2)+":",a+=("0"+n).slice(-2),a.trim()}function c(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"t",e=0,n=T.params[t]||T.hashParams[t]||"",r=n.match(/[0-9]+[hms]+/g)||[];return r.length>0?!function(){var t={h:3600,m:60,s:1};r.forEach(function(n){if(n){var r=n[n.length-1],i=parseInt(n.slice(0,n.length-1),10);e+=i*t[r]}})}():n&&(e=parseInt(n,10)),e}function d(t){A[t]||(A[t]=0);var e=++A[t];return t+e}function f(t){return t-parseFloat(t)+1>=0}function h(){var t=document.getElementsByTagName("script");return t.length?t[t.length-1].src:""}function p(){return window.navigator&&window.navigator.language}function g(){return window.performance&&window.performance.now?performance.now():Date.now()}function y(t,e){var n=t.indexOf(e);n>=0&&t.splice(n,1)}Object.defineProperty(e,"__esModule",{value:!0}),e.cancelAnimationFrame=e.requestAnimationFrame=e.QueryString=e.Config=e.Fullscreen=void 0;var v=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();e.extend=l,e.formatTime=u,e.seekStringToSeconds=c,e.uniqueId=d,e.isNumber=f,e.currentScriptUrl=h,e.getBrowserLanguage=p,e.now=g,e.removeArrayItem=y;var m=n(3),b=r(m),_=e.Fullscreen={isFullscreen:function(){return!!(document.webkitFullscreenElement||document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement)},requestFullscreen:function(t){t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():t.querySelector&&t.querySelector("video")&&t.querySelector("video").webkitEnterFullScreen&&t.querySelector("video").webkitEnterFullScreen()},cancelFullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},fullscreenEnabled:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},E=e.Config=function(){function t(){i(this,t)}return t._defaultConfig=function(){return{volume:{value:100,parse:parseInt}}},t._defaultValueFor=function(t){try{return this._defaultConfig()[t].parse(this._defaultConfig()[t].value)}catch(t){return}},t._createKeyspace=function(t){return"clappr."+document.domain+"."+t},t.restore=function(t){return b.default.hasLocalstorage&&localStorage[this._createKeyspace(t)]?this._defaultConfig()[t].parse(localStorage[this._createKeyspace(t)]):this._defaultValueFor(t)},t.persist=function(t,e){if(b.default.hasLocalstorage)try{return localStorage[this._createKeyspace(t)]=e,!0}catch(t){return!1}},t}(),T=e.QueryString=function(){function t(){i(this,t)}return t.parse=function(t){for(var e=void 0,n=/\+/g,r=/([^&=]+)=?([^&]*)/g,i=function(t){return decodeURIComponent(t.replace(n," "))},o={};e=r.exec(t);)o[i(e[1]).toLowerCase()]=i(e[2]);return o},v(t,null,[{key:"params",get:function(){var t=window.location.search.substring(1);return t!==this.query&&(this._urlParams=this.parse(t),this.query=t),this._urlParams}},{key:"hashParams",get:function(){var t=window.location.hash.substring(1);return t!==this.hash&&(this._hashParams=this.parse(t),this.hash=t),this._hashParams}}]),t}(),A={},k=e.requestAnimationFrame=(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}).bind(window),w=e.cancelAnimationFrame=(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout).bind(window);e.default={Config:E,Fullscreen:_,QueryString:T,extend:l,formatTime:u,seekStringToSeconds:c,uniqueId:d,currentScriptUrl:h,isNumber:f,requestAnimationFrame:k,cancelAnimationFrame:w,getBrowserLanguage:p,now:g,removeArrayItem:y}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={},r=function(){try{return localStorage.setItem("clappr","clappr"),localStorage.removeItem("clappr"),!0}catch(t){return!1}},i=function(){try{var t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");return!!t}catch(t){return!(!navigator.mimeTypes||void 0===navigator.mimeTypes["application/x-shockwave-flash"]||!navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)}},o=function(){var t=navigator.userAgent,e=t.match(/\b(playstation 4|nx|opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[],n=void 0;return/trident/i.test(e[1])?(n=/\brv[ :]+(\d+)/g.exec(t)||[],{name:"IE",version:parseInt(n[1]||"")}):"Chrome"===e[1]&&(n=t.match(/\bOPR\/(\d+)/),null!=n)?{name:"Opera",version:parseInt(n[1])}:(e=e[2]?[e[1],e[2]]:[navigator.appName,navigator.appVersion,"-?"],(n=t.match(/version\/(\d+)/i))&&e.splice(1,1,n[1]),{name:e[0],version:parseInt(e[1])})},a=o();n.isSafari=/safari/i.test(navigator.userAgent)&&navigator.userAgent.indexOf("Chrome")===-1,n.isChrome=/chrome/i.test(navigator.userAgent),n.isFirefox=/firefox/i.test(navigator.userAgent),n.isLegacyIE=!!window.ActiveXObject,n.isIE=n.isLegacyIE||/trident.*rv:1\d/i.test(navigator.userAgent),n.isIE11=/trident.*rv:11/i.test(navigator.userAgent),n.isChromecast=n.isChrome&&/CrKey/i.test(navigator.userAgent),n.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone|IEMobile|Opera Mini/i.test(navigator.userAgent),n.isiOS=/iPad|iPhone|iPod/i.test(navigator.userAgent),n.isAndroid=/Android/i.test(navigator.userAgent),n.isWindowsPhone=/Windows Phone/i.test(navigator.userAgent),n.isWin8App=/MSAppHost/i.test(navigator.userAgent),n.isWiiU=/WiiU/i.test(navigator.userAgent),n.isPS4=/PlayStation 4/i.test(navigator.userAgent),n.hasLocalstorage=r(),n.hasFlash=i(),n.name=a.name,n.version=a.version,e.default=n,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(2),u=n(5),c=r(u),d=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=o(this,t.call(this,n));return r._options=n,r.uniqueId=(0,l.uniqueId)("o"),r}return a(e,t),s(e,[{key:"options",get:function(){return this._options}}]),e}(c.default);e.default=d,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=n(6),s=r(a),l=n(2),u=n(10),c=r(u),d=Array.prototype.slice,f=/\s+/,h=function(t,e,n,r){if(!n)return!0;if("object"===("undefined"==typeof n?"undefined":o(n))){for(var i in n)t[e].apply(t,[i,n[i]].concat(r));return!1}if(f.test(n)){for(var a=n.split(f),s=0,l=a.length;s<l;s++)t[e].apply(t,[a[s]].concat(r));return!1}return!0},p=function(t,e,n,r){function i(){try{switch(e.length){case 0:for(;++a<l;)(o=t[a]).callback.call(o.ctx);return;case 1:for(;++a<l;)(o=t[a]).callback.call(o.ctx,u);return;case 2:for(;++a<l;)(o=t[a]).callback.call(o.ctx,u,c);return;case 3:for(;++a<l;)(o=t[a]).callback.call(o.ctx,u,c,d);return;default:for(;++a<l;)(o=t[a]).callback.apply(o.ctx,e);return}}catch(t){s.default.error.apply(s.default,[n,"error on event",r,"trigger","-",t]),i()}}var o=void 0,a=-1,l=t.length,u=e[0],c=e[1],d=e[2];i()},g=function(){function t(){i(this,t)}return t.prototype.on=function(t,e,n){if(!h(this,"on",t,[e,n])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);return r.push({callback:e,context:n,ctx:n||this}),this},t.prototype.once=function t(e,n,r){if(!h(this,"once",e,[n,r])||!n)return this;var i=this,t=(0,c.default)(function(){i.off(e,t),n.apply(this,arguments)});return t._callback=n,this.on(e,t,r)},t.prototype.off=function(t,e,n){var r=void 0,i=void 0,o=void 0,a=void 0,s=void 0,l=void 0,u=void 0,c=void 0;if(!this._events||!h(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._events=void 0,this;for(a=t?[t]:Object.keys(this._events),s=0,l=a.length;s<l;s++)if(t=a[s],o=this._events[t]){if(this._events[t]=r=[],e||n)for(u=0,c=o.length;u<c;u++)i=o[u],(e&&e!==i.callback&&e!==i.callback._callback||n&&n!==i.context)&&r.push(i);r.length||delete this._events[t]}return this},t.prototype.trigger=function(t){var e=this.name||this.constructor.name;if(s.default.debug.apply(s.default,[e].concat(Array.prototype.slice.call(arguments))),!this._events)return this;var n=d.call(arguments,1);if(!h(this,"trigger",t,n))return this;var r=this._events[t],i=this._events.all;return r&&p(r,n,e,t),i&&p(i,arguments,e,t),this},t.prototype.stopListening=function(t,e,n){var r=this._listeningTo;if(!r)return this;var i=!e&&!n;n||"object"!==("undefined"==typeof e?"undefined":o(e))||(n=this),t&&((r={})[t._listenId]=t);for(var a in r)t=r[a],t.off(e,n,this),(i||0===Object.keys(t._events).length)&&delete this._listeningTo[a];return this},t}();e.default=g;var y={listenTo:"on",listenToOnce:"once"};Object.keys(y).forEach(function(t){g.prototype[t]=function(e,n,r){var i=this._listeningTo||(this._listeningTo={}),a=e._listenId||(e._listenId=(0,l.uniqueId)("l"));return i[a]=e,r||"object"!==("undefined"==typeof n?"undefined":o(n))||(r=this),e[y[t]](n,r,this),this}}),g.PLAYER_READY="ready",g.PLAYER_RESIZE="resize",g.PLAYER_FULLSCREEN="fullscreen",g.PLAYER_PLAY="play",g.PLAYER_PAUSE="pause",g.PLAYER_STOP="stop",g.PLAYER_ENDED="ended",g.PLAYER_SEEK="seek",g.PLAYER_ERROR="error",g.PLAYER_TIMEUPDATE="timeupdate",g.PLAYER_VOLUMEUPDATE="volumeupdate",g.PLAYBACK_PROGRESS="playback:progress",g.PLAYBACK_TIMEUPDATE="playback:timeupdate",g.PLAYBACK_READY="playback:ready",g.PLAYBACK_BUFFERING="playback:buffering",g.PLAYBACK_BUFFERFULL="playback:bufferfull",g.PLAYBACK_SETTINGSUPDATE="playback:settingsupdate",g.PLAYBACK_LOADEDMETADATA="playback:loadedmetadata",g.PLAYBACK_HIGHDEFINITIONUPDATE="playback:highdefinitionupdate",g.PLAYBACK_BITRATE="playback:bitrate",g.PLAYBACK_LEVELS_AVAILABLE="playback:levels:available",g.PLAYBACK_LEVEL_SWITCH_START="playback:levels:switch:start",g.PLAYBACK_LEVEL_SWITCH_END="playback:levels:switch:end",g.PLAYBACK_PLAYBACKSTATE="playback:playbackstate",g.PLAYBACK_DVR="playback:dvr",g.PLAYBACK_MEDIACONTROL_DISABLE="playback:mediacontrol:disable",g.PLAYBACK_MEDIACONTROL_ENABLE="playback:mediacontrol:enable",g.PLAYBACK_ENDED="playback:ended",g.PLAYBACK_PLAY_INTENT="playback:play:intent",g.PLAYBACK_PLAY="playback:play",g.PLAYBACK_PAUSE="playback:pause",g.PLAYBACK_STOP="playback:stop",g.PLAYBACK_ERROR="playback:error",g.PLAYBACK_STATS_ADD="playback:stats:add",g.PLAYBACK_FRAGMENT_LOADED="playback:fragment:loaded",g.PLAYBACK_LEVEL_SWITCH="playback:level:switch",g.CORE_OPTIONS_CHANGE="core:options:change",g.CORE_READY="core:ready",g.CORE_FULLSCREEN="core:fullscreen",g.CONTAINER_PLAYBACKSTATE="container:playbackstate",g.CONTAINER_PLAYBACKDVRSTATECHANGED="container:dvr",g.CONTAINER_BITRATE="container:bitrate",g.CONTAINER_STATS_REPORT="container:stats:report",g.CONTAINER_DESTROYED="container:destroyed",g.CONTAINER_READY="container:ready",g.CONTAINER_ERROR="container:error",g.CONTAINER_LOADEDMETADATA="container:loadedmetadata",g.CONTAINER_TIMEUPDATE="container:timeupdate",g.CONTAINER_PROGRESS="container:progress",g.CONTAINER_PLAY="container:play",g.CONTAINER_STOP="container:stop",g.CONTAINER_PAUSE="container:pause",g.CONTAINER_ENDED="container:ended",g.CONTAINER_CLICK="container:click",g.CONTAINER_DBLCLICK="container:dblclick",g.CONTAINER_CONTEXTMENU="container:contextmenu",g.CONTAINER_MOUSE_ENTER="container:mouseenter",g.CONTAINER_MOUSE_LEAVE="container:mouseleave",g.CONTAINER_SEEK="container:seek",g.CONTAINER_VOLUME="container:volume",g.CONTAINER_FULLSCREEN="container:fullscreen",g.CONTAINER_STATE_BUFFERING="container:state:buffering",g.CONTAINER_STATE_BUFFERFULL="container:state:bufferfull",g.CONTAINER_SETTINGSUPDATE="container:settingsupdate",g.CONTAINER_HIGHDEFINITIONUPDATE="container:highdefinitionupdate",g.CONTAINER_MEDIACONTROL_SHOW="container:mediacontrol:show",g.CONTAINER_MEDIACONTROL_HIDE="container:mediacontrol:hide",g.CONTAINER_MEDIACONTROL_DISABLE="container:mediacontrol:disable",g.CONTAINER_MEDIACONTROL_ENABLE="container:mediacontrol:enable",g.CONTAINER_STATS_ADD="container:stats:add",g.CONTAINER_OPTIONS_CHANGE="container:options:change",g.MEDIACONTROL_RENDERED="mediacontrol:rendered",g.MEDIACONTROL_FULLSCREEN="mediacontrol:fullscreen",g.MEDIACONTROL_SHOW="mediacontrol:show",g.MEDIACONTROL_HIDE="mediacontrol:hide",g.MEDIACONTROL_MOUSEMOVE_SEEKBAR="mediacontrol:mousemove:seekbar",g.MEDIACONTROL_MOUSELEAVE_SEEKBAR="mediacontrol:mouseleave:seekbar",g.MEDIACONTROL_PLAYING="mediacontrol:playing",g.MEDIACONTROL_NOTPLAYING="mediacontrol:notplaying",g.MEDIACONTROL_CONTAINERCHANGED="mediacontrol:containerchanged",g.CORE_CONTAINERS_CREATED="core:containers:created",t.exports=e.default},function(t,e,n){"use strict";t.exports=n(7)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),o="font-weight: bold; font-size: 13px;",a="color: #006600;"+o,s="color: #0000ff;"+o,l="color: #ff8000;"+o,u="color: #ff0000;"+o,c=0,d=1,f=2,h=3,p=h,g=[s,a,l,u,u],y=["debug","info","warn","error","disabled"],v=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;r(this,t),this.kibo=new i.Kibo,this.kibo.down(["ctrl shift d"],function(){return e.onOff()}),this.BLACKLIST=["timeupdate","playback:timeupdate","playback:progress","container:hover","container:timeupdate","container:progress"],this.level=n,this.offLevel=o}return t.prototype.debug=function(t){this.log(t,c,Array.prototype.slice.call(arguments,1))},t.prototype.info=function(t){this.log(t,d,Array.prototype.slice.call(arguments,1))},t.prototype.warn=function(t){this.log(t,f,Array.prototype.slice.call(arguments,1))},t.prototype.error=function(t){this.log(t,h,Array.prototype.slice.call(arguments,1))},t.prototype.onOff=function(){this.level===this.offLevel?this.level=this.previousLevel:(this.previousLevel=this.level,this.level=this.offLevel),window.console&&window.console.log&&window.console.log("%c[Clappr.Log] set log level to "+y[this.level],l)},t.prototype.level=function(t){this.level=t},t.prototype.log=function(t,e,n){if(!(this.BLACKLIST.indexOf(n[0])>=0||e<this.level)){n||(n=t,t=null);var r=g[e],i="";t&&(i="["+t+"]"),window.console&&window.console.log&&window.console.log.apply(console,["%c["+y[e]+"]"+i,r].concat(n))}},t}();e.default=v,v.LEVEL_DEBUG=c,v.LEVEL_INFO=d,v.LEVEL_WARN=f,v.LEVEL_ERROR=h,v.getInstance=function(){return void 0===this._instance&&(this._instance=new this,this._instance.previousLevel=this._instance.level,this._instance.level=this._instance.offLevel),this._instance},v.setLevel=function(t){this.getInstance().level=t},v.debug=function(){this.getInstance().debug.apply(this.getInstance(),arguments)},v.info=function(){this.getInstance().info.apply(this.getInstance(),arguments)},v.warn=function(){this.getInstance().warn.apply(this.getInstance(),arguments)},v.error=function(){this.getInstance().error.apply(this.getInstance(),arguments)},t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),o=r(i);e.default={Kibo:o.default},t.exports=e.default},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){this.element=t||window.document,this.initialize()};n.KEY_NAMES_BY_CODE={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"caps_lock",27:"esc",32:"space",37:"left",38:"up",39:"right",40:"down",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"},n.KEY_CODES_BY_NAME={},function(){for(var t in n.KEY_NAMES_BY_CODE)Object.prototype.hasOwnProperty.call(n.KEY_NAMES_BY_CODE,t)&&(n.KEY_CODES_BY_NAME[n.KEY_NAMES_BY_CODE[t]]=+t)}(),n.MODIFIERS=["shift","ctrl","alt"],n.registerEvent=function(){return document.addEventListener?function(t,e,n){t.addEventListener(e,n,!1)}:document.attachEvent?function(t,e,n){t.attachEvent("on"+e,n)}:void 0}(),n.unregisterEvent=function(){return document.removeEventListener?function(t,e,n){t.removeEventListener(e,n,!1)}:document.detachEvent?function(t,e,n){t.detachEvent("on"+e,n)}:void 0}(),n.stringContains=function(t,e){return t.indexOf(e)!==-1},n.neatString=function(t){return t.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")},n.capitalize=function(t){return t.toLowerCase().replace(/^./,function(t){return t.toUpperCase()})},n.isString=function(t){return n.stringContains(Object.prototype.toString.call(t),"String")},n.arrayIncludes=function(){return Array.prototype.indexOf?function(t,e){return t.indexOf(e)!==-1}:function(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return!0;return!1}}(),n.extractModifiers=function(t){var e,r;for(e=[],r=0;r<n.MODIFIERS.length;r++)n.stringContains(t,n.MODIFIERS[r])&&e.push(n.MODIFIERS[r]);return e},n.extractKey=function(t){var e,r;for(e=n.neatString(t).split(" "),r=0;r<e.length;r++)if(!n.arrayIncludes(n.MODIFIERS,e[r]))return e[r]},n.modifiersAndKey=function(t){var e,r;return n.stringContains(t,"any")?n.neatString(t).split(" ").slice(0,2).join(" "):(e=n.extractModifiers(t),r=n.extractKey(t),r&&!n.arrayIncludes(n.MODIFIERS,r)&&e.push(r),e.join(" "))},n.keyName=function(t){return n.KEY_NAMES_BY_CODE[t+""]},n.keyCode=function(t){return+n.KEY_CODES_BY_NAME[t]},n.prototype.initialize=function(){var t,e=this;for(this.lastKeyCode=-1,this.lastModifiers={},t=0;t<n.MODIFIERS.length;t++)this.lastModifiers[n.MODIFIERS[t]]=!1;this.keysDown={any:[]},this.keysUp={any:[]},this.downHandler=this.handler("down"),this.upHandler=this.handler("up"),n.registerEvent(this.element,"keydown",this.downHandler),n.registerEvent(this.element,"keyup",this.upHandler),n.registerEvent(window,"unload",function t(){n.unregisterEvent(e.element,"keydown",e.downHandler),n.unregisterEvent(e.element,"keyup",e.upHandler),n.unregisterEvent(window,"unload",t)})},n.prototype.handler=function(t){var e=this;return function(r){var i,o,a;for(r=r||window.event,e.lastKeyCode=r.keyCode,i=0;i<n.MODIFIERS.length;i++)e.lastModifiers[n.MODIFIERS[i]]=r[n.MODIFIERS[i]+"Key"];for(n.arrayIncludes(n.MODIFIERS,n.keyName(e.lastKeyCode))&&(e.lastModifiers[n.keyName(e.lastKeyCode)]=!0),o=e["keys"+n.capitalize(t)],i=0;i<o.any.length;i++)o.any[i](r)===!1&&r.preventDefault&&r.preventDefault();if(a=e.lastModifiersAndKey(),o[a])for(i=0;i<o[a].length;i++)o[a][i](r)===!1&&r.preventDefault&&r.preventDefault()}},n.prototype.registerKeys=function(t,e,r){var i,o,a=this["keys"+n.capitalize(t)];for(n.isString(e)&&(e=[e]),i=0;i<e.length;i++)o=e[i],o=n.modifiersAndKey(o+""),a[o]?a[o].push(r):a[o]=[r];return this},n.prototype.unregisterKeys=function(t,e,r){var i,o,a,s=this["keys"+n.capitalize(t)];for(n.isString(e)&&(e=[e]),i=0;i<e.length;i++)if(a=e[i],a=n.modifiersAndKey(a+""),null===r)delete s[a];else if(s[a])for(o=0;o<s[a].length;o++)if(String(s[a][o])===String(r)){s[a].splice(o,1);break}return this},n.prototype.off=function(t){return this.unregisterKeys("down",t,null)},n.prototype.delegate=function(t,e,n){return null!==n||void 0!==n?this.registerKeys(t,e,n):this.unregisterKeys(t,e,n)},n.prototype.down=function(t,e){return this.delegate("down",t,e)},n.prototype.up=function(t,e){return this.delegate("up",t,e)},n.prototype.lastKey=function(t){return t?this.lastModifiers[t]:n.keyName(this.lastKeyCode)},n.prototype.lastModifiersAndKey=function(){var t,e;for(t=[],e=0;e<n.MODIFIERS.length;e++)this.lastKey(n.MODIFIERS[e])&&t.push(n.MODIFIERS[e]);return n.arrayIncludes(t,this.lastKey())||t.push(this.lastKey()),t.join(" ")},e.default=n,t.exports=e.default},function(t,e){function n(t,e){var n;if("function"!=typeof e)throw new TypeError(c);return t=l(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}function r(t){return n(2,t)}function i(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function o(t){return!!t&&"object"==typeof t}function a(t){return"symbol"==typeof t||o(t)&&E.call(t)==p}function s(t){if(!t)return 0===t?t:0;if(t=u(t),t===d||t===-d){var e=t<0?-1:1;return e*f}return t===t?t:0}function l(t){
  2. var e=s(t),n=e%1;return e===e?n?e-n:e:0}function u(t){if("number"==typeof t)return t;if(a(t))return h;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(g,"");var n=v.test(t);return n||m.test(t)?b(t.slice(2),n?2:8):y.test(t)?h:+t}var c="Expected a function",d=1/0,f=1.7976931348623157e308,h=NaN,p="[object Symbol]",g=/^\s+|\s+$/g,y=/^[-+]0x[0-9a-f]+$/i,v=/^0b[01]+$/i,m=/^0o[0-7]+$/i,b=parseInt,_=Object.prototype,E=_.toString;t.exports=r},function(t,e,n){"use strict";t.exports=n(12)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(4),u=r(l),c=n(13),d=r(c),f=function(t){function e(n){i(this,e);var r=o(this,t.call(this));return r.player=n,r._options=n.options,r}return a(e,t),s(e,[{key:"loader",get:function(){return this.player.loader}}]),e.prototype.create=function(){return this.options.loader=this.loader,this.core=new d.default(this.options),this.addCorePlugins(),this.core.createContainers(this.options),this.core},e.prototype.addCorePlugins=function(){var t=this;return this.loader.corePlugins.forEach(function(e){var n=new e(t.core);t.core.addPlugin(n),t.setupExternalInterface(n)}),this.core},e.prototype.setupExternalInterface=function(t){var e=t.getExternalInterface();for(var n in e)this.player[n]=e[n].bind(t)},e}(u.default);e.default=f,t.exports=e.default},function(t,e,n){"use strict";t.exports=n(14)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(2),u=n(5),c=r(u),d=n(15),f=r(d),h=n(18),p=r(h),g=n(3),y=r(g),v=n(20),m=r(v),b=n(27),_=r(b),E=n(30),T=r(E),A=n(45),k=r(A),w=n(16),S=r(w),R=n(46),L=r(R),O=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.playerInfo=k.default.getInstance(n.playerId),r.firstResize=!0,r.plugins=[],r.containers=[],r.setupMediaControl(null),r._boundFullscreenHandler=function(){return r.handleFullscreenChange()},(0,S.default)(document).bind("fullscreenchange",r._boundFullscreenHandler),(0,S.default)(document).bind("MSFullscreenChange",r._boundFullscreenHandler),(0,S.default)(document).bind("mozfullscreenchange",r._boundFullscreenHandler),r}return a(e,t),s(e,[{key:"events",get:function(){return{webkitfullscreenchange:"handleFullscreenChange",mousemove:"showMediaControl",mouseleave:"hideMediaControl"}}},{key:"attributes",get:function(){return{"data-player":"",tabindex:9999}}},{key:"isReady",get:function(){return!!this.ready}},{key:"i18n",get:function(){return this.getPlugin("strings")||{t:function(t){return t}}}}]),e.prototype.createContainers=function(t){var e=this;this.defer=S.default.Deferred(),this.defer.promise(this),this.containerFactory=new m.default(t,t.loader,this.i18n),this.containerFactory.createContainers().then(function(t){return e.setupContainers(t)}).then(function(t){return e.resolveOnContainersReady(t)})},e.prototype.updateSize=function(){l.Fullscreen.isFullscreen()?this.setFullscreen():this.setPlayerSize()},e.prototype.setFullscreen=function(){y.default.isiOS||(this.$el.addClass("fullscreen"),this.$el.removeAttr("style"),this.playerInfo.previousSize={width:this.options.width,height:this.options.height},this.playerInfo.currentSize={width:(0,S.default)(window).width(),height:(0,S.default)(window).height()})},e.prototype.setPlayerSize=function(){this.$el.removeClass("fullscreen"),this.playerInfo.currentSize=this.playerInfo.previousSize,this.playerInfo.previousSize={width:(0,S.default)(window).width(),height:(0,S.default)(window).height()},this.resize(this.playerInfo.currentSize)},e.prototype.resize=function(t){(0,l.isNumber)(t.height)||(0,l.isNumber)(t.width)?(this.el.style.height=t.height+"px",this.el.style.width=t.width+"px"):(this.el.style.height=""+t.height,this.el.style.width=""+t.width),this.playerInfo.previousSize={width:this.options.width,height:this.options.height},this.options.width=t.width,this.options.height=t.height,this.playerInfo.currentSize=t,this.triggerResize(this.playerInfo.currentSize)},e.prototype.enableResizeObserver=function(){var t=this,e=function(){t.playerInfo.computedSize.width==t.el.clientWidth&&t.playerInfo.computedSize.height==t.el.clientHeight||(t.playerInfo.computedSize={width:t.el.clientWidth,height:t.el.clientHeight},t.triggerResize(t.playerInfo.computedSize))};this.resizeObserverInterval=setInterval(e,500)},e.prototype.triggerResize=function(t){var e=this.firstResize||this.oldHeight!==t.height||this.oldWidth!==t.width;e&&(T.default.trigger(this.options.playerId+":"+c.default.PLAYER_RESIZE,t),this.oldHeight=t.height,this.oldWidth=t.width,this.firstResize=!1)},e.prototype.disableResizeObserver=function(){this.resizeObserverInterval&&clearInterval(this.resizeObserverInterval)},e.prototype.resolveOnContainersReady=function(t){var e=this;S.default.when.apply(S.default,t).done(function(){e.defer.resolve(e),e.ready=!0,e.trigger(c.default.CORE_READY)})},e.prototype.addPlugin=function(t){this.plugins.push(t)},e.prototype.hasPlugin=function(t){return!!this.getPlugin(t)},e.prototype.getPlugin=function(t){return this.plugins.filter(function(e){return e.name===t})[0]},e.prototype.load=function(t,e){var n=this;this.options.mimeType=e,t=t&&t.constructor===Array?t:[t],this.containers.forEach(function(t){return t.destroy()}),this.mediaControl.container=null,this.containerFactory.options=S.default.extend(this.options,{sources:t}),this.containerFactory.createContainers().then(function(t){n.setupContainers(t)})},e.prototype.destroy=function(){this.disableResizeObserver(),this.containers.forEach(function(t){return t.destroy()}),this.plugins.forEach(function(t){return t.destroy()}),this.$el.remove(),this.mediaControl.destroy(),(0,S.default)(document).unbind("fullscreenchange",this._boundFullscreenHandler),(0,S.default)(document).unbind("MSFullscreenChange",this._boundFullscreenHandler),(0,S.default)(document).unbind("mozfullscreenchange",this._boundFullscreenHandler)},e.prototype.handleFullscreenChange=function(){this.trigger(c.default.CORE_FULLSCREEN,l.Fullscreen.isFullscreen()),this.updateSize(),this.mediaControl.show()},e.prototype.setMediaControlContainer=function(t){this.mediaControl.setContainer(t),this.mediaControl.render()},e.prototype.disableMediaControl=function(){this.mediaControl.disable(),this.$el.removeClass("nocursor")},e.prototype.enableMediaControl=function(){this.mediaControl.enable()},e.prototype.removeContainer=function(t){this.stopListening(t),this.containers=this.containers.filter(function(e){return e!==t})},e.prototype.appendContainer=function(t){this.listenTo(t,c.default.CONTAINER_DESTROYED,this.removeContainer),this.containers.push(t)},e.prototype.setupContainers=function(t){return t.map(this.appendContainer.bind(this)),this.trigger(c.default.CORE_CONTAINERS_CREATED),this.renderContainers(),this.setupMediaControl(this.getCurrentContainer()),this.render(),this.$el.appendTo(this.options.parentElement),this.containers},e.prototype.renderContainers=function(){var t=this;this.containers.map(function(e){return t.el.appendChild(e.render().el)})},e.prototype.createContainer=function(t,e){var n=this.containerFactory.createContainer(t,e);return this.appendContainer(n),this.el.appendChild(n.render().el),n},e.prototype.setupMediaControl=function(t){this.mediaControl?this.mediaControl.setContainer(t):(this.mediaControl=this.createMediaControl(S.default.extend({container:t,focusElement:this.el},this.options)),this.listenTo(this.mediaControl,c.default.MEDIACONTROL_FULLSCREEN,this.toggleFullscreen),this.listenTo(this.mediaControl,c.default.MEDIACONTROL_SHOW,this.onMediaControlShow.bind(this,!0)),this.listenTo(this.mediaControl,c.default.MEDIACONTROL_HIDE,this.onMediaControlShow.bind(this,!1)))},e.prototype.createMediaControl=function(t){return t.mediacontrol&&t.mediacontrol.external?new t.mediacontrol.external(t).render():new _.default(t).render()},e.prototype.getCurrentContainer=function(){return this.mediaControl&&this.mediaControl.container?this.mediaControl.container:this.containers[0]},e.prototype.getCurrentPlayback=function(){var t=this.getCurrentContainer();return t&&t.playback},e.prototype.getPlaybackType=function(){var t=this.getCurrentContainer();return t&&t.getPlaybackType()},e.prototype.toggleFullscreen=function(){l.Fullscreen.isFullscreen()?(l.Fullscreen.cancelFullscreen(),y.default.isiOS||this.$el.removeClass("fullscreen nocursor")):(l.Fullscreen.requestFullscreen(this.el),y.default.isiOS||this.$el.addClass("fullscreen")),this.mediaControl.show()},e.prototype.showMediaControl=function(t){this.mediaControl.show(t)},e.prototype.hideMediaControl=function(){this.mediaControl.hide(this.options.hideMediaControlDelay)},e.prototype.onMediaControlShow=function(t){this.getCurrentContainer().trigger(t?c.default.CONTAINER_MEDIACONTROL_SHOW:c.default.CONTAINER_MEDIACONTROL_HIDE),t?this.$el.removeClass("nocursor"):l.Fullscreen.isFullscreen()&&this.$el.addClass("nocursor")},e.prototype.configure=function(t){var e=this;this._options=S.default.extend(this._options,t);var n=t.source||t.sources;n?this.load(n,t.mimeType||this.options.mimeType):(this.trigger(c.default.CORE_OPTIONS_CHANGE),this.containers.forEach(function(t){t.configure(e.options)}))},e.prototype.render=function(){var t=f.default.getStyleFor(L.default,{baseUrl:this.options.baseUrl});this.$el.append(t),this.$el.append(this.mediaControl.render().el),this.options.width=this.options.width||this.$el.width(),this.options.height=this.options.height||this.$el.height();var e={width:this.options.width,height:this.options.height};return this.playerInfo.previousSize=this.playerInfo.currentSize=this.playerInfo.computedSize=e,this.updateSize(),this.previousSize={width:this.$el.width(),height:this.$el.height()},this.enableResizeObserver(),this},e}(p.default);e.default=O,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(16),o=r(i),a=n(17),s=r(a),l={getStyleFor:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{baseUrl:""};return(0,o.default)('<style class="clappr-style"></style>').html((0,s.default)(t.toString())(e))}};e.default=l,t.exports=e.default},function(t,e){var n=function(){function t(t){return null==t?String(t):W[q.call(t)]||"object"}function e(e){return"function"==t(e)}function n(t){return null!=t&&t==t.window}function r(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function i(e){return"object"==t(e)}function o(t){return i(t)&&!n(t)&&Object.getPrototypeOf(t)==Object.prototype}function a(t){var e=!!t&&"length"in t&&t.length,r=k.type(t);return"function"!=r&&!n(t)&&("array"==r||0===e||"number"==typeof e&&e>0&&e-1 in t)}function s(t){return C.call(t,function(t){return null!=t})}function l(t){return t.length>0?k.fn.concat.apply([],t):t}function u(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function c(t){return t in x?x[t]:x[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function d(t,e){return"number"!=typeof e||N[u(t)]?e:e+"px"}function f(t){var e,n;return I[t]||(e=D.createElement(t),D.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),I[t]=n),I[t]}function h(t){return"children"in t?P.call(t.children):k.map(t.childNodes,function(t){if(1==t.nodeType)return t})}function p(t,e){var n,r=t?t.length:0;for(n=0;n<r;n++)this[n]=t[n];this.length=r,this.selector=e||""}function g(t,e,n){for(A in e)n&&(o(e[A])||Q(e[A]))?(o(e[A])&&!o(t[A])&&(t[A]={}),Q(e[A])&&!Q(t[A])&&(t[A]=[]),g(t[A],e[A],n)):e[A]!==T&&(t[A]=e[A])}function y(t,e){return null==e?k(t):k(t).filter(e)}function v(t,n,r,i){return e(n)?n.call(t,r,i):n}function m(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function b(t,e){var n=t.className||"",r=n&&n.baseVal!==T;return e===T?r?n.baseVal:n:void(r?n.baseVal=e:t.className=e)}function _(t){try{return t?"true"==t||"false"!=t&&("null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?k.parseJSON(t):t):t}catch(e){return t}}function E(t,e){e(t);for(var n=0,r=t.childNodes.length;n<r;n++)E(t.childNodes[n],e)}var T,A,k,w,S,R,L=[],O=L.concat,C=L.filter,P=L.slice,D=window.document,I={},x={},N={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},M=/^\s*<(\w+|!)[^>]*>/,F=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,B=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,U=/^(?:body|html)$/i,j=/([A-Z])/g,G=["val","css","html","text","data","width","height","offset"],Y=["after","prepend","before","append"],V=D.createElement("table"),K=D.createElement("tr"),$={tr:D.createElement("tbody"),tbody:V,thead:V,tfoot:V,td:K,th:K,"*":D.createElement("div")},H=/complete|loaded|interactive/,z=/^[\w-]*$/,W={},q=W.toString,X={},Z=D.createElement("div"),J={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},Q=Array.isArray||function(t){return t instanceof Array};return X.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=Z).appendChild(t),r=~X.qsa(i,e).indexOf(t),o&&Z.removeChild(t),r},S=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},R=function(t){return C.call(t,function(e,n){return t.indexOf(e)==n})},X.fragment=function(t,e,n){var r,i,a;return F.test(t)&&(r=k(D.createElement(RegExp.$1))),r||(t.replace&&(t=t.replace(B,"<$1></$2>")),e===T&&(e=M.test(t)&&RegExp.$1),e in $||(e="*"),a=$[e],a.innerHTML=""+t,r=k.each(P.call(a.childNodes),function(){a.removeChild(this)})),o(n)&&(i=k(r),k.each(n,function(t,e){G.indexOf(t)>-1?i[t](e):i.attr(t,e)})),r},X.Z=function(t,e){return new p(t,e)},X.isZ=function(t){return t instanceof X.Z},X.init=function(t,n){var r;if(!t)return X.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&M.test(t))r=X.fragment(t,RegExp.$1,n),t=null;else{if(n!==T)return k(n).find(t);r=X.qsa(D,t)}else{if(e(t))return k(D).ready(t);if(X.isZ(t))return t;if(Q(t))r=s(t);else if(i(t))r=[t],t=null;else if(M.test(t))r=X.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==T)return k(n).find(t);r=X.qsa(D,t)}}return X.Z(r,t)},k=function(t,e){return X.init(t,e)},k.extend=function(t){var e,n=P.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){g(t,n,e)}),t},X.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,a=z.test(o);return t.getElementById&&a&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:P.call(a&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},k.contains=D.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},k.type=t,k.isFunction=e,k.isWindow=n,k.isArray=Q,k.isPlainObject=o,k.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},k.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},k.inArray=function(t,e,n){return L.indexOf.call(e,t,n)},k.camelCase=S,k.trim=function(t){return null==t?"":String.prototype.trim.call(t)},k.uuid=0,k.support={},k.expr={},k.noop=function(){},k.map=function(t,e){var n,r,i,o=[];if(a(t))for(r=0;r<t.length;r++)n=e(t[r],r),null!=n&&o.push(n);else for(i in t)n=e(t[i],i),null!=n&&o.push(n);return l(o)},k.each=function(t,e){var n,r;if(a(t)){for(n=0;n<t.length;n++)if(e.call(t[n],n,t[n])===!1)return t}else for(r in t)if(e.call(t[r],r,t[r])===!1)return t;return t},k.grep=function(t,e){return C.call(t,e)},window.JSON&&(k.parseJSON=JSON.parse),k.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){W["[object "+e+"]"]=e.toLowerCase()}),k.fn={constructor:X.Z,length:0,forEach:L.forEach,reduce:L.reduce,push:L.push,sort:L.sort,splice:L.splice,indexOf:L.indexOf,concat:function(){var t,e,n=[];for(t=0;t<arguments.length;t++)e=arguments[t],n[t]=X.isZ(e)?e.toArray():e;return O.apply(X.isZ(this)?this.toArray():this,n)},map:function(t){return k(k.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return k(P.apply(this,arguments))},ready:function(t){return H.test(D.readyState)&&D.body?t(k):D.addEventListener("DOMContentLoaded",function(){t(k)},!1),this},get:function(t){return t===T?P.call(this):this[t>=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return L.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return e(t)?this.not(this.not(t)):k(C.call(this,function(e){return X.matches(e,t)}))},add:function(t,e){return k(R(this.concat(k(t,e))))},is:function(t){return this.length>0&&X.matches(this[0],t)},not:function(t){var n=[];if(e(t)&&t.call!==T)this.each(function(e){t.call(this,e)||n.push(this)});else{var r="string"==typeof t?this.filter(t):a(t)&&e(t.item)?P.call(t):k(t);this.forEach(function(t){r.indexOf(t)<0&&n.push(t)})}return k(n)},has:function(t){return this.filter(function(){return i(t)?k.contains(this,t):k(this).find(t).size()})},eq:function(t){return t===-1?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!i(t)?t:k(t)},last:function(){var t=this[this.length-1];return t&&!i(t)?t:k(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?k(t).filter(function(){var t=this;return L.some.call(n,function(e){return k.contains(e,t)})}):1==this.length?k(X.qsa(this[0],t)):this.map(function(){return X.qsa(this,t)}):k()},closest:function(t,e){var n=[],i="object"==typeof t&&k(t);return this.each(function(o,a){for(;a&&!(i?i.indexOf(a)>=0:X.matches(a,t));)a=a!==e&&!r(a)&&a.parentNode;a&&n.indexOf(a)<0&&n.push(a)}),k(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=k.map(n,function(t){if((t=t.parentNode)&&!r(t)&&e.indexOf(t)<0)return e.push(t),t});return y(e,t)},parent:function(t){return y(R(this.pluck("parentNode")),t)},children:function(t){return y(this.map(function(){return h(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||P.call(this.childNodes)})},siblings:function(t){return y(this.map(function(t,e){return C.call(h(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return k.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=f(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=e(t);if(this[0]&&!n)var r=k(t).get(0),i=r.parentNode||this.length>1;return this.each(function(e){k(this).wrapAll(n?t.call(this,e):i?r.cloneNode(!0):r)})},wrapAll:function(t){if(this[0]){k(this[0]).before(t=k(t));for(var e;(e=t.children()).length;)t=e.first();k(t).append(this)}return this},wrapInner:function(t){var n=e(t);return this.each(function(e){var r=k(this),i=r.contents(),o=n?t.call(this,e):t;i.length?i.wrapAll(o):r.append(o)})},unwrap:function(){return this.parent().each(function(){k(this).replaceWith(k(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=k(this);(t===T?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return k(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return k(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;k(this).empty().append(v(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=v(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(i(t))for(A in t)m(this,A,t[A]);else m(this,t,v(this,e,n,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(n=this[0].getAttribute(t))?n:T},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){m(this,t)},this)})},prop:function(t,e){return t=J[t]||t,1 in arguments?this.each(function(n){this[t]=v(this,e,n,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=J[t]||t,this.each(function(){delete this[t]})},data:function(t,e){var n="data-"+t.replace(j,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?_(r):T},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=v(this,t,e,this.value)})):this[0]&&(this[0].multiple?k(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=k(this),r=v(this,t,e,n.offset()),i=n.offsetParent().offset(),o={top:r.top-i.top,left:r.left-i.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;if(D.documentElement!==this[0]&&!k.contains(D.documentElement,this[0]))return{top:0,left:0};var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,n){if(arguments.length<2){var r=this[0];if("string"==typeof e){if(!r)return;return r.style[S(e)]||getComputedStyle(r,"").getPropertyValue(e)}if(Q(e)){if(!r)return;var i={},o=getComputedStyle(r,"");return k.each(e,function(t,e){i[e]=r.style[S(e)]||o.getPropertyValue(e)}),i}}var a="";if("string"==t(e))n||0===n?a=u(e)+":"+d(e,n):this.each(function(){this.style.removeProperty(u(e))});else for(A in e)e[A]||0===e[A]?a+=u(A)+":"+d(A,e[A])+";":this.each(function(){this.style.removeProperty(u(A))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(k(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&L.some.call(this,function(t){return this.test(b(t))},c(t))},addClass:function(t){return t?this.each(function(e){if("className"in this){w=[];var n=b(this),r=v(this,t,e,n);r.split(/\s+/g).forEach(function(t){k(this).hasClass(t)||w.push(t)},this),w.length&&b(this,n+(n?" ":"")+w.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===T)return b(this,"");w=b(this),v(this,t,e,w).split(/\s+/g).forEach(function(t){w=w.replace(c(t)," ")}),b(this,w.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var r=k(this),i=v(this,t,n,b(this));i.split(/\s+/g).forEach(function(t){(e===T?!r.hasClass(t):e)?r.addClass(t):r.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===T?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===T?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),r=U.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(k(t).css("margin-top"))||0,n.left-=parseFloat(k(t).css("margin-left"))||0,r.top+=parseFloat(k(e[0]).css("border-top-width"))||0,r.left+=parseFloat(k(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||D.body;t&&!U.test(t.nodeName)&&"static"==k(t).css("position");)t=t.offsetParent;return t})}},k.fn.detach=k.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});k.fn[t]=function(i){var o,a=this[0];return i===T?n(a)?a["inner"+e]:r(a)?a.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){a=k(this),a.css(t,v(this,i,e,a[t]()))})}}),Y.forEach(function(e,n){var r=n%2;k.fn[e]=function(){var e,i,o=k.map(arguments,function(n){var r=[];return e=t(n),"array"==e?(n.forEach(function(t){return t.nodeType!==T?r.push(t):k.zepto.isZ(t)?r=r.concat(t.get()):void(r=r.concat(X.fragment(t)))}),r):"object"==e||null==n?n:X.fragment(n)}),a=this.length>1;return o.length<1?this:this.each(function(t,e){i=r?e:e.parentNode,e=0==n?e.nextSibling:1==n?e.firstChild:2==n?e:null;var s=k.contains(D.documentElement,i);o.forEach(function(t){if(a)t=t.cloneNode(!0);else if(!i)return k(t).remove();i.insertBefore(t,e),s&&E(t,function(t){if(!(null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src)){var e=t.ownerDocument?t.ownerDocument.defaultView:window;e.eval.call(e,t.innerHTML)}})})})},k.fn[r?e+"To":"insert"+(n?"Before":"After")]=function(t){return k(t)[e](this),this}}),X.Z.prototype=p.prototype=k.fn,X.uniq=R,X.deserializeValue=_,k.zepto=X,k}();window.Zepto=n,void 0===window.$&&(window.$=n),function(t){function e(e,n,r){var i=t.Event(n);return t(e).trigger(i,r),!i.isDefaultPrevented()}function n(t,n,r,i){if(t.global)return e(n||b,r,i)}function r(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function i(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function o(t,e){var r=e.context;return e.beforeSend.call(r,t,e)!==!1&&n(e,r,"ajaxBeforeSend",[t,e])!==!1&&void n(e,r,"ajaxSend",[t,e])}function a(t,e,r,i){var o=r.context,a="success";r.success.call(o,t,a,e),i&&i.resolveWith(o,[t,a,e]),n(r,o,"ajaxSuccess",[e,r,t]),l(a,e,r)}function s(t,e,r,i,o){var a=i.context;i.error.call(a,r,e,t),o&&o.rejectWith(a,[r,e,t]),n(i,a,"ajaxError",[r,i,t||e]),l(e,r,i)}function l(t,e,r){var o=r.context;r.complete.call(o,e,t),n(r,o,"ajaxComplete",[e,r]),i(r)}function u(t,e,n){if(n.dataFilter==c)return t;var r=n.context;return n.dataFilter.call(r,t,e)}function c(){}function d(t){return t&&(t=t.split(";",2)[0]),t&&(t==k?"html":t==A?"json":E.test(t)?"script":T.test(t)&&"xml")||"text"}function f(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function h(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()&&"jsonp"!=e.dataType||(e.url=f(e.url,e.data),e.data=void 0)}function p(e,n,r,i){return t.isFunction(n)&&(i=r,r=n,n=void 0),t.isFunction(r)||(i=r,r=void 0),{url:e,data:n,success:r,dataType:i}}function g(e,n,r,i){var o,a=t.isArray(n),s=t.isPlainObject(n);t.each(n,function(n,l){o=t.type(l),i&&(n=r?i:i+"["+(s||"object"==o||"array"==o?n:"")+"]"),!i&&a?e.add(l.name,l.value):"array"==o||!r&&"object"==o?g(e,l,r,n):e.add(n,l)})}var y,v,m=+new Date,b=window.document,_=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,E=/^(?:text|application)\/javascript/i,T=/^(?:text|application)\/xml/i,A="application/json",k="text/html",w=/^\s*$/,S=b.createElement("a");S.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var r,i,l=e.jsonpCallback,u=(t.isFunction(l)?l():l)||"Zepto"+m++,c=b.createElement("script"),d=window[u],f=function(e){t(c).triggerHandler("error",e||"abort")},h={abort:f};return n&&n.promise(h),t(c).on("load error",function(o,l){clearTimeout(i),t(c).off().remove(),"error"!=o.type&&r?a(r[0],h,e,n):s(null,l||"error",h,e,n),window[u]=d,r&&t.isFunction(d)&&d(r[0]),d=r=void 0}),o(h,e)===!1?(f("abort"),h):(window[u]=function(){r=arguments},c.src=e.url.replace(/\?(.+)=\?/,"?$1="+u),b.head.appendChild(c),e.timeout>0&&(i=setTimeout(function(){f("timeout")},e.timeout)),h)},t.ajaxSettings={type:"GET",beforeSend:c,success:c,error:c,complete:c,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:A,xml:"application/xml, text/xml",html:k,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:c},t.ajax=function(e){var n,i,l=t.extend({},e||{}),p=t.Deferred&&t.Deferred();for(y in t.ajaxSettings)void 0===l[y]&&(l[y]=t.ajaxSettings[y]);r(l),l.crossDomain||(n=b.createElement("a"),n.href=l.url,n.href=n.href,l.crossDomain=S.protocol+"//"+S.host!=n.protocol+"//"+n.host),l.url||(l.url=window.location.toString()),(i=l.url.indexOf("#"))>-1&&(l.url=l.url.slice(0,i)),h(l);var g=l.dataType,m=/\?.+=\?/.test(l.url);if(m&&(g="jsonp"),l.cache!==!1&&(e&&e.cache===!0||"script"!=g&&"jsonp"!=g)||(l.url=f(l.url,"_="+Date.now())),"jsonp"==g)return m||(l.url=f(l.url,l.jsonp?l.jsonp+"=?":l.jsonp===!1?"":"callback=?")),t.ajaxJSONP(l,p);var _,E=l.accepts[g],T={},A=function(t,e){T[t.toLowerCase()]=[t,e]},k=/^([\w-]+:)\/\//.test(l.url)?RegExp.$1:window.location.protocol,R=l.xhr(),L=R.setRequestHeader;if(p&&p.promise(R),l.crossDomain||A("X-Requested-With","XMLHttpRequest"),A("Accept",E||"*/*"),(E=l.mimeType||E)&&(E.indexOf(",")>-1&&(E=E.split(",",2)[0]),R.overrideMimeType&&R.overrideMimeType(E)),(l.contentType||l.contentType!==!1&&l.data&&"GET"!=l.type.toUpperCase())&&A("Content-Type",l.contentType||"application/x-www-form-urlencoded"),l.headers)for(v in l.headers)A(v,l.headers[v]);if(R.setRequestHeader=A,R.onreadystatechange=function(){if(4==R.readyState){R.onreadystatechange=c,clearTimeout(_);var e,n=!1;if(R.status>=200&&R.status<300||304==R.status||0==R.status&&"file:"==k){if(g=g||d(l.mimeType||R.getResponseHeader("content-type")),"arraybuffer"==R.responseType||"blob"==R.responseType)e=R.response;else{e=R.responseText;try{e=u(e,g,l),"script"==g?(0,eval)(e):"xml"==g?e=R.responseXML:"json"==g&&(e=w.test(e)?null:t.parseJSON(e))}catch(t){n=t}if(n)return s(n,"parsererror",R,l,p)}a(e,R,l,p)}else s(R.statusText||null,R.status?"error":"abort",R,l,p)}},o(R,l)===!1)return R.abort(),s(null,"abort",R,l,p),R;var O=!("async"in l)||l.async;if(R.open(l.type,l.url,O,l.username,l.password),l.xhrFields)for(v in l.xhrFields)R[v]=l.xhrFields[v];for(v in T)L.apply(R,T[v]);return l.timeout>0&&(_=setTimeout(function(){R.onreadystatechange=c,R.abort(),
  3. s(null,"timeout",R,l,p)},l.timeout)),R.send(l.data?l.data:null),R},t.get=function(){return t.ajax(p.apply(null,arguments))},t.post=function(){var e=p.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=p.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,r){if(!this.length)return this;var i,o=this,a=e.split(/\s/),s=p(e,n,r),l=s.success;return a.length>1&&(s.url=a[0],i=a[1]),s.success=function(e){o.html(i?t("<div>").html(e.replace(_,"")).find(i):e),l&&l.apply(o,arguments)},t.ajax(s),this};var R=encodeURIComponent;t.param=function(e,n){var r=[];return r.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(R(e)+"="+R(n))},g(r,e,n),r.join("&").replace(/%20/g,"+")}}(n),function(t){t.Callbacks=function(e){e=t.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(n=e.memory&&t,r=!0,s=o||0,o=0,a=l.length,i=!0;l&&s<a;++s)if(l[s].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,l&&(u?u.length&&c(u.shift()):n?l.length=0:d.disable())},d={add:function(){if(l){var r=l.length,s=function(n){t.each(n,function(t,n){"function"==typeof n?e.unique&&d.has(n)||l.push(n):n&&n.length&&"string"!=typeof n&&s(n)})};s(arguments),i?a=l.length:n&&(o=r,c(n))}return this},remove:function(){return l&&t.each(arguments,function(e,n){for(var r;(r=t.inArray(n,l,r))>-1;)l.splice(r,1),i&&(r<=a&&--a,r<=s&&--s)}),this},has:function(e){return!(!l||!(e?t.inArray(e,l)>-1:l.length))},empty:function(){return a=l.length=0,this},disable:function(){return l=u=n=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,n||d.disable(),this},locked:function(){return!u},fireWith:function(t,e){return!l||r&&!u||(e=e||[],e=[t,e.slice?e.slice():e],i?u.push(e):c(e)),this},fire:function(){return d.fireWith(this,arguments)},fired:function(){return!!r}};return d}}(n),function(t){function e(n){var r=[["resolve","done",t.Callbacks({once:1,memory:1}),"resolved"],["reject","fail",t.Callbacks({once:1,memory:1}),"rejected"],["notify","progress",t.Callbacks({memory:1})]],i="pending",o={state:function(){return i},always:function(){return a.done(arguments).fail(arguments),this},then:function(){var n=arguments;return e(function(e){t.each(r,function(r,i){var s=t.isFunction(n[r])&&n[r];a[i[1]](function(){var n=s&&s.apply(this,arguments);if(n&&t.isFunction(n.promise))n.promise().done(e.resolve).fail(e.reject).progress(e.notify);else{var r=this===o?e.promise():this,a=s?[n]:arguments;e[i[0]+"With"](r,a)}})}),n=null}).promise()},promise:function(e){return null!=e?t.extend(e,o):o}},a={};return t.each(r,function(t,e){var n=e[2],s=e[3];o[e[1]]=n.add,s&&n.add(function(){i=s},r[1^t][2].disable,r[2][2].lock),a[e[0]]=function(){return a[e[0]+"With"](this===a?o:this,arguments),this},a[e[0]+"With"]=n.fireWith}),o.promise(a),n&&n.call(a,a),a}var n=Array.prototype.slice;t.when=function(r){var i,o,a,s=n.call(arguments),l=s.length,u=0,c=1!==l||r&&t.isFunction(r.promise)?l:0,d=1===c?r:e(),f=function(t,e,r){return function(o){e[t]=this,r[t]=arguments.length>1?n.call(arguments):o,r===i?d.notifyWith(e,r):--c||d.resolveWith(e,r)}};if(l>1)for(i=new Array(l),o=new Array(l),a=new Array(l);u<l;++u)s[u]&&t.isFunction(s[u].promise)?s[u].promise().done(f(u,a,s)).fail(d.reject).progress(f(u,o,i)):--c;return c||d.resolveWith(a,s),d.promise()},t.Deferred=e}(n),function(t){function e(t){return t._zid||(t._zid=f++)}function n(t,n,o,a){if(n=r(n),n.ns)var s=i(n.ns);return(y[e(t)]||[]).filter(function(t){return t&&(!n.e||t.e==n.e)&&(!n.ns||s.test(t.ns))&&(!o||e(t.fn)===e(o))&&(!a||t.sel==a)})}function r(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function i(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(t,e){return t.del&&!m&&t.e in b||!!e}function a(t){return _[t]||m&&b[t]||t}function s(n,i,s,l,c,f,h){var p=e(n),g=y[p]||(y[p]=[]);i.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(s);var i=r(e);i.fn=s,i.sel=c,i.e in _&&(s=function(e){var n=e.relatedTarget;if(!n||n!==this&&!t.contains(this,n))return i.fn.apply(this,arguments)}),i.del=f;var p=f||s;i.proxy=function(t){if(t=u(t),!t.isImmediatePropagationStopped()){t.data=l;var e=p.apply(n,t._args==d?[t]:[t].concat(t._args));return e===!1&&(t.preventDefault(),t.stopPropagation()),e}},i.i=g.length,g.push(i),"addEventListener"in n&&n.addEventListener(a(i.e),i.proxy,o(i,h))})}function l(t,r,i,s,l){var u=e(t);(r||"").split(/\s/).forEach(function(e){n(t,e,i,s).forEach(function(e){delete y[u][e.i],"removeEventListener"in t&&t.removeEventListener(a(e.e),e.proxy,o(e,l))})})}function u(e,n){return!n&&e.isDefaultPrevented||(n||(n=e),t.each(k,function(t,r){var i=n[t];e[t]=function(){return this[r]=E,i&&i.apply(n,arguments)},e[r]=T}),e.timeStamp||(e.timeStamp=Date.now()),(n.defaultPrevented!==d?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=E)),e}function c(t){var e,n={originalEvent:t};for(e in t)A.test(e)||t[e]===d||(n[e]=t[e]);return u(n,t)}var d,f=1,h=Array.prototype.slice,p=t.isFunction,g=function(t){return"string"==typeof t},y={},v={},m="onfocusin"in window,b={focus:"focusin",blur:"focusout"},_={mouseenter:"mouseover",mouseleave:"mouseout"};v.click=v.mousedown=v.mouseup=v.mousemove="MouseEvents",t.event={add:s,remove:l},t.proxy=function(n,r){var i=2 in arguments&&h.call(arguments,2);if(p(n)){var o=function(){return n.apply(r,i?i.concat(h.call(arguments)):arguments)};return o._zid=e(n),o}if(g(r))return i?(i.unshift(n[r],n),t.proxy.apply(null,i)):t.proxy(n[r],n);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var E=function(){return!0},T=function(){return!1},A=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,k={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,r,i,o){var a,u,f=this;return e&&!g(e)?(t.each(e,function(t,e){f.on(t,n,r,e,o)}),f):(g(n)||p(i)||i===!1||(i=r,r=n,n=d),i!==d&&r!==!1||(i=r,r=d),i===!1&&(i=T),f.each(function(d,f){o&&(a=function(t){return l(f,t.type,i),i.apply(this,arguments)}),n&&(u=function(e){var r,o=t(e.target).closest(n,f).get(0);if(o&&o!==f)return r=t.extend(c(e),{currentTarget:o,liveFired:f}),(a||i).apply(o,[r].concat(h.call(arguments,1)))}),s(f,e,i,r,n,u||a)}))},t.fn.off=function(e,n,r){var i=this;return e&&!g(e)?(t.each(e,function(t,e){i.off(t,n,e)}),i):(g(n)||p(r)||r===!1||(r=n,n=d),r===!1&&(r=T),i.each(function(){l(this,e,r,n)}))},t.fn.trigger=function(e,n){return e=g(e)||t.isPlainObject(e)?t.Event(e):u(e),e._args=n,this.each(function(){e.type in b&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,r){var i,o;return this.each(function(a,s){i=c(g(e)?t.Event(e):e),i._args=r,i.target=s,t.each(n(s,e.type||e),function(t,e){if(o=e.proxy(i),i.isImmediatePropagationStopped())return!1})}),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){g(t)||(e=t,t=e.type);var n=document.createEvent(v[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),u(n)}}(n),function(){try{getComputedStyle(void 0)}catch(e){var t=getComputedStyle;window.getComputedStyle=function(e,n){try{return t(e,n)}catch(t){return null}}}}(),function(t){function e(e){return e=t(e),!(!e.width()&&!e.height())&&"none"!==e.css("display")}function n(t,e){t=t.replace(/=#\]/g,'="#"]');var n,r,i=s.exec(t);if(i&&i[2]in a&&(n=a[i[2]],r=i[3],t=i[1],r)){var o=Number(r);r=isNaN(o)?r.replace(/^["']|["']$/g,""):o}return e(t,n,r)}var r=t.zepto,i=r.qsa,o=r.matches,a=t.expr[":"]={visible:function(){if(e(this))return this},hidden:function(){if(!e(this))return this},selected:function(){if(this.selected)return this},checked:function(){if(this.checked)return this},parent:function(){return this.parentNode},first:function(t){if(0===t)return this},last:function(t,e){if(t===e.length-1)return this},eq:function(t,e,n){if(t===n)return this},contains:function(e,n,r){if(t(this).text().indexOf(r)>-1)return this},has:function(t,e,n){if(r.qsa(this,n).length)return this}},s=new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),l=/^\s*>/,u="Zepto"+ +new Date;r.qsa=function(e,o){return n(o,function(n,a,s){try{var c;!n&&a?n="*":l.test(n)&&(c=t(e).addClass(u),n="."+u+" "+n);var d=i(e,n)}catch(t){throw console.error("error performing selector: %o",o),t}finally{c&&c.removeClass(u)}return a?r.uniq(t.map(d,function(t,e){return a.call(t,e,d,s)})):d})},r.matches=function(t,e){return n(e,function(e,n,r){return(!e||o(t,e))&&(!n||n.call(t,null,r)===t)})}}(n),t.exports=n},function(t,e){"use strict";var n={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},r=/(.)^/,i={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},o=/\\|'|\r|\n|\t|\u2028|\u2029/g,a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},s=new RegExp("[&<>\"']","g"),l=function(t){return null===t?"":(""+t).replace(s,function(t){return a[t]})},u=0,c=function(t,e){var a,s=new RegExp([(n.escape||r).source,(n.interpolate||r).source,(n.evaluate||r).source].join("|")+"|$","g"),c=0,d="__p+='";t.replace(s,function(e,n,r,a,s){return d+=t.slice(c,s).replace(o,function(t){return"\\"+i[t]}),n&&(d+="'+\n((__t=("+n+"))==null?'':escapeExpr(__t))+\n'"),r&&(d+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),a&&(d+="';\n"+a+"\n__p+='"),c=s+e.length,e}),d+="';\n",n.variable||(d="with(obj||{}){\n"+d+"}\n"),d="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+d+"return __p;\n//# sourceURL=/microtemplates/source["+u++ +"]";try{a=new Function(n.variable||"obj","escapeExpr",d)}catch(t){throw t.source=d,t}if(e)return a(e,l);var f=function(t){return a.call(this,t,l)};return f.source="function("+(n.variable||"obj")+"){\n"+d+"}",f};c.settings=n,t.exports=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(2),u=n(16),c=r(u),d=n(19),f=r(d),h=n(4),p=r(h),g=/^(\S+)\s*(.*)$/,y=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.cid=(0,l.uniqueId)("c"),r._ensureElement(),r.delegateEvents(),r}return a(e,t),s(e,[{key:"tagName",get:function(){return"div"}},{key:"events",get:function(){return{}}},{key:"attributes",get:function(){return{}}}]),e.prototype.$=function(t){return this.$el.find(t)},e.prototype.render=function(){return this},e.prototype.remove=function(){return this.$el.remove(),this.stopListening(),this.undelegateEvents(),this},e.prototype.setElement=function(t,e){return this.$el&&this.undelegateEvents(),this.$el=t instanceof c.default?t:(0,c.default)(t),this.el=this.$el[0],e!==!1&&this.delegateEvents(),this},e.prototype.delegateEvents=function(t){if(!t&&!(t=(0,f.default)(this,"events")))return this;this.undelegateEvents();for(var e in t){var n=t[e];if(n&&n.constructor!==Function&&(n=this[t[e]]),n){var r=e.match(g),i=r[1],o=r[2];i+=".delegateEvents"+this.cid,""===o?this.$el.on(i,n.bind(this)):this.$el.on(i,o,n.bind(this))}}return this},e.prototype.undelegateEvents=function(){return this.$el.off(".delegateEvents"+this.cid),this},e.prototype._ensureElement=function(){if(this.el)this.setElement((0,f.default)(this,"el"),!1);else{var t=c.default.extend({},(0,f.default)(this,"attributes"));this.id&&(t.id=(0,f.default)(this,"id")),this.className&&(t.class=(0,f.default)(this,"className"));var e=(0,c.default)("<"+(0,f.default)(this,"tagName")+">").attr(t);this.setElement(e,!1)}},e}(p.default);e.default=y,t.exports=e.default},function(t,e){(function(e){function n(t,e){return null==t?void 0:t[e]}function r(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function i(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function o(){this.__data__=gt?gt(null):{}}function a(t){return this.has(t)&&delete this.__data__[t]}function s(t){var e=this.__data__;if(gt){var n=e[t];return n===Y?void 0:n}return ut.call(e,t)?e[t]:void 0}function l(t){var e=this.__data__;return gt?void 0!==e[t]:ut.call(e,t)}function u(t,e){var n=this.__data__;return n[t]=gt&&void 0===e?Y:e,this}function c(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function d(){this.__data__=[]}function f(t){var e=this.__data__,n=T(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():ht.call(e,n,1),!0}function h(t){var e=this.__data__,n=T(e,t);return n<0?void 0:e[n][1]}function p(t){return T(this.__data__,t)>-1}function g(t,e){var n=this.__data__,r=T(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function y(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function v(){this.__data__={hash:new i,map:new(pt||c),string:new i}}function m(t){return S(this,t).delete(t)}function b(t){return S(this,t).get(t)}function _(t){return S(this,t).has(t)}function E(t,e){return S(this,t).set(t,e),this}function T(t,e){for(var n=t.length;n--;)if(x(t[n][0],e))return n;return-1}function A(t){if(!M(t)||C(t))return!1;var e=N(t)||r(t)?dt:Q;return e.test(D(t))}function k(t){if("string"==typeof t)return t;if(B(t))return vt?vt.call(t):"";var e=t+"";return"0"==e&&1/t==-V?"-0":e}function w(t){return bt(t)?t:mt(t)}function S(t,e){var n=t.__data__;return O(e)?n["string"==typeof e?"string":"hash"]:n.map}function R(t,e){var r=n(t,e);return A(r)?r:void 0}function L(t,e){if(bt(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!B(t))||(W.test(t)||!z.test(t)||null!=e&&t in Object(e))}function O(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function C(t){return!!st&&st in t}function P(t){if("string"==typeof t||B(t))return t;var e=t+"";return"0"==e&&1/t==-V?"-0":e}function D(t){if(null!=t){try{return lt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function I(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(G);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(I.Cache||y),n}function x(t,e){return t===e||t!==t&&e!==e}function N(t){var e=M(t)?ct.call(t):"";return e==K||e==$}function M(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function F(t){return!!t&&"object"==typeof t}function B(t){return"symbol"==typeof t||F(t)&&ct.call(t)==H}function U(t){return null==t?"":k(t)}function j(t,e,n){e=L(e,t)?[e]:w(e);var r=-1,i=e.length;for(i||(t=void 0,i=1);++r<i;){var o=null==t?void 0:t[P(e[r])];void 0===o&&(r=i,o=n),t=N(o)?o.call(t):o}return t}var G="Expected a function",Y="__lodash_hash_undefined__",V=1/0,K="[object Function]",$="[object GeneratorFunction]",H="[object Symbol]",z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,W=/^\w*$/,q=/^\./,X=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z=/[\\^$.*+?()[\]{}|]/g,J=/\\(\\)?/g,Q=/^\[object .+?Constructor\]$/,tt="object"==typeof e&&e&&e.Object===Object&&e,et="object"==typeof self&&self&&self.Object===Object&&self,nt=tt||et||Function("return this")(),rt=Array.prototype,it=Function.prototype,ot=Object.prototype,at=nt["__core-js_shared__"],st=function(){var t=/[^.]+$/.exec(at&&at.keys&&at.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),lt=it.toString,ut=ot.hasOwnProperty,ct=ot.toString,dt=RegExp("^"+lt.call(ut).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ft=nt.Symbol,ht=rt.splice,pt=R(nt,"Map"),gt=R(Object,"create"),yt=ft?ft.prototype:void 0,vt=yt?yt.toString:void 0;i.prototype.clear=o,i.prototype.delete=a,i.prototype.get=s,i.prototype.has=l,i.prototype.set=u,c.prototype.clear=d,c.prototype.delete=f,c.prototype.get=h,c.prototype.has=p,c.prototype.set=g,y.prototype.clear=v,y.prototype.delete=m,y.prototype.get=b,y.prototype.has=_,y.prototype.set=E;var mt=I(function(t){t=U(t);var e=[];return q.test(t)&&e.push(""),t.replace(X,function(t,n,r,i){e.push(r?i.replace(J,"$1"):n||t)}),e});I.Cache=y;var bt=Array.isArray;t.exports=j}).call(e,function(){return this}())},function(t,e,n){"use strict";t.exports=n(21)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(4),u=r(l),c=n(5),d=r(c),f=n(22),h=r(f),p=n(16),g=r(p),y=n(26),v=r(y),m=function(t){function e(n,r,a){i(this,e);var s=o(this,t.call(this,n));return s._i18n=a,s.loader=r,s}return a(e,t),s(e,[{key:"options",get:function(){return this._options},set:function(t){this._options=t}}]),e.prototype.createContainers=function(){var t=this;return g.default.Deferred(function(e){e.resolve(t.options.sources.map(function(e){return t.createContainer(e)}))})},e.prototype.findPlaybackPlugin=function(t,e){return this.loader.playbackPlugins.filter(function(n){return n.canPlay(t,e)})[0]},e.prototype.createContainer=function(t){var e=null,n=this.options.mimeType;(0,v.default)(t)?(e=t.source.toString(),t.mimeType&&(n=t.mimeType)):e=t.toString(),e.match(/^\/\//)&&(e=window.location.protocol+e);var r=g.default.extend({},this.options,{src:e,mimeType:n}),i=this.findPlaybackPlugin(e,n),o=new i(r,this._i18n);r=g.default.extend({},r,{playback:o});var a=new h.default(r,this._i18n),s=g.default.Deferred();return s.promise(a),this.addContainerPlugins(a),this.listenToOnce(a,d.default.CONTAINER_READY,function(){return s.resolve(a)}),a},e.prototype.addContainerPlugins=function(t){this.loader.containerPlugins.forEach(function(e){t.addPlugin(new e(t))})},e}(u.default);e.default=m,t.exports=e.default},function(t,e,n){"use strict";t.exports=n(23)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(5),u=r(l),c=n(18),d=r(c),f=n(15),h=r(f),p=n(24),g=r(p),y=n(16),v=r(y),m=function(t){function e(n,r){i(this,e);var a=o(this,t.call(this,n));return a._i18n=r,a.currentTime=0,a.volume=100,a.playback=n.playback,a.settings=v.default.extend({},a.playback.settings),a.isReady=!1,a.mediaControlDisabled=!1,a.plugins=[a.playback],a.bindEvents(),a}return a(e,t),s(e,[{key:"name",get:function(){return"Container"}},{key:"attributes",get:function(){return{class:"container","data-container":""}}},{key:"events",get:function(){return{click:"clicked",dblclick:"dblClicked",doubleTap:"dblClicked",contextmenu:"onContextMenu",mouseenter:"mouseEnter",mouseleave:"mouseLeave"}}},{key:"ended",get:function(){return this.playback.ended}},{key:"buffering",get:function(){return this.playback.buffering}},{key:"i18n",get:function(){return this._i18n}}]),e.prototype.bindEvents=function(){this.listenTo(this.playback,u.default.PLAYBACK_PROGRESS,this.progress),this.listenTo(this.playback,u.default.PLAYBACK_TIMEUPDATE,this.timeUpdated),this.listenTo(this.playback,u.default.PLAYBACK_READY,this.ready),this.listenTo(this.playback,u.default.PLAYBACK_BUFFERING,this.onBuffering),this.listenTo(this.playback,u.default.PLAYBACK_BUFFERFULL,this.bufferfull),this.listenTo(this.playback,u.default.PLAYBACK_SETTINGSUPDATE,this.settingsUpdate),this.listenTo(this.playback,u.default.PLAYBACK_LOADEDMETADATA,this.loadedMetadata),this.listenTo(this.playback,u.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinitionUpdate),this.listenTo(this.playback,u.default.PLAYBACK_BITRATE,this.updateBitrate),this.listenTo(this.playback,u.default.PLAYBACK_PLAYBACKSTATE,this.playbackStateChanged),this.listenTo(this.playback,u.default.PLAYBACK_DVR,this.playbackDvrStateChanged),this.listenTo(this.playback,u.default.PLAYBACK_MEDIACONTROL_DISABLE,this.disableMediaControl),this.listenTo(this.playback,u.default.PLAYBACK_MEDIACONTROL_ENABLE,this.enableMediaControl),this.listenTo(this.playback,u.default.PLAYBACK_ENDED,this.onEnded),this.listenTo(this.playback,u.default.PLAYBACK_PLAY,this.playing),this.listenTo(this.playback,u.default.PLAYBACK_PAUSE,this.paused),this.listenTo(this.playback,u.default.PLAYBACK_STOP,this.stopped),this.listenTo(this.playback,u.default.PLAYBACK_ERROR,this.error)},e.prototype.playbackStateChanged=function(t){this.trigger(u.default.CONTAINER_PLAYBACKSTATE,t)},e.prototype.playbackDvrStateChanged=function(t){this.settings=this.playback.settings,this.dvrInUse=t,this.trigger(u.default.CONTAINER_PLAYBACKDVRSTATECHANGED,t)},e.prototype.updateBitrate=function(t){this.trigger(u.default.CONTAINER_BITRATE,t)},e.prototype.statsReport=function(t){this.trigger(u.default.CONTAINER_STATS_REPORT,t)},e.prototype.getPlaybackType=function(){return this.playback.getPlaybackType()},e.prototype.isDvrEnabled=function(){return!!this.playback.dvrEnabled},e.prototype.isDvrInUse=function(){return!!this.dvrInUse},e.prototype.destroy=function(){this.trigger(u.default.CONTAINER_DESTROYED,this,this.name),this.stopListening(),this.plugins.forEach(function(t){return t.destroy()}),this.$el.remove()},e.prototype.setStyle=function(t){this.$el.css(t)},e.prototype.animate=function(t,e){return this.$el.animate(t,e).promise()},e.prototype.ready=function(){this.isReady=!0,this.trigger(u.default.CONTAINER_READY,this.name)},e.prototype.isPlaying=function(){return this.playback.isPlaying()},e.prototype.getStartTimeOffset=function(){return this.playback.getStartTimeOffset()},e.prototype.getCurrentTime=function(){return this.currentTime},e.prototype.getDuration=function(){return this.playback.getDuration()},e.prototype.error=function(t){this.isReady||this.ready(),this.trigger(u.default.CONTAINER_ERROR,{error:t,container:this},this.name)},e.prototype.loadedMetadata=function(t){this.trigger(u.default.CONTAINER_LOADEDMETADATA,t)},e.prototype.timeUpdated=function(t){this.currentTime=t.current,this.trigger(u.default.CONTAINER_TIMEUPDATE,t,this.name)},e.prototype.progress=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];this.trigger.apply(this,[u.default.CONTAINER_PROGRESS].concat(e,[this.name]))},e.prototype.playing=function(){this.trigger(u.default.CONTAINER_PLAY,this.name)},e.prototype.paused=function(){this.trigger(u.default.CONTAINER_PAUSE,this.name)},e.prototype.play=function(){this.playback.play()},e.prototype.stop=function(){this.playback.stop(),this.currentTime=0},e.prototype.pause=function(){this.playback.pause()},e.prototype.onEnded=function(){this.trigger(u.default.CONTAINER_ENDED,this,this.name),this.currentTime=0},e.prototype.stopped=function(){this.trigger(u.default.CONTAINER_STOP)},e.prototype.clicked=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(u.default.CONTAINER_CLICK,this,this.name)},e.prototype.dblClicked=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(u.default.CONTAINER_DBLCLICK,this,this.name)},e.prototype.onContextMenu=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(u.default.CONTAINER_CONTEXTMENU,this,this.name)},e.prototype.seek=function(t){this.trigger(u.default.CONTAINER_SEEK,t,this.name),this.playback.seek(t)},e.prototype.seekPercentage=function(t){var e=this.getDuration();if(t>=0&&t<=100){var n=e*(t/100);this.seek(n)}},e.prototype.setVolume=function(t){this.volume=parseInt(t,10),this.trigger(u.default.CONTAINER_VOLUME,t,this.name),this.playback.volume(t)},e.prototype.fullscreen=function(){this.trigger(u.default.CONTAINER_FULLSCREEN,this.name)},e.prototype.onBuffering=function(){this.trigger(u.default.CONTAINER_STATE_BUFFERING,this.name)},e.prototype.bufferfull=function(){this.trigger(u.default.CONTAINER_STATE_BUFFERFULL,this.name)},e.prototype.addPlugin=function(t){this.plugins.push(t)},e.prototype.hasPlugin=function(t){return!!this.getPlugin(t)},e.prototype.getPlugin=function(t){return this.plugins.filter(function(e){return e.name===t})[0]},e.prototype.mouseEnter=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(u.default.CONTAINER_MOUSE_ENTER)},e.prototype.mouseLeave=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(u.default.CONTAINER_MOUSE_LEAVE)},e.prototype.settingsUpdate=function(){this.settings=this.playback.settings,this.trigger(u.default.CONTAINER_SETTINGSUPDATE)},e.prototype.highDefinitionUpdate=function(t){this.trigger(u.default.CONTAINER_HIGHDEFINITIONUPDATE,t)},e.prototype.isHighDefinitionInUse=function(){return this.playback.isHighDefinitionInUse()},e.prototype.disableMediaControl=function(){this.mediaControlDisabled||(this.mediaControlDisabled=!0,this.trigger(u.default.CONTAINER_MEDIACONTROL_DISABLE))},e.prototype.enableMediaControl=function(){this.mediaControlDisabled&&(this.mediaControlDisabled=!1,this.trigger(u.default.CONTAINER_MEDIACONTROL_ENABLE))},e.prototype.updateStyle=function(){!this.options.chromeless||this.options.allowUserInteraction?this.$el.removeClass("chromeless"):this.$el.addClass("chromeless")},e.prototype.configure=function(t){this._options=v.default.extend(this._options,t),this.updateStyle(),this.trigger(u.default.CONTAINER_OPTIONS_CHANGE)},e.prototype.render=function(){var t=h.default.getStyleFor(g.default);return this.$el.append(t),this.$el.append(this.playback.render().el),this.updateStyle(),this},e}(d.default);e.default=m,t.exports=e.default},function(t,e,n){e=t.exports=n(25)(),e.push([t.id,".container[data-container] {\n position: absolute;\n background-color: black;\n height: 100%;\n width: 100%; }\n .container[data-container] .chromeless {\n cursor: default; }\n\n[data-player]:not(.nocursor) .container[data-container]:not(.chromeless).pointer-enabled {\n cursor: pointer; }\n",""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e];n[2]?t.push("@media "+n[2]+"{"+n[1]+"}"):t.push(n[1])}return t.join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(t,e){function n(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function r(t,e){return function(n){return t(e(n))}}function i(t){return!!t&&"object"==typeof t}function o(t){if(!i(t)||f.call(t)!=a||n(t))return!1;var e=h(t);if(null===e)return!0;var r=c.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&u.call(r)==d}var a="[object Object]",s=Function.prototype,l=Object.prototype,u=s.toString,c=l.hasOwnProperty,d=u.call(Object),f=l.toString,h=r(Object.getPrototypeOf,Object);t.exports=o},function(t,e,n){"use strict";t.exports=n(28)},function(t,e,n){(function(r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(2),c=n(8),d=n(5),f=i(d),h=n(15),p=i(h),g=n(18),y=i(g),v=n(3),m=i(v),b=n(30),_=i(b),E=n(17),T=i(E),A=n(31),k=i(A),w=n(16),S=i(w),R=n(32),L=i(R),O=n(34),C=i(O),P=n(36),D=i(P),I=n(37),x=i(I),N=n(38),M=i(N),F=n(39),B=i(F),U=n(40),j=i(U),G=n(41),Y=i(G),V=n(42),K=i(V),$=n(43),H=i($),z=n(44),W=i(z),q=function(t){function e(n){o(this,e);var r=a(this,t.call(this,n));r.persistConfig=r.options.persistConfig,r.container=n.container,r.currentPositionValue=null,r.currentDurationValue=null;var i=r.persistConfig?u.Config.restore("volume"):100;return r.setVolume(r.options.mute?0:i),r.keepVisible=!1,r.fullScreenOnVideoTagSupported=null,r.addEventListeners(),r.settings={left:["play","stop","pause"],right:["volume"],default:["position","seekbar","duration"]},r.container?S.default.isEmptyObject(r.container.settings)||(r.settings=S.default.extend({},r.container.settings)):r.settings={},r.userDisabled=!1,(r.container&&r.container.mediaControlDisabled||r.options.chromeless)&&r.disable(),r.stopDragHandler=function(t){return r.stopDrag(t)},r.updateDragHandler=function(t){return r.updateDrag(t)},(0,S.default)(document).bind("mouseup",r.stopDragHandler),(0,S.default)(document).bind("mousemove",r.updateDragHandler),r}return s(e,t),l(e,[{key:"name",get:function(){return"MediaControl"}},{key:"disabled",get:function(){return this.userDisabled||this.container&&this.container.getPlaybackType()===k.default.NO_OP;
  4. }},{key:"attributes",get:function(){return{class:"media-control","data-media-control":""}}},{key:"events",get:function(){return{"click [data-play]":"play","click [data-pause]":"pause","click [data-playpause]":"togglePlayPause","click [data-stop]":"stop","click [data-playstop]":"togglePlayStop","click [data-fullscreen]":"toggleFullscreen","click .bar-container[data-seekbar]":"seek","click .bar-container[data-volume]":"onVolumeClick","click .drawer-icon[data-volume]":"toggleMute","mouseenter .drawer-container[data-volume]":"showVolumeBar","mouseleave .drawer-container[data-volume]":"hideVolumeBar","mousedown .bar-container[data-volume]":"startVolumeDrag","mousemove .bar-container[data-volume]":"mousemoveOnVolumeBar","mousedown .bar-scrubber[data-seekbar]":"startSeekDrag","mousemove .bar-container[data-seekbar]":"mousemoveOnSeekBar","mouseleave .bar-container[data-seekbar]":"mouseleaveOnSeekBar","mouseenter .media-control-layer[data-controls]":"setUserKeepVisible","mouseleave .media-control-layer[data-controls]":"resetUserKeepVisible"}}},{key:"template",get:function(){return(0,T.default)(D.default)}},{key:"stylesheet",get:function(){return p.default.getStyleFor(C.default,{baseUrl:this.options.baseUrl})}},{key:"volume",get:function(){return this.container&&this.container.isReady?this.container.volume:this.intendedVolume}},{key:"muted",get:function(){return 0===this.volume}}]),e.prototype.addEventListeners=function(){this.container&&(_.default.on(this.options.playerId+":"+f.default.PLAYER_RESIZE,this.playerResize,this),this.listenTo(this.container,f.default.CONTAINER_PLAY,this.changeTogglePlay),this.listenTo(this.container,f.default.CONTAINER_PAUSE,this.changeTogglePlay),this.listenTo(this.container,f.default.CONTAINER_STOP,this.changeTogglePlay),this.listenTo(this.container,f.default.CONTAINER_DBLCLICK,this.toggleFullscreen),this.listenTo(this.container,f.default.CONTAINER_TIMEUPDATE,this.onTimeUpdate),this.listenTo(this.container,f.default.CONTAINER_PROGRESS,this.updateProgressBar),this.listenTo(this.container,f.default.CONTAINER_SETTINGSUPDATE,this.settingsUpdate),this.listenTo(this.container,f.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.settingsUpdate),this.listenTo(this.container,f.default.CONTAINER_HIGHDEFINITIONUPDATE,this.highDefinitionUpdate),this.listenTo(this.container,f.default.CONTAINER_MEDIACONTROL_DISABLE,this.disable),this.listenTo(this.container,f.default.CONTAINER_MEDIACONTROL_ENABLE,this.enable),this.listenTo(this.container,f.default.CONTAINER_ENDED,this.ended),this.listenTo(this.container,f.default.CONTAINER_VOLUME,this.onVolumeChanged),"video"===this.container.playback.el.nodeName.toLowerCase()&&this.listenToOnce(this.container,f.default.CONTAINER_LOADEDMETADATA,this.onLoadedMetadataOnVideoTag))},e.prototype.disable=function(){this.userDisabled=!0,this.hide(),this.$el.hide()},e.prototype.enable=function(){this.options.chromeless||(this.userDisabled=!1,this.show())},e.prototype.play=function(){this.container.play()},e.prototype.pause=function(){this.container.pause()},e.prototype.stop=function(){this.container.stop()},e.prototype.onVolumeChanged=function(){this.updateVolumeUI()},e.prototype.onLoadedMetadataOnVideoTag=function(){var t=this.container.playback.el;!u.Fullscreen.fullscreenEnabled()&&t.webkitSupportsFullscreen&&(this.fullScreenOnVideoTagSupported=!0,this.settingsUpdate())},e.prototype.updateVolumeUI=function(){if(this.rendered){this.$volumeBarContainer.find(".bar-fill-2").css({});var t=this.$volumeBarContainer.width(),e=this.$volumeBarBackground.width(),n=(t-e)/2,r=e*this.volume/100+n;this.$volumeBarFill.css({width:this.volume+"%"}),this.$volumeBarScrubber.css({left:r}),this.$volumeBarContainer.find(".segmented-bar-element").removeClass("fill");var i=Math.ceil(this.volume/10);this.$volumeBarContainer.find(".segmented-bar-element").slice(0,i).addClass("fill"),this.$volumeIcon.html(""),this.$volumeIcon.removeClass("muted"),this.muted?(this.$volumeIcon.append(Y.default),this.$volumeIcon.addClass("muted")):this.$volumeIcon.append(j.default),this.applyButtonStyle(this.$volumeIcon)}},e.prototype.changeTogglePlay=function(){this.$playPauseToggle.html(""),this.$playStopToggle.html(""),this.container&&this.container.isPlaying()?(this.$playPauseToggle.append(M.default),this.$playStopToggle.append(B.default),this.trigger(f.default.MEDIACONTROL_PLAYING)):(this.$playPauseToggle.append(x.default),this.$playStopToggle.append(x.default),this.trigger(f.default.MEDIACONTROL_NOTPLAYING),m.default.isMobile&&this.show()),this.applyButtonStyle(this.$playPauseToggle),this.applyButtonStyle(this.$playStopToggle)},e.prototype.mousemoveOnSeekBar=function(t){if(this.settings.seekEnabled){var e=t.pageX-this.$seekBarContainer.offset().left-this.$seekBarHover.width()/2;this.$seekBarHover.css({left:e})}this.trigger(f.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR,t)},e.prototype.mouseleaveOnSeekBar=function(t){this.trigger(f.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR,t)},e.prototype.onVolumeClick=function(t){this.setVolume(this.getVolumeFromUIEvent(t))},e.prototype.mousemoveOnVolumeBar=function(t){this.draggingVolumeBar&&this.setVolume(this.getVolumeFromUIEvent(t))},e.prototype.playerResize=function(t){this.$fullscreenToggle.html(""),u.Fullscreen.isFullscreen()?this.$fullscreenToggle.append(H.default):this.$fullscreenToggle.append(K.default),this.applyButtonStyle(this.$fullscreenToggle),this.$el.removeClass("w320"),(t.width<=320||this.options.hideVolumeBar)&&this.$el.addClass("w320")},e.prototype.togglePlayPause=function(){return this.container.isPlaying()?this.container.pause():this.container.play(),!1},e.prototype.togglePlayStop=function(){this.container.isPlaying()?this.container.stop():this.container.play()},e.prototype.startSeekDrag=function(t){this.settings.seekEnabled&&(this.draggingSeekBar=!0,this.$el.addClass("dragging"),this.$seekBarLoaded.addClass("media-control-notransition"),this.$seekBarPosition.addClass("media-control-notransition"),this.$seekBarScrubber.addClass("media-control-notransition"),t&&t.preventDefault())},e.prototype.startVolumeDrag=function(t){this.draggingVolumeBar=!0,this.$el.addClass("dragging"),t&&t.preventDefault()},e.prototype.stopDrag=function(t){this.draggingSeekBar&&this.seek(t),this.$el.removeClass("dragging"),this.$seekBarLoaded.removeClass("media-control-notransition"),this.$seekBarPosition.removeClass("media-control-notransition"),this.$seekBarScrubber.removeClass("media-control-notransition dragging"),this.draggingSeekBar=!1,this.draggingVolumeBar=!1},e.prototype.updateDrag=function(t){if(this.draggingSeekBar){t.preventDefault();var e=t.pageX-this.$seekBarContainer.offset().left,n=e/this.$seekBarContainer.width()*100;n=Math.min(100,Math.max(n,0)),this.setSeekPercentage(n)}else this.draggingVolumeBar&&(t.preventDefault(),this.setVolume(this.getVolumeFromUIEvent(t)))},e.prototype.getVolumeFromUIEvent=function(t){var e=t.pageX-this.$volumeBarContainer.offset().left,n=e/this.$volumeBarContainer.width()*100;return n},e.prototype.toggleMute=function(){this.setVolume(this.muted?100:0)},e.prototype.setVolume=function(t){var e=this;t=Math.min(100,Math.max(t,0)),this.intendedVolume=t,this.persistConfig&&u.Config.persist("volume",t);var n=function(){e.container.isReady?e.container.setVolume(t):e.listenToOnce(e.container,f.default.CONTAINER_READY,function(){e.container.setVolume(t)})};this.container?n():this.listenToOnce(this,f.default.MEDIACONTROL_CONTAINERCHANGED,function(){n()})},e.prototype.toggleFullscreen=function(){this.trigger(f.default.MEDIACONTROL_FULLSCREEN,this.name),this.container.fullscreen(),this.resetUserKeepVisible()},e.prototype.setContainer=function(t){this.container&&(this.stopListening(this.container),this.fullScreenOnVideoTagSupported=null),_.default.off(this.options.playerId+":"+f.default.PLAYER_RESIZE,this.playerResize,this),this.container=t,this.setVolume(this.intendedVolume),this.changeTogglePlay(),this.addEventListeners(),this.settingsUpdate(),this.container.trigger(f.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.container.isDvrInUse()),this.container.mediaControlDisabled&&this.disable(),this.trigger(f.default.MEDIACONTROL_CONTAINERCHANGED)},e.prototype.showVolumeBar=function(){this.hideVolumeId&&clearTimeout(this.hideVolumeId),this.$volumeBarContainer.removeClass("volume-bar-hide")},e.prototype.hideVolumeBar=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:400;this.$volumeBarContainer&&(this.draggingVolumeBar?this.hideVolumeId=setTimeout(function(){return t.hideVolumeBar()},e):(this.hideVolumeId&&clearTimeout(this.hideVolumeId),this.hideVolumeId=setTimeout(function(){return t.$volumeBarContainer.addClass("volume-bar-hide")},e)))},e.prototype.ended=function(){this.changeTogglePlay()},e.prototype.updateProgressBar=function(t){var e=t.start/t.total*100,n=t.current/t.total*100;this.$seekBarLoaded.css({left:e+"%",width:n-e+"%"})},e.prototype.onTimeUpdate=function(t){if(!this.draggingSeekBar){var e=t.current<0?t.total:t.current;this.currentPositionValue=e,this.currentDurationValue=t.total,this.renderSeekBar()}},e.prototype.renderSeekBar=function(){if(null!==this.currentPositionValue&&null!==this.currentDurationValue){this.currentSeekBarPercentage=100,(this.container.getPlaybackType()!==k.default.LIVE||this.container.isDvrInUse())&&(this.currentSeekBarPercentage=this.currentPositionValue/this.currentDurationValue*100),this.setSeekPercentage(this.currentSeekBarPercentage);var t=(0,u.formatTime)(this.currentPositionValue),e=(0,u.formatTime)(this.currentDurationValue);t!==this.displayedPosition&&(this.$position.text(t),this.displayedPosition=t),e!==this.displayedDuration&&(this.$duration.text(e),this.displayedDuration=e)}},e.prototype.seek=function(t){if(this.settings.seekEnabled){var e=t.pageX-this.$seekBarContainer.offset().left,n=e/this.$seekBarContainer.width()*100;return n=Math.min(100,Math.max(n,0)),this.container.seekPercentage(n),this.setSeekPercentage(n),!1}},e.prototype.setKeepVisible=function(){this.keepVisible=!0},e.prototype.resetKeepVisible=function(){this.keepVisible=!1},e.prototype.setUserKeepVisible=function(){this.userKeepVisible=!0},e.prototype.resetUserKeepVisible=function(){this.userKeepVisible=!1},e.prototype.isVisible=function(){return!this.$el.hasClass("media-control-hide")},e.prototype.show=function(t){var e=this;if(!this.disabled){var n=2e3;(!t||t.clientX!==this.lastMouseX&&t.clientY!==this.lastMouseY||navigator.userAgent.match(/firefox/i))&&(clearTimeout(this.hideId),this.$el.show(),this.trigger(f.default.MEDIACONTROL_SHOW,this.name),this.$el.removeClass("media-control-hide"),this.hideId=setTimeout(function(){return e.hide()},n),t&&(this.lastMouseX=t.clientX,this.lastMouseY=t.clientY))}},e.prototype.hide=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.isVisible()&&(!m.default.isMobile||this.container.isPlaying())){var n=e||2e3;clearTimeout(this.hideId),(this.disabled||this.options.hideMediaControl!==!1)&&(!this.disabled&&(e||this.userKeepVisible||this.keepVisible||this.draggingSeekBar||this.draggingVolumeBar)?this.hideId=setTimeout(function(){return t.hide()},n):(this.trigger(f.default.MEDIACONTROL_HIDE,this.name),this.$el.addClass("media-control-hide"),this.hideVolumeBar(0)))}},e.prototype.settingsUpdate=function(){var t=this.getSettings();!t||this.fullScreenOnVideoTagSupported||u.Fullscreen.fullscreenEnabled()||(t.default&&(0,u.removeArrayItem)(t.default,"fullscreen"),t.left&&(0,u.removeArrayItem)(t.left,"fullscreen"),t.right&&(0,u.removeArrayItem)(t.right,"fullscreen"));var e=JSON.stringify(this.settings)!==JSON.stringify(t);e&&(this.settings=t,this.render())},e.prototype.getSettings=function(){return(0,L.default)({},this.container.settings)},e.prototype.highDefinitionUpdate=function(t){var e=t?"addClass":"removeClass";this.$hdIndicator[e]("enabled")},e.prototype.createCachedElements=function(){var t=this.$el.find(".media-control-layer");this.$duration=t.find(".media-control-indicator[data-duration]"),this.$fullscreenToggle=t.find("button.media-control-button[data-fullscreen]"),this.$playPauseToggle=t.find("button.media-control-button[data-playpause]"),this.$playStopToggle=t.find("button.media-control-button[data-playstop]"),this.$position=t.find(".media-control-indicator[data-position]"),this.$seekBarContainer=t.find(".bar-container[data-seekbar]"),this.$seekBarHover=t.find(".bar-hover[data-seekbar]"),this.$seekBarLoaded=t.find(".bar-fill-1[data-seekbar]"),this.$seekBarPosition=t.find(".bar-fill-2[data-seekbar]"),this.$seekBarScrubber=t.find(".bar-scrubber[data-seekbar]"),this.$volumeBarContainer=t.find(".bar-container[data-volume]"),this.$volumeContainer=t.find(".drawer-container[data-volume]"),this.$volumeIcon=t.find(".drawer-icon[data-volume]"),this.$volumeBarBackground=this.$el.find(".bar-background[data-volume]"),this.$volumeBarFill=this.$el.find(".bar-fill-1[data-volume]"),this.$volumeBarScrubber=this.$el.find(".bar-scrubber[data-volume]"),this.$hdIndicator=this.$el.find("button.media-control-button[data-hd-indicator]"),this.resetIndicators(),this.initializeIcons()},e.prototype.resetIndicators=function(){this.displayedPosition=this.$position.text(),this.displayedDuration=this.$duration.text()},e.prototype.initializeIcons=function(){var t=this.$el.find(".media-control-layer");t.find("button.media-control-button[data-play]").append(x.default),t.find("button.media-control-button[data-pause]").append(M.default),t.find("button.media-control-button[data-stop]").append(B.default),this.$playPauseToggle.append(x.default),this.$playStopToggle.append(x.default),this.$volumeIcon.append(j.default),this.$fullscreenToggle.append(K.default),this.$hdIndicator.append(W.default)},e.prototype.setSeekPercentage=function(t){t=Math.max(Math.min(t,100),0),this.displayedSeekBarPercentage!==t&&(this.displayedSeekBarPercentage=t,this.$seekBarPosition.removeClass("media-control-notransition"),this.$seekBarScrubber.removeClass("media-control-notransition"),this.$seekBarPosition.css({width:t+"%"}),this.$seekBarScrubber.css({left:t+"%"}))},e.prototype.seekRelative=function(t){if(this.settings.seekEnabled){var e=this.container.getCurrentTime(),n=this.container.getDuration(),r=Math.min(Math.max(e+t,0),n);r=Math.min(100*r/n,100),this.container.seekPercentage(r)}},e.prototype.bindKeyEvents=function(){var t=this;this.unbindKeyEvents(),this.kibo=new c.Kibo(this.options.focusElement),this.kibo.down(["space"],function(){return t.togglePlayPause()}),this.kibo.down(["left"],function(){return t.seekRelative(-15)}),this.kibo.down(["right"],function(){return t.seekRelative(15)});var e=[1,2,3,4,5,6,7,8,9,0];e.forEach(function(e){t.kibo.down(e.toString(),function(){return t.settings.seekEnabled&&t.container.seekPercentage(10*e)})})},e.prototype.unbindKeyEvents=function(){this.kibo&&(this.kibo.off("space"),this.kibo.off("left"),this.kibo.off("right"),this.kibo.off([1,2,3,4,5,6,7,8,9,0]))},e.prototype.parseColors=function(){if(this.options.mediacontrol){this.buttonsColor=this.options.mediacontrol.buttons;var t=this.options.mediacontrol.seekbar;this.$el.find(".bar-fill-2[data-seekbar]").css("background-color",t),this.$el.find(".media-control-icon svg path").css("fill",this.buttonsColor),this.$el.find(".segmented-bar-element[data-volume]").css("boxShadow","inset 2px 0 0 "+this.buttonsColor)}},e.prototype.applyButtonStyle=function(t){this.buttonsColor&&t&&(0,S.default)(t).find("svg path").css("fill",this.buttonsColor)},e.prototype.destroy=function(){this.remove(),(0,S.default)(document).unbind("mouseup",this.stopDragHandler),(0,S.default)(document).unbind("mousemove",this.updateDragHandler),this.unbindKeyEvents()},e.prototype.render=function(){var t=this,e=1e3;this.$el.html(this.template({settings:this.settings})),this.$el.append(this.stylesheet),this.createCachedElements(),this.$playPauseToggle.addClass("paused"),this.$playStopToggle.addClass("stopped"),this.changeTogglePlay(),this.hideId=setTimeout(function(){return t.hide()},e),this.disabled&&this.hide(),m.default.isSafari&&m.default.isMobile&&this.$volumeContainer.css("display","none"),this.$seekBarPosition.addClass("media-control-notransition"),this.$seekBarScrubber.addClass("media-control-notransition");var n=0;return this.displayedSeekBarPercentage&&(n=this.displayedSeekBarPercentage),this.displayedSeekBarPercentage=null,this.setSeekPercentage(n),r.nextTick(function(){t.settings.seekEnabled||t.$seekBarContainer.addClass("seek-disabled"),m.default.isMobile||t.options.disableKeyboardShortcuts||t.bindKeyEvents(),t.playerResize({width:t.options.width,height:t.options.height}),t.hideVolumeBar(0)}),this.parseColors(),this.highDefinitionUpdate(),this.rendered=!0,this.updateVolumeUI(),this.trigger(f.default.MEDIACONTROL_RENDERED),this},e}(y.default);e.default=q,q.extend=function(t){return(0,u.extend)(q,t)},t.exports=e.default}).call(e,n(29))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(c===setTimeout)return setTimeout(t,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(d===clearTimeout)return clearTimeout(t);if((d===r||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function a(){g&&h&&(g=!1,h.length?p=h.concat(p):y=-1,p.length&&s())}function s(){if(!g){var t=i(a);g=!0;for(var e=p.length;e;){for(h=p,p=[];++y<e;)h&&h[y].run();y=-1,e=p.length}h=null,g=!1,o(t)}}function l(t,e){this.fun=t,this.array=e}function u(){}var c,d,f=t.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(t){c=n}try{d="function"==typeof clearTimeout?clearTimeout:r}catch(t){d=r}}();var h,p=[],g=!1,y=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];p.push(new l(t,e)),1!==p.length||g||i(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(5),a=r(o),s=new a.default,l=function t(){i(this,t)};e.default=l,l.on=function(t,e,n){s.on(t,e,n)},l.once=function(t,e,n){s.once(t,e,n)},l.off=function(t,e,n){s.off(t,e,n)},l.trigger=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];s.trigger.apply(s,[t].concat(n))},l.stopListening=function(t,e,n){s.stopListening(t,e,n)},t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(2),u=n(18),c=r(u),d=function(t){function e(n,r){i(this,e);var a=o(this,t.call(this,n));return a.settings={},a._i18n=r,a}return a(e,t),s(e,[{key:"isAudioOnly",get:function(){return!1}},{key:"ended",get:function(){return!1}},{key:"i18n",get:function(){return this._i18n}},{key:"buffering",get:function(){return!1}}]),e.prototype.play=function(){},e.prototype.pause=function(){},e.prototype.stop=function(){},e.prototype.seek=function(t){},e.prototype.seekPercentage=function(t){},e.prototype.getStartTimeOffset=function(){return 0},e.prototype.getDuration=function(){return 0},e.prototype.isPlaying=function(){return!1},e.prototype.getPlaybackType=function(){return e.NO_OP},e.prototype.isHighDefinitionInUse=function(){return!1},e.prototype.volume=function(t){},e.prototype.destroy=function(){this.$el.remove()},s(e,[{key:"isReady",get:function(){return!1}}]),e}(c.default);e.default=d,d.extend=function(t){return(0,l.extend)(d,t)},d.canPlay=function(t,e){return!1},d.VOD="vod",d.AOD="aod",d.LIVE="live",d.NO_OP="no_op",d.type="playback",t.exports=e.default},function(t,e,n){(function(t,n){function r(t,e){return t.set(e[0],e[1]),t}function i(t,e){return t.add(e),t}function o(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function a(t,e){for(var n=-1,r=t?t.length:0;++n<r&&e(t[n],n,t)!==!1;);return t}function s(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function l(t,e,n,r){var i=-1,o=t?t.length:0;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function u(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function c(t){return function(e){return t(e)}}function d(t,e){return null==t?void 0:t[e]}function f(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function h(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function p(t,e){return function(n){return t(e(n))}}function g(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function y(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function v(){this.__data__=on?on(null):{}}function m(t){return this.has(t)&&delete this.__data__[t]}function b(t){var e=this.__data__;if(on){var n=e[t];return n===Yt?void 0:n}return Be.call(e,t)?e[t]:void 0}function _(t){var e=this.__data__;return on?void 0!==e[t]:Be.call(e,t)}function E(t,e){var n=this.__data__;return n[t]=on&&void 0===e?Yt:e,this}function T(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function A(){this.__data__=[]}function k(t){var e=this.__data__,n=V(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():We.call(e,n,1),!0}function w(t){var e=this.__data__,n=V(e,t);return n<0?void 0:e[n][1]}function S(t){return V(this.__data__,t)>-1}function R(t,e){var n=this.__data__,r=V(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function L(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function O(){this.__data__={hash:new y,map:new(tn||T),string:new y}}function C(t){return gt(this,t).delete(t)}function P(t){return gt(this,t).get(t)}function D(t){return gt(this,t).has(t)}function I(t,e){return gt(this,t).set(t,e),this}function x(t){this.__data__=new T(t)}function N(){this.__data__=new T}function M(t){return this.__data__.delete(t)}function F(t){return this.__data__.get(t)}function B(t){return this.__data__.has(t)}function U(t,e){var n=this.__data__;if(n instanceof T){var r=n.__data__;if(!tn||r.length<Gt-1)return r.push([t,e]),this;n=this.__data__=new L(r)}return n.set(t,e),this}function j(t,e){var n=gn(t)||Lt(t)?u(t.length,String):[],r=n.length,i=!!r;for(var o in t)!e&&!Be.call(t,o)||i&&("length"==o||_t(o,r))||n.push(o);return n}function G(t,e,n){(void 0===n||Rt(t[e],n))&&("number"!=typeof e||void 0!==n||e in t)||(t[e]=n)}function Y(t,e,n){var r=t[e];Be.call(t,e)&&Rt(r,n)&&(void 0!==n||e in t)||(t[e]=n)}function V(t,e){for(var n=t.length;n--;)if(Rt(t[n][0],e))return n;return-1}function K(t,e){return t&&dt(e,Ft(e),t)}function $(t,e,n,r,i,o,s){var l;if(r&&(l=o?r(t,i,o,s):r(t)),void 0!==l)return l;if(!It(t))return t;var u=gn(t);if(u){if(l=vt(t),!e)return ct(t,l)}else{var c=pn(t),d=c==qt||c==Xt;if(yn(t))return nt(t,e);if(c==Qt||c==Kt||d&&!o){if(f(t))return o?t:{};if(l=mt(d?{}:t),!e)return ft(t,K(l,t))}else{if(!Te[c])return o?t:{};l=bt(t,c,$,e)}}s||(s=new x);var h=s.get(t);if(h)return h;if(s.set(t,l),!u)var p=n?pt(t):Ft(t);return a(p||t,function(i,o){p&&(o=i,i=t[o]),Y(l,o,$(i,e,n,r,o,t,s))}),l}function H(t){return It(t)?He(t):{}}function z(t,e,n){var r=e(t);return gn(t)?r:s(r,n(t))}function W(t){return je.call(t)}function q(t){if(!It(t)||At(t))return!1;var e=Pt(t)||f(t)?Ge:be;return e.test(St(t))}function X(t){return xt(t)&&Dt(t.length)&&!!Ee[je.call(t)]}function Z(t){if(!kt(t))return Ze(t);var e=[];for(var n in Object(t))Be.call(t,n)&&"constructor"!=n&&e.push(n);return e}function J(t){if(!It(t))return wt(t);var e=kt(t),n=[];for(var r in t)("constructor"!=r||!e&&Be.call(t,r))&&n.push(r);return n}function Q(t,e,n,r,i){if(t!==e){if(!gn(e)&&!vn(e))var o=J(e);a(o||e,function(a,s){if(o&&(s=a,a=e[s]),It(a))i||(i=new x),tt(t,e,s,n,Q,r,i);else{var l=r?r(t[s],a,s+"",t,e,i):void 0;void 0===l&&(l=a),G(t,s,l)}})}}function tt(t,e,n,r,i,o,a){var s=t[n],l=e[n],u=a.get(l);if(u)return void G(t,n,u);var c=o?o(s,l,n+"",t,e,a):void 0,d=void 0===c;d&&(c=l,gn(l)||vn(l)?gn(s)?c=s:Ct(s)?c=ct(s):(d=!1,c=$(l,!0)):Nt(l)||Lt(l)?Lt(s)?c=Mt(s):!It(s)||r&&Pt(s)?(d=!1,c=$(l,!0)):c=s:d=!1),d&&(a.set(l,c),i(c,l,r,o,a),a.delete(l)),G(t,n,c)}function et(t,e){return e=Je(void 0===e?t.length-1:e,0),function(){for(var n=arguments,r=-1,i=Je(n.length-e,0),a=Array(i);++r<i;)a[r]=n[e+r];r=-1;for(var s=Array(e+1);++r<e;)s[r]=n[r];return s[e]=a,o(t,this,s)}}function nt(t,e){if(e)return t.slice();var n=new t.constructor(t.length);return t.copy(n),n}function rt(t){var e=new t.constructor(t.byteLength);return new Ke(e).set(new Ke(t)),e}function it(t,e){var n=e?rt(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function ot(t,e,n){var i=e?n(h(t),!0):h(t);return l(i,r,new t.constructor)}function at(t){var e=new t.constructor(t.source,me.exec(t));return e.lastIndex=t.lastIndex,e}function st(t,e,n){var r=e?n(g(t),!0):g(t);return l(r,i,new t.constructor)}function lt(t){return fn?Object(fn.call(t)):{}}function ut(t,e){var n=e?rt(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ct(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function dt(t,e,n,r){n||(n={});for(var i=-1,o=e.length;++i<o;){var a=e[i],s=r?r(n[a],t[a],a,n,t):void 0;Y(n,a,void 0===s?t[a]:s)}return n}function ft(t,e){return dt(t,hn(t),e)}function ht(t){return et(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,a&&Et(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var s=n[r];s&&t(e,s,r,o)}return e})}function pt(t){return z(t,Ft,hn)}function gt(t,e){var n=t.__data__;return Tt(e)?n["string"==typeof e?"string":"hash"]:n.map}function yt(t,e){var n=d(t,e);return q(n)?n:void 0}function vt(t){var e=t.length,n=t.constructor(e);return e&&"string"==typeof t[0]&&Be.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function mt(t){return"function"!=typeof t.constructor||kt(t)?{}:H($e(t))}function bt(t,e,n,r){var i=t.constructor;switch(e){case ae:return rt(t);case Ht:case zt:return new i(+t);case se:return it(t,r);case le:case ue:case ce:case de:case fe:case he:case pe:case ge:case ye:return ut(t,r);case Zt:return ot(t,r,n);case Jt:case re:return new i(t);case ee:return at(t);case ne:return st(t,r,n);case ie:return lt(t)}}function _t(t,e){return e=null==e?Vt:e,!!e&&("number"==typeof t||_e.test(t))&&t>-1&&t%1==0&&t<e}function Et(t,e,n){if(!It(n))return!1;var r=typeof e;return!!("number"==r?Ot(n)&&_t(e,n.length):"string"==r&&e in n)&&Rt(n[e],t)}function Tt(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function At(t){return!!Me&&Me in t}function kt(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||xe;return t===n}function wt(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}function St(t){if(null!=t){try{return Fe.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Rt(t,e){return t===e||t!==t&&e!==e}function Lt(t){return Ct(t)&&Be.call(t,"callee")&&(!ze.call(t,"callee")||je.call(t)==Kt)}function Ot(t){return null!=t&&Dt(t.length)&&!Pt(t)}function Ct(t){return xt(t)&&Ot(t)}function Pt(t){var e=It(t)?je.call(t):"";return e==qt||e==Xt}function Dt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Vt}function It(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function xt(t){return!!t&&"object"==typeof t}function Nt(t){if(!xt(t)||je.call(t)!=Qt||f(t))return!1;var e=$e(t);if(null===e)return!0;var n=Be.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Fe.call(n)==Ue}function Mt(t){return dt(t,Bt(t))}function Ft(t){return Ot(t)?j(t):Z(t)}function Bt(t){return Ot(t)?j(t,!0):J(t)}function Ut(){return[]}function jt(){return!1}var Gt=200,Yt="__lodash_hash_undefined__",Vt=9007199254740991,Kt="[object Arguments]",$t="[object Array]",Ht="[object Boolean]",zt="[object Date]",Wt="[object Error]",qt="[object Function]",Xt="[object GeneratorFunction]",Zt="[object Map]",Jt="[object Number]",Qt="[object Object]",te="[object Promise]",ee="[object RegExp]",ne="[object Set]",re="[object String]",ie="[object Symbol]",oe="[object WeakMap]",ae="[object ArrayBuffer]",se="[object DataView]",le="[object Float32Array]",ue="[object Float64Array]",ce="[object Int8Array]",de="[object Int16Array]",fe="[object Int32Array]",he="[object Uint8Array]",pe="[object Uint8ClampedArray]",ge="[object Uint16Array]",ye="[object Uint32Array]",ve=/[\\^$.*+?()[\]{}|]/g,me=/\w*$/,be=/^\[object .+?Constructor\]$/,_e=/^(?:0|[1-9]\d*)$/,Ee={};Ee[le]=Ee[ue]=Ee[ce]=Ee[de]=Ee[fe]=Ee[he]=Ee[pe]=Ee[ge]=Ee[ye]=!0,Ee[Kt]=Ee[$t]=Ee[ae]=Ee[Ht]=Ee[se]=Ee[zt]=Ee[Wt]=Ee[qt]=Ee[Zt]=Ee[Jt]=Ee[Qt]=Ee[ee]=Ee[ne]=Ee[re]=Ee[oe]=!1;var Te={};Te[Kt]=Te[$t]=Te[ae]=Te[se]=Te[Ht]=Te[zt]=Te[le]=Te[ue]=Te[ce]=Te[de]=Te[fe]=Te[Zt]=Te[Jt]=Te[Qt]=Te[ee]=Te[ne]=Te[re]=Te[ie]=Te[he]=Te[pe]=Te[ge]=Te[ye]=!0,Te[Wt]=Te[qt]=Te[oe]=!1;var Ae="object"==typeof t&&t&&t.Object===Object&&t,ke="object"==typeof self&&self&&self.Object===Object&&self,we=Ae||ke||Function("return this")(),Se="object"==typeof e&&e&&!e.nodeType&&e,Re=Se&&"object"==typeof n&&n&&!n.nodeType&&n,Le=Re&&Re.exports===Se,Oe=Le&&Ae.process,Ce=function(){try{return Oe&&Oe.binding("util")}catch(t){}}(),Pe=Ce&&Ce.isTypedArray,De=Array.prototype,Ie=Function.prototype,xe=Object.prototype,Ne=we["__core-js_shared__"],Me=function(){var t=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Fe=Ie.toString,Be=xe.hasOwnProperty,Ue=Fe.call(Object),je=xe.toString,Ge=RegExp("^"+Fe.call(Be).replace(ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ye=Le?we.Buffer:void 0,Ve=we.Symbol,Ke=we.Uint8Array,$e=p(Object.getPrototypeOf,Object),He=Object.create,ze=xe.propertyIsEnumerable,We=De.splice,qe=Object.getOwnPropertySymbols,Xe=Ye?Ye.isBuffer:void 0,Ze=p(Object.keys,Object),Je=Math.max,Qe=yt(we,"DataView"),tn=yt(we,"Map"),en=yt(we,"Promise"),nn=yt(we,"Set"),rn=yt(we,"WeakMap"),on=yt(Object,"create"),an=St(Qe),sn=St(tn),ln=St(en),un=St(nn),cn=St(rn),dn=Ve?Ve.prototype:void 0,fn=dn?dn.valueOf:void 0;y.prototype.clear=v,y.prototype.delete=m,y.prototype.get=b,y.prototype.has=_,y.prototype.set=E,T.prototype.clear=A,T.prototype.delete=k,T.prototype.get=w,T.prototype.has=S,T.prototype.set=R,L.prototype.clear=O,L.prototype.delete=C,L.prototype.get=P,L.prototype.has=D,L.prototype.set=I,x.prototype.clear=N,x.prototype.delete=M,x.prototype.get=F,x.prototype.has=B,x.prototype.set=U;var hn=qe?p(qe,Object):Ut,pn=W;(Qe&&pn(new Qe(new ArrayBuffer(1)))!=se||tn&&pn(new tn)!=Zt||en&&pn(en.resolve())!=te||nn&&pn(new nn)!=ne||rn&&pn(new rn)!=oe)&&(pn=function(t){
  5. var e=je.call(t),n=e==Qt?t.constructor:void 0,r=n?St(n):void 0;if(r)switch(r){case an:return se;case sn:return Zt;case ln:return te;case un:return ne;case cn:return oe}return e});var gn=Array.isArray,yn=Xe||jt,vn=Pe?c(Pe):X,mn=ht(function(t,e,n){Q(t,e,n)});n.exports=mn}).call(e,function(){return this}(),n(33)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n){e=t.exports=n(25)(),e.push([t.id,".media-control-notransition {\n -webkit-transition: none !important;\n -moz-transition: none !important;\n transition: none !important; }\n\n.media-control[data-media-control] {\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 9999;\n pointer-events: none; }\n .media-control[data-media-control].dragging {\n pointer-events: auto;\n cursor: -webkit-grabbing !important;\n cursor: grabbing !important;\n cursor: url("+n(35)+"), move; }\n .media-control[data-media-control].dragging * {\n cursor: -webkit-grabbing !important;\n cursor: grabbing !important;\n cursor: url("+n(35)+'), move; }\n .media-control[data-media-control] .media-control-background[data-background] {\n position: absolute;\n height: 40%;\n width: 100%;\n bottom: 0;\n background: -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.9));\n background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));\n -webkit-transition: opacity 0.6s ease-out;\n -moz-transition: opacity 0.6s ease-out;\n transition: opacity 0.6s ease-out; }\n .media-control[data-media-control] .media-control-icon {\n line-height: 0;\n letter-spacing: 0;\n speak: none;\n color: #fff;\n opacity: 0.5;\n vertical-align: middle;\n text-align: left;\n -webkit-transition: all 0.1s ease;\n -moz-transition: all 0.1s ease;\n transition: all 0.1s ease; }\n .media-control[data-media-control] .media-control-icon:hover {\n color: white;\n opacity: 0.75;\n text-shadow: rgba(255, 255, 255, 0.8) 0 0 5px; }\n .media-control[data-media-control].media-control-hide .media-control-background[data-background] {\n opacity: 0; }\n .media-control[data-media-control].media-control-hide .media-control-layer[data-controls] {\n bottom: -50px; }\n .media-control[data-media-control].media-control-hide .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] {\n opacity: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] {\n position: absolute;\n bottom: 7px;\n width: 100%;\n height: 32px;\n font-size: 0;\n vertical-align: middle;\n pointer-events: auto;\n -webkit-transition: bottom 0.4s ease-out;\n -moz-transition: bottom 0.4s ease-out;\n transition: bottom 0.4s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-left-panel[data-media-control] {\n position: absolute;\n top: 0;\n left: 4px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-center-panel[data-media-control] {\n height: 100%;\n text-align: center;\n line-height: 32px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-right-panel[data-media-control] {\n position: absolute;\n top: 0;\n right: 4px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button {\n background-color: transparent;\n border: 0;\n margin: 0 6px;\n padding: 0;\n cursor: pointer;\n display: inline-block;\n width: 32px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg {\n width: 100%;\n height: 22px; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg path {\n fill: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button:focus {\n outline: none; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-play] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-pause] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-stop] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-fullscreen] {\n float: right;\n background-color: transparent;\n border: 0;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator] {\n cursor: default;\n float: right;\n background-color: transparent;\n border: 0;\n height: 100%;\n display: none; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled {\n opacity: 1.0;\n display: block; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled:hover {\n opacity: 1.0;\n text-shadow: none; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playpause] {\n float: left; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playstop] {\n float: left; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position], .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration] {\n display: inline-block;\n font-size: 10px;\n color: white;\n cursor: default;\n line-height: 32px;\n position: relative; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position] {\n margin: 0 6px 0 7px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration] {\n color: rgba(255, 255, 255, 0.5);\n margin-right: 6px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]:before {\n content: "|";\n margin-right: 7px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] {\n position: absolute;\n top: -20px;\n left: 0;\n display: inline-block;\n vertical-align: middle;\n width: 100%;\n height: 25px;\n cursor: pointer; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] {\n width: 100%;\n height: 1px;\n position: relative;\n top: 12px;\n background-color: #666666; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-1[data-seekbar] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #c2c2c2;\n -webkit-transition: all 0.1s ease-out;\n -moz-transition: all 0.1s ease-out;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #005aff;\n -webkit-transition: all 0.1s ease-out;\n -moz-transition: all 0.1s ease-out;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 0;\n position: absolute;\n top: -3px;\n width: 5px;\n height: 7px;\n background-color: rgba(255, 255, 255, 0.5);\n -webkit-transition: opacity 0.1s ease;\n -moz-transition: opacity 0.1s ease;\n transition: opacity 0.1s ease; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]:hover .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 1; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled {\n cursor: default; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled:hover .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] {\n position: absolute;\n -webkit-transform: translateX(-50%);\n -moz-transform: translateX(-50%);\n -ms-transform: translateX(-50%);\n -o-transform: translateX(-50%);\n transform: translateX(-50%);\n top: 2px;\n left: 0;\n width: 20px;\n height: 20px;\n opacity: 1;\n -webkit-transition: all 0.1s ease-out;\n -moz-transition: all 0.1s ease-out;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] .bar-scrubber-icon[data-seekbar] {\n position: absolute;\n left: 6px;\n top: 6px;\n width: 8px;\n height: 8px;\n border-radius: 10px;\n box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);\n background-color: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] {\n float: right;\n display: inline-block;\n height: 32px;\n cursor: pointer;\n margin: 0 6px;\n box-sizing: border-box; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] {\n float: left;\n bottom: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] {\n background-color: transparent;\n border: 0;\n box-sizing: content-box;\n width: 32px;\n height: 32px;\n opacity: 0.5; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]:hover {\n opacity: 0.75; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg {\n height: 24px;\n position: relative;\n top: 3px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg path {\n fill: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume].muted svg {\n margin-left: 2px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] {\n float: left;\n position: relative;\n overflow: hidden;\n top: 6px;\n width: 42px;\n height: 18px;\n padding: 3px 0;\n -webkit-transition: width 0.2s ease-out;\n -moz-transition: width 0.2s ease-out;\n transition: width 0.2s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] {\n height: 1px;\n position: relative;\n top: 7px;\n margin: 0 3px;\n background-color: #666666; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-1[data-volume] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #c2c2c2;\n -webkit-transition: all 0.1s ease-out;\n -moz-transition: all 0.1s ease-out;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-2[data-volume] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #005aff;\n -webkit-transition: all 0.1s ease-out;\n -moz-transition: all 0.1s ease-out;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-hover[data-volume] {\n opacity: 0;\n position: absolute;\n top: -3px;\n width: 5px;\n height: 7px;\n background-color: rgba(255, 255, 255, 0.5);\n -webkit-transition: opacity 0.1s ease;\n -moz-transition: opacity 0.1s ease;\n transition: opacity 0.1s ease; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] {\n position: absolute;\n -webkit-transform: translateX(-50%);\n -moz-transform: translateX(-50%);\n -ms-transform: translateX(-50%);\n -o-transform: translateX(-50%);\n transform: translateX(-50%);\n top: 0px;\n left: 0;\n width: 20px;\n height: 20px;\n opacity: 1;\n -webkit-transition: all 0.1s ease-out;\n -moz-transition: all 0.1s ease-out;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] .bar-scrubber-icon[data-volume] {\n position: absolute;\n left: 6px;\n top: 6px;\n width: 8px;\n height: 8px;\n border-radius: 10px;\n box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);\n background-color: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume] {\n float: left;\n width: 4px;\n padding-left: 2px;\n height: 12px;\n opacity: 0.5;\n box-shadow: inset 2px 0 0 white;\n -webkit-transition: -webkit-transform 0.2s ease-out;\n -moz-transition: -moz-transform 0.2s ease-out;\n transition: transform 0.2s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume].fill {\n box-shadow: inset 2px 0 0 #fff;\n opacity: 1; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:nth-of-type(1) {\n padding-left: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:hover {\n -webkit-transform: scaleY(1.5);\n -moz-transform: scaleY(1.5);\n -ms-transform: scaleY(1.5);\n -o-transform: scaleY(1.5);\n transform: scaleY(1.5); }\n .media-control[data-media-control].w320 .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume].volume-bar-hide {\n width: 0;\n height: 12px;\n top: 9px;\n padding: 0; }\n',""])},function(t,e,n){t.exports=n.p+"a8c874b93b3d848f39a71260c57e3863.cur"},function(t,e){t.exports='<div class="media-control-background" data-background></div>\n<div class="media-control-layer" data-controls>\n <% var renderBar = function(name) { %>\n <div class="bar-container" data-<%= name %>>\n <div class="bar-background" data-<%= name %>>\n <div class="bar-fill-1" data-<%= name %>></div>\n <div class="bar-fill-2" data-<%= name %>></div>\n <div class="bar-hover" data-<%= name %>></div>\n </div>\n <div class="bar-scrubber" data-<%= name %>>\n <div class="bar-scrubber-icon" data-<%= name %>></div>\n </div>\n </div>\n <% }; %>\n <% var renderSegmentedBar = function(name, segments) {\n segments = segments || 10; %>\n <div class="bar-container" data-<%= name %>>\n <% for (var i = 0; i < segments; i++) { %>\n <div class="segmented-bar-element" data-<%= name %>></div>\n <% } %>\n </div>\n <% }; %>\n <% var renderDrawer = function(name, renderContent) { %>\n <div class="drawer-container" data-<%= name %>>\n <div class="drawer-icon-container" data-<%= name %>>\n <div class="drawer-icon media-control-icon" data-<%= name %>></div>\n <span class="drawer-text" data-<%= name %>></span>\n </div>\n <% renderContent(name); %>\n </div>\n <% }; %>\n <% var renderIndicator = function(name) { %>\n <div class="media-control-indicator" data-<%= name %>></div>\n <% }; %>\n <% var renderButton = function(name) { %>\n <button type="button" class="media-control-button media-control-icon" data-<%= name %> aria-label="<%= name %>"></button>\n <% }; %>\n <% var templates = {\n bar: renderBar,\n segmentedBar: renderSegmentedBar,\n };\n var render = function(settingsList) {\n settingsList.forEach(function(setting) {\n if(setting === "seekbar") {\n renderBar(setting);\n } else if (setting === "volume") {\n renderDrawer(setting, settings.volumeBarTemplate ? templates[settings.volumeBarTemplate] : function(name) { return renderSegmentedBar(name); });\n } else if (setting === "duration" || setting === "position") {\n renderIndicator(setting);\n } else {\n renderButton(setting);\n }\n });\n }; %>\n <% if (settings.default && settings.default.length) { %>\n <div class="media-control-center-panel" data-media-control>\n <% render(settings.default); %>\n </div>\n <% } %>\n <% if (settings.left && settings.left.length) { %>\n <div class="media-control-left-panel" data-media-control>\n <% render(settings.left); %>\n </div>\n <% } %>\n <% if (settings.right && settings.right.length) { %>\n <div class="media-control-right-panel" data-media-control>\n <% render(settings.right); %>\n </div>\n <% } %>\n</div>\n'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M1.425.35L14.575 8l-13.15 7.65V.35z"></path></svg>'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M1.712 14.76H6.43V1.24H1.71v13.52zm7.86-13.52v13.52h4.716V1.24H9.573z"></path></svg>'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M1.712 1.24h12.6v13.52h-12.6z"></path></svg>'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M11.5 11h-.002v1.502L7.798 10H4.5V6h3.297l3.7-2.502V4.5h.003V11zM11 4.49L7.953 6.5H5v3h2.953L11 11.51V4.49z"></path></svg>'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M9.75 11.51L6.7 9.5H3.75v-3H6.7L9.75 4.49v.664l.497.498V3.498L6.547 6H3.248v4h3.296l3.7 2.502v-2.154l-.497.5v.662zm3-5.165L12.404 6l-1.655 1.653L9.093 6l-.346.345L10.402 8 8.747 9.654l.346.347 1.655-1.653L12.403 10l.348-.346L11.097 8l1.655-1.655z"></path></svg>'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M7.156 8L4 11.156V8.5H3V13h4.5v-1H4.844L8 8.844 7.156 8zM8.5 3v1h2.657L8 7.157 8.846 8 12 4.844V7.5h1V3H8.5z"></path></svg>'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M13.5 3.344l-.844-.844L9.5 5.656V3h-1v4.5H13v-1h-2.656L13.5 3.344zM3 9.5h2.656L2.5 12.656l.844.844L6.5 10.344V13h1V8.5H3v1z"></path></svg>'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M5.375 7.062H2.637V4.26H.502v7.488h2.135V8.9h2.738v2.848h2.133V4.26H5.375v2.802zm5.97-2.81h-2.84v7.496h2.798c2.65 0 4.195-1.607 4.195-3.77v-.022c0-2.162-1.523-3.704-4.154-3.704zm2.06 3.758c0 1.21-.81 1.896-2.03 1.896h-.83V6.093h.83c1.22 0 2.03.696 2.03 1.896v.02z"></path></svg>'},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function t(){n(this,t),this.options={},this.playbackPlugins=[],this.currentSize={width:0,height:0}};r._players={},r.getInstance=function(t){return r._players[t]||(r._players[t]=new r)},e.default=r,t.exports=e.default},function(t,e,n){e=t.exports=n(25)(),e.push([t.id,'@font-face {\n font-family: "Roboto";\n font-style: normal;\n font-weight: 400;\n src: local("Roboto"), local("Roboto-Regular"), url('+n(47)+') format("truetype"); }\n\n[data-player] {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -o-user-select: none;\n user-select: none;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-transform: translate3d(0, 0, 0);\n -moz-transform: translate3d(0, 0, 0);\n -ms-transform: translate3d(0, 0, 0);\n -o-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n position: relative;\n margin: 0;\n padding: 0;\n border: 0;\n font-style: normal;\n font-weight: normal;\n text-align: center;\n overflow: hidden;\n font-size: 100%;\n font-family: "Roboto", "Open Sans", Arial, sans-serif;\n text-shadow: 0 0 0;\n box-sizing: border-box; }\n [data-player] div, [data-player] span, [data-player] applet, [data-player] object, [data-player] iframe,\n [data-player] h1, [data-player] h2, [data-player] h3, [data-player] h4, [data-player] h5, [data-player] h6, [data-player] p, [data-player] blockquote, [data-player] pre,\n [data-player] a, [data-player] abbr, [data-player] acronym, [data-player] address, [data-player] big, [data-player] cite, [data-player] code,\n [data-player] del, [data-player] dfn, [data-player] em, [data-player] img, [data-player] ins, [data-player] kbd, [data-player] q, [data-player] s, [data-player] samp,\n [data-player] small, [data-player] strike, [data-player] strong, [data-player] sub, [data-player] sup, [data-player] tt, [data-player] var,\n [data-player] b, [data-player] u, [data-player] i, [data-player] center,\n [data-player] dl, [data-player] dt, [data-player] dd, [data-player] ol, [data-player] ul, [data-player] li,\n [data-player] fieldset, [data-player] form, [data-player] label, [data-player] legend,\n [data-player] table, [data-player] caption, [data-player] tbody, [data-player] tfoot, [data-player] thead, [data-player] tr, [data-player] th, [data-player] td,\n [data-player] article, [data-player] aside, [data-player] canvas, [data-player] details, [data-player] embed,\n [data-player] figure, [data-player] figcaption, [data-player] footer, [data-player] header, [data-player] hgroup,\n [data-player] menu, [data-player] nav, [data-player] output, [data-player] ruby, [data-player] section, [data-player] summary,\n [data-player] time, [data-player] mark, [data-player] audio, [data-player] video {\n margin: 0;\n padding: 0;\n border: 0;\n font: inherit;\n font-size: 100%;\n vertical-align: baseline; }\n [data-player] table {\n border-collapse: collapse;\n border-spacing: 0; }\n [data-player] caption, [data-player] th, [data-player] td {\n text-align: left;\n font-weight: normal;\n vertical-align: middle; }\n [data-player] q, [data-player] blockquote {\n quotes: none; }\n [data-player] q:before, [data-player] q:after, [data-player] blockquote:before, [data-player] blockquote:after {\n content: "";\n content: none; }\n [data-player] a img {\n border: none; }\n [data-player]:focus {\n outline: 0; }\n [data-player] * {\n max-width: none;\n box-sizing: inherit;\n float: none; }\n [data-player] div {\n display: block; }\n [data-player].fullscreen {\n width: 100% !important;\n height: 100% !important;\n top: 0;\n left: 0; }\n [data-player].nocursor {\n cursor: none; }\n\n.clappr-style {\n display: none !important; }\n',""])},function(t,e,n){t.exports=n.p+"38861cba61c66739c1452c3a71e39852.ttf"},function(t,e,n){"use strict";t.exports=n(49)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=n(4),l=r(s),u=n(45),c=r(u),d=n(50),f=r(d),h=n(51),p=r(h),g=n(54),y=r(g),v=n(61),m=r(v),b=n(63),_=r(b),E=n(67),T=r(E),A=n(71),k=r(A),w=n(74),S=r(w),R=n(78),L=r(R),O=n(83),C=r(O),P=n(86),D=r(P),I=n(90),x=r(I),N=n(94),M=r(N),F=n(96),B=r(F),U=n(98),j=r(U),G=n(103),Y=r(G),V=n(106),K=r(V),$=n(110),H=r($),z=n(111),W=r(z),q=n(112),X=r(q),Z=function(t){function e(n,r){i(this,e);var a=o(this,t.call(this));return a.playerId=r,a.playbackPlugins=[T.default,p.default,m.default,y.default,_.default,k.default,S.default],a.containerPlugins=[L.default,D.default,x.default,C.default,M.default,B.default],a.corePlugins=[j.default,Y.default,K.default,H.default,W.default,X.default],n&&(Array.isArray(n)||a.validateExternalPluginsType(n),a.addExternalPlugins(n)),a}return a(e,t),e.prototype.groupPluginsByType=function(t){return Array.isArray(t)&&(t=t.reduce(function(t,e){return t[e.type]||(t[e.type]=[]),t[e.type].push(e),t},{})),t},e.prototype.addExternalPlugins=function(t){t=this.groupPluginsByType(t);var e=function(t){return t.prototype.name};t.playback&&(this.playbackPlugins=(0,f.default)(t.playback.concat(this.playbackPlugins),e)),t.container&&(this.containerPlugins=(0,f.default)(t.container.concat(this.containerPlugins),e)),t.core&&(this.corePlugins=(0,f.default)(t.core.concat(this.corePlugins),e)),c.default.getInstance(this.playerId).playbackPlugins=this.playbackPlugins},e.prototype.validateExternalPluginsType=function(t){var e=["playback","container","core"];e.forEach(function(e){(t[e]||[]).forEach(function(t){var n="external "+t.type+" plugin on "+e+" array";if(t.type!==e)throw new ReferenceError(n)})})},e}(l.default);e.default=Z,t.exports=e.default},function(t,e,n){(function(t,n){function r(t,e){var n=t?t.length:0;return!!n&&s(t,e,0)>-1}function i(t,e,n){for(var r=-1,i=t?t.length:0;++r<i;)if(n(e,t[r]))return!0;return!1}function o(t,e){for(var n=-1,r=t?t.length:0;++n<r;)if(e(t[n],n,t))return!0;return!1}function a(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function s(t,e,n){if(e!==e)return a(t,l,n);for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function l(t){return t!==t}function u(t){return function(e){return null==e?void 0:e[t]}}function c(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function d(t){return function(e){return t(e)}}function f(t,e){return t.has(e)}function h(t,e){return null==t?void 0:t[e]}function p(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function g(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function y(t,e){return function(n){return t(e(n))}}function v(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function m(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function b(){this.__data__=sn?sn(null):{}}function _(t){return this.has(t)&&delete this.__data__[t]}function E(t){var e=this.__data__;if(sn){var n=e[t];return n===$t?void 0:n}return ze.call(e,t)?e[t]:void 0}function T(t){var e=this.__data__;return sn?void 0!==e[t]:ze.call(e,t)}function A(t,e){var n=this.__data__;return n[t]=sn&&void 0===e?$t:e,this}function k(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function w(){this.__data__=[]}function S(t){var e=this.__data__,n=H(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Qe.call(e,n,1),!0}function R(t){var e=this.__data__,n=H(e,t);return n<0?void 0:e[n][1]}function L(t){return H(this.__data__,t)>-1}function O(t,e){var n=this.__data__,r=H(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function C(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function P(){this.__data__={hash:new m,map:new(nn||k),string:new m}}function D(t){return ft(this,t).delete(t)}function I(t){return ft(this,t).get(t)}function x(t){return ft(this,t).has(t)}function N(t,e){return ft(this,t).set(t,e),this}function M(t){var e=-1,n=t?t.length:0;for(this.__data__=new C;++e<n;)this.add(t[e])}function F(t){return this.__data__.set(t,$t),this}function B(t){return this.__data__.has(t)}function U(t){this.__data__=new k(t)}function j(){this.__data__=new k}function G(t){return this.__data__.delete(t)}function Y(t){return this.__data__.get(t)}function V(t){return this.__data__.has(t)}function K(t,e){var n=this.__data__;if(n instanceof k){var r=n.__data__;if(!nn||r.length<Vt-1)return r.push([t,e]),this;n=this.__data__=new C(r)}return n.set(t,e),this}function $(t,e){var n=bn(t)||Lt(t)?c(t.length,String):[],r=n.length,i=!!r;for(var o in t)!e&&!ze.call(t,o)||i&&("length"==o||yt(o,r))||n.push(o);return n}function H(t,e){for(var n=t.length;n--;)if(Rt(t[n][0],e))return n;return-1}function z(t,e){e=vt(e,t)?[e]:lt(e);for(var n=0,r=e.length;null!=t&&n<r;)t=t[At(e[n++])];return n&&n==r?t:void 0}function W(t){return We.call(t)}function q(t,e){return null!=t&&e in Object(t);
  6. }function X(t,e,n,r,i){return t===e||(null==t||null==e||!It(t)&&!xt(e)?t!==t&&e!==e:Z(t,e,X,n,r,i))}function Z(t,e,n,r,i,o){var a=bn(t),s=bn(e),l=Zt,u=Zt;a||(l=vn(t),l=l==Xt?oe:l),s||(u=vn(e),u=u==Xt?oe:u);var c=l==oe&&!p(t),d=u==oe&&!p(e),f=l==u;if(f&&!c)return o||(o=new U),a||_n(t)?ut(t,e,n,r,i,o):ct(t,e,l,n,r,i,o);if(!(i&zt)){var h=c&&ze.call(t,"__wrapped__"),g=d&&ze.call(e,"__wrapped__");if(h||g){var y=h?t.value():t,v=g?e.value():e;return o||(o=new U),n(y,v,r,i,o)}}return!!f&&(o||(o=new U),dt(t,e,n,r,i,o))}function J(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){s=n[i];var l=s[0],u=t[l],c=s[1];if(a&&s[2]){if(void 0===u&&!(l in t))return!1}else{var d=new U;if(r)var f=r(u,c,l,t,e,d);if(!(void 0===f?X(c,u,r,Ht|zt,d):f))return!1}}return!0}function Q(t){if(!It(t)||bt(t))return!1;var e=Pt(t)||p(t)?qe:Oe;return e.test(kt(t))}function tt(t){return xt(t)&&Dt(t.length)&&!!Pe[We.call(t)]}function et(t){return"function"==typeof t?t:null==t?jt:"object"==typeof t?bn(t)?it(t[0],t[1]):rt(t):Yt(t)}function nt(t){if(!_t(t))return tn(t);var e=[];for(var n in Object(t))ze.call(t,n)&&"constructor"!=n&&e.push(n);return e}function rt(t){var e=ht(t);return 1==e.length&&e[0][2]?Tt(e[0][0],e[0][1]):function(n){return n===t||J(n,t,e)}}function it(t,e){return vt(t)&&Et(e)?Tt(At(t),e):function(n){var r=Ft(n,t);return void 0===r&&r===e?Bt(n,t):X(e,r,void 0,Ht|zt)}}function ot(t){return function(e){return z(e,t)}}function at(t){if("string"==typeof t)return t;if(Nt(t))return gn?gn.call(t):"";var e=t+"";return"0"==e&&1/t==-Wt?"-0":e}function st(t,e,n){var o=-1,a=r,s=t.length,l=!0,u=[],c=u;if(n)l=!1,a=i;else if(s>=Vt){var d=e?null:yn(t);if(d)return v(d);l=!1,a=f,c=new M}else c=e?[]:u;t:for(;++o<s;){var h=t[o],p=e?e(h):h;if(h=n||0!==h?h:0,l&&p===p){for(var g=c.length;g--;)if(c[g]===p)continue t;e&&c.push(p),u.push(h)}else a(c,p,n)||(c!==u&&c.push(p),u.push(h))}return u}function lt(t){return bn(t)?t:mn(t)}function ut(t,e,n,r,i,a){var s=i&zt,l=t.length,u=e.length;if(l!=u&&!(s&&u>l))return!1;var c=a.get(t);if(c&&a.get(e))return c==e;var d=-1,f=!0,h=i&Ht?new M:void 0;for(a.set(t,e),a.set(e,t);++d<l;){var p=t[d],g=e[d];if(r)var y=s?r(g,p,d,e,t,a):r(p,g,d,t,e,a);if(void 0!==y){if(y)continue;f=!1;break}if(h){if(!o(e,function(t,e){if(!h.has(e)&&(p===t||n(p,t,r,i,a)))return h.add(e)})){f=!1;break}}else if(p!==g&&!n(p,g,r,i,a)){f=!1;break}}return a.delete(t),a.delete(e),f}function ct(t,e,n,r,i,o,a){switch(n){case he:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case fe:return!(t.byteLength!=e.byteLength||!r(new Ze(t),new Ze(e)));case Jt:case Qt:case ie:return Rt(+t,+e);case te:return t.name==e.name&&t.message==e.message;case se:case ue:return t==e+"";case re:var s=g;case le:var l=o&zt;if(s||(s=v),t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;o|=Ht,a.set(t,e);var c=ut(s(t),s(e),r,i,o,a);return a.delete(t),c;case ce:if(pn)return pn.call(t)==pn.call(e)}return!1}function dt(t,e,n,r,i,o){var a=i&zt,s=Ut(t),l=s.length,u=Ut(e),c=u.length;if(l!=c&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in e:ze.call(e,f)))return!1}var h=o.get(t);if(h&&o.get(e))return h==e;var p=!0;o.set(t,e),o.set(e,t);for(var g=a;++d<l;){f=s[d];var y=t[f],v=e[f];if(r)var m=a?r(v,y,f,e,t,o):r(y,v,f,t,e,o);if(!(void 0===m?y===v||n(y,v,r,i,o):m)){p=!1;break}g||(g="constructor"==f)}if(p&&!g){var b=t.constructor,_=e.constructor;b!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _)&&(p=!1)}return o.delete(t),o.delete(e),p}function ft(t,e){var n=t.__data__;return mt(e)?n["string"==typeof e?"string":"hash"]:n.map}function ht(t){for(var e=Ut(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Et(i)]}return e}function pt(t,e){var n=h(t,e);return Q(n)?n:void 0}function gt(t,e,n){e=vt(e,t)?[e]:lt(e);for(var r,i=-1,o=e.length;++i<o;){var a=At(e[i]);if(!(r=null!=t&&n(t,a)))break;t=t[a]}if(r)return r;var o=t?t.length:0;return!!o&&Dt(o)&&yt(a,o)&&(bn(t)||Lt(t))}function yt(t,e){return e=null==e?qt:e,!!e&&("number"==typeof t||Ce.test(t))&&t>-1&&t%1==0&&t<e}function vt(t,e){if(bn(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Nt(t))||(ke.test(t)||!Ae.test(t)||null!=e&&t in Object(e))}function mt(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function bt(t){return!!$e&&$e in t}function _t(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||Ve;return t===n}function Et(t){return t===t&&!It(t)}function Tt(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function At(t){if("string"==typeof t||Nt(t))return t;var e=t+"";return"0"==e&&1/t==-Wt?"-0":e}function kt(t){if(null!=t){try{return He.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function wt(t,e){return t&&t.length?st(t,et(e,2)):[]}function St(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(Kt);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(St.Cache||C),n}function Rt(t,e){return t===e||t!==t&&e!==e}function Lt(t){return Ct(t)&&ze.call(t,"callee")&&(!Je.call(t,"callee")||We.call(t)==Xt)}function Ot(t){return null!=t&&Dt(t.length)&&!Pt(t)}function Ct(t){return xt(t)&&Ot(t)}function Pt(t){var e=It(t)?We.call(t):"";return e==ee||e==ne}function Dt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=qt}function It(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function xt(t){return!!t&&"object"==typeof t}function Nt(t){return"symbol"==typeof t||xt(t)&&We.call(t)==ce}function Mt(t){return null==t?"":at(t)}function Ft(t,e,n){var r=null==t?void 0:z(t,e);return void 0===r?n:r}function Bt(t,e){return null!=t&&gt(t,e,q)}function Ut(t){return Ot(t)?$(t):nt(t)}function jt(t){return t}function Gt(){}function Yt(t){return vt(t)?u(At(t)):ot(t)}var Vt=200,Kt="Expected a function",$t="__lodash_hash_undefined__",Ht=1,zt=2,Wt=1/0,qt=9007199254740991,Xt="[object Arguments]",Zt="[object Array]",Jt="[object Boolean]",Qt="[object Date]",te="[object Error]",ee="[object Function]",ne="[object GeneratorFunction]",re="[object Map]",ie="[object Number]",oe="[object Object]",ae="[object Promise]",se="[object RegExp]",le="[object Set]",ue="[object String]",ce="[object Symbol]",de="[object WeakMap]",fe="[object ArrayBuffer]",he="[object DataView]",pe="[object Float32Array]",ge="[object Float64Array]",ye="[object Int8Array]",ve="[object Int16Array]",me="[object Int32Array]",be="[object Uint8Array]",_e="[object Uint8ClampedArray]",Ee="[object Uint16Array]",Te="[object Uint32Array]",Ae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ke=/^\w*$/,we=/^\./,Se=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Re=/[\\^$.*+?()[\]{}|]/g,Le=/\\(\\)?/g,Oe=/^\[object .+?Constructor\]$/,Ce=/^(?:0|[1-9]\d*)$/,Pe={};Pe[pe]=Pe[ge]=Pe[ye]=Pe[ve]=Pe[me]=Pe[be]=Pe[_e]=Pe[Ee]=Pe[Te]=!0,Pe[Xt]=Pe[Zt]=Pe[fe]=Pe[Jt]=Pe[he]=Pe[Qt]=Pe[te]=Pe[ee]=Pe[re]=Pe[ie]=Pe[oe]=Pe[se]=Pe[le]=Pe[ue]=Pe[de]=!1;var De="object"==typeof t&&t&&t.Object===Object&&t,Ie="object"==typeof self&&self&&self.Object===Object&&self,xe=De||Ie||Function("return this")(),Ne="object"==typeof e&&e&&!e.nodeType&&e,Me=Ne&&"object"==typeof n&&n&&!n.nodeType&&n,Fe=Me&&Me.exports===Ne,Be=Fe&&De.process,Ue=function(){try{return Be&&Be.binding("util")}catch(t){}}(),je=Ue&&Ue.isTypedArray,Ge=Array.prototype,Ye=Function.prototype,Ve=Object.prototype,Ke=xe["__core-js_shared__"],$e=function(){var t=/[^.]+$/.exec(Ke&&Ke.keys&&Ke.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),He=Ye.toString,ze=Ve.hasOwnProperty,We=Ve.toString,qe=RegExp("^"+He.call(ze).replace(Re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xe=xe.Symbol,Ze=xe.Uint8Array,Je=Ve.propertyIsEnumerable,Qe=Ge.splice,tn=y(Object.keys,Object),en=pt(xe,"DataView"),nn=pt(xe,"Map"),rn=pt(xe,"Promise"),on=pt(xe,"Set"),an=pt(xe,"WeakMap"),sn=pt(Object,"create"),ln=kt(en),un=kt(nn),cn=kt(rn),dn=kt(on),fn=kt(an),hn=Xe?Xe.prototype:void 0,pn=hn?hn.valueOf:void 0,gn=hn?hn.toString:void 0;m.prototype.clear=b,m.prototype.delete=_,m.prototype.get=E,m.prototype.has=T,m.prototype.set=A,k.prototype.clear=w,k.prototype.delete=S,k.prototype.get=R,k.prototype.has=L,k.prototype.set=O,C.prototype.clear=P,C.prototype.delete=D,C.prototype.get=I,C.prototype.has=x,C.prototype.set=N,M.prototype.add=M.prototype.push=F,M.prototype.has=B,U.prototype.clear=j,U.prototype.delete=G,U.prototype.get=Y,U.prototype.has=V,U.prototype.set=K;var yn=on&&1/v(new on([,-0]))[1]==Wt?function(t){return new on(t)}:Gt,vn=W;(en&&vn(new en(new ArrayBuffer(1)))!=he||nn&&vn(new nn)!=re||rn&&vn(rn.resolve())!=ae||on&&vn(new on)!=le||an&&vn(new an)!=de)&&(vn=function(t){var e=We.call(t),n=e==oe?t.constructor:void 0,r=n?kt(n):void 0;if(r)switch(r){case ln:return he;case un:return re;case cn:return ae;case dn:return le;case fn:return de}return e});var mn=St(function(t){t=Mt(t);var e=[];return we.test(t)&&e.push(""),t.replace(Se,function(t,n,r,i){e.push(r?i.replace(Le,"$1"):n||t)}),e});St.Cache=C;var bn=Array.isArray,_n=je?d(je):tt;n.exports=wt}).call(e,function(){return this}(),n(33)(t))},function(t,e,n){"use strict";t.exports=n(52)},function(t,e,n){(function(r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function l(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(2),d=n(31),f=i(d),h=n(15),p=i(h),g=n(3),y=i(g),v=n(5),m=i(v),b=n(53),_=i(b),E=n(16),T=i(E),A={mp4:["avc1.42E01E","avc1.58A01E","avc1.4D401E","avc1.64001E","mp4v.20.8","mp4v.20.240","mp4a.40.2"].map(function(t){return'video/mp4; codecs="'+t+', mp4a.40.2"'}),ogg:['video/ogg; codecs="theora, vorbis"','video/ogg; codecs="dirac"','video/ogg; codecs="theora, speex"'],"3gpp":['video/3gpp; codecs="mp4v.20.8, samr"'],webm:['video/webm; codecs="vp8, vorbis"'],mkv:['video/x-matroska; codecs="theora, vorbis"'],m3u8:["application/x-mpegurl"]};A.ogv=A.ogg,A["3gp"]=A["3gpp"];var k={wav:["audio/wav"],mp3:["audio/mp3",'audio/mpeg;codecs="mp3"'],aac:['audio/mp4;codecs="mp4a.40.5"'],oga:["audio/ogg"]},w=Object.keys(k).reduce(function(t,e){return[].concat(l(t),l(k[e]))},[]),S=function(t){function e(){o(this,e);for(var n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];var l=a(this,t.call.apply(t,[this].concat(i)));l._destroyed=!1,l._loadStarted=!1,l._playheadMoving=!1,l._playheadMovingTimer=null,l._stopped=!1,l._setupSrc(l.options.src),l.options.playback||(l.options.playback=l.options||{}),l.options.playback.disableContextMenu=l.options.playback.disableContextMenu||l.options.disableVideoTagContextMenu;var u=l.options.playback,c=u.preload||(y.default.isSafari?"auto":l.options.preload);return T.default.extend(l.el,{loop:l.options.loop,poster:l.options.poster,preload:c||"metadata",controls:(u.controls||l.options.useVideoTagDefaultControls)&&"controls",crossOrigin:u.crossOrigin,"x-webkit-playsinline":u.playInline}),l.settings={default:["seekbar"]},l.settings.left=["playpause","position","duration"],l.settings.right=["fullscreen","volume","hd-indicator"],l.options.autoPlay&&r.nextTick(function(){return!l._destroyed&&l.play()}),l}return s(e,t),u(e,[{key:"name",get:function(){return"html5_video"}},{key:"tagName",get:function(){return this.isAudioOnly?"audio":"video"}},{key:"isAudioOnly",get:function(){var t=this.options.src,n=e._mimeTypesForUrl(t,k,this.options.mimeType);return this.options.playback&&this.options.playback.audioOnly||this.options.audioOnly||w.indexOf(n[0])>=0}},{key:"attributes",get:function(){return{"data-html5-video":""}}},{key:"events",get:function(){return{canplay:"_onCanPlay",canplaythrough:"_handleBufferingEvents",durationchange:"_onDurationChange",ended:"_onEnded",error:"_onError",loadeddata:"_onLoadedData",loadedmetadata:"_onLoadedMetadata",pause:"_onPause",playing:"_onPlaying",progress:"_onProgress",seeked:"_handleBufferingEvents",seeking:"_handleBufferingEvents",stalled:"_handleBufferingEvents",timeupdate:"_onTimeUpdate",waiting:"_onWaiting"}}},{key:"ended",get:function(){return this.el.ended}},{key:"buffering",get:function(){return!!this._bufferingState}}]),e.prototype._setupSrc=function(t){this.el.src!==t&&(this._src=t,this.el.src=t)},e.prototype._onLoadedMetadata=function(t){this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_LOADEDMETADATA,{duration:t.target.duration,data:t}),this._updateSettings();var e="undefined"==typeof this._options.autoSeekFromUrl||this._options.autoSeekFromUrl;this.getPlaybackType()!==f.default.LIVE&&e&&this._checkInitialSeek()},e.prototype._onDurationChange=function(){this._updateSettings(),this._onTimeUpdate(),this._onProgress()},e.prototype._updateSettings=function(){this.getPlaybackType()===f.default.VOD||this.getPlaybackType()===f.default.AOD?this.settings.left=["playpause","position","duration"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(m.default.PLAYBACK_SETTINGSUPDATE)},e.prototype.isSeekEnabled=function(){return isFinite(this.getDuration())},e.prototype.getPlaybackType=function(){var t="audio"===this.tagName?f.default.AOD:f.default.VOD;return[0,void 0,1/0].indexOf(this.el.duration)>=0?f.default.LIVE:t},e.prototype.isHighDefinitionInUse=function(){return!1},e.prototype.play=function(){this.trigger(m.default.PLAYBACK_PLAY_INTENT),this._stopped=!1,this._setupSrc(this._src),this._handleBufferingEvents(),this.el.play()},e.prototype.pause=function(){this.el.pause()},e.prototype.stop=function(){this.pause(),this._stopped=!0,this.el.removeAttribute("src"),this._stopPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_STOP)},e.prototype.volume=function(t){this.el.volume=t/100},e.prototype.mute=function(){this.el.volume=0},e.prototype.unmute=function(){this.el.volume=1},e.prototype.isMuted=function(){return!!this.el.volume},e.prototype.isPlaying=function(){return!this.el.paused&&!this.el.ended},e.prototype._startPlayheadMovingChecks=function(){null===this._playheadMovingTimer&&(this._playheadMovingTimeOnCheck=null,this._determineIfPlayheadMoving(),this._playheadMovingTimer=setInterval(this._determineIfPlayheadMoving.bind(this),500))},e.prototype._stopPlayheadMovingChecks=function(){null!==this._playheadMovingTimer&&(clearInterval(this._playheadMovingTimer),this._playheadMovingTimer=null,this._playheadMoving=!1)},e.prototype._determineIfPlayheadMoving=function(){var t=this._playheadMovingTimeOnCheck,e=this.el.currentTime;this._playheadMoving=t!==e,this._playheadMovingTimeOnCheck=e,this._handleBufferingEvents()},e.prototype._onWaiting=function(){this._loadStarted=!0,this._handleBufferingEvents()},e.prototype._onLoadedData=function(){this._loadStarted=!0,this._handleBufferingEvents()},e.prototype._onCanPlay=function(){this._handleBufferingEvents()},e.prototype._onPlaying=function(){this._startPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_PLAY)},e.prototype._onPause=function(){this._stopPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_PAUSE)},e.prototype._onEnded=function(){this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_ENDED,this.name)},e.prototype._handleBufferingEvents=function(){var t=!this.el.ended&&!this.el.paused,e=this._loadStarted&&!this.el.ended&&!this._stopped&&(t&&!this._playheadMoving||this.el.readyState<this.el.HAVE_FUTURE_DATA);this._bufferingState!==e&&(this._bufferingState=e,e?this.trigger(m.default.PLAYBACK_BUFFERING,this.name):this.trigger(m.default.PLAYBACK_BUFFERFULL,this.name))},e.prototype._onError=function(){this.trigger(m.default.PLAYBACK_ERROR,this.el.error,this.name)},e.prototype.destroy=function(){this._destroyed=!0,this.$el.remove(),this.el.src="",this._src=null},e.prototype.seek=function(t){this.el.currentTime=t},e.prototype.seekPercentage=function(t){var e=this.el.duration*(t/100);this.seek(e)},e.prototype._checkInitialSeek=function(){var t=(0,c.seekStringToSeconds)(window.location.href);0!==t&&this.seek(t)},e.prototype.getCurrentTime=function(){return this.el.currentTime},e.prototype.getDuration=function(){return this.el.duration},e.prototype._onTimeUpdate=function(){this._handleBufferingEvents(),this.getPlaybackType()===f.default.LIVE?this.trigger(m.default.PLAYBACK_TIMEUPDATE,{current:1,total:1},this.name):this.trigger(m.default.PLAYBACK_TIMEUPDATE,{current:this.el.currentTime,total:this.el.duration},this.name)},e.prototype._onProgress=function(){if(this.el.buffered.length){for(var t=[],e=0,n=0;n<this.el.buffered.length;n++)t=[].concat(l(t),[{start:this.el.buffered.start(n),end:this.el.buffered.end(n)}]),this.el.currentTime>=t[n].start&&this.el.currentTime<=t[n].end&&(e=n);var r={start:t[e].start,current:t[e].end,total:this.el.duration};this.trigger(m.default.PLAYBACK_PROGRESS,r,t)}},e.prototype._typeFor=function(t){var n=e._mimeTypesForUrl(t,A,this.options.mimeType);0==n.length&&(n=e._mimeTypesForUrl(t,k,this.options.mimeType));var r=n[0]||"";return r.split(";")[0]},e.prototype._ready=function(){this._isReadyState||(this._isReadyState=!0,this.trigger(m.default.PLAYBACK_READY,this.name))},e.prototype.render=function(){var t=p.default.getStyleFor(_.default);return this.options.playback.disableContextMenu&&this.$el.on("contextmenu",function(){return!1}),this.$el.append(t),this._ready(),this},u(e,[{key:"isReady",get:function(){return this._isReadyState}}]),e}(f.default);e.default=S,S._mimeTypesForUrl=function(t,e,n){var r=(t.split("?")[0].match(/.*\.(.*)$/)||[])[1],i=n||r&&e[r.toLowerCase()]||[];return i.constructor===Array?i:[i]},S._canPlay=function(t,e,n,r){var i=S._mimeTypesForUrl(n,e,r),o=document.createElement(t);return!!i.filter(function(t){return!!o.canPlayType(t).replace(/no/,"")})[0]},S.canPlay=function(t,e){return S._canPlay("audio",k,t,e)||S._canPlay("video",A,t,e)},t.exports=S,t.exports=e.default}).call(e,n(29))},function(t,e,n){e=t.exports=n(25)(),e.push([t.id,"[data-html5-video] {\n position: absolute;\n height: 100%;\n width: 100%;\n display: block; }\n",""])},function(t,e,n){"use strict";t.exports=n(55)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(2),u=n(56),c=r(u),d=n(3),f=r(d),h=n(30),p=r(h),g=n(17),y=r(g),v=n(16),m=r(v),b=n(5),_=r(b),E=n(31),T=r(E),A=n(60),k=r(A),w=60,S=function(t){function e(){i(this,e);for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var s=o(this,t.call.apply(t,[this].concat(r)));return s._src=s.options.src,s._baseUrl=s.options.baseUrl,s._autoPlay=s.options.autoPlay,s.settings={default:["seekbar"]},s.settings.left=["playpause","position","duration"],s.settings.right=["fullscreen","volume"],s.settings.seekEnabled=!0,s._isReadyState=!1,s._addListeners(),s}return a(e,t),s(e,[{key:"name",get:function(){return"flash"}},{key:"swfPath",get:function(){return(0,y.default)(k.default)({baseUrl:this._baseUrl})}},{key:"ended",get:function(){return"ENDED"===this._currentState}},{key:"buffering",get:function(){return!!this._bufferingState&&"ENDED"!==this._currentState}}]),e.prototype._bootstrap=function(){var t=this;this.el.playerPlay?(this.el.width="100%",this.el.height="100%","PLAYING"===this._currentState?this._firstPlay():(this._currentState="IDLE",this._autoPlay&&this.play()),(0,m.default)('<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%" />').insertAfter(this.$el),this.getDuration()>0?this._metadataLoaded():p.default.once(this.uniqueId+":timeupdate",this._metadataLoaded,this)):(this._attempts=this._attempts||0,++this._attempts<=w?setTimeout(function(){return t._bootstrap()},50):this.trigger(_.default.PLAYBACK_ERROR,{message:"Max number of attempts reached"},this.name))},e.prototype._metadataLoaded=function(){this._isReadyState=!0,this.trigger(_.default.PLAYBACK_READY,this.name),this.trigger(_.default.PLAYBACK_SETTINGSUPDATE,this.name)},e.prototype.getPlaybackType=function(){return T.default.VOD},e.prototype.isHighDefinitionInUse=function(){return!1},e.prototype._updateTime=function(){this.trigger(_.default.PLAYBACK_TIMEUPDATE,{current:this.el.getPosition(),total:this.el.getDuration()},this.name)},e.prototype._addListeners=function(){p.default.on(this.uniqueId+":progress",this._progress,this),p.default.on(this.uniqueId+":timeupdate",this._updateTime,this),p.default.on(this.uniqueId+":statechanged",this._checkState,this),p.default.on(this.uniqueId+":flashready",this._bootstrap,this)},e.prototype.stopListening=function(){t.prototype.stopListening.call(this),p.default.off(this.uniqueId+":progress"),p.default.off(this.uniqueId+":timeupdate"),p.default.off(this.uniqueId+":statechanged"),p.default.off(this.uniqueId+":flashready")},e.prototype._checkState=function(){this._isIdle||"PAUSED"===this._currentState||("PLAYING_BUFFERING"!==this._currentState&&"PLAYING_BUFFERING"===this.el.getState()?(this._bufferingState=!0,this.trigger(_.default.PLAYBACK_BUFFERING,this.name),this._currentState="PLAYING_BUFFERING"):"PLAYING"===this.el.getState()?(this._bufferingState=!1,this.trigger(_.default.PLAYBACK_BUFFERFULL,this.name),this._currentState="PLAYING"):"IDLE"===this.el.getState()?this._currentState="IDLE":"ENDED"===this.el.getState()&&(this.trigger(_.default.PLAYBACK_ENDED,this.name),this.trigger(_.default.PLAYBACK_TIMEUPDATE,{current:0,total:this.el.getDuration()},this.name),this._currentState="ENDED",this._isIdle=!0))},e.prototype._progress=function(){"IDLE"!==this._currentState&&"ENDED"!==this._currentState&&this.trigger(_.default.PLAYBACK_PROGRESS,{start:0,current:this.el.getBytesLoaded(),total:this.el.getBytesTotal()})},e.prototype._firstPlay=function(){var t=this;this.el.playerPlay?(this._isIdle=!1,this.el.playerPlay(this._src),this.listenToOnce(this,_.default.PLAYBACK_BUFFERFULL,function(){return t._checkInitialSeek()}),this._currentState="PLAYING"):this.listenToOnce(this,_.default.PLAYBACK_READY,this._firstPlay)},e.prototype._checkInitialSeek=function(){var t=(0,l.seekStringToSeconds)(window.location.href);0!==t&&this.seekSeconds(t)},e.prototype.play=function(){this.trigger(_.default.PLAYBACK_PLAY_INTENT),"PAUSED"===this._currentState||"PLAYING_BUFFERING"===this._currentState?(this._currentState="PLAYING",this.el.playerResume(),this.trigger(_.default.PLAYBACK_PLAY,this.name)):"PLAYING"!==this._currentState&&(this._firstPlay(),this.trigger(_.default.PLAYBACK_PLAY,this.name))},e.prototype.volume=function(t){var e=this;this.isReady?this.el.playerVolume(t):this.listenToOnce(this,_.default.PLAYBACK_BUFFERFULL,function(){return e.volume(t)})},e.prototype.pause=function(){this._currentState="PAUSED",this.el.playerPause(),this.trigger(_.default.PLAYBACK_PAUSE,this.name)},e.prototype.stop=function(){this.el.playerStop(),this.trigger(_.default.PLAYBACK_STOP),this.trigger(_.default.PLAYBACK_TIMEUPDATE,{current:0,total:0},this.name)},e.prototype.isPlaying=function(){return!!(this.isReady&&this._currentState.indexOf("PLAYING")>-1)},e.prototype.getDuration=function(){return this.el.getDuration()},e.prototype.seekPercentage=function(t){var e=this;if(this.el.getDuration()>0){var n=this.el.getDuration()*(t/100);this.seek(n)}else this.listenToOnce(this,_.default.PLAYBACK_BUFFERFULL,function(){return e.seekPercentage(t)})},e.prototype.seek=function(t){var e=this;this.isReady&&this.el.playerSeek?(this.el.playerSeek(t),this.trigger(_.default.PLAYBACK_TIMEUPDATE,{current:t,total:this.el.getDuration()},this.name),"PAUSED"===this._currentState&&this.el.playerPause()):this.listenToOnce(this,_.default.PLAYBACK_BUFFERFULL,function(){return e.seek(t)})},e.prototype.destroy=function(){clearInterval(this.bootstrapId),t.prototype.stopListening.call(this),this.$el.remove()},s(e,[{key:"isReady",get:function(){return this._isReadyState}}]),e}(c.default);e.default=S,S.canPlay=function(t){if(f.default.hasFlash&&t&&t.constructor===String){var e=t.split("?")[0].match(/.*\.(.*)$/)||[];return e.length>1&&!f.default.isMobile&&e[1].toLowerCase().match(/^(mp4|mov|f4v|3gpp|3gp)$/)}return!1},t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=n(57),t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(31),u=r(l),c=n(15),d=r(c),f=n(17),h=r(f),p=n(3),g=r(p),y=n(58),v=r(y),m=n(59),b=r(m),_="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",E=function(t){function e(){return i(this,e),o(this,t.apply(this,arguments))}return a(e,t),e.prototype.setElement=function(t){this.$el=t,this.el=t[0]},e.prototype._setupFirefox=function(){var t=this.$("embed");t.attr("data-flash-playback",this.name),t.addClass(this.attributes.class),this.setElement(t)},e.prototype.render=function(){return this.$el.html(this.template({cid:this.cid,swfPath:this.swfPath,baseUrl:this.baseUrl,playbackId:this.uniqueId,wmode:this.wmode,callbackName:"window.Clappr.flashlsCallbacks."+this.cid})),g.default.isIE&&(this.$("embed").remove(),g.default.isLegacyIE&&this.$el.attr("classid",_)),g.default.isFirefox&&this._setupFirefox(),this.el.id=this.cid,this.$el.append(d.default.getStyleFor(b.default)),this},s(e,[{key:"tagName",get:function(){return"object"}},{key:"swfPath",get:function(){return""}},{key:"wmode",get:function(){return"transparent"}},{key:"template",get:function(){return(0,h.default)(v.default)}},{key:"attributes",get:function(){var t="application/x-shockwave-flash";return g.default.isLegacyIE&&(t=""),{class:"clappr-flash-playback",type:t,width:"100%",height:"100%","data-flash-playback":this.name}}}]),e}(u.default);e.default=E,t.exports=e.default},function(t,e){t.exports='<param name="movie" value="<%= swfPath %>?inline=1">\n<param name="quality" value="autohigh">\n<param name="swliveconnect" value="true">\n<param name="allowScriptAccess" value="always">\n<param name="bgcolor" value="#000000">\n<param name="allowFullScreen" value="false">\n<param name="wmode" value="<%= wmode %>">\n<param name="tabindex" value="1">\n<param name="FlashVars" value="playbackId=<%= playbackId %>&callback=<%= callbackName %>">\n<embed\n name="<%= cid %>"\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 src="<%= swfPath %>"\n width="100%"\n height="100%">\n</embed>\n'},function(t,e,n){e=t.exports=n(25)(),e.push([t.id,".clappr-flash-playback[data-flash-playback] {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n pointer-events: none; }\n",""])},function(t,e,n){t.exports=n.p+"4b76590b32dab62bc95c1b7951efae78.swf"},function(t,e,n){"use strict";t.exports=n(62)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(5),u=r(l),c=n(31),d=r(c),f=n(51),h=r(f),p=function(t){function e(){return i(this,e),o(this,t.apply(this,arguments))}return a(e,t),e.prototype.updateSettings=function(){this.settings.left=["playpause","position","duration"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(u.default.PLAYBACK_SETTINGSUPDATE)},e.prototype.getPlaybackType=function(){return d.default.AOD},s(e,[{key:"name",get:function(){return"html5_audio"}},{key:"tagName",get:function(){return"audio"}},{key:"isAudioOnly",get:function(){return!0}}]),e}(h.default);e.default=p,p.canPlay=function(t,e){var n={wav:["audio/wav"],mp3:["audio/mp3",'audio/mpeg;codecs="mp3"'],aac:['audio/mp4;codecs="mp4a.40.5"'],oga:["audio/ogg"]};return h.default._canPlay("audio",n,t,e)},t.exports=e.default},function(t,e,n){"use strict";t.exports=n(64)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){
  7. function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(56),u=r(l),c=n(5),d=r(c),f=n(17),h=r(f),p=n(31),g=r(p),y=n(30),v=r(y),m=n(3),b=r(m),_=n(65),E=r(_),T=n(66),A=r(T),k=n(16),w=r(k),S=60,R=-1,L=function(t){function e(){i(this,e);for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var s=o(this,t.call.apply(t,[this].concat(r)));return s._src=s.options.src,s._baseUrl=s.options.baseUrl,s._initHlsParameters(s.options),s.highDefinition=!1,s._autoPlay=s.options.autoPlay,s._loop=s.options.loop,s._defaultSettings={left:["playstop"],default:["seekbar"],right:["fullscreen","volume","hd-indicator"],seekEnabled:!1},s.settings=w.default.extend({},s._defaultSettings),s._playbackType=g.default.LIVE,s._hasEnded=!1,s._addListeners(),s}return a(e,t),s(e,[{key:"name",get:function(){return"flashls"}},{key:"swfPath",get:function(){return(0,h.default)(A.default)({baseUrl:this._baseUrl})}},{key:"levels",get:function(){return this._levels||[]}},{key:"currentLevel",get:function(){return null===this._currentLevel||void 0===this._currentLevel?R:this._currentLevel},set:function(t){this._currentLevel=t,this.trigger(d.default.PLAYBACK_LEVEL_SWITCH_START),this.el.playerSetCurrentLevel(t)}},{key:"ended",get:function(){return this._hasEnded}},{key:"buffering",get:function(){return!!this._bufferingState&&!this._hasEnded}}]),e.prototype._initHlsParameters=function(t){this._autoStartLoad=void 0===t.autoStartLoad||t.autoStartLoad,this._capLevelToStage=void 0!==t.capLevelToStage&&t.capLevelToStage,this._maxLevelCappingMode=void 0===t.maxLevelCappingMode?"downscale":t.maxLevelCappingMode,this._minBufferLength=void 0===t.minBufferLength?-1:t.minBufferLength,this._minBufferLengthCapping=void 0===t.minBufferLengthCapping?-1:t.minBufferLengthCapping,this._maxBufferLength=void 0===t.maxBufferLength?120:t.maxBufferLength,this._maxBackBufferLength=void 0===t.maxBackBufferLength?30:t.maxBackBufferLength,this._lowBufferLength=void 0===t.lowBufferLength?3:t.lowBufferLength,this._mediaTimePeriod=void 0===t.mediaTimePeriod?100:t.mediaTimePeriod,this._fpsDroppedMonitoringPeriod=void 0===t.fpsDroppedMonitoringPeriod?5e3:t.fpsDroppedMonitoringPeriod,this._fpsDroppedMonitoringThreshold=void 0===t.fpsDroppedMonitoringThreshold?.2:t.fpsDroppedMonitoringThreshold,this._capLevelonFPSDrop=void 0!==t.capLevelonFPSDrop&&t.capLevelonFPSDrop,this._smoothAutoSwitchonFPSDrop=void 0===t.smoothAutoSwitchonFPSDrop?this.capLevelonFPSDrop:t.smoothAutoSwitchonFPSDrop,this._switchDownOnLevelError=void 0===t.switchDownOnLevelError||t.switchDownOnLevelError,this._seekMode=void 0===t.seekMode?"ACCURATE":t.seekMode,this._keyLoadMaxRetry=void 0===t.keyLoadMaxRetry?3:t.keyLoadMaxRetry,this._keyLoadMaxRetryTimeout=void 0===t.keyLoadMaxRetryTimeout?64e3:t.keyLoadMaxRetryTimeout,this._fragmentLoadMaxRetry=void 0===t.fragmentLoadMaxRetry?3:t.fragmentLoadMaxRetry,this._fragmentLoadMaxRetryTimeout=void 0===t.fragmentLoadMaxRetryTimeout?4e3:t.fragmentLoadMaxRetryTimeout,this._fragmentLoadSkipAfterMaxRetry=void 0===t.fragmentLoadSkipAfterMaxRetry||t.fragmentLoadSkipAfterMaxRetry,this._maxSkippedFragments=void 0===t.maxSkippedFragments?5:t.maxSkippedFragments,this._flushLiveURLCache=void 0!==t.flushLiveURLCache&&t.flushLiveURLCache,this._initialLiveManifestSize=void 0===t.initialLiveManifestSize?1:t.initialLiveManifestSize,this._manifestLoadMaxRetry=void 0===t.manifestLoadMaxRetry?3:t.manifestLoadMaxRetry,this._manifestLoadMaxRetryTimeout=void 0===t.manifestLoadMaxRetryTimeout?64e3:t.manifestLoadMaxRetryTimeout,this._manifestRedundantLoadmaxRetry=void 0===t.manifestRedundantLoadmaxRetry?3:t.manifestRedundantLoadmaxRetry,this._startFromBitrate=void 0===t.startFromBitrate?-1:t.startFromBitrate,this._startFromLevel=void 0===t.startFromLevel?-1:t.startFromLevel,this._autoStartMaxDuration=void 0===t.autoStartMaxDuration?-1:t.autoStartMaxDuration,this._seekFromLevel=void 0===t.seekFromLevel?-1:t.seekFromLevel,this._useHardwareVideoDecoder=void 0!==t.useHardwareVideoDecoder&&t.useHardwareVideoDecoder,this._hlsLogEnabled=void 0===t.hlsLogEnabled||t.hlsLogEnabled,this._logDebug=void 0!==t.logDebug&&t.logDebug,this._logDebug2=void 0!==t.logDebug2&&t.logDebug2,this._logWarn=void 0===t.logWarn||t.logWarn,this._logError=void 0===t.logError||t.logError,this._hlsMinimumDvrSize=void 0===t.hlsMinimumDvrSize?60:t.hlsMinimumDvrSize},e.prototype._addListeners=function(){var t=this;v.default.on(this.cid+":flashready",function(){return t._bootstrap()}),v.default.on(this.cid+":timeupdate",function(e){return t._updateTime(e)}),v.default.on(this.cid+":playbackstate",function(e){return t._setPlaybackState(e)}),v.default.on(this.cid+":levelchanged",function(e){return t._levelChanged(e)}),v.default.on(this.cid+":error",function(e,n,r){return t._flashPlaybackError(e,n,r)}),v.default.on(this.cid+":fragmentloaded",function(e){return t._onFragmentLoaded(e)}),v.default.on(this.cid+":levelendlist",function(e){return t._onLevelEndlist(e)})},e.prototype.stopListening=function(){t.prototype.stopListening.call(this),v.default.off(this.cid+":flashready"),v.default.off(this.cid+":timeupdate"),v.default.off(this.cid+":playbackstate"),v.default.off(this.cid+":levelchanged"),v.default.off(this.cid+":playbackerror"),v.default.off(this.cid+":fragmentloaded"),v.default.off(this.cid+":manifestloaded"),v.default.off(this.cid+":levelendlist")},e.prototype._bootstrap=function(){var t=this;this.el.playerLoad?(this.el.width="100%",this.el.height="100%",this._isReadyState=!0,this._srcLoaded=!1,this._currentState="IDLE",this._setFlashSettings(),this._updatePlaybackType(),(this._autoPlay||this._shouldPlayOnManifestLoaded)&&this.play(),this.trigger(d.default.PLAYBACK_READY,this.name)):(this._bootstrapAttempts=this._bootstrapAttempts||0,++this._bootstrapAttempts<=S?setTimeout(function(){return t._bootstrap()},50):this.trigger(d.default.PLAYBACK_ERROR,{message:"Max number of attempts reached"},this.name))},e.prototype._setFlashSettings=function(){this.el.playerSetAutoStartLoad(this._autoStartLoad),this.el.playerSetCapLevelToStage(this._capLevelToStage),this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode),this.el.playerSetMinBufferLength(this._minBufferLength),this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping),this.el.playerSetMaxBufferLength(this._maxBufferLength),this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength),this.el.playerSetLowBufferLength(this._lowBufferLength),this.el.playerSetMediaTimePeriod(this._mediaTimePeriod),this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod),this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold),this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop),this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop),this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError),this.el.playerSetSeekMode(this._seekMode),this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry),this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout),this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry),this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout),this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry),this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments),this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache),this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize),this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry),this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout),this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry),this.el.playerSetStartFromBitrate(this._startFromBitrate),this.el.playerSetStartFromLevel(this._startFromLevel),this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration),this.el.playerSetSeekFromLevel(this._seekFromLevel),this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder),this.el.playerSetLogInfo(this._hlsLogEnabled),this.el.playerSetLogDebug(this._logDebug),this.el.playerSetLogDebug2(this._logDebug2),this.el.playerSetLogWarn(this._logWarn),this.el.playerSetLogError(this._logError)},e.prototype.setAutoStartLoad=function(t){this._autoStartLoad=t,this.el.playerSetAutoStartLoad(this._autoStartLoad)},e.prototype.setCapLevelToStage=function(t){this._capLevelToStage=t,this.el.playerSetCapLevelToStage(this._capLevelToStage)},e.prototype.setMaxLevelCappingMode=function(t){this._maxLevelCappingMode=t,this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode)},e.prototype.setSetMinBufferLength=function(t){this._minBufferLength=t,this.el.playerSetMinBufferLength(this._minBufferLength)},e.prototype.setMinBufferLengthCapping=function(t){this._minBufferLengthCapping=t,this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping)},e.prototype.setMaxBufferLength=function(t){this._maxBufferLength=t,this.el.playerSetMaxBufferLength(this._maxBufferLength)},e.prototype.setMaxBackBufferLength=function(t){this._maxBackBufferLength=t,this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength)},e.prototype.setLowBufferLength=function(t){this._lowBufferLength=t,this.el.playerSetLowBufferLength(this._lowBufferLength)},e.prototype.setMediaTimePeriod=function(t){this._mediaTimePeriod=t,this.el.playerSetMediaTimePeriod(this._mediaTimePeriod)},e.prototype.setFpsDroppedMonitoringPeriod=function(t){this._fpsDroppedMonitoringPeriod=t,this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod)},e.prototype.setFpsDroppedMonitoringThreshold=function(t){this._fpsDroppedMonitoringThreshold=t,this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold)},e.prototype.setCapLevelonFPSDrop=function(t){this._capLevelonFPSDrop=t,this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop)},e.prototype.setSmoothAutoSwitchonFPSDrop=function(t){this._smoothAutoSwitchonFPSDrop=t,this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop)},e.prototype.setSwitchDownOnLevelError=function(t){this._switchDownOnLevelError=t,this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError)},e.prototype.setSeekMode=function(t){this._seekMode=t,this.el.playerSetSeekMode(this._seekMode)},e.prototype.setKeyLoadMaxRetry=function(t){this._keyLoadMaxRetry=t,this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry)},e.prototype.setKeyLoadMaxRetryTimeout=function(t){this._keyLoadMaxRetryTimeout=t,this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout)},e.prototype.setFragmentLoadMaxRetry=function(t){this._fragmentLoadMaxRetry=t,this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry)},e.prototype.setFragmentLoadMaxRetryTimeout=function(t){this._fragmentLoadMaxRetryTimeout=t,this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout)},e.prototype.setFragmentLoadSkipAfterMaxRetry=function(t){this._fragmentLoadSkipAfterMaxRetry=t,this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry)},e.prototype.setMaxSkippedFragments=function(t){this._maxSkippedFragments=t,this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments)},e.prototype.setFlushLiveURLCache=function(t){this._flushLiveURLCache=t,this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache)},e.prototype.setInitialLiveManifestSize=function(t){this._initialLiveManifestSize=t,this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize)},e.prototype.setManifestLoadMaxRetry=function(t){this._manifestLoadMaxRetry=t,this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry)},e.prototype.setManifestLoadMaxRetryTimeout=function(t){this._manifestLoadMaxRetryTimeout=t,this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout)},e.prototype.setManifestRedundantLoadmaxRetry=function(t){this._manifestRedundantLoadmaxRetry=t,this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry)},e.prototype.setStartFromBitrate=function(t){this._startFromBitrate=t,this.el.playerSetStartFromBitrate(this._startFromBitrate)},e.prototype.setStartFromLevel=function(t){this._startFromLevel=t,this.el.playerSetStartFromLevel(this._startFromLevel)},e.prototype.setAutoStartMaxDuration=function(t){this._autoStartMaxDuration=t,this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration)},e.prototype.setSeekFromLevel=function(t){this._seekFromLevel=t,this.el.playerSetSeekFromLevel(this._seekFromLevel)},e.prototype.setUseHardwareVideoDecoder=function(t){this._useHardwareVideoDecoder=t,this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder)},e.prototype.setSetLogInfo=function(t){this._hlsLogEnabled=t,this.el.playerSetLogInfo(this._hlsLogEnabled)},e.prototype.setLogDebug=function(t){this._logDebug=t,this.el.playerSetLogDebug(this._logDebug)},e.prototype.setLogDebug2=function(t){this._logDebug2=t,this.el.playerSetLogDebug2(this._logDebug2)},e.prototype.setLogWarn=function(t){this._logWarn=t,this.el.playerSetLogWarn(this._logWarn)},e.prototype.setLogError=function(t){this._logError=t,this.el.playerSetLogError(this._logError)},e.prototype._levelChanged=function(t){var e=this.el.getLevels()[t];e&&(this.highDefinition=e.height>=720||e.bitrate/1e3>=2e3,this.trigger(d.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this._levels&&0!==this._levels.length||this._fillLevels(),this.trigger(d.default.PLAYBACK_BITRATE,{height:e.height,width:e.width,bandwidth:e.bitrate,bitrate:e.bitrate,level:t}),this.trigger(d.default.PLAYBACK_LEVEL_SWITCH_END))},e.prototype._updateTime=function(t){if("IDLE"!==this._currentState){var e=this._normalizeDuration(t.duration),n=Math.min(Math.max(t.position,0),e),r=this._dvrEnabled,i=this._playbackType===g.default.LIVE;this._dvrEnabled=i&&e>this._hlsMinimumDvrSize,100!==e&&void 0!==i&&(this._dvrEnabled!==r&&(this._updateSettings(),this.trigger(d.default.PLAYBACK_SETTINGSUPDATE,this.name)),!i||this._dvrEnabled&&this._dvrInUse||(n=e),this.trigger(d.default.PLAYBACK_TIMEUPDATE,{current:n,total:e},this.name))}},e.prototype.play=function(){this.trigger(d.default.PLAYBACK_PLAY_INTENT),"PAUSED"===this._currentState?this.el.playerResume():this._srcLoaded||"PLAYING"===this._currentState?this.el.playerPlay():this._firstPlay()},e.prototype.getPlaybackType=function(){return this._playbackType?this._playbackType:null},e.prototype.getCurrentLevelIndex=function(){return this._currentLevel},e.prototype.getCurrentLevel=function(){return this.levels[this.currentLevel]},e.prototype.getCurrentBitrate=function(){return this.levels[this.currentLevel].bitrate},e.prototype.setCurrentLevel=function(t){this.currentLevel=t},e.prototype.isHighDefinitionInUse=function(){return this.highDefinition},e.prototype.getLevels=function(){return this.levels},e.prototype._setPlaybackState=function(t){["PLAYING_BUFFERING","PAUSED_BUFFERING"].indexOf(t)>=0?(this._bufferingState=!0,this.trigger(d.default.PLAYBACK_BUFFERING,this.name),this._updateCurrentState(t)):["PLAYING","PAUSED"].indexOf(t)>=0?(["PLAYING_BUFFERING","PAUSED_BUFFERING","IDLE"].indexOf(this._currentState)>=0&&(this._bufferingState=!1,this.trigger(d.default.PLAYBACK_BUFFERFULL,this.name)),this._updateCurrentState(t)):"IDLE"===t&&(this._srcLoaded=!1,this._loop&&["PLAYING_BUFFERING","PLAYING"].indexOf(this._currentState)>=0?(this.play(),this.seek(0)):(this._updateCurrentState(t),this._hasEnded=!0,this.trigger(d.default.PLAYBACK_TIMEUPDATE,{current:0,total:this.getDuration()},this.name),this.trigger(d.default.PLAYBACK_ENDED,this.name)))},e.prototype._updateCurrentState=function(t){this._currentState=t,"IDLE"!==t&&(this._hasEnded=!1),this._updatePlaybackType(),"PLAYING"===t?this.trigger(d.default.PLAYBACK_PLAY,this.name):"PAUSED"===t&&this.trigger(d.default.PLAYBACK_PAUSE,this.name)},e.prototype._updatePlaybackType=function(){this._playbackType=this.el.getType(),this._playbackType&&(this._playbackType=this._playbackType.toLowerCase(),this._playbackType===g.default.VOD?this._startReportingProgress():this._stopReportingProgress()),this.trigger(d.default.PLAYBACK_PLAYBACKSTATE,{type:this._playbackType})},e.prototype._startReportingProgress=function(){this._reportingProgress||(this._reportingProgress=!0)},e.prototype._stopReportingProgress=function(){this._reportingProgress=!1},e.prototype._onFragmentLoaded=function(t){if(this.trigger(d.default.PLAYBACK_FRAGMENT_LOADED,t),this._reportingProgress&&this.el.getPosition){var e=this.el.getPosition()+this.el.getbufferLength();this.trigger(d.default.PLAYBACK_PROGRESS,{start:this.el.getPosition(),current:e,total:this.el.getDuration()})}},e.prototype._onLevelEndlist=function(){this._updatePlaybackType()},e.prototype._firstPlay=function(){var t=this;this._shouldPlayOnManifestLoaded=!0,this.el.playerLoad&&(v.default.once(this.cid+":manifestloaded",function(e,n){return t._manifestLoaded(e,n)}),this._setFlashSettings(),this.el.playerLoad(this._src),this._srcLoaded=!0)},e.prototype.volume=function(t){var e=this;this.isReady?this.el.playerVolume(t):this.listenToOnce(this,d.default.PLAYBACK_BUFFERFULL,function(){return e.volume(t)})},e.prototype.pause=function(){(this._playbackType!==g.default.LIVE||this._dvrEnabled)&&(this.el.playerPause(),this._playbackType===g.default.LIVE&&this._dvrEnabled&&this._updateDvr(!0))},e.prototype.stop=function(){this._srcLoaded=!1,this.el.playerStop(),this.trigger(d.default.PLAYBACK_STOP),this.trigger(d.default.PLAYBACK_TIMEUPDATE,{current:0,total:0},this.name)},e.prototype.isPlaying=function(){return!!this._currentState&&!!this._currentState.match(/playing/i)},e.prototype.getDuration=function(){return this._normalizeDuration(this.el.getDuration())},e.prototype._normalizeDuration=function(t){return this._playbackType===g.default.LIVE&&(t=Math.max(0,t-10)),t},e.prototype.seekPercentage=function(t){var e=this.el.getDuration(),n=0;t>0&&(n=e*t/100),this.seek(n)},e.prototype.seek=function(t){var e=this.getDuration();if(this._playbackType===g.default.LIVE){var n=e-t>3;this._updateDvr(n)}this.el.playerSeek(t),this.trigger(d.default.PLAYBACK_TIMEUPDATE,{current:t,total:e},this.name)},e.prototype._updateDvr=function(t){var e=!!this._dvrInUse;this._dvrInUse=t,this._dvrInUse!==e&&(this._updateSettings(),this.trigger(d.default.PLAYBACK_DVR,this._dvrInUse),this.trigger(d.default.PLAYBACK_STATS_ADD,{dvr:this._dvrInUse}))},e.prototype._flashPlaybackError=function(t,e,n){this.trigger(d.default.PLAYBACK_ERROR,{code:t,url:e,message:n}),this.trigger(d.default.PLAYBACK_STOP)},e.prototype._manifestLoaded=function(t,e){this._shouldPlayOnManifestLoaded&&(this._shouldPlayOnManifestLoaded=!1,this.el.playerPlay()),this._fillLevels(),this.trigger(d.default.PLAYBACK_LOADEDMETADATA,{duration:t,data:e})},e.prototype._fillLevels=function(){var t=this.el.getLevels(),e=t.length;this._levels=[];for(var n=0;n<e;n++)this._levels.push({id:n,label:t[n].height+"p",level:t[n]});this.trigger(d.default.PLAYBACK_LEVELS_AVAILABLE,this._levels)},e.prototype.destroy=function(){this.stopListening(),this.$el.remove()},e.prototype._updateSettings=function(){this.settings=w.default.extend({},this._defaultSettings),this._playbackType===g.default.VOD||this._dvrInUse?(this.settings.left=["playpause","position","duration"],this.settings.seekEnabled=!0):this._dvrEnabled?(this.settings.left=["playpause"],this.settings.seekEnabled=!0):this.settings.seekEnabled=!1},e.prototype._createCallbacks=function(){var t=this;window.Clappr||(window.Clappr={}),window.Clappr.flashlsCallbacks||(window.Clappr.flashlsCallbacks={}),this.flashlsEvents=new E.default(this.cid),window.Clappr.flashlsCallbacks[this.cid]=function(e,n){t.flashlsEvents[e].apply(t.flashlsEvents,n)}},e.prototype.render=function(){return t.prototype.render.call(this),this._createCallbacks(),this},s(e,[{key:"isReady",get:function(){return this._isReadyState}},{key:"dvrEnabled",get:function(){return!!this._dvrEnabled}}]),e}(u.default);e.default=L,L.canPlay=function(t,e){var n=t.split("?")[0].match(/.*\.(.*)$/)||[];return b.default.hasFlash&&(n.length>1&&"m3u8"===n[1].toLowerCase()||"application/x-mpegURL"===e||"application/vnd.apple.mpegurl"===e)},t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(30),a=r(o),s=function(){function t(e){i(this,t),this.instanceId=e}return t.prototype.ready=function(){a.default.trigger(this.instanceId+":flashready")},t.prototype.videoSize=function(t,e){a.default.trigger(this.instanceId+":videosizechanged",t,e)},t.prototype.complete=function(){a.default.trigger(this.instanceId+":complete")},t.prototype.error=function(t,e,n){a.default.trigger(this.instanceId+":error",t,e,n)},t.prototype.manifest=function(t,e){a.default.trigger(this.instanceId+":manifestloaded",t,e)},t.prototype.audioLevelLoaded=function(t){a.default.trigger(this.instanceId+":audiolevelloaded",t)},t.prototype.levelLoaded=function(t){a.default.trigger(this.instanceId+":levelloaded",t)},t.prototype.levelEndlist=function(t){a.default.trigger(this.instanceId+":levelendlist",t)},t.prototype.fragmentLoaded=function(t){a.default.trigger(this.instanceId+":fragmentloaded",t)},t.prototype.fragmentPlaying=function(t){a.default.trigger(this.instanceId+":fragmentplaying",t)},t.prototype.position=function(t){a.default.trigger(this.instanceId+":timeupdate",t)},t.prototype.state=function(t){a.default.trigger(this.instanceId+":playbackstate",t)},t.prototype.seekState=function(t){a.default.trigger(this.instanceId+":seekstate",t)},t.prototype.switch=function(t){a.default.trigger(this.instanceId+":levelchanged",t)},t.prototype.audioTracksListChange=function(t){a.default.trigger(this.instanceId+":audiotracklistchanged",t)},t.prototype.audioTrackChange=function(t){a.default.trigger(this.instanceId+":audiotrackchanged",t)},t}();e.default=s,t.exports=e.default},function(t,e,n){t.exports=n.p+"809981e5b09d5336c45d72d0869ada2a.swf"},function(t,e,n){"use strict";t.exports=n(68)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(51),c=r(u),d=n(69),f=r(d),h=n(70),p=r(h),g=n(5),y=r(g),v=n(31),m=r(v),b=n(3),_=r(b),E=n(2),T=n(6),A=r(T),k=-1,w=function(t){function e(){o(this,e);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var s=a(this,t.call.apply(t,[this].concat(r)));return s.options.playback||(s.options.playback=s.options),s._minDvrSize="undefined"==typeof s.options.hlsMinimumDvrSize?60:s.options.hlsMinimumDvrSize,s._extrapolatedWindowNumSegments=s.options.playback&&"undefined"!=typeof s.options.playback.extrapolatedWindowNumSegments?s.options.playback.extrapolatedWindowNumSegments:2,s._playbackType=m.default.VOD,s._lastTimeUpdate=null,s._lastDuration=null,s._playableRegionStartTime=0,s._localStartTimeCorrelation=null,s._localEndTimeCorrelation=null,s._playableRegionDuration=0,s._durationExcludesAfterLiveSyncPoint=!1,s._segmentTargetDuration=null,s._playlistType=null,s._recoverAttemptsRemaining=s.options.hlsRecoverAttempts||16,s._startTimeUpdateTimer(),s}return s(e,t),l(e,[{key:"name",get:function(){return"hls"}},{key:"levels",get:function(){return this._levels||[]}},{key:"currentLevel",get:function(){return null===this._currentLevel||void 0===this._currentLevel?k:this._currentLevel},set:function(t){this._currentLevel=t,this.trigger(y.default.PLAYBACK_LEVEL_SWITCH_START),this._hls.currentLevel=this._currentLevel}},{key:"_startTime",get:function(){return this._playbackType===m.default.LIVE&&"EVENT"!==this._playlistType?this._extrapolatedStartTime:this._playableRegionStartTime}},{key:"_now",get:function(){return(0,E.now)()}},{key:"_extrapolatedStartTime",get:function(){if(!this._localStartTimeCorrelation)return this._playableRegionStartTime;var t=this._localStartTimeCorrelation,e=this._now-t.local,n=(t.remote+e)/1e3;return Math.min(n,this._playableRegionStartTime+this._extrapolatedWindowDuration)}},{key:"_extrapolatedEndTime",get:function(){var t=this._playableRegionStartTime+this._playableRegionDuration;if(!this._localEndTimeCorrelation)return t;var e=this._localEndTimeCorrelation,n=this._now-e.local,r=(e.remote+n)/1e3;return Math.max(t-this._extrapolatedWindowDuration,Math.min(r,t))}},{key:"_duration",get:function(){return this._extrapolatedEndTime-this._startTime}},{key:"_extrapolatedWindowDuration",get:function(){return null===this._segmentTargetDuration?0:this._extrapolatedWindowNumSegments*this._segmentTargetDuration}}]),e.prototype._setupHls=function(){var t=this;this._hls=new f.default(this.options.playback.hlsjsConfig||{}),this._hls.on(f.default.Events.MEDIA_ATTACHED,function(){return t._hls.loadSource(t.options.src)}),this._hls.on(f.default.Events.LEVEL_LOADED,function(e,n){return t._updatePlaybackType(e,n)}),this._hls.on(f.default.Events.LEVEL_UPDATED,function(e,n){return t._onLevelUpdated(e,n)}),this._hls.on(f.default.Events.LEVEL_SWITCH,function(e,n){return t._onLevelSwitch(e,n)}),this._hls.on(f.default.Events.FRAG_LOADED,function(e,n){return t._onFragmentLoaded(e,n)}),this._hls.on(f.default.Events.ERROR,function(e,n){return t._onHLSJSError(e,n)}),this._hls.attachMedia(this.el)},e.prototype._recover=function(t,e){this._recoveredDecodingError?this._recoveredAudioCodecError?(A.default.error("hlsjs: failed to recover"),this.trigger(y.default.PLAYBACK_ERROR,"hlsjs: could not recover from error, evt "+t+", data "+e+" ",this.name)):(this._recoveredAudioCodecError=!0,this._hls.swapAudioCodec(),this._hls.recoverMediaError()):(this._recoveredDecodingError=!0,this._hls.recoverMediaError())},e.prototype._setupSrc=function(t){},e.prototype._startTimeUpdateTimer=function(){var t=this;this._timeUpdateTimer=setInterval(function(){t._onDurationChange(),t._onTimeUpdate()},100)},e.prototype._stopTimeUpdateTimer=function(){clearInterval(this._timeUpdateTimer)},e.prototype.getDuration=function(){return this._duration},e.prototype.getCurrentTime=function(){return Math.max(0,this.el.currentTime-this._startTime)},e.prototype.getStartTimeOffset=function(){return this._startTime},e.prototype.seekPercentage=function(t){var e=this._duration;t>0&&(e=this._duration*(t/100)),this.seek(e)},e.prototype.seek=function(e){e<0&&(A.default.warn("Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point."),e=this.getDuration()),this.dvrEnabled&&this._updateDvr(e<this.getDuration()-3),e+=this._startTime,t.prototype.seek.call(this,e)},e.prototype.seekToLivePoint=function(){this.seek(this.getDuration())},e.prototype._updateDvr=function(t){this.trigger(y.default.PLAYBACK_DVR,t),this.trigger(y.default.PLAYBACK_STATS_ADD,{dvr:t})},e.prototype._updateSettings=function(){this._playbackType===m.default.VOD?this.settings.left=["playpause","position","duration"]:this.dvrEnabled?this.settings.left=["playpause"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(y.default.PLAYBACK_SETTINGSUPDATE)},e.prototype._onHLSJSError=function(t,e){if(e.fatal)if(this._recoverAttemptsRemaining>0)switch(this._recoverAttemptsRemaining-=1,e.type){case f.default.ErrorTypes.NETWORK_ERROR:A.default.warn("hlsjs: trying to recover from network error, evt "+t+", data "+e+" "),this._hls.startLoad();break;case f.default.ErrorTypes.MEDIA_ERROR:A.default.warn("hlsjs: trying to recover from media error, evt "+t+", data "+e+" "),this._recover(t,e);break;default:A.default.error("hlsjs: trying to recover from error, evt "+t+", data "+e+" "),this.trigger(y.default.PLAYBACK_ERROR,"hlsjs: could not recover from error, evt "+t+", data "+e+" ",this.name)}else A.default.error("hlsjs: could not recover from error after maximum number of attempts, evt "+t+", data "+e+" "),this.trigger(y.default.PLAYBACK_ERROR,{evt:t,data:e},this.name);else A.default.warn("hlsjs: non-fatal error occurred, evt "+t+", data "+e+" ")},e.prototype._onTimeUpdate=function(){var t={current:this.getCurrentTime(),total:this.getDuration()};(0,p.default)(t,this._lastTimeUpdate)||(this._lastTimeUpdate=t,this.trigger(y.default.PLAYBACK_TIMEUPDATE,t,this.name))},e.prototype._onDurationChange=function(){var e=this.getDuration();this._lastDuration!==e&&(this._lastDuration=e,t.prototype._onDurationChange.call(this))},e.prototype._onProgress=function(){if(this.el.buffered.length){for(var t=[],e=0,n=0;n<this.el.buffered.length;n++)t=[].concat(i(t),[{start:Math.max(0,this.el.buffered.start(n)-this._playableRegionStartTime),end:Math.max(0,this.el.buffered.end(n)-this._playableRegionStartTime)}]),this.el.currentTime>=t[n].start&&this.el.currentTime<=t[n].end&&(e=n);var r={start:t[e].start,current:t[e].end,total:this.getDuration()};this.trigger(y.default.PLAYBACK_PROGRESS,r,t)}},e.prototype.play=function(){this._hls||this._setupHls(),t.prototype.play.call(this)},e.prototype.pause=function(){this._hls&&(t.prototype.pause.call(this),this.dvrEnabled&&this._updateDvr(!0))},e.prototype.stop=function(){this._hls&&(t.prototype.stop.call(this),this._hls.destroy(),delete this._hls)},e.prototype.destroy=function(){this._stopTimeUpdateTimer(),this._hls&&(this._hls.destroy(),delete this._hls),t.prototype.destroy.call(this)},e.prototype._updatePlaybackType=function(t,e){this._playbackType=e.details.live?m.default.LIVE:m.default.VOD,this._fillLevels(),this._onLevelUpdated(t,e)},e.prototype._fillLevels=function(){this._levels=this._hls.levels.map(function(t,e){return{id:e,level:t,label:t.bitrate/1e3+"Kbps"}}),this.trigger(y.default.PLAYBACK_LEVELS_AVAILABLE,this._levels)},e.prototype._onLevelUpdated=function(t,e){this._segmentTargetDuration=e.details.targetduration,this._playlistType=e.details.type||null;var n=!1,r=!1,i=e.details.fragments,o=this._playableRegionStartTime,a=this._playableRegionDuration;if(0!==i.length){if(this._playableRegionStartTime!==i[0].start&&(n=!0,this._playableRegionStartTime=i[0].start),n)if(this._localStartTimeCorrelation){var s=this._localStartTimeCorrelation,l=this._now-s.local,u=(s.remote+l)/1e3;u<i[0].start?this._localStartTimeCorrelation={local:this._now,remote:1e3*i[0].start}:u>o+this._extrapolatedWindowDuration&&(this._localStartTimeCorrelation={local:this._now,remote:1e3*Math.max(i[0].start,o+this._extrapolatedWindowDuration)})}else this._localStartTimeCorrelation={local:this._now,remote:1e3*(i[0].start+this._extrapolatedWindowDuration/2)};var c=e.details.totalduration;if(this._playbackType===m.default.LIVE){var d=e.details.targetduration,h=this.options.playback||{},p=h.liveSyncDurationCount||f.default.DefaultConfig.liveSyncDurationCount,g=d*p;g<=c?(c-=g,this._durationExcludesAfterLiveSyncPoint=!0):this._durationExcludesAfterLiveSyncPoint=!1}c!==this._playableRegionDuration&&(r=!0,this._playableRegionDuration=c);var y=i[0].start+c,v=o+a,b=y!==v;if(b)if(this._localEndTimeCorrelation){var _=this._localEndTimeCorrelation,E=this._now-_.local,T=(_.remote+E)/1e3;T>y?this._localEndTimeCorrelation={local:this._now,remote:1e3*y
  8. }:T<y-this._extrapolatedWindowDuration?this._localEndTimeCorrelation={local:this._now,remote:1e3*(y-this._extrapolatedWindowDuration)}:T>v&&(this._localEndTimeCorrelation={local:this._now,remote:1e3*v})}else this._localEndTimeCorrelation={local:this._now,remote:1e3*y};r&&this._onDurationChange(),n&&this._onProgress()}},e.prototype._onFragmentLoaded=function(t,e){this.trigger(y.default.PLAYBACK_FRAGMENT_LOADED,e)},e.prototype._onLevelSwitch=function(t,e){this.levels.length||this._fillLevels(),this.trigger(y.default.PLAYBACK_LEVEL_SWITCH_END),this.trigger(y.default.PLAYBACK_LEVEL_SWITCH,e);var n=this._hls.levels[e.level];n&&(this.highDefinition=n.height>=720||n.bitrate/1e3>=2e3,this.trigger(y.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(y.default.PLAYBACK_BITRATE,{height:n.height,width:n.width,bandwidth:n.bitrate,bitrate:n.bitrate,level:e.level}))},e.prototype.getPlaybackType=function(){return this._playbackType},e.prototype.isSeekEnabled=function(){return this._playbackType===m.default.VOD||this.dvrEnabled},l(e,[{key:"dvrEnabled",get:function(){return this._durationExcludesAfterLiveSyncPoint&&this._duration>=this._minDvrSize&&this.getPlaybackType()===m.default.LIVE}}]),e}(c.default);e.default=w,w.canPlay=function(t,e){var n=t.split("?")[0].match(/.*\.(.*)$/)||[],r=n.length>1&&"m3u8"===n[1].toLowerCase()||"application/x-mpegURL"===e||"application/vnd.apple.mpegurl"===e;return!(!f.default.isSupported()||!r||_.default.isSafari)},t.exports=e.default},function(t,e,n){var r,r;!function(e){t.exports=e()}(function(){var t;return function t(e,n,i){function o(s,l){if(!n[s]){if(!e[s]){var u="function"==typeof r&&r;if(!l&&u)return r(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var d=n[s]={exports:{}};e[s][0].call(d.exports,function(t){var n=e[s][1][t];return o(n?n:t)},d,d.exports,t,e,n,i)}return n[s].exports}for(var a="function"==typeof r&&r,s=0;s<i.length;s++)o(i[s]);return o}({1:[function(t,e,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function o(t){return"number"==typeof t}function a(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!o(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,n,r,o,l,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(n=this._events[t],s(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),n.apply(this,o)}else if(a(n))for(o=Array.prototype.slice.call(arguments,1),u=n.slice(),r=u.length,l=0;l<r;l++)u[l].apply(this,o);return!0},r.prototype.addListener=function(t,e){var n;if(!i(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?a(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,a(this._events[t])&&!this._events[t].warned&&(n=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},r.prototype.removeListener=function(t,e){var n,r,o,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],o=n.length,r=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(a(n)){for(s=o;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],i(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},{}],2:[function(e,n,r){!function(e){var i={buildAbsoluteURL:function(t,e){if(e=e.trim(),/^[a-z]+:/i.test(e))return e;var n=null,r=null,o=/^([^#]*)(.*)$/.exec(e);o&&(r=o[2],e=o[1]);var a=/^([^\?]*)(.*)$/.exec(e);a&&(n=a[2],e=a[1]);var s=/^([^#]*)(.*)$/.exec(t);s&&(t=s[1]);var l=/^([^\?]*)(.*)$/.exec(t);l&&(t=l[1]);var u=/^(([a-z]+:)?\/\/[a-z0-9\.\-_~]+(:[0-9]+)?)?(\/.*)$/i.exec(t);if(!u)throw new Error("Error trying to parse base URL.");var c=u[2]||"",d=u[1]||"",f=u[4],h=null;return h=/^\/\//.test(e)?c+"//"+i.buildAbsolutePath("",e.substring(2)):/^\//.test(e)?d+"/"+i.buildAbsolutePath("",e.substring(1)):i.buildAbsolutePath(d+f,e),n&&(h+=n),r&&(h+=r),h},buildAbsolutePath:function(t,e){for(var n,r,i=e,o="",a=t.replace(/[^\/]*$/,i.replace(/(\/|^)(?:\.?\/+)+/g,"$1")),s=0;r=a.indexOf("/../",s),r>-1;s=r+n)n=/^\/(?:\.\.\/)*/.exec(a.slice(r))[0].length,o=(o+a.substring(s,r)).replace(new RegExp("(?:\\/+[^\\/]*){0,"+(n-1)/3+"}$"),"/");return o+a.substr(s)}};"object"==typeof r&&"object"==typeof n?n.exports=i:"function"==typeof t&&t.amd?t([],function(){return i}):"object"==typeof r?r.URLToolkit=i:e.URLToolkit=i}(this)},{}],3:[function(t,e,n){var r=arguments[3],i=arguments[4],o=arguments[5],a=JSON.stringify;e.exports=function(t,e){function n(t){y[t]=!0;for(var e in i[t][1]){var r=i[t][1][e];y[r]||n(r)}}for(var s,l=Object.keys(o),u=0,c=l.length;u<c;u++){var d=l[u],f=o[d].exports;if(f===t||f&&f.default===t){s=d;break}}if(!s){s=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var h={},u=0,c=l.length;u<c;u++){var d=l[u];h[d]=d}i[s]=[Function(["require","module","exports"],"("+t+")(self)"),h]}var p=Math.floor(Math.pow(16,8)*Math.random()).toString(16),g={};g[s]=s,i[p]=[Function(["require"],"var f = require("+a(s)+");(f.default ? f.default : f)(self);"),g];var y={};n(p);var v="("+r+")({"+Object.keys(y).map(function(t){return a(t)+":["+i[t][0]+","+a(i[t][1])+"]"}).join(",")+"},{},["+a(p)+"])",m=window.URL||window.webkitURL||window.mozURL||window.msURL,b=new Blob([v],{type:"text/javascript"});if(e&&e.bare)return b;var _=m.createObjectURL(b),E=new Worker(_);return E.objectURL=_,E}},{}],4:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(28),u=r(l),c=t(27),d=r(c),f=t(30),h=r(f),p=t(26),g=t(45),y=t(9),v=r(y),m=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,u.default.FRAG_LOADING,u.default.FRAG_LOADED,u.default.FRAG_BUFFERED,u.default.ERROR));return n.lastLoadedFragLevel=0,n._autoLevelCapping=-1,n._nextAutoLevel=-1,n.hls=t,n.onCheck=n.abandonRulesCheck.bind(n),n}return a(e,t),s(e,[{key:"destroy",value:function(){this.clearTimer(),d.default.prototype.destroy.call(this)}},{key:"onFragLoading",value:function(t){var e=t.frag;if("main"===e.type){if(this.timer||(this.timer=setInterval(this.onCheck,100)),!this.bwEstimator){var n=this.hls,r=t.frag.level,i=n.levels[r].details.live,o=n.config,a=void 0,s=void 0;i?(a=o.abrEwmaFastLive,s=o.abrEwmaSlowLive):(a=o.abrEwmaFastVoD,s=o.abrEwmaSlowVoD),this.bwEstimator=new v.default(n,s,a,o.abrEwmaDefaultEstimate)}this.fragCurrent=e}}},{key:"abandonRulesCheck",value:function(){var t=this.hls,e=t.media,n=this.fragCurrent,r=n.loader,i=this.minAutoLevel;if(!r||r.stats&&r.stats.aborted)return g.logger.warn("frag loader destroy or aborted, disarm abandonRules"),void this.clearTimer();var o=r.stats;if(e&&(!e.paused&&0!==e.playbackRate||!e.readyState)&&n.autoLevel&&n.level){var a=performance.now()-o.trequest,s=Math.abs(e.playbackRate);if(a>500*n.duration/s){var l=t.levels,c=Math.max(1,o.bw?o.bw/8:1e3*o.loaded/a),d=o.total?o.total:Math.max(o.loaded,Math.round(n.duration*l[n.level].bitrate/8)),f=e.currentTime,p=(d-o.loaded)/c,y=(h.default.bufferInfo(e,f,t.config.maxBufferHole).end-f)/s;if(y<2*n.duration/s&&p>y){var v=void 0,m=void 0;for(m=n.level-1;m>i&&(v=n.duration*l[m].bitrate/(6.4*c),!(v<y));m--);v<p&&(g.logger.warn("loading too slow, abort fragment loading and switch to level "+m+":fragLoadedDelay["+m+"]<fragLoadedDelay["+(n.level-1)+"];bufferStarvationDelay:"+v.toFixed(1)+"<"+p.toFixed(1)+":"+y.toFixed(1)),t.nextLoadLevel=m,this.bwEstimator.sample(a,o.loaded),r.abort(),this.clearTimer(),t.trigger(u.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,stats:o}))}}}}},{key:"onFragLoaded",value:function(t){var e=t.frag;if("main"===e.type&&(this.clearTimer(),this.lastLoadedFragLevel=e.level,this._nextAutoLevel=-1,t.frag.bitrateTest)){var n=t.stats;n.tparsed=n.tbuffered=n.tload,this.onFragBuffered(t)}}},{key:"onFragBuffered",value:function(t){var e=t.stats,n=t.frag;if(e.aborted!==!0&&1===n.loadCounter&&"main"===n.type&&(!n.bitrateTest||e.tload===e.tbuffered)){var r=e.tparsed-e.trequest;g.logger.log("latency/loading/parsing/append/kbps:"+Math.round(e.tfirst-e.trequest)+"/"+Math.round(e.tload-e.tfirst)+"/"+Math.round(e.tparsed-e.tload)+"/"+Math.round(e.tbuffered-e.tparsed)+"/"+Math.round(8*e.loaded/(e.tbuffered-e.trequest))),this.bwEstimator.sample(r,e.loaded),n.bitrateTest?this.bitrateTestDelay=r/1e3:this.bitrateTestDelay=0}}},{key:"onError",value:function(t){switch(t.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}}},{key:"clearTimer",value:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}},{key:"findBestLevel",value:function(t,e,n,r,i,o,a,s,l){for(var u=i;u>=r;u--){var c=l[u],d=c.details,f=d?d.totalduration/d.fragments.length:e,h=!!d&&d.live,p=void 0;p=u<=t?a*n:s*n;var y=l[u].bitrate,v=y*f/p;if(g.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+u+"/"+Math.round(p)+"/"+y+"/"+f+"/"+o+"/"+v),p>y&&(!v||h||v<o))return u}return-1}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(t){this._autoLevelCapping=t}},{key:"nextAutoLevel",get:function(){var t=this._nextAutoLevel,e=this.bwEstimator,n=this.hls,r=n.levels,i=n.config.minAutoBitrate;if(!(t===-1||e&&e.canEstimate()))return Math.min(t,this.maxAutoLevel);var o=this.nextABRAutoLevel;if(t!==-1&&(o=Math.min(t,o)),void 0!==i)for(;r[o].bitrate<i;)o++;return o},set:function(t){this._nextAutoLevel=t}},{key:"minAutoLevel",get:function(){for(var t=this.hls,e=t.levels,n=t.config.minAutoBitrate,r=e?e.length:0,i=0;i<r;i++)if(e[i].bitrate>n)return i;return 0}},{key:"maxAutoLevel",get:function(){var t,e=this.hls.levels,n=this._autoLevelCapping;return t=n===-1&&e&&e.length?e.length-1:n}},{key:"nextABRAutoLevel",get:function(){var t=this.hls,e=this.maxAutoLevel,n=t.levels,r=t.config,i=this.minAutoLevel,o=t.media,a=this.lastLoadedFragLevel,s=this.fragCurrent?this.fragCurrent.duration:0,l=o?o.currentTime:0,u=o&&0!==o.playbackRate?Math.abs(o.playbackRate):1,c=this.bwEstimator?this.bwEstimator.getEstimate():r.abrEwmaDefaultEstimate,d=(h.default.bufferInfo(o,l,r.maxBufferHole).end-l)/u,f=this.findBestLevel(a,s,c,i,e,d,r.abrBandWidthFactor,r.abrBandWidthUpFactor,n);if(f>=0)return f;g.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var p=r.maxStarvationDelay,y=r.abrBandWidthFactor,v=r.abrBandWidthUpFactor;if(0===d){var m=this.bitrateTestDelay;m&&(p=r.maxLoadingDelay-m,g.logger.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*p)+" ms"),y=v=1)}return f=this.findBestLevel(a,s,c,i,e,d+p,y,v,n),Math.max(f,0)}}]),e}(d.default);n.default=m},{26:26,27:27,28:28,30:30,45:45,9:9}],5:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=t(41),c=r(u),d=t(30),f=r(d),h=t(22),p=r(h),g=t(28),y=r(g),v=t(27),m=r(v),b=t(31),_=r(b),E=t(46),T=r(E),A=t(26),k=t(45),w={STOPPED:"STOPPED",STARTING:"STARTING",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS"},S=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,y.default.MEDIA_ATTACHED,y.default.MEDIA_DETACHING,y.default.AUDIO_TRACKS_UPDATED,y.default.AUDIO_TRACK_SWITCHING,y.default.AUDIO_TRACK_LOADED,y.default.KEY_LOADED,y.default.FRAG_LOADED,y.default.FRAG_PARSING_INIT_SEGMENT,y.default.FRAG_PARSING_DATA,y.default.FRAG_PARSED,y.default.ERROR,y.default.BUFFER_CREATED,y.default.BUFFER_APPENDED,y.default.BUFFER_FLUSHED,y.default.INIT_PTS_FOUND));return n.config=t.config,n.audioCodecSwap=!1,n.ticks=0,n.ontick=n.tick.bind(n),n.initPTS=[],n.waitingFragment=null,n}return a(e,t),l(e,[{key:"destroy",value:function(){this.stopLoad(),this.timer&&(clearInterval(this.timer),this.timer=null),m.default.prototype.destroy.call(this),this.state=w.STOPPED}},{key:"onInitPtsFound",value:function(t){var e=t.id,n=t.cc,r=t.initPTS;"main"===e&&(this.initPTS[n]=r,k.logger.log("InitPTS for cc:"+n+" found from video track:"+r),this.state===w.WAITING_INIT_PTS&&(k.logger.log("sending pending audio frag to demuxer"),this.state=w.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null))}},{key:"startLoad",value:function(t){if(this.tracks){var e=this.lastCurrentTime;this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.fragLoadError=0,e>0&&t===-1?(k.logger.log("audio:override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=w.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:t,this.state=w.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=t,this.state=w.STOPPED}},{key:"stopLoad",value:function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=w.STOPPED}},{key:"tick",value:function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){var t,e,n,r,i,o,a=this,l=this.hls,u=l.config,d=function(){switch(a.state){case w.ERROR:case w.PAUSED:case w.BUFFER_FLUSHING:break;case w.STARTING:a.state=w.WAITING_TRACK,a.loadedmetadata=!1;break;case w.IDLE:if(!a.media&&(a.startFragRequested||!u.startFragPrefetch))break;t=a.loadedmetadata?a.media.currentTime:a.nextLoadPosition;var s=a.mediaBuffer?a.mediaBuffer:a.media,d=f.default.bufferInfo(s,t,u.maxBufferHole),h=d.len,p=d.end,g=a.fragPrevious,v=u.maxMaxBufferLength,m=a.audioSwitch;if(h<v&&a.trackId<a.tracks.length){if(n=a.tracks[a.trackId].details,"undefined"==typeof n){a.state=w.WAITING_TRACK;break}if(!m&&!n.live&&g&&g.sn===n.endSN&&(!a.media.seeking||a.media.duration-p<g.duration/2)){a.hls.trigger(y.default.BUFFER_EOS,{type:"audio"}),a.state=w.ENDED;break}var b=n.fragments,_=b.length,E=b[0].start,T=b[_-1].start+b[_-1].duration,S=void 0;if(m)if(n.live&&!n.PTSKnown)k.logger.log("switching audiotrack, live stream, unknown PTS,load first fragment"),p=0;else if(p=t,n.PTSKnown&&t<E){if(!(d.end>E||d.nextStart))return{v:void 0};k.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),a.media.currentTime=E+.05}if(p<E?S=b[0]:!function(){var t=void 0,e=u.maxFragLookUpTolerance;p<T?(p>T-e&&(e=0),t=c.default.search(b,function(t){return t.start+t.duration-e<=p?1:t.start-e>p?-1:0})):t=b[_-1],t&&(S=t,E=t.start,g&&S.level===g.level&&S.sn===g.sn&&(S.sn<n.endSN?(S=b[S.sn+1-n.startSN],k.logger.log("SN just loaded, load next one: "+S.sn)):S=null))}(),S)if(null!=S.decryptdata.uri&&null==S.decryptdata.key)k.logger.log("Loading key for "+S.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+a.trackId),a.state=w.KEY_LOADING,l.trigger(y.default.KEY_LOADING,{frag:S});else{if(k.logger.log("Loading "+S.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+a.trackId+", currentTime:"+t+",bufferEnd:"+p.toFixed(3)),void 0!==a.fragLoadIdx?a.fragLoadIdx++:a.fragLoadIdx=0,S.loadCounter){S.loadCounter++;var R=u.fragLoadingLoopThreshold;if(S.loadCounter>R&&Math.abs(a.fragLoadIdx-S.loadIdx)<R)return l.trigger(y.default.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:S}),{v:void 0}}else S.loadCounter=1;S.loadIdx=a.fragLoadIdx,a.fragCurrent=S,a.startFragRequested=!0,a.nextLoadPosition=S.start+S.duration,l.trigger(y.default.FRAG_LOADING,{frag:S}),a.state=w.FRAG_LOADING}}break;case w.WAITING_TRACK:e=a.tracks[a.trackId],e&&e.details&&(a.state=w.IDLE);break;case w.FRAG_LOADING_WAITING_RETRY:r=performance.now(),i=a.retryDate,s=a.media,o=s&&s.seeking,(!i||r>=i||o)&&(k.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),a.state=w.IDLE);break;case w.WAITING_INIT_PTS:case w.STOPPED:case w.FRAG_LOADING:case w.PARSING:case w.PARSED:case w.ENDED:}}();if("object"===("undefined"==typeof d?"undefined":s(d)))return d.v}},{key:"onMediaAttached",value:function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("ended",this.onvended);var n=this.config;this.tracks&&n.autoStartLoad&&this.startLoad(n.startPosition)}},{key:"onMediaDetaching",value:function(){var t=this.media;t&&t.ended&&(k.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var e=this.tracks;e&&e.forEach(function(t){t.details&&t.details.fragments.forEach(function(t){t.loadCounter=void 0})}),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()}},{key:"onMediaSeeking",value:function(){this.state===w.ENDED&&(this.state=w.IDLE),this.media&&(this.lastCurrentTime=this.media.currentTime),void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.tick()}},{key:"onMediaEnded",value:function(){this.startPosition=this.lastCurrentTime=0}},{key:"onAudioTracksUpdated",value:function(t){k.logger.log("audio tracks updated"),this.tracks=t.audioTracks}},{key:"onAudioTrackSwitching",value:function(t){var e=!!t.url;this.trackId=t.id,this.state=w.IDLE,this.fragCurrent=null,this.state=w.PAUSED,this.waitingFragment=null,e?this.timer||(this.timer=setInterval(this.ontick,100)):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),e&&(this.audioSwitch=!0,this.state=w.IDLE,this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.tick()}},{key:"onAudioTrackLoaded",value:function(t){var e=t.details,n=t.id,r=this.tracks[n],i=e.totalduration,o=0;if(k.logger.log("track "+n+" loaded ["+e.startSN+","+e.endSN+"],duration:"+i),e.live){var a=r.details;a&&e.fragments.length>0?(_.default.mergeDetails(a,e),o=e.fragments[0].start,e.PTSKnown?k.logger.log("live audio playlist sliding:"+o.toFixed(3)):k.logger.log("live audio playlist - outdated PTS, unknown sliding")):(e.PTSKnown=!1,k.logger.log("live audio playlist - first load, unknown sliding"))}else e.PTSKnown=!1;if(r.details=e,!this.startFragRequested){if(this.startPosition===-1){var s=e.startTimeOffset;isNaN(s)?this.startPosition=0:(k.logger.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s)}this.nextLoadPosition=this.startPosition}this.state===w.WAITING_TRACK&&(this.state=w.IDLE),this.tick()}},{key:"onKeyLoaded",value:function(){this.state===w.KEY_LOADING&&(this.state=w.IDLE,this.tick())}},{key:"onFragLoaded",value:function(t){var e=this.fragCurrent;if(this.state===w.FRAG_LOADING&&e&&"audio"===t.frag.type&&t.frag.level===e.level&&t.frag.sn===e.sn){this.state=w.PARSING,this.stats=t.stats;var n=this.tracks[this.trackId],r=n.details,i=r.totalduration,o=e.start,a=e.level,s=e.sn,l=e.cc,u=this.config.defaultAudioCodec||n.audioCodec;this.appended=!1,this.demuxer||(this.demuxer=new p.default(this.hls,"audio"));var c=this.initPTS[l];if(void 0!==c){this.pendingBuffering=!0,k.logger.log("Demuxing "+s+" of ["+r.startSN+" ,"+r.endSN+"],track "+a);var d=!1;this.demuxer.push(t.payload,u,null,o,l,a,s,i,e.decryptdata,d,c)}else k.logger.log("unknown video PTS for continuity counter "+l+", waiting for video PTS before demuxing audio frag "+s+" of ["+r.startSN+" ,"+r.endSN+"],track "+a),this.waitingFragment=t,this.state=w.WAITING_INIT_PTS}this.fragLoadError=0}},{key:"onFragParsingInitSegment",value:function(t){var e=this.fragCurrent;if(e&&"audio"===t.id&&t.sn===e.sn&&t.level===e.level&&this.state===w.PARSING){var n=t.tracks,r=void 0;if(n.video&&delete n.video,r=n.audio){r.levelCodec="mp4a.40.2",r.id=t.id,this.hls.trigger(y.default.BUFFER_CODECS,n),k.logger.log("audio track:audio,container:"+r.container+",codecs[level/parsed]=["+r.levelCodec+"/"+r.codec+"]");var i=r.initSegment;if(i){var o={type:"audio",data:i,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[o]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(y.default.BUFFER_APPENDING,o))}this.tick()}}}},{key:"onFragParsingData",value:function(t){var e=this,n=this.fragCurrent;n&&"audio"===t.id&&"audio"===t.type&&t.sn===n.sn&&t.level===n.level&&this.state===w.PARSING&&!function(){var n=e.trackId,r=e.tracks[n],i=e.fragCurrent,o=e.hls;k.logger.log("parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb),_.default.updateFragPTSDTS(r.details,i.sn,t.startPTS,t.endPTS);var a=e.audioSwitch,s=e.media,l=!1;if(a&&s)if(s.readyState){var u=s.currentTime;k.logger.log("switching audio track : currentTime:"+u),u>=t.startPTS&&(k.logger.log("switching audio track : flushing all audio"),e.state=w.BUFFER_FLUSHING,o.trigger(y.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),l=!0,e.audioSwitch=!1,o.trigger(y.default.AUDIO_TRACK_SWITCHED,{id:n}))}else e.audioSwitch=!1,o.trigger(y.default.AUDIO_TRACK_SWITCHED,{id:n});var c=e.pendingData;e.audioSwitch||([t.data1,t.data2].forEach(function(e){e&&c.push({type:t.type,data:e,parent:"audio",content:"data"})}),!l&&c.length&&(c.forEach(function(t){e.pendingBuffering=!0,e.hls.trigger(y.default.BUFFER_APPENDING,t)}),e.pendingData=[],e.appended=!0)),e.tick()}()}},{key:"onFragParsed",value:function(t){var e=this.fragCurrent;e&&"audio"===t.id&&t.sn===e.sn&&t.level===e.level&&this.state===w.PARSING&&(this.stats.tparsed=performance.now(),this.state=w.PARSED,this._checkAppendedParsed())}},{key:"onBufferCreated",value:function(t){var e=t.tracks.audio;e&&(this.mediaBuffer=e.buffer,this.loadedmetadata=!0)}},{key:"onBufferAppended",value:function(t){if("audio"===t.parent){var e=this.state;e!==w.PARSING&&e!==w.PARSED||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}}},{key:"_checkAppendedParsed",value:function(){if(!(this.state!==w.PARSED||this.appended&&this.pendingBuffering)){var t=this.fragCurrent,e=this.stats,n=this.hls;if(t){this.fragPrevious=t,e.tbuffered=performance.now(),n.trigger(y.default.FRAG_BUFFERED,{stats:e,frag:t,id:"audio"});var r=this.mediaBuffer?this.mediaBuffer:this.media;k.logger.log("audio buffered : "+T.default.toString(r.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,n.trigger(y.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=w.IDLE}this.tick()}}},{key:"onError",value:function(t){var e=t.frag;if(!e||"audio"===e.type)switch(t.details){case A.ErrorDetails.FRAG_LOAD_ERROR:case A.ErrorDetails.FRAG_LOAD_TIMEOUT:if(!t.fatal){var n=this.fragLoadError;n?n++:n=1;var r=this.config;if(n<=r.fragLoadingMaxRetry){this.fragLoadError=n,e.loadCounter=0;var i=Math.min(Math.pow(2,n-1)*r.fragLoadingRetryDelay,r.fragLoadingMaxRetryTimeout);k.logger.warn("audioStreamController: frag loading failed, retry in "+i+" ms"),this.retryDate=performance.now()+i,this.state=w.FRAG_LOADING_WAITING_RETRY}else k.logger.error("audioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.hls.trigger(y.default.ERROR,t),this.state=w.ERROR}break;case A.ErrorDetails.FRAG_LOOP_LOADING_ERROR:case A.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case A.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case A.ErrorDetails.KEY_LOAD_ERROR:case A.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==w.ERROR&&(this.state=t.fatal?w.ERROR:w.IDLE,k.logger.warn("audioStreamController: "+t.details+" while loading frag,switch to "+this.state+" state ..."))}}},{key:"onBufferFlushed",value:function(){var t=this,e=this.pendingData;e&&e.length?(k.logger.log("appending pending audio data on Buffer Flushed"),e.forEach(function(e){t.hls.trigger(y.default.BUFFER_APPENDING,e)}),this.appended=!0,this.pendingData=[],this.state=w.PARSED):(this.state=w.IDLE,this.fragPrevious=null,this.tick())}}]),e}(m.default);n.default=S},{22:22,26:26,27:27,28:28,30:30,31:31,41:41,45:45,46:46}],6:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(28),u=r(l),c=t(27),d=r(c),f=t(45),h=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,u.default.MANIFEST_LOADING,u.default.MANIFEST_LOADED,u.default.AUDIO_TRACK_LOADED));return n.ticks=0,n.ontick=n.tick.bind(n),n}return a(e,t),s(e,[{key:"destroy",value:function(){d.default.prototype.destroy.call(this)}},{key:"tick",value:function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){this.updateTrack(this.trackId)}},{key:"onManifestLoading",value:function(){this.tracks=[],this.trackId=-1}},{key:"onManifestLoaded",value:function(t){var e=this,n=t.audioTracks||[],r=!1;this.tracks=n,this.hls.trigger(u.default.AUDIO_TRACKS_UPDATED,{audioTracks:n});var i=0;n.forEach(function(t){return t.default?(e.audioTrack=i,void(r=!0)):void i++}),r===!1&&n.length&&(f.logger.log("no default audio track defined, use first audio track as default"),this.audioTrack=0)}},{key:"onAudioTrackLoaded",value:function(t){t.id<this.tracks.length&&(f.logger.log("audioTrack "+t.id+" loaded"),this.tracks[t.id].details=t.details,t.details.live&&!this.timer&&(this.timer=setInterval(this.ontick,1e3*t.details.targetduration)),!t.details.live&&this.timer&&(clearInterval(this.timer),this.timer=null))}},{key:"setAudioTrackInternal",value:function(t){if(t>=0&&t<this.tracks.length){this.timer&&(clearInterval(this.timer),this.timer=null),this.trackId=t,f.logger.log("switching to audioTrack "+t);var e=this.tracks[t],n=this.hls,r=e.type,i=e.url,o={id:t,type:r,url:i};n.trigger(u.default.AUDIO_TRACK_SWITCH,o),n.trigger(u.default.AUDIO_TRACK_SWITCHING,o);var a=e.details;!i||void 0!==a&&a.live!==!0||(f.logger.log("(re)loading playlist for audioTrack "+t),n.trigger(u.default.AUDIO_TRACK_LOADING,{url:i,id:t}))}}},{key:"updateTrack",value:function(t){if(t>=0&&t<this.tracks.length){this.timer&&(clearInterval(this.timer),this.timer=null),this.trackId=t,f.logger.log("updating audioTrack "+t);var e=this.tracks[t],n=e.url,r=e.details;!n||void 0!==r&&r.live!==!0||(f.logger.log("(re)loading playlist for audioTrack "+t),this.hls.trigger(u.default.AUDIO_TRACK_LOADING,{url:n,id:t}))}}},{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this.trackId},set:function(t){this.trackId===t&&void 0!==this.tracks[t].details||this.setAudioTrackInternal(t)}}]),e}(d.default);n.default=h},{27:27,28:28,45:45}],7:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);
  9. t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(28),u=r(l),c=t(27),d=r(c),f=t(45),h=t(26),p=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.MANIFEST_PARSED,u.default.BUFFER_RESET,u.default.BUFFER_APPENDING,u.default.BUFFER_CODECS,u.default.BUFFER_EOS,u.default.BUFFER_FLUSHING,u.default.LEVEL_PTS_UPDATED,u.default.LEVEL_UPDATED));return n._msDuration=null,n._levelDuration=null,n.onsbue=n.onSBUpdateEnd.bind(n),n.onsbe=n.onSBUpdateError.bind(n),n.pendingTracks={},n.tracks={},n}return a(e,t),s(e,[{key:"destroy",value:function(){d.default.prototype.destroy.call(this)}},{key:"onLevelPtsUpdated",value:function(t){var e=t.type,n=this.tracks.audio;if("audio"===e&&n&&"audio/mpeg"===n.container){var r=this.sourceBuffer.audio,i=Math.abs(r.timestampOffset-t.start);if(i>.1){var o=r.updating;try{r.abort()}catch(t){o=!0,f.logger.warn("can not abort audio buffer: "+t)}o?this.audioTimestampOffset=t.start:(f.logger.warn("change mpeg audio timestamp offset from "+r.timestampOffset+" to "+t.start),r.timestampOffset=t.start)}}}},{key:"onManifestParsed",value:function(t){var e=t.audio,n=t.video,r=0;t.altAudio&&(e||n)&&(r=(e?1:0)+(n?1:0),f.logger.log(r+" sourceBuffer(s) expected")),this.sourceBufferNb=r}},{key:"onMediaAttaching",value:function(t){var e=this.media=t.media;if(e){var n=this.mediaSource=new MediaSource;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),n.addEventListener("sourceopen",this.onmso),n.addEventListener("sourceended",this.onmse),n.addEventListener("sourceclose",this.onmsc),e.src=URL.createObjectURL(n)}}},{key:"onMediaDetaching",value:function(){f.logger.log("media source detaching");var t=this.mediaSource;if(t){if("open"===t.readyState)try{t.endOfStream()}catch(t){f.logger.warn("onMediaDetaching:"+t.message+" while calling endOfStream")}t.removeEventListener("sourceopen",this.onmso),t.removeEventListener("sourceended",this.onmse),t.removeEventListener("sourceclose",this.onmsc),this.media&&(URL.revokeObjectURL(this.media.src),this.media.removeAttribute("src"),this.media.load()),this.mediaSource=null,this.media=null,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(u.default.MEDIA_DETACHED)}},{key:"onMediaSourceOpen",value:function(){f.logger.log("media source opened"),this.hls.trigger(u.default.MEDIA_ATTACHED,{media:this.media});var t=this.mediaSource;t&&t.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()}},{key:"checkPendingTracks",value:function(){var t=this.pendingTracks,e=Object.keys(t).length;e&&(this.sourceBufferNb<=e||0===this.sourceBufferNb)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())}},{key:"onMediaSourceClose",value:function(){f.logger.log("media source closed")}},{key:"onMediaSourceEnded",value:function(){f.logger.log("media source ended")}},{key:"onSBUpdateEnd",value:function(){if(this.audioTimestampOffset){var t=this.sourceBuffer.audio;f.logger.warn("change mpeg audio timestamp offset from "+t.timestampOffset+" to "+this.audioTimestampOffset),t.timestampOffset=this.audioTimestampOffset,delete this.audioTimestampOffset}this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1;var e=this.parent,n=this.segments.reduce(function(t,n){return n.parent===e?t+1:t},0);this.hls.trigger(u.default.BUFFER_APPENDED,{parent:e,pending:n}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration()}},{key:"onSBUpdateError",value:function(t){f.logger.error("sourceBuffer error:"+t),this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})}},{key:"onBufferReset",value:function(){var t=this.sourceBuffer;for(var e in t){var n=t[e];try{this.mediaSource.removeSourceBuffer(n),n.removeEventListener("updateend",this.onsbue),n.removeEventListener("error",this.onsbe)}catch(t){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}},{key:"onBufferCodecs",value:function(t){if(0===Object.keys(this.sourceBuffer).length){for(var e in t)this.pendingTracks[e]=t[e];var n=this.mediaSource;n&&"open"===n.readyState&&this.checkPendingTracks()}}},{key:"createSourceBuffers",value:function(t){var e=this.sourceBuffer,n=this.mediaSource;for(var r in t)if(!e[r]){var i=t[r],o=i.levelCodec||i.codec,a=i.container+";codecs="+o;f.logger.log("creating sourceBuffer("+a+")");try{var s=e[r]=n.addSourceBuffer(a);s.addEventListener("updateend",this.onsbue),s.addEventListener("error",this.onsbe),this.tracks[r]={codec:o,container:i.container},i.buffer=s}catch(t){f.logger.error("error while trying to add sourceBuffer:"+t.message),this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:t,mimeType:a})}}this.hls.trigger(u.default.BUFFER_CREATED,{tracks:t})}},{key:"onBufferAppending",value:function(t){this._needsFlush||(this.segments?this.segments.push(t):this.segments=[t],this.doAppending())}},{key:"onBufferAppendFail",value:function(t){f.logger.error("sourceBuffer error:",t.event),this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1,frag:this.fragCurrent})}},{key:"onBufferEos",value:function(t){var e=this.sourceBuffer,n=t.type;for(var r in e)n&&r!==n||e[r].ended||(e[r].ended=!0,f.logger.log(r+" sourceBuffer now EOS"));this.checkEos()}},{key:"checkEos",value:function(){var t=this.sourceBuffer,e=this.mediaSource;if(!e||"open"!==e.readyState)return void(this._needsEos=!1);for(var n in t){var r=t[n];if(!r.ended)return;if(r.updating)return void(this._needsEos=!0)}f.logger.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment");try{e.endOfStream()}catch(t){f.logger.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1}},{key:"onBufferFlushing",value:function(t){this.flushRange.push({start:t.startOffset,end:t.endOffset,type:t.type}),this.flushBufferCounter=0,this.doFlush()}},{key:"onLevelUpdated",value:function(t){var e=t.details;0!==e.fragments.length&&(this._levelDuration=e.totalduration+e.fragments[0].start,this.updateMediaElementDuration())}},{key:"updateMediaElementDuration",value:function(){var t=this.media,e=this.mediaSource,n=this.sourceBuffer,r=this._levelDuration;if(null!==r&&t&&e&&n&&0!==t.readyState&&"open"===e.readyState){for(var i in n)if(n[i].updating)return;null===this._msDuration&&(this._msDuration=e.duration);var o=t.duration;(r>this._msDuration&&r>o||o===1/0||isNaN(o))&&(f.logger.log("Updating mediasource duration to "+r.toFixed(3)),this._msDuration=e.duration=r)}}},{key:"doFlush",value:function(){for(;this.flushRange.length;){var t=this.flushRange[0];if(!this.flushBuffer(t.start,t.end,t.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var e=0,n=this.sourceBuffer;try{for(var r in n)e+=n[r].buffered.length}catch(t){f.logger.error("error while accessing sourceBuffer.buffered")}this.appended=e,this.hls.trigger(u.default.BUFFER_FLUSHED)}}},{key:"doAppending",value:function(){var t=this.hls,e=this.sourceBuffer,n=this.segments;if(Object.keys(e).length){if(this.media.error)return this.segments=[],void f.logger.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(n&&n.length){var r=n.shift();try{var i=r.type,o=e[i];o?o.updating?n.unshift(r):(o.ended=!1,this.parent=r.parent,o.appendBuffer(r.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(e){f.logger.error("error while trying to append buffer:"+e.message),n.unshift(r);var a={type:h.ErrorTypes.MEDIA_ERROR};if(22===e.code)return this.segments=[],a.details=h.ErrorDetails.BUFFER_FULL_ERROR,a.fatal=!1,void t.trigger(u.default.ERROR,a);if(this.appendError?this.appendError++:this.appendError=1,a.details=h.ErrorDetails.BUFFER_APPEND_ERROR,a.frag=this.fragCurrent,this.appendError>t.config.appendErrorMaxRetry)return f.logger.log("fail "+t.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),n=[],a.fatal=!0,void t.trigger(u.default.ERROR,a);a.fatal=!1,t.trigger(u.default.ERROR,a)}}}}},{key:"flushBuffer",value:function(t,e,n){var r,i,o,a,s,l,u=this.sourceBuffer;if(Object.keys(u).length){if(f.logger.log("flushBuffer,pos/start/end: "+this.media.currentTime.toFixed(3)+"/"+t+"/"+e),this.flushBufferCounter<this.appended){for(var c in u)if(!n||c===n){if(r=u[c],r.ended=!1,r.updating)return f.logger.warn("cannot flush, sb updating in progress"),!1;try{for(i=0;i<r.buffered.length;i++)if(o=r.buffered.start(i),a=r.buffered.end(i),navigator.userAgent.toLowerCase().indexOf("firefox")!==-1&&e===Number.POSITIVE_INFINITY?(s=t,l=e):(s=Math.max(o,t),l=Math.min(a,e)),Math.min(l,a)-s>.5)return this.flushBufferCounter++,f.logger.log("flush "+c+" ["+s+","+l+"], of ["+o+","+a+"], pos:"+this.media.currentTime),r.remove(s,l),!1}catch(t){f.logger.warn("exception while accessing sourcebuffer, it might have been removed from MediaSource")}}}else f.logger.warn("abort flushing too many retries");f.logger.log("buffer flushed")}return!0}}]),e}(d.default);n.default=p},{26:26,27:27,28:28,45:45}],8:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(28),u=r(l),c=t(27),d=r(c),f=function(t){function e(t){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,u.default.FPS_DROP_LEVEL_CAPPING,u.default.MEDIA_ATTACHING,u.default.MANIFEST_PARSED))}return a(e,t),s(e,[{key:"destroy",value:function(){this.hls.config.capLevelToPlayerSize&&(this.media=this.restrictedLevels=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer)))}},{key:"onFpsDropLevelCapping",value:function(t){this.restrictedLevels||(this.restrictedLevels=[]),this.isLevelRestricted(t.droppedLevel)||this.restrictedLevels.push(t.droppedLevel)}},{key:"onMediaAttaching",value:function(t){this.media=t.media instanceof HTMLVideoElement?t.media:null}},{key:"onManifestParsed",value:function(t){var e=this.hls;e.config.capLevelToPlayerSize&&(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.levels=t.levels,e.firstLevel=this.getMaxLevel(t.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}},{key:"detectPlayerSize",value:function(){if(this.media){var t=this.levels?this.levels.length:0;if(t){var e=this.hls;e.autoLevelCapping=this.getMaxLevel(t-1),e.autoLevelCapping>this.autoLevelCapping&&e.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}}},{key:"getMaxLevel",value:function(t){var e=0,n=void 0,r=void 0,i=this.mediaWidth,o=this.mediaHeight,a=0,s=0;for(n=0;n<=t&&(r=this.levels[n],!this.isLevelRestricted(n))&&(e=n,a=r.width,s=r.height,!(i<=a||o<=s));n++);return e}},{key:"isLevelRestricted",value:function(t){return!(!this.restrictedLevels||this.restrictedLevels.indexOf(t)===-1)}},{key:"contentScaleFactor",get:function(){var t=1;try{t=window.devicePixelRatio}catch(t){}return t}},{key:"mediaWidth",get:function(){var t=void 0,e=this.media;return e&&(t=e.width||e.clientWidth||e.offsetWidth,t*=this.contentScaleFactor),t}},{key:"mediaHeight",get:function(){var t=void 0,e=this.media;return e&&(t=e.height||e.clientHeight||e.offsetHeight,t*=this.contentScaleFactor),t}}]),e}(d.default);n.default=f},{27:27,28:28}],9:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(44),s=r(a),l=function(){function t(e,n,r,o){i(this,t),this.hls=e,this.defaultEstimate_=o,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new s.default(n),this.fast_=new s.default(r)}return o(t,[{key:"sample",value:function(t,e){t=Math.max(t,this.minDelayMs_);var n=8e3*e/t,r=t/1e3;this.fast_.sample(r,n),this.slow_.sample(r,n)}},{key:"canEstimate",value:function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_}},{key:"getEstimate",value:function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}},{key:"destroy",value:function(){}}]),t}();n.default=l},{44:44}],10:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(28),u=r(l),c=t(27),d=r(c),f=t(45),h=function(t){function e(t){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,u.default.MEDIA_ATTACHING))}return a(e,t),s(e,[{key:"destroy",value:function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1}},{key:"onMediaAttaching",value:function(t){var e=this.hls.config;if(e.capLevelOnFPSDrop){var n=this.video=t.media instanceof HTMLVideoElement?t.media:null;"function"==typeof n.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),e.fpsDroppedMonitoringPeriod)}}},{key:"checkFPS",value:function(t,e,n){var r=performance.now();if(e){if(this.lastTime){var i=r-this.lastTime,o=n-this.lastDroppedFrames,a=e-this.lastDecodedFrames,s=1e3*o/i,l=this.hls;if(l.trigger(u.default.FPS_DROP,{currentDropped:o,currentDecoded:a,totalDroppedFrames:n}),s>0&&o>l.config.fpsDroppedMonitoringThreshold*a){var c=l.currentLevel;f.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+c),c>0&&(l.autoLevelCapping===-1||l.autoLevelCapping>=c)&&(c-=1,l.trigger(u.default.FPS_DROP_LEVEL_CAPPING,{level:c,droppedLevel:l.currentLevel}),l.autoLevelCapping=c,l.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=e}}},{key:"checkFPSInterval",value:function(){var t=this.video;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)}}]),e}(d.default);n.default=h},{27:27,28:28,45:45}],11:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(28),u=r(l),c=t(27),d=r(c),f=t(45),h=t(26),p=t(30),g=r(p),y=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,u.default.MANIFEST_LOADED,u.default.LEVEL_LOADED,u.default.FRAG_LOADED,u.default.ERROR));return n.ontick=n.tick.bind(n),n._manualLevel=n._autoLevelCapping=-1,n}return a(e,t),s(e,[{key:"destroy",value:function(){this.timer&&(clearTimeout(this.timer),this.timer=null),this._manualLevel=-1}},{key:"startLoad",value:function(){this.canload=!0;var t=this._levels;t&&t.forEach(function(t){t.loadError=0;var e=t.details;e&&e.live&&(t.details=void 0)}),this.timer&&this.tick()}},{key:"stopLoad",value:function(){this.canload=!1}},{key:"onManifestLoaded",value:function(t){var e,n=[],r=[],i={},o=!1,a=!1,s=this.hls,l=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),c=function(t,e){return MediaSource.isTypeSupported(t+"/mp4;codecs="+e)};if(t.levels.forEach(function(t){t.videoCodec&&(o=!0),l&&t.audioCodec&&t.audioCodec.indexOf("mp4a.40.34")!==-1&&(t.audioCodec=void 0),(t.audioCodec||t.attrs&&t.attrs.AUDIO)&&(a=!0);var e=i[t.bitrate];void 0===e?(i[t.bitrate]=n.length,t.url=[t.url],t.urlId=0,n.push(t)):n[e].url.push(t.url)}),o&&a?n.forEach(function(t){t.videoCodec&&r.push(t)}):r=n,r=r.filter(function(t){var e=t.audioCodec,n=t.videoCodec;return(!e||c("audio",e))&&(!n||c("video",n))}),r.length){e=r[0].bitrate,r.sort(function(t,e){return t.bitrate-e.bitrate}),this._levels=r;for(var d=0;d<r.length;d++)if(r[d].bitrate===e){this._firstLevel=d,f.logger.log("manifest loaded,"+r.length+" level(s) found, first bitrate:"+e);break}s.trigger(u.default.MANIFEST_PARSED,{levels:r,firstLevel:this._firstLevel,stats:t.stats,audio:a,video:o,altAudio:t.audioTracks.length>0})}else s.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:s.url,reason:"no level with compatible codecs found in manifest"})}},{key:"setLevelInternal",value:function(t){var e=this._levels;if(t>=0&&t<e.length){this.timer&&(clearTimeout(this.timer),this.timer=null),this._level!==t&&(f.logger.log("switching to level "+t),this._level=t,this.hls.trigger(u.default.LEVEL_SWITCH,{level:t}));var n=e[t],r=n.details;if(!r||r.live===!0){var i=n.urlId;this.hls.trigger(u.default.LEVEL_LOADING,{url:n.url[i],level:t,id:i})}}else this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.OTHER_ERROR,details:h.ErrorDetails.LEVEL_SWITCH_ERROR,level:t,fatal:!1,reason:"invalid level idx"})}},{key:"onError",value:function(t){if(!t.fatal){var e=t.details,n=this.hls,r=void 0,i=void 0,o=!1,a=n.abrController,s=a.minAutoLevel;switch(e){case h.ErrorDetails.FRAG_LOAD_ERROR:case h.ErrorDetails.FRAG_LOAD_TIMEOUT:case h.ErrorDetails.FRAG_LOOP_LOADING_ERROR:case h.ErrorDetails.KEY_LOAD_ERROR:case h.ErrorDetails.KEY_LOAD_TIMEOUT:r=t.frag.level;break;case h.ErrorDetails.LEVEL_LOAD_ERROR:case h.ErrorDetails.LEVEL_LOAD_TIMEOUT:r=t.context.level,o=!0;break;case h.ErrorDetails.REMUX_ALLOC_ERROR:r=t.level}if(void 0!==r){i=this._levels[r],i.loadError?i.loadError++:i.loadError=1;var l=i.url.length;if(l>1&&i.loadError<l)i.urlId=(i.urlId+1)%l,i.details=void 0,f.logger.warn("level controller,"+e+" for level "+r+": switching to redundant stream id "+i.urlId);else{var c=this._manualLevel===-1&&r;if(c)f.logger.warn("level controller,"+e+": switch-down for next fragment"),a.nextAutoLevel=Math.max(s,r-1);else if(i&&i.details&&i.details.live)f.logger.warn("level controller,"+e+" on live stream, discard"),o&&(this._level=void 0);else if(e===h.ErrorDetails.LEVEL_LOAD_ERROR||e===h.ErrorDetails.LEVEL_LOAD_TIMEOUT){var d=n.media,p=d&&g.default.isBuffered(d,d.currentTime)&&g.default.isBuffered(d,d.currentTime+.5);if(p){var y=n.config.levelLoadingRetryDelay;f.logger.warn("level controller,"+e+", but media buffered, retry in "+y+"ms"),this.timer=setTimeout(this.ontick,y)}else f.logger.error("cannot recover "+e+" error"),this._level=void 0,this.timer&&(clearTimeout(this.timer),this.timer=null),t.fatal=!0,n.trigger(u.default.ERROR,t)}}}}}},{key:"onFragLoaded",value:function(t){var e=t.frag;if(e&&"main"===e.type){var n=this._levels[e.level];n&&(n.loadError=0)}}},{key:"onLevelLoaded",value:function(t){var e=t.level;if(e===this._level){var n=this._levels[e];n.loadError=0;var r=t.details;if(r.live){var i=1e3*(r.averagetargetduration?r.averagetargetduration:r.targetduration),o=n.details;o&&r.endSN===o.endSN&&(i/=2,f.logger.log("same live playlist, reload twice faster")),i-=performance.now()-t.stats.trequest,i=Math.max(1e3,Math.round(i)),f.logger.log("live playlist, reload in "+i+" ms"),this.timer=setTimeout(this.ontick,i)}else this.timer=null}}},{key:"tick",value:function(){var t=this._level;if(void 0!==t&&this.canload){var e=this._levels[t],n=e.urlId;this.hls.trigger(u.default.LEVEL_LOADING,{url:e.url[n],level:t,id:n})}}},{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this._level},set:function(t){var e=this._levels;e&&e.length>t&&(this._level===t&&void 0!==e[t].details||this.setLevelInternal(t))}},{key:"manualLevel",get:function(){return this._manualLevel},set:function(t){this._manualLevel=t,void 0===this._startLevel&&(this._startLevel=t),t!==-1&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){t!==-1&&(t=Math.max(t,this.hls.abrController.minAutoLevel)),this._startLevel=t}},{key:"nextLoadLevel",get:function(){return this._manualLevel!==-1?this._manualLevel:this.hls.abrController.nextAutoLevel},set:function(t){this.level=t,this._manualLevel===-1&&(this.hls.abrController.nextAutoLevel=t)}}]),e}(d.default);n.default=y},{26:26,27:27,28:28,30:30,45:45}],12:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(41),u=r(l),c=t(30),d=r(c),f=t(22),h=r(f),p=t(28),g=r(p),y=t(27),v=r(y),m=t(31),b=r(m),_=t(46),E=r(_),T=t(26),A=t(45),k={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_LEVEL:"WAITING_LEVEL",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR"},w=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,g.default.MEDIA_ATTACHED,g.default.MEDIA_DETACHING,g.default.MANIFEST_LOADING,g.default.MANIFEST_PARSED,g.default.LEVEL_LOADED,g.default.KEY_LOADED,g.default.FRAG_LOADED,g.default.FRAG_LOAD_EMERGENCY_ABORTED,g.default.FRAG_PARSING_INIT_SEGMENT,g.default.FRAG_PARSING_DATA,g.default.FRAG_PARSED,g.default.ERROR,g.default.AUDIO_TRACK_SWITCHING,g.default.AUDIO_TRACK_SWITCHED,g.default.BUFFER_CREATED,g.default.BUFFER_APPENDED,g.default.BUFFER_FLUSHED));return n.config=t.config,n.audioCodecSwap=!1,n.ticks=0,n.ontick=n.tick.bind(n),n}return a(e,t),s(e,[{key:"destroy",value:function(){this.stopLoad(),this.timer&&(clearInterval(this.timer),this.timer=null),v.default.prototype.destroy.call(this),this.state=k.STOPPED}},{key:"startLoad",value:function(t){if(this.levels){var e=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var r=n.startLevel;r===-1&&(r=0,this.bitrateTest=!0),this.level=n.nextLoadLevel=r,this.loadedmetadata=!1}e>0&&t===-1&&(A.logger.log("override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=k.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else A.logger.warn("cannot start loading as manifest not parsed yet"),this.state=k.STOPPED}},{key:"stopLoad",value:function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=k.STOPPED}},{key:"tick",value:function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){switch(this.state){case k.ERROR:break;case k.BUFFER_FLUSHING:this.fragLoadError=0;break;case k.IDLE:if(!this._doTickIdle())return;break;case k.WAITING_LEVEL:var t=this.levels[this.level];t&&t.details&&(this.state=k.IDLE);break;case k.FRAG_LOADING_WAITING_RETRY:var e=performance.now(),n=this.retryDate;(!n||e>=n||this.media&&this.media.seeking)&&(A.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=k.IDLE);break;case k.ERROR:case k.STOPPED:case k.FRAG_LOADING:case k.PARSING:case k.PARSED:case k.ENDED:}this._checkBuffer(),this._checkFragmentChanged()}},{key:"_doTickIdle",value:function(){var t=this.hls,e=t.config,n=this.media;if(void 0!==this.levelLastLoaded&&!n&&(this.startFragRequested||!e.startFragPrefetch))return!0;var r=void 0;r=this.loadedmetadata?n.currentTime:this.nextLoadPosition;var i=t.nextLoadLevel,o=this.levels[i],a=o.bitrate,s=void 0;s=a?Math.max(8*e.maxBufferSize/a,e.maxBufferLength):e.maxBufferLength,s=Math.min(s,e.maxMaxBufferLength);var l=d.default.bufferInfo(this.mediaBuffer?this.mediaBuffer:n,r,e.maxBufferHole),u=l.len;if(u>=s)return!0;A.logger.trace("buffer length of "+u.toFixed(3)+" is below max of "+s.toFixed(3)+". checking for more payload ..."),this.level=t.nextLoadLevel=i;var c=o.details;if("undefined"==typeof c||c.live&&this.levelLastLoaded!==i)return this.state=k.WAITING_LEVEL,!0;var f=this.fragPrevious;if(!c.live&&f&&f.sn===c.endSN&&n.duration-Math.max(l.end,f.start)<=Math.max(.1,f.duration/2)){var h={};return this.altAudio&&(h.type="video"),this.hls.trigger(g.default.BUFFER_EOS,h),this.state=k.ENDED,!0}return this._fetchPayloadOrEos({pos:r,bufferInfo:l,levelDetails:c})}},{key:"_fetchPayloadOrEos",value:function(t){var e=t.pos,n=t.bufferInfo,r=t.levelDetails,i=this.fragPrevious,o=this.level,a=r.fragments,s=a.length;if(0===s)return!1;var l=a[0].start,u=a[s-1].start+a[s-1].duration,c=n.end,d=void 0;if(r.live){var f=this.config.initialLiveManifestSize;if(s<f)return A.logger.warn("Can not start playback of a level, reason: not enough fragments "+s+" < "+f),!1;if(d=this._ensureFragmentAtLivePoint({levelDetails:r,bufferEnd:c,start:l,end:u,fragPrevious:i,fragments:a,fragLen:s}),null===d)return!1}else c<l&&(d=a[0]);return d||(d=this._findFragment({start:l,fragPrevious:i,fragLen:s,fragments:a,bufferEnd:c,end:u,levelDetails:r})),!d||this._loadFragmentOrKey({frag:d,level:o,levelDetails:r,pos:e,bufferEnd:c})}},{key:"_ensureFragmentAtLivePoint",value:function(t){var e=t.levelDetails,n=t.bufferEnd,r=t.start,i=t.end,o=t.fragPrevious,a=t.fragments,s=t.fragLen,l=this.hls.config,u=this.media,c=void 0,d=void 0!==l.liveMaxLatencyDuration?l.liveMaxLatencyDuration:l.liveMaxLatencyDurationCount*e.targetduration;if(n<Math.max(r-l.maxFragLookUpTolerance,i-d)){var f=this.liveSyncPosition=this.computeLivePosition(r,e);A.logger.log("buffer end: "+n.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+f.toFixed(3)),n=f,u&&u.readyState&&u.duration>f&&(u.currentTime=f)}if(e.PTSKnown&&n>i&&u&&u.readyState)return null;if(this.startFragRequested&&!e.PTSKnown){if(o){var h=o.sn+1;h>=e.startSN&&h<=e.endSN&&(c=a[h-e.startSN],A.logger.log("live playlist, switching playlist, load frag with next SN: "+c.sn))}c||(c=a[Math.min(s-1,Math.round(s/2))],A.logger.log("live playlist, switching playlist, unknown, load middle frag : "+c.sn))}return c}},{key:"_findFragment",value:function(t){var e=t.start,n=t.fragPrevious,r=t.fragLen,i=t.fragments,o=t.bufferEnd,a=t.end,s=t.levelDetails,l=this.hls.config,c=void 0,d=void 0,f=l.maxFragLookUpTolerance;if(o<a?(o>a-f&&(f=0),d=u.default.search(i,function(t){return t.start+t.duration-f<=o?1:t.start-f>o&&t.start?-1:0})):d=i[r-1],d&&(c=d,e=d.start,n&&c.level===n.level&&c.sn===n.sn))if(c.sn<s.endSN){var h=n.deltaPTS,p=c.sn-s.startSN;h&&h>l.maxBufferHole&&n.dropped&&p?(c=i[p-1],A.logger.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this"),n.loadCounter--):(c=i[p+1],A.logger.log("SN just loaded, load next one: "+c.sn))}else c=null;return c}},{key:"_loadFragmentOrKey",value:function(t){var e=t.frag,n=t.level,r=t.levelDetails,i=t.pos,o=t.bufferEnd,a=this.hls,s=a.config;if(null==e.decryptdata.uri||null!=e.decryptdata.key){if(A.logger.log("Loading "+e.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+n+", currentTime:"+i.toFixed(3)+",bufferEnd:"+o.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,e.loadCounter){e.loadCounter++;var l=s.fragLoadingLoopThreshold;if(e.loadCounter>l&&Math.abs(this.fragLoadIdx-e.loadIdx)<l)return a.trigger(g.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:e}),!1}else e.loadCounter=1;return e.loadIdx=this.fragLoadIdx,this.fragCurrent=e,this.startFragRequested=!0,this.nextLoadPosition=e.start+e.duration,e.autoLevel=a.autoLevelEnabled,e.bitrateTest=this.bitrateTest,a.trigger(g.default.FRAG_LOADING,{frag:e}),this.demuxer||(this.demuxer=new h.default(a,"main")),this.state=k.FRAG_LOADING,!0}A.logger.log("Loading key for "+e.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+n),this.state=k.KEY_LOADING,a.trigger(g.default.KEY_LOADING,{frag:e})}},{key:"getBufferRange",value:function(t){return u.default.search(this.bufferRange,function(e){return t<e.start?-1:t>e.end?1:0})}},{key:"followingBufferRange",value:function(t){return t?this.getBufferRange(t.end+.5):null;
  10. }},{key:"_checkFragmentChanged",value:function(){var t,e,n=this.media;if(n&&n.readyState&&n.seeking===!1&&(e=n.currentTime,e>n.playbackRate*this.lastCurrentTime&&(this.lastCurrentTime=e),d.default.isBuffered(n,e)?t=this.getBufferRange(e):d.default.isBuffered(n,e+.1)&&(t=this.getBufferRange(e+.1)),t)){var r=t.frag;r!==this.fragPlaying&&(this.fragPlaying=r,this.hls.trigger(g.default.FRAG_CHANGED,{frag:r}))}}},{key:"immediateLevelSwitch",value:function(){if(A.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var t=this.media,e=void 0;t?(e=t.paused,t.pause()):e=!0,this.previouslyPaused=e}var n=this.fragCurrent;n&&n.loader&&n.loader.abort(),this.fragCurrent=null,this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}},{key:"immediateLevelSwitchEnd",value:function(){var t=this.media;t&&t.buffered.length&&(this.immediateSwitch=!1,d.default.isBuffered(t,t.currentTime)&&(t.currentTime-=1e-4),this.previouslyPaused||t.play())}},{key:"nextLevelSwitch",value:function(){var t=this.media;if(t&&t.readyState){var e=void 0,n=void 0,r=void 0;if(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,n=this.getBufferRange(t.currentTime),n&&n.start>1&&this.flushMainBuffer(0,n.start-1),t.paused)e=0;else{var i=this.hls.nextLoadLevel,o=this.levels[i],a=this.fragLastKbps;e=a&&this.fragCurrent?this.fragCurrent.duration*o.bitrate/(1e3*a)+1:0}if(r=this.getBufferRange(t.currentTime+e),r&&(r=this.followingBufferRange(r))){var s=this.fragCurrent;s&&s.loader&&s.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(r.start,Number.POSITIVE_INFINITY)}}}},{key:"flushMainBuffer",value:function(t,e){this.state=k.BUFFER_FLUSHING;var n={startOffset:t,endOffset:e};this.altAudio&&(n.type="video"),this.hls.trigger(g.default.BUFFER_FLUSHING,n)}},{key:"onMediaAttached",value:function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("seeked",this.onvseeked),e.addEventListener("ended",this.onvended);var n=this.config;this.levels&&n.autoStartLoad&&this.hls.startLoad(n.startPosition)}},{key:"onMediaDetaching",value:function(){var t=this.media;t&&t.ended&&(A.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var e=this.levels;e&&e.forEach(function(t){t.details&&t.details.fragments.forEach(function(t){t.loadCounter=void 0})}),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("seeked",this.onvseeked),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()}},{key:"onMediaSeeking",value:function(){var t=this.media,e=t?t.currentTime:void 0,n=this.config;if(A.logger.log("media seeking to "+e.toFixed(3)),this.state===k.FRAG_LOADING){var r=this.mediaBuffer?this.mediaBuffer:t,i=d.default.bufferInfo(r,e,this.config.maxBufferHole),o=this.fragCurrent;if(0===i.len&&o){var a=n.maxFragLookUpTolerance,s=o.start-a,l=o.start+o.duration+a;e<s||e>l?(o.loader&&(A.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),o.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=k.IDLE):A.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else this.state===k.ENDED&&(this.state=k.IDLE);t&&(this.lastCurrentTime=e),this.state!==k.FRAG_LOADING&&void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*n.fragLoadingLoopThreshold),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=e),this.tick()}},{key:"onMediaSeeked",value:function(){A.logger.log("media seeked to "+this.media.currentTime.toFixed(3)),this.tick()}},{key:"onMediaEnded",value:function(){A.logger.log("media ended"),this.startPosition=this.lastCurrentTime=0}},{key:"onManifestLoading",value:function(){A.logger.log("trigger BUFFER_RESET"),this.hls.trigger(g.default.BUFFER_RESET),this.bufferRange=[],this.stalled=!1,this.startPosition=this.lastCurrentTime=0}},{key:"onManifestParsed",value:function(t){var e,n=!1,r=!1;t.levels.forEach(function(t){e=t.audioCodec,e&&(e.indexOf("mp4a.40.2")!==-1&&(n=!0),e.indexOf("mp4a.40.5")!==-1&&(r=!0))}),this.audioCodecSwitch=n&&r,this.audioCodecSwitch&&A.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startLevelLoaded=!1,this.startFragRequested=!1;var i=this.config;i.autoStartLoad&&this.hls.startLoad(i.startPosition)}},{key:"onLevelLoaded",value:function(t){var e=t.details,n=t.level,r=this.levels[n],i=e.totalduration,o=0;if(A.logger.log("level "+n+" loaded ["+e.startSN+","+e.endSN+"],duration:"+i),this.levelLastLoaded=n,e.live){var a=r.details;a&&e.fragments.length>0?(b.default.mergeDetails(a,e),o=e.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(o,a),e.PTSKnown?A.logger.log("live playlist sliding:"+o.toFixed(3)):A.logger.log("live playlist - outdated PTS, unknown sliding")):(e.PTSKnown=!1,A.logger.log("live playlist - first load, unknown sliding"))}else e.PTSKnown=!1;if(r.details=e,this.hls.trigger(g.default.LEVEL_UPDATED,{details:e,level:n}),this.startFragRequested===!1){if(this.startPosition===-1||this.lastCurrentTime===-1){var s=e.startTimeOffset;isNaN(s)?e.live?(this.startPosition=this.computeLivePosition(o,e),A.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0:(s<0&&(A.logger.log("negative start time offset "+s+", count from end of last fragment"),s=o+i+s),A.logger.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s),this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===k.WAITING_LEVEL&&(this.state=k.IDLE),this.tick()}},{key:"onKeyLoaded",value:function(){this.state===k.KEY_LOADING&&(this.state=k.IDLE,this.tick())}},{key:"onFragLoaded",value:function(t){var e=this.fragCurrent,n=t.frag;if(this.state===k.FRAG_LOADING&&e&&"main"===n.type&&n.level===e.level&&n.sn===e.sn){var r=t.stats,i=this.levels[e.level],o=i.details;if(A.logger.log("Loaded "+e.sn+" of ["+o.startSN+" ,"+o.endSN+"],level "+e.level),this.bitrateTest=!1,n.bitrateTest===!0&&this.hls.nextLoadLevel)this.state=k.IDLE,this.startFragRequested=!1,r.tparsed=r.tbuffered=performance.now(),this.hls.trigger(g.default.FRAG_BUFFERED,{stats:r,frag:e,id:"main"}),this.tick();else{this.state=k.PARSING,this.stats=r;var a=o.totalduration,s=isNaN(e.startDTS)?e.start:e.startDTS,l=e.level,u=e.sn,c=this.config.defaultAudioCodec||i.audioCodec;this.audioCodecSwap&&(A.logger.log("swapping playlist audio codec"),void 0===c&&(c=this.lastAudioCodec),c&&(c=c.indexOf("mp4a.40.5")!==-1?"mp4a.40.2":"mp4a.40.5")),this.pendingBuffering=!0,this.appended=!1,A.logger.log("Parsing "+u+" of ["+o.startSN+" ,"+o.endSN+"],level "+l+", cc "+e.cc);var d=this.demuxer;d||(d=this.demuxer=new h.default(this.hls,"main"));var f=this.media,p=f&&f.seeking,y=!p&&(o.PTSKnown||!o.live);d.push(t.payload,c,i.videoCodec,s,e.cc,l,u,a,e.decryptdata,y,null)}}this.fragLoadError=0}},{key:"onFragParsingInitSegment",value:function(t){var e=this.fragCurrent;if(e&&"main"===t.id&&t.sn===e.sn&&t.level===e.level&&this.state===k.PARSING){var n,r,i=t.tracks;if(i.audio&&this.altAudio&&delete i.audio,r=i.audio){var o=this.levels[this.level].audioCodec,a=navigator.userAgent.toLowerCase();o&&this.audioCodecSwap&&(A.logger.log("swapping playlist audio codec"),o=o.indexOf("mp4a.40.5")!==-1?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==r.metadata.channelCount&&a.indexOf("firefox")===-1&&(o="mp4a.40.5"),a.indexOf("android")!==-1&&"audio/mpeg"!==r.container&&(o="mp4a.40.2",A.logger.log("Android: force audio codec to "+o)),r.levelCodec=o,r.id=t.id}if(r=i.video,r&&(r.levelCodec=this.levels[this.level].videoCodec,r.id=t.id),t.unique){var s={codec:"",levelCodec:""};for(n in t.tracks)r=i[n],s.container=r.container,s.codec&&(s.codec+=",",s.levelCodec+=","),r.codec&&(s.codec+=r.codec),r.levelCodec&&(s.levelCodec+=r.levelCodec);i={audiovideo:s}}this.hls.trigger(g.default.BUFFER_CODECS,i);for(n in i){r=i[n],A.logger.log("main track:"+n+",container:"+r.container+",codecs[level/parsed]=["+r.levelCodec+"/"+r.codec+"]");var l=r.initSegment;l&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(g.default.BUFFER_APPENDING,{type:n,data:l,parent:"main",content:"initSegment"}))}this.tick()}}},{key:"onFragParsingData",value:function(t){var e=this,n=this.fragCurrent;if(n&&"main"===t.id&&t.sn===n.sn&&t.level===n.level&&("audio"!==t.type||!this.altAudio)&&this.state===k.PARSING){var r=this.levels[this.level],i=this.fragCurrent;A.logger.log("Parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb+",dropped:"+(t.dropped||0));var o=b.default.updateFragPTSDTS(r.details,i.sn,t.startPTS,t.endPTS,t.startDTS,t.endDTS),a=this.hls;a.trigger(g.default.LEVEL_PTS_UPDATED,{details:r.details,level:this.level,drift:o,type:t.type,start:t.startPTS,end:t.endPTS}),"video"===t.type&&(i.dropped=t.dropped),[t.data1,t.data2].forEach(function(n){n&&(e.appended=!0,e.pendingBuffering=!0,a.trigger(g.default.BUFFER_APPENDING,{type:t.type,data:n,parent:"main",content:"data"}))}),this.tick()}}},{key:"onFragParsed",value:function(t){var e=this.fragCurrent;e&&"main"===t.id&&t.sn===e.sn&&t.level===e.level&&this.state===k.PARSING&&(this.stats.tparsed=performance.now(),this.state=k.PARSED,this._checkAppendedParsed())}},{key:"onAudioTrackSwitching",value:function(t){var e=!!t.url,n=t.id;if(!e){if(this.mediaBuffer!==this.media){A.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var r=this.fragCurrent;r.loader&&(A.logger.log("switching to main audio track, cancel main fragment load"),r.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=k.IDLE}var i=this.hls;i.trigger(g.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),i.trigger(g.default.AUDIO_TRACK_SWITCHED,{id:n}),this.altAudio=!1}}},{key:"onAudioTrackSwitched",value:function(t){var e=t.id,n=!!this.hls.audioTracks[e].url;if(n){var r=this.videoBuffer;r&&this.mediaBuffer!==r&&(A.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=n,this.tick()}},{key:"onBufferCreated",value:function(t){var e=t.tracks,n=void 0,r=void 0,i=!1;for(var o in e){var a=e[o];"main"===a.id?(r=o,n=a,"video"===o&&(this.videoBuffer=e[o].buffer)):i=!0}i&&n?(A.logger.log("alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media}},{key:"onBufferAppended",value:function(t){if("main"===t.parent){var e=this.state;e!==k.PARSING&&e!==k.PARSED||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}}},{key:"_checkAppendedParsed",value:function(){var t=this;if(!(this.state!==k.PARSED||this.appended&&this.pendingBuffering)){var e=this.fragCurrent;e&&!function(){var n=t.mediaBuffer?t.mediaBuffer:t.media;A.logger.log("main buffered : "+E.default.toString(n.buffered));var r=t.bufferRange.filter(function(t){return d.default.isBuffered(n,(t.start+t.end)/2)});r.push({type:e.type,start:e.startPTS,end:e.endPTS,frag:e}),t.bufferRange=r.sort(function(t,e){return t.start-e.start}),t.fragPrevious=e;var i=t.stats;i.tbuffered=performance.now(),t.fragLastKbps=Math.round(8*i.total/(i.tbuffered-i.tfirst)),t.hls.trigger(g.default.FRAG_BUFFERED,{stats:i,frag:e,id:"main"}),t.state=k.IDLE}(),this.tick()}}},{key:"onError",value:function(t){var e=t.frag||this.fragCurrent;if(!e||"main"===e.type){var n=this.media,r=n&&d.default.isBuffered(n,n.currentTime)&&d.default.isBuffered(n,n.currentTime+.5);switch(t.details){case T.ErrorDetails.FRAG_LOAD_ERROR:case T.ErrorDetails.FRAG_LOAD_TIMEOUT:case T.ErrorDetails.KEY_LOAD_ERROR:case T.ErrorDetails.KEY_LOAD_TIMEOUT:if(!t.fatal){var i=this.fragLoadError;i?i++:i=1;var o=this.config;if(i<=o.fragLoadingMaxRetry||r||e.autoLevel&&e.level){this.fragLoadError=i,e.loadCounter=0;var a=Math.min(Math.pow(2,i-1)*o.fragLoadingRetryDelay,o.fragLoadingMaxRetryTimeout);A.logger.warn("mediaController: frag loading failed, retry in "+a+" ms"),this.retryDate=performance.now()+a,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.state=k.FRAG_LOADING_WAITING_RETRY}else A.logger.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.hls.trigger(g.default.ERROR,t),this.state=k.ERROR}break;case T.ErrorDetails.FRAG_LOOP_LOADING_ERROR:t.fatal||(r?(this._reduceMaxBufferLength(e.duration),this.state=k.IDLE):e.autoLevel&&0!==e.level||(t.fatal=!0,this.hls.trigger(g.default.ERROR,t),this.state=k.ERROR));break;case T.ErrorDetails.LEVEL_LOAD_ERROR:case T.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==k.ERROR&&(t.fatal?(this.state=k.ERROR,A.logger.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):this.state===k.WAITING_LEVEL&&(this.state=k.IDLE));break;case T.ErrorDetails.BUFFER_FULL_ERROR:this.state!==k.PARSING&&this.state!==k.PARSED||(r?(this._reduceMaxBufferLength(e.duration),this.state=k.IDLE):(A.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}}},{key:"_reduceMaxBufferLength",value:function(t){var e=this.config;e.maxMaxBufferLength>=t&&(e.maxMaxBufferLength/=2,A.logger.warn("reduce max buffer length to "+e.maxMaxBufferLength+"s and switch to IDLE state"),this.fragLoadIdx+=2*e.fragLoadingLoopThreshold)}},{key:"_checkBuffer",value:function(){var t=this.media;if(t&&t.readyState){var e=t.currentTime,n=this.mediaBuffer?this.mediaBuffer:t,r=n.buffered;if(this.loadedmetadata||!r.length||t.seeking)if(this.immediateSwitch)this.immediateLevelSwitchEnd();else{var i=d.default.bufferInfo(t,e,0),o=!(t.paused||t.ended||0===t.buffered.length),a=.5,s=e>t.playbackRate*this.lastCurrentTime,l=this.config;if(s)this.stalled&&(this.stallReported&&(A.logger.warn("playback not stuck anymore @"+e+", after "+Math.round(performance.now()-this.stalled)+"ms"),this.stallReported=!1),this.stalled=void 0);else if(o){var u=performance.now(),c=this.hls;if(this.stalled){var f=u-this.stalled,h=i.len;if(h<=a&&f>1e3*l.lowBufferWatchdogPeriod){this.stallReported||(this.stallReported=!0,A.logger.warn("playback stalling in low buffer @"+e),c.trigger(g.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:h}));var p=i.nextStart,y=p-e;if(p&&y<l.maxSeekHole&&y>0){var v=this.nudgeRetry++,m=v*l.nudgeOffset;A.logger.log("adjust currentTime from "+t.currentTime+" to next buffered @ "+p+" + nudge "+m);var b=p+m-t.currentTime;t.currentTime=p+m,this.stalled=void 0,c.trigger(g.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,hole:b})}}else if(h>a&&f>1e3*l.highBufferWatchdogPeriod){A.logger.warn("playback stalling in high buffer @"+e),c.trigger(g.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:h}),this.stalled=void 0;var _=this.nudgeRetry++;if(_<l.nudgeMaxRetry){var E=t.currentTime,k=E+(_+1)*l.nudgeOffset;A.logger.log("adjust currentTime from "+E+" to "+k),t.currentTime=k,c.trigger(g.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else c.trigger(g.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})}}else this.stalled=u,this.stallReported=!1}}else{this.loadedmetadata=!0,this.nudgeRetry=0;var w=this.startPosition,S=d.default.isBuffered(n,w);e===w&&S||(A.logger.log("target start position:"+w),S||(w=r.start(0),A.logger.log("target start position not buffered, seek to buffered.start(0) "+w)),A.logger.log("adjust currentTime from "+e+" to "+w),t.currentTime=w)}}}},{key:"onFragLoadEmergencyAborted",value:function(){this.state=k.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()}},{key:"onBufferFlushed",value:function(){var t=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferRange=this.bufferRange.filter(function(e){return d.default.isBuffered(t,(e.start+e.end)/2)}),this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,this.state=k.IDLE,this.fragPrevious=null}},{key:"swapAudioCodec",value:function(){this.audioCodecSwap=!this.audioCodecSwap}},{key:"computeLivePosition",value:function(t,e){var n=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*e.targetduration;return t+Math.max(0,e.totalduration-n)}},{key:"state",set:function(t){if(this.state!==t){var e=this.state;this._state=t,A.logger.log("engine state transition from "+e+" to "+t),this.hls.trigger(g.default.STREAM_STATE_TRANSITION,{previousState:e,nextState:t})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getBufferRange(t.currentTime);if(e)return e.frag.level}return-1}},{key:"nextBufferRange",get:function(){var t=this.media;return t?this.followingBufferRange(this.getBufferRange(t.currentTime)):null}},{key:"nextLevel",get:function(){var t=this.nextBufferRange;return t?t.frag.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(t){this._liveSyncPosition=t}}]),e}(v.default);n.default=w},{22:22,26:26,27:27,28:28,30:30,31:31,41:41,45:45,46:46}],13:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(28),u=r(l),c=t(27),d=r(c),f=t(42),h=r(f),p=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.FRAG_PARSING_USERDATA,u.default.MANIFEST_LOADING,u.default.FRAG_LOADED,u.default.LEVEL_SWITCH));if(n.hls=t,n.config=t.config,n.enabled=!0,n.Cues=t.config.cueHandler,n.config.enableCEA708Captions){var r=n,a=function(t,e){var n=null;try{n=new window.Event("addtrack")}catch(t){n=document.createEvent("Event"),n.initEvent("addtrack",!1,!1)}n.track=t,e.dispatchEvent(n)},s={newCue:function(t,e,n){if(!r.textTrack1){var i=r.getExistingTrack("1");i?(r.textTrack1=i,r.clearCurrentCues(r.textTrack1),a(r.textTrack1,r.media)):(r.textTrack1=r.createTextTrack("captions","English","en"),r.textTrack1.textTrack1=!0)}r.Cues.newCue(r.textTrack1,t,e,n)}},l={newCue:function(t,e,n){if(!r.textTrack2){var i=r.getExistingTrack("2");i?(r.textTrack2=i,r.clearCurrentCues(r.textTrack2),a(r.textTrack2,r.media)):(r.textTrack2=r.createTextTrack("captions","Spanish","es"),r.textTrack2.textTrack2=!0)}r.Cues.newCue(r.textTrack2,t,e,n)}};n.cea608Parser=new h.default(0,s,l)}return n}return a(e,t),s(e,[{key:"clearCurrentCues",value:function(t){if(t&&t.cues)for(;t.cues.length>0;)t.removeCue(t.cues[0])}},{key:"getExistingTrack",value:function(t){var e=this.media;if(e)for(var n=0;n<e.textTracks.length;n++){var r=e.textTracks[n],i="textTrack"+t;if(r[i]===!0)return r}return null}},{key:"createTextTrack",value:function(t,e,n){if(this.media)return this.media.addTextTrack(t,e,n)}},{key:"destroy",value:function(){d.default.prototype.destroy.call(this)}},{key:"onMediaAttaching",value:function(t){this.media=t.media}},{key:"onMediaDetaching",value:function(){this.clearCurrentCues(this.textTrack1),this.clearCurrentCues(this.textTrack2)}},{key:"onManifestLoading",value:function(){this.lastPts=Number.NEGATIVE_INFINITY}},{key:"onLevelSwitch",value:function(){"NONE"===this.hls.currentLevel.closedCaptions?this.enabled=!1:this.enabled=!0}},{key:"onFragLoaded",value:function(t){if("main"===t.frag.type){var e=t.frag.start;e<=this.lastPts&&(this.clearCurrentCues(this.textTrack1),this.clearCurrentCues(this.textTrack2)),this.lastPts=e}}},{key:"onFragParsingUserdata",value:function(t){if(this.enabled&&this.config.enableCEA708Captions)for(var e=0;e<t.samples.length;e++){var n=this.extractCea608Data(t.samples[e].bytes);this.cea608Parser.addData(t.samples[e].pts,n)}}},{key:"extractCea608Data",value:function(t){for(var e,n,r,i,o,a=31&t[0],s=2,l=[],u=0;u<a;u++)e=t[s++],n=127&t[s++],r=127&t[s++],i=0!==(4&e),o=3&e,0===n&&0===r||i&&0===o&&(l.push(n),l.push(r));return l}}]),e}(d.default);n.default=p},{27:27,28:28,42:42}],14:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e,n){r(this,t),this.subtle=e,this.aesIV=n}return i(t,[{key:"decrypt",value:function(t,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,t)}}]),t}();n.default=o},{}],15:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(){r(this,t),this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[],this.subMix[0]=new Uint32Array(256),this.subMix[1]=new Uint32Array(256),this.subMix[2]=new Uint32Array(256),this.subMix[3]=new Uint32Array(256),this.invSubMix=[],this.invSubMix[0]=new Uint32Array(256),this.invSubMix[1]=new Uint32Array(256),this.invSubMix[2]=new Uint32Array(256),this.invSubMix[3]=new Uint32Array(256),this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}return i(t,[{key:"uint8ArrayToUint32Array_",value:function(t){for(var e=new DataView(t),n=new Uint32Array(4),r=0;r<n.length;r++)n[r]=e.getUint32(4*r);return n}},{key:"initTable",value:function(){var t=this.sBox,e=this.invSBox,n=this.subMix[0],r=this.subMix[1],i=this.subMix[2],o=this.subMix[3],a=this.invSubMix[0],s=this.invSubMix[1],l=this.invSubMix[2],u=this.invSubMix[3],c=new Uint32Array(256),d=0,f=0,h=0;for(h=0;h<256;h++)h<128?c[h]=h<<1:c[h]=h<<1^283;for(h=0;h<256;h++){var p=f^f<<1^f<<2^f<<3^f<<4;p=p>>>8^255&p^99,t[d]=p,e[p]=d;var g=c[d],y=c[g],v=c[y],m=257*c[p]^16843008*p;n[d]=m<<24|m>>>8,r[d]=m<<16|m>>>16,i[d]=m<<8|m>>>24,o[d]=m,m=16843009*v^65537*y^257*g^16843008*d,a[p]=m<<24|m>>>8,s[p]=m<<16|m>>>16,l[p]=m<<8|m>>>24,u[p]=m,d?(d=g^c[c[c[v^g]]],f^=c[c[f]]):d=f=1}}},{key:"expandKey",value:function(t){for(var e=this.uint8ArrayToUint32Array_(t),n=!0,r=0;r<e.length&&n;)n=e[r]===this.key[r],r++;if(!n){this.key=e;var i=this.keySize=e.length;if(4!==i&&6!==i&&8!==i)throw new Error("Invalid aes key size="+i);var o=this.ksRows=4*(i+6+1),a=void 0,s=void 0,l=this.keySchedule=new Uint32Array(this.ksRows),u=this.invKeySchedule=new Uint32Array(this.ksRows),c=this.sBox,d=this.rcon,f=this.invSubMix[0],h=this.invSubMix[1],p=this.invSubMix[2],g=this.invSubMix[3],y=void 0,v=void 0;for(a=0;a<o;a++)a<i?y=l[a]=e[a]:(v=y,a%i===0?(v=v<<8|v>>>24,v=c[v>>>24]<<24|c[v>>>16&255]<<16|c[v>>>8&255]<<8|c[255&v],v^=d[a/i|0]<<24):i>6&&a%i===4&&(v=c[v>>>24]<<24|c[v>>>16&255]<<16|c[v>>>8&255]<<8|c[255&v]),l[a]=y=(l[a-i]^v)>>>0);for(s=0;s<o;s++)a=o-s,v=3&s?l[a]:l[a-4],s<4||a<=4?u[s]=v:u[s]=f[c[v>>>24]]^h[c[v>>>16&255]]^p[c[v>>>8&255]]^g[c[255&v]],u[s]=u[s]>>>0}}},{key:"networkToHostOrderSwap",value:function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24}},{key:"decrypt",value:function(t,e,n){for(var r,i,o=this.keySize+6,a=this.invKeySchedule,s=this.invSBox,l=this.invSubMix[0],u=this.invSubMix[1],c=this.invSubMix[2],d=this.invSubMix[3],f=this.uint8ArrayToUint32Array_(n),h=f[0],p=f[1],g=f[2],y=f[3],v=new Int32Array(t),m=new Int32Array(v.length),b=void 0,_=void 0,E=void 0,T=void 0,A=void 0,k=void 0,w=void 0,S=void 0,R=void 0,L=void 0,O=void 0,C=void 0;e<v.length;){for(R=this.networkToHostOrderSwap(v[e]),L=this.networkToHostOrderSwap(v[e+1]),O=this.networkToHostOrderSwap(v[e+2]),C=this.networkToHostOrderSwap(v[e+3]),A=R^a[0],k=C^a[1],w=O^a[2],S=L^a[3],r=4,i=1;i<o;i++)b=l[A>>>24]^u[k>>16&255]^c[w>>8&255]^d[255&S]^a[r],_=l[k>>>24]^u[w>>16&255]^c[S>>8&255]^d[255&A]^a[r+1],E=l[w>>>24]^u[S>>16&255]^c[A>>8&255]^d[255&k]^a[r+2],T=l[S>>>24]^u[A>>16&255]^c[k>>8&255]^d[255&w]^a[r+3],A=b,k=_,w=E,S=T,r+=4;b=s[A>>>24]<<24^s[k>>16&255]<<16^s[w>>8&255]<<8^s[255&S]^a[r],_=s[k>>>24]<<24^s[w>>16&255]<<16^s[S>>8&255]<<8^s[255&A]^a[r+1],E=s[w>>>24]<<24^s[S>>16&255]<<16^s[A>>8&255]<<8^s[255&k]^a[r+2],T=s[S>>>24]<<24^s[A>>16&255]<<16^s[k>>8&255]<<8^s[255&w]^a[r+3],r+=3,m[e]=this.networkToHostOrderSwap(b^h),m[e+1]=this.networkToHostOrderSwap(T^p),m[e+2]=this.networkToHostOrderSwap(E^g),m[e+3]=this.networkToHostOrderSwap(_^y),h=R,p=L,g=O,y=C,e+=4}return m.buffer}},{key:"destroy",value:function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0}}]),t}();n.default=o},{}],16:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(14),s=r(a),l=t(17),u=r(l),c=t(15),d=r(c),f=t(26),h=t(45),p=function(){function t(e,n){i(this,t),this.observer=e,this.config=n;try{var r=crypto?crypto:self.crypto;this.subtle=r.subtle||r.webkitSubtle}catch(t){}this.disableWebCrypto=!this.subtle}return o(t,[{key:"decrypt",value:function(t,e,n,r){var i=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){h.logger.log("JS AES decrypt");var o=this.decryptor;o||(this.decryptor=o=new d.default),o.expandKey(e),r(o.decrypt(t,0,n))}else!function(){h.logger.log("WebCrypto AES decrypt");var o=i.subtle;i.key!==e&&(i.key=e,i.fastAesKey=new u.default(o,e)),i.fastAesKey.expandKey().then(function(e){var i=new s.default(o,n);i.decrypt(t,e).then(function(t){r(t)})}).catch(function(o){i.onWebCryptoError(o,t,e,n,r)})}()}},{key:"onWebCryptoError",value:function(t,e,n,r,i){this.config.enableSoftwareAES?(h.logger.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.decrypt(e,n,r,i)):(h.logger.error("decrypting error : "+t.message),this.observer.trigger(Event.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!0,reason:t.message}))}},{key:"destroy",value:function(){var t=this.decryptor;t&&(t.destroy(),this.decryptor=void 0)}}]),t}();n.default=p},{14:14,15:15,17:17,26:26,45:45}],17:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e,n){r(this,t),this.subtle=e,this.key=n}return i(t,[{key:"expandKey",value:function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])}}]),t}();n.default=o},{}],18:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(19),s=r(a),l=t(45),u=t(24),c=r(u),d=function(){function t(e,n,r,o,a){i(this,t),this.observer=e,this.id=n,this.remuxerClass=r,this.config=o,this.remuxer=new this.remuxerClass(e,n,o,a),this.insertDiscontinuity()}return o(t,[{key:"insertDiscontinuity",value:function(){this._aacTrack={container:"audio/adts",type:"audio",id:-1,sequenceNumber:0,isAAC:!0,samples:[],len:0}}},{key:"push",value:function(t,e,n,r,i,o,a,u,d,f){var h,p,g,y,v,m,b,_,E,T,A=new c.default(t),k=90*A.timeStamp,w=!1;for(i!==this.lastCC?(l.logger.log(this.id+" discontinuity detected"),this.lastCC=i,this.insertDiscontinuity(),this.remuxer.switchLevel(),this.remuxer.insertDiscontinuity()):o!==this.lastLevel?(l.logger.log("audio track switch detected"),this.lastLevel=o,this.remuxer.switchLevel(),this.insertDiscontinuity()):a===this.lastSN+1&&(w=!0),h=this._aacTrack,this.lastSN=a,this.lastLevel=o,m=A.length,E=t.length;m<E-1&&(255!==t[m]||240!==(240&t[m+1]));m++);for(h.audiosamplerate||(p=s.default.getAudioConfig(this.observer,t,m,e),h.config=p.config,h.audiosamplerate=p.samplerate,h.channelCount=p.channelCount,h.codec=p.codec,h.manifestCodec=p.manifestCodec,h.duration=u,l.logger.log("parsed codec:"+h.codec+",rate:"+p.samplerate+",nb channel:"+p.channelCount)),v=0,y=9216e4/h.audiosamplerate;m+5<E&&(b=1&t[m+1]?7:9,g=(3&t[m+3])<<11|t[m+4]<<3|(224&t[m+5])>>>5,g-=b,g>0&&m+b+g<=E);)for(_=k+v*y,T={unit:t.subarray(m+b,m+b+g),pts:_,dts:_},h.samples.push(T),h.len+=g,m+=g+b,v++;m<E-1&&(255!==t[m]||240!==(240&t[m+1]));m++);this.remuxer.remux(o,a,i,this._aacTrack,{samples:[]},{samples:[{pts:k,dts:k,unit:A.payload}]},{samples:[]},r,w,d,f)}},{key:"destroy",value:function(){}}],[{key:"probe",value:function(t){var e,n,r=new c.default(t);if(r.hasTimeStamp)for(e=r.length,n=t.length;e<n-1;e++)if(255===t[e]&&240===(240&t[e+1]))return!0;return!1}}]),t}();n.default=d},{19:19,24:24,45:45}],19:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t(45),a=t(26),s=function(){function t(){r(this,t)}return i(t,null,[{key:"getAudioConfig",value:function(t,e,n,r){var i,s,l,u,c,d=navigator.userAgent.toLowerCase(),f=r,h=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];return i=((192&e[n+2])>>>6)+1,s=(60&e[n+2])>>>2,s>h.length-1?void t.trigger(Event.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+s}):(u=(1&e[n+2])<<2,u|=(192&e[n+3])>>>6,o.logger.log("manifest codec:"+r+",ADTS data:type:"+i+",sampleingIndex:"+s+"["+h[s]+"Hz],channelConfig:"+u),
  11. /firefox|OPR/i.test(d)?s>=6?(i=5,c=new Array(4),l=s-3):(i=2,c=new Array(2),l=s):d.indexOf("android")!==-1?(i=2,c=new Array(2),l=s):(i=5,c=new Array(4),r&&(r.indexOf("mp4a.40.29")!==-1||r.indexOf("mp4a.40.5")!==-1)||!r&&s>=6?l=s-3:((r&&r.indexOf("mp4a.40.2")!==-1&&s>=6&&1===u||!r&&1===u)&&(i=2,c=new Array(2)),l=s)),c[0]=i<<3,c[0]|=(14&s)>>1,c[1]|=(1&s)<<7,c[1]|=u<<3,5===i&&(c[1]|=(14&l)>>1,c[2]=(1&l)<<7,c[2]|=8,c[3]=0),/Vivaldi|OPR/i.test(d)&&(f="mp4a.40.2"),{config:c,samplerate:h[s],channelCount:u,codec:"mp4a.40."+i,manifestCodec:f})}}]),t}();n.default=s},{26:26,45:45}],20:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(28),s=r(a),l=t(26),u=t(16),c=r(u),d=t(18),f=r(d),h=t(25),p=r(h),g=t(38),y=r(g),v=t(39),m=r(v),b=function(){function t(e,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;i(this,t),this.hls=e,this.id=n,this.config=this.hls.config||o,this.typeSupported=r}return o(t,[{key:"destroy",value:function(){var t=this.demuxer;t&&t.destroy()}},{key:"push",value:function(t,e,n,r,i,o,a,l,u,d,f){if(t.byteLength>0&&null!=u&&null!=u.key&&"AES-128"===u.method){null==this.decrypter&&(this.decrypter=new c.default(this.hls,this.config));var h,p=this;try{h=performance.now()}catch(t){h=Date.now()}this.decrypter.decrypt(t,u.key.buffer,u.iv.buffer,function(t){var u;try{u=performance.now()}catch(t){u=Date.now()}p.hls.trigger(s.default.FRAG_DECRYPTED,{level:o,sn:a,stats:{tstart:h,tdecrypt:u}}),p.pushDecrypted(new Uint8Array(t),e,n,r,i,o,a,l,d,f)})}else this.pushDecrypted(new Uint8Array(t),e,n,r,i,o,a,l,d,f)}},{key:"pushDecrypted",value:function(t,e,n,r,i,o,a,u,c,d){var h=this.demuxer;if(!h||i!==this.cc&&!h.probe(t)){var g=this.hls,v=this.id,b=this.config,_=this.typeSupported;if(p.default.probe(t))h=this.typeSupported.mp2t===!0?new p.default(g,v,m.default,b,_):new p.default(g,v,y.default,b,_),h.probe=p.default.probe;else{if(!f.default.probe(t))return void g.trigger(s.default.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,id:v,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});h=new f.default(g,v,y.default,b,_),h.probe=f.default.probe}this.demuxer=h}h.push(t,e,n,r,i,o,a,u,c,d),this.cc=i}}]),t}();n.default=b},{16:16,18:18,25:25,26:26,28:28,38:38,39:39}],21:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(n,"__esModule",{value:!0});var i=t(20),o=r(i),a=t(28),s=r(a),l=t(45),u=t(1),c=r(u),d=function(t){var e=new c.default;e.trigger=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t,t].concat(r))},e.off=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.removeListener.apply(e,[t].concat(r))};var n=function(e,n){t.postMessage({event:e,data:n})};t.addEventListener("message",function(r){var i=r.data;switch(i.cmd){case"init":var a=JSON.parse(i.config);t.demuxer=new o.default(e,i.id,i.typeSupported,a);try{(0,l.enableLogs)(a.debug===!0)}catch(t){console.warn("demuxerWorker: unable to enable logs")}n("init",null);break;case"demux":t.demuxer.push(i.data,i.audioCodec,i.videoCodec,i.timeOffset,i.cc,i.level,i.sn,i.duration,i.decryptdata,i.accurateTimeOffset,i.defaultInitPTS)}}),e.on(s.default.FRAG_DECRYPTED,n),e.on(s.default.FRAG_PARSING_INIT_SEGMENT,n),e.on(s.default.FRAG_PARSED,n),e.on(s.default.ERROR,n),e.on(s.default.FRAG_PARSING_METADATA,n),e.on(s.default.FRAG_PARSING_USERDATA,n),e.on(s.default.INIT_PTS_FOUND,n),e.on(s.default.FRAG_PARSING_DATA,function(e,n){var r=n.data1.buffer,i=n.data2.buffer;delete n.data1,delete n.data2,t.postMessage({event:e,data:n,data1:r,data2:i},[r,i])})};n.default=d},{1:1,20:20,28:28,45:45}],22:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(28),s=r(a),l=t(20),u=r(l),c=t(21),d=r(c),f=t(45),h=t(26),p=function(){function e(n,r){i(this,e),this.hls=n,this.id=r;var o={mp4:MediaSource.isTypeSupported("video/mp4"),mp2t:n.config.enableMP2TPassThrough&&MediaSource.isTypeSupported("video/mp2t"),mpeg:MediaSource.isTypeSupported("audio/mpeg"),mp3:MediaSource.isTypeSupported('audio/mp4; codecs="mp3"')};if(n.config.enableWorker&&"undefined"!=typeof Worker){f.logger.log("demuxing in webworker");var a=void 0;try{var l=t(3);a=this.w=l(d.default),this.onwmsg=this.onWorkerMessage.bind(this),a.addEventListener("message",this.onwmsg),a.onerror=function(t){n.trigger(s.default.ERROR,{type:h.ErrorTypes.OTHER_ERROR,details:h.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:t.message+" ("+t.filename+":"+t.lineno+")"}})},a.postMessage({cmd:"init",typeSupported:o,id:r,config:JSON.stringify(n.config)})}catch(t){f.logger.error("error while initializing DemuxerWorker, fallback on DemuxerInline"),a&&URL.revokeObjectURL(a.objectURL),this.demuxer=new u.default(n,r,o)}}else this.demuxer=new u.default(n,r,o);this.demuxInitialized=!0}return o(e,[{key:"destroy",value:function(){var t=this.w;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.w=null;else{var e=this.demuxer;e&&(e.destroy(),this.demuxer=null)}}},{key:"push",value:function(t,e,n,r,i,o,a,s,l,u,c){var d=this.w;if(d)d.postMessage({cmd:"demux",data:t,audioCodec:e,videoCodec:n,timeOffset:r,cc:i,level:o,sn:a,duration:s,decryptdata:l,accurateTimeOffset:u,defaultInitPTS:c},[t]);else{var f=this.demuxer;f&&f.push(t,e,n,r,i,o,a,s,l,u,c)}}},{key:"onWorkerMessage",value:function(t){var e=t.data,n=this.hls;switch(e.event){case"init":URL.revokeObjectURL(this.w.objectURL);break;case s.default.FRAG_PARSING_DATA:e.data.data1=new Uint8Array(e.data1),e.data.data2=new Uint8Array(e.data2);default:n.trigger(e.event,e.data)}}}]),e}();n.default=p},{20:20,21:21,26:26,28:28,3:3,45:45}],23:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t(45),a=function(){function t(e){r(this,t),this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}return i(t,[{key:"loadWord",value:function(){var t=this.data,e=this.bytesAvailable,n=t.byteLength-e,r=new Uint8Array(4),i=Math.min(4,e);if(0===i)throw new Error("no bytes available");r.set(t.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*i,this.bytesAvailable-=i}},{key:"skipBits",value:function(t){var e;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,e=t>>3,t-=e>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)}},{key:"readBits",value:function(t){var e=Math.min(this.bitsAvailable,t),n=this.word>>>32-e;return t>32&&o.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),e=t-e,e>0&&this.bitsAvailable?n<<e|this.readBits(e):n}},{key:"skipLZ",value:function(){var t;for(t=0;t<this.bitsAvailable;++t)if(0!==(this.word&2147483648>>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"skipEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var t=this.skipLZ();return this.readBits(t+1)-1}},{key:"readEG",value:function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)}},{key:"readBoolean",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"readUShort",value:function(){return this.readBits(16)}},{key:"readUInt",value:function(){return this.readBits(32)}},{key:"skipScalingList",value:function(t){var e,n,r=8,i=8;for(e=0;e<t;e++)0!==i&&(n=this.readEG(),i=(r+n+256)%256),r=0===i?r:i}},{key:"readSPS",value:function(){var t,e,n,r,i,o,a,s,l,u=0,c=0,d=0,f=0,h=this.readUByte.bind(this),p=this.readBits.bind(this),g=this.readUEG.bind(this),y=this.readBoolean.bind(this),v=this.skipBits.bind(this),m=this.skipEG.bind(this),b=this.skipUEG.bind(this),_=this.skipScalingList.bind(this);if(h(),t=h(),e=p(5),v(3),n=h(),b(),100===t||110===t||122===t||244===t||44===t||83===t||86===t||118===t||128===t){var E=g();if(3===E&&v(1),b(),b(),v(1),y())for(s=3!==E?8:12,l=0;l<s;l++)y()&&_(l<6?16:64)}b();var T=g();if(0===T)g();else if(1===T)for(v(1),m(),m(),r=g(),l=0;l<r;l++)m();b(),v(1),i=g(),o=g(),a=p(1),0===a&&v(1),v(1),y()&&(u=g(),c=g(),d=g(),f=g());var A=[1,1];if(y()&&y()){var k=h();switch(k){case 1:A=[1,1];break;case 2:A=[12,11];break;case 3:A=[10,11];break;case 4:A=[16,11];break;case 5:A=[40,33];break;case 6:A=[24,11];break;case 7:A=[20,11];break;case 8:A=[32,11];break;case 9:A=[80,33];break;case 10:A=[18,11];break;case 11:A=[15,11];break;case 12:A=[64,33];break;case 13:A=[160,99];break;case 14:A=[4,3];break;case 15:A=[3,2];break;case 16:A=[2,1];break;case 255:A=[h()<<8|h(),h()<<8|h()]}}return{width:Math.ceil(16*(i+1)-2*u-2*c),height:(2-a)*(o+1)*16-(a?2:4)*(d+f),pixelRatio:A}}},{key:"readSliceType",value:function(){return this.readUByte(),this.readUEG(),this.readUEG()}}]),t}();n.default=a},{45:45}],24:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t(45),a=function(){function t(e){r(this,t),this._hasTimeStamp=!1;for(var n,i,a,s,l,u,c,d,f=0;;)if(c=this.readUTF(e,f,3),f+=3,"ID3"===c)f+=3,n=127&e[f++],i=127&e[f++],a=127&e[f++],s=127&e[f++],l=(n<<21)+(i<<14)+(a<<7)+s,u=f+l,this._parseID3Frames(e,f,u),f=u;else{if("3DI"!==c)return f-=3,d=f,void(d&&(this.hasTimeStamp||o.logger.warn("ID3 tag found, but no timestamp"),this._length=d,this._payload=e.subarray(0,d)));f+=7,o.logger.log("3DI footer found, end: "+f)}}return i(t,[{key:"readUTF",value:function(t,e,n){var r="",i=e,o=e+n;do r+=String.fromCharCode(t[i++]);while(i<o);return r}},{key:"_parseID3Frames",value:function(t,e,n){for(var r,i,a,s,l;e+8<=n;)switch(r=this.readUTF(t,e,4),e+=4,i=t[e++]<<24+t[e++]<<16+t[e++]<<8+t[e++],s=t[e++]<<8+t[e++],a=e,r){case"PRIV":if("com.apple.streaming.transportStreamTimestamp"===this.readUTF(t,e,44)){e+=44,e+=4;var u=1&t[e++];this._hasTimeStamp=!0,l=((t[e++]<<23)+(t[e++]<<15)+(t[e++]<<7)+t[e++])/45,u&&(l+=47721858.84),l=Math.round(l),o.logger.trace("ID3 timestamp found: "+l),this._timeStamp=l}}}},{key:"hasTimeStamp",get:function(){return this._hasTimeStamp}},{key:"timeStamp",get:function(){return this._timeStamp}},{key:"length",get:function(){return this._length}},{key:"payload",get:function(){return this._payload}}]),t}();n.default=a},{45:45}],25:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(19),s=r(a),l=t(28),u=r(l),c=t(23),d=r(c),f=t(45),h=t(26),p=function(){function t(e,n,r,o,a){i(this,t),this.observer=e,this.id=n,this.remuxerClass=r,this.config=o,this.typeSupported=a,this.lastCC=0,this.remuxer=new this.remuxerClass(e,n,o,a)}return o(t,[{key:"switchLevel",value:function(){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack={container:"video/mp2t",type:"video",id:-1,sequenceNumber:0,samples:[],len:0,dropped:0},this._audioTrack={container:"video/mp2t",type:"audio",id:-1,sequenceNumber:0,samples:[],len:0,isAAC:!0},this._id3Track={type:"id3",id:-1,sequenceNumber:0,samples:[],len:0},this._txtTrack={type:"text",id:-1,sequenceNumber:0,samples:[],len:0},this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.remuxer.switchLevel()}},{key:"insertDiscontinuity",value:function(){this.switchLevel(),this.remuxer.insertDiscontinuity()}},{key:"push",value:function(t,e,n,r,i,o,a,s,l,c){var d,p,g,y,v,m,b=t.length,_=this.remuxer.passthrough,E=!1;this.audioCodec=e,this.videoCodec=n,this._duration=s,this.contiguous=!1,this.accurateTimeOffset=l,i!==this.lastCC&&(f.logger.log("discontinuity detected"),this.insertDiscontinuity(),this.lastCC=i),o!==this.lastLevel?(f.logger.log("level switch detected"),this.switchLevel(),this.lastLevel=o):a===this.lastSN+1&&(this.contiguous=!0),this.lastSN=a;var T=this.pmtParsed,A=this._avcTrack,k=this._audioTrack,w=this._id3Track,S=A.id,R=k.id,L=w.id,O=this._pmtId,C=A.pesData,P=k.pesData,D=w.pesData,I=this._parsePAT,x=this._parsePMT,N=this._parsePES,M=this._parseAVCPES.bind(this),F=this._parseAACPES.bind(this),B=this._parseMPEGPES.bind(this),U=this._parseID3PES.bind(this);for(b-=b%188,d=0;d<b;d+=188)if(71===t[d]){if(p=!!(64&t[d+1]),g=((31&t[d+1])<<8)+t[d+2],y=(48&t[d+3])>>4,y>1){if(v=d+5+t[d+4],v===d+188)continue}else v=d+4;switch(g){case S:if(p){if(C&&(m=N(C))&&(M(m,!1),_&&A.codec&&(R===-1||k.codec)))return void this.remux(o,a,i,t,r);C={data:[],size:0}}C&&(C.data.push(t.subarray(v,d+188)),C.size+=d+188-v);break;case R:if(p){if(P&&(m=N(P))&&(k.isAAC?F(m):B(m),_&&k.codec&&(S===-1||A.codec)))return void this.remux(o,a,i,t,r);P={data:[],size:0}}P&&(P.data.push(t.subarray(v,d+188)),P.size+=d+188-v);break;case L:p&&(D&&(m=N(D))&&U(m),D={data:[],size:0}),D&&(D.data.push(t.subarray(v,d+188)),D.size+=d+188-v);break;case 0:p&&(v+=t[v]+1),O=this._pmtId=I(t,v);break;case O:p&&(v+=t[v]+1);var j=x(t,v,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0);S=j.avc,S>0&&(A.id=S),R=j.audio,R>0&&(k.id=R,k.isAAC=j.isAAC),L=j.id3,L>0&&(w.id=L),E&&!T&&(f.logger.log("reparse from beginning"),E=!1,d=-188),T=this.pmtParsed=!0;break;case 17:case 8191:break;default:E=!0}}else this.observer.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,id:this.id,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});C&&(m=N(C))?(M(m,!0),A.pesData=null):A.pesData=C,P&&(m=N(P))?(k.isAAC?F(m):B(m),k.pesData=null):(P&&P.size&&f.logger.log("last AAC PES packet truncated,might overlap between fragments"),k.pesData=P),D&&(m=N(D))?(U(m),w.pesData=null):w.pesData=D,this.remux(o,a,i,null,r,c)}},{key:"remux",value:function(t,e,n,r,i,o){for(var a=this._avcTrack,s=a.samples,l=0,u=0,c=0;c<s.length;c++){for(var d=s[c],f=d.units.units,h=f.length,p=0,g=0;g<h;g++)p+=f[g].data.length;u+=p,l+=h,d.length=p}a.len=u,a.nbNalu=l,this.remuxer.remux(t,e,n,this._audioTrack,this._avcTrack,this._id3Track,this._txtTrack,i,this.contiguous,this.accurateTimeOffset,o,r)}},{key:"destroy",value:function(){this.switchLevel(),this._initPTS=this._initDTS=void 0,this._duration=0}},{key:"_parsePAT",value:function(t,e){return(31&t[e+10])<<8|t[e+11]}},{key:"_parsePMT",value:function(t,e,n){var r,i,o,a,s={audio:-1,avc:-1,id3:-1,isAAC:!0};for(r=(15&t[e+1])<<8|t[e+2],i=e+3+r-4,o=(15&t[e+10])<<8|t[e+11],e+=12+o;e<i;){switch(a=(31&t[e+1])<<8|t[e+2],t[e]){case 15:s.audio===-1&&(s.audio=a);break;case 21:s.id3===-1&&(s.id3=a);break;case 27:s.avc===-1&&(s.avc=a);break;case 3:case 4:n?s.audio===-1&&(s.audio=a,s.isAAC=!1):f.logger.log("MPEG audio found, not supported in this browser for now");break;case 36:f.logger.warn("HEVC stream type found, not supported for now");break;default:f.logger.log("unkown stream type:"+t[e])}e+=((15&t[e+3])<<8|t[e+4])+5}return s}},{key:"_parsePES",value:function(t){var e,n,r,i,o,a,s,l,u,c=0,d=t.data;if(!t||0===t.size)return null;for(;d[0].length<19&&d.length>1;){var h=new Uint8Array(d[0].length+d[1].length);h.set(d[0]),h.set(d[1],d[0].length),d[0]=h,d.splice(1,1)}if(e=d[0],r=(e[0]<<16)+(e[1]<<8)+e[2],1===r){if(i=(e[4]<<8)+e[5],i&&i>t.size-6)return null;n=e[7],192&n&&(s=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,s>4294967295&&(s-=8589934592),64&n?(l=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2,l>4294967295&&(l-=8589934592),s-l>54e5&&(f.logger.warn(Math.round((s-l)/9e4)+"s delta between PTS and DTS, align them"),s=l)):l=s),o=e[8],u=o+9,t.size-=u,a=new Uint8Array(t.size);for(var p=0,g=d.length;p<g;p++){e=d[p];var y=e.byteLength;if(u){if(u>y){u-=y;continue}e=e.subarray(u),y-=u,u=0}a.set(e,c),c+=y}return i&&(i-=o+3),{data:a,pts:s,dts:l,len:i}}return null}},{key:"pushAccesUnit",value:function(t,e){t.units.units.length&&t.frame&&(!this.config.forceKeyFrameOnDiscontinuity||t.key===!0||e.sps&&(e.samples.length||this.contiguous)?e.samples.push(t):e.dropped++),t.debug.length&&f.logger.log(t.pts+"/"+t.dts+":"+t.debug+","+t.units.length)}},{key:"_parseAVCPES",value:function(t,e){var n,r,i,o=this,a=this._avcTrack,s=this._parseAVCNALu(t.data),l=!1,u=this.avcSample;t.data=null,s.forEach(function(e){switch(e.type){case 1:r=!0,l&&u&&(u.debug+="NDR "),u.frame=!0;var s=e.data;if(s.length>4){var c=new d.default(s).readSliceType();2!==c&&4!==c&&7!==c&&9!==c||(u.key=!0)}break;case 5:r=!0,u||(u=o.avcSample=o._createAVCSample(!0,t.pts,t.dts,"")),l&&(u.debug+="IDR "),u.key=!0,u.frame=!0;break;case 6:r=!0,l&&u&&(u.debug+="SEI "),n=new d.default(o.discardEPB(e.data)),n.readUByte();for(var f=0,h=0,p=!1,g=0;!p&&n.bytesAvailable>1;){f=0;do g=n.readUByte(),f+=g;while(255===g);h=0;do g=n.readUByte(),h+=g;while(255===g);if(4===f&&0!==n.bytesAvailable){p=!0;var y=n.readUByte();if(181===y){var v=n.readUShort();if(49===v){var m=n.readUInt();if(1195456820===m){var b=n.readUByte();if(3===b){var _=n.readUByte(),E=n.readUByte(),T=31&_,A=[_,E];for(i=0;i<T;i++)A.push(n.readUByte()),A.push(n.readUByte()),A.push(n.readUByte());o._insertSampleInOrder(o._txtTrack.samples,{type:3,pts:t.pts,bytes:A})}}}}}else if(h<n.bytesAvailable)for(i=0;i<h;i++)n.readUByte()}break;case 7:if(r=!0,l&&u&&(u.debug+="SPS "),!a.sps){n=new d.default(e.data);var k=n.readSPS();a.width=k.width,a.height=k.height,a.pixelRatio=k.pixelRatio,a.sps=[e.data],a.duration=o._duration;var w=e.data.subarray(1,4),S="avc1.";for(i=0;i<3;i++){var R=w[i].toString(16);R.length<2&&(R="0"+R),S+=R}a.codec=S}break;case 8:r=!0,l&&u&&(u.debug+="PPS "),a.pps||(a.pps=[e.data]);break;case 9:r=!1,u&&o.pushAccesUnit(u,a),u=o.avcSample=o._createAVCSample(!1,t.pts,t.dts,l?"AUD ":"");break;case 12:r=!1;break;default:r=!1,u&&(u.debug+="unknown NAL "+e.type+" ")}if(u&&r){var L=u.units;L.units.push(e)}}),e&&u&&(this.pushAccesUnit(u,a),this.avcSample=null)}},{key:"_createAVCSample",value:function(t,e,n,r){return{key:t,pts:e,dts:n,units:{units:[],length:0},debug:r}}},{key:"_insertSampleInOrder",value:function(t,e){var n=t.length;if(n>0){if(e.pts>=t[n-1].pts)t.push(e);else for(var r=n-1;r>=0;r--)if(e.pts<t[r].pts){t.splice(r,0,e);break}}else t.push(e)}},{key:"_getLastNalUnit",value:function(){var t=this.avcSample,e=void 0;if(!t||0===t.units.units.length){var n=this._avcTrack,r=n.samples;t=r[r.length-1]}if(t){var i=t.units.units;e=i[i.length-1]}return e}},{key:"_parseAVCNALu",value:function(t){var e,n,r,i,o,a=0,s=t.byteLength,l=this._avcTrack,u=l.naluState||0,c=u,d=[],f=-1;for(u===-1&&(f=0,o=31&t[0],u=0,a=1);a<s;)if(e=t[a++],u)if(1!==u)if(e)if(1===e){if(f>=0)r={data:t.subarray(f,a-u-1),type:o},d.push(r);else{var h=this._getLastNalUnit();if(h&&(c&&a<=4-c&&h.state&&(h.data=h.data.subarray(0,h.data.byteLength-c)),n=a-u-1,n>0)){var p=new Uint8Array(h.data.byteLength+n);p.set(h.data,0),p.set(t.subarray(0,n),h.data.byteLength),h.data=p}}a<s?(i=31&t[a],f=a,o=i,u=0):u=-1}else u=0;else u=3;else u=e?0:2;else u=e?0:1;if(f>=0&&u>=0&&(r={data:t.subarray(f,s),type:o,state:u},d.push(r)),0===d.length){var g=this._getLastNalUnit();if(g){var y=new Uint8Array(g.data.byteLength+t.byteLength);y.set(g.data,0),y.set(t,g.data.byteLength),g.data=y}}return l.naluState=u,d}},{key:"discardEPB",value:function(t){for(var e,n,r=t.byteLength,i=[],o=1;o<r-2;)0===t[o]&&0===t[o+1]&&3===t[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return t;e=r-i.length,n=new Uint8Array(e);var a=0;for(o=0;o<e;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=t[a];return n}},{key:"_parseAACPES",value:function(t){var e,n,r,i,o,a,l,c,d,p=this._audioTrack,g=t.data,y=t.pts,v=0,m=this.aacOverFlow,b=this.aacLastPTS;if(m){var _=new Uint8Array(m.byteLength+g.byteLength);_.set(m,0),_.set(g,m.byteLength),g=_}for(o=v,c=g.length;o<c-1&&(255!==g[o]||240!==(240&g[o+1]));o++);if(o){var E,T;if(o<c-1?(E="AAC PES did not start with ADTS header,offset:"+o,T=!1):(E="no ADTS header found in AAC PES",T=!0),f.logger.warn("parsing error:"+E),this.observer.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,id:this.id,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:T,reason:E}),T)return}if(!p.audiosamplerate){var A=this.audioCodec;e=s.default.getAudioConfig(this.observer,g,o,A),p.config=e.config,p.audiosamplerate=e.samplerate,p.channelCount=e.channelCount,p.codec=e.codec,p.manifestCodec=e.manifestCodec,p.duration=this._duration,f.logger.log("parsed codec:"+p.codec+",rate:"+e.samplerate+",nb channel:"+e.channelCount)}if(i=0,r=9216e4/p.audiosamplerate,m&&b){var k=b+r;Math.abs(k-y)>1&&(f.logger.log("AAC: align PTS for overlapping frames by "+Math.round((k-y)/90)),y=k)}for(;o+5<c&&(a=1&g[o+1]?7:9,n=(3&g[o+3])<<11|g[o+4]<<3|(224&g[o+5])>>>5,n-=a,n>0&&o+a+n<=c);)for(l=y+i*r,d={unit:g.subarray(o+a,o+a+n),pts:l,dts:l},p.samples.push(d),p.len+=n,o+=n+a,i++;o<c-1&&(255!==g[o]||240!==(240&g[o+1]));o++);m=o<c?g.subarray(o,c):null,this.aacOverFlow=m,this.aacLastPTS=l}},{key:"_parseMPEGPES",value:function(t){for(var e,n=t.data,r=t.pts,i=n.length,o=0,a=0;a<i&&(e=this._parseMpeg(n,a,i,o++,r))>0;)a+=e}},{key:"_onMpegFrame",value:function(t,e,n,r,i,o){var a=1152/n*1e3,s=o+i*a,l=this._audioTrack;l.config=[],l.channelCount=r,l.audiosamplerate=n,l.duration=this._duration,l.samples.push({unit:t,pts:s,dts:s}),l.len+=t.length}},{key:"_onMpegNoise",value:function(t){f.logger.warn("mpeg audio has noise: "+t.length+" bytes")}},{key:"_parseMpeg",value:function(t,e,n,r,i){var o=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],a=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3];if(e+2>n)return-1;if(255===t[e]||224===(224&t[e+1])){if(e+24>n)return-1;var s=t[e+1]>>3&3,l=t[e+1]>>1&3,u=t[e+2]>>4&15,c=t[e+2]>>2&3,d=!!(2&t[e+2]);if(1!==s&&0!==u&&15!==u&&3!==c){var f=3===s?3-l:3===l?3:4,h=1e3*o[14*f+u-1],p=3===s?0:2===s?1:2,g=a[3*p+c],y=d?1:0,v=t[e+3]>>6===3?1:2,m=3===l?(3===s?12:6)*h/g+y<<2:(3===s?144:72)*h/g+y|0;return e+m>n?-1:(this._onMpegFrame&&this._onMpegFrame(t.subarray(e,e+m),h,g,v,r,i),m)}}for(var b=e+2;b<n;){if(255===t[b-1]&&224===(224&t[b]))return this._onMpegNoise&&this._onMpegNoise(t.subarray(e,b-1)),b-e-1;b++}return-1}},{key:"_parseID3PES",value:function(t){this._id3Track.samples.push(t)}}],[{key:"probe",value:function(t){return t.length>=564&&71===t[0]&&71===t[188]&&71===t[376]}}]),t}();n.default=p},{19:19,23:23,26:26,28:28,45:45}],26:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.ErrorTypes={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",MUX_ERROR:"muxError",OTHER_ERROR:"otherError"},n.ErrorDetails={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOOP_LOADING_ERROR:"fragLoopLoadingError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",REMUX_ALLOC_ERROR:"remuxAllocError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",BUFFER_NUDGE_ON_STALL:"bufferNudgeOnStall",INTERNAL_EXCEPTION:"internalException"}},{}],27:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=t(45),l=t(26),u=t(28),c=r(u),d=function(){function t(e){i(this,t),this.hls=e,this.onEvent=this.onEvent.bind(this);for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.handledEvents=r,this.useGenericHandler=!0,this.registerListeners()}return a(t,[{key:"destroy",value:function(){this.unregisterListeners()}},{key:"isEventHandler",value:function(){return"object"===o(this.handledEvents)&&this.handledEvents.length&&"function"==typeof this.onEvent}},{key:"registerListeners",value:function(){this.isEventHandler()&&this.handledEvents.forEach(function(t){if("hlsEventGeneric"===t)throw new Error("Forbidden event name: "+t);this.hls.on(t,this.onEvent)}.bind(this))}},{key:"unregisterListeners",value:function(){this.isEventHandler()&&this.handledEvents.forEach(function(t){this.hls.off(t,this.onEvent)}.bind(this))}},{key:"onEvent",value:function(t,e){this.onEventGeneric(t,e)}},{key:"onEventGeneric",value:function(t,e){var n=function(t,e){var n="on"+t.replace("hls","");if("function"!=typeof this[n])throw new Error("Event "+t+" has no generic handler in this "+this.constructor.name+" class (tried "+n+")");return this[n].bind(this,e)};try{n.call(this,t,e).call()}catch(e){s.logger.error("internal error happened while processing "+t+":"+e.message),this.hls.trigger(c.default.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:t,err:e})}}}]),t}();n.default=d},{26:26,28:28,45:45}],28:[function(t,e,n){"use strict";e.exports={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",LEVEL_SWITCH:"hlsLevelSwitch",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCH:"hlsAudioTrackSwitch",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition"}},{}],29:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(){r(this,t)}return i(t,null,[{key:"getSilentFrame",value:function(t,e){switch(t){case"mp4a.40.2":if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}]),t}();n.default=o},{}],30:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(){r(this,t)}return i(t,null,[{key:"isBuffered",value:function(t,e){if(t)for(var n=t.buffered,r=0;r<n.length;r++)if(e>=n.start(r)&&e<=n.end(r))return!0;return!1}},{key:"bufferInfo",value:function(t,e,n){if(t){var r,i=t.buffered,o=[];for(r=0;r<i.length;r++)o.push({start:i.start(r),end:i.end(r)});return this.bufferedInfo(o,e,n)}return{len:0,start:0,end:0,nextStart:void 0}}},{key:"bufferedInfo",value:function(t,e,n){var r,i,o,a,s,l=[];for(t.sort(function(t,e){var n=t.start-e.start;return n?n:e.end-t.end}),s=0;s<t.length;s++){var u=l.length;if(u){var c=l[u-1].end;t[s].start-c<n?t[s].end>c&&(l[u-1].end=t[s].end):l.push(t[s])}else l.push(t[s])}for(s=0,r=0,i=o=e;s<l.length;s++){var d=l[s].start,f=l[s].end;if(e+n>=d&&e<f)i=d,o=f,r=o-e;else if(e+n<d){
  12. a=d;break}}return{len:r,start:i,end:o,nextStart:a}}}]),t}();n.default=o},{}],31:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t(45),a=function(){function t(){r(this,t)}return i(t,null,[{key:"mergeDetails",value:function(e,n){var r,i=Math.max(e.startSN,n.startSN)-n.startSN,a=Math.min(e.endSN,n.endSN)-n.startSN,s=n.startSN-e.startSN,l=e.fragments,u=n.fragments,c=0;if(a<i)return void(n.PTSKnown=!1);for(var d=i;d<=a;d++){var f=l[s+d],h=u[d];h&&f&&(c=f.cc-h.cc,isNaN(f.startPTS)||(h.start=h.startPTS=f.startPTS,h.endPTS=f.endPTS,h.duration=f.duration,r=h))}if(c)for(o.logger.log("discontinuity sliding from playlist, take drift into account"),d=0;d<u.length;d++)u[d].cc+=c;if(r)t.updateFragPTSDTS(n,r.sn,r.startPTS,r.endPTS,r.startDTS,r.endDTS);else if(s>=0&&s<l.length){var p=l[s].start;for(d=0;d<u.length;d++)u[d].start+=p}n.PTSKnown=e.PTSKnown}},{key:"updateFragPTSDTS",value:function(e,n,r,i,o,a){var s,l,u,c;if(!e||n<e.startSN||n>e.endSN)return 0;if(s=n-e.startSN,l=e.fragments,u=l[s],!isNaN(u.startPTS)){var d=Math.abs(u.startPTS-r);isNaN(u.deltaPTS)?u.deltaPTS=d:u.deltaPTS=Math.max(d,u.deltaPTS),r=Math.min(r,u.startPTS),i=Math.max(i,u.endPTS),o=Math.min(o,u.startDTS),a=Math.max(a,u.endDTS)}var f=r-u.start;for(u.start=u.startPTS=r,u.endPTS=i,u.startDTS=o,u.endDTS=a,u.duration=i-r,c=s;c>0;c--)t.updatePTS(l,c,c-1);for(c=s;c<l.length-1;c++)t.updatePTS(l,c,c+1);return e.PTSKnown=!0,f}},{key:"updatePTS",value:function(t,e,n){var r=t[e],i=t[n],a=i.startPTS;isNaN(a)?n>e?i.start=r.start+r.duration:i.start=r.start-i.duration:n>e?(r.duration=a-r.start,r.duration<0&&o.logger.warn("negative duration computed for frag "+r.sn+",level "+r.level+", there should be some duration drift between playlist and fragment!")):(i.duration=r.start-a,i.duration<0&&o.logger.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!"))}}]),t}();n.default=a},{45:45}],32:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(28),s=r(a),l=t(26),u=t(36),c=r(u),d=t(34),f=r(d),h=t(4),p=r(h),g=t(7),y=r(g),v=t(8),m=r(v),b=t(5),_=r(b),E=t(12),T=r(E),A=t(11),k=r(A),w=t(13),S=r(w),R=t(10),L=r(R),O=t(6),C=r(O),P=t(45),D=t(47),I=r(D),x=t(1),N=r(x),M=t(35),F=r(M),B=t(43),U=r(B),j=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var n=t.DefaultConfig;if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var r in n)r in e||(e[r]=n[r]);if(void 0!==e.liveMaxLatencyDurationCount&&e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==e.liveMaxLatencyDuration&&(e.liveMaxLatencyDuration<=e.liveSyncDuration||void 0===e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');(0,P.enableLogs)(e.debug),this.config=e;var o=this.observer=new N.default;o.trigger=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];o.emit.apply(o,[t,t].concat(n))},o.off=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];o.removeListener.apply(o,[t].concat(n))},this.on=o.on.bind(o),this.off=o.off.bind(o),this.trigger=o.trigger.bind(o),this.playlistLoader=new c.default(this),this.fragmentLoader=new f.default(this),this.levelController=new k.default(this),this.abrController=new e.abrController(this),this.bufferController=new e.bufferController(this),this.capLevelController=new e.capLevelController(this),this.fpsController=new e.fpsController(this),this.streamController=new e.streamController(this),this.audioStreamController=new e.audioStreamController(this),this.timelineController=new e.timelineController(this),this.audioTrackController=new C.default(this),this.keyLoader=new F.default(this)}return o(t,null,[{key:"isSupported",value:function(){return window.MediaSource=window.MediaSource||window.WebKitMediaSource,window.MediaSource&&"function"==typeof window.MediaSource.isTypeSupported&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"version",get:function(){return"0.6.18"}},{key:"Events",get:function(){return s.default}},{key:"ErrorTypes",get:function(){return l.ErrorTypes}},{key:"ErrorDetails",get:function(){return l.ErrorDetails}},{key:"DefaultConfig",get:function(){return t.defaultConfig||(t.defaultConfig={autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,maxMaxBufferLength:600,maxSeekHole:2,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.2,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,fragLoadingLoopThreshold:3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:I.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,fetchSetup:void 0,abrController:p.default,bufferController:y.default,capLevelController:m.default,fpsController:L.default,streamController:T.default,audioStreamController:_.default,timelineController:S.default,cueHandler:U.default,enableCEA708Captions:!0,enableMP2TPassThrough:!1,stretchShortVideoTrack:!1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0}),t.defaultConfig},set:function(e){t.defaultConfig=e}}]),o(t,[{key:"destroy",value:function(){P.logger.log("destroy"),this.trigger(s.default.DESTROYING),this.detachMedia(),this.playlistLoader.destroy(),this.fragmentLoader.destroy(),this.levelController.destroy(),this.abrController.destroy(),this.bufferController.destroy(),this.capLevelController.destroy(),this.fpsController.destroy(),this.streamController.destroy(),this.audioStreamController.destroy(),this.timelineController.destroy(),this.audioTrackController.destroy(),this.keyLoader.destroy(),this.url=null,this.observer.removeAllListeners()}},{key:"attachMedia",value:function(t){P.logger.log("attachMedia"),this.media=t,this.trigger(s.default.MEDIA_ATTACHING,{media:t})}},{key:"detachMedia",value:function(){P.logger.log("detachMedia"),this.trigger(s.default.MEDIA_DETACHING),this.media=null}},{key:"loadSource",value:function(t){P.logger.log("loadSource:"+t),this.url=t,this.trigger(s.default.MANIFEST_LOADING,{url:t})}},{key:"startLoad",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;P.logger.log("startLoad("+t+")"),this.levelController.startLoad(),this.streamController.startLoad(t),this.audioStreamController.startLoad(t)}},{key:"stopLoad",value:function(){P.logger.log("stopLoad"),this.levelController.stopLoad(),this.streamController.stopLoad(),this.audioStreamController.stopLoad()}},{key:"swapAudioCodec",value:function(){P.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}},{key:"recoverMediaError",value:function(){P.logger.log("recoverMediaError");var t=this.media;this.detachMedia(),this.attachMedia(t)}},{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(t){P.logger.log("set currentLevel:"+t),this.loadLevel=t,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(t){P.logger.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){P.logger.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(t){this.levelController.nextLoadLevel=t}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.abrController.minAutoLevel)},set:function(t){P.logger.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){P.logger.log("set startLevel:"+t),this.levelController.startLevel=t}},{key:"autoLevelCapping",get:function(){return this.abrController.autoLevelCapping},set:function(t){P.logger.log("set autoLevelCapping:"+t),this.abrController.autoLevelCapping=t}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"audioTracks",get:function(){return this.audioTrackController.audioTracks}},{key:"audioTrack",get:function(){return this.audioTrackController.audioTrack},set:function(t){this.audioTrackController.audioTrack=t}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}}]),t}();n.default=j},{1:1,10:10,11:11,12:12,13:13,26:26,28:28,34:34,35:35,36:36,4:4,43:43,45:45,47:47,5:5,6:6,7:7,8:8}],33:[function(t,e,n){"use strict";e.exports=t(32).default},{32:32}],34:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(28),u=r(l),c=t(27),d=r(c),f=t(26),h=t(45),p=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,u.default.FRAG_LOADING));return n.loaders={},n}return a(e,t),s(e,[{key:"destroy",value:function(){var t=this.loaders;for(var e in t){var n=t[e];n&&n.destroy()}this.loaders={},d.default.prototype.destroy.call(this)}},{key:"onFragLoading",value:function(t){var e=t.frag,n=e.type,r=this.loaders[n],i=this.hls.config;e.loaded=0,r&&(h.logger.warn("abort previous fragment loader for type:"+n),r.abort()),r=this.loaders[n]=e.loader="undefined"!=typeof i.fLoader?new i.fLoader(i):new i.loader(i);var o=void 0,a=void 0,s=void 0;o={url:e.url,frag:e,responseType:"arraybuffer",progressData:!1};var l=e.byteRangeStartOffset,u=e.byteRangeEndOffset;isNaN(l)||isNaN(u)||(o.rangeStart=l,o.rangeEnd=u),a={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:i.fragLoadingMaxRetryTimeout},s={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},r.load(o,a,s)}},{key:"loadsuccess",value:function(t,e,n){var r=t.data,i=n.frag;i.loader=void 0,this.loaders[i.type]=void 0,this.hls.trigger(u.default.FRAG_LOADED,{payload:r,frag:i,stats:e})}},{key:"loaderror",value:function(t,e){var n=e.loader;n&&n.abort(),this.loaders[e.type]=void 0,this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e.frag,response:t})}},{key:"loadtimeout",value:function(t,e){var n=e.loader;n&&n.abort(),this.loaders[e.type]=void 0,this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e.frag})}},{key:"loadprogress",value:function(t,e,n){var r=e.frag;r.loaded=t.loaded,this.hls.trigger(u.default.FRAG_LOAD_PROGRESS,{frag:r,stats:t})}}]),e}(d.default);n.default=p},{26:26,27:27,28:28,45:45}],35:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(28),u=r(l),c=t(27),d=r(c),f=t(26),h=t(45),p=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,u.default.KEY_LOADING));return n.loaders={},n.decryptkey=null,n.decrypturl=null,n}return a(e,t),s(e,[{key:"destroy",value:function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={},d.default.prototype.destroy.call(this)}},{key:"onKeyLoading",value:function(t){var e=t.frag,n=e.type,r=this.loaders[n],i=e.decryptdata,o=i.uri;if(o!==this.decrypturl||null===this.decryptkey){var a=this.hls.config;r&&(h.logger.warn("abort previous key loader for type:"+n),r.abort()),e.loader=this.loaders[n]=new a.loader(a),this.decrypturl=o,this.decryptkey=null;var s=void 0,l=void 0,c=void 0;s={url:o,frag:e,responseType:"arraybuffer"},l={timeout:a.fragLoadingTimeOut,maxRetry:a.fragLoadingMaxRetry,retryDelay:a.fragLoadingRetryDelay,maxRetryDelay:a.fragLoadingMaxRetryTimeout},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},e.loader.load(s,l,c)}else this.decryptkey&&(i.key=this.decryptkey,this.hls.trigger(u.default.KEY_LOADED,{frag:e}))}},{key:"loadsuccess",value:function(t,e,n){var r=n.frag;this.decryptkey=r.decryptdata.key=new Uint8Array(t.data),r.loader=void 0,this.loaders[r.type]=void 0,this.hls.trigger(u.default.KEY_LOADED,{frag:r})}},{key:"loaderror",value:function(t,e){var n=e.frag,r=n.loader;r&&r.abort(),this.loaders[e.type]=void 0,this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:t})}},{key:"loadtimeout",value:function(t,e){var n=e.frag,r=n.loader;r&&r.abort(),this.loaders[e.type]=void 0,this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})}}]),e}(d.default);n.default=p},{26:26,27:27,28:28,45:45}],36:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(2),u=r(l),c=t(28),d=r(c),f=t(27),h=r(f),p=t(26),g=t(40),y=r(g),v=t(45),m=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,b=/#EXT-X-MEDIA:(.*)/g,_=/#EXTINF:(\d*(?:\.\d+)?)(?:,(.*))?|(?!#)(\S.+)|#EXT-X-BYTERANGE: *(.+)|#EXT-X-PROGRAM-DATE-TIME:(.+)|#.*/g,E=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:(#)(.*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,T=function(){function t(){a(this,t),this.method=null,this.key=null,this.iv=null,this._uri=null}return s(t,[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=u.default.buildAbsoluteURL(this.baseuri,this.reluri)),this._uri}}]),t}(),A=function(){function t(){a(this,t),this._url=null,this._byteRange=null,this._decryptdata=null}return s(t,[{key:"createInitializationVector",value:function(t){for(var e=new Uint8Array(16),n=12;n<16;n++)e[n]=t>>8*(15-n)&255;return e}},{key:"fragmentDecryptdataFromLevelkey",value:function(t,e){var n=t;return t&&t.method&&t.uri&&!t.iv&&(n=new T,n.method=t.method,n.baseuri=t.baseuri,n.reluri=t.reluri,n.iv=this.createInitializationVector(e)),n}},{key:"cloneObj",value:function(t){return JSON.parse(JSON.stringify(t))}},{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=u.default.buildAbsoluteURL(this.baseurl,this.relurl)),this._url},set:function(t){this._url=t}},{key:"programDateTime",get:function(){return!this._programDateTime&&this.rawProgramDateTime&&(this._programDateTime=new Date(Date.parse(this.rawProgramDateTime))),this._programDateTime}},{key:"byteRange",get:function(){if(!this._byteRange){var t=this._byteRange=[];if(this.rawByteRange){var e=this.rawByteRange.split("@",2);if(1===e.length){var n=this.lastByteRangeEndOffset;t[0]=n?n:0}else t[0]=parseInt(e[1]);t[1]=parseInt(e[0])+t[0]}}return this._byteRange}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){return this._decryptdata||(this._decryptdata=this.fragmentDecryptdataFromLevelkey(this.levelkey,this.sn)),this._decryptdata}}]),t}(),k=function(t){function e(t){a(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,d.default.MANIFEST_LOADING,d.default.LEVEL_LOADING,d.default.AUDIO_TRACK_LOADING));return n.loaders={},n}return o(e,t),s(e,[{key:"destroy",value:function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={},h.default.prototype.destroy.call(this)}},{key:"onManifestLoading",value:function(t){this.load(t.url,{type:"manifest"})}},{key:"onLevelLoading",value:function(t){this.load(t.url,{type:"level",level:t.level,id:t.id})}},{key:"onAudioTrackLoading",value:function(t){this.load(t.url,{type:"audioTrack",id:t.id})}},{key:"load",value:function(t,e){var n=this.loaders[e.type];if(n){var r=n.context;if(r&&r.url===t)return void v.logger.trace("playlist request ongoing");v.logger.warn("abort previous loader for type:"+e.type),n.abort()}var i=this.hls.config,o=void 0,a=void 0,s=void 0,l=void 0;"manifest"===e.type?(o=i.manifestLoadingMaxRetry,a=i.manifestLoadingTimeOut,s=i.manifestLoadingRetryDelay,l=i.manifestLoadingMaxRetryTimeout):(o=i.levelLoadingMaxRetry,a=i.levelLoadingTimeOut,s=i.levelLoadingRetryDelay,l=i.levelLoadingMaxRetryTimeout,v.logger.log("loading playlist for "+e.type+" "+(e.level||e.id))),n=this.loaders[e.type]=e.loader="undefined"!=typeof i.pLoader?new i.pLoader(i):new i.loader(i),e.url=t,e.responseType="";var u=void 0,c=void 0;u={timeout:a,maxRetry:o,retryDelay:s,maxRetryDelay:l},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},n.load(e,u,c)}},{key:"resolve",value:function(t,e){return u.default.buildAbsoluteURL(e,t)}},{key:"parseMasterPlaylist",value:function(t,e){var n=[],r=void 0;for(m.lastIndex=0;null!=(r=m.exec(t));){var i={},o=i.attrs=new y.default(r[1]);i.url=this.resolve(r[2],e);var a=o.decimalResolution("RESOLUTION");a&&(i.width=a.width,i.height=a.height),i.bitrate=o.decimalInteger("AVERAGE-BANDWIDTH")||o.decimalInteger("BANDWIDTH"),i.name=o.NAME;var s=o.CODECS;if(s){s=s.split(/[ ,]+/);for(var l=0;l<s.length;l++){var u=s[l];u.indexOf("avc1")!==-1?i.videoCodec=this.avc1toavcoti(u):i.audioCodec=u}}n.push(i)}return n}},{key:"parseMasterPlaylistMedia",value:function(t,e,n){var r=void 0,i=[];for(b.lastIndex=0;null!=(r=b.exec(t));){var o={},a=new y.default(r[1]);a.TYPE===n&&(o.groupId=a["GROUP-ID"],o.name=a.NAME,o.type=n,o.default="YES"===a.DEFAULT,o.autoselect="YES"===a.AUTOSELECT,o.forced="YES"===a.FORCED,a.URI&&(o.url=this.resolve(a.URI,e)),o.lang=a.LANGUAGE,o.name||(o.name=o.lang),i.push(o))}return i}},{key:"avc1toavcoti",value:function(t){var e,n=t.split(".");return n.length>2?(e=n.shift()+".",e+=parseInt(n.shift()).toString(16),e+=("000"+parseInt(n.shift()).toString(16)).substr(-4)):e=t,e}},{key:"parseLevelPlaylist",value:function(t,e,n,r){var i,o,a=0,s=0,l={type:null,version:null,url:e,fragments:[],live:!0,startSN:0},u=new T,c=0,d=null,f=new A;for(f.tagList=[],_.lastIndex=0;null!==(i=_.exec(t));){var h=i[1];if(h){f.duration=parseFloat(h);var p=(" "+i[2]).slice(1);f.title=p?p:null,f.tagList.push(p?["INF",h,p]:["INF",h])}else if(i[3]){if(!isNaN(f.duration)){var g=a++;f.type=r,f.start=s,f.levelkey=u,f.sn=g,f.level=n,f.cc=c,f.baseurl=e,f.relurl=(" "+i[3]).slice(1),l.fragments.push(f),d=f,s+=f.duration,f=new A,f.tagList=[]}}else if(i[4]){if(f.rawByteRange=(" "+i[4]).slice(1),d){var m=d.byteRangeEndOffset;m&&(f.lastByteRangeEndOffset=m)}}else if(i[5])f.rawProgramDateTime=(" "+i[5]).slice(1),f.tagList.push(["PROGRAM-DATE-TIME",f.rawProgramDateTime]);else{for(i=i[0].match(E),o=1;o<i.length&&void 0===i[o];o++);var b=(" "+i[o+1]).slice(1),k=(" "+i[o+2]).slice(1);switch(i[o]){case"#":f.tagList.push(k?[b,k]:[b]);break;case"PLAYLIST-TYPE":l.type=b.toUpperCase();break;case"MEDIA-SEQUENCE":a=l.startSN=parseInt(b);break;case"TARGETDURATION":l.targetduration=parseFloat(b);break;case"VERSION":l.version=parseInt(b);break;case"EXTM3U":break;case"ENDLIST":l.live=!1;break;case"DIS":c++,f.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":c=parseInt(b);break;case"KEY":var w=b,S=new y.default(w),R=S.enumeratedString("METHOD"),L=S.URI,O=S.hexadecimalInteger("IV");R&&(u=new T,L&&"AES-128"===R&&(u.method=R,u.baseuri=e,u.reluri=L,u.key=null,u.iv=O));break;case"START":var C=b,P=new y.default(C),D=P.decimalFloatingPoint("TIME-OFFSET");isNaN(D)||(l.startTimeOffset=D);break;default:v.logger.warn("line parsed but not handled: "+i)}}}return f=d,f&&!f.relurl&&(l.fragments.pop(),s-=f.duration),l.totalduration=s,l.averagetargetduration=s/l.fragments.length,l.endSN=a-1,l}},{key:"loadsuccess",value:function(t,e,n){var r=t.data,i=t.url,o=n.type,a=n.id,s=n.level,l=this.hls;if(this.loaders[o]=void 0,void 0!==i&&0!==i.indexOf("data:")||(i=n.url),e.tload=performance.now(),0===r.indexOf("#EXTM3U"))if(r.indexOf("#EXTINF:")>0){var u="audioTrack"!==o,c=this.parseLevelPlaylist(r,i,(u?s:a)||0,u?"main":"audio");"manifest"===o&&l.trigger(d.default.MANIFEST_LOADED,{levels:[{url:i,details:c}],audioTracks:[],url:i,stats:e}),e.tparsed=performance.now(),c.targetduration?u?l.trigger(d.default.LEVEL_LOADED,{details:c,level:s||0,id:a||0,stats:e}):l.trigger(d.default.AUDIO_TRACK_LOADED,{details:c,id:a,stats:e}):l.trigger(d.default.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:i,reason:"invalid targetduration"})}else{var f=this.parseMasterPlaylist(r,i);if(f.length){var h=this.parseMasterPlaylistMedia(r,i,"AUDIO");if(h.length){var g=!1;h.forEach(function(t){t.url||(g=!0)}),g===!1&&f[0].audioCodec&&!f[0].attrs.AUDIO&&(v.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),h.unshift({type:"main",name:"main"}))}l.trigger(d.default.MANIFEST_LOADED,{levels:f,audioTracks:h,url:i,stats:e})}else l.trigger(d.default.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:i,reason:"no level found in manifest"})}else l.trigger(d.default.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:i,reason:"no EXTM3U delimiter"})}},{key:"loaderror",value:function(t,e){var n,r,i=e.loader;switch(e.type){case"manifest":n=p.ErrorDetails.MANIFEST_LOAD_ERROR,r=!0;break;case"level":n=p.ErrorDetails.LEVEL_LOAD_ERROR,r=!1;break;case"audioTrack":n=p.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,r=!1}i&&(i.abort(),this.loaders[e.type]=void 0),this.hls.trigger(d.default.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:n,fatal:r,url:i.url,loader:i,response:t,context:e})}},{key:"loadtimeout",value:function(t,e){var n,r,i=e.loader;switch(e.type){case"manifest":n=p.ErrorDetails.MANIFEST_LOAD_TIMEOUT,r=!0;break;case"level":n=p.ErrorDetails.LEVEL_LOAD_TIMEOUT,r=!1;break;case"audioTrack":n=p.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT,r=!1}i&&(i.abort(),this.loaders[e.type]=void 0),this.hls.trigger(d.default.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:n,fatal:r,url:i.url,loader:i,context:e})}}]),e}(h.default);n.default=k},{2:2,26:26,27:27,28:28,40:40,45:45}],37:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(){r(this,t)}return i(t,null,[{key:"init",value:function(){t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var e;for(e in t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);t.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),o=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=o,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var a=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,a,l,a,s),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,i))}},{key:"box",value:function(t){for(var e,n=Array.prototype.slice.call(arguments,1),r=8,i=n.length,o=i;i--;)r+=n[i].byteLength;for(e=new Uint8Array(r),e[0]=r>>24&255,e[1]=r>>16&255,e[2]=r>>8&255,e[3]=255&r,e.set(t,4),i=0,r=8;i<o;i++)e.set(n[i],r),r+=n[i].byteLength;return e}},{key:"hdlr",value:function(e){return t.box(t.types.hdlr,t.HDLR_TYPES[e])}},{key:"mdat",value:function(e){return t.box(t.types.mdat,e)}},{key:"mdhd",value:function(e,n){return n*=e,t.box(t.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24,n>>16&255,n>>8&255,255&n,85,196,0,0]))}},{key:"mdia",value:function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))}},{key:"mfhd",value:function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))}},{key:"minf",value:function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))}},{key:"moof",value:function(e,n,r){return t.box(t.types.moof,t.mfhd(e),t.traf(r,n))}},{key:"moov",value:function(e){for(var n=e.length,r=[];n--;)r[n]=t.trak(e[n]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(r).concat(t.mvex(e)))}},{key:"mvex",value:function(e){for(var n=e.length,r=[];n--;)r[n]=t.trex(e[n]);return t.box.apply(null,[t.types.mvex].concat(r))}},{key:"mvhd",value:function(e,n){n*=e;var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24&255,n>>16&255,n>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t.box(t.types.mvhd,r)}},{key:"sdtp",value:function(e){var n,r,i=e.samples||[],o=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,o[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return t.box(t.types.sdtp,o)}},{key:"stbl",value:function(e){return t.box(t.types.stbl,t.stsd(e),t.box(t.types.stts,t.STTS),t.box(t.types.stsc,t.STSC),t.box(t.types.stsz,t.STSZ),t.box(t.types.stco,t.STCO))}},{key:"avc1",value:function(e){var n,r,i,o=[],a=[];for(n=0;n<e.sps.length;n++)r=e.sps[n],i=r.byteLength,o.push(i>>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));for(n=0;n<e.pps.length;n++)r=e.pps[n],i=r.byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));var s=t.box(t.types.avcC,new Uint8Array([1,o[3],o[4],o[5],255,224|e.sps.length].concat(o).concat([e.pps.length]).concat(a))),l=e.width,u=e.height,c=e.pixelRatio[0],d=e.pixelRatio[1];return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,d>>24,d>>16&255,d>>8&255,255&d])))}},{key:"esds",value:function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))}},{key:"mp4a",value:function(e){var n=e.audiosamplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),t.box(t.types.esds,t.esds(e)))}},{key:"mp3",value:function(e){var n=e.audiosamplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))}},{key:"stsd",value:function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e));
  13. }},{key:"tkhd",value:function(e){var n=e.id,r=e.duration*e.timescale,i=e.width,o=e.height;return t.box(t.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,255&i,0,0,o>>8&255,255&o,0,0]))}},{key:"traf",value:function(e,n){var r=t.sdtp(e),i=e.id;return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),t.box(t.types.tfdt,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n])),t.trun(e,r.length+16+16+8+16+8+8),r)}},{key:"trak",value:function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))}},{key:"trex",value:function(e){var n=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}},{key:"trun",value:function(e,n){var r,i,o,a,s,l,u=e.samples||[],c=u.length,d=12+16*c,f=new Uint8Array(d);for(n+=8+d,f.set([0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,255&c,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r<c;r++)i=u[r],o=i.duration,a=i.size,s=i.flags,l=i.cts,f.set([o>>>24&255,o>>>16&255,o>>>8&255,255&o,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return t.box(t.types.trun,f)}},{key:"initSegment",value:function(e){t.types||t.init();var n,r=t.moov(e);return n=new Uint8Array(t.FTYP.byteLength+r.byteLength),n.set(t.FTYP),n.set(r,t.FTYP.byteLength),n}}]),t}();n.default=o},{}],38:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(29),s=r(a),l=t(28),u=r(l),c=t(45),d=t(37),f=r(d),h=t(26),p=function(){function t(e,n,r,o){i(this,t),this.observer=e,this.id=n,this.config=r,this.typeSupported=o,this.ISGenerated=!1,this.PES2MP4SCALEFACTOR=4,this.PES_TIMESCALE=9e4,this.MP4_TIMESCALE=this.PES_TIMESCALE/this.PES2MP4SCALEFACTOR}return o(t,[{key:"destroy",value:function(){}},{key:"insertDiscontinuity",value:function(){this._initPTS=this._initDTS=void 0}},{key:"switchLevel",value:function(){this.ISGenerated=!1}},{key:"remux",value:function(t,e,n,r,i,o,a,s,l,c,d){if(this.level=t,this.sn=e,this.ISGenerated||this.generateIS(r,i,s,n),null!==d&&(this._initPTS=this._initDTS=d),this.ISGenerated)if(r.samples.length){var f=this.remuxAudio(r,s,l,c);if(i.samples.length){var h=void 0;f&&(h=f.endPTS-f.startPTS),this.remuxVideo(i,s,l,h)}}else{var p=void 0;i.samples.length&&(p=this.remuxVideo(i,s,l)),p&&r.codec&&this.remuxEmptyAudio(r,s,l,p)}o.samples.length&&this.remuxID3(o,s),a.samples.length&&this.remuxText(a,s),this.observer.trigger(u.default.FRAG_PARSED,{id:this.id,level:this.level,sn:this.sn})}},{key:"generateIS",value:function(t,e,n,r){var i,o,a=this.observer,s=t.samples,l=e.samples,d=this.PES_TIMESCALE,p=this.typeSupported,g="audio/mp4",y={},v={id:this.id,level:this.level,sn:this.sn,tracks:y,unique:!1},m=void 0===this._initPTS;m&&(i=o=1/0),t.config&&s.length&&(t.timescale=t.audiosamplerate,t.timescale*t.duration>Math.pow(2,32)&&!function(){var e=function t(e,n){return n?t(n,e%n):e};t.timescale=t.audiosamplerate/e(t.audiosamplerate,t.isAAC?1024:1152)}(),c.logger.log("audio mp4 timescale :"+t.timescale),t.isAAC||(p.mpeg?(g="audio/mpeg",t.codec=""):p.mp3&&(t.codec="mp3")),y.audio={container:g,codec:t.codec,initSegment:!t.isAAC&&p.mpeg?new Uint8Array:f.default.initSegment([t]),metadata:{channelCount:t.channelCount}},m&&(i=o=s[0].pts-d*n)),e.sps&&e.pps&&l.length&&(e.timescale=this.MP4_TIMESCALE,y.video={container:"video/mp4",codec:e.codec,initSegment:f.default.initSegment([e]),metadata:{width:e.width,height:e.height}},m&&(i=Math.min(i,l[0].pts-d*n),o=Math.min(o,l[0].dts-d*n),this.observer.trigger(u.default.INIT_PTS_FOUND,{id:this.id,initPTS:i,cc:r}))),Object.keys(y).length?(a.trigger(u.default.FRAG_PARSING_INIT_SEGMENT,v),this.ISGenerated=!0,m&&(this._initPTS=i,this._initDTS=o)):a.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,id:this.id,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})}},{key:"remuxVideo",value:function(t,e,n,r){var i,o,a,s,l,d,p,g,y=8,v=this.PES_TIMESCALE,m=this.PES2MP4SCALEFACTOR,b=t.samples,_=[],E=b.length,T=this._PTSNormalize,A=this._initDTS;b.sort(function(t,e){var n=t.dts-e.dts;return n?n:t.pts-e.pts});var k=b.reduce(function(t,e){return Math.max(Math.min(t,e.pts-e.dts),-18e3)},0);if(k<0){c.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Math.round(k/90)+" ms to overcome this issue");for(var w=0;w<b.length;w++)b[w].dts+=k}var S=void 0;S=n?this.nextAvcDts:e*v;var R=b[0];l=Math.max(T(R.dts-A,S),0),s=Math.max(T(R.pts-A,S),0);var L=Math.round((l-S)/90);n&&L&&(L>1?c.logger.log("AVC:"+L+" ms hole between fragments detected,filling it"):L<-1&&c.logger.log("AVC:"+-L+" ms overlapping between fragments detected"),l=S,b[0].dts=l+A,s=Math.max(s-L,S),b[0].pts=s+A,c.logger.log("Video/PTS/DTS adjusted: "+Math.round(s/90)+"/"+Math.round(l/90)+",delta:"+L+" ms")),d=l,R=b[b.length-1],g=Math.max(T(R.dts-A,S),0),p=Math.max(T(R.pts-A,S),0),p=Math.max(p,g);var O=navigator.vendor,C=navigator.userAgent,P=O&&O.indexOf("Apple")>-1&&C&&!C.match("CriOS");P&&(i=Math.round((g-l)/(m*(b.length-1))));for(var D=0;D<E;D++){var I=b[D];P?I.dts=l+D*m*i:(I.dts=Math.max(T(I.dts-A,S),l),I.dts=Math.round(I.dts/m)*m),I.pts=Math.max(T(I.pts-A,S),I.dts),I.pts=Math.round(I.pts/m)*m}var x=t.len+4*t.nbNalu+8;try{o=new Uint8Array(x)}catch(t){return void this.observer.trigger(u.default.ERROR,{type:h.ErrorTypes.MUX_ERROR,level:this.level,id:this.id,details:h.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:x,reason:"fail allocating video mdat "+x})}var N=new DataView(o.buffer);N.setUint32(0,x),o.set(f.default.types.mdat,4);for(var M=0;M<E;M++){for(var F=b[M],B=F.units.units,U=0,j=void 0,G=0,Y=B.length;G<Y;G++){var V=B[G],K=V.data,$=V.data.byteLength;N.setUint32(y,$),y+=4,o.set(K,y),y+=$,U+=4+$}if(P)j=Math.max(0,i*Math.round((F.pts-F.dts)/(m*i)));else{if(M<E-1)i=b[M+1].dts-F.dts;else{var H=this.config,z=F.dts-b[M>0?M-1:M].dts;if(H.stretchShortVideoTrack){var W=H.maxBufferHole,q=H.maxSeekHole,X=Math.floor(Math.min(W,q)*v),Z=(r?s+r*v:this.nextAudioPts)-F.pts;Z>X?(i=Z-z,i<0&&(i=z),c.logger.log("It is approximately "+Z/90+" ms to the next segment; using duration "+i/90+" ms for the last video frame.")):i=z}else i=z}i/=m,j=Math.round((F.pts-F.dts)/m)}_.push({size:U,duration:i,cts:j,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:F.key?2:1,isNonSync:F.key?0:1}})}this.nextAvcDts=g+i*m;var J=t.dropped;if(t.len=0,t.nbNalu=0,t.dropped=0,_.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var Q=_[0].flags;Q.dependsOn=2,Q.isNonSync=0}t.samples=_,a=f.default.moof(t.sequenceNumber++,l/m,t),t.samples=[];var tt={id:this.id,level:this.level,sn:this.sn,data1:a,data2:o,startPTS:s/v,endPTS:(p+m*i)/v,startDTS:l/v,endDTS:this.nextAvcDts/v,type:"video",nb:_.length,dropped:J};return this.observer.trigger(u.default.FRAG_PARSING_DATA,tt),tt}},{key:"remuxAudio",value:function(t,e,n,r){var i,o,a,l,d,p,g,y,v,m,b,_,E,T,A,k,w=this.PES_TIMESCALE,S=t.timescale,R=w/S,L=t.timescale*(t.isAAC?1024:1152)/t.audiosamplerate,O=L*R,C=this._PTSNormalize,P=this._initDTS,D=!t.isAAC&&this.typeSupported.mpeg,I=D?0:8,x=[],N=[];if(t.samples.sort(function(t,e){return t.pts-e.pts}),N=t.samples,k=this.nextAudioPts,n|=N.length&&k&&(Math.abs(e-k/w)<.1||Math.abs(N[0].pts-k-this._initDTS)<20*O),n||(k=e*w),r&&t.isAAC)for(var M=0,F=k;M<N.length;){var B=N[M],U=C(B.pts-P,k),j=U-F;if(j<=-O)c.logger.warn("Dropping 1 audio frame @ "+Math.round(F/90)/1e3+"s due to "+Math.round(Math.abs(j/90))+" ms overlap."),N.splice(M,1),t.len-=B.unit.length;else if(j>=O){var G=Math.round(j/O);c.logger.warn("Injecting "+G+" audio frame @ "+Math.round(F/90)/1e3+"s due to "+Math.round(j/90)+" ms gap.");for(var Y=0;Y<G;Y++)A=F+P,A=Math.max(A,P),T=s.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),T||(c.logger.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),T=B.unit.subarray()),N.splice(M,0,{unit:T,pts:A,dts:A}),t.len+=T.length,F+=O,M+=1;B.pts=B.dts=F+P,F+=O,M+=1}else Math.abs(j)>.1*O,F+=O,0===M?B.pts=B.dts=P+k:B.pts=B.dts=N[M-1].pts+O,M+=1}for(var V=0,K=N.length;V<K;V++){if(o=N[V],l=o.unit,m=o.pts-P,b=o.dts-P,void 0!==v)_=C(m,v),E=C(b,v),a.duration=Math.round((E-v)/R);else{_=C(m,k),E=C(b,k);var $=Math.round(1e3*(_-k)/w),H=0;if(n&&t.isAAC&&$){if($>0)H=Math.round((_-k)/O),c.logger.log($+" ms hole between AAC samples detected,filling it"),H>0&&(T=s.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),T||(T=l.subarray()),t.len+=H*T.length);else if($<-12){c.logger.log(-$+" ms overlapping between AAC samples detected, drop frame"),t.len-=l.byteLength;continue}_=E=k}if(g=Math.max(0,_),y=Math.max(0,E),!(t.len>0))return;var z=D?t.len:t.len+8;try{d=new Uint8Array(z)}catch(t){return void this.observer.trigger(u.default.ERROR,{type:h.ErrorTypes.MUX_ERROR,level:this.level,id:this.id,details:h.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:z,reason:"fail allocating audio mdat "+z})}D||(i=new DataView(d.buffer),i.setUint32(0,z),d.set(f.default.types.mdat,4));for(var W=0;W<H;W++)A=_-(H-W)*O,T=s.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),T||(c.logger.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),T=l.subarray()),d.set(T,I),I+=T.byteLength,a={size:T.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},x.push(a)}d.set(l,I);var q=l.byteLength;I+=q,a={size:q,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},x.push(a),v=E}var X=0,Z=x.length;if(Z>=2&&(X=x[Z-2].duration,a.duration=X),Z){this.nextAudioPts=_+R*X,t.len=0,t.samples=x,p=D?new Uint8Array:f.default.moof(t.sequenceNumber++,y/R,t),t.samples=[];var J={id:this.id,level:this.level,sn:this.sn,data1:p,data2:d,startPTS:g/w,endPTS:this.nextAudioPts/w,startDTS:y/w,endDTS:(E+R*X)/w,type:"audio",nb:Z};return this.observer.trigger(u.default.FRAG_PARSING_DATA,J),J}return null}},{key:"remuxEmptyAudio",value:function(t,e,n,r){var i=this.PES_TIMESCALE,o=t.timescale?t.timescale:t.audiosamplerate,a=i/o,l=this.nextAudioPts,u=(void 0!==l?l:r.startDTS*i)+this._initDTS,d=r.endDTS*i+this._initDTS,f=1024,h=a*f,p=Math.ceil((d-u)/h),g=s.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(c.logger.warn("remux empty Audio"),!g)return void c.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");for(var y=[],v=0;v<p;v++){var m=u+v*h;y.push({unit:g,pts:m,dts:m}),t.len+=g.length}t.samples=y,this.remuxAudio(t,e,n)}},{key:"remuxID3",value:function(t,e){var n,r=t.samples.length;if(r){for(var i=0;i<r;i++)n=t.samples[i],n.pts=(n.pts-this._initPTS)/this.PES_TIMESCALE,n.dts=(n.dts-this._initDTS)/this.PES_TIMESCALE;this.observer.trigger(u.default.FRAG_PARSING_METADATA,{id:this.id,level:this.level,sn:this.sn,samples:t.samples})}t.samples=[],e=e}},{key:"remuxText",value:function(t,e){t.samples.sort(function(t,e){return t.pts-e.pts});var n,r=t.samples.length;if(r){for(var i=0;i<r;i++)n=t.samples[i],n.pts=(n.pts-this._initPTS)/this.PES_TIMESCALE;this.observer.trigger(u.default.FRAG_PARSING_USERDATA,{id:this.id,level:this.level,sn:this.sn,samples:t.samples})}t.samples=[],e=e}},{key:"_PTSNormalize",value:function(t,e){var n;if(void 0===e)return t;for(n=e<t?-8589934592:8589934592;Math.abs(t-e)>4294967296;)t+=n;return t}},{key:"passthrough",get:function(){return!1}}]),t}();n.default=p},{26:26,28:28,29:29,37:37,45:45}],39:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(28),s=r(a),l=function(){function t(e,n){i(this,t),this.observer=e,this.id=n,this.ISGenerated=!1}return o(t,[{key:"destroy",value:function(){}},{key:"insertDiscontinuity",value:function(){}},{key:"switchLevel",value:function(){this.ISGenerated=!1}},{key:"remux",value:function(t,e,n,r,i,o){var a=this.observer;if(!this.ISGenerated){var l={},u={id:this.id,tracks:l,unique:!0},c=e,d=c.codec;d&&(u.tracks.video={container:c.container,codec:d,metadata:{width:c.width,height:c.height}}),c=t,d=c.codec,d&&(u.tracks.audio={container:c.container,codec:d,metadata:{channelCount:c.channelCount}}),this.ISGenerated=!0,a.trigger(s.default.FRAG_PARSING_INIT_SEGMENT,u)}a.trigger(s.default.FRAG_PARSING_DATA,{id:this.id,data1:o,startPTS:i,startDTS:i,type:"audiovideo",nb:1,dropped:0})}},{key:"passthrough",get:function(){return!0}}]),t}();n.default=l},{28:28}],40:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=/^(\d+)x(\d+)$/,a=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,s=function(){function t(e){r(this,t),"string"==typeof e&&(e=t.parseAttrList(e));for(var n in e)e.hasOwnProperty(n)&&(this[n]=e[n])}return i(t,[{key:"decimalInteger",value:function(t){var e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e}},{key:"hexadecimalInteger",value:function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var n=new Uint8Array(e.length/2),r=0;r<e.length/2;r++)n[r]=parseInt(e.slice(2*r,2*r+2),16);return n}return null}},{key:"hexadecimalIntegerAsNumber",value:function(t){var e=parseInt(this[t],16);return e>Number.MAX_SAFE_INTEGER?1/0:e}},{key:"decimalFloatingPoint",value:function(t){return parseFloat(this[t])}},{key:"enumeratedString",value:function(t){return this[t]}},{key:"decimalResolution",value:function(t){var e=o.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}}}],[{key:"parseAttrList",value:function(t){var e,n={};for(a.lastIndex=0;null!==(e=a.exec(t));){var r=e[2],i='"';0===r.indexOf(i)&&r.lastIndexOf(i)===r.length-1&&(r=r.slice(1,-1)),n[e[1]]=r}return n}}]),t}();n.default=s},{}],41:[function(t,e,n){"use strict";var r={search:function(t,e){for(var n=0,r=t.length-1,i=null,o=null;n<=r;){i=(n+r)/2|0,o=t[i];var a=e(o);if(a>0)n=i+1;else{if(!(a<0))return o;r=i-1}}return null}};e.exports=r},{}],42:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},a=function(t){var e=t;return o.hasOwnProperty(t)&&(e=o[t]),String.fromCharCode(e)},s=15,l=32,u={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},c={17:2,18:4,21:6,22:8,23:10,19:13,20:15},d={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},f={25:2,26:4,29:6,30:8,31:10,27:13,28:15},h=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],p={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(t){this.time=t},log:function(t,e){var n=this.verboseFilter[t];this.verboseLevel>=n&&console.log(this.time+" ["+t+"] "+e)}},g=function(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n].toString(16));return e},y=function(){function t(e,n,i,o,a){r(this,t),this.foreground=e||"white",this.underline=n||!1,this.italics=i||!1,this.background=o||"black",this.flash=a||!1}return i(t,[{key:"reset",value:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}},{key:"setStyles",value:function(t){for(var e=["foreground","underline","italics","background","flash"],n=0;n<e.length;n++){var r=e[n];t.hasOwnProperty(r)&&(this[r]=t[r])}}},{key:"isDefault",value:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash}},{key:"equals",value:function(t){return this.foreground===t.foreground&&this.underline===t.underline&&this.italics===t.italics&&this.background===t.background&&this.flash===t.flash}},{key:"copy",value:function(t){this.foreground=t.foreground,this.underline=t.underline,this.italics=t.italics,this.background=t.background,this.flash=t.flash}},{key:"toString",value:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}]),t}(),v=function(){function t(e,n,i,o,a,s){r(this,t),this.uchar=e||" ",this.penState=new y(n,i,o,a,s)}return i(t,[{key:"reset",value:function(){this.uchar=" ",this.penState.reset()}},{key:"setChar",value:function(t,e){this.uchar=t,this.penState.copy(e)}},{key:"setPenState",value:function(t){this.penState.copy(t)}},{key:"equals",value:function(t){return this.uchar===t.uchar&&this.penState.equals(t.penState)}},{key:"copy",value:function(t){this.uchar=t.uchar,this.penState.copy(t.penState)}},{key:"isEmpty",value:function(){return" "===this.uchar&&this.penState.isDefault()}}]),t}(),m=function(){function t(){r(this,t),this.chars=[];for(var e=0;e<l;e++)this.chars.push(new v);this.pos=0,this.currPenState=new y}return i(t,[{key:"equals",value:function(t){for(var e=!0,n=0;n<l;n++)if(!this.chars[n].equals(t.chars[n])){e=!1;break}return e}},{key:"copy",value:function(t){for(var e=0;e<l;e++)this.chars[e].copy(t.chars[e])}},{key:"isEmpty",value:function(){for(var t=!0,e=0;e<l;e++)if(!this.chars[e].isEmpty()){t=!1;break}return t}},{key:"setCursor",value:function(t){this.pos!==t&&(this.pos=t),this.pos<0?(p.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>l&&(p.log("ERROR","Too large cursor position "+this.pos),this.pos=l)}},{key:"moveCursor",value:function(t){var e=this.pos+t;if(t>1)for(var n=this.pos+1;n<e+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(e)}},{key:"backSpace",value:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}},{key:"insertChar",value:function(t){t>=144&&this.backSpace();var e=a(t);return this.pos>=l?void p.log("ERROR","Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(e,this.currPenState),void this.moveCursor(1))}},{key:"clearFromPos",value:function(t){var e;for(e=t;e<l;e++)this.chars[e].reset()}},{key:"clear",value:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}},{key:"clearToEndOfRow",value:function(){this.clearFromPos(this.pos)}},{key:"getTextString",value:function(){for(var t=[],e=!0,n=0;n<l;n++){var r=this.chars[n].uchar;" "!==r&&(e=!1),t.push(r)}return e?"":t.join("")}},{key:"setPenStyles",value:function(t){this.currPenState.setStyles(t);var e=this.chars[this.pos];e.setPenState(this.currPenState)}}]),t}(),b=function(){function t(){r(this,t),this.rows=[];for(var e=0;e<s;e++)this.rows.push(new m);this.currRow=s-1,this.nrRollUpRows=null,this.reset()}return i(t,[{key:"reset",value:function(){for(var t=0;t<s;t++)this.rows[t].clear();this.currRow=s-1}},{key:"equals",value:function(t){for(var e=!0,n=0;n<s;n++)if(!this.rows[n].equals(t.rows[n])){e=!1;break}return e}},{key:"copy",value:function(t){for(var e=0;e<s;e++)this.rows[e].copy(t.rows[e])}},{key:"isEmpty",value:function(){for(var t=!0,e=0;e<s;e++)if(!this.rows[e].isEmpty()){t=!1;break}return t}},{key:"backSpace",value:function(){var t=this.rows[this.currRow];t.backSpace()}},{key:"clearToEndOfRow",value:function(){var t=this.rows[this.currRow];t.clearToEndOfRow()}},{key:"insertChar",value:function(t){var e=this.rows[this.currRow];e.insertChar(t)}},{key:"setPen",value:function(t){var e=this.rows[this.currRow];e.setPenStyles(t)}},{key:"moveCursor",value:function(t){var e=this.rows[this.currRow];e.moveCursor(t)}},{key:"setCursor",value:function(t){p.log("INFO","setCursor: "+t);var e=this.rows[this.currRow];e.setCursor(t)}},{key:"setPAC",value:function(t,e){p.log("INFO","pacData = "+JSON.stringify(t));var n=t.row-1;if(this.nrRollUpRows&&n<this.nrRollUpRows-1&&(n=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==n){for(var r=0;r<s;r++)this.rows[r].clear();var i=this.currRow+1-this.nrRollUpRows,o=e.rows[i].cueStartTime;if(o&&o<p.time)for(r=0;r<this.nrRollUpRows;r++)this.rows[n-this.nrRollUpRows+r+1].copy(e.rows[i+r])}this.currRow=n;var a=this.rows[this.currRow];if(null!==t.indent){var l=t.indent,u=Math.max(l-1,0);a.setCursor(t.indent),t.color=a.chars[u].penState.foreground}var c={foreground:t.color,underline:t.underline,italics:t.italics,background:"black",flash:!1};this.setPen(c)}},{key:"setBkgData",value:function(t){p.log("INFO","bkgData = "+JSON.stringify(t)),this.backSpace(),this.setPen(t),this.insertChar(32)}},{key:"setRollUpRows",value:function(t){this.nrRollUpRows=t}},{key:"rollUp",value:function(){if(null===this.nrRollUpRows)return void p.log("DEBUG","roll_up but nrRollUpRows not set yet");p.log("TEXT",this.getDisplayText());var t=this.currRow+1-this.nrRollUpRows,e=this.rows.splice(t,1)[0];e.clear(),this.rows.splice(this.currRow,0,e),p.log("INFO","Rolling up")}},{key:"getDisplayText",value:function(t){t=t||!1;for(var e=[],n="",r=-1,i=0;i<s;i++){var o=this.rows[i].getTextString();o&&(r=i+1,t?e.push("Row "+r+": '"+o+"'"):e.push(o.trim()))}return e.length>0&&(n=t?"["+e.join(" | ")+"]":e.join("\n")),n}},{key:"getTextAndFormat",value:function(){return this.rows}}]),t}(),_=function(){function t(e,n){r(this,t),this.chNr=e,this.outputFilter=n,this.mode=null,this.verbose=0,this.displayedMemory=new b,this.nonDisplayedMemory=new b,this.lastOutputScreen=new b,this.currRollUpRow=this.displayedMemory.rows[s-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return i(t,[{key:"reset",value:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[s-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null}},{key:"getHandler",value:function(){return this.outputFilter}},{key:"setHandler",value:function(t){this.outputFilter=t}},{key:"setPAC",value:function(t){this.writeScreen.setPAC(t,this.lastOutputScreen)}},{key:"setBkgData",value:function(t){this.writeScreen.setBkgData(t)}},{key:"setMode",value:function(t){t!==this.mode&&(this.mode=t,p.log("INFO","MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset(),this.lastOutputScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)}},{key:"insertChars",value:function(t){for(var e=0;e<t.length;e++)this.writeScreen.insertChar(t[e]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";p.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(p.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}},{key:"ccRCL",value:function(){p.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}},{key:"ccBS",value:function(){p.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}},{key:"ccAOF",value:function(){}},{key:"ccAON",value:function(){}},{key:"ccDER",value:function(){p.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}},{key:"ccRU",value:function(t){p.log("INFO","RU("+t+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(t)}},{key:"ccFON",value:function(){p.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})}},{key:"ccRDC",value:function(){p.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}},{key:"ccTR",value:function(){p.log("INFO","TR"),this.setMode("MODE_TEXT")}},{key:"ccRTD",value:function(){p.log("INFO","RTD"),this.setMode("MODE_TEXT")}},{key:"ccEDM",value:function(){p.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()}},{key:"ccCR",value:function(){p.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()}},{key:"ccENM",value:function(){p.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}},{key:"ccEOC",value:function(){if(p.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,p.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()}},{key:"ccTO",value:function(t){p.log("INFO","TO("+t+") - Tab Offset"),this.writeScreen.moveCursor(t)}},{key:"ccMIDROW",value:function(t){var e={flash:!1};if(e.underline=t%2===1,e.italics=t>=46,e.italics)e.foreground="white";else{var n=Math.floor(t/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];e.foreground=r[n]}p.log("INFO","MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)}},{key:"outputDataUpdate",value:function(){var t=p.time;null!==t&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(t,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))}},{key:"cueSplitAtTime",value:function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))}}]),t}(),E=function(){function t(e,n,i){r(this,t),this.field=e||1,this.outputs=[n,i],this.channels=[new _(1,n),new _(2,i)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}return i(t,[{key:"getHandler",value:function(t){return this.channels[t].getHandler()}},{key:"setHandler",value:function(t,e){this.channels[t].setHandler(e)}},{key:"addData",value:function(t,e){var n,r,i,o=!1;this.lastTime=t,p.setTime(t);for(var a=0;a<e.length;a+=2)if(r=127&e[a],i=127&e[a+1],0!==r||0!==i){if(p.log("DATA","["+g([e[a],e[a+1]])+"] -> ("+g([r,i])+")"),n=this.parseCmd(r,i),n||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),!n&&(o=this.parseChars(r,i)))if(this.currChNr&&this.currChNr>=0){var s=this.channels[this.currChNr-1];s.insertChars(o)}else p.log("WARNING","No channel found yet. TEXT-MODE?");n?this.dataCounters.cmd+=2:o?this.dataCounters.char+=2:(this.dataCounters.other+=2,p.log("WARNING","Couldn't parse cleaned data "+g([r,i])+" orig: "+g([e[a],e[a+1]])))}else this.dataCounters.padding+=2}},{key:"parseCmd",value:function(t,e){var n=null,r=(20===t||28===t)&&32<=e&&e<=47,i=(23===t||31===t)&&33<=e&&e<=35;if(!r&&!i)return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,p.log("DEBUG","Repeated command ("+g([t,e])+") is dropped"),!0;n=20===t||23===t?1:2;var o=this.channels[n-1];return 20===t||28===t?32===e?o.ccRCL():33===e?o.ccBS():34===e?o.ccAOF():35===e?o.ccAON():36===e?o.ccDER():37===e?o.ccRU(2):38===e?o.ccRU(3):39===e?o.ccRU(4):40===e?o.ccFON():41===e?o.ccRDC():42===e?o.ccTR():43===e?o.ccRTD():44===e?o.ccEDM():45===e?o.ccCR():46===e?o.ccENM():47===e&&o.ccEOC():o.ccTO(e-32),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=n,!0}},{key:"parseMidrow",value:function(t,e){var n=null;if((17===t||25===t)&&32<=e&&e<=47){if(n=17===t?1:2,n!==this.currChNr)return p.log("ERROR","Mismatch channel in midrow parsing"),!1;var r=this.channels[n-1];return r.ccMIDROW(e),p.log("DEBUG","MIDROW ("+g([t,e])+")"),!0}return!1}},{key:"parsePAC",value:function(t,e){var n=null,r=null,i=(17<=t&&t<=23||25<=t&&t<=31)&&64<=e&&e<=127,o=(16===t||24===t)&&64<=e&&e<=95;if(!i&&!o)return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;n=t<=23?1:2,r=64<=e&&e<=95?1===n?u[t]:d[t]:1===n?c[t]:f[t];var a=this.interpretPAC(r,e),s=this.channels[n-1];return s.setPAC(a),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=n,!0}},{key:"interpretPAC",value:function(t,e){var n=e,r={color:null,italics:!1,indent:null,underline:!1,row:t};return n=e>95?e-96:e-64,r.underline=1===(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r}},{key:"parseChars",value:function(t,e){var n=null,r=null,i=null;if(t>=25?(n=2,i=t-8):(n=1,i=t),17<=i&&i<=19){var o=e;o=17===i?e+80:18===i?e+112:e+144,p.log("INFO","Special char '"+a(o)+"' in channel "+n),r=[o]}else 32<=t&&t<=127&&(r=0===e?[t]:[t,e]);if(r){var s=g(r);p.log("DEBUG","Char codes = "+s.join(",")),this.lastCmdA=null,this.lastCmdB=null}return r}},{key:"parseBackgroundAttributes",value:function(t,e){var n,r,i,o,a=(16===t||24===t)&&32<=e&&e<=47,s=(23===t||31===t)&&45<=e&&e<=47;return!(!a&&!s)&&(n={},16===t||24===t?(r=Math.floor((e-32)/2),n.background=h[r],e%2===1&&(n.background=n.background+"_semi")):45===e?n.background="transparent":(n.foreground="black",47===e&&(n.underline=!0)),i=t<24?1:2,o=this.channels[i-1],o.setBkgData(n),this.lastCmdA=null,this.lastCmdB=null,!0)}},{key:"reset",value:function(){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].reset();this.lastCmdA=null,this.lastCmdB=null}},{key:"cueSplitAtTime",value:function(t){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].cueSplitAtTime(t)}}]),t}();n.default=E},{}],43:[function(t,e,n){"use strict";var r={newCue:function(t,e,n,r){for(var i,o,a,s,l,u=window.VTTCue||window.TextTrackCue,c=0;c<r.rows.length;c++)if(i=r.rows[c],a=!0,s=0,l="",!i.isEmpty()){for(var d=0;d<i.chars.length;d++)i.chars[d].uchar.match(/\s/)&&a?s++:(l+=i.chars[d].uchar,a=!1);i.cueStartTime=e,o=new u(e,n,l.trim()),s>=16?s--:s++,navigator.userAgent.match(/Firefox\//)?o.line=c+1:o.line=c>7?c-2:c+1,o.align="left",o.position=Math.max(0,Math.min(100,100*(s/32)+(navigator.userAgent.match(/Firefox\//)?50:0))),t.addCue(o)}}};e.exports=r},{}],44:[function(t,e,n){"use strict";
  14. function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e){r(this,t),this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=0,this.totalWeight_=0}return i(t,[{key:"sample",value:function(t,e){var n=Math.pow(this.alpha_,t);this.estimate_=e*(1-n)+n*this.estimate_,this.totalWeight_+=t}},{key:"getTotalWeight",value:function(){return this.totalWeight_}},{key:"getEstimate",value:function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/t}return this.estimate_}}]),t}();n.default=o},{}],45:[function(t,e,n){"use strict";function r(){}function i(t,e){return e="["+t+"] > "+e}function o(t){var e=self.console[t];return e?function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];r[0]&&(r[0]=i(t,r[0])),e.apply(self.console,r)}:r}function a(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];n.forEach(function(e){u[e]=t[e]?t[e].bind(t):o(e)})}Object.defineProperty(n,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l={trace:r,debug:r,log:r,warn:r,info:r,error:r},u=l;n.enableLogs=function(t){if(t===!0||"object"===("undefined"==typeof t?"undefined":s(t))){a(t,"debug","log","info","warn","error");try{u.log()}catch(t){u=l}}else u=l},n.logger=u},{}],46:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(){r(this,t)}return i(t,null,[{key:"toString",value:function(t){for(var e="",n=t.length,r=0;r<n;r++)e+="["+t.start(r).toFixed(3)+","+t.end(r).toFixed(3)+"]";return e}}]),t}();n.default=o},{}],47:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t(45),a=function(){function t(e){r(this,t),e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}return i(t,[{key:"destroy",value:function(){this.abort(),this.loader=null}},{key:"abort",value:function(){var t=this.loader;t&&4!==t.readyState&&(this.stats.aborted=!0,t.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null}},{key:"load",value:function(t,e,n){this.context=t,this.config=e,this.callbacks=n,this.stats={trequest:performance.now(),retry:0},this.retryDelay=e.retryDelay,this.loadInternal()}},{key:"loadInternal",value:function(){var t,e=this.context;t="undefined"!=typeof XDomainRequest?this.loader=new XDomainRequest:this.loader=new XMLHttpRequest,t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.open("GET",e.url,!0),e.rangeEnd&&t.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),t.responseType=e.responseType;var n=this.stats;n.tfirst=0,n.loaded=0,this.xhrSetup&&this.xhrSetup(t,e.url),this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),t.send()}},{key:"readystatechange",value:function(t){var e=t.currentTarget,n=e.readyState,r=this.stats,i=this.context,a=this.config;if(!r.aborted&&n>=2)if(window.clearTimeout(this.requestTimeout),0===r.tfirst&&(r.tfirst=Math.max(performance.now(),r.trequest)),4===n){var s=e.status;if(s>=200&&s<300){r.tload=Math.max(r.tfirst,performance.now());var l=void 0,u=void 0;"arraybuffer"===i.responseType?(l=e.response,u=l.byteLength):(l=e.responseText,u=l.length),r.loaded=r.total=u;var c={url:e.responseURL,data:l};this.callbacks.onSuccess(c,r,i)}else r.retry>=a.maxRetry||s>=400&&s<499?(o.logger.error(s+" while loading "+i.url),this.callbacks.onError({code:s,text:e.statusText},i)):(o.logger.warn(s+" while loading "+i.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),r.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),a.timeout)}},{key:"loadtimeout",value:function(){o.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context)}},{key:"loadprogress",value:function(t){var e=this.stats;e.loaded=t.loaded,t.lengthComputable&&(e.total=t.total);var n=this.callbacks.onProgress;n&&n(e,this.context,null)}}]),t}();n.default=a},{45:45}]},{},[33])(33)})},function(t,e,n){(function(t,n){function r(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function i(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function o(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function a(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function s(t){return function(e){return t(e)}}function l(t,e){return t.has(e)}function u(t,e){return null==t?void 0:t[e]}function c(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function d(t,e){return function(n){return t(e(n))}}function f(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function h(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function p(){this.__data__=Fe?Fe(null):{},this.size=0}function g(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function y(t){var e=this.__data__;if(Fe){var n=e[t];return n===_t?void 0:n}return be.call(e,t)?e[t]:void 0}function v(t){var e=this.__data__;return Fe?void 0!==e[t]:be.call(e,t)}function m(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Fe&&void 0===e?_t:e,this}function b(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _(){this.__data__=[],this.size=0}function E(t){var e=this.__data__,n=G(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Re.call(e,n,1),--this.size,!0}function T(t){var e=this.__data__,n=G(e,t);return n<0?void 0:e[n][1]}function A(t){return G(this.__data__,t)>-1}function k(t,e){var n=this.__data__,r=G(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function w(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function S(){this.size=0,this.__data__={hash:new h,map:new(Ie||b),string:new h}}function R(t){var e=tt(this,t).delete(t);return this.size-=e?1:0,e}function L(t){return tt(this,t).get(t)}function O(t){return tt(this,t).has(t)}function C(t,e){var n=tt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function P(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new w;++e<n;)this.add(t[e])}function D(t){return this.__data__.set(t,_t),this}function I(t){return this.__data__.has(t)}function x(t){var e=this.__data__=new b(t);this.size=e.size}function N(){this.__data__=new b,this.size=0}function M(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function F(t){return this.__data__.get(t)}function B(t){return this.__data__.has(t)}function U(t,e){var n=this.__data__;if(n instanceof b){var r=n.__data__;if(!Ie||r.length<bt-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new w(r)}return n.set(t,e),this.size=n.size,this}function j(t,e){var n=We(t),r=!n&&ze(t),i=!n&&!r&&qe(t),o=!n&&!r&&!i&&Xe(t),s=n||r||i||o,l=s?a(t.length,String):[],u=l.length;for(var c in t)!e&&!be.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||rt(c,u))||l.push(c);return l}function G(t,e){for(var n=t.length;n--;)if(ut(t[n][0],e))return n;return-1}function Y(t,e,n){var r=e(t);return We(t)?r:i(r,n(t))}function V(t){return null==t?void 0===t?Yt:xt:Le&&Le in Object(t)?nt(t):st(t)}function K(t){return gt(t)&&V(t)==kt}function $(t,e,n,r,i){return t===e||(null==t||null==e||!gt(t)&&!gt(e)?t!==t&&e!==e:H(t,e,n,r,$,i))}function H(t,e,n,r,i,o){var a=We(t),s=We(e),l=a?wt:He(t),u=s?wt:He(e);l=l==kt?Nt:l,u=u==kt?Nt:u;var c=l==Nt,d=u==Nt,f=l==u;if(f&&qe(t)){if(!qe(e))return!1;a=!0,c=!1}if(f&&!c)return o||(o=new x),a||Xe(t)?X(t,e,n,r,i,o):Z(t,e,l,n,r,i,o);if(!(n&Et)){var h=c&&be.call(t,"__wrapped__"),p=d&&be.call(e,"__wrapped__");if(h||p){var g=h?t.value():t,y=p?e.value():e;return o||(o=new x),i(g,y,n,r,o)}}return!!f&&(o||(o=new x),J(t,e,n,r,i,o))}function z(t){if(!pt(t)||ot(t))return!1;var e=ft(t)?Te:ne;return e.test(lt(t))}function W(t){return gt(t)&&ht(t.length)&&!!ie[V(t)]}function q(t){if(!at(t))return Pe(t);var e=[];for(var n in Object(t))be.call(t,n)&&"constructor"!=n&&e.push(n);return e}function X(t,e,n,r,i,a){var s=n&Et,u=t.length,c=e.length;if(u!=c&&!(s&&c>u))return!1;var d=a.get(t);if(d&&a.get(e))return d==e;var f=-1,h=!0,p=n&Tt?new P:void 0;for(a.set(t,e),a.set(e,t);++f<u;){var g=t[f],y=e[f];if(r)var v=s?r(y,g,f,e,t,a):r(g,y,f,t,e,a);if(void 0!==v){if(v)continue;h=!1;break}if(p){if(!o(e,function(t,e){if(!l(p,e)&&(g===t||i(g,t,n,r,a)))return p.push(e)})){h=!1;break}}else if(g!==y&&!i(g,y,n,r,a)){h=!1;break}}return a.delete(t),a.delete(e),h}function Z(t,e,n,r,i,o,a){switch(n){case $t:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Kt:return!(t.byteLength!=e.byteLength||!o(new we(t),new we(e)));case Rt:case Lt:case It:return ut(+t,+e);case Ot:return t.name==e.name&&t.message==e.message;case Bt:case jt:return t==e+"";case Dt:var s=c;case Ut:var l=r&Et;if(s||(s=f),t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;r|=Tt,a.set(t,e);var d=X(s(t),s(e),r,i,o,a);return a.delete(t),d;case Gt:if(Ke)return Ke.call(t)==Ke.call(e)}return!1}function J(t,e,n,r,i,o){var a=n&Et,s=Q(t),l=s.length,u=Q(e),c=u.length;if(l!=c&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in e:be.call(e,f)))return!1}var h=o.get(t);if(h&&o.get(e))return h==e;var p=!0;o.set(t,e),o.set(e,t);for(var g=a;++d<l;){f=s[d];var y=t[f],v=e[f];if(r)var m=a?r(v,y,f,e,t,o):r(y,v,f,t,e,o);if(!(void 0===m?y===v||i(y,v,n,r,o):m)){p=!1;break}g||(g="constructor"==f)}if(p&&!g){var b=t.constructor,_=e.constructor;b!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _)&&(p=!1)}return o.delete(t),o.delete(e),p}function Q(t){return Y(t,yt,$e)}function tt(t,e){var n=t.__data__;return it(e)?n["string"==typeof e?"string":"hash"]:n.map}function et(t,e){var n=u(t,e);return z(n)?n:void 0}function nt(t){var e=be.call(t,Le),n=t[Le];try{t[Le]=void 0;var r=!0}catch(t){}var i=Ee.call(t);return r&&(e?t[Le]=n:delete t[Le]),i}function rt(t,e){return e=null==e?At:e,!!e&&("number"==typeof t||re.test(t))&&t>-1&&t%1==0&&t<e}function it(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function ot(t){return!!_e&&_e in t}function at(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||ye;return t===n}function st(t){return Ee.call(t)}function lt(t){if(null!=t){try{return me.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function ut(t,e){return t===e||t!==t&&e!==e}function ct(t){return null!=t&&ht(t.length)&&!ft(t)}function dt(t,e){return $(t,e)}function ft(t){if(!pt(t))return!1;var e=V(t);return e==Ct||e==Pt||e==St||e==Ft}function ht(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=At}function pt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function gt(t){return null!=t&&"object"==typeof t}function yt(t){return ct(t)?j(t):q(t)}function vt(){return[]}function mt(){return!1}var bt=200,_t="__lodash_hash_undefined__",Et=1,Tt=2,At=9007199254740991,kt="[object Arguments]",wt="[object Array]",St="[object AsyncFunction]",Rt="[object Boolean]",Lt="[object Date]",Ot="[object Error]",Ct="[object Function]",Pt="[object GeneratorFunction]",Dt="[object Map]",It="[object Number]",xt="[object Null]",Nt="[object Object]",Mt="[object Promise]",Ft="[object Proxy]",Bt="[object RegExp]",Ut="[object Set]",jt="[object String]",Gt="[object Symbol]",Yt="[object Undefined]",Vt="[object WeakMap]",Kt="[object ArrayBuffer]",$t="[object DataView]",Ht="[object Float32Array]",zt="[object Float64Array]",Wt="[object Int8Array]",qt="[object Int16Array]",Xt="[object Int32Array]",Zt="[object Uint8Array]",Jt="[object Uint8ClampedArray]",Qt="[object Uint16Array]",te="[object Uint32Array]",ee=/[\\^$.*+?()[\]{}|]/g,ne=/^\[object .+?Constructor\]$/,re=/^(?:0|[1-9]\d*)$/,ie={};ie[Ht]=ie[zt]=ie[Wt]=ie[qt]=ie[Xt]=ie[Zt]=ie[Jt]=ie[Qt]=ie[te]=!0,ie[kt]=ie[wt]=ie[Kt]=ie[Rt]=ie[$t]=ie[Lt]=ie[Ot]=ie[Ct]=ie[Dt]=ie[It]=ie[Nt]=ie[Bt]=ie[Ut]=ie[jt]=ie[Vt]=!1;var oe="object"==typeof t&&t&&t.Object===Object&&t,ae="object"==typeof self&&self&&self.Object===Object&&self,se=oe||ae||Function("return this")(),le="object"==typeof e&&e&&!e.nodeType&&e,ue=le&&"object"==typeof n&&n&&!n.nodeType&&n,ce=ue&&ue.exports===le,de=ce&&oe.process,fe=function(){try{return de&&de.binding&&de.binding("util")}catch(t){}}(),he=fe&&fe.isTypedArray,pe=Array.prototype,ge=Function.prototype,ye=Object.prototype,ve=se["__core-js_shared__"],me=ge.toString,be=ye.hasOwnProperty,_e=function(){var t=/[^.]+$/.exec(ve&&ve.keys&&ve.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ee=ye.toString,Te=RegExp("^"+me.call(be).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ae=ce?se.Buffer:void 0,ke=se.Symbol,we=se.Uint8Array,Se=ye.propertyIsEnumerable,Re=pe.splice,Le=ke?ke.toStringTag:void 0,Oe=Object.getOwnPropertySymbols,Ce=Ae?Ae.isBuffer:void 0,Pe=d(Object.keys,Object),De=et(se,"DataView"),Ie=et(se,"Map"),xe=et(se,"Promise"),Ne=et(se,"Set"),Me=et(se,"WeakMap"),Fe=et(Object,"create"),Be=lt(De),Ue=lt(Ie),je=lt(xe),Ge=lt(Ne),Ye=lt(Me),Ve=ke?ke.prototype:void 0,Ke=Ve?Ve.valueOf:void 0;h.prototype.clear=p,h.prototype.delete=g,h.prototype.get=y,h.prototype.has=v,h.prototype.set=m,b.prototype.clear=_,b.prototype.delete=E,b.prototype.get=T,b.prototype.has=A,b.prototype.set=k,w.prototype.clear=S,w.prototype.delete=R,w.prototype.get=L,w.prototype.has=O,w.prototype.set=C,P.prototype.add=P.prototype.push=D,P.prototype.has=I,x.prototype.clear=N,x.prototype.delete=M,x.prototype.get=F,x.prototype.has=B,x.prototype.set=U;var $e=Oe?function(t){return null==t?[]:(t=Object(t),r(Oe(t),function(e){return Se.call(t,e)}))}:vt,He=V;(De&&He(new De(new ArrayBuffer(1)))!=$t||Ie&&He(new Ie)!=Dt||xe&&He(xe.resolve())!=Mt||Ne&&He(new Ne)!=Ut||Me&&He(new Me)!=Vt)&&(He=function(t){var e=V(t),n=e==Nt?t.constructor:void 0,r=n?lt(n):"";if(r)switch(r){case Be:return $t;case Ue:return Dt;case je:return Mt;case Ge:return Ut;case Ye:return Vt}return e});var ze=K(function(){return arguments}())?K:function(t){return gt(t)&&be.call(t,"callee")&&!Se.call(t,"callee")},We=Array.isArray,qe=Ce||mt,Xe=he?s(he):W;n.exports=dt}).call(e,function(){return this}(),n(33)(t))},function(t,e,n){"use strict";t.exports=n(72)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(31),u=r(l),c=n(15),d=r(c),f=n(73),h=r(f),p=n(5),g=r(p),y=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.el.src=n.src,r}return a(e,t),e.prototype.getPlaybackType=function(){return u.default.NO_OP},s(e,[{key:"name",get:function(){return"html_img"}},{key:"tagName",get:function(){return"img"}},{key:"attributes",get:function(){return{"data-html-img":""}}},{key:"events",get:function(){return{load:"_onLoad",abort:"_onError",error:"_onError"}}}]),e.prototype.render=function(){var t=d.default.getStyleFor(h.default);return this.$el.append(t),this.trigger(g.default.PLAYBACK_READY,this.name),this},e.prototype._onLoad=function(){this.trigger(g.default.PLAYBACK_ENDED,this.name)},e.prototype._onError=function(t){var e="error"===t.type?"load error":"loading aborted";this.trigger(g.default.PLAYBACK_ERROR,{message:e},this.name)},e}(u.default);e.default=y,y.canPlay=function(t){return/\.(png|jpg|jpeg|gif|bmp|tiff|pgm|pnm|webp)(|\?.*)$/i.test(t)},t.exports=e.default},function(t,e,n){e=t.exports=n(25)(),e.push([t.id,"[data-html-img] {\n max-width: 100%;\n max-height: 100%; }\n",""])},function(t,e,n){"use strict";t.exports=n(75)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(2),u=n(31),c=r(u),d=n(17),f=r(d),h=n(15),p=r(h),g=n(5),y=r(g),v=n(76),m=r(v),b=n(77),_=r(b),E=function(t){function e(){i(this,e);for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var s=o(this,t.call.apply(t,[this].concat(r)));return s._noiseFrameNum=-1,s._started=!1,s}return a(e,t),s(e,[{key:"name",get:function(){return"no_op"}},{key:"template",get:function(){return(0,f.default)(_.default)}},{key:"attributes",get:function(){return{"data-no-op":""}}}]),e.prototype.render=function(){var t=p.default.getStyleFor(m.default),e=this.options.playbackNotSupportedMessage||this.i18n.t("playback_not_supported");this.$el.html(this.template({message:e})),this.$el.append(t),this.trigger(y.default.PLAYBACK_READY,this.name);var n=!(!this.options.poster||!this.options.poster.showForNoOp);return!this.options.autoPlay&&n||this.play(),this},e.prototype.play=function(){this._started||(this._started=!0,this.trigger(y.default.PLAYBACK_PLAY),this._animate())},e.prototype._noise=function(){if(this._noiseFrameNum=(this._noiseFrameNum+1)%5,!this._noiseFrameNum){var t=this.context.createImageData(this.context.canvas.width,this.context.canvas.height),e=void 0;try{e=new Uint32Array(t.data.buffer)}catch(i){e=new Uint32Array(this.context.canvas.width*this.context.canvas.height*4);for(var n=t.data,r=0;r<n.length;r++)e[r]=n[r]}for(var i=e.length,o=6*Math.random()+4,a=0,s=0,l=0;l<i;){if(a<0){a=o*Math.random();var u=Math.pow(Math.random(),.4);s=255*u<<24}a-=1,e[l++]=s}this.context.putImageData(t,0,0)}},e.prototype._loop=function(){var t=this;this._stop||(this._noise(),this._animationHandle=(0,l.requestAnimationFrame)(function(){return t._loop()}))},e.prototype.destroy=function(){this._animationHandle&&((0,l.cancelAnimationFrame)(this._animationHandle),this._stop=!0)},e.prototype._animate=function(){this.canvas=this.$el.find("canvas[data-no-op-canvas]")[0],this.context=this.canvas.getContext("2d"),this._loop()},e}(c.default);e.default=E,E.canPlay=function(t){return!0},t.exports=e.default},function(t,e,n){e=t.exports=n(25)(),e.push([t.id,"[data-no-op] {\n position: absolute;\n height: 100%;\n width: 100%;\n text-align: center; }\n\n[data-no-op] p[data-no-op-msg] {\n position: absolute;\n text-align: center;\n font-size: 25px;\n left: 0;\n right: 0;\n color: white;\n padding: 10px;\n /* center vertically */\n top: 50%;\n -webkit-transform: translateY(-50%);\n -moz-transform: translateY(-50%);\n -ms-transform: translateY(-50%);\n -o-transform: translateY(-50%);\n transform: translateY(-50%);\n max-height: 100%;\n overflow: auto; }\n\n[data-no-op] canvas[data-no-op-canvas] {\n background-color: #777;\n height: 100%;\n width: 100%; }\n",""])},function(t,e){t.exports="<canvas data-no-op-canvas></canvas>\n<p data-no-op-msg><%=message%><p>\n"},function(t,e,n){"use strict";t.exports=n(79)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(80),u=r(l),c=n(5),d=r(c),f=n(15),h=r(f),p=n(17),g=r(p),y=n(81),v=r(y),m=n(82),b=r(m),_=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.template=(0,g.default)(v.default),r.showTimeout=null,r.listenTo(r.container,d.default.CONTAINER_STATE_BUFFERING,r.onBuffering),r.listenTo(r.container,d.default.CONTAINER_STATE_BUFFERFULL,r.onBufferFull),r.listenTo(r.container,d.default.CONTAINER_STOP,r.onStop),r.listenTo(r.container,d.default.CONTAINER_ENDED,r.onStop),r.listenTo(r.container,d.default.CONTAINER_ERROR,r.onStop),r.render(),r}return a(e,t),s(e,[{key:"name",get:function(){return"spinner"}},{key:"attributes",get:function(){return{"data-spinner":"",class:"spinner-three-bounce"}}}]),e.prototype.onBuffering=function(){this.show()},e.prototype.onBufferFull=function(){this.hide()},e.prototype.onStop=function(){this.hide()},e.prototype.show=function(){var t=this;null===this.showTimeout&&(this.showTimeout=setTimeout(function(){return t.$el.show()},300))},e.prototype.hide=function(){null!==this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null),this.$el.hide()},e.prototype.render=function(){this.$el.html(this.template());var t=h.default.getStyleFor(b.default);return this.container.$el.append(t),this.container.$el.append(this.$el),this.$el.hide(),this.container.buffering&&this.onBuffering(),this},e}(u.default);e.default=_,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=n(2),l=n(18),u=r(l),c=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n.options));return r.container=n,r.enabled=!0,r.bindEvents(),r}return a(e,t),e.prototype.enable=function(){this.enabled||(this.bindEvents(),this.$el.show(),this.enabled=!0)},e.prototype.disable=function(){this.stopListening(),this.$el.hide(),this.enabled=!1},e.prototype.bindEvents=function(){},e.prototype.destroy=function(){this.remove()},e}(u.default);e.default=c,c.extend=function(t){return(0,s.extend)(c,t)},c.type="container",t.exports=e.default},function(t,e){t.exports="<div data-bounce1></div><div data-bounce2></div><div data-bounce3></div>\n"},function(t,e,n){e=t.exports=n(25)(),e.push([t.id,".spinner-three-bounce[data-spinner] {\n position: absolute;\n margin: 0 auto;\n width: 70px;\n text-align: center;\n z-index: 999;\n left: 0;\n right: 0;\n margin-left: auto;\n margin-right: auto;\n /* center vertically */\n top: 50%;\n -webkit-transform: translateY(-50%);\n -moz-transform: translateY(-50%);\n -ms-transform: translateY(-50%);\n -o-transform: translateY(-50%);\n transform: translateY(-50%); }\n .spinner-three-bounce[data-spinner] > div {\n width: 18px;\n height: 18px;\n background-color: #FFFFFF;\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: bouncedelay 1.4s infinite ease-in-out;\n -moz-animation: bouncedelay 1.4s infinite ease-in-out;\n animation: bouncedelay 1.4s infinite ease-in-out;\n /* Prevent first frame from flickering when animation starts */\n -webkit-animation-fill-mode: both;\n -moz-animation-fill-mode: both;\n animation-fill-mode: both; }\n .spinner-three-bounce[data-spinner] [data-bounce1] {\n -webkit-animation-delay: -0.32s;\n -moz-animation-delay: -0.32s;\n animation-delay: -0.32s; }\n .spinner-three-bounce[data-spinner] [data-bounce2] {\n -webkit-animation-delay: -0.16s;\n -moz-animation-delay: -0.16s;\n animation-delay: -0.16s; }\n\n@-webkit-keyframes bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0); }\n 40% {\n -webkit-transform: scale(1); } }\n\n@-moz-keyframes bouncedelay {\n 0%, 80%, 100% {\n -moz-transform: scale(0); }\n 40% {\n -moz-transform: scale(1); } }\n\n@keyframes bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n -moz-transform: scale(0);\n -ms-transform: scale(0);\n -o-transform: scale(0);\n transform: scale(0); }\n 40% {\n -webkit-transform: scale(1);\n -moz-transform: scale(1);\n -ms-transform: scale(1);\n -o-transform: scale(1);\n transform: scale(1); } }\n",""])},function(t,e,n){"use strict";t.exports=n(84)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(85),u=r(l),c=n(5),d=r(c),f=n(16),h=r(f),p=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.setInitialAttrs(),r.reportInterval=r.options.reportInterval||5e3,r.state="IDLE",r}return a(e,t),s(e,[{key:"name",get:function(){return"stats"}}]),e.prototype.bindEvents=function(){this.listenTo(this.container.playback,d.default.PLAYBACK_PLAY,this.onPlay),this.listenTo(this.container,d.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,d.default.CONTAINER_ENDED,this.onStop),this.listenTo(this.container,d.default.CONTAINER_DESTROYED,this.onStop),this.listenTo(this.container,d.default.CONTAINER_STATE_BUFFERING,this.onBuffering),this.listenTo(this.container,d.default.CONTAINER_STATE_BUFFERFULL,this.onBufferFull),this.listenTo(this.container,d.default.CONTAINER_STATS_ADD,this.onStatsAdd),this.listenTo(this.container,d.default.CONTAINER_BITRATE,this.onStatsAdd),this.listenTo(this.container.playback,d.default.PLAYBACK_STATS_ADD,this.onStatsAdd)},e.prototype.setInitialAttrs=function(){this.firstPlay=!0,this.startupTime=0,this.rebufferingTime=0,this.watchingTime=0,this.rebuffers=0,this.externalMetrics={}},e.prototype.onPlay=function(){this.state="PLAYING",this.watchingTimeInit=Date.now(),this.intervalId||(this.intervalId=setInterval(this.report.bind(this),this.reportInterval))},e.prototype.onStop=function(){clearInterval(this.intervalId),this.report(),this.intervalId=void 0,this.state="STOPPED"},e.prototype.onBuffering=function(){this.firstPlay?this.startupTimeInit=Date.now():this.rebufferingTimeInit=Date.now(),this.state="BUFFERING",this.rebuffers++},e.prototype.onBufferFull=function(){this.firstPlay&&this.startupTimeInit?(this.firstPlay=!1,this.startupTime=Date.now()-this.startupTimeInit,this.watchingTimeInit=Date.now()):this.rebufferingTimeInit&&(this.rebufferingTime+=this.getRebufferingTime()),this.rebufferingTimeInit=void 0,this.state="PLAYING"},e.prototype.getRebufferingTime=function(){return Date.now()-this.rebufferingTimeInit},e.prototype.getWatchingTime=function(){var t=Date.now()-this.watchingTimeInit;return t-this.rebufferingTime},e.prototype.isRebuffering=function(){return!!this.rebufferingTimeInit},e.prototype.onStatsAdd=function(t){h.default.extend(this.externalMetrics,t)},e.prototype.getStats=function(){var t={startupTime:this.startupTime,rebuffers:this.rebuffers,rebufferingTime:this.isRebuffering()?this.rebufferingTime+this.getRebufferingTime():this.rebufferingTime,watchingTime:this.isRebuffering()?this.getWatchingTime()-this.getRebufferingTime():this.getWatchingTime()};return h.default.extend(t,this.externalMetrics),t},e.prototype.report=function(){this.container.statsReport(this.getStats())},e}(u.default);e.default=p,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=n(4),l=r(s),u=n(2),c=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n.options));return r.container=n,r.enabled=!0,r.bindEvents(),r}return a(e,t),e.prototype.enable=function(){this.enabled||(this.bindEvents(),this.enabled=!0)},e.prototype.disable=function(){this.enabled&&(this.stopListening(),this.enabled=!1)},e.prototype.bindEvents=function(){},e.prototype.destroy=function(){this.stopListening();
  15. },e}(l.default);e.default=c,c.extend=function(t){return(0,u.extend)(c,t)},c.type="container",t.exports=e.default},function(t,e,n){"use strict";t.exports=n(87)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(80),u=r(l),c=n(5),d=r(c),f=n(15),h=r(f),p=n(17),g=r(p),y=n(88),v=r(y),m=n(89),b=r(m),_=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.configure(),r}return a(e,t),s(e,[{key:"name",get:function(){return"watermark"}},{key:"template",get:function(){return(0,g.default)(b.default)}}]),e.prototype.bindEvents=function(){this.listenTo(this.container,d.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,d.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,d.default.CONTAINER_OPTIONS_CHANGE,this.configure)},e.prototype.configure=function(){this.position=this.options.position||"bottom-right",this.options.watermark?(this.imageUrl=this.options.watermark,this.imageLink=this.options.watermarkLink,this.render()):this.$el.remove()},e.prototype.onPlay=function(){this.hidden||this.$el.show()},e.prototype.onStop=function(){this.$el.hide()},e.prototype.render=function(){this.$el.hide();var t={position:this.position,imageUrl:this.imageUrl,imageLink:this.imageLink};this.$el.html(this.template(t));var e=h.default.getStyleFor(v.default);return this.container.$el.append(e),this.container.$el.append(this.$el),this},e}(u.default);e.default=_,t.exports=e.default},function(t,e,n){e=t.exports=n(25)(),e.push([t.id,"[data-watermark] {\n position: absolute;\n min-width: 70px;\n max-width: 200px;\n width: 12%;\n text-align: center;\n z-index: 10; }\n\n[data-watermark] a {\n outline: none;\n cursor: pointer; }\n\n[data-watermark] img {\n max-width: 100%; }\n\n[data-watermark-bottom-left] {\n bottom: 10px;\n left: 10px; }\n\n[data-watermark-bottom-right] {\n bottom: 10px;\n right: 42px; }\n\n[data-watermark-top-left] {\n top: 10px;\n left: 10px; }\n\n[data-watermark-top-right] {\n top: 10px;\n right: 37px; }\n",""])},function(t,e){t.exports="<div data-watermark data-watermark-<%=position %>>\n<% if(typeof imageLink !== 'undefined') { %>\n<a target=_blank href=\"<%= imageLink %>\">\n<% } %>\n<img src=\"<%= imageUrl %>\">\n<% if(typeof imageLink !== 'undefined') { %>\n</a>\n<% } %>\n</div>\n"},function(t,e,n){"use strict";t.exports=n(91)},function(t,e,n){(function(r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(80),c=i(u),d=n(5),f=i(d),h=n(15),p=i(h),g=n(17),y=i(g),v=n(31),m=i(v),b=n(92),_=i(b),E=n(93),T=i(E),A=n(37),k=i(A),w=function(t){function e(n){o(this,e);var i=a(this,t.call(this,n));return i.hasStartedPlaying=!1,i.playRequested=!1,i.render(),r.nextTick(function(){return i.update()}),i}return s(e,t),l(e,[{key:"name",get:function(){return"poster"}},{key:"template",get:function(){return(0,y.default)(T.default)}},{key:"shouldRender",get:function(){var t=!(!this.options.poster||!this.options.poster.showForNoOp);return"html_img"!==this.container.playback.name&&(this.container.playback.getPlaybackType()!==m.default.NO_OP||t)}},{key:"attributes",get:function(){return{class:"player-poster","data-poster":""}}},{key:"events",get:function(){return{click:"clicked"}}},{key:"showOnVideoEnd",get:function(){return!this.options.poster||this.options.poster.showOnVideoEnd||void 0===this.options.poster.showOnVideoEnd}}]),e.prototype.bindEvents=function(){this.listenTo(this.container,f.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,f.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,f.default.CONTAINER_STATE_BUFFERING,this.update),this.listenTo(this.container,f.default.CONTAINER_STATE_BUFFERFULL,this.update),this.listenTo(this.container,f.default.CONTAINER_OPTIONS_CHANGE,this.render),this.showOnVideoEnd&&this.listenTo(this.container,f.default.CONTAINER_ENDED,this.onStop)},e.prototype.stopListening=function(){t.prototype.stopListening.call(this)},e.prototype.onPlay=function(){this.hasStartedPlaying=!0,this.update()},e.prototype.onStop=function(){this.hasStartedPlaying=!1,this.playRequested=!1,this.update()},e.prototype.showPlayButton=function(t){!t||this.options.chromeless&&!this.options.allowUserInteraction?(this.$playButton.hide(),this.$el.removeClass("clickable")):(this.$playButton.show(),this.$el.addClass("clickable"))},e.prototype.clicked=function(){return this.options.chromeless&&!this.options.allowUserInteraction||(this.playRequested=!0,this.update(),this.container.play()),!1},e.prototype.shouldHideOnPlay=function(){return!this.container.playback.isAudioOnly},e.prototype.update=function(){if(this.shouldRender){var t=!this.playRequested&&!this.hasStartedPlaying&&!this.container.buffering;this.showPlayButton(t),this.hasStartedPlaying?(this.container.enableMediaControl(),this.shouldHideOnPlay()&&this.$el.hide()):(this.container.disableMediaControl(),this.$el.show())}},e.prototype.render=function(){if(this.shouldRender){var t=p.default.getStyleFor(_.default,{baseUrl:this.options.baseUrl});this.$el.html(this.template()),this.$el.append(t);var e=this.options.poster&&void 0==this.options.poster.custom;if(e){var n=this.options.poster.url||this.options.poster;this.$el.css({"background-image":"url("+n+")"})}else this.options.poster&&this.$el.css({background:this.options.poster.custom});this.container.$el.append(this.el),this.$playWrapper=this.$el.find(".play-wrapper"),this.$playWrapper.append(k.default),this.$playButton=this.$playWrapper.find("svg"),this.$playButton.addClass("poster-icon"),this.$playButton.attr("data-poster","");var r=this.options.mediacontrol&&this.options.mediacontrol.buttons;return r&&this.$el.find("svg path").css("fill",r),this.options.mediacontrol&&this.options.mediacontrol.buttons&&(r=this.options.mediacontrol.buttons,this.$playButton.css("color",r)),this.update(),this}},e}(c.default);e.default=w,t.exports=e.default}).call(e,n(29))},function(t,e,n){e=t.exports=n(25)(),e.push([t.id,".player-poster[data-poster] {\n display: -webkit-box;\n display: -moz-box;\n display: box;\n display: -webkit-flex;\n display: -moz-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -moz-box-pack: center;\n box-pack: center;\n -webkit-justify-content: center;\n -moz-justify-content: center;\n -ms-justify-content: center;\n -o-justify-content: center;\n justify-content: center;\n -ms-flex-pack: center;\n -webkit-box-align: center;\n -moz-box-align: center;\n box-align: center;\n -webkit-align-items: center;\n -moz-align-items: center;\n -ms-align-items: center;\n -o-align-items: center;\n align-items: center;\n -ms-flex-align: center;\n position: absolute;\n height: 100%;\n width: 100%;\n z-index: 998;\n top: 0;\n left: 0;\n background-color: #000;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: 50% 50%; }\n .player-poster[data-poster].clickable {\n cursor: pointer; }\n .player-poster[data-poster]:hover .play-wrapper[data-poster] {\n opacity: 1; }\n .player-poster[data-poster] .play-wrapper[data-poster] {\n width: 100%;\n height: 25%;\n margin: 0 auto;\n opacity: 0.75;\n -webkit-transition: opacity 0.1s ease;\n -moz-transition: opacity 0.1s ease;\n transition: opacity 0.1s ease; }\n .player-poster[data-poster] .play-wrapper[data-poster] svg {\n height: 100%; }\n .player-poster[data-poster] .play-wrapper[data-poster] svg path {\n fill: #fff; }\n",""])},function(t,e){t.exports='<div class="play-wrapper" data-poster></div>\n'},function(t,e,n){"use strict";t.exports=n(95)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(85),u=r(l),c=n(5),d=r(c),f=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.container.options.gaAccount&&(r.account=r.container.options.gaAccount,r.trackerName=r.container.options.gaTrackerName?r.container.options.gaTrackerName+".":"Clappr.",r.domainName=r.container.options.gaDomainName,r.currentHDState=void 0,r.embedScript()),r}return a(e,t),s(e,[{key:"name",get:function(){return"google_analytics"}}]),e.prototype.embedScript=function(){var t=this;if(window._gat)this.addEventListeners();else{var e=document.createElement("script");e.setAttribute("type","text/javascript"),e.setAttribute("async","async"),e.setAttribute("src","//www.google-analytics.com/ga.js"),e.onload=function(){return t.addEventListeners()},document.body.appendChild(e)}},e.prototype.addEventListeners=function(){var t=this;this.container&&(this.listenTo(this.container,d.default.CONTAINER_READY,this.onReady),this.listenTo(this.container,d.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,d.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,d.default.CONTAINER_PAUSE,this.onPause),this.listenTo(this.container,d.default.CONTAINER_ENDED,this.onEnded),this.listenTo(this.container,d.default.CONTAINER_STATE_BUFFERING,this.onBuffering),this.listenTo(this.container,d.default.CONTAINER_STATE_BUFFERFULL,this.onBufferFull),this.listenTo(this.container,d.default.CONTAINER_ERROR,this.onError),this.listenTo(this.container,d.default.CONTAINER_PLAYBACKSTATE,this.onPlaybackChanged),this.listenTo(this.container,d.default.CONTAINER_VOLUME,function(e){return t.onVolumeChanged(e)}),this.listenTo(this.container,d.default.CONTAINER_SEEK,function(e){return t.onSeek(e)}),this.listenTo(this.container,d.default.CONTAINER_FULL_SCREEN,this.onFullscreen),this.listenTo(this.container,d.default.CONTAINER_HIGHDEFINITIONUPDATE,this.onHD),this.listenTo(this.container,d.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.onDVR)),_gaq.push([this.trackerName+"_setAccount",this.account]),this.domainName&&_gaq.push([this.trackerName+"_setDomainName",this.domainName])},e.prototype.onReady=function(){this.push(["Video","Playback",this.container.playback.name])},e.prototype.onPlay=function(){this.push(["Video","Play",this.container.playback.src])},e.prototype.onStop=function(){this.push(["Video","Stop",this.container.playback.src])},e.prototype.onEnded=function(){this.push(["Video","Ended",this.container.playback.src])},e.prototype.onBuffering=function(){this.push(["Video","Buffering",this.container.playback.src])},e.prototype.onBufferFull=function(){this.push(["Video","Bufferfull",this.container.playback.src])},e.prototype.onError=function(){this.push(["Video","Error",this.container.playback.src])},e.prototype.onHD=function(t){var e=t?"ON":"OFF";e!==this.currentHDState&&(this.currentHDState=e,this.push(["Video","HD - "+e,this.container.playback.src]))},e.prototype.onPlaybackChanged=function(t){null!==t.type&&this.push(["Video","Playback Type - "+t.type,this.container.playback.src])},e.prototype.onDVR=function(t){var e=t?"ON":"OFF";this.push(["Interaction","DVR - "+e,this.container.playback.src])},e.prototype.onPause=function(){this.push(["Video","Pause",this.container.playback.src])},e.prototype.onSeek=function(){this.push(["Video","Seek",this.container.playback.src])},e.prototype.onVolumeChanged=function(){this.push(["Interaction","Volume",this.container.playback.src])},e.prototype.onFullscreen=function(){this.push(["Interaction","Fullscreen",this.container.playback.src])},e.prototype.push=function(t){var e=[this.trackerName+"_trackEvent"].concat(t);_gaq.push(e)},e}(u.default);e.default=f,t.exports=e.default},function(t,e,n){"use strict";t.exports=n(97)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(85),u=r(l),c=n(5),d=r(c),f=n(31),h=r(f),p=function(t){function e(n){return i(this,e),o(this,t.call(this,n))}return a(e,t),s(e,[{key:"name",get:function(){return"click_to_pause"}}]),e.prototype.bindEvents=function(){this.listenTo(this.container,d.default.CONTAINER_CLICK,this.click),this.listenTo(this.container,d.default.CONTAINER_SETTINGSUPDATE,this.settingsUpdate)},e.prototype.click=function(){(this.container.getPlaybackType()!==h.default.LIVE||this.container.isDvrEnabled())&&(this.container.isPlaying()?this.container.pause():this.container.play())},e.prototype.settingsUpdate=function(){this.container.$el.removeClass("pointer-enabled"),(this.container.getPlaybackType()!==h.default.LIVE||this.container.isDvrEnabled())&&this.container.$el.addClass("pointer-enabled")},e}(u.default);e.default=p,t.exports=e.default},function(t,e,n){"use strict";t.exports=n(99)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(100),u=r(l),c=n(17),d=r(c),f=n(31),h=r(f),p=n(15),g=r(p),y=n(5),v=r(y),m=n(101),b=r(m),_=n(102),E=r(_),T=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.settingsUpdate(),r}return a(e,t),s(e,[{key:"template",get:function(){return(0,d.default)(E.default)}},{key:"name",get:function(){return"dvr_controls"}},{key:"events",get:function(){return{"click .live-button":"click"}}},{key:"attributes",get:function(){return{class:"dvr-controls","data-dvr-controls":""}}}]),e.prototype.bindEvents=function(){this.listenTo(this.core.mediaControl,v.default.MEDIACONTROL_CONTAINERCHANGED,this.containerChanged),this.listenTo(this.core.mediaControl,v.default.MEDIACONTROL_RENDERED,this.settingsUpdate),this.listenTo(this.core,v.default.CORE_OPTIONS_CHANGE,this.render),this.core.getCurrentContainer()&&(this.listenToOnce(this.core.getCurrentContainer(),v.default.CONTAINER_TIMEUPDATE,this.render),this.listenTo(this.core.getCurrentContainer(),v.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.dvrChanged))},e.prototype.containerChanged=function(){this.stopListening(),this.bindEvents()},e.prototype.dvrChanged=function(t){this.settingsUpdate(),this.core.mediaControl.$el.addClass("live"),t?(this.core.mediaControl.$el.addClass("dvr"),this.core.mediaControl.$el.find(".media-control-indicator[data-position], .media-control-indicator[data-duration]").hide()):this.core.mediaControl.$el.removeClass("dvr")},e.prototype.click=function(){var t=this.core.mediaControl,e=t.container;e.isPlaying()||e.play(),t.$el.hasClass("dvr")&&e.seek(e.getDuration())},e.prototype.settingsUpdate=function(){var t=this;this.stopListening(),this.shouldRender()&&(this.render(),this.$el.click(function(){return t.click()})),this.bindEvents()},e.prototype.shouldRender=function(){var t=void 0===this.core.options.useDvrControls||!!this.core.options.useDvrControls;return t&&this.core.getPlaybackType()===h.default.LIVE},e.prototype.render=function(){return this.style=this.style||g.default.getStyleFor(b.default,{baseUrl:this.core.options.baseUrl}),this.$el.html(this.template({live:this.core.i18n.t("live"),backToLive:this.core.i18n.t("back_to_live")})),this.$el.append(this.style),this.shouldRender()&&(this.core.mediaControl.$el.addClass("live"),this.core.mediaControl.$(".media-control-left-panel[data-media-control]").append(this.$el)),this},e}(u.default);e.default=T,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=n(2),l=n(18),u=r(l),c=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n.options));return r.core=n,r.enabled=!0,r.bindEvents(),r.render(),r}return a(e,t),e.prototype.bindEvents=function(){},e.prototype.getExternalInterface=function(){return{}},e.prototype.enable=function(){this.enabled||(this.bindEvents(),this.$el.show(),this.enabled=!0)},e.prototype.disable=function(){this.stopListening(),this.$el.hide(),this.enabled=!1},e.prototype.destroy=function(){this.remove()},e.prototype.render=function(){return this},e}(u.default);e.default=c,c.extend=function(t){return(0,s.extend)(c,t)},c.type="core",t.exports=e.default},function(t,e,n){e=t.exports=n(25)(),e.push([t.id,'.dvr-controls[data-dvr-controls] {\n display: inline-block;\n float: left;\n color: #fff;\n line-height: 32px;\n font-size: 10px;\n font-weight: bold;\n margin-left: 6px; }\n .dvr-controls[data-dvr-controls] .live-info {\n cursor: default;\n font-family: "Roboto", "Open Sans", Arial, sans-serif;\n text-transform: uppercase; }\n .dvr-controls[data-dvr-controls] .live-info:before {\n content: "";\n display: inline-block;\n position: relative;\n width: 7px;\n height: 7px;\n border-radius: 3.5px;\n margin-right: 3.5px;\n background-color: #ff0101; }\n .dvr-controls[data-dvr-controls] .live-info.disabled {\n opacity: 0.3; }\n .dvr-controls[data-dvr-controls] .live-info.disabled:before {\n background-color: #fff; }\n .dvr-controls[data-dvr-controls] .live-button {\n cursor: pointer;\n outline: none;\n display: none;\n border: 0;\n color: #fff;\n background-color: transparent;\n height: 32px;\n padding: 0;\n opacity: 0.7;\n font-family: "Roboto", "Open Sans", Arial, sans-serif;\n text-transform: uppercase;\n -webkit-transition: all 0.1s ease;\n -moz-transition: all 0.1s ease;\n transition: all 0.1s ease; }\n .dvr-controls[data-dvr-controls] .live-button:before {\n content: "";\n display: inline-block;\n position: relative;\n width: 7px;\n height: 7px;\n border-radius: 3.5px;\n margin-right: 3.5px;\n background-color: #fff; }\n .dvr-controls[data-dvr-controls] .live-button:hover {\n opacity: 1;\n text-shadow: rgba(255, 255, 255, 0.75) 0 0 5px; }\n\n.dvr .dvr-controls[data-dvr-controls] .live-info {\n display: none; }\n\n.dvr .dvr-controls[data-dvr-controls] .live-button {\n display: block; }\n\n.dvr.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n background-color: #005aff; }\n\n.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n background-color: #ff0101; }\n',""])},function(t,e){t.exports='<div class="live-info"><%= live %></div>\n<button type="button" class="live-button" aria-label="<%= backToLive %>"><%= backToLive %></button>\n'},function(t,e,n){"use strict";t.exports=n(104)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(105),u=r(l),c=n(5),d=r(c),f=n(16),h=r(f),p=n(37),g=r(p),y=n(38),v=r(y),m=(0,h.default)('link[rel="shortcut icon"]'),b=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r._container=null,r.configure(),r}return a(e,t),s(e,[{key:"name",get:function(){return"favicon"}},{key:"oldIcon",get:function(){return m}}]),e.prototype.configure=function(){this.core.options.changeFavicon?this.enabled||(this.stopListening(this.core,d.default.CORE_OPTIONS_CHANGE),this.enable()):this.enabled&&(this.disable(),this.listenTo(this.core,d.default.CORE_OPTIONS_CHANGE,this.configure))},e.prototype.bindEvents=function(){this.listenTo(this.core,d.default.CORE_OPTIONS_CHANGE,this.configure),this.listenTo(this.core.mediaControl,d.default.MEDIACONTROL_CONTAINERCHANGED,this.containerChanged),this.core.mediaControl.container&&this.containerChanged()},e.prototype.containerChanged=function(){this._container&&this.stopListening(this._container),this._container=this.core.mediaControl.container,this.listenTo(this._container,d.default.CONTAINER_PLAY,this.setPlayIcon),this.listenTo(this._container,d.default.CONTAINER_PAUSE,this.setPauseIcon),this.listenTo(this._container,d.default.CONTAINER_STOP,this.resetIcon),this.listenTo(this._container,d.default.CONTAINER_ENDED,this.resetIcon),this.listenTo(this._container,d.default.CONTAINER_ERROR,this.resetIcon),this.resetIcon()},e.prototype.disable=function(){t.prototype.disable.call(this),this.resetIcon()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.resetIcon()},e.prototype.createIcon=function(t){var e=(0,h.default)("<canvas/>");e[0].width=16,e[0].height=16;var n=e[0].getContext("2d");n.fillStyle="#000";var r=(0,h.default)(t).find("path").attr("d"),i=new Path2D(r);n.fill(i);var o=(0,h.default)('<link rel="shortcut icon" type="image/png"/>');return o.attr("href",e[0].toDataURL("image/png")),o},e.prototype.setPlayIcon=function(){this.playIcon||(this.playIcon=this.createIcon(g.default)),this.changeIcon(this.playIcon)},e.prototype.setPauseIcon=function(){this.pauseIcon||(this.pauseIcon=this.createIcon(v.default)),this.changeIcon(this.pauseIcon)},e.prototype.resetIcon=function(){(0,h.default)('link[rel="shortcut icon"]').remove(),(0,h.default)("head").append(this.oldIcon)},e.prototype.changeIcon=function(t){t&&((0,h.default)('link[rel="shortcut icon"]').remove(),(0,h.default)("head").append(t))},e}(u.default);e.default=b,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=n(2),l=n(4),u=r(l),c=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n.options));return r.core=n,r.enabled=!0,r.bindEvents(),r}return a(e,t),e.prototype.bindEvents=function(){},e.prototype.enable=function(){this.enabled||(this.bindEvents(),this.enabled=!0)},e.prototype.disable=function(){this.enabled&&(this.stopListening(),this.enabled=!1)},e.prototype.getExternalInterface=function(){return{}},e.prototype.destroy=function(){this.stopListening()},e}(u.default);e.default=c,c.extend=function(t){return(0,s.extend)(c,t)},c.type="core",t.exports=e.default},function(t,e,n){"use strict";t.exports=n(107)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(2),u=n(100),c=r(u),d=n(15),f=r(d),h=n(17),p=r(h),g=n(5),y=r(g),v=n(31),m=r(v),b=n(108),_=r(b),E=n(109),T=r(E),A=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.hoveringOverSeekBar=!1,r.hoverPosition=null,r.duration=null,r.actualLiveTime=!!r.mediaControl.options.actualLiveTime,r.actualLiveTime&&(r.mediaControl.options.actualLiveServerTime?r.actualLiveServerTimeDiff=(new Date).getTime()-new Date(r.mediaControl.options.actualLiveServerTime).getTime():r.actualLiveServerTimeDiff=0),r}return a(e,t),s(e,[{key:"name",get:function(){return"seek_time"}},{key:"template",get:function(){return(0,p.default)(T.default)}},{key:"attributes",get:function(){return{class:"seek-time","data-seek-time":""}}},{key:"mediaControl",get:function(){return this.core.mediaControl}},{key:"mediaControlContainer",get:function(){return this.mediaControl.container}},{key:"isLiveStreamWithDvr",get:function(){return this.mediaControlContainer&&this.mediaControlContainer.getPlaybackType()===m.default.LIVE&&this.mediaControlContainer.isDvrEnabled()}},{key:"durationShown",get:function(){return this.isLiveStreamWithDvr&&!this.useActualLiveTime}},{key:"useActualLiveTime",get:function(){return this.actualLiveTime&&this.isLiveStreamWithDvr}}]),e.prototype.bindEvents=function(){this.listenTo(this.mediaControl,y.default.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.mediaControl,y.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR,this.showTime),this.listenTo(this.mediaControl,y.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR,this.hideTime),this.listenTo(this.mediaControl,y.default.MEDIACONTROL_CONTAINERCHANGED,this.onContainerChanged),this.mediaControlContainer&&(this.listenTo(this.mediaControlContainer,y.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.update),this.listenTo(this.mediaControlContainer,y.default.CONTAINER_TIMEUPDATE,this.updateDuration))},e.prototype.onContainerChanged=function(){this.stopListening(),this.bindEvents()},e.prototype.updateDuration=function(t){this.duration=t.total,this.update()},e.prototype.showTime=function(t){this.hoveringOverSeekBar=!0,this.calculateHoverPosition(t),this.update()},e.prototype.hideTime=function(){this.hoveringOverSeekBar=!1,this.update()},e.prototype.calculateHoverPosition=function(t){var e=t.pageX-this.mediaControl.$seekBarContainer.offset().left;this.hoverPosition=Math.min(1,Math.max(e/this.mediaControl.$seekBarContainer.width(),0))},e.prototype.getSeekTime=function(){var t=void 0,e=void 0;if(this.useActualLiveTime){var n=new Date((new Date).getTime()-this.actualLiveServerTimeDiff),r=new Date(n);e=(r-n.setHours(0,0,0,0))/1e3,t=e-this.duration+this.hoverPosition*this.duration,t<0&&(t+=86400)}else t=this.hoverPosition*this.duration;return{seekTime:t,secondsSinceMidnight:e}},e.prototype.update=function(){if(this.rendered)if(this.shouldBeVisible()){var t=this.getSeekTime(),e=(0,l.formatTime)(t.seekTime,this.useActualLiveTime);if(e!==this.displayedSeekTime&&(this.$seekTimeEl.text(e),this.displayedSeekTime=e),this.durationShown){this.$durationEl.show();var n=(0,l.formatTime)(this.actualLiveTime?t.secondsSinceMidnight:this.duration,this.actualLiveTime);n!==this.displayedDuration&&(this.$durationEl.text(n),this.displayedDuration=n)}else this.$durationEl.hide();this.$el.show();var r=this.mediaControl.$seekBarContainer.width(),i=this.$el.width(),o=this.hoverPosition*r;o-=i/2,o=Math.max(0,Math.min(o,r-i)),this.$el.css("left",o)}else this.$el.hide(),this.$el.css("left","-100%");
  16. },e.prototype.shouldBeVisible=function(){return this.mediaControlContainer&&this.mediaControlContainer.settings.seekEnabled&&this.hoveringOverSeekBar&&null!==this.hoverPosition&&null!==this.duration},e.prototype.render=function(){this.rendered=!0,this.displayedDuration=null,this.displayedSeekTime=null;var t=f.default.getStyleFor(_.default);this.$el.html(this.template()),this.$el.append(t),this.$el.hide(),this.mediaControl.$el.append(this.el),this.$seekTimeEl=this.$el.find("[data-seek-time]"),this.$durationEl=this.$el.find("[data-duration]"),this.$durationEl.hide(),this.update()},e}(c.default);e.default=A,t.exports=e.default},function(t,e,n){e=t.exports=n(25)(),e.push([t.id,'.seek-time[data-seek-time] {\n position: absolute;\n white-space: nowrap;\n height: 20px;\n line-height: 20px;\n font-size: 0;\n left: -100%;\n bottom: 55px;\n background-color: rgba(2, 2, 2, 0.5);\n z-index: 9999;\n -webkit-transition: opacity 0.1s ease;\n -moz-transition: opacity 0.1s ease;\n transition: opacity 0.1s ease; }\n .seek-time[data-seek-time].hidden[data-seek-time] {\n opacity: 0; }\n .seek-time[data-seek-time] [data-seek-time] {\n display: inline-block;\n color: white;\n font-size: 10px;\n padding-left: 7px;\n padding-right: 7px;\n vertical-align: top; }\n .seek-time[data-seek-time] [data-duration] {\n display: inline-block;\n color: rgba(255, 255, 255, 0.5);\n font-size: 10px;\n padding-right: 7px;\n vertical-align: top; }\n .seek-time[data-seek-time] [data-duration]:before {\n content: "|";\n margin-right: 7px; }\n',""])},function(t,e){t.exports="<span data-seek-time></span>\n<span data-duration></span>\n"},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(105),u=r(l),c=n(5),d=r(c),f=function(t){function e(){return i(this,e),o(this,t.apply(this,arguments))}return a(e,t),e.prototype.bindEvents=function(){this.listenTo(this.core,d.default.CORE_CONTAINERS_CREATED,this.onContainersCreated)},e.prototype.onContainersCreated=function(){var t=this.core.containers.filter(function(t){return"no_op"!==t.playback.name})[0]||this.core.containers[0];t&&this.core.containers.forEach(function(e){e!==t&&e.destroy()})},s(e,[{key:"name",get:function(){return"sources"}}]),e}(u.default);e.default=f,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(5),u=r(l),c=n(105),d=r(c),f=n(2),h=function(t){function e(){return i(this,e),o(this,t.apply(this,arguments))}return a(e,t),e.prototype.bindEvents=function(){this.listenTo(this.core.mediaControl,u.default.MEDIACONTROL_CONTAINERCHANGED,this.containerChanged);var t=this.core.getCurrentContainer();t&&(this.listenTo(t,u.default.CONTAINER_ENDED,this.ended),this.listenTo(t,u.default.CONTAINER_STOP,this.ended))},e.prototype.containerChanged=function(){this.stopListening(),this.bindEvents()},e.prototype.ended=function(){var t="undefined"==typeof this.core.options.exitFullscreenOnEnd||this.core.options.exitFullscreenOnEnd;t&&f.Fullscreen.isFullscreen()&&this.core.toggleFullscreen()},s(e,[{key:"name",get:function(){return"end_video"}}]),e}(d.default);e.default=h,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(2),u=n(105),c=r(u),d=n(32),f=r(d),h=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r._initializeMessages(),r}return a(e,t),s(e,[{key:"name",get:function(){return"strings"}}]),e.prototype.t=function(t){var e=this._language(),n=e&&this._messages[e]||this._messages.en;return n[t]||t},e.prototype._language=function(){return this.core.options.language||(0,l.getBrowserLanguage)()},e.prototype._initializeMessages=function(){this._messages=(0,f.default)({en:{live:"live",back_to_live:"back to live",playback_not_supported:"Your browser does not support the playback of this video. Please try using a different browser."},pt:{live:"En vivo Ninja",back_to_live:"voltar para o ao vivo",playback_not_supported:"Su navegador no soporta la reproduccion de deste video. Por favor, intente usar un navegador diferente."},es:{Live:"En vivo - Tv Ninja xD",back_to_live:"volver en vivo",playback_not_supported:"Su navegador no soporta la reproducción de este canal. Por favor, trate de usar un navegador diferente."},ru:{live:"прямой эфир",back_to_live:"к прямому эфиру",playback_not_supported:"Ваш браузер не поддерживает воспроизведение этого видео. Пожалуйста, попробуйте другой браузер."}},this.core.options.strings||{}),this._messages["pt-BR"]=this._messages.pt,this._messages["en-US"]=this._messages.en,this._messages["es-419"]=this._messages.es},e}(c.default);e.default=h,t.exports=e.default}])})},function(t,e,n){"use strict";window.Clappr=t.exports=n(1)}])});
Add Comment
Please, Sign In to add comment