diff options
Diffstat (limited to 'assets/clapprio/clappr.min.js')
-rw-r--r-- | assets/clapprio/clappr.min.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/assets/clapprio/clappr.min.js b/assets/clapprio/clappr.min.js new file mode 100644 index 0000000..ba145ab --- /dev/null +++ b/assets/clapprio/clappr.min.js @@ -0,0 +1,16 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Clappr=e():t.Clappr=e()}(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(46),o=r(i),a=n(2),s=r(a),l=n(1),u=r(l),c=n(3),d=r(c),f=n(13),h=r(f),p=n(12),y=r(p),g=n(17),v=r(g),m=n(14),b=r(m),_=n(9),E=r(_),T=n(10),A=r(T),k=n(8),w=r(k),S=n(24),L=r(S),R=n(25),O=r(R),C=n(26),P=r(C),D=n(11),I=r(D),x=n(27),N=r(x),M=n(15),F=r(M),B=n(18),U=r(B),j=n(28),G=r(j),Y=n(29),V=r(Y),K=n(30),$=r(K),H=n(31),z=r(H),W=n(16),q=r(W),X=n(32),Z=r(X),J=n(33),Q=r(J),tt=n(34),et=r(tt),nt=n(19),rt=r(nt),it=n(4),ot=r(it),at=n(20),st=r(at),lt=n(6),ut=r(lt),ct=n(5),dt=r(ct),ft="0.2.64";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:y.default,UICorePlugin:v.default,Playback:d.default,Container:L.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")}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(19),s=r(a),l=n(2),u=n(101),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()},y=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=y;var g={listenTo:"on",listenToOnce:"once"};Object.keys(g).forEach(function(t){y.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[g[t]](n,r,this),this}}),y.PLAYER_READY="ready",y.PLAYER_RESIZE="resize",y.PLAYER_FULLSCREEN="fullscreen",y.PLAYER_PLAY="play",y.PLAYER_PAUSE="pause",y.PLAYER_STOP="stop",y.PLAYER_ENDED="ended",y.PLAYER_SEEK="seek",y.PLAYER_ERROR="error",y.PLAYER_TIMEUPDATE="timeupdate",y.PLAYER_VOLUMEUPDATE="volumeupdate",y.PLAYBACK_PROGRESS="playback:progress",y.PLAYBACK_TIMEUPDATE="playback:timeupdate",y.PLAYBACK_READY="playback:ready",y.PLAYBACK_BUFFERING="playback:buffering",y.PLAYBACK_BUFFERFULL="playback:bufferfull",y.PLAYBACK_SETTINGSUPDATE="playback:settingsupdate",y.PLAYBACK_LOADEDMETADATA="playback:loadedmetadata",y.PLAYBACK_HIGHDEFINITIONUPDATE="playback:highdefinitionupdate",y.PLAYBACK_BITRATE="playback:bitrate",y.PLAYBACK_LEVELS_AVAILABLE="playback:levels:available",y.PLAYBACK_LEVEL_SWITCH_START="playback:levels:switch:start",y.PLAYBACK_LEVEL_SWITCH_END="playback:levels:switch:end",y.PLAYBACK_PLAYBACKSTATE="playback:playbackstate",y.PLAYBACK_DVR="playback:dvr",y.PLAYBACK_MEDIACONTROL_DISABLE="playback:mediacontrol:disable",y.PLAYBACK_MEDIACONTROL_ENABLE="playback:mediacontrol:enable",y.PLAYBACK_ENDED="playback:ended",y.PLAYBACK_PLAY_INTENT="playback:play:intent",y.PLAYBACK_PLAY="playback:play",y.PLAYBACK_PAUSE="playback:pause",y.PLAYBACK_STOP="playback:stop",y.PLAYBACK_ERROR="playback:error",y.PLAYBACK_STATS_ADD="playback:stats:add",y.PLAYBACK_FRAGMENT_LOADED="playback:fragment:loaded",y.PLAYBACK_LEVEL_SWITCH="playback:level:switch",y.CORE_OPTIONS_CHANGE="core:options:change",y.CORE_READY="core:ready",y.CORE_FULLSCREEN="core:fullscreen",y.CONTAINER_PLAYBACKSTATE="container:playbackstate",y.CONTAINER_PLAYBACKDVRSTATECHANGED="container:dvr",y.CONTAINER_BITRATE="container:bitrate",y.CONTAINER_STATS_REPORT="container:stats:report",y.CONTAINER_DESTROYED="container:destroyed",y.CONTAINER_READY="container:ready",y.CONTAINER_ERROR="container:error",y.CONTAINER_LOADEDMETADATA="container:loadedmetadata",y.CONTAINER_TIMEUPDATE="container:timeupdate",y.CONTAINER_PROGRESS="container:progress",y.CONTAINER_PLAY="container:play",y.CONTAINER_STOP="container:stop",y.CONTAINER_PAUSE="container:pause",y.CONTAINER_ENDED="container:ended",y.CONTAINER_CLICK="container:click",y.CONTAINER_DBLCLICK="container:dblclick",y.CONTAINER_CONTEXTMENU="container:contextmenu",y.CONTAINER_MOUSE_ENTER="container:mouseenter",y.CONTAINER_MOUSE_LEAVE="container:mouseleave",y.CONTAINER_SEEK="container:seek",y.CONTAINER_VOLUME="container:volume",y.CONTAINER_FULLSCREEN="container:fullscreen",y.CONTAINER_STATE_BUFFERING="container:state:buffering",y.CONTAINER_STATE_BUFFERFULL="container:state:bufferfull",y.CONTAINER_SETTINGSUPDATE="container:settingsupdate",y.CONTAINER_HIGHDEFINITIONUPDATE="container:highdefinitionupdate",y.CONTAINER_MEDIACONTROL_SHOW="container:mediacontrol:show",y.CONTAINER_MEDIACONTROL_HIDE="container:mediacontrol:hide",y.CONTAINER_MEDIACONTROL_DISABLE="container:mediacontrol:disable",y.CONTAINER_MEDIACONTROL_ENABLE="container:mediacontrol:enable",y.CONTAINER_STATS_ADD="container:stats:add",y.CONTAINER_OPTIONS_CHANGE="container:options:change",y.MEDIACONTROL_RENDERED="mediacontrol:rendered",y.MEDIACONTROL_FULLSCREEN="mediacontrol:fullscreen",y.MEDIACONTROL_SHOW="mediacontrol:show",y.MEDIACONTROL_HIDE="mediacontrol:hide",y.MEDIACONTROL_MOUSEMOVE_SEEKBAR="mediacontrol:mousemove:seekbar",y.MEDIACONTROL_MOUSELEAVE_SEEKBAR="mediacontrol:mouseleave:seekbar",y.MEDIACONTROL_PLAYING="mediacontrol:playing",y.MEDIACONTROL_NOTPLAYING="mediacontrol:notplaying",y.MEDIACONTROL_CONTAINERCHANGED="mediacontrol:containerchanged",y.CORE_CONTAINERS_CREATED="core:containers:created",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 y(){return window.performance&&window.performance.now?performance.now():Date.now()}function g(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=y,e.removeArrayItem=g;var m=n(8),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:y,removeArrayItem:g}},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(10),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){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),o=r(i),a=n(6),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){return"number"==typeof t.length}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){return 1==t.nodeType?t:void 0})}function p(t,e){var n,r=t?t.length:0;for(n=0;r>n;n++)this[n]=t[n];this.length=r,this.selector=e||""}function y(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]=[]),y(t[A],e[A],n)):e[A]!==T&&(t[A]=e[A])}function g(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;r>n;n++)E(t.childNodes[n],e)}var T,A,k,w,S,L,R=[],O=R.concat,C=R.filter,P=R.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.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():""})},L=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){y(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.inArray=function(t,e,n){return R.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:R.forEach,reduce:R.reduce,push:R.push,sort:R.sort,splice:R.splice,indexOf:R.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 R.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(L(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-1===t?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 R.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=this[0],i=!1;for("object"==typeof t&&(i=k(t));n&&!(i?i.indexOf(n)>=0:X.matches(n,t));)n=n!==e&&!r(n)&&n.parentNode;return k(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=k.map(n,function(t){return(t=t.parentNode)&&!r(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return g(e,t)},parent:function(t){return g(L(this.pluck("parentNode")),t)},children:function(t){return g(this.map(function(){return h(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||P.call(this.childNodes)})},siblings:function(t){return g(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[0].textContent: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)))}):this.length&&1===this[0].nodeType?!(n=this[0].getAttribute(t))&&t in this[0]?this[0][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]},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?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(!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,i=this[0];if(!i)return;if(r=getComputedStyle(i,""),"string"==typeof e)return i.style[S(e)]||r.getPropertyValue(e);if(Q(e)){var o={};return k.each(e,function(t,e){o[e]=i.style[S(e)]||r.getPropertyValue(e)}),o}}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&&R.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){return e=t(n),"object"==e||"array"==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){null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src||window.eval.call(window,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=L,X.deserializeValue=_,k.zepto=X,k}();window.Zepto=n,void 0===window.$&&(window.$=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(g[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),y=g[p]||(g[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;return!n||n!==this&&!t.contains(this,n)?i.fn.apply(this,arguments):void 0}),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=y.length,y.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 g[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}),(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,y=function(t){return"string"==typeof t},g={},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(y(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]$)/,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&&!y(e)?(t.each(e,function(t,e){f.on(t,n,r,e,o)}),f):(y(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);return o&&o!==f?(r=t.extend(c(e),{currentTarget:o,liveFired:f}),(a||i).apply(o,[r].concat(h.call(arguments,1)))):void 0}),s(f,e,i,r,n,u||a)}))},t.fn.off=function(e,n,r){var i=this;return e&&!y(e)?(t.each(e,function(t,e){i.off(t,n,e)}),i):(y(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=y(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(y(e)?t.Event(e):e),i._args=r,i.target=s,t.each(n(s,e.type||e),function(t,e){return o=e.proxy(i),!i.isImmediatePropagationStopped()&&void 0})}),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){y(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(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){return t.global?e(n||m,r,i):void 0}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(){}function c(t){return t&&(t=t.split(";",2)[0]),t&&(t==A?"html":t==T?"json":_.test(t)?"script":E.test(t)&&"xml")||"text"}function d(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function f(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()||(e.url=d(e.url,e.data),e.data=void 0)}function h(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 p(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?p(e,l,r,n):e.add(n,l)})}var y,g,v=0,m=window.document,b=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,_=/^(?:text|application)\/javascript/i,E=/^(?:text|application)\/xml/i,T="application/json",A="text/html",k=/^\s*$/,w=m.createElement("a");w.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)||"jsonp"+ ++v,c=m.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),m.head.appendChild(c),e.timeout>0&&(i=setTimeout(function(){f("timeout")},e.timeout)),h)},t.ajaxSettings={type:"GET",beforeSend:u,success:u,error:u,complete:u,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:T,xml:"application/xml, text/xml",html:A,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},t.ajax=function(e){var n,i,l=t.extend({},e||{}),h=t.Deferred&&t.Deferred();for(y in t.ajaxSettings)void 0===l[y]&&(l[y]=t.ajaxSettings[y]);r(l),l.crossDomain||(n=m.createElement("a"),n.href=l.url,n.href=n.href,l.crossDomain=w.protocol+"//"+w.host!=n.protocol+"//"+n.host),l.url||(l.url=window.location.toString()),(i=l.url.indexOf("#"))>-1&&(l.url=l.url.slice(0,i)),f(l);var p=l.dataType,v=/\?.+=\?/.test(l.url);if(v&&(p="jsonp"),l.cache!==!1&&(e&&e.cache===!0||"script"!=p&&"jsonp"!=p)||(l.url=d(l.url,"_="+Date.now())),"jsonp"==p)return v||(l.url=d(l.url,l.jsonp?l.jsonp+"=?":l.jsonp===!1?"":"callback=?")),t.ajaxJSONP(l,h);var b,_=l.accepts[p],E={},T=function(t,e){E[t.toLowerCase()]=[t,e]},A=/^([\w-]+:)\/\//.test(l.url)?RegExp.$1:window.location.protocol,S=l.xhr(),L=S.setRequestHeader;if(h&&h.promise(S),l.crossDomain||T("X-Requested-With","XMLHttpRequest"),T("Accept",_||"*/*"),(_=l.mimeType||_)&&(_.indexOf(",")>-1&&(_=_.split(",",2)[0]),S.overrideMimeType&&S.overrideMimeType(_)),(l.contentType||l.contentType!==!1&&l.data&&"GET"!=l.type.toUpperCase())&&T("Content-Type",l.contentType||"application/x-www-form-urlencoded"),l.headers)for(g in l.headers)T(g,l.headers[g]);if(S.setRequestHeader=T,S.onreadystatechange=function(){if(4==S.readyState){S.onreadystatechange=u,clearTimeout(b);var e,n=!1;if(S.status>=200&&S.status<300||304==S.status||0==S.status&&"file:"==A){p=p||c(l.mimeType||S.getResponseHeader("content-type")),e=S.responseText;try{"script"==p?(0,eval)(e):"xml"==p?e=S.responseXML:"json"==p&&(e=k.test(e)?null:t.parseJSON(e))}catch(t){n=t}n?s(n,"parsererror",S,l,h):a(e,S,l,h)}else s(S.statusText||null,S.status?"error":"abort",S,l,h)}},o(S,l)===!1)return S.abort(),s(null,"abort",S,l,h),S;if(l.xhrFields)for(g in l.xhrFields)S[g]=l.xhrFields[g];var R=!("async"in l)||l.async;S.open(l.type,l.url,R,l.username,l.password);for(g in E)L.apply(S,E[g]);return l.timeout>0&&(b=setTimeout(function(){S.onreadystatechange=u,S.abort(),s(null,"timeout",S,l,h)},l.timeout)),S.send(l.data?l.data:null),S},t.get=function(){return t.ajax(h.apply(null,arguments))},t.post=function(){var e=h.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=h.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=h(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(b,"")).find(i):e),l&&l.apply(o,arguments)},t.ajax(s),this};var S=encodeURIComponent;t.param=function(e,n){var r=[];return r.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(S(e)+"="+S(n))},p(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&&a>s;++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&&(a>=r&&--a,s>=r&&--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);l>u;++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,e,n,r){return Math.abs(t-e)>=Math.abs(n-r)?t-e>0?"Left":"Right":n-r>0?"Up":"Down"}function n(){c=null,f.last&&(f.el.trigger("longTap"),f={})}function r(){c&&clearTimeout(c),c=null}function i(){s&&clearTimeout(s),l&&clearTimeout(l),u&&clearTimeout(u),c&&clearTimeout(c),s=l=u=c=null,f={}}function o(t){return("touch"==t.pointerType||t.pointerType==t.MSPOINTER_TYPE_TOUCH)&&t.isPrimary}function a(t,e){return t.type=="pointer"+e||t.type.toLowerCase()=="mspointer"+e}var s,l,u,c,d,f={},h=750;t(document).ready(function(){var p,y,g,v,m=0,b=0;"MSGesture"in window&&(d=new MSGesture,d.target=document.body),t(document).bind("MSGestureEnd",function(t){var e=t.velocityX>1?"Right":t.velocityX<-1?"Left":t.velocityY>1?"Down":t.velocityY<-1?"Up":null;e&&(f.el.trigger("swipe"),f.el.trigger("swipe"+e))}).on("touchstart MSPointerDown pointerdown",function(e){(!(v=a(e,"down"))||o(e))&&(g=v?e:e.touches[0],e.touches&&1===e.touches.length&&f.x2&&(f.x2=void 0,f.y2=void 0),p=Date.now(),y=p-(f.last||p),f.el=t("tagName"in g.target?g.target:g.target.parentNode),s&&clearTimeout(s),f.x1=g.pageX,f.y1=g.pageY,y>0&&250>=y&&(f.isDoubleTap=!0),f.last=p,c=setTimeout(n,h),d&&v&&d.addPointer(e.pointerId))}).on("touchmove MSPointerMove pointermove",function(t){(!(v=a(t,"move"))||o(t))&&(g=v?t:t.touches[0],r(),f.x2=g.pageX,f.y2=g.pageY,m+=Math.abs(f.x1-f.x2),b+=Math.abs(f.y1-f.y2))}).on("touchend MSPointerUp pointerup",function(n){(!(v=a(n,"up"))||o(n))&&(r(),f.x2&&Math.abs(f.x1-f.x2)>30||f.y2&&Math.abs(f.y1-f.y2)>30?u=setTimeout(function(){f.el.trigger("swipe"),f.el.trigger("swipe"+e(f.x1,f.x2,f.y1,f.y2)),f={}},0):"last"in f&&(30>m&&30>b?l=setTimeout(function(){var e=t.Event("tap");e.cancelTouch=i,f.el.trigger(e),f.isDoubleTap?(f.el&&f.el.trigger("doubleTap"),f={}):s=setTimeout(function(){s=null,f.el&&f.el.trigger("singleTap"),f={}},250)},0):f={}),m=b=0)}).on("touchcancel MSPointerCancel pointercancel",i),t(window).on("scroll",i)}),["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(e){t.fn[e]=function(t){return this.on(e,t)}})}(n),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(){return e(this)?this:void 0},hidden:function(){return e(this)?void 0:this},selected:function(){return this.selected?this:void 0},checked:function(){return this.checked?this:void 0},parent:function(){return this.parentNode},first:function(t){return 0===t?this:void 0},last:function(t,e){return t===e.length-1?this:void 0},eq:function(t,e,n){return t===n?this:void 0},contains:function(e,n,r){return t(this).text().indexOf(r)>-1?this:void 0},has:function(t,e,n){return r.qsa(this,n).length?this:void 0}},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),function(){try{getComputedStyle(void 0)}catch(e){var t=getComputedStyle;window.getComputedStyle=function(e){try{return t(e)}catch(t){return null}}}}(),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={"&":"&","<":"<",">":">",'"':""","'":"'"},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){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){"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(1),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")}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(102),f=r(d),h=n(9),p=r(h),y=/^(\S+)\s*(.*)$/,g=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(y),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=g,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(1),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=n(2),l=n(9),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";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(9),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()},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";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(10),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){"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){"use strict";t.exports=n(53)},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(10),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){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=n(47),t.exports=e.default},function(t,e,n){"use strict";t.exports=n(65)},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(77),o=r(i);e.default={Kibo:o.default},t.exports=e.default},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(){y&&h&&(y=!1,h.length?p=h.concat(p):g=-1,p.length&&s())}function s(){if(!y){var t=i(a);y=!0;for(var e=p.length;e;){for(h=p,p=[];++g<e;)h&&h[g].run();g=-1,e=p.length}h=null,y=!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=[],y=!1,g=-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||y||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){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=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n){"use strict";t.exports=n(38)},function(t,e,n){"use strict";t.exports=n(41)},function(t,e,n){"use strict";t.exports=n(44)},function(t,e,n){"use strict";t.exports=n(45)},function(t,e,n){"use strict";t.exports=n(48)},function(t,e,n){"use strict";t.exports=n(49)},function(t,e,n){"use strict";t.exports=n(51)},function(t,e,n){"use strict";t.exports=n(52)},function(t,e,n){"use strict";t.exports=n(54)},function(t,e,n){"use strict";t.exports=n(55)},function(t,e,n){"use strict";t.exports=n(66)},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 y(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function g(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 L(t,e){var n=this.__data__,r=V(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function R(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 g,map:new(tn||T),string:new g}}function C(t){return yt(this,t).delete(t)}function P(t){return yt(this,t).get(t)}function D(t){return yt(this,t).has(t)}function I(t,e){return yt(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 R(r)}return n.set(t,e),this}function j(t,e){var n=yn(t)||Rt(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||Lt(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)&&Lt(r,n)&&(void 0!==n||e in t)||(t[e]=n)}function V(t,e){for(var n=t.length;n--;)if(Lt(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=yn(t);if(u){if(l=vt(t),!e)return ct(t,l)}else{var c=pn(t),d=c==qt||c==Xt;if(gn(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 yn(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(!yn(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,yn(l)||vn(l)?yn(s)?c=s:Ct(s)?c=ct(s):(d=!1,c=$(l,!0)):Nt(l)||Rt(l)?Rt(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(y(t),!0):y(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 yt(t,e){var n=t.__data__;return Tt(e)?n["string"==typeof e?"string":"hash"]:n.map}function gt(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 ye:case ge: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)&&Lt(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 Lt(t,e){return t===e||t!==t&&e!==e}function Rt(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]",ye="[object Uint16Array]",ge="[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[ye]=Ee[ge]=!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[ye]=Te[ge]=!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,Le=Se&&"object"==typeof n&&n&&!n.nodeType&&n,Re=Le&&Le.exports===Se,Oe=Re&&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=Re?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=gt(we,"DataView"),tn=gt(we,"Map"),en=gt(we,"Promise"),nn=gt(we,"Set"),rn=gt(we,"WeakMap"),on=gt(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;g.prototype.clear=v,g.prototype.delete=m,g.prototype.get=b,g.prototype.has=_,g.prototype.set=E,T.prototype.clear=A,T.prototype.delete=k,T.prototype.get=w,T.prototype.has=S,T.prototype.set=L,R.prototype.clear=O,R.prototype.delete=C,R.prototype.get=P,R.prototype.has=D,R.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){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 yn=Array.isArray,gn=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(23)(t))},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,n){t.exports=n.p+"a8c874b93b3d848f39a71260c57e3863.cur"},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(1),u=r(l),c=n(10),d=r(c),f=n(4),h=r(f),p=n(78),y=r(p),g=n(5),v=r(g),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(y.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){"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(9),u=r(l),c=n(1),d=r(c),f=n(24),h=r(f),p=n(5),y=r(p),g=n(100),v=r(g),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 y.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=y.default.extend({},this.options,{src:e,mimeType:n}),i=this.findPlaybackPlugin(e,n),o=new i(r,this._i18n);r=y.default.extend({},r,{playback:o});var a=new h.default(r,this._i18n),s=y.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(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")}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(1),c=r(u),d=n(4),f=r(d),h=n(10),p=r(h),y=n(8),g=r(y),v=n(40),m=r(v),b=n(27),_=r(b),E=n(11),T=r(E),A=n(15),k=r(A),w=n(5),S=r(w),L=n(79),R=r(L),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(){g.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(),g.default.isiOS||this.$el.removeClass("fullscreen nocursor")):(l.Fullscreen.requestFullscreen(this.el),g.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(R.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}}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(9),u=r(l),c=n(25),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(42)},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(9),l=r(s),u=n(15),c=r(u),d=n(103),f=r(d),h=n(16),p=r(h),y=n(28),g=r(y),v=n(31),m=r(v),b=n(29),_=r(b),E=n(30),T=r(E),A=n(32),k=r(A),w=n(33),S=r(w),L=n(70),R=r(L),O=n(72),C=r(O),P=n(75),D=r(P),I=n(34),x=r(I),N=n(64),M=r(N),F=n(57),B=r(F),U=n(59),j=r(U),G=n(62),Y=r(G),V=n(67),K=r(V),$=n(69),H=r($),z=n(60),W=r(z),q=n(74),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,g.default,_.default,k.default,S.default],a.containerPlugins=[R.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(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(20),d=n(1),f=i(d),h=n(4),p=i(h),y=n(10),g=i(y),v=n(8),m=i(v),b=n(11),_=i(b),E=n(6),T=i(E),A=n(3),k=i(A),w=n(5),S=i(w),L=n(35),R=i(L),O=n(80),C=i(O),P=n(91),D=i(P),I=n(22),x=i(I),N=n(36),M=i(N),F=n(104),B=i(F),U=n(105),j=i(U),G=n(106),Y=i(G),V=n(107),K=i(V),$=n(108),H=i($),z=n(109),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}},{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_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,R.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"),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}(g.default);e.default=q,q.extend=function(t){return(0,u.extend)(q,t)},t.exports=e.default}).call(e,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(2),u=n(9),c=r(u),d=n(1),f=r(d),h=n(8),p=r(h),y=n(43),g=r(y),v=n(26),m=r(v),b=n(15),_=r(b),E=n(5),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 g.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)}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(3),u=r(l),c=n(4),d=r(c),f=n(6),h=r(f),p=n(8),y=r(p),g=n(92),v=r(g),m=n(81),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})),y.default.isIE&&(this.$("embed").remove(),y.default.isLegacyIE&&this.$el.attr("classid",_)),y.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 y.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,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=n(8),f=r(d),h=n(11),p=r(h),y=n(6),g=r(y),v=n(5),m=r(v),b=n(1),_=r(b),E=n(3),T=r(E),A=n(111),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,g.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";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(18),u=r(l),c=n(1),d=r(c),f=n(6),h=r(f),p=n(3),y=r(p),g=n(11),v=r(g),m=n(8),b=r(m),_=n(50),E=r(_),T=n(112),A=r(T),k=n(5),w=r(k),S=60,L=-1,R=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=y.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?L: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===y.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===y.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!==y.default.LIVE||this._dvrEnabled)&&(this.el.playerPause(),this._playbackType===y.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===y.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===y.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===y.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=R,R.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(11),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){"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(16),c=r(u),d=n(90),f=r(d),h=n(99),p=r(h),y=n(1),g=r(y),v=n(3),m=r(v),b=n(8),_=r(b),E=n(2),T=n(19),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(g.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(g.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(g.default.PLAYBACK_DVR,t),this.trigger(g.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(g.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(g.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(g.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(g.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(g.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(g.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,y=d*p;y<=c?(c-=y,this._durationExcludesAfterLiveSyncPoint=!0):this._durationExcludesAfterLiveSyncPoint=!1}c!==this._playableRegionDuration&&(r=!0,this._playableRegionDuration=c);var g=i[0].start+c,v=o+a,b=g!==v;if(b)if(this._localEndTimeCorrelation){var _=this._localEndTimeCorrelation,E=this._now-_.local,T=(_.remote+E)/1e3;T>g?this._localEndTimeCorrelation={local:this._now,remote:1e3*g}:T<g-this._extrapolatedWindowDuration?this._localEndTimeCorrelation={local:this._now,remote:1e3*(g-this._extrapolatedWindowDuration)}:T>v&&(this._localEndTimeCorrelation={local:this._now,remote:1e3*v})}else this._localEndTimeCorrelation={local:this._now,remote:1e3*g};r&&this._onDurationChange(),n&&this._onProgress()}},e.prototype._onFragmentLoaded=function(t,e){this.trigger(g.default.PLAYBACK_FRAGMENT_LOADED,e)},e.prototype._onLevelSwitch=function(t,e){this.levels.length||this._fillLevels(),this.trigger(g.default.PLAYBACK_LEVEL_SWITCH_END),this.trigger(g.default.PLAYBACK_LEVEL_SWITCH,e);var n=this._hls.levels[e.level];n&&(this.highDefinition=n.height>=720||n.bitrate/1e3>=2e3,this.trigger(g.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(g.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){"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(1),u=r(l),c=n(3),d=r(c),f=n(16),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){(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(3),f=i(d),h=n(4),p=i(h),y=n(8),g=i(y),v=n(1),m=i(v),b=n(82),_=i(b),E=n(5),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._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||(g.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.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.$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(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(3),u=r(l),c=n(4),d=r(c),f=n(83),h=r(f),p=n(1),y=r(p),g=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(y.default.PLAYBACK_READY,this.name),this},e.prototype._onLoad=function(){this.trigger(y.default.PLAYBACK_ENDED,this.name)},e.prototype._onError=function(t){var e="error"===t.type?"load error":"loading aborted";this.trigger(y.default.PLAYBACK_ERROR,{message:e},this.name)},e}(u.default);e.default=g,g.canPlay=function(t){return/\.(png|jpg|jpeg|gif|bmp|tiff|pgm|pnm|webp)(|\?.*)$/i.test(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=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(3),c=r(u),d=n(6),f=r(d),h=n(4),p=r(h),y=n(1),g=r(y),v=n(84),m=r(v),b=n(93),_=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(g.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(g.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){"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(13),u=r(l),c=n(1),d=r(c),f=n(3),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(56)},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(17),u=r(l),c=n(6),d=r(c),f=n(3),h=r(f),p=n(4),y=r(p),g=n(1),v=r(g),m=n(85),b=r(m),_=n(94),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||y.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";t.exports=n(58)},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(1),u=r(l),c=n(12),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(12),u=r(l),c=n(1),d=r(c),f=n(5),h=r(f),p=n(22),y=r(p),g=n(36),v=r(g),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(y.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";t.exports=n(61)},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(13),u=r(l),c=n(1),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(63)},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(20),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,y=[s,a,l,u,u],g=["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 "+g[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=y[e],i="";t&&(i="["+t+"]"),window.console&&window.console.log&&window.console.log.apply(console,["%c["+g[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){(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(14),c=i(u),d=n(1),f=i(d),h=n(4),p=i(h),y=n(6),g=i(y),v=n(3),m=i(v),b=n(86),_=i(b),E=n(95),T=i(E),A=n(22),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,g.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});if(this.$el.html(this.template()),this.$el.append(t),this.options.poster){var e=this.options.poster.url||this.options.poster;this.$el.css({"background-image":"url("+e+")"})}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 n=this.options.mediacontrol&&this.options.mediacontrol.buttons;return n&&this.$el.find("svg path").css("fill",n),this.options.mediacontrol&&this.options.mediacontrol.buttons&&(n=this.options.mediacontrol.buttons,this.$playButton.css("color",n)),this.update(),this}},e}(c.default);e.default=w,t.exports=e.default}).call(e,n(21))},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,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(17),c=r(u),d=n(4),f=r(d),h=n(6),p=r(h),y=n(1),g=r(y),v=n(3),m=r(v),b=n(87),_=r(b),E=n(96),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,g.default.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.mediaControl,g.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR,this.showTime),this.listenTo(this.mediaControl,g.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR,this.hideTime),this.listenTo(this.mediaControl,g.default.MEDIACONTROL_CONTAINERCHANGED,this.onContainerChanged),this.mediaControlContainer&&(this.listenTo(this.mediaControlContainer,g.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.update),this.listenTo(this.mediaControlContainer,g.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%")},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){"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(12),u=r(l),c=n(1),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";t.exports=n(71)},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(14),u=r(l),c=n(1),d=r(c),f=n(4),h=r(f),p=n(6),y=r(p),g=n(97),v=r(g),m=n(88),b=r(m),_=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.template=(0,y.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";t.exports=n(73)},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(13),u=r(l),c=n(1),d=r(c),f=n(5),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=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(12),c=r(u),d=n(35),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:"ao vivo",back_to_live:"voltar para o ao vivo",playback_not_supported:"Seu navegador não supporta a reprodução deste video. Por favor, tente usar um navegador diferente."},es:{live:"vivo",back_to_live:"volver en vivo",playback_not_supported:"Su navegador no soporta la reproducción de un video. 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";t.exports=n(76)},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(14),u=r(l),c=n(1),d=r(c),f=n(4),h=r(f),p=n(6),y=r(p),g=n(89),v=r(g),m=n(98),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,y.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){"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,n){e=t.exports=n(7)(),e.push([t.id,".container[data-container]{position:absolute;background-color:#000;height:100%;width:100%}.container[data-container] .chromeless{cursor:default}[data-player]:not(.nocursor) .container[data-container]:not(.chromeless).pointer-enabled{cursor:pointer}",""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,'@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:local("Roboto"),local("Roboto-Regular"),url('+n(110)+') format("truetype")}[data-player]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transform:translateZ(0);transform:translateZ(0);position:relative;margin:0;padding:0;border:0;font-style:normal;font-weight:400;text-align:center;overflow:hidden;font-size:100%;font-family:Roboto,Open Sans,Arial,sans-serif;text-shadow:0 0 0;box-sizing:border-box}[data-player] a,[data-player] abbr,[data-player] acronym,[data-player] address,[data-player] applet,[data-player] article,[data-player] aside,[data-player] audio,[data-player] b,[data-player] big,[data-player] blockquote,[data-player] canvas,[data-player] caption,[data-player] center,[data-player] cite,[data-player] code,[data-player] dd,[data-player] del,[data-player] details,[data-player] dfn,[data-player] div,[data-player] dl,[data-player] dt,[data-player] em,[data-player] embed,[data-player] fieldset,[data-player] figcaption,[data-player] figure,[data-player] footer,[data-player] form,[data-player] h1,[data-player] h2,[data-player] h3,[data-player] h4,[data-player] h5,[data-player] h6,[data-player] header,[data-player] hgroup,[data-player] i,[data-player] iframe,[data-player] img,[data-player] ins,[data-player] kbd,[data-player] label,[data-player] legend,[data-player] li,[data-player] mark,[data-player] menu,[data-player] nav,[data-player] object,[data-player] ol,[data-player] output,[data-player] p,[data-player] pre,[data-player] q,[data-player] ruby,[data-player] s,[data-player] samp,[data-player] section,[data-player] small,[data-player] span,[data-player] strike,[data-player] strong,[data-player] sub,[data-player] summary,[data-player] sup,[data-player] table,[data-player] tbody,[data-player] td,[data-player] tfoot,[data-player] th,[data-player] thead,[data-player] time,[data-player] tr,[data-player] tt,[data-player] u,[data-player] ul,[data-player] var,[data-player] video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}[data-player] table{border-collapse:collapse;border-spacing:0}[data-player] caption,[data-player] td,[data-player] th{text-align:left;font-weight:400;vertical-align:middle}[data-player] blockquote,[data-player] q{quotes:none}[data-player] blockquote:after,[data-player] blockquote:before,[data-player] q:after,[data-player] q:before{content:"";content:none}[data-player] a img{border:none}[data-player]:focus{outline:0}[data-player] *{max-width:none;box-sizing:inherit;float:none}[data-player] div{display:block}[data-player].fullscreen{width:100%!important;height:100%!important;top:0;left:0}[data-player].nocursor{cursor:none}.clappr-style{display:none!important}',""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,".media-control-notransition{-webkit-transition:none!important;transition:none!important}.media-control[data-media-control]{position:absolute;width:100%;height:100%;z-index:9999;pointer-events:none}.media-control[data-media-control].dragging{pointer-events:auto;cursor:-webkit-grabbing!important;cursor:grabbing!important;cursor:url("+n(37)+"),move}.media-control[data-media-control].dragging *{cursor:-webkit-grabbing!important;cursor:grabbing!important;cursor:url("+n(37)+'),move}.media-control[data-media-control] .media-control-background[data-background]{position:absolute;height:40%;width:100%;bottom:0;background:-webkit-linear-gradient(transparent,rgba(0,0,0,.9));background:linear-gradient(transparent,rgba(0,0,0,.9));-webkit-transition:opacity .6s ease-out;transition:opacity .6s ease-out}.media-control[data-media-control] .media-control-icon{line-height:0;letter-spacing:0;speak:none;color:#fff;opacity:.5;vertical-align:middle;text-align:left;-webkit-transition:all .1s ease;transition:all .1s ease}.media-control[data-media-control] .media-control-icon:hover{color:#fff;opacity:.75;text-shadow:hsla(0,0%,100%,.8) 0 0 5px}.media-control[data-media-control].media-control-hide .media-control-background[data-background]{opacity:0}.media-control[data-media-control].media-control-hide .media-control-layer[data-controls]{bottom:-50px}.media-control[data-media-control].media-control-hide .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar]{opacity:0}.media-control[data-media-control] .media-control-layer[data-controls]{position:absolute;bottom:7px;width:100%;height:32px;font-size:0;vertical-align:middle;pointer-events:auto;-webkit-transition:bottom .4s ease-out;transition:bottom .4s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-left-panel[data-media-control]{position:absolute;top:0;left:4px;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-center-panel[data-media-control]{height:100%;text-align:center;line-height:32px}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-right-panel[data-media-control]{position:absolute;top:0;right:4px;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button{background-color:transparent;border:0;margin:0 6px;padding:0;cursor:pointer;display:inline-block;width:32px;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg{width:100%;height:22px}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg path{fill:#fff}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button:focus{outline:none}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-pause],.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-play],.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-stop]{float:left;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-fullscreen]{float:right;background-color:transparent;border:0;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator]{cursor:default;float:right;background-color:transparent;border:0;height:100%;display:none}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled{opacity:1;display:block}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled:hover{opacity:1;text-shadow:none}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playpause],.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playstop]{float:left}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration],.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position]{display:inline-block;font-size:10px;color:#fff;cursor:default;line-height:32px;position:relative}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position]{margin:0 6px 0 7px}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]{color:hsla(0,0%,100%,.5);margin-right:6px}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]:before{content:"|";margin-right:7px}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]{position:absolute;top:-20px;left:0;display:inline-block;vertical-align:middle;width:100%;height:25px;cursor:pointer}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar]{width:100%;height:1px;position:relative;top:12px;background-color:#666}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-1[data-seekbar]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#c2c2c2;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#005aff;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-hover[data-seekbar]{opacity:0;position:absolute;top:-3px;width:5px;height:7px;background-color:hsla(0,0%,100%,.5);-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]:hover .bar-background[data-seekbar] .bar-hover[data-seekbar]{opacity:1}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled{cursor:default}.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]{opacity:0}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar]{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%);top:2px;left:0;width:20px;height:20px;opacity:1;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] .bar-scrubber-icon[data-seekbar]{position:absolute;left:6px;top:6px;width:8px;height:8px;border-radius:10px;box-shadow:0 0 0 6px hsla(0,0%,100%,.2);background-color:#fff}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume]{float:right;display:inline-block;height:32px;cursor:pointer;margin:0 6px;box-sizing:border-box}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume]{float:left;bottom:0}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]{background-color:transparent;border:0;box-sizing:content-box;width:32px;height:32px;opacity:.5}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]:hover{opacity:.75}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg{height:24px;position:relative;top:3px}.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{fill:#fff}.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{margin-left:2px}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume]{float:left;position:relative;overflow:hidden;top:6px;width:42px;height:18px;padding:3px 0;-webkit-transition:width .2s ease-out;transition:width .2s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume]{height:1px;position:relative;top:7px;margin:0 3px;background-color:#666}.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]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#c2c2c2;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.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]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#005aff;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.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]{opacity:0;position:absolute;top:-3px;width:5px;height:7px;background-color:hsla(0,0%,100%,.5);-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume]{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%);top:0;left:0;width:20px;height:20px;opacity:1;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.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]{position:absolute;left:6px;top:6px;width:8px;height:8px;border-radius:10px;box-shadow:0 0 0 6px hsla(0,0%,100%,.2);background-color:#fff}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]{float:left;width:4px;padding-left:2px;height:12px;opacity:.5;box-shadow:inset 2px 0 0 #fff;-webkit-transition:-webkit-transform .2s ease-out;transition:transform .2s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume].fill{box-shadow:inset 2px 0 0 #fff;opacity:1}.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){padding-left:0}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:hover{-webkit-transform:scaleY(1.5);transform:scaleY(1.5)}.media-control[data-media-control].w320 .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume].volume-bar-hide{width:0;height:12px;top:9px;padding:0}',""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,".clappr-flash-playback[data-flash-playback]{display:block;position:absolute;top:0;left:0;height:100%;width:100%;pointer-events:none}",""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,"[data-html5-video]{position:absolute;height:100%;width:100%;display:block}",""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,"[data-html-img]{max-width:100%;max-height:100%}",""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,"[data-no-op]{position:absolute;height:100%;width:100%;text-align:center}[data-no-op] p[data-no-op-msg]{position:absolute;text-align:center;font-size:25px;left:0;right:0;color:#fff;padding:10px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);max-height:100%;overflow:auto}[data-no-op] canvas[data-no-op-canvas]{background-color:#777;height:100%;width:100%}",""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,'.dvr-controls[data-dvr-controls]{display:inline-block;float:left;color:#fff;line-height:32px;font-size:10px;font-weight:700;margin-left:6px}.dvr-controls[data-dvr-controls] .live-info{cursor:default;font-family:Roboto,Open Sans,Arial,sans-serif;text-transform:uppercase}.dvr-controls[data-dvr-controls] .live-info:before{content:"";display:inline-block;position:relative;width:7px;height:7px;border-radius:3.5px;margin-right:3.5px;background-color:#ff0101}.dvr-controls[data-dvr-controls] .live-info.disabled{opacity:.3}.dvr-controls[data-dvr-controls] .live-info.disabled:before{background-color:#fff}.dvr-controls[data-dvr-controls] .live-button{cursor:pointer;outline:none;display:none;border:0;color:#fff;background-color:transparent;height:32px;padding:0;opacity:.7;font-family:Roboto,Open Sans,Arial,sans-serif;text-transform:uppercase;-webkit-transition:all .1s ease;transition:all .1s ease}.dvr-controls[data-dvr-controls] .live-button:before{content:"";display:inline-block;position:relative;width:7px;height:7px;border-radius:3.5px;margin-right:3.5px;background-color:#fff}.dvr-controls[data-dvr-controls] .live-button:hover{opacity:1;text-shadow:hsla(0,0%,100%,.75) 0 0 5px}.dvr .dvr-controls[data-dvr-controls] .live-info{display:none}.dvr .dvr-controls[data-dvr-controls] .live-button{display:block}.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]{background-color:#005aff}.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar]{background-color:#ff0101}',""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,".player-poster[data-poster]{display:-webkit-box;display:-moz-box;display:box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;box-pack:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-ms-flex-pack:center;-webkit-box-align:center;box-align:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-ms-flex-align:center;position:absolute;height:100%;width:100%;z-index:998;top:0;left:0;background-color:#000;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.player-poster[data-poster].clickable{cursor:pointer}.player-poster[data-poster]:hover .play-wrapper[data-poster]{opacity:1}.player-poster[data-poster] .play-wrapper[data-poster]{width:100%;height:25%;margin:0 auto;opacity:.75;-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.player-poster[data-poster] .play-wrapper[data-poster] svg{height:100%}.player-poster[data-poster] .play-wrapper[data-poster] svg path{fill:#fff}",""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,'.seek-time[data-seek-time]{position:absolute;white-space:nowrap;height:20px;line-height:20px;font-size:0;left:-100%;bottom:55px;background-color:rgba(2,2,2,.5);z-index:9999;-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.seek-time[data-seek-time].hidden[data-seek-time]{opacity:0}.seek-time[data-seek-time] [data-seek-time]{display:inline-block;color:#fff;font-size:10px;padding-left:7px;padding-right:7px;vertical-align:top}.seek-time[data-seek-time] [data-duration]{display:inline-block;color:hsla(0,0%,100%,.5);font-size:10px;padding-right:7px;vertical-align:top}.seek-time[data-seek-time] [data-duration]:before{content:"|";margin-right:7px}',""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,".spinner-three-bounce[data-spinner]{position:absolute;margin:0 auto;width:70px;text-align:center;z-index:999;left:0;right:0;margin-left:auto;margin-right:auto;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.spinner-three-bounce[data-spinner]>div{width:18px;height:18px;background-color:#fff;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.spinner-three-bounce[data-spinner] [data-bounce1]{-webkit-animation-delay:-.32s;animation-delay:-.32s}.spinner-three-bounce[data-spinner] [data-bounce2]{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes bouncedelay{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}",""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,"[data-watermark]{position:absolute;min-width:70px;max-width:200px;width:12%;text-align:center;z-index:10}[data-watermark] a{outline:none;cursor:pointer}[data-watermark] img{max-width:100%}[data-watermark-bottom-left]{bottom:10px;left:10px}[data-watermark-bottom-right]{bottom:10px;right:42px}[data-watermark-top-left]{top:10px;left:10px}[data-watermark-top-right]{top:10px;right:37px}",""])},function(t,e,n){var r,r;!function(e){t.exports=e()}(function(){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;throw TypeError('Uncaught, unspecified "error" event.')}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(t,e,n){var r=arguments[3],i=arguments[4],o=arguments[5],a=JSON.stringify;e.exports=function(t,e){function n(t){g[t]=!0;for(var e in i[t][1]){var r=i[t][1][e];g[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),y={};y[s]=s,i[p]=[Function(["require"],"var f = require("+a(s)+");(f.default ? f.default : f)(self);"),y];var g={};n(p);var v="("+r+")({"+Object.keys(g).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}},{}],3:[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(26),u=r(l),c=t(25),d=r(c),f=t(28),h=r(f),p=t(24),y=t(43),g=t(8),v=r(g),m=function(t){function e(t){i(this,e);var n=o(this,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;if(!r||r.stats&&r.stats.aborted)return y.logger.warn("frag loader destroy or aborted, disarm abandonRules"),void this.clearTimer();var i=r.stats;if(e&&(!e.paused&&0!==e.playbackRate||!e.readyState)&&n.autoLevel&&n.level){var o=performance.now()-i.trequest,a=Math.abs(e.playbackRate);if(o>500*n.duration/a){var s=t.levels,l=Math.max(1,i.bw?i.bw/8:1e3*i.loaded/o),c=i.total?i.total:Math.max(i.loaded,Math.round(n.duration*s[n.level].bitrate/8)),d=e.currentTime,f=(c-i.loaded)/l,p=(h.default.bufferInfo(e,d,t.config.maxBufferHole).end-d)/a; +if(p<2*n.duration/a&&f>p){var g=void 0,v=void 0;for(v=n.level-1;v>=0&&(g=n.duration*s[v].bitrate/(6.4*l),!(g<p));v--);g<f&&(v=Math.max(0,v),y.logger.warn("loading too slow, abort fragment loading and switch to level "+v+":fragLoadedDelay["+v+"]<fragLoadedDelay["+(n.level-1)+"];bufferStarvationDelay:"+g.toFixed(1)+"<"+f.toFixed(1)+":"+p.toFixed(1)),t.nextLoadLevel=v,this.bwEstimator.sample(o,i.loaded),r.abort(),this.clearTimer(),t.trigger(u.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,stats:i}))}}}}},{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.tbuffered-e.trequest;y.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=void 0;h=u<=t?a*n:s*n;var p=l[u].bitrate,g=p*f/h;if(y.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+u+"/"+Math.round(h)+"/"+p+"/"+f+"/"+o+"/"+g),h>p&&(!g||g<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=0;r<e.length;r++)if(e[r].bitrate>n)return r;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;y.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var p=r.maxStarvationDelay,g=r.abrBandWidthFactor,v=r.abrBandWidthUpFactor;if(0===d){var m=this.bitrateTestDelay;m&&(p=r.maxLoadingDelay-m,y.logger.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*p)+" ms"),g=v=1)}return f=this.findBestLevel(a,s,c,i,e,d+p,g,v,n),Math.max(f,0)}}]),e}(d.default);n.default=m},{24:24,25:25,26:26,28:28,43:43,8:8}],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(39),u=r(l),c=t(28),d=r(c),f=t(20),h=r(f),p=t(26),y=r(p),g=t(25),v=r(g),m=t(29),b=r(m),_=t(45),E=r(_),T=t(24),A=t(43),k={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",ENDED:"ENDED",ERROR:"ERROR"},w=function(t){function e(t){i(this,e);var n=o(this,Object.getPrototypeOf(e).call(this,t,y.default.MEDIA_ATTACHED,y.default.MEDIA_DETACHING,y.default.AUDIO_TRACKS_UPDATED,y.default.AUDIO_TRACK_SWITCH,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));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.tracks){var e=this.media,n=this.lastCurrentTime;this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.fragLoadError=0,e&&n?(A.logger.log("configure startPosition @"+n),this.state=k.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:t,this.state=k.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=t,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(){var t,e,n,r=this.hls,i=r.config;switch(this.state){case k.ERROR:case k.PAUSED:break;case k.STARTING:this.state=k.WAITING_TRACK,this.loadedmetadata=!1;break;case k.IDLE:if(!this.media&&(this.startFragRequested||!i.startFragPrefetch))break;t=this.loadedmetadata?this.media.currentTime:this.nextLoadPosition;var o=this.mediaBuffer?this.mediaBuffer:this.media,a=d.default.bufferInfo(o,t,i.maxBufferHole),s=a.len,l=a.end,c=this.fragPrevious,f=i.maxMaxBufferLength;if(s<f&&this.trackId<this.tracks.length){if(n=this.tracks[this.trackId].details,"undefined"==typeof n){this.state=k.WAITING_TRACK;break}if(!n.live&&c&&c.sn===n.endSN&&(!this.media.seeking||this.media.duration-l<c.duration/2)){this.hls.trigger(y.default.BUFFER_EOS,{type:"audio"}),this.state=k.ENDED;break}var h=n.fragments,p=h.length,g=h[0].start,v=h[p-1].start+h[p-1].duration,m=void 0;if(l<g?m=h[0]:!function(){var t=void 0,e=i.maxFragLookUpTolerance;l<v?(l>v-e&&(e=0),t=u.default.search(h,function(t){return t.start+t.duration-e<=l?1:t.start-e>l?-1:0})):t=h[p-1],t&&(m=t,g=t.start,c&&m.level===c.level&&m.sn===c.sn&&(m.sn<n.endSN?(m=h[m.sn+1-n.startSN],A.logger.log("SN just loaded, load next one: "+m.sn)):m=null))}(),m)if(null!=m.decryptdata.uri&&null==m.decryptdata.key)A.logger.log("Loading key for "+m.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+this.trackId),this.state=k.KEY_LOADING,r.trigger(y.default.KEY_LOADING,{frag:m});else{if(A.logger.log("Loading "+m.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+this.trackId+", currentTime:"+t+",bufferEnd:"+l.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,m.loadCounter){m.loadCounter++;var b=i.fragLoadingLoopThreshold;if(m.loadCounter>b&&Math.abs(this.fragLoadIdx-m.loadIdx)<b)return void r.trigger(y.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:m})}else m.loadCounter=1;m.loadIdx=this.fragLoadIdx,this.fragCurrent=m,this.startFragRequested=!0,r.trigger(y.default.FRAG_LOADING,{frag:m}),this.state=k.FRAG_LOADING}}break;case k.WAITING_TRACK:e=this.tracks[this.trackId],e&&e.details&&(this.state=k.IDLE);break;case k.FRAG_LOADING_WAITING_RETRY:var _=performance.now(),E=this.retryDate;o=this.media;var w=o&&o.seeking;(!E||_>=E||w)&&(A.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=k.IDLE);break;case k.STOPPED:case k.FRAG_LOADING:case k.PARSING:case k.PARSED:case k.ENDED:}}},{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&&(A.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=null,this.loadedmetadata=!1,this.stopLoad()}},{key:"onMediaSeeking",value:function(){this.state===k.ENDED&&(this.state=k.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){A.logger.log("audio tracks updated"),this.tracks=t.audioTracks}},{key:"onAudioTrackSwitch",value:function(t){var e=!!t.url;this.trackId=t.id,this.state=k.IDLE,this.fragCurrent=null,this.state=k.PAUSED,e?this.timer||(this.timer=setInterval(this.ontick,100)):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.hls.trigger(y.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),this.tick()}},{key:"onAudioTrackLoaded",value:function(t){var e=t.details,n=t.id,r=this.tracks[n],i=e.totalduration;if(A.logger.log("track "+n+" loaded ["+e.startSN+","+e.endSN+"],duration:"+i),e.PTSKnown=!1,r.details=e,!this.startFragRequested){if(this.startPosition===-1){var o=e.startTimeOffset;isNaN(o)?this.startPosition=0:(A.logger.log("start time offset found in playlist, adjust startPosition to "+o),this.startPosition=o)}this.nextLoadPosition=this.startPosition}this.state===k.WAITING_TRACK&&(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;if(this.state===k.FRAG_LOADING&&e&&"audio"===t.frag.type&&t.frag.level===e.level&&t.frag.sn===e.sn){this.state=k.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=this.config.defaultAudioCodec||n.audioCodec;this.pendingAppending=0,this.demuxer||(this.demuxer=new h.default(this.hls,"audio")),A.logger.log("Demuxing "+s+" of ["+r.startSN+" ,"+r.endSN+"],track "+a);var u=r.PTSKnown||!r.live;this.demuxer.push(t.payload,l,null,o,e.cc,a,s,i,e.decryptdata,u)}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===k.PARSING){var n=t.tracks,r=void 0;if(r=n.audio){r.levelCodec="mp4a.40.2",r.id=t.id,this.hls.trigger(y.default.BUFFER_CODECS,n),A.logger.log("audio track:audio,container:"+r.container+",codecs[level/parsed]=["+r.levelCodec+"/"+r.codec+"]");var i=r.initSegment;i&&(this.pendingAppending++,this.hls.trigger(y.default.BUFFER_APPENDING,{type:"audio",data:i,parent:"audio",content:"initSegment"})),this.tick()}}}},{key:"onFragParsingData",value:function(t){var e=this,n=this.fragCurrent;if(n&&"audio"===t.id&&t.sn===n.sn&&t.level===n.level&&this.state===k.PARSING){var r=this.tracks[this.trackId],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),b.default.updateFragPTSDTS(r.details,i.sn,t.startPTS,t.endPTS),[t.data1,t.data2].forEach(function(n){n&&(e.pendingAppending++,e.hls.trigger(y.default.BUFFER_APPENDING,{type:t.type,data:n,parent:"audio",content:"data"}))}),this.nextLoadPosition=t.endPTS,this.tick()}}},{key:"onFragParsed",value:function(t){var e=this.fragCurrent;e&&"audio"===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:"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)switch(this.state){case k.PARSING:case k.PARSED:this.pendingAppending--,this._checkAppendedParsed()}}},{key:"_checkAppendedParsed",value:function(){if(this.state===k.PARSED&&0===this.pendingAppending){var t=this.fragCurrent,e=this.stats;if(t){this.fragPrevious=t,e.tbuffered=performance.now(),this.hls.trigger(y.default.FRAG_BUFFERED,{stats:e,frag:t,id:"audio"});var n=this.mediaBuffer?this.mediaBuffer:this.media;A.logger.log("audio buffered : "+E.default.toString(n.buffered)),this.state=k.IDLE}this.tick()}}},{key:"onError",value:function(t){var e=t.frag;if(!e||"audio"===e.type)switch(t.details){case T.ErrorDetails.FRAG_LOAD_ERROR:case T.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);A.logger.warn("audioStreamController: frag loading failed, retry in "+i+" ms"),this.retryDate=performance.now()+i,this.state=k.FRAG_LOADING_WAITING_RETRY}else A.logger.error("audioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.hls.trigger(y.default.ERROR,t),this.state=k.ERROR}break;case T.ErrorDetails.FRAG_LOOP_LOADING_ERROR:case T.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case T.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case T.ErrorDetails.KEY_LOAD_ERROR:case T.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==k.ERROR&&(this.state=t.fatal?k.ERROR:k.IDLE,A.logger.warn("audioStreamController: "+t.details+" while loading frag,switch to "+this.state+" state ..."))}}},{key:"onBufferFlushed",value:function(){this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,this.state=k.IDLE,this.fragPrevious=null,this.tick()}}]),e}(v.default);n.default=w},{20:20,24:24,25:25,26:26,28:28,29:29,39:39,43:43,45:45}],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(){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(26),u=r(l),c=t(25),d=r(c),f=t(43),h=function(t){function e(t){return i(this,e),o(this,Object.getPrototypeOf(e).call(this,t,u.default.MANIFEST_LOADING,u.default.MANIFEST_LOADED,u.default.AUDIO_TRACK_LOADED))}return a(e,t),s(e,[{key:"destroy",value:function(){d.default.prototype.destroy.call(this)}},{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=e.type,r=e.url;this.hls.trigger(u.default.AUDIO_TRACK_SWITCH,{id:t,type:n,url:r});var i=e.details;!r||void 0!==i&&i.live!==!0||(f.logger.log("(re)loading playlist for audioTrack "+t),this.hls.trigger(u.default.AUDIO_TRACK_LOADING,{url:r,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},{25:25,26:26,43:43}],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(26),u=r(l),c=t(25),d=r(c),f=t(43),h=t(24),p=function(t){function e(t){i(this,e);var n=o(this,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_UPDATED));return n._msDuration=null,n._levelDuration=null,n.onsbue=n.onSBUpdateEnd.bind(n),n.onsbe=n.onSBUpdateError.bind(n),n.pendingTracks={},n}return a(e,t),s(e,[{key:"destroy",value:function(){d.default.prototype.destroy.call(this)}},{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&&(this.media.removeAttribute("src"),this.media.load()),this.mediaSource=null,this.media=null,this.pendingTracks={},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(){this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1,this.hls.trigger(u.default.BUFFER_APPENDED,{parent:this.parent}),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),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){if(!t[n].ended)return;if(t[n].updating)return void(this._needsEos=!0)}f.logger.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment"),e.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(){if(null!==this._levelDuration){var t=this.media,e=this.mediaSource,n=this.sourceBuffer;if(t&&e&&n&&0!==t.readyState&&"open"===e.readyState){for(var r in n)if(n[r].updating)return;null===this._msDuration&&(this._msDuration=e.duration),this._levelDuration>this._msDuration&&(f.logger.log("Updating mediasource duration to "+this._levelDuration),e.duration=this._levelDuration,this._msDuration=this._levelDuration)}}}},{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;for(var r in n)e+=n[r].buffered.length;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;e[i]?(e[i].ended=!1,this.parent=r.parent,e[i].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 o={type:h.ErrorTypes.MEDIA_ERROR};if(22===e.code)return this.segments=[],o.details=h.ErrorDetails.BUFFER_FULL_ERROR,void t.trigger(u.default.ERROR,o);if(this.appendError?this.appendError++:this.appendError=1,o.details=h.ErrorDetails.BUFFER_APPEND_ERROR,o.frag=this.fragCurrent,this.appendError>t.config.appendErrorMaxRetry)return f.logger.log("fail "+t.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),n=[],o.fatal=!0,void t.trigger(u.default.ERROR,o);o.fatal=!1,t.trigger(u.default.ERROR,o)}}}}},{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+"/"+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;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}}else f.logger.warn("abort flushing too many retries");f.logger.log("buffer flushed")}return!0}}]),e}(d.default);n.default=p},{24:24,25:25,26:26,43:43}],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);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(26),u=r(l),c=t(25),d=r(c),f=function(t){function e(t){return i(this,e),o(this,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){this.hls.config.capLevelToPlayerSize&&(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.levels=t.levels,this.hls.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;t&&(this.hls.autoLevelCapping=this.getMaxLevel(t-1),this.hls.autoLevelCapping>this.autoLevelCapping&&this.hls.streamController.nextLevelSwitch(),this.autoLevelCapping=this.hls.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;return this.media&&(t=this.media.width||this.media.clientWidth||this.media.offsetWidth,t*=this.contentScaleFactor),t}},{key:"mediaHeight",get:function(){var t=void 0;return this.media&&(t=this.media.height||this.media.clientHeight||this.media.offsetHeight,t*=this.contentScaleFactor),t}}]),e}(d.default);n.default=f},{25:25,26:26}],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")}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(42),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},{42:42}],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")}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(26),u=r(l),c=t(25),d=r(c),f=t(43),h=function(t){function e(t){return i(this,e),o(this,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){this.hls.config.capLevelOnFPSDrop&&(this.video=t.media instanceof HTMLVideoElement?t.media:null,"function"==typeof this.video.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),this.hls.config.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;if(this.hls.trigger(u.default.FPS_DROP,{currentDropped:o,currentDecoded:a,totalDroppedFrames:n}),s>0&&o>this.hls.config.fpsDroppedMonitoringThreshold*a){var l=this.hls.currentLevel;f.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(this.hls.autoLevelCapping===-1||this.hls.autoLevelCapping>=l)&&(l-=1,this.hls.trigger(u.default.FPS_DROP_LEVEL_CAPPING,{level:l,droppedLevel:this.hls.currentLevel}),this.hls.autoLevelCapping=l,this.hls.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=e}}},{key:"checkFPSInterval",value:function(){if(this.video)if(this.isVideoPlaybackQualityAvailable){var t=this.video.getVideoPlaybackQuality();this.checkFPS(this.video,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(this.video,this.video.webkitDecodedFrameCount,this.video.webkitDroppedFrameCount)}}]),e}(d.default);n.default=h},{25:25,26:26,43:43}],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(26),u=r(l),c=t(25),d=r(c),f=t(43),h=t(24),p=t(28),y=r(p),g=function(t){function e(t){i(this,e);var n=o(this,Object.getPrototypeOf(e).call(this,t,u.default.MANIFEST_LOADED,u.default.LEVEL_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,this.timer&&this.tick()}},{key:"stopLoad",value:function(){this.canload=!1}},{key:"onManifestLoaded",value:function(t){var e,n,r=[],i=[],o={},a=!1,s=!1,l=this.hls;if(t.levels.forEach(function(t){t.videoCodec&&(a=!0),(t.audioCodec||t.attrs&&t.attrs.AUDIO)&&(s=!0);var e=o[t.bitrate];void 0===e?(o[t.bitrate]=r.length,t.url=[t.url],t.urlId=0,r.push(t)):r[e].url.push(t.url)}),a&&s?r.forEach(function(t){t.videoCodec&&i.push(t)}):i=r,i=i.filter(function(t){var e=function(t){return MediaSource.isTypeSupported("audio/mp4;codecs="+t)},n=function(t){return MediaSource.isTypeSupported("video/mp4;codecs="+t)},r=t.audioCodec,i=t.videoCodec;return(!r||e(r))&&(!i||n(i))}),i.length){for(e=i[0].bitrate,i.sort(function(t,e){return t.bitrate-e.bitrate}),this._levels=i,n=0;n<i.length;n++)if(i[n].bitrate===e){this._firstLevel=n,f.logger.log("manifest loaded,"+i.length+" level(s) found, first bitrate:"+e);break}l.trigger(u.default.MANIFEST_PARSED,{levels:this._levels,firstLevel:this._firstLevel,stats:t.stats,audio:s,video:a,altAudio:t.audioTracks.length>0})}else l.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:l.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;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}if(void 0!==r)if(i=this._levels[r],i.urlId<i.url.length-1)i.urlId++,i.details=void 0,f.logger.warn("level controller,"+e+" for level "+r+": switching to redundant stream id "+i.urlId);else{var a=this._manualLevel===-1&&r;if(a)f.logger.warn("level controller,"+e+": emergency switch-down for next fragment"),n.abrController.nextAutoLevel=0;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 s=this.hls,l=s.media,c=l&&y.default.isBuffered(l,l.currentTime)&&y.default.isBuffered(l,l.currentTime+.5);if(c){var d=s.config.levelLoadingRetryDelay;f.logger.warn("level controller,"+e+", but media buffered, retry in "+d+"ms"),this.timer=setTimeout(this.ontick,d)}else f.logger.error("cannot recover "+e+" error"),this._level=void 0,this.timer&&(clearTimeout(this.timer),this.timer=null),t.fatal=!0,s.trigger(u.default.ERROR,t)}}}}},{key:"onLevelLoaded",value:function(t){if(t.level===this._level){var e=t.details;if(e.live){var n=1e3*(e.averagetargetduration?e.averagetargetduration:e.targetduration),r=this._levels[t.level],i=r.details;i&&e.endSN===i.endSN&&(n/=2,f.logger.log("same live playlist, reload twice faster")),n-=performance.now()-t.stats.trequest,n=Math.max(1e3,Math.round(n)),f.logger.log("live playlist, reload in "+n+" ms"),this.timer=setTimeout(this.ontick,n)}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){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=g},{24:24,25:25,26:26,28:28,43:43}],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(39),u=r(l),c=t(28),d=r(c),f=t(20),h=r(f),p=t(26),y=r(p),g=t(25),v=r(g),m=t(29),b=r(m),_=t(45),E=r(_),T=t(24),A=t(43),k={STOPPED:"STOPPED",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_LEVEL:"WAITING_LEVEL",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR"},w=function(t){function e(t){i(this,e);var n=o(this,Object.getPrototypeOf(e).call(this,t,y.default.MEDIA_ATTACHED,y.default.MEDIA_DETACHING,y.default.MANIFEST_LOADING,y.default.MANIFEST_PARSED,y.default.LEVEL_LOADED,y.default.KEY_LOADED,y.default.FRAG_LOADED,y.default.FRAG_LOAD_EMERGENCY_ABORTED,y.default.FRAG_PARSING_INIT_SEGMENT,y.default.FRAG_PARSING_DATA,y.default.FRAG_PARSED,y.default.ERROR,y.default.AUDIO_TRACK_SWITCH,y.default.BUFFER_CREATED,y.default.BUFFER_APPENDED,y.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.media,n=this.lastCurrentTime,r=this.hls;if(this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.level=-1,this.fragLoadError=0,e&&n>0?(A.logger.log("configure startPosition @"+n.toFixed(3)),this.lastPaused||(A.logger.log("resuming video"),e.play())):this.lastCurrentTime=this.startPosition?this.startPosition:t,!this.startFragRequested){var i=r.startLevel;i===-1&&(i=0,this.bitrateTest=!0),this.level=r.nextLoadLevel=i,this.loadedmetadata=!1}this.state=k.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime,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:case k.PAUSED: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.PAUSED: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(!n&&(this.startFragRequested||!e.startFragPrefetch))return!0;var r=void 0;r=this.loadedmetadata?n.currentTime:this.nextLoadPosition;var i=t.nextLoadLevel,o=void 0;o=this.levels[i].hasOwnProperty("bitrate")?Math.max(8*e.maxBufferSize/this.levels[i].bitrate,e.maxBufferLength):e.maxBufferLength,o=Math.min(o,e.maxMaxBufferLength);var a=d.default.bufferInfo(this.mediaBuffer?this.mediaBuffer:n,r,e.maxBufferHole),s=a.len;if(s>=o)return!0;A.logger.trace("buffer length of "+s.toFixed(3)+" is below max of "+o.toFixed(3)+". checking for more payload ..."),t.nextLoadLevel=i,this.level=i;var l=this.levels[i].details;if("undefined"==typeof l||l.live&&this.levelLastLoaded!==i)return this.state=k.WAITING_LEVEL,!0;var u=this.fragPrevious;if(!l.live&&u&&u.sn===l.endSN&&(!n.seeking&&a.len||n.duration-a.end<=u.duration/2)){var c={};return this.altAudio&&(c.type="video"),this.hls.trigger(y.default.BUFFER_EOS,c),this.state=k.ENDED,!0}return this._fetchPayloadOrEos({pos:r,bufferInfo:a,levelDetails:l})}},{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){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,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(y.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,e.autoLevel=a.autoLevelEnabled,e.bitrateTest=this.bitrateTest,a.trigger(y.default.FRAG_LOADING,{frag:e}),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(y.default.KEY_LOADING,{frag:e})}},{key:"getBufferRange",value:function(t){var e,n,r=this.bufferRange;if(r)for(e=r.length-1;e>=0;e--)if(n=r[e],t>=n.start&&t<=n.end)return n;return null}},{key:"followingBufferRange",value:function(t){return t?this.getBufferRange(t.end+.5):null}},{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(y.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.state=k.PAUSED,this.hls.trigger(y.default.BUFFER_FLUSHING,{startOffset:0,endOffset: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.state=k.PAUSED,this.hls.trigger(y.default.BUFFER_FLUSHING,{startOffset:0,endOffset: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.state=k.PAUSED,this.hls.trigger(y.default.BUFFER_FLUSHING,{startOffset:r.start,endOffset:Number.POSITIVE_INFINITY})}}}},{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=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=d.default.bufferInfo(t,e,this.config.maxBufferHole),i=this.fragCurrent;if(0===r.len&&i){var o=n.maxFragLookUpTolerance,a=i.start-o,s=i.start+i.duration+o;e<a||e>s?(i.loader&&(A.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),i.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.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(y.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(y.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.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(y.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.pendingAppending=0,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=o.PTSKnown||!o.live;d.push(t.payload,c,i.videoCodec,s,e.cc,l,u,a,e.decryptdata,f)}}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&&(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(y.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.pendingAppending++,this.hls.trigger(y.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(y.default.LEVEL_PTS_UPDATED,{details:r.details,level:this.level,drift:o}),"video"===t.type&&(i.dropped=t.dropped),[t.data1,t.data2].forEach(function(n){n&&(e.pendingAppending++,a.trigger(y.default.BUFFER_APPENDING,{type:t.type,data:n,parent:"main",content:"data"}))}),this.nextLoadPosition=t.endPTS,this.bufferRange.push({type:t.type,start:t.startPTS,end:t.endPTS,frag:i}),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:"onAudioTrackSwitch",value:function(t){var e=!!t.url;if(e)this.videoBuffer&&this.mediaBuffer!==this.videoBuffer&&(A.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=this.videoBuffer);else 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 n=this.fragCurrent;n.loader&&(A.logger.log("switching to main audio track, cancel main fragment load"),n.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=k.IDLE}this.altAudio=e}},{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)switch(this.state){case k.PARSING:case k.PARSED:this.pendingAppending--,this._checkAppendedParsed()}}},{key:"_checkAppendedParsed",value:function(){if(this.state===k.PARSED&&0===this.pendingAppending){var t=this.fragCurrent,e=this.stats;if(t){this.fragPrevious=t,e.tbuffered=performance.now(),this.fragLastKbps=Math.round(8*e.total/(e.tbuffered-e.tfirst)),this.hls.trigger(y.default.FRAG_BUFFERED,{stats:e,frag:t,id:"main"});var n=this.mediaBuffer?this.mediaBuffer:this.media;A.logger.log("main buffered : "+E.default.toString(n.buffered)),this.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:if(!t.fatal){var i=this.fragLoadError;i?i++:i=1;var o=this.config;if(i<=o.fragLoadingMaxRetry||r){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.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(y.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(y.default.ERROR,t),this.state=k.ERROR));break;case T.ErrorDetails.LEVEL_LOAD_ERROR:case T.ErrorDetails.LEVEL_LOAD_TIMEOUT:case T.ErrorDetails.KEY_LOAD_ERROR:case T.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==k.ERROR&&(this.state=t.fatal?k.ERROR:k.IDLE,A.logger.warn("mediaController: "+t.details+" while loading frag,switch to "+this.state+" state ..."));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.state=k.PAUSED,this.hls.trigger(y.default.BUFFER_FLUSHING,{startOffset:0,endOffset: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=t.buffered;if(!this.loadedmetadata&&n.length){this.loadedmetadata=!0;var r=this.startPosition,i=d.default.isBuffered(t,r);e===r&&i||(A.logger.log("target start position:"+r),i||(r=n.start(0),A.logger.log("target start position not buffered, seek to buffered.start(0) "+r)),A.logger.log("adjust currentTime from "+e+" to "+r),t.currentTime=r)}else if(this.immediateSwitch)this.immediateLevelSwitchEnd();else{var o=d.default.bufferInfo(t,e,0),a=!(t.paused||t.ended||0===t.buffered.length),s=.5,l=e>t.playbackRate*this.lastCurrentTime,u=this.config;if(this.stalled&&l&&(this.stalled=!1,A.logger.log("playback not stuck anymore @"+e)),a&&o.len<=s&&(l?(s=0,this.seekHoleNudgeDuration=0):this.stalled?this.seekHoleNudgeDuration+=u.seekHoleNudgeDuration:(this.seekHoleNudgeDuration=0,A.logger.log("playback seems stuck @"+e),this.hls.trigger(y.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1}),this.stalled=!0),o.len<=s)){var c=o.nextStart,f=c-e;if(c&&f<u.maxSeekHole&&f>0){A.logger.log("adjust currentTime from "+t.currentTime+" to next buffered @ "+c+" + nudge "+this.seekHoleNudgeDuration);var h=c+this.seekHoleNudgeDuration-t.currentTime;t.currentTime=c+this.seekHoleNudgeDuration,this.hls.trigger(y.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,hole:h})}}}}}},{key:"onFragLoadEmergencyAborted",value:function(){this.state=k.IDLE,this.loadedmetadata||(this.startFragRequested=!1),this.tick()}},{key:"onBufferFlushed",value:function(){var t=this.mediaBuffer?this.mediaBuffer:this.media,e=this.bufferRange,n=[],r=void 0,i=void 0;for(i=0;i<e.length;i++)r=e[i],d.default.isBuffered(t,(r.start+r.end)/2)&&n.push(r);this.bufferRange=n,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(y.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},{20:20,24:24,25:25,26:26,28:28,29:29,39:39,43:43,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(26),u=r(l),c=t(25),d=r(c),f=t(40),h=r(f),p=function(t){function e(t){i(this,e);var n=o(this,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={newCue:function(t,e,n){if(!r.textTrack1){var i=r.getExistingTrack("1");if(i){r.textTrack1=i,r.clearCurrentCues(r.textTrack1);var o=new window.Event("addtrack");o.track=r.textTrack1,r.media.dispatchEvent(o)}else r.textTrack1=r.createTextTrack("captions","English","en"),r.textTrack1.textTrack1=!0}r.Cues.newCue(r.textTrack1,t,e,n)}},s={newCue:function(t,e,n){if(!r.textTrack2){var i=r.getExistingTrack("2");if(i){r.textTrack2=i,r.clearCurrentCues(r.textTrack2);var o=new window.Event("addtrack");o.track=r.textTrack2,r.media.dispatchEvent(o)}else 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,a,s)}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(){}},{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)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},{25:25,26:26,40:40}],13:[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){r(this,t),this._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],this._precompute();var n,i,o,a,s,l=this._tables[0][4],u=this._tables[1],c=e.length,d=1;if(4!==c&&6!==c&&8!==c)throw new Error("Invalid aes key size="+c);for(a=e.slice(0),s=[],this._key=[a,s],n=c;n<4*c+28;n++)o=a[n-1],(n%c===0||8===c&&n%c===4)&&(o=l[o>>>24]<<24^l[o>>16&255]<<16^l[o>>8&255]<<8^l[255&o],n%c===0&&(o=o<<8^o>>>24^d<<24,d=d<<1^283*(d>>7))),a[n]=a[n-c]^o;for(i=0;n;i++,n--)o=a[3&i?n:n-4],n<=4||i<4?s[i]=o:s[i]=u[0][l[o>>>24]]^u[1][l[o>>16&255]]^u[2][l[o>>8&255]]^u[3][l[255&o]]}return i(t,[{key:"_precompute",value:function(){var t,e,n,r,i,o,a,s,l,u=this._tables[0],c=this._tables[1],d=u[4],f=c[4],h=[],p=[];for(t=0;t<256;t++)p[(h[t]=t<<1^283*(t>>7))^t]=t;for(e=n=0;!d[e];e^=r||1,n=p[n]||1)for(a=n^n<<1^n<<2^n<<3^n<<4,a=a>>8^255&a^99,d[e]=a,f[a]=e,o=h[i=h[r=h[e]]],l=16843009*o^65537*i^257*r^16843008*e,s=257*h[a]^16843008*a,t=0;t<4;t++)u[t][e]=s=s<<24^s>>>8,c[t][a]=l=l<<24^l>>>8;for(t=0;t<5;t++)u[t]=u[t].slice(0),c[t]=c[t].slice(0)}},{key:"decrypt",value:function(t,e,n,r,i,o){var a,s,l,u,c=this._key[1],d=t^c[0],f=r^c[1],h=n^c[2],p=e^c[3],y=c.length/4-2,g=4,v=this._tables[1],m=v[0],b=v[1],_=v[2],E=v[3],T=v[4];for(u=0;u<y;u++)a=m[d>>>24]^b[f>>16&255]^_[h>>8&255]^E[255&p]^c[g],s=m[f>>>24]^b[h>>16&255]^_[p>>8&255]^E[255&d]^c[g+1],l=m[h>>>24]^b[p>>16&255]^_[d>>8&255]^E[255&f]^c[g+2],p=m[p>>>24]^b[d>>16&255]^_[f>>8&255]^E[255&h]^c[g+3],g+=4,d=a,f=s,h=l;for(u=0;u<4;u++)i[(3&-u)+o]=T[d>>>24]<<24^T[f>>16&255]<<16^T[h>>8&255]<<8^T[255&p]^c[g++],a=d,d=f,f=h,h=p,p=a}}]),t}();n.default=o},{}],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")}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(13),s=r(a),l=function(){function t(e,n){i(this,t),this.key=e,this.iv=n}return o(t,[{key:"ntoh",value:function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24}},{key:"doDecrypt",value:function(t,e,n){var r,i,o,a,l,u,c,d,f,h=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2),p=new s.default(Array.prototype.slice.call(e)),y=new Uint8Array(t.byteLength),g=new Int32Array(y.buffer);for(r=~~n[0],i=~~n[1],o=~~n[2],a=~~n[3],f=0;f<h.length;f+=4)l=~~this.ntoh(h[f]),u=~~this.ntoh(h[f+1]),c=~~this.ntoh(h[f+2]),d=~~this.ntoh(h[f+3]),p.decrypt(l,u,c,d,g,f),g[f]=this.ntoh(g[f]^r),g[f+1]=this.ntoh(g[f+1]^i),g[f+2]=this.ntoh(g[f+2]^o),g[f+3]=this.ntoh(g[f+3]^a),r=l,i=u,o=c,a=d;return y}},{key:"localDecrypt",value:function(t,e,n,r){var i=this.doDecrypt(t,e,n);r.set(i,t.byteOffset)}},{key:"decrypt",value:function(t){var e=32e3,n=new Int32Array(t),r=new Uint8Array(t.byteLength),i=0,o=this.key,a=this.iv;for(this.localDecrypt(n.subarray(i,i+e),o,a,r),i=e;i<n.length;i+=e)a=new Uint32Array([this.ntoh(n[i-4]),this.ntoh(n[i-3]),this.ntoh(n[i-2]),this.ntoh(n[i-1])]),this.localDecrypt(n.subarray(i,i+e),o,a,r);return r}}]),t}();n.default=l},{13:13}],15:[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(24),u=t(43),c=function(){function t(e){i(this,t),this.hls=e;try{var n=window?window.crypto:crypto;this.subtle=n.subtle||n.webkitSubtle,this.disableWebCrypto=!this.subtle}catch(t){this.disableWebCrypto=!0}}return o(t,[{key:"destroy",value:function(){}},{key:"decrypt",value:function(t,e,n,r){this.disableWebCrypto&&this.hls.config.enableSoftwareAES?this.decryptBySoftware(t,e,n,r):this.decryptByWebCrypto(t,e,n,r)}},{key:"decryptByWebCrypto",value:function(t,e,n,r){var i=this;u.logger.log("decrypting by WebCrypto API"),this.subtle.importKey("raw",e,{name:"AES-CBC",length:128},!1,["decrypt"]).then(function(o){i.subtle.decrypt({name:"AES-CBC",iv:n.buffer},o,t).then(r).catch(function(o){i.onWebCryptoError(o,t,e,n,r)})}).catch(function(o){i.onWebCryptoError(o,t,e,n,r)})}},{key:"decryptBySoftware",value:function(t,e,n,r){u.logger.log("decrypting by JavaScript Implementation");var i=new DataView(e.buffer),o=new Uint32Array([i.getUint32(0),i.getUint32(4),i.getUint32(8),i.getUint32(12)]);i=new DataView(n.buffer);var a=new Uint32Array([i.getUint32(0),i.getUint32(4),i.getUint32(8),i.getUint32(12)]),l=new s.default(o,a);r(l.decrypt(t).buffer)}},{key:"onWebCryptoError",value:function(t,e,n,r,i){this.hls.config.enableSoftwareAES?(u.logger.log("disabling to use WebCrypto API"),this.disableWebCrypto=!0,this.decryptBySoftware(e,n,r,i)):(u.logger.error("decrypting error : "+t.message),this.hls.trigger(Event.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!0,reason:t.message}))}}]),t}();n.default=c},{14:14,24:24,43:43}],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(17),s=r(a),l=t(43),u=t(22),c=r(u),d=function(){function t(e,n,r,o){i(this,t),this.observer=e,this.id=n,this.remuxerClass=r,this.config=o,this.remuxer=new this.remuxerClass(e,n,o),this.insertDiscontinuity()}return o(t,[{key:"insertDiscontinuity",value:function(){this._aacTrack={container:"audio/adts",type:"audio",id:-1,sequenceNumber:0,samples:[],len:0}}},{key:"push",value:function(t,e,n,r,i,o,a,u,d){var f,h,p,y,g,v,m,b,_,E,T=new c.default(t),A=90*T.timeStamp,k=!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&&(k=!0),f=this._aacTrack,this.lastSN=a,this.lastLevel=o,v=T.length,_=t.length;v<_-1&&(255!==t[v]||240!==(240&t[v+1]));v++);for(f.audiosamplerate||(h=s.default.getAudioConfig(this.observer,t,v,e),f.config=h.config,f.audiosamplerate=h.samplerate,f.channelCount=h.channelCount,f.codec=h.codec,f.duration=u,l.logger.log("parsed codec:"+f.codec+",rate:"+h.samplerate+",nb channel:"+h.channelCount)),g=0,y=9216e4/f.audiosamplerate;v+5<_&&(m=1&t[v+1]?7:9,p=(3&t[v+3])<<11|t[v+4]<<3|(224&t[v+5])>>>5,p-=m,p>0&&v+m+p<=_);)for(b=A+g*y,E={unit:t.subarray(v+m,v+m+p),pts:b,dts:b},f.samples.push(E),f.len+=p,v+=p+m,g++;v<_-1&&(255!==t[v]||240!==(240&t[v+1]));v++);this.remuxer.remux(o,a,this._aacTrack,{samples:[]},{samples:[{pts:A,dts:A,unit:T.payload}]},{samples:[]},r,k,d)}},{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},{17:17,22:22,43:43}],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=t(43),a=t(24),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=[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>f.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+"["+f[s]+"Hz],channelConfig:"+u),/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),{config:c,samplerate:f[s],channelCount:u,codec:"mp4a.40."+i})}}]),t}();n.default=s},{24:24,43:43}],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(26),s=r(a),l=t(24),u=t(16),c=r(u),d=t(23),f=r(d),h=t(36),p=r(h),y=t(37),g=r(y),v=function(){function t(e,n,r){var o=arguments.length<=3||void 0===arguments[3]?null:arguments[3];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,u,d){var h=this.demuxer;if(!h){var y=this.hls,v=this.id;if(f.default.probe(t))h=this.typeSupported.mp2t===!0?new f.default(y,v,g.default,this.config):new f.default(y,v,p.default,this.config);else{if(!c.default.probe(t))return void y.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 c.default(y,v,p.default,this.config)}this.demuxer=h}h.push(t,e,n,r,i,o,a,u,d)}}]),t}();n.default=v},{16:16,23:23,24:24,26:26,36:36,37:37}],19:[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(18),o=r(i),a=t(26),s=r(a),l=t(43),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)}catch(t){console.warn("demuxerWorker: unable to enable logs")}n("init",null);break;case"demux":t.demuxer.push(new Uint8Array(i.data),i.audioCodec,i.videoCodec,i.timeOffset,i.cc,i.level,i.sn,i.duration,i.accurateTimeOffset)}}),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.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,18:18,26:26,43:43}],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(26),s=r(a),l=t(18),u=r(l),c=t(19),d=r(c),f=t(43),h=t(15),p=r(h),y=t(24),g=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")};if(n.config.enableWorker&&"undefined"!=typeof Worker){f.logger.log("demuxing in webworker");var a=void 0;try{var l=t(2);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:y.ErrorTypes.OTHER_ERROR,details:y.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)}var n=this.decrypter;n&&(n.destroy(),this.decrypter=null)}},{key:"pushDecrypted",value:function(t,e,n,r,i,o,a,s,l){var u=this.w;if(u)u.postMessage({cmd:"demux",data:t,audioCodec:e,videoCodec:n,timeOffset:r,cc:i,level:o,sn:a,duration:s,accurateTimeOffset:l},[t]);else{var c=this.demuxer;c&&c.push(new Uint8Array(t),e,n,r,i,o,a,s,l)}}},{key:"push",value:function(t,e,n,r,i,o,a,s,l,u){if(t.byteLength>0&&null!=l&&null!=l.key&&"AES-128"===l.method){null==this.decrypter&&(this.decrypter=new p.default(this.hls));var c=this;this.decrypter.decrypt(t,l.key,l.iv,function(t){c.pushDecrypted(t,e,n,r,i,o,a,s,u)})}else this.pushDecrypted(t,e,n,r,i,o,a,s,u)}},{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=g},{15:15,18:18,19:19,2:2,24:24,26:26,43:43}],21:[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(43),a=function(){function t(e){r(this,t),this.data=e,this.bytesAvailable=this.data.byteLength,this.word=0,this.bitsAvailable=0}return i(t,[{key:"loadWord",value:function(){var t=this.data.byteLength-this.bytesAvailable,e=new Uint8Array(4),n=Math.min(4,this.bytesAvailable);if(0===n)throw new Error("no bytes available");e.set(this.data.subarray(t,t+n)),this.word=new DataView(e.buffer).getUint32(0),this.bitsAvailable=8*n,this.bytesAvailable-=n}},{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=1;if(this.readUByte(),t=this.readUByte(),e=this.readBits(5),this.skipBits(3),n=this.readUByte(),this.skipUEG(),100===t||110===t||122===t||244===t||44===t||83===t||86===t||118===t||128===t){var p=this.readUEG();if(3===p&&this.skipBits(1),this.skipUEG(),this.skipUEG(),this.skipBits(1),this.readBoolean())for(s=3!==p?8:12,l=0;l<s;l++)this.readBoolean()&&(l<6?this.skipScalingList(16):this.skipScalingList(64))}this.skipUEG();var y=this.readUEG();if(0===y)this.readUEG();else if(1===y)for(this.skipBits(1),this.skipEG(),this.skipEG(),r=this.readUEG(),l=0;l<r;l++)this.skipEG();if(this.skipUEG(),this.skipBits(1),i=this.readUEG(),o=this.readUEG(),a=this.readBits(1),0===a&&this.skipBits(1),this.skipBits(1),this.readBoolean()&&(u=this.readUEG(),c=this.readUEG(),d=this.readUEG(),f=this.readUEG()),this.readBoolean()&&this.readBoolean()){var g=void 0,v=this.readUByte();switch(v){case 1:g=[1,1];break;case 2:g=[12,11];break;case 3:g=[10,11];break;case 4:g=[16,11];break;case 5:g=[40,33];break;case 6:g=[24,11];break;case 7:g=[20,11];break;case 8:g=[32,11];break;case 9:g=[80,33];break;case 10:g=[18,11];break;case 11:g=[15,11];break;case 12:g=[64,33];break;case 13:g=[160,99];break;case 14:g=[4,3];break;case 15:g=[3,2];break;case 16:g=[2,1];break;case 255:g=[this.readUByte()<<8|this.readUByte(),this.readUByte()<<8|this.readUByte()]}g&&(h=g[0]/g[1])}return{width:Math.ceil((16*(i+1)-2*u-2*c)*h),height:(2-a)*(o+1)*16-(a?2:4)*(d+f)}}},{key:"readSliceType",value:function(){return this.readUByte(),this.readUEG(),this.readUEG()}}]),t}();n.default=a},{43:43}],22:[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(43),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},{43:43}],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")}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(17),s=r(a),l=t(26),u=r(l),c=t(21),d=r(c),f=t(43),h=t(24),p=function(){function t(e,n,r,o){i(this,t),this.observer=e,this.id=n,this.remuxerClass=r,this.config=o,this.lastCC=0,this.remuxer=new this.remuxerClass(e,n,o)}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._aacTrack={container:"video/mp2t",type:"audio",id:-1,sequenceNumber:0,samples:[],len: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){var c,d,p,y,g,v,m=t.length,b=this.remuxer.passthrough,_=!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 E=this.pmtParsed,T=this._avcTrack,A=this._aacTrack,k=this._id3Track,w=T.id,S=A.id,L=k.id,R=this._pmtId,O=T.pesData,C=A.pesData,P=k.pesData,D=this._parsePAT,I=this._parsePMT,x=this._parsePES,N=this._parseAVCPES.bind(this),M=this._parseAACPES.bind(this),F=this._parseID3PES.bind(this);for(m-=m%188,c=0;c<m;c+=188)if(71===t[c]){if(d=!!(64&t[c+1]),p=((31&t[c+1])<<8)+t[c+2],y=(48&t[c+3])>>4,y>1){if(g=c+5+t[c+4],g===c+188)continue}else g=c+4;switch(p){case w:if(d){if(O&&(v=x(O))&&(N(v,!1),b&&T.codec&&(S===-1||A.codec)))return void this.remux(o,a,t,r);O={data:[],size:0}}O&&(O.data.push(t.subarray(g,c+188)),O.size+=c+188-g);break;case S:if(d){if(C&&(v=x(C))&&(M(v),b&&A.codec&&(w===-1||T.codec)))return void this.remux(o,a,t,r);C={data:[],size:0}}C&&(C.data.push(t.subarray(g,c+188)),C.size+=c+188-g);break;case L:d&&(P&&(v=x(P))&&F(v),P={data:[],size:0}),P&&(P.data.push(t.subarray(g,c+188)),P.size+=c+188-g);break;case 0:d&&(g+=t[g]+1),R=this._pmtId=D(t,g);break;case R:d&&(g+=t[g]+1);var B=I(t,g);w=T.id=B.avc,S=A.id=B.aac,L=k.id=B.id3,_&&!E&&(f.logger.log("reparse from beginning"),_=!1,c=-188),E=this.pmtParsed=!0;break;case 17:case 8191:break;default:_=!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"});O&&(v=x(O))?(N(v,!0),T.pesData=null):T.pesData=O,C&&(v=x(C))?(M(v),A.pesData=null):(C&&C.size&&f.logger.log("last AAC PES packet truncated,might overlap between fragments"),A.pesData=C),P&&(v=x(P))?(F(v),k.pesData=null):k.pesData=P,this.remux(o,a,null,r)}},{key:"remux",value:function(t,e,n,r){var i=this._avcTrack,o=i.samples,a=o.reduce(function(t,e){var n=e.units.units.reduce(function(t,e){return{len:t.len+e.data.length,nbNalu:t.nbNalu+1}},{len:0,nbNalu:0});return e.length=n.len,{len:t.len+n.len,nbNalu:t.nbNalu+n.nbNalu}},{len:0,nbNalu:0});i.len=a.len,i.nbNalu=a.nbNalu,this.remuxer.remux(t,e,this._aacTrack,this._avcTrack,this._id3Track,this._txtTrack,r,this.contiguous,this.accurateTimeOffset,n)}},{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){var n,r,i,o,a={aac:-1,avc:-1,id3:-1};for(n=(15&t[e+1])<<8|t[e+2],r=e+3+n-4,i=(15&t[e+10])<<8|t[e+11],e+=12+i;e<r;){switch(o=(31&t[e+1])<<8|t[e+2],t[e]){case 15:a.aac===-1&&(a.aac=o);break;case 21:a.id3===-1&&(a.id3=o);break;case 27:a.avc===-1&&(a.avc=o);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 a}},{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 f=new Uint8Array(d[0].length+d[1].length);f.set(d[0]),f.set(d[1],d[0].length),d[0]=f,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;for(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)):l=s),o=e[8],u=o+9,t.size-=u,a=new Uint8Array(t.size);d.length;){e=d.shift();var h=e.byteLength;if(u){if(u>h){u-=h;continue}e=e.subarray(u),h-=u,u=0}a.set(e,c),c+=h}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&&(!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 ");break;case 5:r=!0,u||(u=o.avcSample=o._createAVCSample(!0,t.pts,t.dts,"")),l&&(u.debug+="IDR "),u.key=!0;break;case 6:r=!0,l&&u&&(u.debug+="SEI "),n=new d.default(o.discardEPB(e.data)),n.readUByte();for(var s=0,c=0,f=!1,h=0;!f&&n.bytesAvailable>1;){s=0;do h=n.readUByte(),s+=h;while(255===h);c=0;do h=n.readUByte(),c+=h;while(255===h);if(4===s&&0!==n.bytesAvailable){f=!0;var p=n.readUByte();if(181===p){var y=n.readUShort();if(49===y){var g=n.readUInt();if(1195456820===g){var v=n.readUByte();if(3===v){var m=n.readUByte(),b=n.readUByte(),_=31&m,E=[m,b];for(i=0;i<_;i++)E.push(n.readUByte()),E.push(n.readUByte()),E.push(n.readUByte());o._insertSampleInOrder(o._txtTrack.samples,{type:3,pts:t.pts,bytes:E})}}}}}else if(c<n.bytesAvailable)for(i=0;i<c;i++)n.readUByte()}break;case 7:if(r=!0,l&&u&&(u.debug+="SPS "),!a.sps){n=new d.default(e.data);var T=n.readSPS();a.width=T.width,a.height=T.height,a.sps=[e.data],a.duration=o._duration;var A=e.data.subarray(1,4),k="avc1.";for(i=0;i<3;i++){var w=A[i].toString(16);w.length<2&&(w="0"+w),k+=w}a.codec=k}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 S=u.units;S.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){for(var e,n,r,i,o,a=0,s=t.byteLength,l=this._avcTrack,u=l.naluState||0,c=u,d=[],f=-1;a<s;)switch(e=t[a++],u){case 0:0===e&&(u=1);break;case 1:u=0===e?2:0;break;case 2:case 3:if(0===e)u=3;else 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;break;case-1:f=0,o=31&e,u=0}if(f>=0&&u>=0&&(r={data:t.subarray(f,s),type:o,state:u},d.push(r)),0===d.length){var y=this._getLastNalUnit();if(y){var g=new Uint8Array(y.data.byteLength+t.byteLength);g.set(y.data,0),g.set(t,y.data.byteLength),y.data=g}}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._aacTrack,y=t.data,g=t.pts,v=0,m=this.aacOverFlow,b=this.aacLastPTS;if(m){var _=new Uint8Array(m.byteLength+y.byteLength);_.set(m,0),_.set(y,m.byteLength),y=_}for(o=v,c=y.length;o<c-1&&(255!==y[o]||240!==(240&y[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||(e=s.default.getAudioConfig(this.observer,y,o,this.audioCodec),p.config=e.config,p.audiosamplerate=e.samplerate,p.channelCount=e.channelCount,p.codec=e.codec,p.duration=this._duration,f.logger.log("parsed codec:"+p.codec+",rate:"+e.samplerate+",nb channel:"+e.channelCount)),i=0,r=9216e4/p.audiosamplerate,m&&b){var A=b+r;Math.abs(A-g)>1&&(f.logger.log("AAC: align PTS for overlapping frames by "+Math.round((A-g)/90)),g=A)}for(;o+5<c&&(a=1&y[o+1]?7:9,n=(3&y[o+3])<<11|y[o+4]<<3|(224&y[o+5])>>>5,n-=a,n>0&&o+a+n<=c);)for(l=g+i*r,d={unit:y.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!==y[o]||240!==(240&y[o+1]));o++);m=o<c?y.subarray(o,c):null,this.aacOverFlow=m,this.aacLastPTS=l}},{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},{17:17,21:21,24:24,26:26,43:43}],24:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.ErrorTypes={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",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",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",INTERNAL_EXCEPTION:"internalException"}},{}],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"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"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(43),l=t(24),u=t(26),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},{24:24,26:26,43:43}],26:[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_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",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"}},{}],27:[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){return 1===t?new Uint8Array([0,200,0,128,35,128]):2===t?new Uint8Array([33,0,73,144,2,25,0,35,128]):3===t?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]):4===t?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]):5===t?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]):6===t?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]):null}}]),t}();n.default=o},{}],28:[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){a=d;break}}return{len:r,start:i,end:o,nextStart:a}}}]),t}();n.default=o},{}],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=t(43),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(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},{43:43}],30:[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(26),s=r(a),l=t(24),u=t(34),c=r(u),d=t(32),f=r(d),h=t(3),p=r(h),y=t(6),g=r(y),v=t(7),m=r(v),b=t(4),_=r(b),E=t(11),T=r(E),A=t(10),k=r(A),w=t(12),S=r(w),L=t(9),R=r(L),O=t(5),C=r(O),P=t(43),D=t(47),I=r(D),x=t(1),N=r(x),M=t(33),F=r(M),B=t(41),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&&"function"==typeof window.MediaSource.isTypeSupported&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"version",get:function(){return"0.6.7"}},{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,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,maxSeekHole:2,seekHoleNudgeDuration:.01,stalledInBufferedNudgeThreshold:10,maxFragLookUpTolerance:.2,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxMaxBufferLength:600,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:g.default,capLevelController:m.default,fpsController:R.default,streamController:T.default,audioStreamController:_.default,timelineController:S.default,cueHandler:U.default,enableCEA708Captions:!0,enableMP2TPassThrough:!1,stretchShortVideoTrack:!1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:5,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.8,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]?-1:arguments[0];P.logger.log("startLoad"),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 this.levelController.firstLevel},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,24:24,26:26,3:3,32:32,33:33,34:34,4:4,41:41,43:43,47:47,5:5,6:6,7:7,9:9}],31:[function(t,e,n){"use strict";e.exports=t(30).default},{30:30}],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")}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(26),u=r(l),c=t(25),d=r(c),f=t(24),h=t(43),p=function(t){function e(t){i(this,e);var n=o(this,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},{24:24,25:25,26:26,43:43}],33:[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(26),u=r(l),c=t(25),d=r(c),f=t(24),h=t(43),p=function(t){function e(t){i(this,e);var n=o(this,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 fragment 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[n.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},{24:24,25:25,26:26,43:43}],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(26),u=r(l),c=t(25),d=r(c),f=t(24),h=t(46),p=r(h),y=t(38),g=r(y),v=t(43),m=function(t){function e(t){i(this,e);var n=o(this,Object.getPrototypeOf(e).call(this,t,u.default.MANIFEST_LOADING,u.default.LEVEL_LOADING,u.default.AUDIO_TRACK_LOADING));return n.loaders={},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:"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 level "+e.level)),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 p.default.buildAbsoluteURL(e,t)}},{key:"parseMasterPlaylist",value:function(t,e){for(var n=[],r=void 0,i=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g;null!=(r=i.exec(t));){var o={},a=o.attrs=new g.default(r[1]);o.url=this.resolve(r[2],e);var s=a.decimalResolution("RESOLUTION");s&&(o.width=s.width,o.height=s.height),o.bitrate=a.decimalInteger("AVERAGE-BANDWIDTH")||a.decimalInteger("BANDWIDTH"),o.name=a.NAME;var l=a.CODECS;if(l){l=l.split(",");for(var u=0;u<l.length;u++){var c=l[u];c.indexOf("avc1")!==-1?o.videoCodec=this.avc1toavcoti(c):o.audioCodec=c}}n.push(o)}return n}},{key:"parseMasterPlaylistMedia",value:function(t,e,n){for(var r=void 0,i=[],o=/#EXT-X-MEDIA:(.*)/g;null!=(r=o.exec(t));){var a={},s=new g.default(r[1]);s.TYPE===n&&(a.groupId=s["GROUP-ID"],a.name=s.NAME,a.type=n,a.default="YES"===s.DEFAULT,a.autoselect="YES"===s.AUTOSELECT,a.forced="YES"===s.FORCED,s.URI&&(a.url=this.resolve(s.URI,e)),a.lang=s.LANGUAGE,a.name||(a.name=a.lang),i.push(a))}return i}},{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=this.cloneObj(t),n.iv=this.createInitializationVector(e)),n}},{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:"cloneObj",value:function(t){return JSON.parse(JSON.stringify(t))}},{key:"parseLevelPlaylist",value:function(t,e,n,r){var i,o,a,s=0,l=0,u={type:null,version:null,url:e,fragments:[],live:!0,startSN:0},c={method:null,key:null,iv:null,uri:null},d=0,f=null,h=null,p=null,y=null,m=null,b=null,_=[];for(a=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE):(\d+))|(?:#EXT-X-(TARGETDURATION):(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT(INF):(\d+(?:\.\d+)?)(?:,(.*))?)|(?:(?!#)()(\S.+))|(?:#EXT-X-(BYTERANGE):(\d+(?:@\d+(?:\.\d+)?)?)|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(PROGRAM-DATE-TIME):(.+))|(?:#EXT-X-(VERSION):(\d+))|(?:(#)(.*):(.*))|(?:(#)(.*)))(?:.*)\r?\n?/g;null!==(o=a.exec(t));)switch(o.shift(),o=o.filter(function(t){return void 0!==t}),o[0]){case"PLAYLIST-TYPE":u.type=o[1].toUpperCase();break;case"MEDIA-SEQUENCE":s=u.startSN=parseInt(o[1]);break;case"TARGETDURATION":u.targetduration=parseFloat(o[1]);break;case"VERSION":u.version=parseInt(o[1]);break;case"EXTM3U":break;case"ENDLIST":u.live=!1;break;case"DIS":d++,_.push(o);break;case"BYTERANGE":var E=o[1].split("@");b=1===E.length?m:parseInt(E[1]),m=parseInt(E[0])+b;break;case"INF":p=parseFloat(o[1]),y=o[2]?o[2]:null,_.push(o);break;case"":if(!isNaN(p)){var T=s++;i=this.fragmentDecryptdataFromLevelkey(c,T);var A=o[1]?this.resolve(o[1],e):null;h={url:A,type:r,duration:p,title:y,start:l,sn:T,level:n,cc:d,decryptdata:i,programDateTime:f,tagList:_},null!==b&&(h.byteRangeStartOffset=b,h.byteRangeEndOffset=m),u.fragments.push(h),l+=p,p=null,y=null,b=null,f=null,_=[]}break;case"KEY":var k=o[1],w=new g.default(k),S=w.enumeratedString("METHOD"),L=w.URI,R=w.hexadecimalInteger("IV");S&&(c={method:null,key:null,iv:null,uri:null},L&&"AES-128"===S&&(c.method=S,c.uri=this.resolve(L,e),c.key=null,c.iv=R));break;case"START":var O=o[1],C=new g.default(O),P=C.decimalFloatingPoint("TIME-OFFSET");isNaN(P)||(u.startTimeOffset=P); +break;case"PROGRAM-DATE-TIME":f=new Date(Date.parse(o[1])),_.push(o);break;case"#":o.shift(),_.push(o);break;default:v.logger.warn("line parsed but not handled: "+o)}return h&&!h.url&&(u.fragments.pop(),l-=h.duration),u.totalduration=l,u.averagetargetduration=l/u.fragments.length,u.endSN=s-1,u}},{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 c="audioTrack"!==o,d=this.parseLevelPlaylist(r,i,(c?s:a)||0,c?"main":"audio");"manifest"===o&&l.trigger(u.default.MANIFEST_LOADED,{levels:[{url:i,details:d}],audioTracks:[],url:i,stats:e}),e.tparsed=performance.now(),c?l.trigger(u.default.LEVEL_LOADED,{details:d,level:s||0,id:a||0,stats:e}):l.trigger(u.default.AUDIO_TRACK_LOADED,{details:d,id:a,stats:e})}else{var h=this.parseMasterPlaylist(r,i);if(h.length){var p=this.parseMasterPlaylistMedia(r,i,"AUDIO");if(p.length){var y=!1;p.forEach(function(t){t.url||(y=!0)}),y===!1&&h[0].audioCodec&&!h[0].attrs.AUDIO&&(v.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),p.unshift({type:"main",name:"main"}))}l.trigger(u.default.MANIFEST_LOADED,{levels:h,audioTracks:p,url:i,stats:e})}else l.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:i,reason:"no level found in manifest"})}else l.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.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=f.ErrorDetails.MANIFEST_LOAD_ERROR,r=!0;break;case"level":n=f.ErrorDetails.LEVEL_LOAD_ERROR,r=!1;break;case"audioTrack":n=f.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,r=!1}i&&(i.abort(),this.loaders[e.type]=void 0),this.hls.trigger(u.default.ERROR,{type:f.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=f.ErrorDetails.MANIFEST_LOAD_TIMEOUT,r=!0;break;case"level":n=f.ErrorDetails.LEVEL_LOAD_TIMEOUT,r=!1;break;case"audioTrack":n=f.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT,r=!1}i&&(i.abort(),this.loaders[e.type]=void 0),this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:n,fatal:r,url:i.url,loader:i,context:e})}}]),e}(d.default);n.default=m},{24:24,25:25,26:26,38:38,43:43,46:46}],35:[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:[],mvex:[],mvhd:[],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;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])))}},{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:"stsd",value:function(e){return"audio"===e.type?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))}},{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},{}],36:[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(27),s=r(a),l=t(26),u=r(l),c=t(43),d=t(35),f=r(d),h=t(24);t(44);var p=function(){function t(e,n,r){i(this,t),this.observer=e,this.id=n,this.config=r,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){if(this.level=t,this.sn=e,this.ISGenerated||this.generateIS(n,r,a),this.ISGenerated)if(n.samples.length){var c=this.remuxAudio(n,a,s,l);if(r.samples.length){var d=void 0;c&&(d=c.endPTS-c.startPTS),this.remuxVideo(r,a,s,d)}}else{var f=void 0;r.samples.length&&(f=this.remuxVideo(r,a,s)),f&&n.codec&&this.remuxEmptyAudio(n,a,s,f)}i.samples.length&&this.remuxID3(i,a),o.samples.length&&this.remuxText(o,a),this.observer.trigger(u.default.FRAG_PARSED,{id:this.id,level:this.level,sn:this.sn})}},{key:"generateIS",value:function(t,e,n){var r,i,o=this.observer,a=t.samples,s=e.samples,l=this.PES_TIMESCALE,d={},p={id:this.id,level:this.level,sn:this.sn,tracks:d,unique:!1},y=void 0===this._initPTS;y&&(r=i=1/0),t.config&&a.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,1024)}(),c.logger.log("audio mp4 timescale :"+t.timescale),d.audio={container:"audio/mp4",codec:t.codec,initSegment:f.default.initSegment([t]),metadata:{channelCount:t.channelCount}},y&&(r=i=a[0].pts-l*n)),e.sps&&e.pps&&s.length&&(e.timescale=this.MP4_TIMESCALE,d.video={container:"video/mp4",codec:e.codec,initSegment:f.default.initSegment([e]),metadata:{width:e.width,height:e.height}},y&&(r=Math.min(r,s[0].pts-l*n),i=Math.min(i,s[0].dts-l*n))),Object.keys(d).length?(o.trigger(u.default.FRAG_PARSING_INIT_SEGMENT,p),this.ISGenerated=!0,y&&(this._initPTS=r,this._initDTS=i)):o.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,h,p,y=8,g=this.PES_TIMESCALE,v=this.PES2MP4SCALEFACTOR,m=t.samples,b=[],_=m.reduce(function(t,e){return Math.max(Math.min(t,e.pts-e.dts),-18e3)},0);if(_<0){c.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Math.round(_/90)+" ms to overcome this issue");for(var E=0;E<m.length;E++)m[E].dts+=_}var T=void 0;T=n?this.nextAvcDts:e*g;var A=m[0];l=Math.max(this._PTSNormalize(A.dts-this._initDTS,T),0),s=Math.max(this._PTSNormalize(A.pts-this._initDTS,T),0);var k=Math.round((l-T)/90);n&&k&&(k>1?c.logger.log("AVC:"+k+" ms hole between fragments detected,filling it"):k<-1&&c.logger.log("AVC:"+-k+" ms overlapping between fragments detected"),l=T,m[0].dts=l+this._initDTS,s=Math.max(s-k,T),m[0].pts=s+this._initDTS,c.logger.log("Video/PTS/DTS adjusted: "+Math.round(s/90)+"/"+Math.round(l/90)+",delta:"+k+" ms")),d=l,A=m[m.length-1],p=Math.max(this._PTSNormalize(A.dts-this._initDTS,T),0),h=Math.max(this._PTSNormalize(A.pts-this._initDTS,T),0),h=Math.max(h,p);var w=navigator.vendor,S=navigator.userAgent,L=w&&w.indexOf("Apple")>-1&&S&&!S.match("CriOS");L&&(i=Math.round((p-l)/(v*(m.length-1))));for(var R=0;R<m.length;R++){var O=m[R];L?O.dts=l+R*v*i:(O.dts=Math.max(this._PTSNormalize(O.dts-this._initDTS,T),l),O.dts=Math.round(O.dts/v)*v),O.pts=Math.max(this._PTSNormalize(O.pts-this._initDTS,T),O.dts),O.pts=Math.round(O.pts/v)*v}o=new Uint8Array(t.len+4*t.nbNalu+8);var C=new DataView(o.buffer);C.setUint32(0,o.byteLength),o.set(f.default.types.mdat,4);for(var P=0;P<m.length;P++){for(var D=m[P],I=0,x=void 0;D.units.units.length;){var N=D.units.units.shift();C.setUint32(y,N.data.byteLength),y+=4,o.set(N.data,y),y+=N.data.byteLength,I+=4+N.data.byteLength}if(L)x=Math.max(0,i*Math.round((D.pts-D.dts)/(v*i)));else{if(P<m.length-1)i=m[P+1].dts-D.dts;else{var M=this.config,F=D.dts-m[P>0?P-1:P].dts;if(M.stretchShortVideoTrack){var B=M.maxBufferHole,U=M.maxSeekHole,j=Math.floor(Math.min(B,U)*g),G=(r?s+r*g:this.nextAacPts)-D.pts;G>j?(i=G-F,i<0&&(i=F),c.logger.log("It is approximately "+G/90+" ms to the next segment; using duration "+i/90+" ms for the last video frame.")):i=F}else i=F}i/=v,x=Math.round((D.pts-D.dts)/v)}b.push({size:I,duration:i,cts:x,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:D.key?2:1,isNonSync:D.key?0:1}})}this.nextAvcDts=p+i*v;var Y=t.dropped;if(t.len=0,t.nbNalu=0,t.dropped=0,b.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var V=b[0].flags;V.dependsOn=2,V.isNonSync=0}t.samples=b,a=f.default.moof(t.sequenceNumber++,l/v,t),t.samples=[];var K={id:this.id,level:this.level,sn:this.sn,data1:a,data2:o,startPTS:s/g,endPTS:(h+v*i)/g,startDTS:l/g,endDTS:this.nextAvcDts/g,type:"video",nb:b.length,dropped:Y};return this.observer.trigger(u.default.FRAG_PARSING_DATA,K),K}},{key:"remuxAudio",value:function(t,e,n,r){var i,o,a,l,d,h,p,y,g,v,m,b,_,E,T,A=this.PES_TIMESCALE,k=t.timescale,w=A/k,S=1024*t.timescale/t.audiosamplerate,L=8,R=[],O=[];t.samples.sort(function(t,e){return t.pts-e.pts}),O=t.samples,n|=O.length&&this.nextAacPts&&Math.abs(e-this.nextAacPts/A)<.1;var C=n?this.nextAacPts:e*A,P=S*w,D=C;if(r)for(var I=0;I<O.length;){var x=O[I],N=this._PTSNormalize(x.pts-this._initDTS,C),M=N-D;if(M<=-P)c.logger.warn("Dropping 1 audio frame @ "+Math.round(D/90)/1e3+"s due to "+Math.round(Math.abs(M/90))+" ms overlap."),O.splice(I,1),t.len-=x.unit.length;else if(M>=P){var F=Math.round(M/P);c.logger.warn("Injecting "+F+" audio frame @ "+Math.round(D/90)/1e3+"s due to "+Math.round(M/90)+" ms gap.");for(var B=0;B<F;B++)T=D+this._initDTS,T=Math.max(T,this._initDTS),E=s.default.getSilentFrame(t.channelCount),E||(c.logger.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),E=x.unit.slice(0)),O.splice(I,0,{unit:E,pts:T,dts:T}),t.len+=E.length,D+=P,I+=1;x.pts=x.dts=D+this._initDTS,D+=P,I+=1}else Math.abs(M)>.1*P,D+=P,0===I?x.pts=x.dts=this._initDTS+C:x.pts=x.dts=O[I-1].pts+P,I+=1}for(;O.length;){if(o=O.shift(),l=o.unit,v=o.pts-this._initDTS,m=o.dts-this._initDTS,void 0!==g)b=this._PTSNormalize(v,g),_=this._PTSNormalize(m,g),a.duration=Math.round((_-g)/w);else{b=this._PTSNormalize(v,C),_=this._PTSNormalize(m,C);var U=Math.round(1e3*(b-C)/A),j=0;if(n&&U){if(U>0)j=Math.round((b-C)/P),c.logger.log(U+" ms hole between AAC samples detected,filling it"),j>0&&(E=s.default.getSilentFrame(t.channelCount),E||(E=l.slice(0)),t.len+=j*E.length);else if(U<-12){c.logger.log(-U+" ms overlapping between AAC samples detected, drop frame"),t.len-=l.byteLength;continue}b=_=C}if(p=Math.max(0,b),y=Math.max(0,_),!(t.len>0))return;d=new Uint8Array(t.len+8),i=new DataView(d.buffer),i.setUint32(0,d.byteLength),d.set(f.default.types.mdat,4);for(var G=0;G<j;G++)T=b-(j-G)*P,E=s.default.getSilentFrame(t.channelCount),E||(c.logger.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),E=l.slice(0)),d.set(E,L),L+=E.byteLength,a={size:E.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},R.push(a)}d.set(l,L),L+=l.byteLength,a={size:l.byteLength,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},R.push(a),g=_}var Y=0,V=R.length;if(V>=2&&(Y=R[V-2].duration,a.duration=Y),V){this.nextAacPts=b+w*Y,t.len=0,t.samples=R,h=f.default.moof(t.sequenceNumber++,y/w,t),t.samples=[];var K={id:this.id,level:this.level,sn:this.sn,data1:h,data2:d,startPTS:p/A,endPTS:this.nextAacPts/A,startDTS:y/A,endDTS:(_+w*Y)/A,type:"audio",nb:V};return this.observer.trigger(u.default.FRAG_PARSING_DATA,K),K}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=r.startDTS*i+this._initDTS,u=r.endDTS*i+this._initDTS,d=1024,f=a*d,h=Math.ceil((u-l)/f),p=s.default.getSilentFrame(t.channelCount);if(!p)return void c.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");for(var y=[],g=0;g<h;g++){var v=l+g*f;y.push({unit:p.slice(0),pts:v,dts:v}),t.len+=p.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},{24:24,26:26,27:27,35:35,43:43,44:44}],37:[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(26),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},{26:26}],38:[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){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=/^(\d+)x(\d+)$/.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}}}],[{key:"parseAttrList",value:function(t){for(var e,n=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,r={};null!==(e=n.exec(t));){var i=e[2],o='"';0===i.indexOf(o)&&i.lastIndexOf(o)===i.length-1&&(i=i.slice(1,-1)),r[e[1]]=i}return r}}]),t}();n.default=o},{}],39:[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},{}],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={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)}},y=function(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n].toString(16));return e},g=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 g(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 g}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){p.log("INFO","pacData = "+JSON.stringify(t));var e=t.row-1;this.nrRollUpRows&&e<this.nrRollUpRows-1&&(e=this.nrRollUpRows-1),this.currRow=e;var n=this.rows[this.currRow];if(null!==t.indent){var r=t.indent,i=Math.max(r-1,0);n.setCursor(t.indent),t.color=n.chars[i].penState.foreground}var o={foreground:t.color,underline:t.underline,italics:t.italics,background:"black",flash:!1};this.setPen(o)}},{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)}},{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()),"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","["+y([e[a],e[a+1]])+"] -> ("+y([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 "+y([r,i])+" orig: "+y([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 ("+y([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 ("+y([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=y(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},{}],41:[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);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=100*(s/32)+(navigator.userAgent.match(/Firefox\//)?50:0),t.addCue(o)}}};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=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},{}],43:[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?"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},{}],44:[function(t,e,n){"use strict";"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(t,e){var n=new Uint8Array(this);void 0===e&&(e=n.length);for(var r=new ArrayBuffer(e-t),i=new Uint8Array(r),o=0;o<i.length;o++)i[o]=n[o+t];return r})},{}],45:[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},{}],46:[function(t,e,n){"use strict";var r={buildAbsoluteURL:function(t,e){if(e=e.trim(),/^[a-z]+:/i.test(e))return e;var n=null,i=null,o=/^([^#]*)(.*)$/.exec(e);o&&(i=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+"//"+r.buildAbsolutePath("",e.substring(2)):/^\//.test(e)?d+"/"+r.buildAbsolutePath("",e.substring(1)):r.buildAbsolutePath(d+f,e),n&&(h+=n),i&&(h+=i),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)}};e.exports=r},{}],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(43),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&&(window.clearTimeout(this.requestTimeout),n>=2&&(0===r.tfirst&&(r.tfirst=Math.max(performance.now(),r.trequest),this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),a.timeout-(r.tfirst-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++)}}},{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},{43:43}]},{},[31])(31)})},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 %>></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='<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){t.exports="<canvas data-no-op-canvas></canvas>\n<p data-no-op-msg><%=message%><p>\n"},function(t,e){t.exports='<div class="live-info"><%= live %></div>\n<button type="button" class="live-button"><%= backToLive %></button>\n'},function(t,e){t.exports='<div class="play-wrapper" data-poster></div>\n'},function(t,e){t.exports="<span data-seek-time></span>\n<span data-duration></span>\n"},function(t,e){t.exports="<div data-bounce1></div><div data-bounce2></div><div data-bounce3></div>\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){(function(t,n){function r(t,e){for(var n=-1,r=t?t.length:0;++n<r;)if(e(t[n],n,t))return!0;return!1}function i(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function o(t){return function(e){return t(e)}}function a(t,e){return null==t?void 0:t[e]}function s(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function l(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function u(t,e){return function(n){return t(e(n))}}function c(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function d(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 f(){this.__data__=Te?Te(null):{}}function h(t){return this.has(t)&&delete this.__data__[t]}function p(t){var e=this.__data__;if(Te){var n=e[t];return n===ht?void 0:n}return ue.call(e,t)?e[t]:void 0}function y(t){var e=this.__data__;return Te?void 0!==e[t]:ue.call(e,t)}function g(t,e){var n=this.__data__;return n[t]=Te&&void 0===e?ht:e,this}function v(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 m(){this.__data__=[]}function b(t){var e=this.__data__,n=U(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():ye.call(e,n,1),!0}function _(t){var e=this.__data__,n=U(e,t);return n<0?void 0:e[n][1]}function E(t){return U(this.__data__,t)>-1}function T(t,e){var n=this.__data__,r=U(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function A(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 k(){this.__data__={hash:new d,map:new(me||v),string:new d}}function w(t){return q(this,t).delete(t)}function S(t){return q(this,t).get(t)}function L(t){return q(this,t).has(t)}function R(t,e){return q(this,t).set(t,e),this}function O(t){var e=-1,n=t?t.length:0;for(this.__data__=new A;++e<n;)this.add(t[e])}function C(t){return this.__data__.set(t,ht),this}function P(t){return this.__data__.has(t)}function D(t){this.__data__=new v(t)}function I(){this.__data__=new v}function x(t){return this.__data__.delete(t)}function N(t){return this.__data__.get(t)}function M(t){return this.__data__.has(t)}function F(t,e){var n=this.__data__;if(n instanceof v){var r=n.__data__;if(!me||r.length<ft-1)return r.push([t,e]),this;n=this.__data__=new A(r)}return n.set(t,e),this}function B(t,e){var n=Pe(t)||rt(t)?i(t.length,String):[],r=n.length,o=!!r;for(var a in t)!e&&!ue.call(t,a)||o&&("length"==a||Z(a,r))||n.push(a);return n}function U(t,e){for(var n=t.length;n--;)if(nt(t[n][0],e))return n;return-1}function j(t){return ce.call(t)}function G(t,e,n,r,i){return t===e||(null==t||null==e||!ut(t)&&!ct(e)?t!==t&&e!==e:Y(t,e,G,n,r,i))}function Y(t,e,n,r,i,o){var a=Pe(t),l=Pe(e),u=mt,c=mt;a||(u=Ce(t),u=u==vt?St:u),l||(c=Ce(e),c=c==vt?St:c);var d=u==St&&!s(t),f=c==St&&!s(e),h=u==c;if(h&&!d)return o||(o=new D),a||De(t)?H(t,e,n,r,i,o):z(t,e,u,n,r,i,o);if(!(i&yt)){var p=d&&ue.call(t,"__wrapped__"),y=f&&ue.call(e,"__wrapped__");if(p||y){var g=p?t.value():t,v=y?e.value():e;return o||(o=new D),n(g,v,r,i,o)}}return!!h&&(o||(o=new D),W(t,e,n,r,i,o))}function V(t){if(!ut(t)||Q(t))return!1;var e=st(t)||s(t)?de:$t;return e.test(et(t))}function K(t){return ct(t)&<(t.length)&&!!zt[ce.call(t)]}function $(t){if(!tt(t))return ge(t);var e=[];for(var n in Object(t))ue.call(t,n)&&"constructor"!=n&&e.push(n);return e}function H(t,e,n,i,o,a){var s=o&yt,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=o&pt?new O:void 0;for(a.set(t,e),a.set(e,t);++d<l;){var p=t[d],y=e[d];if(i)var g=s?i(y,p,d,e,t,a):i(p,y,d,t,e,a);if(void 0!==g){if(g)continue;f=!1;break}if(h){if(!r(e,function(t,e){if(!h.has(e)&&(p===t||n(p,t,i,o,a)))return h.add(e)})){f=!1;break}}else if(p!==y&&!n(p,y,i,o,a)){f=!1;break}}return a.delete(t),a.delete(e),f}function z(t,e,n,r,i,o,a){switch(n){case xt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case It:return!(t.byteLength!=e.byteLength||!r(new he(t),new he(e)));case bt:case _t:case wt:return nt(+t,+e);case Et:return t.name==e.name&&t.message==e.message;case Rt:case Ct:return t==e+"";case kt:var s=l;case Ot:var u=o&yt;if(s||(s=c),t.size!=e.size&&!u)return!1;var d=a.get(t);if(d)return d==e;o|=pt,a.set(t,e);var f=H(s(t),s(e),r,i,o,a);return a.delete(t),f;case Pt:if(Oe)return Oe.call(t)==Oe.call(e)}return!1}function W(t,e,n,r,i,o){var a=i&yt,s=dt(t),l=s.length,u=dt(e),c=u.length;if(l!=c&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in e:ue.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 y=a;++d<l;){f=s[d];var g=t[f],v=e[f];if(r)var m=a?r(v,g,f,e,t,o):r(g,v,f,t,e,o);if(!(void 0===m?g===v||n(g,v,r,i,o):m)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){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,e){var n=t.__data__;return J(e)?n["string"==typeof e?"string":"hash"]:n.map}function X(t,e){var n=a(t,e);return V(n)?n:void 0}function Z(t,e){return e=null==e?gt:e,!!e&&("number"==typeof t||Ht.test(t))&&t>-1&&t%1==0&&t<e}function J(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function Q(t){return!!se&&se in t}function tt(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||oe;return t===n}function et(t){if(null!=t){try{return le.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function nt(t,e){return t===e||t!==t&&e!==e}function rt(t){return ot(t)&&ue.call(t,"callee")&&(!pe.call(t,"callee")||ce.call(t)==vt)}function it(t){return null!=t&<(t.length)&&!st(t)}function ot(t){return ct(t)&&it(t)}function at(t,e){return G(t,e)}function st(t){var e=ut(t)?ce.call(t):"";return e==Tt||e==At}function lt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=gt}function ut(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function ct(t){return!!t&&"object"==typeof t}function dt(t){return it(t)?B(t):$(t)}var ft=200,ht="__lodash_hash_undefined__",pt=1,yt=2,gt=9007199254740991,vt="[object Arguments]",mt="[object Array]",bt="[object Boolean]",_t="[object Date]",Et="[object Error]",Tt="[object Function]",At="[object GeneratorFunction]",kt="[object Map]",wt="[object Number]",St="[object Object]",Lt="[object Promise]",Rt="[object RegExp]",Ot="[object Set]",Ct="[object String]",Pt="[object Symbol]",Dt="[object WeakMap]",It="[object ArrayBuffer]",xt="[object DataView]",Nt="[object Float32Array]",Mt="[object Float64Array]",Ft="[object Int8Array]",Bt="[object Int16Array]",Ut="[object Int32Array]",jt="[object Uint8Array]",Gt="[object Uint8ClampedArray]",Yt="[object Uint16Array]",Vt="[object Uint32Array]",Kt=/[\\^$.*+?()[\]{}|]/g,$t=/^\[object .+?Constructor\]$/,Ht=/^(?:0|[1-9]\d*)$/,zt={};zt[Nt]=zt[Mt]=zt[Ft]=zt[Bt]=zt[Ut]=zt[jt]=zt[Gt]=zt[Yt]=zt[Vt]=!0,zt[vt]=zt[mt]=zt[It]=zt[bt]=zt[xt]=zt[_t]=zt[Et]=zt[Tt]=zt[kt]=zt[wt]=zt[St]=zt[Rt]=zt[Ot]=zt[Ct]=zt[Dt]=!1;var Wt="object"==typeof t&&t&&t.Object===Object&&t,qt="object"==typeof self&&self&&self.Object===Object&&self,Xt=Wt||qt||Function("return this")(),Zt="object"==typeof e&&e&&!e.nodeType&&e,Jt=Zt&&"object"==typeof n&&n&&!n.nodeType&&n,Qt=Jt&&Jt.exports===Zt,te=Qt&&Wt.process,ee=function(){try{return te&&te.binding("util")}catch(t){}}(),ne=ee&&ee.isTypedArray,re=Array.prototype,ie=Function.prototype,oe=Object.prototype,ae=Xt["__core-js_shared__"],se=function(){var t=/[^.]+$/.exec(ae&&ae.keys&&ae.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),le=ie.toString,ue=oe.hasOwnProperty,ce=oe.toString,de=RegExp("^"+le.call(ue).replace(Kt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fe=Xt.Symbol,he=Xt.Uint8Array,pe=oe.propertyIsEnumerable,ye=re.splice,ge=u(Object.keys,Object),ve=X(Xt,"DataView"),me=X(Xt,"Map"),be=X(Xt,"Promise"),_e=X(Xt,"Set"),Ee=X(Xt,"WeakMap"),Te=X(Object,"create"),Ae=et(ve),ke=et(me),we=et(be),Se=et(_e),Le=et(Ee),Re=fe?fe.prototype:void 0,Oe=Re?Re.valueOf:void 0;d.prototype.clear=f,d.prototype.delete=h,d.prototype.get=p,d.prototype.has=y,d.prototype.set=g,v.prototype.clear=m,v.prototype.delete=b,v.prototype.get=_,v.prototype.has=E,v.prototype.set=T,A.prototype.clear=k,A.prototype.delete=w,A.prototype.get=S,A.prototype.has=L,A.prototype.set=R,O.prototype.add=O.prototype.push=C,O.prototype.has=P,D.prototype.clear=I,D.prototype.delete=x,D.prototype.get=N,D.prototype.has=M,D.prototype.set=F;var Ce=j;(ve&&Ce(new ve(new ArrayBuffer(1)))!=xt||me&&Ce(new me)!=kt||be&&Ce(be.resolve())!=Lt||_e&&Ce(new _e)!=Ot||Ee&&Ce(new Ee)!=Dt)&&(Ce=function(t){var e=ce.call(t),n=e==St?t.constructor:void 0,r=n?et(n):void 0;if(r)switch(r){case Ae:return xt;case ke:return kt;case we:return Lt;case Se:return Ot;case Le:return Dt}return e});var Pe=Array.isArray,De=ne?o(ne):K;n.exports=at}).call(e,function(){return this}(),n(23)(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){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){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(y,"");var n=v.test(t);return n||m.test(t)?b(t.slice(2),n?2:8):g.test(t)?h:+t}var c="Expected a function",d=1/0,f=1.7976931348623157e308,h=NaN,p="[object Symbol]",y=/^\s+|\s+$/g,g=/^[-+]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){(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__=yt?yt(null):{}}function a(t){return this.has(t)&&delete this.__data__[t]}function s(t){var e=this.__data__;if(yt){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 yt?void 0!==e[t]:ut.call(e,t)}function u(t,e){var n=this.__data__;return n[t]=yt&&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 y(t,e){var n=this.__data__,r=T(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function g(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 L(t,e){var r=n(t,e);return A(r)?r:void 0}function R(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||g),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=R(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=L(nt,"Map"),yt=L(Object,"create"),gt=ft?ft.prototype:void 0,vt=gt?gt.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=y,g.prototype.clear=v,g.prototype.delete=m,g.prototype.get=b,g.prototype.has=_,g.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=g;var bt=Array.isArray;t.exports=j}).call(e,function(){return this}())},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 y(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function g(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 L(t){var e=this.__data__,n=H(e,t);return n<0?void 0:e[n][1]}function R(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)||Rt(t)?c(t.length,String):[],r=n.length,i=!!r;for(var o in t)!e&&!ze.call(t,o)||i&&("length"==o||gt(o,r))||n.push(o);return n}function H(t,e){for(var n=t.length;n--;)if(Lt(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)}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__"),y=d&&ze.call(e,"__wrapped__");if(h||y){var g=h?t.value():t,v=y?e.value():e;return o||(o=new U),n(g,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 yn?yn.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:gn(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 y=c.length;y--;)if(c[y]===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],y=e[d];if(r)var g=s?r(y,p,d,e,t,a):r(p,y,d,t,e,a);if(void 0!==g){if(g)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!==y&&!n(p,y,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 Lt(+t,+e);case te:return t.name==e.name&&t.message==e.message;case se:case ue:return t==e+"";case re:var s=y;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 y=a;++d<l;){f=s[d];var g=t[f],v=e[f];if(r)var m=a?r(v,g,f,e,t,o):r(g,v,f,t,e,o);if(!(void 0===m?g===v||n(g,v,r,i,o):m)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){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 yt(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)&>(a,o)&&(bn(t)||Rt(t))}function gt(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 Lt(t,e){return t===e||t!==t&&e!==e}function Rt(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&&yt(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]",ye="[object Float64Array]",ge="[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,Le=/[\\^$.*+?()[\]{}|]/g,Re=/\\(\\)?/g,Oe=/^\[object .+?Constructor\]$/,Ce=/^(?:0|[1-9]\d*)$/,Pe={};Pe[pe]=Pe[ye]=Pe[ge]=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(Le,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xe=xe.Symbol,Ze=xe.Uint8Array,Je=Ve.propertyIsEnumerable,Qe=Ge.splice,tn=g(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,yn=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=L,k.prototype.has=R,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 gn=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(Re,"$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(23)(t))},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,n){t.exports=n.p+"38861cba61c66739c1452c3a71e39852.ttf"},function(t,e,n){t.exports=n.p+"4b76590b32dab62bc95c1b7951efae78.swf"},function(t,e,n){t.exports=n.p+"809981e5b09d5336c45d72d0869ada2a.swf"}])}); +//# sourceMappingURL=clappr.min.js.map
\ No newline at end of file |