mirror of
https://github.com/voc/streaming-website
synced 2024-11-10 06:34:17 +00:00
51 lines
896 KiB
JavaScript
51 lines
896 KiB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VOCPlayer=e():t.VOCPlayer=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=9)}([function(t,e,n){var r;"undefined"!=typeof self&&self,r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=100)}([function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(39),a=(r=i)&&r.__esModule?r:{default:r};e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,a.default)(e))&&"function"!=typeof e?t:e}},function(t,e,n){"use strict";e.__esModule=!0;var r=o(n(134)),i=o(n(76)),a=o(n(39));function o(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,a.default)(e)));t.prototype=(0,i.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(r.default?(0,r.default)(t,e):t.__proto__=e)}},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(75),a=(r=i)&&r.__esModule?r:{default:r};e.default=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),(0,a.default)(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=u(n(53)),i=u(n(0)),a=u(n(39)),o=u(n(29)),s=n(5);function u(t){return t&&t.__esModule?t:{default:t}}var l=Array.prototype.slice,c=/\s+/,d=function(t,e,n,r){if(!n)return!0;if("object"===(void 0===n?"undefined":(0,a.default)(n))){for(var i in n)t[e].apply(t,[i,n[i]].concat(r));return!1}if(c.test(n)){for(var o=n.split(c),s=0,u=o.length;s<u;s++)t[e].apply(t,[o[s]].concat(r));return!1}return!0},f=function(t,e,n,r){var i=void 0,a=-1,s=t.length,u=e[0],l=e[1],c=e[2];!function d(){try{switch(e.length){case 0:for(;++a<s;)(i=t[a]).callback.call(i.ctx);return;case 1:for(;++a<s;)(i=t[a]).callback.call(i.ctx,u);return;case 2:for(;++a<s;)(i=t[a]).callback.call(i.ctx,u,l);return;case 3:for(;++a<s;)(i=t[a]).callback.call(i.ctx,u,l,c);return;default:for(;++a<s;)(i=t[a]).callback.apply(i.ctx,e);return}}catch(t){o.default.error.apply(o.default,[n,"error on event",r,"trigger","-",t]),d()}}()},h=function(){function t(){(0,i.default)(this,t)}return t.prototype.on=function(t,e,n){return d(this,"on",t,[e,n])&&e?(this._events||(this._events={}),(this._events[t]||(this._events[t]=[])).push({callback:e,context:n,ctx:n||this}),this):this},t.prototype.once=function(t,e,n){var r=this,i=void 0;if(!d(this,"once",t,[e,n])||!e)return this;var a=function(){return r.off(t,i)};return i=function(){a(),e.apply(this,arguments)},this.on(t,i,n)},t.prototype.off=function(t,e,n){var i,a,o=void 0,s=void 0,u=void 0,l=void 0,c=void 0,f=void 0;if(!this._events||!d(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._events=void 0,this;for(l=0,a=(i=t?[t]:(0,r.default)(this._events)).length;l<a;l++)if(t=i[l],u=this._events[t]){if(this._events[t]=o=[],e||n)for(c=0,f=u.length;c<f;c++)s=u[c],(e&&e!==s.callback&&e!==s.callback._callback||n&&n!==s.context)&&o.push(s);o.length||delete this._events[t]}return this},t.prototype.trigger=function(t){var e=this.name||this.constructor.name;if(o.default.debug.apply(o.default,[e].concat(Array.prototype.slice.call(arguments))),!this._events)return this;var n=l.call(arguments,1);if(!d(this,"trigger",t,n))return this;var r=this._events[t],i=this._events.all;return r&&f(r,n,e,t),i&&f(i,arguments,e,t),this},t.prototype.stopListening=function(t,e,n){var i=this._listeningTo;if(!i)return this;var o=!e&&!n;for(var s in n||"object"!==(void 0===e?"undefined":(0,a.default)(e))||(n=this),t&&((i={})[t._listenId]=t),i)(t=i[s]).off(e,n,this),(o||0===(0,r.default)(t._events).length)&&delete this._listeningTo[s];return this},t.register=function(e){t.Custom||(t.Custom={});var n="string"==typeof e&&e.toUpperCase().trim();n&&!t.Custom[n]?t.Custom[n]=n.toLowerCase().split("_").map((function(t,e){return 0===e?t:t=t[0].toUpperCase()+t.slice(1)})).join(""):o.default.error("Events","Error when register event: "+e)},t.listAvailableCustomEvents=function(){return t.Custom||(t.Custom={}),(0,r.default)(t.Custom).filter((function(e){return"string"==typeof t.Custom[e]}))},t}();e.default=h;var p={listenTo:"on",listenToOnce:"once"};(0,r.default)(p).forEach((function(t){h.prototype[t]=function(e,n,r){return(this._listeningTo||(this._listeningTo={}))[e._listenId||(e._listenId=(0,s.uniqueId)("l"))]=e,r||"object"!==(void 0===n?"undefined":(0,a.default)(n))||(r=this),e[p[t]](n,r,this),this}})),h.PLAYER_READY="ready",h.PLAYER_RESIZE="resize",h.PLAYER_FULLSCREEN="fullscreen",h.PLAYER_PLAY="play",h.PLAYER_PAUSE="pause",h.PLAYER_STOP="stop",h.PLAYER_ENDED="ended",h.PLAYER_SEEK="seek",h.PLAYER_ERROR="playererror",h.ERROR="error",h.PLAYER_TIMEUPDATE="timeupdate",h.PLAYER_VOLUMEUPDATE="volumeupdate",h.PLAYER_SUBTITLE_AVAILABLE="subtitleavailable",h.PLAYBACK_PROGRESS="playback:progress",h.PLAYBACK_TIMEUPDATE="playback:timeupdate",h.PLAYBACK_READY="playback:ready",h.PLAYBACK_BUFFERING="playback:buffering",h.PLAYBACK_BUFFERFULL="playback:bufferfull",h.PLAYBACK_SETTINGSUPDATE="playback:settingsupdate",h.PLAYBACK_LOADEDMETADATA="playback:loadedmetadata",h.PLAYBACK_HIGHDEFINITIONUPDATE="playback:highdefinitionupdate",h.PLAYBACK_BITRATE="playback:bitrate",h.PLAYBACK_LEVELS_AVAILABLE="playback:levels:available",h.PLAYBACK_LEVEL_SWITCH_START="playback:levels:switch:start",h.PLAYBACK_LEVEL_SWITCH_END="playback:levels:switch:end",h.PLAYBACK_PLAYBACKSTATE="playback:playbackstate",h.PLAYBACK_DVR="playback:dvr",h.PLAYBACK_MEDIACONTROL_DISABLE="playback:mediacontrol:disable",h.PLAYBACK_MEDIACONTROL_ENABLE="playback:mediacontrol:enable",h.PLAYBACK_ENDED="playback:ended",h.PLAYBACK_PLAY_INTENT="playback:play:intent",h.PLAYBACK_PLAY="playback:play",h.PLAYBACK_PAUSE="playback:pause",h.PLAYBACK_SEEK="playback:seek",h.PLAYBACK_SEEKED="playback:seeked",h.PLAYBACK_STOP="playback:stop",h.PLAYBACK_ERROR="playback:error",h.PLAYBACK_STATS_ADD="playback:stats:add",h.PLAYBACK_FRAGMENT_LOADED="playback:fragment:loaded",h.PLAYBACK_LEVEL_SWITCH="playback:level:switch",h.PLAYBACK_SUBTITLE_AVAILABLE="playback:subtitle:available",h.PLAYBACK_SUBTITLE_CHANGED="playback:subtitle:changed",h.CORE_CONTAINERS_CREATED="core:containers:created",h.CORE_ACTIVE_CONTAINER_CHANGED="core:active:container:changed",h.CORE_OPTIONS_CHANGE="core:options:change",h.CORE_READY="core:ready",h.CORE_FULLSCREEN="core:fullscreen",h.CORE_RESIZE="core:resize",h.CORE_SCREEN_ORIENTATION_CHANGED="core:screen:orientation:changed",h.CORE_MOUSE_MOVE="core:mousemove",h.CORE_MOUSE_LEAVE="core:mouseleave",h.CONTAINER_PLAYBACKSTATE="container:playbackstate",h.CONTAINER_PLAYBACKDVRSTATECHANGED="container:dvr",h.CONTAINER_BITRATE="container:bitrate",h.CONTAINER_STATS_REPORT="container:stats:report",h.CONTAINER_DESTROYED="container:destroyed",h.CONTAINER_READY="container:ready",h.CONTAINER_ERROR="container:error",h.CONTAINER_LOADEDMETADATA="container:loadedmetadata",h.CONTAINER_SUBTITLE_AVAILABLE="container:subtitle:available",h.CONTAINER_SUBTITLE_CHANGED="container:subtitle:changed",h.CONTAINER_TIMEUPDATE="container:timeupdate",h.CONTAINER_PROGRESS="container:progress",h.CONTAINER_PLAY="container:play",h.CONTAINER_STOP="container:stop",h.CONTAINER_PAUSE="container:pause",h.CONTAINER_ENDED="container:ended",h.CONTAINER_CLICK="container:click",h.CONTAINER_DBLCLICK="container:dblclick",h.CONTAINER_CONTEXTMENU="container:contextmenu",h.CONTAINER_MOUSE_ENTER="container:mouseenter",h.CONTAINER_MOUSE_LEAVE="container:mouseleave",h.CONTAINER_SEEK="container:seek",h.CONTAINER_SEEKED="container:seeked",h.CONTAINER_VOLUME="container:volume",h.CONTAINER_FULLSCREEN="container:fullscreen",h.CONTAINER_STATE_BUFFERING="container:state:buffering",h.CONTAINER_STATE_BUFFERFULL="container:state:bufferfull",h.CONTAINER_SETTINGSUPDATE="container:settingsupdate",h.CONTAINER_HIGHDEFINITIONUPDATE="container:highdefinitionupdate",h.CONTAINER_MEDIACONTROL_SHOW="container:mediacontrol:show",h.CONTAINER_MEDIACONTROL_HIDE="container:mediacontrol:hide",h.CONTAINER_MEDIACONTROL_DISABLE="container:mediacontrol:disable",h.CONTAINER_MEDIACONTROL_ENABLE="container:mediacontrol:enable",h.CONTAINER_STATS_ADD="container:stats:add",h.CONTAINER_OPTIONS_CHANGE="container:options:change",h.MEDIACONTROL_RENDERED="mediacontrol:rendered",h.MEDIACONTROL_FULLSCREEN="mediacontrol:fullscreen",h.MEDIACONTROL_SHOW="mediacontrol:show",h.MEDIACONTROL_HIDE="mediacontrol:hide",h.MEDIACONTROL_MOUSEMOVE_SEEKBAR="mediacontrol:mousemove:seekbar",h.MEDIACONTROL_MOUSELEAVE_SEEKBAR="mediacontrol:mouseleave:seekbar",h.MEDIACONTROL_PLAYING="mediacontrol:playing",h.MEDIACONTROL_NOTPLAYING="mediacontrol:notplaying",h.MEDIACONTROL_CONTAINERCHANGED="mediacontrol:containerchanged",h.MEDIACONTROL_OPTIONS_CHANGE="mediacontrol:options:change",t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomRecycler=e.cancelAnimationFrame=e.requestAnimationFrame=e.QueryString=e.Config=e.Fullscreen=void 0;var r=h(n(12)),i=h(n(3)),a=h(n(0)),o=h(n(1)),s=h(n(2)),u=h(n(75)),l=h(n(140));e.assign=p,e.extend=g,e.formatTime=y,e.seekStringToSeconds=A,e.uniqueId=E,e.isNumber=T,e.currentScriptUrl=w,e.getBrowserLanguage=C,e.now=L,e.removeArrayItem=x,e.listContainsIgnoreCase=function(t,e){return void 0!==t&&void 0!==e&&void 0!==e.find((function(e){return t.toLowerCase()===e.toLowerCase()}))},e.canAutoPlayMedia=R,n(143);var c=h(n(14)),d=h(n(6)),f=h(n(147));function h(t){return t&&t.__esModule?t:{default:t}}function p(t,e){if(e)for(var n in e){var r=(0,l.default)(e,n);r?(0,u.default)(t,n,r):t[n]=e[n]}return t}function g(t,e){var n=function(t){function n(){(0,a.default)(this,n);for(var r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];var u=(0,o.default)(this,t.call.apply(t,[this].concat(i)));return e.initialize&&e.initialize.apply(u,i),u}return(0,s.default)(n,t),n}(t);return p(n.prototype,e),n}function y(t,e){if(!isFinite(t))return"--:--";t*=1e3;var n=(t=parseInt(t/1e3))%60,r=(t=parseInt(t/60))%60,i=(t=parseInt(t/60))%24,a=parseInt(t/24),o="";return a&&a>0&&(o+=a+":",i<1&&(o+="00:")),(i&&i>0||e)&&(o+=("0"+i).slice(-2)+":"),o+=("0"+r).slice(-2)+":",(o+=("0"+n).slice(-2)).trim()}var v=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():t.webkitEnterFullScreen&&t.webkitEnterFullScreen()},cancelFullscreen:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;t.exitFullscreen?t.exitFullscreen():t.webkitCancelFullScreen?t.webkitCancelFullScreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen()},fullscreenEnabled:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},m=e.Config=function(){function t(){(0,a.default)(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 c.default.hasLocalstorage&&localStorage[this._createKeyspace(t)]?this._defaultConfig()[t].parse(localStorage[this._createKeyspace(t)]):this._defaultValueFor(t)},t.persist=function(t,e){if(c.default.hasLocalstorage)try{return localStorage[this._createKeyspace(t)]=e,!0}catch(t){return!1}},t}(),b=e.QueryString=function(){function t(){(0,a.default)(this,t)}return t.parse=function(t){for(var e=void 0,n=/\+/g,r=/([^&=]+)=?([^&]*)/g,i=function(t){return decodeURIComponent(t.replace(n," "))},a={};e=r.exec(t);)a[i(e[1]).toLowerCase()]=i(e[2]);return a},(0,i.default)(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}();function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"t",e=0,n=b.params[t]||b.hashParams[t]||"",r=n.match(/[0-9]+[hms]+/g)||[];if(r.length>0){var i={h:3600,m:60,s:1};r.forEach((function(t){if(t){var n=t[t.length-1],r=parseInt(t.slice(0,t.length-1),10);e+=r*i[n]}}))}else n&&(e=parseInt(n,10));return e}var _={};function E(t){return _[t]||(_[t]=0),t+ ++_[t]}function T(t){return t-parseFloat(t)+1>=0}function w(){var t=document.getElementsByTagName("script");return t.length?t[t.length-1].src:""}var S=e.requestAnimationFrame=(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}).bind(window),k=e.cancelAnimationFrame=(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout).bind(window);function C(){return window.navigator&&window.navigator.language}function L(){return window.performance&&window.performance.now?performance.now():Date.now()}function x(t,e){var n=t.indexOf(e);n>=0&&t.splice(n,1)}function R(t,e){var n=(e=(0,r.default)({inline:!1,muted:!1,timeout:250,type:"video",source:f.default.mp4,element:null},e)).element?e.element:document.createElement(e.type);n.muted=e.muted,!0===e.muted&&n.setAttribute("muted","muted"),!0===e.inline&&n.setAttribute("playsinline","playsinline"),n.src=e.source;var i=n.play(),a=setTimeout((function(){o(!1,new Error("Timeout "+e.timeout+" ms has been reached"))}),e.timeout),o=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;clearTimeout(a),t(e,n)};void 0!==i?i.then((function(){return o(!0)})).catch((function(t){return o(!1,t)})):o(!0)}var I=[],P=e.DomRecycler=function(){function t(){(0,a.default)(this,t)}return t.configure=function(t){this.options=d.default.extend(this.options,t)},t.create=function(t){return this.options.recycleVideo&&"video"===t&&I.length>0?I.shift():(0,d.default)("<"+t+">")},t.garbage=function(t){this.options.recycleVideo&&"VIDEO"===t[0].tagName.toUpperCase()&&(t.children().remove(),I.push(t))},t}();P.options={recycleVideo:!1},e.default={Config:m,Fullscreen:v,QueryString:b,DomRecycler:P,extend:g,formatTime:y,seekStringToSeconds:A,uniqueId:E,currentScriptUrl:w,isNumber:T,requestAnimationFrame:S,cancelAnimationFrame:k,getBrowserLanguage:C,now:L,removeArrayItem:x,canAutoPlayMedia:R,Media:f.default}},function(t,e){var n,r=function(){var t,e,n,r,i,a=[],o=a.concat,s=a.filter,u=a.slice,l=window.document,c={},d={},f={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},h=/^\s*<(\w+|!)[^>]*>/,p=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,g=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,y=/^(?:body|html)$/i,v=/([A-Z])/g,m=["val","css","html","text","data","width","height","offset"],b=l.createElement("table"),A=l.createElement("tr"),_={tr:l.createElement("tbody"),tbody:b,thead:b,tfoot:b,td:A,th:A,"*":l.createElement("div")},E=/complete|loaded|interactive/,T=/^[\w-]*$/,w={},S=w.toString,k={},C=l.createElement("div"),L={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},x=Array.isArray||function(t){return t instanceof Array};function R(t){return null==t?String(t):w[S.call(t)]||"object"}function I(t){return"function"==R(t)}function P(t){return null!=t&&t==t.window}function O(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function D(t){return"object"==R(t)}function M(t){return D(t)&&!P(t)&&Object.getPrototypeOf(t)==Object.prototype}function N(t){var n=!!t&&"length"in t&&t.length,r=e.type(t);return"function"!=r&&!P(t)&&("array"==r||0===n||"number"==typeof n&&n>0&&n-1 in 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 F(t){return t in d?d[t]:d[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function B(t,e){return"number"!=typeof e||f[U(t)]?e:e+"px"}function j(t){return"children"in t?u.call(t.children):e.map(t.childNodes,(function(t){if(1==t.nodeType)return t}))}function K(t,e){var n,r=t?t.length:0;for(n=0;n<r;n++)this[n]=t[n];this.length=r,this.selector=e||""}function V(e,n,r){for(t in n)r&&(M(n[t])||x(n[t]))?(M(n[t])&&!M(e[t])&&(e[t]={}),x(n[t])&&!x(e[t])&&(e[t]=[]),V(e[t],n[t],r)):void 0!==n[t]&&(e[t]=n[t])}function G(t,n){return null==n?e(t):e(t).filter(n)}function H(t,e,n,r){return I(e)?e.call(t,n,r):e}function Y(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function z(t,e){var n=t.className||"",r=n&&void 0!==n.baseVal;if(void 0===e)return r?n.baseVal:n;r?n.baseVal=e:t.className=e}function $(t){try{return t?"true"==t||"false"!=t&&("null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?e.parseJSON(t):t):t}catch(e){return t}}function W(t,e){e(t);for(var n=0,r=t.childNodes.length;n<r;n++)W(t.childNodes[n],e)}return k.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,a=!i;return a&&(i=C).appendChild(t),r=~k.qsa(i,e).indexOf(t),a&&C.removeChild(t),r},r=function(t){return t.replace(/-+(.)?/g,(function(t,e){return e?e.toUpperCase():""}))},i=function(t){return s.call(t,(function(e,n){return t.indexOf(e)==n}))},k.fragment=function(t,n,r){var i,a,o;return p.test(t)&&(i=e(l.createElement(RegExp.$1))),i||(t.replace&&(t=t.replace(g,"<$1></$2>")),void 0===n&&(n=h.test(t)&&RegExp.$1),n in _||(n="*"),(o=_[n]).innerHTML=""+t,i=e.each(u.call(o.childNodes),(function(){o.removeChild(this)}))),M(r)&&(a=e(i),e.each(r,(function(t,e){m.indexOf(t)>-1?a[t](e):a.attr(t,e)}))),i},k.Z=function(t,e){return new K(t,e)},k.isZ=function(t){return t instanceof k.Z},k.init=function(t,n){var r,i;if(!t)return k.Z();if("string"==typeof t)if("<"==(t=t.trim())[0]&&h.test(t))r=k.fragment(t,RegExp.$1,n),t=null;else{if(void 0!==n)return e(n).find(t);r=k.qsa(l,t)}else{if(I(t))return e(l).ready(t);if(k.isZ(t))return t;if(x(t))i=t,r=s.call(i,(function(t){return null!=t}));else if(D(t))r=[t],t=null;else if(h.test(t))r=k.fragment(t.trim(),RegExp.$1,n),t=null;else{if(void 0!==n)return e(n).find(t);r=k.qsa(l,t)}}return k.Z(r,t)},(e=function(t,e){return k.init(t,e)}).extend=function(t){var e,n=u.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach((function(n){V(t,n,e)})),t},k.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],a=r||i?e.slice(1):e,o=T.test(a);return t.getElementById&&o&&r?(n=t.getElementById(a))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:u.call(o&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(a):t.getElementsByTagName(e):t.querySelectorAll(e))},e.contains=l.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},e.type=R,e.isFunction=I,e.isWindow=P,e.isArray=x,e.isPlainObject=M,e.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},e.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},e.inArray=function(t,e,n){return a.indexOf.call(e,t,n)},e.camelCase=r,e.trim=function(t){return null==t?"":String.prototype.trim.call(t)},e.uuid=0,e.support={},e.expr={},e.noop=function(){},e.map=function(t,n){var r,i,a,o,s=[];if(N(t))for(i=0;i<t.length;i++)null!=(r=n(t[i],i))&&s.push(r);else for(a in t)null!=(r=n(t[a],a))&&s.push(r);return(o=s).length>0?e.fn.concat.apply([],o):o},e.each=function(t,e){var n,r;if(N(t)){for(n=0;n<t.length;n++)if(!1===e.call(t[n],n,t[n]))return t}else for(r in t)if(!1===e.call(t[r],r,t[r]))return t;return t},e.grep=function(t,e){return s.call(t,e)},window.JSON&&(e.parseJSON=JSON.parse),e.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),(function(t,e){w["[object "+e+"]"]=e.toLowerCase()})),e.fn={constructor:k.Z,length:0,forEach:a.forEach,reduce:a.reduce,push:a.push,sort:a.sort,splice:a.splice,indexOf:a.indexOf,concat:function(){var t,e,n=[];for(t=0;t<arguments.length;t++)e=arguments[t],n[t]=k.isZ(e)?e.toArray():e;return o.apply(k.isZ(this)?this.toArray():this,n)},map:function(t){return e(e.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return e(u.apply(this,arguments))},ready:function(t){return E.test(l.readyState)&&l.body?t(e):l.addEventListener("DOMContentLoaded",(function(){t(e)}),!1),this},get:function(t){return void 0===t?u.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 a.every.call(this,(function(e,n){return!1!==t.call(e,n,e)})),this},filter:function(t){return I(t)?this.not(this.not(t)):e(s.call(this,(function(e){return k.matches(e,t)})))},add:function(t,n){return e(i(this.concat(e(t,n))))},is:function(t){return this.length>0&&k.matches(this[0],t)},not:function(t){var n=[];if(I(t)&&void 0!==t.call)this.each((function(e){t.call(this,e)||n.push(this)}));else{var r="string"==typeof t?this.filter(t):N(t)&&I(t.item)?u.call(t):e(t);this.forEach((function(t){r.indexOf(t)<0&&n.push(t)}))}return e(n)},has:function(t){return this.filter((function(){return D(t)?e.contains(this,t):e(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&&!D(t)?t:e(t)},last:function(){var t=this[this.length-1];return t&&!D(t)?t:e(t)},find:function(t){var n=this;return t?"object"==typeof t?e(t).filter((function(){var t=this;return a.some.call(n,(function(n){return e.contains(n,t)}))})):1==this.length?e(k.qsa(this[0],t)):this.map((function(){return k.qsa(this,t)})):e()},closest:function(t,n){var r=[],i="object"==typeof t&&e(t);return this.each((function(e,a){for(;a&&!(i?i.indexOf(a)>=0:k.matches(a,t));)a=a!==n&&!O(a)&&a.parentNode;a&&r.indexOf(a)<0&&r.push(a)})),e(r)},parents:function(t){for(var n=[],r=this;r.length>0;)r=e.map(r,(function(t){if((t=t.parentNode)&&!O(t)&&n.indexOf(t)<0)return n.push(t),t}));return G(n,t)},parent:function(t){return G(i(this.pluck("parentNode")),t)},children:function(t){return G(this.map((function(){return j(this)})),t)},contents:function(){return this.map((function(){return this.contentDocument||u.call(this.childNodes)}))},siblings:function(t){return G(this.map((function(t,e){return s.call(j(e.parentNode),(function(t){return t!==e}))})),t)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(t){return e.map(this,(function(e){return e[t]}))},show:function(){return this.each((function(){var t,e,n;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(t=this.nodeName,c[t]||(e=l.createElement(t),l.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),c[t]=n),c[t]))}))},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=I(t);if(this[0]&&!n)var r=e(t).get(0),i=r.parentNode||this.length>1;return this.each((function(a){e(this).wrapAll(n?t.call(this,a):i?r.cloneNode(!0):r)}))},wrapAll:function(t){if(this[0]){var n;for(e(this[0]).before(t=e(t));(n=t.children()).length;)t=n.first();e(t).append(this)}return this},wrapInner:function(t){var n=I(t);return this.each((function(r){var i=e(this),a=i.contents(),o=n?t.call(this,r):t;a.length?a.wrapAll(o):i.append(o)}))},unwrap:function(){return this.parent().each((function(){e(this).replaceWith(e(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 n=e(this);(void 0===t?"none"==n.css("display"):t)?n.show():n.hide()}))},prev:function(t){return e(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return e(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each((function(n){var r=this.innerHTML;e(this).empty().append(H(this,t,n,r))})):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each((function(e){var n=H(this,t,e,this.textContent);this.textContent=null==n?"":""+n})):0 in this?this.pluck("textContent").join(""):null},attr:function(e,n){var r;return"string"!=typeof e||1 in arguments?this.each((function(r){if(1===this.nodeType)if(D(e))for(t in e)Y(this,t,e[t]);else Y(this,e,H(this,n,r,this.getAttribute(e)))})):0 in this&&1==this[0].nodeType&&null!=(r=this[0].getAttribute(e))?r:void 0},removeAttr:function(t){return this.each((function(){1===this.nodeType&&t.split(" ").forEach((function(t){Y(this,t)}),this)}))},prop:function(t,e){return t=L[t]||t,1 in arguments?this.each((function(n){this[t]=H(this,e,n,this[t])})):this[0]&&this[0][t]},removeProp:function(t){return t=L[t]||t,this.each((function(){delete this[t]}))},data:function(t,e){var n="data-"+t.replace(v,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?$(r):void 0},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each((function(e){this.value=H(this,t,e,this.value)}))):this[0]&&(this[0].multiple?e(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each((function(n){var r=e(this),i=H(this,t,n,r.offset()),a=r.offsetParent().offset(),o={top:i.top-a.top,left:i.left-a.left};"static"==r.css("position")&&(o.position="relative"),r.css(o)}));if(!this.length)return null;if(l.documentElement!==this[0]&&!e.contains(l.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+window.pageXOffset,top:n.top+window.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(n,i){if(arguments.length<2){var a=this[0];if("string"==typeof n){if(!a)return;return a.style[r(n)]||getComputedStyle(a,"").getPropertyValue(n)}if(x(n)){if(!a)return;var o={},s=getComputedStyle(a,"");return e.each(n,(function(t,e){o[e]=a.style[r(e)]||s.getPropertyValue(e)})),o}}var u="";if("string"==R(n))i||0===i?u=U(n)+":"+B(n,i):this.each((function(){this.style.removeProperty(U(n))}));else for(t in n)n[t]||0===n[t]?u+=U(t)+":"+B(t,n[t])+";":this.each((function(){this.style.removeProperty(U(t))}));return this.each((function(){this.style.cssText+=";"+u}))},index:function(t){return t?this.indexOf(e(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&a.some.call(this,(function(t){return this.test(z(t))}),F(t))},addClass:function(t){return t?this.each((function(r){if("className"in this){n=[];var i=z(this);H(this,t,r,i).split(/\s+/g).forEach((function(t){e(this).hasClass(t)||n.push(t)}),this),n.length&&z(this,i+(i?" ":"")+n.join(" "))}})):this},removeClass:function(t){return this.each((function(e){if("className"in this){if(void 0===t)return z(this,"");n=z(this),H(this,t,e,n).split(/\s+/g).forEach((function(t){n=n.replace(F(t)," ")})),z(this,n.trim())}}))},toggleClass:function(t,n){return t?this.each((function(r){var i=e(this);H(this,t,r,z(this)).split(/\s+/g).forEach((function(t){(void 0===n?!i.hasClass(t):n)?i.addClass(t):i.removeClass(t)}))})):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return void 0===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 void 0===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],n=this.offsetParent(),r=this.offset(),i=y.test(n[0].nodeName)?{top:0,left:0}:n.offset();return r.top-=parseFloat(e(t).css("margin-top"))||0,r.left-=parseFloat(e(t).css("margin-left"))||0,i.top+=parseFloat(e(n[0]).css("border-top-width"))||0,i.left+=parseFloat(e(n[0]).css("border-left-width"))||0,{top:r.top-i.top,left:r.left-i.left}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent||l.body;t&&!y.test(t.nodeName)&&"static"==e(t).css("position");)t=t.offsetParent;return t}))}},e.fn.detach=e.fn.remove,["width","height"].forEach((function(t){var n=t.replace(/./,(function(t){return t[0].toUpperCase()}));e.fn[t]=function(r){var i,a=this[0];return void 0===r?P(a)?a["inner"+n]:O(a)?a.documentElement["scroll"+n]:(i=this.offset())&&i[t]:this.each((function(n){(a=e(this)).css(t,H(this,r,n,a[t]()))}))}})),["after","prepend","before","append"].forEach((function(t,n){var r=n%2;e.fn[t]=function(){var t,i,a=e.map(arguments,(function(n){var r=[];return"array"==(t=R(n))?(n.forEach((function(t){return void 0!==t.nodeType?r.push(t):e.zepto.isZ(t)?r=r.concat(t.get()):void(r=r.concat(k.fragment(t)))})),r):"object"==t||null==n?n:k.fragment(n)})),o=this.length>1;return a.length<1?this:this.each((function(t,s){i=r?s:s.parentNode,s=0==n?s.nextSibling:1==n?s.firstChild:2==n?s:null;var u=e.contains(l.documentElement,i);a.forEach((function(t){if(o)t=t.cloneNode(!0);else if(!i)return e(t).remove();i.insertBefore(t,s),u&&W(t,(function(t){if(!(null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src)){var e=t.ownerDocument?t.ownerDocument.defaultView:window;e.eval.call(e,t.innerHTML)}}))}))}))},e.fn[r?t+"To":"insert"+(n?"Before":"After")]=function(n){return e(n)[t](this),this}})),k.Z.prototype=K.prototype=e.fn,k.uniq=i,k.deserializeValue=$,e.zepto=k,e}();window.Zepto=r,void 0===window.$&&(window.$=r),function(t){var e,n,r=+new Date,i=window.document,a=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,o=/^(?:text|application)\/javascript/i,s=/^(?:text|application)\/xml/i,u=/^\s*$/,l=i.createElement("a");function c(e,n,r,a){if(e.global)return function(e,n,r){var i=t.Event(n);return t(e).trigger(i,r),!i.isDefaultPrevented()}(n||i,r,a)}function d(t,e){var n=e.context;if(!1===e.beforeSend.call(n,t,e)||!1===c(e,n,"ajaxBeforeSend",[t,e]))return!1;c(e,n,"ajaxSend",[t,e])}function f(t,e,n,r){var i=n.context;n.success.call(i,t,"success",e),r&&r.resolveWith(i,[t,"success",e]),c(n,i,"ajaxSuccess",[e,n,t]),p("success",e,n)}function h(t,e,n,r,i){var a=r.context;r.error.call(a,n,e,t),i&&i.rejectWith(a,[n,e,t]),c(r,a,"ajaxError",[n,r,t||e]),p(e,n,r)}function p(e,n,r){var i=r.context;r.complete.call(i,n,e),c(r,i,"ajaxComplete",[n,r]),function(e){e.global&&!--t.active&&c(e,null,"ajaxStop")}(r)}function g(){}function y(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function v(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}}l.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var a,o,s=e.jsonpCallback,u=(t.isFunction(s)?s():s)||"Zepto"+r++,l=i.createElement("script"),c=window[u],p=function(e){t(l).triggerHandler("error",e||"abort")},g={abort:p};return n&&n.promise(g),t(l).on("load error",(function(r,i){clearTimeout(o),t(l).off().remove(),"error"!=r.type&&a?f(a[0],g,e,n):h(null,i||"error",g,e,n),window[u]=c,a&&t.isFunction(c)&&c(a[0]),c=a=void 0})),!1===d(g,e)?(p("abort"),g):(window[u]=function(){a=arguments},l.src=e.url.replace(/\?(.+)=\?/,"?$1="+u),i.head.appendChild(l),e.timeout>0&&(o=setTimeout((function(){p("timeout")}),e.timeout)),g)},t.ajaxSettings={type:"GET",beforeSend:g,success:g,error:g,complete:g,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:"application/json",xml:"application/xml, text/xml",html:"text/html",text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:g},t.ajax=function(r){var a,p,v=t.extend({},r||{}),m=t.Deferred&&t.Deferred();for(e in t.ajaxSettings)void 0===v[e]&&(v[e]=t.ajaxSettings[e]);!function(e){e.global&&0==t.active++&&c(e,null,"ajaxStart")}(v),v.crossDomain||((a=i.createElement("a")).href=v.url,a.href=a.href,v.crossDomain=l.protocol+"//"+l.host!=a.protocol+"//"+a.host),v.url||(v.url=window.location.toString()),(p=v.url.indexOf("#"))>-1&&(v.url=v.url.slice(0,p)),function(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()&&"jsonp"!=e.dataType||(e.url=y(e.url,e.data),e.data=void 0)}(v);var b=v.dataType,A=/\?.+=\?/.test(v.url);if(A&&(b="jsonp"),!1!==v.cache&&(r&&!0===r.cache||"script"!=b&&"jsonp"!=b)||(v.url=y(v.url,"_="+Date.now())),"jsonp"==b)return A||(v.url=y(v.url,v.jsonp?v.jsonp+"=?":!1===v.jsonp?"":"callback=?")),t.ajaxJSONP(v,m);var _,E=v.accepts[b],T={},w=function(t,e){T[t.toLowerCase()]=[t,e]},S=/^([\w-]+:)\/\//.test(v.url)?RegExp.$1:window.location.protocol,k=v.xhr(),C=k.setRequestHeader;if(m&&m.promise(k),v.crossDomain||w("X-Requested-With","XMLHttpRequest"),w("Accept",E||"*/*"),(E=v.mimeType||E)&&(E.indexOf(",")>-1&&(E=E.split(",",2)[0]),k.overrideMimeType&&k.overrideMimeType(E)),(v.contentType||!1!==v.contentType&&v.data&&"GET"!=v.type.toUpperCase())&&w("Content-Type",v.contentType||"application/x-www-form-urlencoded"),v.headers)for(n in v.headers)w(n,v.headers[n]);if(k.setRequestHeader=w,k.onreadystatechange=function(){if(4==k.readyState){k.onreadystatechange=g,clearTimeout(_);var e,n=!1;if(k.status>=200&&k.status<300||304==k.status||0==k.status&&"file:"==S){if(b=b||function(t){return t&&(t=t.split(";",2)[0]),t&&("text/html"==t?"html":"application/json"==t?"json":o.test(t)?"script":s.test(t)&&"xml")||"text"}(v.mimeType||k.getResponseHeader("content-type")),"arraybuffer"==k.responseType||"blob"==k.responseType)e=k.response;else{e=k.responseText;try{e=function(t,e,n){if(n.dataFilter==g)return t;var r=n.context;return n.dataFilter.call(r,t,e)}(e,b,v),"script"==b?(0,eval)(e):"xml"==b?e=k.responseXML:"json"==b&&(e=u.test(e)?null:t.parseJSON(e))}catch(t){n=t}if(n)return h(n,"parsererror",k,v,m)}f(e,k,v,m)}else h(k.statusText||null,k.status?"error":"abort",k,v,m)}},!1===d(k,v))return k.abort(),h(null,"abort",k,v,m),k;var L=!("async"in v)||v.async;if(k.open(v.type,v.url,L,v.username,v.password),v.xhrFields)for(n in v.xhrFields)k[n]=v.xhrFields[n];for(n in T)C.apply(k,T[n]);return v.timeout>0&&(_=setTimeout((function(){k.onreadystatechange=g,k.abort(),h(null,"timeout",k,v,m)}),v.timeout)),k.send(v.data?v.data:null),k},t.get=function(){return t.ajax(v.apply(null,arguments))},t.post=function(){var e=v.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=v.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,s=e.split(/\s/),u=v(e,n,r),l=u.success;return s.length>1&&(u.url=s[0],i=s[1]),u.success=function(e){o.html(i?t("<div>").html(e.replace(a,"")).find(i):e),l&&l.apply(o,arguments)},t.ajax(u),this};var m=encodeURIComponent;t.param=function(e,n){var r=[];return r.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(m(e)+"="+m(n))},function e(n,r,i,a){var o,s=t.isArray(r),u=t.isPlainObject(r);t.each(r,(function(r,l){o=t.type(l),a&&(r=i?a:a+"["+(u||"object"==o||"array"==o?r:"")+"]"),!a&&s?n.add(l.name,l.value):"array"==o||!i&&"object"==o?e(n,l,i,r):n.add(r,l)}))}(r,e,n),r.join("&").replace(/%20/g,"+")}}(r),(n=r).Callbacks=function(t){t=n.extend({},t);var e,r,i,a,o,s,u=[],l=!t.once&&[],c=function(n){for(e=t.memory&&n,r=!0,s=a||0,a=0,o=u.length,i=!0;u&&s<o;++s)if(!1===u[s].apply(n[0],n[1])&&t.stopOnFalse){e=!1;break}i=!1,u&&(l?l.length&&c(l.shift()):e?u.length=0:d.disable())},d={add:function(){if(u){var r=u.length,s=function(e){n.each(e,(function(e,n){"function"==typeof n?t.unique&&d.has(n)||u.push(n):n&&n.length&&"string"!=typeof n&&s(n)}))};s(arguments),i?o=u.length:e&&(a=r,c(e))}return this},remove:function(){return u&&n.each(arguments,(function(t,e){for(var r;(r=n.inArray(e,u,r))>-1;)u.splice(r,1),i&&(r<=o&&--o,r<=s&&--s)})),this},has:function(t){return!(!u||!(t?n.inArray(t,u)>-1:u.length))},empty:function(){return o=u.length=0,this},disable:function(){return u=l=e=void 0,this},disabled:function(){return!u},lock:function(){return l=void 0,e||d.disable(),this},locked:function(){return!l},fireWith:function(t,e){return!u||r&&!l||(e=[t,(e=e||[]).slice?e.slice():e],i?l.push(e):c(e)),this},fire:function(){return d.fireWith(this,arguments)},fired:function(){return!!r}};return d},function(t){var e=Array.prototype.slice;function n(e){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",a={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return n((function(n){t.each(r,(function(r,i){var s=t.isFunction(e[r])&&e[r];o[i[1]]((function(){var e=s&&s.apply(this,arguments);if(e&&t.isFunction(e.promise))e.promise().done(n.resolve).fail(n.reject).progress(n.notify);else{var r=this===a?n.promise():this,o=s?[e]:arguments;n[i[0]+"With"](r,o)}}))})),e=null})).promise()},promise:function(e){return null!=e?t.extend(e,a):a}},o={};return t.each(r,(function(t,e){var n=e[2],s=e[3];a[e[1]]=n.add,s&&n.add((function(){i=s}),r[1^t][2].disable,r[2][2].lock),o[e[0]]=function(){return o[e[0]+"With"](this===o?a:this,arguments),this},o[e[0]+"With"]=n.fireWith})),a.promise(o),e&&e.call(o,o),o}t.when=function(r){var i,a,o,s=e.call(arguments),u=s.length,l=0,c=1!==u||r&&t.isFunction(r.promise)?u:0,d=1===c?r:n(),f=function(t,n,r){return function(a){n[t]=this,r[t]=arguments.length>1?e.call(arguments):a,r===i?d.notifyWith(n,r):--c||d.resolveWith(n,r)}};if(u>1)for(i=new Array(u),a=new Array(u),o=new Array(u);l<u;++l)s[l]&&t.isFunction(s[l].promise)?s[l].promise().done(f(l,o,s)).fail(d.reject).progress(f(l,a,i)):--c;return c||d.resolveWith(o,s),d.promise()},t.Deferred=n}(r),function(t){var e=1,n=Array.prototype.slice,r=t.isFunction,i=function(t){return"string"==typeof t},a={},o={},s="onfocusin"in window,u={focus:"focusin",blur:"focusout"},l={mouseenter:"mouseover",mouseleave:"mouseout"};function c(t){return t._zid||(t._zid=e++)}function d(t,e,n,r){if((e=f(e)).ns)var i=(o=e.ns,new RegExp("(?:^| )"+o.replace(" "," .* ?")+"(?: |$)"));var o;return(a[c(t)]||[]).filter((function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||i.test(t.ns))&&(!n||c(t.fn)===c(n))&&(!r||t.sel==r)}))}function f(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function h(t,e){return t.del&&!s&&t.e in u||!!e}function p(t){return l[t]||s&&u[t]||t}function g(e,n,r,i,o,s,u){var d=c(e),g=a[d]||(a[d]=[]);n.split(/\s/).forEach((function(n){if("ready"==n)return t(document).ready(r);var a=f(n);a.fn=r,a.sel=o,a.e in l&&(r=function(e){var n=e.relatedTarget;if(!n||n!==this&&!t.contains(this,n))return a.fn.apply(this,arguments)}),a.del=s;var c=s||r;a.proxy=function(t){if(!(t=_(t)).isImmediatePropagationStopped()){t.data=i;var n=c.apply(e,null==t._args?[t]:[t].concat(t._args));return!1===n&&(t.preventDefault(),t.stopPropagation()),n}},a.i=g.length,g.push(a),"addEventListener"in e&&e.addEventListener(p(a.e),a.proxy,h(a,u))}))}function y(t,e,n,r,i){var o=c(t);(e||"").split(/\s/).forEach((function(e){d(t,e,n,r).forEach((function(e){delete a[o][e.i],"removeEventListener"in t&&t.removeEventListener(p(e.e),e.proxy,h(e,i))}))}))}o.click=o.mousedown=o.mouseup=o.mousemove="MouseEvents",t.event={add:g,remove:y},t.proxy=function(e,a){var o=2 in arguments&&n.call(arguments,2);if(r(e)){var s=function(){return e.apply(a,o?o.concat(n.call(arguments)):arguments)};return s._zid=c(e),s}if(i(a))return o?(o.unshift(e[a],e),t.proxy.apply(null,o)):t.proxy(e[a],e);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 v=function(){return!0},m=function(){return!1},b=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,A={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};function _(e,n){return!n&&e.isDefaultPrevented||(n||(n=e),t.each(A,(function(t,r){var i=n[t];e[t]=function(){return this[r]=v,i&&i.apply(n,arguments)},e[r]=m})),e.timeStamp||(e.timeStamp=Date.now()),(void 0!==n.defaultPrevented?n.defaultPrevented:"returnValue"in n?!1===n.returnValue:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=v)),e}function E(t){var e,n={originalEvent:t};for(e in t)b.test(e)||void 0===t[e]||(n[e]=t[e]);return _(n,t)}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,a,o,s,u){var l,c,d=this;return e&&!i(e)?(t.each(e,(function(t,e){d.on(t,a,o,e,u)})),d):(i(a)||r(s)||!1===s||(s=o,o=a,a=void 0),void 0!==s&&!1!==o||(s=o,o=void 0),!1===s&&(s=m),d.each((function(r,i){u&&(l=function(t){return y(i,t.type,s),s.apply(this,arguments)}),a&&(c=function(e){var r,o=t(e.target).closest(a,i).get(0);if(o&&o!==i)return r=t.extend(E(e),{currentTarget:o,liveFired:i}),(l||s).apply(o,[r].concat(n.call(arguments,1)))}),g(i,e,s,o,a,c||l)})))},t.fn.off=function(e,n,a){var o=this;return e&&!i(e)?(t.each(e,(function(t,e){o.off(t,n,e)})),o):(i(n)||r(a)||!1===a||(a=n,n=void 0),!1===a&&(a=m),o.each((function(){y(this,e,a,n)})))},t.fn.trigger=function(e,n){return(e=i(e)||t.isPlainObject(e)?t.Event(e):_(e))._args=n,this.each((function(){e.type in u&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)}))},t.fn.triggerHandler=function(e,n){var r,a;return this.each((function(o,s){(r=E(i(e)?t.Event(e):e))._args=n,r.target=s,t.each(d(s,e.type||e),(function(t,e){if(a=e.proxy(r),r.isImmediatePropagationStopped())return!1}))})),a},"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){i(t)||(t=(e=t).type);var n=document.createEvent(o[t]||"Events"),r=!0;if(e)for(var a in e)"bubbles"==a?r=!!e[a]:n[a]=e[a];return n.initEvent(t,r,!0),_(n)}}(r),function(){try{getComputedStyle(void 0)}catch(e){var t=getComputedStyle;window.getComputedStyle=function(e,n){try{return t(e,n)}catch(t){return null}}}}(),function(t){var e=t.zepto,n=e.qsa,r=e.matches;function i(e){return!(!(e=t(e)).width()&&!e.height())&&"none"!==e.css("display")}var a=t.expr[":"]={visible:function(){if(i(this))return this},hidden:function(){if(!i(this))return this},selected:function(){if(this.selected)return this},checked:function(){if(this.checked)return this},parent:function(){return this.parentNode},first:function(t){if(0===t)return this},last:function(t,e){if(t===e.length-1)return this},eq:function(t,e,n){if(t===n)return this},contains:function(e,n,r){if(t(this).text().indexOf(r)>-1)return this},has:function(t,n,r){if(e.qsa(this,r).length)return this}},o=new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),s=/^\s*>/,u="Zepto"+ +new Date;function l(t,e){t=t.replace(/=#\]/g,'="#"]');var n,r,i=o.exec(t);if(i&&i[2]in a&&(n=a[i[2]],r=i[3],t=i[1],r)){var s=Number(r);r=isNaN(s)?r.replace(/^["']|["']$/g,""):s}return e(t,n,r)}e.qsa=function(r,i){return l(i,(function(a,o,l){try{var c;!a&&o?a="*":s.test(a)&&(c=t(r).addClass(u),a="."+u+" "+a);var d=n(r,a)}catch(t){throw console.error("error performing selector: %o",i),t}finally{c&&c.removeClass(u)}return o?e.uniq(t.map(d,(function(t,e){return o.call(t,e,d,l)}))):d}))},e.matches=function(t,e){return l(e,(function(e,n,i){return(!e||r(t,e))&&(!n||n.call(t,null,i)===t)}))}}(r),t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},i=/(.)^/,a={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},o=/\\|'|\r|\n|\t|\u2028|\u2029/g,s={"&":"&","<":"<",">":">",'"':""","'":"'"},u=new RegExp("[&<>\"']","g"),l=function(t){return null===t?"":(""+t).replace(u,(function(t){return s[t]}))},c=0,d=function(t,e){var n,s=new RegExp([(r.escape||i).source,(r.interpolate||i).source,(r.evaluate||i).source].join("|")+"|$","g"),u=0,d="__p+='";t.replace(s,(function(e,n,r,i,s){return d+=t.slice(u,s).replace(o,(function(t){return"\\"+a[t]})),n&&(d+="'+\n((__t=("+n+"))==null?'':escapeExpr(__t))+\n'"),r&&(d+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),i&&(d+="';\n"+i+"\n__p+='"),u=s+e.length,e})),d+="';\n",r.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["+c+++"]";try{n=new Function(r.variable||"obj","escapeExpr",d)}catch(t){throw t.source=d,t}if(e)return n(e,l);var f=function(t){return n.call(this,t,l)};return f.source="function("+(r.variable||"obj")+"){\n"+d+"}",f};d.settings=r,e.default=d,t.exports=e.default},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,r=t[1]||"",i=t[3];if(!i)return r;if(e&&"function"==typeof btoa){var a=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),o=i.sources.map((function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"}));return[r].concat(o).concat([a]).join("\n")}return[r].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var a=this[i][0];"number"==typeof a&&(r[a]=!0)}for(i=0;i<t.length;i++){var o=t[i];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),e.push(o))}},e}},function(t,e,n){var r,i,a={},o=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=r.apply(this,arguments)),i}),s=function(t){return document.querySelector(t)},u=function(t){var e={};return function(t){if("function"==typeof t)return t();if(void 0===e[t]){var n=s.call(this,t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}}(),l=null,c=0,d=[],f=n(158);function h(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=a[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(b(r.parts[o],e))}else{var s=[];for(o=0;o<r.parts.length;o++)s.push(b(r.parts[o],e));a[r.id]={id:r.id,refs:1,parts:s}}}}function p(t,e){for(var n=[],r={},i=0;i<t.length;i++){var a=t[i],o=e.base?a[0]+e.base:a[0],s={css:a[1],media:a[2],sourceMap:a[3]};r[o]?r[o].parts.push(s):n.push(r[o]={id:o,parts:[s]})}return n}function g(t,e){var n=u(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=d[d.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),d.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=u(t.insertInto+" "+t.insertAt.before);n.insertBefore(e,i)}}function y(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=d.indexOf(t);e>=0&&d.splice(e,1)}function v(t){var e=document.createElement("style");return t.attrs.type="text/css",m(e,t.attrs),g(t,e),e}function m(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function b(t,e){var n,r,i,a;if(e.transform&&t.css){if(!(a=e.transform(t.css)))return function(){};t.css=a}if(e.singleton){var o=c++;n=l||(l=v(e)),r=E.bind(null,n,o,!1),i=E.bind(null,n,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",m(e,t.attrs),g(t,e),e}(e),r=w.bind(null,n,e),i=function(){y(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(e),r=T.bind(null,n),i=function(){y(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=p(t,e);return h(n,e),function(t){for(var r=[],i=0;i<n.length;i++){var o=n[i];(s=a[o.id]).refs--,r.push(s)}for(t&&h(p(t,e),e),i=0;i<r.length;i++){var s;if(0===(s=r[i]).refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete a[s.id]}}}};var A,_=(A=[],function(t,e){return A[t]=e,A.filter(Boolean).join("\n")});function E(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=_(e,i);else{var a=document.createTextNode(i),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(a,o[e]):t.appendChild(a)}}function T(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function w(t,e,n){var r=n.css,i=n.sourceMap,a=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||a)&&(r=f(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var o=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(o),s&&URL.revokeObjectURL(s)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=f(n(12)),i=f(n(0)),a=f(n(1)),o=f(n(3)),s=f(n(2)),u=n(5),l=f(n(30)),c=f(n(20)),d=f(n(6));function f(t){return t&&t.__esModule?t:{default:t}}var h=function(t){function e(n,r,o){(0,i.default)(this,e);var s=(0,a.default)(this,t.call(this,n));return s.settings={},s._i18n=r,s.playerError=o,s._consented=!1,s}return(0,s.default)(e,t),(0,o.default)(e,[{key:"isAudioOnly",get:function(){return!1}},{key:"isAdaptive",get:function(){return!1}},{key:"ended",get:function(){return!1}},{key:"i18n",get:function(){return this._i18n}},{key:"buffering",get:function(){return!1}},{key:"consented",get:function(){return this._consented}}]),e.prototype.consent=function(){this._consented=!0},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.configure=function(t){this._options=d.default.extend(this._options,t)},e.prototype.attemptAutoPlay=function(){var t=this;this.canAutoPlay((function(e,n){e&&t.play()}))},e.prototype.canAutoPlay=function(t){t(!0,null)},(0,o.default)(e,[{key:"isReady",get:function(){return!1}},{key:"hasClosedCaptionsTracks",get:function(){return this.closedCaptionsTracks.length>0}},{key:"closedCaptionsTracks",get:function(){return[]}},{key:"closedCaptionsTrackId",get:function(){return-1},set:function(t){}}]),e}(l.default);e.default=h,(0,r.default)(h.prototype,c.default),h.extend=function(t){return(0,u.extend)(h,t)},h.canPlay=function(t,e){return!1},h.VOD="vod",h.AOD="aod",h.LIVE="live",h.NO_OP="no_op",h.type="playback",t.exports=e.default},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){t.exports={default:n(102),__esModule:!0}},function(t,e,n){var r=n(50)("wks"),i=n(36),a=n(17).Symbol,o="function"==typeof a;(t.exports=function(t){return r[t]||(r[t]=o&&a[t]||(o?a:i)("Symbol."+t))}).store=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(144),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=u(n(0)),i=u(n(1)),a=u(n(3)),o=u(n(2)),s=n(5);function u(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.default)(this,e);var a=(0,i.default)(this,t.call(this,n));return a._options=n,a.uniqueId=(0,s.uniqueId)("o"),a}return(0,o.default)(e,t),(0,a.default)(e,[{key:"options",get:function(){return this._options}}]),e}(u(n(4)).default);e.default=l,t.exports=e.default},function(t,e,n){var r=n(17),i=n(11),a=n(44),o=n(25),s=function(t,e,n){var u,l,c,d=t&s.F,f=t&s.G,h=t&s.S,p=t&s.P,g=t&s.B,y=t&s.W,v=f?i:i[e]||(i[e]={}),m=v.prototype,b=f?r:h?r[e]:(r[e]||{}).prototype;for(u in f&&(n=e),n)(l=!d&&b&&void 0!==b[u])&&u in v||(c=l?b[u]:n[u],v[u]=f&&"function"!=typeof b[u]?n[u]:g&&l?a(c,r):y&&b[u]==c?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(c):p&&"function"==typeof c?a(Function.call,c):c,p&&((v.virtual||(v.virtual={}))[u]=c,t&s.R&&m&&!m[u]&&o(m,u,c)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(26),i=n(65),a=n(45),o=Object.defineProperty;e.f=n(21)?Object.defineProperty:function(t,e,n){if(r(t),e=a(e,!0),r(n),i)try{return o(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(68),i=n(47);t.exports=function(t){return r(i(t))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(n(12)),i=o(n(29)),a=o(n(24));function o(t){return t&&t.__esModule?t:{default:t}}var s={createError:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{useCodePrefix:!0},n=this.constructor&&this.constructor.type||"",o=this.name||n,s=this.i18n||this.core&&this.core.i18n||this.container&&this.container.i18n,u=o+":"+(t&&t.code||"unknown"),l={description:"",level:a.default.Levels.FATAL,origin:o,scope:n,raw:{}},c=(0,r.default)({},l,t,{code:e.useCodePrefix?u:t.code});if(s&&c.level==a.default.Levels.FATAL&&!c.UI){var d={title:s.t("default_error_title"),message:s.t("default_error_message")};c.UI=d}return this.playerError?this.playerError.createError(c):i.default.warn(o,"PlayerError is not defined. Error: ",c),c}};e.default=s,t.exports=e.default},function(t,e,n){t.exports=!n(27)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=d(n(12)),i=d(n(0)),a=d(n(1)),o=d(n(3)),s=d(n(2)),u=n(5),l=d(n(30)),c=d(n(20));function d(t){return t&&t.__esModule?t:{default:t}}var f=function(t){function e(n){(0,i.default)(this,e);var r=(0,a.default)(this,t.call(this,n.options));return r.core=n,r.enabled=!0,r.bindEvents(),r.render(),r}return(0,s.default)(e,t),(0,o.default)(e,[{key:"playerError",get:function(){return this.core.playerError}}]),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.render=function(){return this},e}(l.default);e.default=f,(0,r.default)(f.prototype,c.default),f.extend=function(t){return(0,u.extend)(f,t)},f.type="core",t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(79),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){var r=n(18),i=n(33);t.exports=n(21)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(32);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(67),i=n(51);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(148),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(n(0)),i=c(n(1)),a=c(n(3)),o=c(n(2)),s=c(n(6)),u=n(5),l=c(n(15));function c(t){return t&&t.__esModule?t:{default:t}}var d=/^(\S+)\s*(.*)$/,f=function(t){function e(n){(0,r.default)(this,e);var a=(0,i.default)(this,t.call(this,n));return a.cid=(0,u.uniqueId)("c"),a._ensureElement(),a.delegateEvents(),a}return(0,o.default)(e,t),(0,a.default)(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.destroy=function(){return this.$el.remove(),this.stopListening(),this.undelegateEvents(),this},e.prototype.setElement=function(t,e){return this.$el&&this.undelegateEvents(),this.$el=s.default.zepto.isZ(t)?t:(0,s.default)(t),this.el=this.$el[0],!1!==e&&this.delegateEvents(),this},e.prototype.delegateEvents=function(t){if(!t&&!(t=this.events))return this;for(var e in this.undelegateEvents(),t){var n=t[e];if(n&&n.constructor!==Function&&(n=this[t[e]]),n){var r=e.match(d),i=r[1],a=r[2];i+=".delegateEvents"+this.cid,""===a?this.$el.on(i,n.bind(this)):this.$el.on(i,a,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(this.el,!1);else{var t=s.default.extend({},this.attributes);this.id&&(t.id=this.id),this.className&&(t.class=this.className);var e=u.DomRecycler.create(this.tagName).attr(t);this.setElement(e,!1)}},e}(l.default);e.default=f,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(0));function i(t){return t&&t.__esModule?t:{default:t}}var a=new(i(n(4)).default),o=function t(){(0,r.default)(this,t)};e.default=o,o.on=function(t,e,n){a.on(t,e,n)},o.once=function(t,e,n){a.once(t,e,n)},o.off=function(t,e,n){a.off(t,e,n)},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];a.trigger.apply(a,[t].concat(n))},o.stopListening=function(t,e,n){a.stopListening(t,e,n)},t.exports=e.default},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports={}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=d(n(12)),i=d(n(0)),a=d(n(1)),o=d(n(3)),s=d(n(2)),u=n(5),l=d(n(15)),c=d(n(20));function d(t){return t&&t.__esModule?t:{default:t}}var f=function(t){function e(n){(0,i.default)(this,e);var r=(0,a.default)(this,t.call(this,n.options));return r.core=n,r.enabled=!0,r.bindEvents(),r}return(0,s.default)(e,t),(0,o.default)(e,[{key:"playerError",get:function(){return this.core.playerError}}]),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}(l.default);e.default=f,(0,r.default)(f.prototype,c.default),f.extend=function(t){return(0,u.extend)(f,t)},f.type="core",t.exports=e.default},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(47);t.exports=function(t){return Object(r(t))}},function(t,e,n){"use strict";e.__esModule=!0;var r=o(n(110)),i=o(n(121)),a="function"==typeof i.default&&"symbol"==typeof r.default?function(t){return typeof t}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":typeof t};function o(t){return t&&t.__esModule?t:{default:t}}e.default="function"==typeof i.default&&"symbol"===a(r.default)?function(t){return void 0===t?"undefined":a(t)}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":void 0===t?"undefined":a(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(0),a=(r=i)&&r.__esModule?r:{default:r},o=function t(){(0,a.default)(this,t),this.options={},this.playbackPlugins=[],this.currentSize={width:0,height:0}};o._players={},o.getInstance=function(t){return o._players[t]||(o._players[t]=new o)},e.default=o,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(172),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=d(n(12)),i=d(n(0)),a=d(n(1)),o=d(n(3)),s=d(n(2)),u=n(5),l=d(n(30)),c=d(n(20));function d(t){return t&&t.__esModule?t:{default:t}}var f=function(t){function e(n){(0,i.default)(this,e);var r=(0,a.default)(this,t.call(this,n.options));return r.container=n,r.enabled=!0,r.bindEvents(),r}return(0,s.default)(e,t),(0,o.default)(e,[{key:"playerError",get:function(){return this.container.playerError}}]),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}(l.default);e.default=f,(0,r.default)(f.prototype,c.default),f.extend=function(t){return(0,u.extend)(f,t)},f.type="container",t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=d(n(12)),i=d(n(0)),a=d(n(1)),o=d(n(3)),s=d(n(2)),u=d(n(15)),l=n(5),c=d(n(20));function d(t){return t&&t.__esModule?t:{default:t}}var f=function(t){function e(n){(0,i.default)(this,e);var r=(0,a.default)(this,t.call(this,n.options));return r.container=n,r.enabled=!0,r.bindEvents(),r}return(0,s.default)(e,t),(0,o.default)(e,[{key:"playerError",get:function(){return this.container.playerError}}]),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}(u.default);e.default=f,(0,r.default)(f.prototype,c.default),f.extend=function(t){return(0,l.extend)(f,t)},f.type="container",t.exports=e.default},function(t,e,n){var r=n(104);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(32);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(50)("keys"),i=n(36);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(17),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){t.exports={default:n(108),__esModule:!0}},function(t,e){t.exports=!0},function(t,e,n){var r=n(26),i=n(114),a=n(51),o=n(49)("IE_PROTO"),s=function(){},u=function(){var t,e=n(66)("iframe"),r=a.length;for(e.style.display="none",n(115).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[a[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[o]=t):n=u(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(18).f,i=n(22),a=n(13)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,a)&&r(t,a,{configurable:!0,value:e})}},function(t,e,n){e.f=n(13)},function(t,e,n){var r=n(17),i=n(11),a=n(54),o=n(57),s=n(18).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=a?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:o.f(t)})}},function(t,e,n){var r=n(37),i=n(33),a=n(19),o=n(45),s=n(22),u=n(65),l=Object.getOwnPropertyDescriptor;e.f=n(21)?l:function(t,e){if(t=a(t),e=o(e,!0),u)try{return l(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(149),a=(r=i)&&r.__esModule?r:{default:r};e.default={Kibo:a.default},t.exports=e.default},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(83),a=(r=i)&&r.__esModule?r:{default:r};e.default=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return(0,a.default)(t)}},function(t,e){var n,r,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(t){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var u,l=[],c=!1,d=-1;function f(){c&&u&&(c=!1,u.length?l=u.concat(l):d=-1,l.length&&h())}function h(){if(!c){var t=s(f);c=!0;for(var e=l.length;e;){for(u=l,l=[];++d<e;)u&&u[d].run();d=-1,e=l.length}u=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}i.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];l.push(new p(t,e)),1!==l.length||c||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=n(177),t.exports=e.default},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,n){t.exports=!n(21)&&!n(27)((function(){return 7!=Object.defineProperty(n(66)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(32),i=n(17).document,a=r(i)&&r(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e,n){var r=n(22),i=n(19),a=n(106)(!1),o=n(49)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),u=0,l=[];for(n in s)n!=o&&r(s,n)&&l.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~a(l,n)||l.push(n));return l}},function(t,e,n){var r=n(46);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(48),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(16),i=n(11),a=n(27);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],o={};o[t]=e(n),r(r.S+r.F*a((function(){n(1)})),"Object",o)}},function(t,e,n){"use strict";var r=n(112)(!0);n(72)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e,n){"use strict";var r=n(54),i=n(16),a=n(73),o=n(25),s=n(22),u=n(34),l=n(113),c=n(56),d=n(116),f=n(13)("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,g,y,v,m){l(n,e,g);var b,A,_,E=function(t){if(!h&&t in k)return k[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},T=e+" Iterator",w="values"==y,S=!1,k=t.prototype,C=k[f]||k["@@iterator"]||y&&k[y],L=C||E(y),x=y?w?E("entries"):L:void 0,R="Array"==e&&k.entries||C;if(R&&(_=d(R.call(new t)))!==Object.prototype&&(c(_,T,!0),r||s(_,f)||o(_,f,p)),w&&C&&"values"!==C.name&&(S=!0,L=function(){return C.call(this)}),r&&!m||!h&&!S&&k[f]||o(k,f,L),u[e]=L,u[T]=p,y)if(b={values:w?L:E("values"),keys:v?L:E("keys"),entries:x},m)for(A in b)A in k||a(k,A,b[A]);else i(i.P+i.F*(h||S),e,b);return b}},function(t,e,n){t.exports=n(25)},function(t,e,n){var r=n(67),i=n(51).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){t.exports={default:n(132),__esModule:!0}},function(t,e,n){t.exports={default:n(138),__esModule:!0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(152),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(6)),i=a(n(7));function a(t){return t&&t.__esModule?t:{default:t}}var o={getStyleFor:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{baseUrl:""};return(0,r.default)('<style class="clappr-style"></style>').html((0,i.default)(t.toString())(e))}};e.default=o,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(n(0)),i=c(n(1)),a=c(n(3)),o=c(n(2)),s=c(n(4)),u=c(n(15)),l=c(n(29));function c(t){return t&&t.__esModule?t:{default:t}}var d=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments[1];(0,r.default)(this,e);var o=(0,i.default)(this,t.call(this,n));return o.core=a,o}return(0,o.default)(e,t),(0,a.default)(e,[{key:"name",get:function(){return"error"}}],[{key:"Levels",get:function(){return{FATAL:"FATAL",WARN:"WARN",INFO:"INFO"}}}]),e.prototype.createError=function(t){this.core?this.core.trigger(s.default.ERROR,t):l.default.warn(this.name,"Core is not set. Error: ",t)},e}(u.default);e.default=d,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(155),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e){t.exports=function(t){return"string"!=typeof t?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),/["'() \t\n]/.test(t)?'"'+t.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(163),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){t.exports={default:n(164),__esModule:!0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(176),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(182),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(183),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(186),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){t.exports={default:n(187),__esModule:!0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(189),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(192),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(196),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(202),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(206),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(212),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(213),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e){t.exports="<%=baseUrl%>/a8c874b93b3d848f39a71260c57e3863.cur"},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){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(223),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(233),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=j(n(101)),i=j(n(5)),a=j(n(4)),o=j(n(10)),s=j(n(43)),u=j(n(35)),l=j(n(23)),c=j(n(42)),d=j(n(15)),f=j(n(30)),h=j(n(14)),p=j(n(80)),g=j(n(77)),y=j(n(24)),v=j(n(82)),m=j(n(31)),b=j(n(40)),A=j(n(63)),_=j(n(84)),E=j(n(86)),T=j(n(87)),w=j(n(85)),S=j(n(41)),k=j(n(89)),C=j(n(90)),L=j(n(95)),x=j(n(94)),R=j(n(98)),I=j(n(99)),P=j(n(29)),O=j(n(93)),D=j(n(91)),M=j(n(92)),N=j(n(78)),U=j(n(60)),F=j(n(7)),B=j(n(6));function j(t){return t&&t.__esModule?t:{default:t}}e.default={Player:r.default,Mediator:m.default,Events:a.default,Browser:h.default,PlayerInfo:b.default,MediaControl:L.default,ContainerPlugin:s.default,UIContainerPlugin:c.default,CorePlugin:u.default,UICorePlugin:l.default,Playback:o.default,Container:p.default,Core:g.default,PlayerError:y.default,Loader:v.default,BaseObject:d.default,UIObject:f.default,Utils:i.default,BaseFlashPlayback:A.default,Flash:_.default,FlasHLS:E.default,HLS:T.default,HTML5Audio:w.default,HTML5Video:S.default,HTMLImg:k.default,NoOp:C.default,ClickToPausePlugin:x.default,DVRControls:R.default,Favicon:I.default,Log:P.default,Poster:O.default,SpinnerThreeBouncePlugin:D.default,WaterMarkPlugin:M.default,Styler:N.default,Vendor:U.default,version:"0.3.0",template:F.default,$:B.default},t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=m(n(12)),i=m(n(53)),a=m(n(0)),o=m(n(1)),s=m(n(3)),u=m(n(2)),l=n(5),c=m(n(15)),d=m(n(4)),f=m(n(14)),h=m(n(150)),p=m(n(82)),g=m(n(40)),y=m(n(20)),v=m(n(6));function m(t){return t&&t.__esModule?t:{default:t}}var b=(0,l.currentScriptUrl)().replace(/\/[^/]+$/,""),A=function(t){function e(n){(0,a.default)(this,e);var r=(0,o.default)(this,t.call(this,n)),i={playerId:(0,l.uniqueId)(""),persistConfig:!0,width:640,height:360,baseUrl:b,allowUserInteraction:f.default.isMobile,playback:{recycleVideo:!0}};return r._options=v.default.extend(i,n),r.options.sources=r._normalizeSources(n),r.options.chromeless||(r.options.allowUserInteraction=!0),r.options.allowUserInteraction||(r.options.disableKeyboardShortcuts=!0),r._registerOptionEventListeners(r.options.events),r._coreFactory=new h.default(r),r.playerInfo=g.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(0,u.default)(e,t),(0,s.default)(e,[{key:"loader",set:function(t){this._loader=t},get:function(){return this._loader||(this._loader=new p.default(this.options.plugins||{},this.options.playerId)),this._loader}},{key:"ended",get:function(){return this.core.activeContainer.ended}},{key:"buffering",get:function(){return this.core.activeContainer.buffering}},{key:"isReady",get:function(){return!!this._ready}},{key:"eventsMapping",get:function(){return{onReady:d.default.PLAYER_READY,onResize:d.default.PLAYER_RESIZE,onPlay:d.default.PLAYER_PLAY,onPause:d.default.PLAYER_PAUSE,onStop:d.default.PLAYER_STOP,onEnded:d.default.PLAYER_ENDED,onSeek:d.default.PLAYER_SEEK,onError:d.default.PLAYER_ERROR,onTimeUpdate:d.default.PLAYER_TIMEUPDATE,onVolumeUpdate:d.default.PLAYER_VOLUMEUPDATE,onSubtitleAvailable:d.default.PLAYER_SUBTITLE_AVAILABLE}}}]),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,d.default.CORE_READY,this._onReady),this.listenTo(this.core.activeContainer,d.default.CORE_ACTIVE_CONTAINER_CHANGED,this._containerChanged),this.listenTo(this.core,d.default.CORE_FULLSCREEN,this._onFullscreenChange),this.listenTo(this.core,d.default.CORE_RESIZE,this._onResize),this},e.prototype._addContainerEventListeners=function(){var t=this.core.activeContainer;return t&&(this.listenTo(t,d.default.CONTAINER_PLAY,this._onPlay),this.listenTo(t,d.default.CONTAINER_PAUSE,this._onPause),this.listenTo(t,d.default.CONTAINER_STOP,this._onStop),this.listenTo(t,d.default.CONTAINER_ENDED,this._onEnded),this.listenTo(t,d.default.CONTAINER_SEEK,this._onSeek),this.listenTo(t,d.default.CONTAINER_ERROR,this._onError),this.listenTo(t,d.default.CONTAINER_TIMEUPDATE,this._onTimeUpdate),this.listenTo(t,d.default.CONTAINER_VOLUME,this._onVolumeUpdate),this.listenTo(t,d.default.CONTAINER_SUBTITLE_AVAILABLE,this._onSubtitleAvailable)),this},e.prototype._registerOptionEventListeners=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,i.default)(e).length>0;return r&&(0,i.default)(n).forEach((function(e){var r=t.eventsMapping[e];r&&t.off(r,n[e])})),(0,i.default)(e).forEach((function(n){var r=t.eventsMapping[n];if(r){var i=e[n];(i="function"==typeof 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(d.default.PLAYER_READY)},e.prototype._onFullscreenChange=function(t){this.trigger(d.default.PLAYER_FULLSCREEN,t)},e.prototype._onVolumeUpdate=function(t){this.trigger(d.default.PLAYER_VOLUMEUPDATE,t)},e.prototype._onSubtitleAvailable=function(){this.trigger(d.default.PLAYER_SUBTITLE_AVAILABLE)},e.prototype._onResize=function(t){this.trigger(d.default.PLAYER_RESIZE,t)},e.prototype._onPlay=function(){this.trigger(d.default.PLAYER_PLAY)},e.prototype._onPause=function(){this.trigger(d.default.PLAYER_PAUSE)},e.prototype._onStop=function(){this.trigger(d.default.PLAYER_STOP,this.getCurrentTime())},e.prototype._onEnded=function(){this.trigger(d.default.PLAYER_ENDED)},e.prototype._onSeek=function(t){this.trigger(d.default.PLAYER_SEEK,t)},e.prototype._onTimeUpdate=function(t){this.trigger(d.default.PLAYER_TIMEUPDATE,t)},e.prototype._onError=function(t){this.trigger(d.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.stopListening(),this.core.destroy(),this},e.prototype.consent=function(){return this.core.getCurrentPlayback().consent(),this},e.prototype.play=function(){return this.core.activeContainer.play(),this},e.prototype.pause=function(){return this.core.activeContainer.pause(),this},e.prototype.stop=function(){return this.core.activeContainer.stop(),this},e.prototype.seek=function(t){return this.core.activeContainer.seek(t),this},e.prototype.seekPercentage=function(t){return this.core.activeContainer.seekPercentage(t),this},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.activeContainer.isPlaying()},e.prototype.isDvrEnabled=function(){return this.core.activeContainer.isDvrEnabled()},e.prototype.isDvrInUse=function(){return this.core.activeContainer.isDvrInUse()},e.prototype.configure=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._registerOptionEventListeners(t.events,this.options.events),this.core.configure(t),this},e.prototype.getPlugin=function(t){return this.core.plugins.concat(this.core.activeContainer.plugins).filter((function(e){return e.name===t}))[0]},e.prototype.getCurrentTime=function(){return this.core.activeContainer.getCurrentTime()},e.prototype.getStartTimeOffset=function(){return this.core.activeContainer.getStartTimeOffset()},e.prototype.getDuration=function(){return this.core.activeContainer.getDuration()},e}(c.default);e.default=A,(0,r.default)(A.prototype,y.default),t.exports=e.default},function(t,e,n){n(103),t.exports=n(11).Object.assign},function(t,e,n){var r=n(16);r(r.S+r.F,"Object",{assign:n(105)})},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";var r=n(28),i=n(52),a=n(37),o=n(38),s=n(68),u=Object.assign;t.exports=!u||n(27)((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r}))?function(t,e){for(var n=o(t),u=arguments.length,l=1,c=i.f,d=a.f;u>l;)for(var f,h=s(arguments[l++]),p=c?r(h).concat(c(h)):r(h),g=p.length,y=0;g>y;)d.call(h,f=p[y++])&&(n[f]=h[f]);return n}:u},function(t,e,n){var r=n(19),i=n(69),a=n(107);t.exports=function(t){return function(e,n,o){var s,u=r(e),l=i(u.length),c=a(o,l);if(t&&n!=n){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((t||c in u)&&u[c]===n)return t||c||0;return!t&&-1}}},function(t,e,n){var r=n(48),i=Math.max,a=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):a(t,e)}},function(t,e,n){n(109),t.exports=n(11).Object.keys},function(t,e,n){var r=n(38),i=n(28);n(70)("keys",(function(){return function(t){return i(r(t))}}))},function(t,e,n){t.exports={default:n(111),__esModule:!0}},function(t,e,n){n(71),n(117),t.exports=n(57).f("iterator")},function(t,e,n){var r=n(48),i=n(47);t.exports=function(t){return function(e,n){var a,o,s=String(i(e)),u=r(n),l=s.length;return u<0||u>=l?t?"":void 0:(a=s.charCodeAt(u))<55296||a>56319||u+1===l||(o=s.charCodeAt(u+1))<56320||o>57343?t?s.charAt(u):a:t?s.slice(u,u+2):o-56320+(a-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(55),i=n(33),a=n(56),o={};n(25)(o,n(13)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(o,{next:i(1,n)}),a(t,e+" Iterator")}},function(t,e,n){var r=n(18),i=n(26),a=n(28);t.exports=n(21)?Object.defineProperties:function(t,e){i(t);for(var n,o=a(e),s=o.length,u=0;s>u;)r.f(t,n=o[u++],e[n]);return t}},function(t,e,n){t.exports=n(17).document&&document.documentElement},function(t,e,n){var r=n(22),i=n(38),a=n(49)("IE_PROTO"),o=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?o:null}},function(t,e,n){n(118);for(var r=n(17),i=n(25),a=n(34),o=n(13)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var l=s[u],c=r[l],d=c&&c.prototype;d&&!d[o]&&i(d,o,l),a[l]=a.Array}},function(t,e,n){"use strict";var r=n(119),i=n(120),a=n(34),o=n(19);t.exports=n(72)(Array,"Array",(function(t,e){this._t=o(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){t.exports={default:n(122),__esModule:!0}},function(t,e,n){n(123),n(129),n(130),n(131),t.exports=n(11).Symbol},function(t,e,n){"use strict";var r=n(17),i=n(22),a=n(21),o=n(16),s=n(73),u=n(124).KEY,l=n(27),c=n(50),d=n(56),f=n(36),h=n(13),p=n(57),g=n(58),y=n(125),v=n(126),m=n(127),b=n(26),A=n(19),_=n(45),E=n(33),T=n(55),w=n(128),S=n(59),k=n(18),C=n(28),L=S.f,x=k.f,R=w.f,I=r.Symbol,P=r.JSON,O=P&&P.stringify,D=h("_hidden"),M=h("toPrimitive"),N={}.propertyIsEnumerable,U=c("symbol-registry"),F=c("symbols"),B=c("op-symbols"),j=Object.prototype,K="function"==typeof I,V=r.QObject,G=!V||!V.prototype||!V.prototype.findChild,H=a&&l((function(){return 7!=T(x({},"a",{get:function(){return x(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=L(j,e);r&&delete j[e],x(t,e,n),r&&t!==j&&x(j,e,r)}:x,Y=function(t){var e=F[t]=T(I.prototype);return e._k=t,e},z=K&&"symbol"==typeof I.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof I},$=function(t,e,n){return t===j&&$(B,e,n),b(t),e=_(e,!0),b(n),i(F,e)?(n.enumerable?(i(t,D)&&t[D][e]&&(t[D][e]=!1),n=T(n,{enumerable:E(0,!1)})):(i(t,D)||x(t,D,E(1,{})),t[D][e]=!0),H(t,e,n)):x(t,e,n)},W=function(t,e){b(t);for(var n,r=v(e=A(e)),i=0,a=r.length;a>i;)$(t,n=r[i++],e[n]);return t},q=function(t){var e=N.call(this,t=_(t,!0));return!(this===j&&i(F,t)&&!i(B,t))&&(!(e||!i(this,t)||!i(F,t)||i(this,D)&&this[D][t])||e)},X=function(t,e){if(t=A(t),e=_(e,!0),t!==j||!i(F,e)||i(B,e)){var n=L(t,e);return!n||!i(F,e)||i(t,D)&&t[D][e]||(n.enumerable=!0),n}},J=function(t){for(var e,n=R(A(t)),r=[],a=0;n.length>a;)i(F,e=n[a++])||e==D||e==u||r.push(e);return r},Q=function(t){for(var e,n=t===j,r=R(n?B:A(t)),a=[],o=0;r.length>o;)!i(F,e=r[o++])||n&&!i(j,e)||a.push(F[e]);return a};K||(s((I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===j&&e.call(B,n),i(this,D)&&i(this[D],t)&&(this[D][t]=!1),H(this,t,E(1,n))};return a&&G&&H(j,t,{configurable:!0,set:e}),Y(t)}).prototype,"toString",(function(){return this._k})),S.f=X,k.f=$,n(74).f=w.f=J,n(37).f=q,n(52).f=Q,a&&!n(54)&&s(j,"propertyIsEnumerable",q,!0),p.f=function(t){return Y(h(t))}),o(o.G+o.W+o.F*!K,{Symbol:I});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Z.length>tt;)h(Z[tt++]);for(Z=C(h.store),tt=0;Z.length>tt;)g(Z[tt++]);o(o.S+o.F*!K,"Symbol",{for:function(t){return i(U,t+="")?U[t]:U[t]=I(t)},keyFor:function(t){if(z(t))return y(U,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){G=!0},useSimple:function(){G=!1}}),o(o.S+o.F*!K,"Object",{create:function(t,e){return void 0===e?T(t):W(T(t),e)},defineProperty:$,defineProperties:W,getOwnPropertyDescriptor:X,getOwnPropertyNames:J,getOwnPropertySymbols:Q}),P&&o(o.S+o.F*(!K||l((function(){var t=I();return"[null]"!=O([t])||"{}"!=O({a:t})||"{}"!=O(Object(t))}))),"JSON",{stringify:function(t){if(void 0!==t&&!z(t)){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);return"function"==typeof(e=r[1])&&(n=e),!n&&m(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!z(e))return e}),r[1]=e,O.apply(P,r)}}}),I.prototype[M]||n(25)(I.prototype,M,I.prototype.valueOf),d(I,"Symbol"),d(Math,"Math",!0),d(r.JSON,"JSON",!0)},function(t,e,n){var r=n(36)("meta"),i=n(32),a=n(22),o=n(18).f,s=0,u=Object.isExtensible||function(){return!0},l=!n(27)((function(){return u(Object.preventExtensions({}))})),c=function(t){o(t,r,{value:{i:"O"+ ++s,w:{}}})},d=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,r)){if(!u(t))return"F";if(!e)return"E";c(t)}return t[r].i},getWeak:function(t,e){if(!a(t,r)){if(!u(t))return!0;if(!e)return!1;c(t)}return t[r].w},onFreeze:function(t){return l&&d.NEED&&u(t)&&!a(t,r)&&c(t),t}}},function(t,e,n){var r=n(28),i=n(19);t.exports=function(t,e){for(var n,a=i(t),o=r(a),s=o.length,u=0;s>u;)if(a[n=o[u++]]===e)return n}},function(t,e,n){var r=n(28),i=n(52),a=n(37);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var o,s=n(t),u=a.f,l=0;s.length>l;)u.call(t,o=s[l++])&&e.push(o);return e}},function(t,e,n){var r=n(46);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(19),i=n(74).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return o&&"[object Window]"==a.call(t)?function(t){try{return i(t)}catch(t){return o.slice()}}(t):i(r(t))}},function(t,e){},function(t,e,n){n(58)("asyncIterator")},function(t,e,n){n(58)("observable")},function(t,e,n){n(133);var r=n(11).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(16);r(r.S+r.F*!n(21),"Object",{defineProperty:n(18).f})},function(t,e,n){t.exports={default:n(135),__esModule:!0}},function(t,e,n){n(136),t.exports=n(11).Object.setPrototypeOf},function(t,e,n){var r=n(16);r(r.S,"Object",{setPrototypeOf:n(137).set})},function(t,e,n){var r=n(32),i=n(26),a=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(44)(Function.call,n(59).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return a(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:a}},function(t,e,n){n(139);var r=n(11).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){var r=n(16);r(r.S,"Object",{create:n(55)})},function(t,e,n){t.exports={default:n(141),__esModule:!0}},function(t,e,n){n(142);var r=n(11).Object;t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)}},function(t,e,n){var r=n(19),i=n(59).f;n(70)("getOwnPropertyDescriptor",(function(){return function(t,e){return i(r(t),e)}}))},function(t,e,n){"use strict";Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i<n;){var a=e[i];if(t.call(r,a,i,e))return a;i++}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDevice=e.getViewportSize=e.getOsData=e.getBrowserData=e.getBrowserInfo=void 0;var r=o(n(6)),i=o(n(145)),a=o(n(146));function o(t){return t&&t.__esModule?t:{default:t}}var s={},u=e.getBrowserInfo=function(t){var e=t.match(/\b(playstation 4|nx|opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[],n=void 0;if(/trident/i.test(e[1]))return n=/\brv[ :]+(\d+)/g.exec(t)||[],{name:"IE",version:parseInt(n[1]||"")};if("Chrome"===e[1]){if(null!=(n=t.match(/\bOPR\/(\d+)/)))return{name:"Opera",version:parseInt(n[1])};if(null!=(n=t.match(/\bEdge\/(\d+)/)))return{name:"Edge",version:parseInt(n[1])}}else/android/i.test(t)&&(n=t.match(/version\/(\d+)/i))&&(e.splice(1,1,"Android WebView"),e.splice(2,1,n[1]));return{name:(e=e[2]?[e[1],e[2]]:[navigator.appName,navigator.appVersion,"-?"])[0],version:parseInt(e[1])}},l=e.getBrowserData=function(){var t={},e=s.userAgent.toLowerCase();for(var n in i.default){var r=new RegExp(i.default[n].identifier.toLowerCase()).exec(e);if(null!=r&&r[1]){if(t.name=i.default[n].name,t.group=i.default[n].group,i.default[n].versionIdentifier){var a=new RegExp(i.default[n].versionIdentifier.toLowerCase()).exec(e);null!=a&&a[1]&&c(a[1],t)}else c(r[1],t);break}}return t},c=function(t,e){var n=t.split(".",2);e.fullVersion=t,n[0]&&(e.majorVersion=parseInt(n[0])),n[1]&&(e.minorVersion=parseInt(n[1]))},d=e.getOsData=function(){var t={},e=s.userAgent.toLowerCase();for(var n in a.default){var r=new RegExp(a.default[n].identifier.toLowerCase()).exec(e);if(null!=r){if(t.name=a.default[n].name,t.group=a.default[n].group,a.default[n].version)f(a.default[n].version,a.default[n].versionSeparator?a.default[n].versionSeparator:".",t);else if(r[1])f(r[1],a.default[n].versionSeparator?a.default[n].versionSeparator:".",t);else if(a.default[n].versionIdentifier){var i=new RegExp(a.default[n].versionIdentifier.toLowerCase()).exec(e);null!=i&&i[1]&&f(i[1],a.default[n].versionSeparator?a.default[n].versionSeparator:".",t)}break}}return t},f=function(t,e,n){var r="["==e.substr(0,1)?new RegExp(e,"g"):e,i=t.split(r,2);"."!=e&&(t=t.replace(new RegExp(e,"g"),".")),n.fullVersion=t,i&&i[0]&&(n.majorVersion=parseInt(i[0])),i&&i[1]&&(n.minorVersion=parseInt(i[1]))},h=e.getViewportSize=function(){var t={};return t.width=(0,r.default)(window).width(),t.height=(0,r.default)(window).height(),t},p=e.getDevice=function(t){var e=/\((iP(?:hone|ad|od))?(?:[^;]*; ){0,2}([^)]+(?=\)))/.exec(t);return e&&(e[1]||e[2])||""},g=u(navigator.userAgent);s.isEdge=/edge/i.test(navigator.userAgent),s.isChrome=/chrome|CriOS/i.test(navigator.userAgent)&&!s.isEdge,s.isSafari=/safari/i.test(navigator.userAgent)&&!s.isChrome&&!s.isEdge,s.isFirefox=/firefox/i.test(navigator.userAgent),s.isLegacyIE=!!window.ActiveXObject,s.isIE=s.isLegacyIE||/trident.*rv:1\d/i.test(navigator.userAgent),s.isIE11=/trident.*rv:11/i.test(navigator.userAgent),s.isChromecast=s.isChrome&&/CrKey/i.test(navigator.userAgent),s.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone|IEMobile|Mobile Safari|Opera Mini/i.test(navigator.userAgent),s.isiOS=/iPad|iPhone|iPod/i.test(navigator.userAgent),s.isAndroid=/Android/i.test(navigator.userAgent),s.isWindowsPhone=/Windows Phone/i.test(navigator.userAgent),s.isWin8App=/MSAppHost/i.test(navigator.userAgent),s.isWiiU=/WiiU/i.test(navigator.userAgent),s.isPS4=/PlayStation 4/i.test(navigator.userAgent),s.hasLocalstorage=function(){try{return localStorage.setItem("clappr","clappr"),localStorage.removeItem("clappr"),!0}catch(t){return!1}}(),s.hasFlash=function(){try{return!!new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(t){return!(!navigator.mimeTypes||void 0===navigator.mimeTypes["application/x-shockwave-flash"]||!navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)}}(),s.name=g.name,s.version=g.version,s.userAgent=navigator.userAgent,s.data=l(),s.os=d(),s.viewport=h(),s.device=p(s.userAgent),void 0!==window.orientation&&function(){switch(window.orientation){case-90:case 90:s.viewport.orientation="landscape";break;default:s.viewport.orientation="portrait"}}(),e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=[{name:"Chromium",group:"Chrome",identifier:"Chromium/([0-9.]*)"},{name:"Chrome Mobile",group:"Chrome",identifier:"Chrome/([0-9.]*) Mobile",versionIdentifier:"Chrome/([0-9.]*)"},{name:"Chrome",group:"Chrome",identifier:"Chrome/([0-9.]*)"},{name:"Chrome for iOS",group:"Chrome",identifier:"CriOS/([0-9.]*)"},{name:"Android Browser",group:"Chrome",identifier:"CrMo/([0-9.]*)"},{name:"Firefox",group:"Firefox",identifier:"Firefox/([0-9.]*)"},{name:"Opera Mini",group:"Opera",identifier:"Opera Mini/([0-9.]*)"},{name:"Opera",group:"Opera",identifier:"Opera ([0-9.]*)"},{name:"Opera",group:"Opera",identifier:"Opera/([0-9.]*)",versionIdentifier:"Version/([0-9.]*)"},{name:"IEMobile",group:"Explorer",identifier:"IEMobile/([0-9.]*)"},{name:"Internet Explorer",group:"Explorer",identifier:"MSIE ([a-zA-Z0-9.]*)"},{name:"Internet Explorer",group:"Explorer",identifier:"Trident/([0-9.]*)",versionIdentifier:"rv:([0-9.]*)"},{name:"Spartan",group:"Spartan",identifier:"Edge/([0-9.]*)",versionIdentifier:"Edge/([0-9.]*)"},{name:"Safari",group:"Safari",identifier:"Safari/([0-9.]*)",versionIdentifier:"Version/([0-9.]*)"}],t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=[{name:"Windows 2000",group:"Windows",identifier:"Windows NT 5.0",version:"5.0"},{name:"Windows XP",group:"Windows",identifier:"Windows NT 5.1",version:"5.1"},{name:"Windows Vista",group:"Windows",identifier:"Windows NT 6.0",version:"6.0"},{name:"Windows 7",group:"Windows",identifier:"Windows NT 6.1",version:"7.0"},{name:"Windows 8",group:"Windows",identifier:"Windows NT 6.2",version:"8.0"},{name:"Windows 8.1",group:"Windows",identifier:"Windows NT 6.3",version:"8.1"},{name:"Windows 10",group:"Windows",identifier:"Windows NT 10.0",version:"10.0"},{name:"Windows Phone",group:"Windows Phone",identifier:"Windows Phone ([0-9.]*)"},{name:"Windows Phone",group:"Windows Phone",identifier:"Windows Phone OS ([0-9.]*)"},{name:"Windows",group:"Windows",identifier:"Windows"},{name:"Chrome OS",group:"Chrome OS",identifier:"CrOS"},{name:"Android",group:"Android",identifier:"Android",versionIdentifier:"Android ([a-zA-Z0-9.-]*)"},{name:"iPad",group:"iOS",identifier:"iPad",versionIdentifier:"OS ([0-9_]*)",versionSeparator:"[_|.]"},{name:"iPod",group:"iOS",identifier:"iPod",versionIdentifier:"OS ([0-9_]*)",versionSeparator:"[_|.]"},{name:"iPhone",group:"iOS",identifier:"iPhone OS",versionIdentifier:"OS ([0-9_]*)",versionSeparator:"[_|.]"},{name:"Mac OS X High Sierra",group:"Mac OS",identifier:"Mac OS X (10([_|.])13([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Sierra",group:"Mac OS",identifier:"Mac OS X (10([_|.])12([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X El Capitan",group:"Mac OS",identifier:"Mac OS X (10([_|.])11([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Yosemite",group:"Mac OS",identifier:"Mac OS X (10([_|.])10([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Mavericks",group:"Mac OS",identifier:"Mac OS X (10([_|.])9([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Mountain Lion",group:"Mac OS",identifier:"Mac OS X (10([_|.])8([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Lion",group:"Mac OS",identifier:"Mac OS X (10([_|.])7([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Snow Leopard",group:"Mac OS",identifier:"Mac OS X (10([_|.])6([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Leopard",group:"Mac OS",identifier:"Mac OS X (10([_|.])5([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Tiger",group:"Mac OS",identifier:"Mac OS X (10([_|.])4([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Panther",group:"Mac OS",identifier:"Mac OS X (10([_|.])3([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Jaguar",group:"Mac OS",identifier:"Mac OS X (10([_|.])2([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Puma",group:"Mac OS",identifier:"Mac OS X (10([_|.])1([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Cheetah",group:"Mac OS",identifier:"Mac OS X (10([_|.])0([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS",group:"Mac OS",identifier:"Mac OS"},{name:"Ubuntu",group:"Linux",identifier:"Ubuntu",versionIdentifier:"Ubuntu/([0-9.]*)"},{name:"Debian",group:"Linux",identifier:"Debian"},{name:"Gentoo",group:"Linux",identifier:"Gentoo"},{name:"Linux",group:"Linux",identifier:"Linux"},{name:"BlackBerry",group:"BlackBerry",identifier:"BlackBerry"}],t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=e.mp4="data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE=";e.default={mp4:r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(0),a=(r=i)&&r.__esModule?r:{default:r},o=n(60),s="font-weight: bold; font-size: 13px;",u="color: #ff8000;"+s,l="color: #ff0000;"+s,c=["color: #0000ff;font-weight: bold; font-size: 13px;","color: #006600;font-weight: bold; font-size: 13px;",u,l,l],d=["debug","info","warn","error","disabled"],f=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;(0,a.default)(this,t),this.kibo=new o.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=r}return t.prototype.debug=function(t){this.log(t,0,Array.prototype.slice.call(arguments,1))},t.prototype.info=function(t){this.log(t,1,Array.prototype.slice.call(arguments,1))},t.prototype.warn=function(t){this.log(t,2,Array.prototype.slice.call(arguments,1))},t.prototype.error=function(t){this.log(t,3,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 "+d[this.level],u)},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=c[e],i="";t&&(i="["+t+"]"),window.console&&window.console.log&&window.console.log.apply(console,["%c["+d[e]+"]"+i,r].concat(n))}},t}();e.default=f,f.LEVEL_DEBUG=0,f.LEVEL_INFO=1,f.LEVEL_WARN=2,f.LEVEL_ERROR=3,f.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},f.setLevel=function(t){this.getInstance().level=t},f.debug=function(){this.getInstance().debug.apply(this.getInstance(),arguments)},f.info=function(){this.getInstance().info.apply(this.getInstance(),arguments)},f.warn=function(){this.getInstance().warn.apply(this.getInstance(),arguments)},f.error=function(){this.getInstance().error.apply(this.getInstance(),arguments)},t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){this.element=t||window.document,this.initialize()};r.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"},r.KEY_CODES_BY_NAME={},function(){for(var t in r.KEY_NAMES_BY_CODE)Object.prototype.hasOwnProperty.call(r.KEY_NAMES_BY_CODE,t)&&(r.KEY_CODES_BY_NAME[r.KEY_NAMES_BY_CODE[t]]=+t)}(),r.MODIFIERS=["shift","ctrl","alt"],r.registerEvent=document.addEventListener?function(t,e,n){t.addEventListener(e,n,!1)}:document.attachEvent?function(t,e,n){t.attachEvent("on"+e,n)}:void 0,r.unregisterEvent=document.removeEventListener?function(t,e,n){t.removeEventListener(e,n,!1)}:document.detachEvent?function(t,e,n){t.detachEvent("on"+e,n)}:void 0,r.stringContains=function(t,e){return-1!==t.indexOf(e)},r.neatString=function(t){return t.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")},r.capitalize=function(t){return t.toLowerCase().replace(/^./,(function(t){return t.toUpperCase()}))},r.isString=function(t){return r.stringContains(Object.prototype.toString.call(t),"String")},r.arrayIncludes=Array.prototype.indexOf?function(t,e){return-1!==t.indexOf(e)}:function(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return!0;return!1},r.extractModifiers=function(t){var e,n;for(e=[],n=0;n<r.MODIFIERS.length;n++)r.stringContains(t,r.MODIFIERS[n])&&e.push(r.MODIFIERS[n]);return e},r.extractKey=function(t){var e,n;for(e=r.neatString(t).split(" "),n=0;n<e.length;n++)if(!r.arrayIncludes(r.MODIFIERS,e[n]))return e[n]},r.modifiersAndKey=function(t){var e,n;return r.stringContains(t,"any")?r.neatString(t).split(" ").slice(0,2).join(" "):(e=r.extractModifiers(t),(n=r.extractKey(t))&&!r.arrayIncludes(r.MODIFIERS,n)&&e.push(n),e.join(" "))},r.keyName=function(t){return r.KEY_NAMES_BY_CODE[t+""]},r.keyCode=function(t){return+r.KEY_CODES_BY_NAME[t]},r.prototype.initialize=function(){var t,e=this;for(this.lastKeyCode=-1,this.lastModifiers={},t=0;t<r.MODIFIERS.length;t++)this.lastModifiers[r.MODIFIERS[t]]=!1;this.keysDown={any:[]},this.keysUp={any:[]},this.downHandler=this.handler("down"),this.upHandler=this.handler("up"),r.registerEvent(this.element,"keydown",this.downHandler),r.registerEvent(this.element,"keyup",this.upHandler),r.registerEvent(window,"unload",(function t(){r.unregisterEvent(e.element,"keydown",e.downHandler),r.unregisterEvent(e.element,"keyup",e.upHandler),r.unregisterEvent(window,"unload",t)}))},r.prototype.handler=function(t){var e=this;return function(n){var i,a,o;for(n=n||window.event,e.lastKeyCode=n.keyCode,i=0;i<r.MODIFIERS.length;i++)e.lastModifiers[r.MODIFIERS[i]]=n[r.MODIFIERS[i]+"Key"];for(r.arrayIncludes(r.MODIFIERS,r.keyName(e.lastKeyCode))&&(e.lastModifiers[r.keyName(e.lastKeyCode)]=!0),a=e["keys"+r.capitalize(t)],i=0;i<a.any.length;i++)!1===a.any[i](n)&&n.preventDefault&&n.preventDefault();if(a[o=e.lastModifiersAndKey()])for(i=0;i<a[o].length;i++)!1===a[o][i](n)&&n.preventDefault&&n.preventDefault()}},r.prototype.registerKeys=function(t,e,n){var i,a,o=this["keys"+r.capitalize(t)];for(r.isString(e)&&(e=[e]),i=0;i<e.length;i++)a=e[i],o[a=r.modifiersAndKey(a+"")]?o[a].push(n):o[a]=[n];return this},r.prototype.unregisterKeys=function(t,e,n){var i,a,o,s=this["keys"+r.capitalize(t)];for(r.isString(e)&&(e=[e]),i=0;i<e.length;i++)if(o=e[i],o=r.modifiersAndKey(o+""),null===n)delete s[o];else if(s[o])for(a=0;a<s[o].length;a++)if(String(s[o][a])===String(n)){s[o].splice(a,1);break}return this},r.prototype.off=function(t){return this.unregisterKeys("down",t,null)},r.prototype.delegate=function(t,e,n){return null!==n||void 0!==n?this.registerKeys(t,e,n):this.unregisterKeys(t,e,n)},r.prototype.down=function(t,e){return this.delegate("down",t,e)},r.prototype.up=function(t,e){return this.delegate("up",t,e)},r.prototype.lastKey=function(t){return t?this.lastModifiers[t]:r.keyName(this.lastKeyCode)},r.prototype.lastModifiersAndKey=function(){var t,e;for(t=[],e=0;e<r.MODIFIERS.length;e++)this.lastKey(r.MODIFIERS[e])&&t.push(r.MODIFIERS[e]);return r.arrayIncludes(t,this.lastKey())||t.push(this.lastKey()),t.join(" ")},e.default=r,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(151),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(n(0)),i=l(n(1)),a=l(n(3)),o=l(n(2)),s=l(n(15)),u=l(n(77));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(n){(0,r.default)(this,e);var a=(0,i.default)(this,t.call(this));return a.player=n,a._options=n.options,a}return(0,o.default)(e,t),(0,a.default)(e,[{key:"loader",get:function(){return this.player.loader}}]),e.prototype.create=function(){return this.options.loader=this.loader,this.core=new u.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),this.core[n]=e[n].bind(t)},e}(s.default);e.default=c,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=_(n(12)),i=_(n(0)),a=_(n(1)),o=_(n(3)),s=_(n(2)),u=n(5),l=_(n(78)),c=_(n(4)),d=_(n(30)),f=_(n(23)),h=_(n(14)),p=_(n(153)),g=_(n(31)),y=_(n(40)),v=_(n(24)),m=_(n(20)),b=_(n(6));n(159);var A=_(n(161));function _(t){return t&&t.__esModule?t:{default:t}}var E=void 0,T=function(t){function e(n){(0,i.default)(this,e);var r=(0,a.default)(this,t.call(this,n));return r.playerError=new v.default(n,r),r.configureDomRecycler(),r.playerInfo=y.default.getInstance(n.playerId),r.firstResize=!0,r.plugins=[],r.containers=[],r._boundFullscreenHandler=function(){return r.handleFullscreenChange()},(0,b.default)(document).bind("fullscreenchange",r._boundFullscreenHandler),(0,b.default)(document).bind("MSFullscreenChange",r._boundFullscreenHandler),(0,b.default)(document).bind("mozfullscreenchange",r._boundFullscreenHandler),h.default.isMobile&&(0,b.default)(window).bind("resize",(function(t){r.handleWindowResize(t)})),r}return(0,s.default)(e,t),(0,o.default)(e,[{key:"events",get:function(){return{webkitfullscreenchange:"handleFullscreenChange",mousemove:"onMouseMove",mouseleave:"onMouseLeave"}}},{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}}}},{key:"mediaControl",get:function(){return this.getPlugin("media_control")||this.dummyMediaControl}},{key:"dummyMediaControl",get:function(){return this._dummyMediaControl||(this._dummyMediaControl=new f.default(this)),this._dummyMediaControl}},{key:"activeContainer",get:function(){return this._activeContainer},set:function(t){this._activeContainer=t,this.trigger(c.default.CORE_ACTIVE_CONTAINER_CHANGED,this._activeContainer)}},{key:"activePlayback",get:function(){return this.activeContainer&&this.activeContainer.playback}}]),e.prototype.configureDomRecycler=function(){var t=this.options&&this.options.playback&&this.options.playback.recycleVideo;u.DomRecycler.configure({recycleVideo:t})},e.prototype.createContainers=function(t){this.defer=b.default.Deferred(),this.defer.promise(this),this.containerFactory=new p.default(t,t.loader,this.i18n,this.playerError),this.prepareContainers()},e.prototype.prepareContainers=function(){var t=this;this.containerFactory.createContainers().then((function(e){return t.setupContainers(e)})).then((function(e){return t.resolveOnContainersReady(e)}))},e.prototype.updateSize=function(){u.Fullscreen.isFullscreen()?this.setFullscreen():this.setPlayerSize()},e.prototype.setFullscreen=function(){h.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,b.default)(window).width(),height:(0,b.default)(window).height()})},e.prototype.setPlayerSize=function(){this.$el.removeClass("fullscreen"),this.playerInfo.currentSize=this.playerInfo.previousSize,this.playerInfo.previousSize={width:(0,b.default)(window).width(),height:(0,b.default)(window).height()},this.resize(this.playerInfo.currentSize)},e.prototype.resize=function(t){(0,u.isNumber)(t.height)||(0,u.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;this.resizeObserverInterval=setInterval((function(){t.triggerResize({width:t.el.clientWidth,height:t.el.clientHeight})}),500)},e.prototype.triggerResize=function(t){(this.firstResize||this.oldHeight!==t.height||this.oldWidth!==t.width)&&(this.oldHeight=t.height,this.oldWidth=t.width,this.playerInfo.computedSize=t,this.firstResize=!1,g.default.trigger(this.options.playerId+":"+c.default.PLAYER_RESIZE,t),this.trigger(c.default.CORE_RESIZE,t))},e.prototype.disableResizeObserver=function(){this.resizeObserverInterval&&clearInterval(this.resizeObserverInterval)},e.prototype.resolveOnContainersReady=function(t){var e=this;b.default.when.apply(b.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){this.options.mimeType=e,t=t&&t.constructor===Array?t:[t],this.options.sources=t,this.containers.forEach((function(t){return t.destroy()})),this.containerFactory.options=b.default.extend(this.options,{sources:t}),this.prepareContainers()},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(),(0,b.default)(document).unbind("fullscreenchange",this._boundFullscreenHandler),(0,b.default)(document).unbind("MSFullscreenChange",this._boundFullscreenHandler),(0,b.default)(document).unbind("mozfullscreenchange",this._boundFullscreenHandler),this.stopListening()},e.prototype.handleFullscreenChange=function(){this.trigger(c.default.CORE_FULLSCREEN,u.Fullscreen.isFullscreen()),this.updateSize()},e.prototype.handleWindowResize=function(t){var e=window.innerWidth>window.innerHeight?"landscape":"portrait";this._screenOrientation!==e&&(this._screenOrientation=e,this.triggerResize({width:this.el.clientWidth,height:this.el.clientHeight}),this.trigger(c.default.CORE_SCREEN_ORIENTATION_CHANGED,{event:t,orientation:this._screenOrientation}))},e.prototype.removeContainer=function(t){this.stopListening(t),this.containers=this.containers.filter((function(e){return e!==t}))},e.prototype.setupContainer=function(t){this.listenTo(t,c.default.CONTAINER_DESTROYED,this.removeContainer),this.containers.push(t)},e.prototype.setupContainers=function(t){return t.forEach(this.setupContainer.bind(this)),this.trigger(c.default.CORE_CONTAINERS_CREATED),this.renderContainers(),this.activeContainer=t[0],this.render(),this.appendToParent(),this.containers},e.prototype.renderContainers=function(){var t=this;this.containers.forEach((function(e){return t.el.appendChild(e.render().el)}))},e.prototype.createContainer=function(t,e){var n=this.containerFactory.createContainer(t,e);return this.setupContainer(n),this.el.appendChild(n.render().el),n},e.prototype.getCurrentContainer=function(){return this.activeContainer},e.prototype.getCurrentPlayback=function(){return this.activePlayback},e.prototype.getPlaybackType=function(){return this.activeContainer&&this.activeContainer.getPlaybackType()},e.prototype.toggleFullscreen=function(){u.Fullscreen.isFullscreen()?(u.Fullscreen.cancelFullscreen(),!h.default.isiOS&&this.$el.removeClass("fullscreen nocursor")):(u.Fullscreen.requestFullscreen(h.default.isiOS?this.activeContainer.el:this.el),!h.default.isiOS&&this.$el.addClass("fullscreen"))},e.prototype.onMouseMove=function(t){this.trigger(c.default.CORE_MOUSE_MOVE,t)},e.prototype.onMouseLeave=function(t){this.trigger(c.default.CORE_MOUSE_LEAVE,t)},e.prototype.configure=function(t){var e=this;this._options=b.default.extend(this._options,t),this.configureDomRecycler();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){return t.configure(e.options)}))},e.prototype.appendToParent=function(){(!this.$el.parent()||!this.$el.parent().length)&&this.$el.appendTo(this.options.parentElement)},e.prototype.render=function(){E||(E=l.default.getStyleFor(A.default,{baseUrl:this.options.baseUrl})),(0,b.default)("head").append(E),this.options.width=this.options.width||this.$el.width(),this.options.height=this.options.height||this.$el.height();var t={width:this.options.width,height:this.options.height};return this.playerInfo.previousSize=this.playerInfo.currentSize=this.playerInfo.computedSize=t,this.updateSize(),this.previousSize={width:this.$el.width(),height:this.$el.height()},this.enableResizeObserver(),this},e}(d.default);e.default=T,(0,r.default)(T.prototype,m.default),t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(154),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=f(n(39)),i=f(n(0)),a=f(n(1)),o=f(n(3)),s=f(n(2)),u=f(n(15)),l=f(n(4)),c=f(n(80)),d=f(n(6));function f(t){return t&&t.__esModule?t:{default:t}}var h=function(t){function e(n,r,o,s){(0,i.default)(this,e);var u=(0,a.default)(this,t.call(this,n));return u._i18n=o,u.loader=r,u.playerError=s,u}return(0,s.default)(e,t),(0,o.default)(e,[{key:"options",get:function(){return this._options},set:function(t){this._options=t}}]),e.prototype.createContainers=function(){var t=this;return d.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;"object"===(void 0===t?"undefined":(0,r.default)(t))?(e=t.source.toString(),t.mimeType&&(n=t.mimeType)):e=t.toString(),e.match(/^\/\//)&&(e=window.location.protocol+e);var i=d.default.extend({},this.options,{src:e,mimeType:n}),a=new(this.findPlaybackPlugin(e,n))(i,this._i18n,this.playerError);i=d.default.extend({},i,{playback:a});var o=new c.default(i,this._i18n,this.playerError),s=d.default.Deferred();return s.promise(o),this.addContainerPlugins(o),this.listenToOnce(o,l.default.CONTAINER_READY,(function(){return s.resolve(o)})),o},e.prototype.addContainerPlugins=function(t){this.loader.containerPlugins.forEach((function(e){t.addPlugin(new e(t))}))},e}(u.default);e.default=h,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=f(n(12)),i=f(n(0)),a=f(n(1)),o=f(n(3)),s=f(n(2)),u=f(n(4)),l=f(n(30)),c=f(n(20));n(156);var d=f(n(6));function f(t){return t&&t.__esModule?t:{default:t}}var h=function(t){function e(n,r,o){(0,i.default)(this,e);var s=(0,a.default)(this,t.call(this,n));return s._i18n=r,s.currentTime=0,s.volume=100,s.playback=n.playback,s.playerError=o,s.settings=d.default.extend({},s.playback.settings),s.isReady=!1,s.mediaControlDisabled=!1,s.plugins=[s.playback],s.bindEvents(),s}return(0,s.default)(e,t),(0,o.default)(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}},{key:"hasClosedCaptionsTracks",get:function(){return this.playback.hasClosedCaptionsTracks}},{key:"closedCaptionsTracks",get:function(){return this.playback.closedCaptionsTracks}},{key:"closedCaptionsTrackId",get:function(){return this.playback.closedCaptionsTrackId},set:function(t){this.playback.closedCaptionsTrackId=t}}]),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_SEEKED,this.onSeeked),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),this.listenTo(this.playback,u.default.PLAYBACK_SUBTITLE_AVAILABLE,this.subtitleAvailable),this.listenTo(this.playback,u.default.PLAYBACK_SUBTITLE_CHANGED,this.subtitleChanged)},e.prototype.subtitleAvailable=function(){this.trigger(u.default.CONTAINER_SUBTITLE_AVAILABLE)},e.prototype.subtitleChanged=function(t){this.trigger(u.default.CONTAINER_SUBTITLE_CHANGED,t)},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,t,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(t){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(u.default.CONTAINER_CONTEXTMENU,t,this.name)},e.prototype.seek=function(t){this.trigger(u.default.CONTAINER_SEEK,t,this.name),this.playback.seek(t)},e.prototype.onSeeked=function(){this.trigger(u.default.CONTAINER_SEEKED,this.name)},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=d.default.extend(this._options,t),this.updateStyle(),this.playback.configure(this.options),this.trigger(u.default.CONTAINER_OPTIONS_CHANGE)},e.prototype.render=function(){return this.$el.append(this.playback.render().el),this.updateStyle(),this},e}(l.default);e.default=h,(0,r.default)(h.prototype,c.default),t.exports=e.default},function(t,e,n){var r=n(157);"string"==typeof r&&(r=[[t.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(9)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(8)(!1)).push([t.i,".container[data-container] {\n position: absolute;\n background-color: black;\n height: 100%;\n width: 100%; }\n .container[data-container] .chromeless {\n cursor: default; }\n\n[data-player]:not(.nocursor) .container[data-container]:not(.chromeless).pointer-enabled {\n cursor: pointer; }\n",""])},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var i,a=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?t:(i=0===a.indexOf("//")?a:0===a.indexOf("/")?n+a:r+a.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},function(t,e,n){var r=n(160);"string"==typeof r&&(r=[[t.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(9)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(8)(!1)).push([t.i,'[data-player] {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -o-user-select: none;\n user-select: none;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n position: relative;\n margin: 0;\n padding: 0;\n border: 0;\n font-style: normal;\n font-weight: normal;\n text-align: center;\n overflow: hidden;\n font-size: 100%;\n font-family: "Roboto", "Open Sans", Arial, sans-serif;\n text-shadow: 0 0 0;\n box-sizing: border-box; }\n [data-player] div, [data-player] span, [data-player] applet, [data-player] object, [data-player] iframe,\n [data-player] h1, [data-player] h2, [data-player] h3, [data-player] h4, [data-player] h5, [data-player] h6, [data-player] p, [data-player] blockquote, [data-player] pre,\n [data-player] a, [data-player] abbr, [data-player] acronym, [data-player] address, [data-player] big, [data-player] cite, [data-player] code,\n [data-player] del, [data-player] dfn, [data-player] em, [data-player] img, [data-player] ins, [data-player] kbd, [data-player] q, [data-player] s, [data-player] samp,\n [data-player] small, [data-player] strike, [data-player] strong, [data-player] sub, [data-player] sup, [data-player] tt, [data-player] var,\n [data-player] b, [data-player] u, [data-player] i, [data-player] center,\n [data-player] dl, [data-player] dt, [data-player] dd, [data-player] ol, [data-player] ul, [data-player] li,\n [data-player] fieldset, [data-player] form, [data-player] label, [data-player] legend,\n [data-player] table, [data-player] caption, [data-player] tbody, [data-player] tfoot, [data-player] thead, [data-player] tr, [data-player] th, [data-player] td,\n [data-player] article, [data-player] aside, [data-player] canvas, [data-player] details, [data-player] embed,\n [data-player] figure, [data-player] figcaption, [data-player] footer, [data-player] header, [data-player] hgroup,\n [data-player] menu, [data-player] nav, [data-player] output, [data-player] ruby, [data-player] section, [data-player] summary,\n [data-player] time, [data-player] mark, [data-player] audio, [data-player] video {\n margin: 0;\n padding: 0;\n border: 0;\n font: inherit;\n font-size: 100%;\n vertical-align: baseline; }\n [data-player] table {\n border-collapse: collapse;\n border-spacing: 0; }\n [data-player] caption, [data-player] th, [data-player] td {\n text-align: left;\n font-weight: normal;\n vertical-align: middle; }\n [data-player] q, [data-player] blockquote {\n quotes: none; }\n [data-player] q:before, [data-player] q:after, [data-player] blockquote:before, [data-player] blockquote:after {\n content: "";\n content: none; }\n [data-player] a img {\n border: none; }\n [data-player]:focus {\n outline: 0; }\n [data-player] * {\n max-width: none;\n box-sizing: inherit;\n float: none; }\n [data-player] div {\n display: block; }\n [data-player].fullscreen {\n width: 100% !important;\n height: 100% !important;\n top: 0;\n left: 0; }\n [data-player].nocursor {\n cursor: none; }\n\n.clappr-style {\n display: none !important; }\n',""])},function(t,e,n){var r=n(81);(t.exports=n(8)(!1)).push([t.i,'@font-face {\n font-family: "Roboto";\n font-style: normal;\n font-weight: 400;\n src: local("Roboto"), local("Roboto-Regular"), url('+r(n(162))+') format("truetype");\n}\n',""])},function(t,e){t.exports="<%=baseUrl%>/38861cba61c66739c1452c3a71e39852.ttf"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=P(n(76)),i=P(n(61)),a=P(n(0)),o=P(n(1)),s=P(n(2)),u=P(n(15)),l=P(n(40)),c=P(n(41)),d=P(n(84)),f=P(n(85)),h=P(n(86)),p=P(n(87)),g=P(n(89)),y=P(n(90)),v=P(n(91)),m=P(n(200)),b=P(n(92)),A=P(n(93)),_=P(n(210)),E=P(n(94)),T=P(n(95)),w=P(n(98)),S=P(n(227)),k=P(n(99)),C=P(n(234)),L=P(n(239)),x=P(n(240)),R=P(n(241)),I=P(n(242));function P(t){return t&&t.__esModule?t:{default:t}}var O=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,a.default)(this,e);var u=(0,o.default)(this,t.call(this));return u.playerId=r,u.playbackPlugins=[],s||(u.playbackPlugins=[].concat((0,i.default)(u.playbackPlugins),[p.default])),u.playbackPlugins=[].concat((0,i.default)(u.playbackPlugins),[c.default,f.default]),s||(u.playbackPlugins=[].concat((0,i.default)(u.playbackPlugins),[d.default,h.default])),u.playbackPlugins=[].concat((0,i.default)(u.playbackPlugins),[g.default,y.default]),u.containerPlugins=[v.default,b.default,A.default,m.default,_.default,E.default],u.corePlugins=[T.default,w.default,S.default,k.default,C.default,L.default,x.default,I.default,R.default],Array.isArray(n)||u.validateExternalPluginsType(n),u.addExternalPlugins(n),u}return(0,s.default)(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.removeDups=function(t){var e=t.reduceRight((function(t,e){return t[e.prototype.name]&&delete t[e.prototype.name],t[e.prototype.name]=e,t}),(0,r.default)(null)),n=[];for(var i in e)n.unshift(e[i]);return n},e.prototype.addExternalPlugins=function(t){(t=this.groupPluginsByType(t)).playback&&(this.playbackPlugins=this.removeDups(t.playback.concat(this.playbackPlugins))),t.container&&(this.containerPlugins=this.removeDups(t.container.concat(this.containerPlugins))),t.core&&(this.corePlugins=this.removeDups(t.core.concat(this.corePlugins))),l.default.getInstance(this.playerId).playbackPlugins=this.playbackPlugins},e.prototype.validateExternalPluginsType=function(t){["playback","container","core"].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}(u.default);e.default=O,t.exports=e.default},function(t,e,n){n(71),n(165),t.exports=n(11).Array.from},function(t,e,n){"use strict";var r=n(44),i=n(16),a=n(38),o=n(166),s=n(167),u=n(69),l=n(168),c=n(169);i(i.S+i.F*!n(171)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,i,d,f=a(t),h="function"==typeof this?this:Array,p=arguments.length,g=p>1?arguments[1]:void 0,y=void 0!==g,v=0,m=c(f);if(y&&(g=r(g,p>2?arguments[2]:void 0,2)),null==m||h==Array&&s(m))for(n=new h(e=u(f.length));e>v;v++)l(n,v,y?g(f[v],v):f[v]);else for(d=m.call(f),n=new h;!(i=d.next()).done;v++)l(n,v,y?o(d,g,[i.value,v],!0):i.value);return n.length=v,n}})},function(t,e,n){var r=n(26);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var a=t.return;throw void 0!==a&&r(a.call(t)),e}}},function(t,e,n){var r=n(34),i=n(13)("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||a[i]===t)}},function(t,e,n){"use strict";var r=n(18),i=n(33);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var r=n(170),i=n(13)("iterator"),a=n(34);t.exports=n(11).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||a[r(t)]}},function(t,e,n){var r=n(46),i=n(13)("toStringTag"),a="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:a?r(e):"Object"==(o=r(e))&&"function"==typeof e.callee?"Arguments":o}},function(t,e,n){var r=n(13)("iterator"),i=!1;try{var a=[7][r]();a.return=function(){i=!0},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var a=[7],o=a[r]();o.next=function(){return{done:n=!0}},a[r]=function(){return o},t(a)}catch(t){}return n}},function(t,e,n){"use strict";(function(r){Object.defineProperty(e,"__esModule",{value:!0});var i=A(n(83)),a=A(n(0)),o=A(n(1)),s=A(n(3)),u=A(n(2)),l=A(n(61)),c=A(n(53)),d=n(5),f=A(n(10)),h=A(n(14)),p=A(n(24)),g=A(n(4)),y=A(n(29)),v=A(n(6)),m=A(n(7)),b=A(n(173));function A(t){return t&&t.__esModule?t:{default:t}}n(174);var _={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"]};_.ogv=_.ogg,_["3gp"]=_["3gpp"];var E={wav:["audio/wav"],mp3:["audio/mp3",'audio/mpeg;codecs="mp3"'],aac:['audio/mp4;codecs="mp4a.40.5"'],oga:["audio/ogg"]},T=(0,c.default)(E).reduce((function(t,e){return[].concat((0,l.default)(t),(0,l.default)(E[e]))}),[]),w={code:"unknown",message:"unknown"},S=function(t){function e(){(0,a.default)(this,e);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var s=(0,o.default)(this,t.call.apply(t,[this].concat(r)));s._destroyed=!1,s._loadStarted=!1,s._isBuffering=!1,s._playheadMoving=!1,s._playheadMovingTimer=null,s._stopped=!1,s._ccTrackId=-1,s._setupSrc(s.options.src),s.options.playback||(s.options.playback=s.options||{}),s.options.playback.disableContextMenu=s.options.playback.disableContextMenu||s.options.disableVideoTagContextMenu;var u=s.options.playback,l=u.preload||(h.default.isSafari?"auto":s.options.preload),c=void 0;return s.options.poster&&("string"==typeof s.options.poster?c=s.options.poster:"string"==typeof s.options.poster.url&&(c=s.options.poster.url)),v.default.extend(s.el,{muted:s.options.mute,defaultMuted:s.options.mute,loop:s.options.loop,poster:c,preload:l||"metadata",controls:(u.controls||s.options.useVideoTagDefaultControls)&&"controls",crossOrigin:u.crossOrigin,"x-webkit-playsinline":u.playInline}),u.playInline&&s.$el.attr({playsinline:"playsinline"}),u.crossOrigin&&s.$el.attr({crossorigin:u.crossOrigin}),s.settings={default:["seekbar"]},s.settings.left=["playpause","position","duration"],s.settings.right=["fullscreen","volume","hd-indicator"],u.externalTracks&&s._setupExternalTracks(u.externalTracks),s.options.autoPlay&&s.attemptAutoPlay(),s}return(0,u.default)(e,t),(0,s.default)(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,E,this.options.mimeType);return this.options.playback&&this.options.playback.audioOnly||this.options.audioOnly||T.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",seeking:"_onSeeking",seeked:"_onSeeked",stalled:"_handleBufferingEvents",timeupdate:"_onTimeUpdate",waiting:"_onWaiting"}}},{key:"ended",get:function(){return this.el.ended}},{key:"buffering",get:function(){return this._isBuffering}}]),e.prototype.attemptAutoPlay=function(){var t=this;this.canAutoPlay((function(e,n){n&&y.default.warn(t.name,"autoplay error.",{result:e,error:n}),e&&r.nextTick((function(){return!t._destroyed&&t.play()}))}))},e.prototype.canAutoPlay=function(t){this.options.disableCanAutoPlay&&t(!0,null);var e={timeout:this.options.autoPlayTimeout||500,inline:this.options.playback.playInline||!1,muted:this.options.mute||!1};h.default.isMobile&&d.DomRecycler.options.recycleVideo&&(e.element=this.el),(0,d.canAutoPlayMedia)(t,e)},e.prototype._setupExternalTracks=function(t){this._externalTracks=t.map((function(t){return{kind:t.kind||"subtitles",label:t.label,lang:t.lang,src:t.src}}))},e.prototype._setupSrc=function(t){this.el.src!==t&&(this._ccIsSetup=!1,this.el.src=t,this._src=this.el.src)},e.prototype._onLoadedMetadata=function(t){this._handleBufferingEvents(),this.trigger(g.default.PLAYBACK_LOADEDMETADATA,{duration:t.target.duration,data:t}),this._updateSettings();var e=void 0===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(g.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.consent=function(){this.isPlaying()||(t.prototype.consent.call(this),this.el.load())},e.prototype.play=function(){this.trigger(g.default.PLAYBACK_PLAY_INTENT),this._stopped=!1,this._setupSrc(this._src),this._handleBufferingEvents();var t=this.el.play();t&&t.catch&&t.catch((function(){}))},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(g.default.PLAYBACK_STOP)},e.prototype.volume=function(t){0===t?(this.$el.attr({muted:"true"}),this.el.muted=!0):(this.$el.attr({muted:null}),this.el.muted=!1,this.el.volume=t/100)},e.prototype.mute=function(){this.el.muted=!0},e.prototype.unmute=function(){this.el.muted=!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._checkForClosedCaptions(),this._startPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(g.default.PLAYBACK_PLAY)},e.prototype._onPause=function(){this._stopPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(g.default.PLAYBACK_PAUSE)},e.prototype._onSeeking=function(){this._handleBufferingEvents(),this.trigger(g.default.PLAYBACK_SEEK)},e.prototype._onSeeked=function(){this._handleBufferingEvents(),this.trigger(g.default.PLAYBACK_SEEKED)},e.prototype._onEnded=function(){this._handleBufferingEvents(),this.trigger(g.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._isBuffering!==e&&(this._isBuffering=e,e?this.trigger(g.default.PLAYBACK_BUFFERING,this.name):this.trigger(g.default.PLAYBACK_BUFFERFULL,this.name))},e.prototype._onError=function(){var t=this.el.error||w,e=t.code,n=t.message,r=e===w.code,i=this.createError({code:e,description:n,raw:this.el.error,level:r?p.default.Levels.WARN:p.default.Levels.FATAL});r?y.default.warn(this.name,"HTML5 unknown error: ",i):this.trigger(g.default.PLAYBACK_ERROR,i)},e.prototype.destroy=function(){this._destroyed=!0,this.handleTextTrackChange&&this.el.textTracks.removeEventListener("change",this.handleTextTrackChange),t.prototype.destroy.call(this),this.el.removeAttribute("src"),this._src=null,d.DomRecycler.garbage(this.$el)},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,d.seekStringToSeconds)();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.getPlaybackType()===f.default.LIVE?this.trigger(g.default.PLAYBACK_TIMEUPDATE,{current:1,total:1},this.name):this.trigger(g.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((0,l.default)(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(g.default.PLAYBACK_PROGRESS,r,t)}},e.prototype._typeFor=function(t){var n=e._mimeTypesForUrl(t,_,this.options.mimeType);return 0===n.length&&(n=e._mimeTypesForUrl(t,E,this.options.mimeType)),(n[0]||"").split(";")[0]},e.prototype._ready=function(){this._isReadyState||(this._isReadyState=!0,this.trigger(g.default.PLAYBACK_READY,this.name))},e.prototype._checkForClosedCaptions=function(){if(this.isHTML5Video&&!this._ccIsSetup){if(this.hasClosedCaptionsTracks){this.trigger(g.default.PLAYBACK_SUBTITLE_AVAILABLE);var t=this.closedCaptionsTrackId;this.closedCaptionsTrackId=t,this.handleTextTrackChange=this._handleTextTrackChange.bind(this),this.el.textTracks.addEventListener("change",this.handleTextTrackChange)}this._ccIsSetup=!0}},e.prototype._handleTextTrackChange=function(){var t=this.closedCaptionsTracks.find((function(t){return"showing"===t.track.mode}))||{id:-1};this._ccTrackId!==t.id&&(this._ccTrackId=t.id,this.trigger(g.default.PLAYBACK_SUBTITLE_CHANGED,{id:t.id}))},e.prototype.render=function(){return this.options.playback.disableContextMenu&&this.$el.on("contextmenu",(function(){return!1})),this._externalTracks&&this._externalTracks.length>0&&this.$el.html(this.template({tracks:this._externalTracks})),this._ready(),this},(0,s.default)(e,[{key:"isReady",get:function(){return this._isReadyState}},{key:"isHTML5Video",get:function(){return this.name===e.prototype.name}},{key:"closedCaptionsTracks",get:function(){var t=0;return(this.el.textTracks?(0,i.default)(this.el.textTracks):[]).filter((function(t){return"subtitles"===t.kind||"captions"===t.kind})).map((function(e){return{id:t++,name:e.label,track:e}}))}},{key:"closedCaptionsTrackId",get:function(){return this._ccTrackId},set:function(t){if((0,d.isNumber)(t)){var e=this.closedCaptionsTracks,n=void 0;if(-1!==t){if(!(n=e.find((function(e){return e.id===t}))))return;if("showing"===n.track.mode)return}e.filter((function(t){return"hidden"!==t.track.mode})).forEach((function(t){return t.track.mode="hidden"})),n&&(n.track.mode="showing"),this._ccTrackId=t,this.trigger(g.default.PLAYBACK_SUBTITLE_CHANGED,{id:t})}}},{key:"template",get:function(){return(0,m.default)(b.default)}}]),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),a=document.createElement(t);return!!i.filter((function(t){return!!a.canPlayType(t).replace(/no/,"")}))[0]},S.canPlay=function(t,e){return S._canPlay("audio",E,t,e)||S._canPlay("video",_,t,e)},t.exports=e.default}).call(e,n(62))},function(t,e){t.exports='<% for (var i = 0; i < tracks.length; i++) { %>\n <track data-html5-video-track="<%= i %>" kind="<%= tracks[i].kind %>" label="<%= tracks[i].label %>" srclang="<%= tracks[i].lang %>" src="<%= tracks[i].src %>" />\n<% }; %>\n'},function(t,e,n){var r=n(175);"string"==typeof r&&(r=[[t.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(9)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(8)(!1)).push([t.i,"[data-html5-video] {\n position: absolute;\n height: 100%;\n width: 100%;\n display: block; }\n",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=y(n(0)),i=y(n(1)),a=y(n(3)),o=y(n(2)),s=n(5),u=y(n(63)),l=y(n(14)),c=y(n(31)),d=y(n(7)),f=y(n(6)),h=y(n(4)),p=y(n(10)),g=y(n(181));function y(t){return t&&t.__esModule?t:{default:t}}var v=function(t){function e(){(0,r.default)(this,e);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];var s=(0,i.default)(this,t.call.apply(t,[this].concat(a)));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(0,o.default)(e,t),(0,a.default)(e,[{key:"name",get:function(){return"flash"}},{key:"swfPath",get:function(){return(0,d.default)(g.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,f.default)('<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%" />').insertAfter(this.$el),this.getDuration()>0?this._metadataLoaded():c.default.once(this.uniqueId+":timeupdate",this._metadataLoaded,this)):(this._attempts=this._attempts||0,++this._attempts<=60?setTimeout((function(){return t._bootstrap()}),50):this.trigger(h.default.PLAYBACK_ERROR,{message:"Max number of attempts reached"},this.name))},e.prototype._metadataLoaded=function(){this._isReadyState=!0,this.trigger(h.default.PLAYBACK_READY,this.name),this.trigger(h.default.PLAYBACK_SETTINGSUPDATE,this.name)},e.prototype.getPlaybackType=function(){return p.default.VOD},e.prototype.isHighDefinitionInUse=function(){return!1},e.prototype._updateTime=function(){this.trigger(h.default.PLAYBACK_TIMEUPDATE,{current:this.el.getPosition(),total:this.el.getDuration()},this.name)},e.prototype._addListeners=function(){c.default.on(this.uniqueId+":progress",this._progress,this),c.default.on(this.uniqueId+":timeupdate",this._updateTime,this),c.default.on(this.uniqueId+":statechanged",this._checkState,this),c.default.on(this.uniqueId+":flashready",this._bootstrap,this)},e.prototype.stopListening=function(){t.prototype.stopListening.call(this),c.default.off(this.uniqueId+":progress"),c.default.off(this.uniqueId+":timeupdate"),c.default.off(this.uniqueId+":statechanged"),c.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(h.default.PLAYBACK_BUFFERING,this.name),this._currentState="PLAYING_BUFFERING"):"PLAYING"===this.el.getState()?(this._bufferingState=!1,this.trigger(h.default.PLAYBACK_BUFFERFULL,this.name),this._currentState="PLAYING"):"IDLE"===this.el.getState()?this._currentState="IDLE":"ENDED"===this.el.getState()&&(this.trigger(h.default.PLAYBACK_ENDED,this.name),this.trigger(h.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(h.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,h.default.PLAYBACK_BUFFERFULL,(function(){return t._checkInitialSeek()})),this._currentState="PLAYING"):this.listenToOnce(this,h.default.PLAYBACK_READY,this._firstPlay)},e.prototype._checkInitialSeek=function(){var t=(0,s.seekStringToSeconds)(window.location.href);0!==t&&this.seekSeconds(t)},e.prototype.play=function(){this.trigger(h.default.PLAYBACK_PLAY_INTENT),"PAUSED"===this._currentState||"PLAYING_BUFFERING"===this._currentState?(this._currentState="PLAYING",this.el.playerResume(),this.trigger(h.default.PLAYBACK_PLAY,this.name)):"PLAYING"!==this._currentState&&(this._firstPlay(),this.trigger(h.default.PLAYBACK_PLAY,this.name))},e.prototype.volume=function(t){var e=this;this.isReady?this.el.playerVolume(t):this.listenToOnce(this,h.default.PLAYBACK_BUFFERFULL,(function(){return e.volume(t)}))},e.prototype.pause=function(){this._currentState="PAUSED",this.el.playerPause(),this.trigger(h.default.PLAYBACK_PAUSE,this.name)},e.prototype.stop=function(){this.el.playerStop(),this.trigger(h.default.PLAYBACK_STOP),this.trigger(h.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,h.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(h.default.PLAYBACK_TIMEUPDATE,{current:t,total:this.el.getDuration()},this.name),"PAUSED"===this._currentState&&this.el.playerPause()):this.listenToOnce(this,h.default.PLAYBACK_BUFFERFULL,(function(){return e.seek(t)}))},e.prototype.destroy=function(){clearInterval(this.bootstrapId),t.prototype.stopListening.call(this),this.$el.remove()},(0,a.default)(e,[{key:"isReady",get:function(){return this._isReadyState}}]),e}(u.default);e.default=v,v.canPlay=function(t){if(l.default.hasFlash&&t&&t.constructor===String){var e=t.split("?")[0].match(/.*\.(.*)$/)||[];return e.length>1&&!l.default.isMobile&&e[1].toLowerCase().match(/^(mp4|mov|f4v|3gpp|3gp)$/)}return!1},t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=d(n(0)),i=d(n(3)),a=d(n(1)),o=d(n(2)),s=d(n(10)),u=d(n(7)),l=d(n(14)),c=d(n(178));function d(t){return t&&t.__esModule?t:{default:t}}n(179);var f=function(t){function e(){return(0,r.default)(this,e),(0,a.default)(this,t.apply(this,arguments))}return(0,o.default)(e,t),e.prototype.setElement=function(t){this.$el=t,this.el=t[0]},e.prototype.render=function(){return this.$el.attr("data",this.swfPath),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})),l.default.isIE&&(this.$("embed").remove(),l.default.isLegacyIE&&this.$el.attr("classid","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000")),this.el.id=this.cid,this},(0,i.default)(e,[{key:"tagName",get:function(){return"object"}},{key:"swfPath",get:function(){return""}},{key:"wmode",get:function(){return"transparent"}},{key:"template",get:function(){return(0,u.default)(c.default)}},{key:"attributes",get:function(){var t="application/x-shockwave-flash";return l.default.isLegacyIE&&(t=""),{class:"clappr-flash-playback",type:t,width:"100%",height:"100%",data:this.swfPath,"data-flash-playback":this.name}}}]),e}(s.default);e.default=f,t.exports=e.default},function(t,e){t.exports='<param name="movie" value="<%= swfPath %>">\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 data="<%= swfPath %>"\n src="<%= swfPath %>"\n width="100%"\n height="100%">\n</embed>\n'},function(t,e,n){var r=n(180);"string"==typeof r&&(r=[[t.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(9)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(8)(!1)).push([t.i,".clappr-flash-playback[data-flash-playback] {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n pointer-events: none; }\n",""])},function(t,e){t.exports="<%=baseUrl%>/4b76590b32dab62bc95c1b7951efae78.swf"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(n(0)),i=c(n(3)),a=c(n(1)),o=c(n(2)),s=c(n(4)),u=c(n(10)),l=c(n(41));function c(t){return t&&t.__esModule?t:{default:t}}var d=function(t){function e(){return(0,r.default)(this,e),(0,a.default)(this,t.apply(this,arguments))}return(0,o.default)(e,t),e.prototype.updateSettings=function(){this.settings.left=["playpause","position","duration"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(s.default.PLAYBACK_SETTINGSUPDATE)},e.prototype.getPlaybackType=function(){return u.default.AOD},(0,i.default)(e,[{key:"name",get:function(){return"html5_audio"}},{key:"tagName",get:function(){return"audio"}},{key:"isAudioOnly",get:function(){return!0}}]),e}(l.default);e.default=d,d.canPlay=function(t,e){return l.default._canPlay("audio",{wav:["audio/wav"],mp3:["audio/mp3",'audio/mpeg;codecs="mp3"'],aac:['audio/mp4;codecs="mp4a.40.5"'],oga:["audio/ogg"]},t,e)},t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=v(n(0)),i=v(n(1)),a=v(n(3)),o=v(n(2)),s=v(n(63)),u=v(n(4)),l=v(n(7)),c=v(n(10)),d=v(n(31)),f=v(n(14)),h=v(n(24)),p=v(n(184)),g=v(n(185)),y=v(n(6));function v(t){return t&&t.__esModule?t:{default:t}}var m=function(t){function e(){(0,r.default)(this,e);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];var s=(0,i.default)(this,t.call.apply(t,[this].concat(a)));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=y.default.extend({},s._defaultSettings),s._playbackType=c.default.LIVE,s._hasEnded=!1,s._addListeners(),s}return(0,o.default)(e,t),(0,a.default)(e,[{key:"name",get:function(){return"flashls"}},{key:"swfPath",get:function(){return(0,l.default)(g.default)({baseUrl:this._baseUrl})}},{key:"levels",get:function(){return this._levels||[]}},{key:"currentLevel",get:function(){return null===this._currentLevel||void 0===this._currentLevel?-1:this._currentLevel},set:function(t){this._currentLevel=t,this.trigger(u.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;d.default.on(this.cid+":flashready",(function(){return t._bootstrap()})),d.default.on(this.cid+":timeupdate",(function(e){return t._updateTime(e)})),d.default.on(this.cid+":playbackstate",(function(e){return t._setPlaybackState(e)})),d.default.on(this.cid+":levelchanged",(function(e){return t._levelChanged(e)})),d.default.on(this.cid+":error",(function(e,n,r){return t._flashPlaybackError(e,n,r)})),d.default.on(this.cid+":fragmentloaded",(function(e){return t._onFragmentLoaded(e)})),d.default.on(this.cid+":levelendlist",(function(e){return t._onLevelEndlist(e)}))},e.prototype.stopListening=function(){t.prototype.stopListening.call(this),d.default.off(this.cid+":flashready"),d.default.off(this.cid+":timeupdate"),d.default.off(this.cid+":playbackstate"),d.default.off(this.cid+":levelchanged"),d.default.off(this.cid+":playbackerror"),d.default.off(this.cid+":fragmentloaded"),d.default.off(this.cid+":manifestloaded"),d.default.off(this.cid+":levelendlist")},e.prototype._bootstrap=function(){var t=this;if(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(u.default.PLAYBACK_READY,this.name);else if(this._bootstrapAttempts=this._bootstrapAttempts||0,++this._bootstrapAttempts<=60)setTimeout((function(){return t._bootstrap()}),50);else{var e=this.createError({code:"playerLoadFail_maxNumberAttemptsReached",description:this.name+" error: Max number of attempts reached",level:h.default.Levels.FATAL,raw:{}});this.trigger(u.default.PLAYBACK_ERROR,e)}},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(u.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this._levels&&0!==this._levels.length||this._fillLevels(),this.trigger(u.default.PLAYBACK_BITRATE,{height:e.height,width:e.width,bandwidth:e.bitrate,bitrate:e.bitrate,level:t}),this.trigger(u.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===c.default.LIVE;this._dvrEnabled=i&&e>this._hlsMinimumDvrSize,100!==e&&void 0!==i&&(this._dvrEnabled!==r&&(this._updateSettings(),this.trigger(u.default.PLAYBACK_SETTINGSUPDATE,this.name)),i&&!this._dvrEnabled&&(n=e),this.trigger(u.default.PLAYBACK_TIMEUPDATE,{current:n,total:e},this.name))}},e.prototype.play=function(){this.trigger(u.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.getCurrentTime=function(){return this.el.getPosition()},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(u.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(u.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(u.default.PLAYBACK_TIMEUPDATE,{current:0,total:this.getDuration()},this.name),this.trigger(u.default.PLAYBACK_ENDED,this.name)))},e.prototype._updateCurrentState=function(t){this._currentState=t,"IDLE"!==t&&(this._hasEnded=!1),this._updatePlaybackType(),"PLAYING"===t?this.trigger(u.default.PLAYBACK_PLAY,this.name):"PAUSED"===t&&this.trigger(u.default.PLAYBACK_PAUSE,this.name)},e.prototype._updatePlaybackType=function(){this._playbackType=this.el.getType(),this._playbackType&&(this._playbackType=this._playbackType.toLowerCase(),this._playbackType===c.default.VOD?this._startReportingProgress():this._stopReportingProgress()),this.trigger(u.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(u.default.PLAYBACK_FRAGMENT_LOADED,t),this._reportingProgress&&this.getCurrentTime()){var e=this.getCurrentTime()+this.el.getbufferLength();this.trigger(u.default.PLAYBACK_PROGRESS,{start:this.getCurrentTime(),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&&(d.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,u.default.PLAYBACK_BUFFERFULL,(function(){return e.volume(t)}))},e.prototype.pause=function(){(this._playbackType!==c.default.LIVE||this._dvrEnabled)&&(this.el.playerPause(),this._playbackType===c.default.LIVE&&this._dvrEnabled&&this._updateDvr(!0))},e.prototype.stop=function(){this._srcLoaded=!1,this.el.playerStop(),this.trigger(u.default.PLAYBACK_STOP),this.trigger(u.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===c.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===c.default.LIVE){var n=e-t>3;this._updateDvr(n)}this.el.playerSeek(t),this.trigger(u.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(u.default.PLAYBACK_DVR,this._dvrInUse),this.trigger(u.default.PLAYBACK_STATS_ADD,{dvr:this._dvrInUse}))},e.prototype._flashPlaybackError=function(t,e,n){var r={code:t,description:n,level:h.default.Levels.FATAL,raw:{code:t,url:e,message:n}},i=this.createError(r);this.trigger(u.default.PLAYBACK_ERROR,i),this.trigger(u.default.PLAYBACK_STOP)},e.prototype._manifestLoaded=function(t,e){this._shouldPlayOnManifestLoaded&&(this._shouldPlayOnManifestLoaded=!1,this.el.playerPlay()),this._fillLevels(),this.trigger(u.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(u.default.PLAYBACK_LEVELS_AVAILABLE,this._levels)},e.prototype.destroy=function(){this.stopListening(),this.$el.remove()},e.prototype._updateSettings=function(){this.settings=y.default.extend({},this._defaultSettings),this._playbackType===c.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 p.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},(0,a.default)(e,[{key:"isReady",get:function(){return this._isReadyState}},{key:"dvrEnabled",get:function(){return!!this._dvrEnabled}}]),e}(s.default);e.default=m,m.canPlay=function(t,e){var n=t.split("?")[0].match(/.*\.(.*)$/)||[];return f.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";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(0)),i=a(n(31));function a(t){return t&&t.__esModule?t:{default:t}}var o=function(){function t(e){(0,r.default)(this,t),this.instanceId=e}return t.prototype.ready=function(){i.default.trigger(this.instanceId+":flashready")},t.prototype.videoSize=function(t,e){i.default.trigger(this.instanceId+":videosizechanged",t,e)},t.prototype.complete=function(){i.default.trigger(this.instanceId+":complete")},t.prototype.error=function(t,e,n){i.default.trigger(this.instanceId+":error",t,e,n)},t.prototype.manifest=function(t,e){i.default.trigger(this.instanceId+":manifestloaded",t,e)},t.prototype.audioLevelLoaded=function(t){i.default.trigger(this.instanceId+":audiolevelloaded",t)},t.prototype.levelLoaded=function(t){i.default.trigger(this.instanceId+":levelloaded",t)},t.prototype.levelEndlist=function(t){i.default.trigger(this.instanceId+":levelendlist",t)},t.prototype.fragmentLoaded=function(t){i.default.trigger(this.instanceId+":fragmentloaded",t)},t.prototype.fragmentPlaying=function(t){i.default.trigger(this.instanceId+":fragmentplaying",t)},t.prototype.position=function(t){i.default.trigger(this.instanceId+":timeupdate",t)},t.prototype.state=function(t){i.default.trigger(this.instanceId+":playbackstate",t)},t.prototype.seekState=function(t){i.default.trigger(this.instanceId+":seekstate",t)},t.prototype.switch=function(t){i.default.trigger(this.instanceId+":levelchanged",t)},t.prototype.audioTracksListChange=function(t){i.default.trigger(this.instanceId+":audiotracklistchanged",t)},t.prototype.audioTrackChange=function(t){i.default.trigger(this.instanceId+":audiotrackchanged",t)},t}();e.default=o,t.exports=e.default},function(t,e){t.exports="<%=baseUrl%>/8fa12a459188502b9f0d39b8a67d9e6c.swf"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=y(n(61)),i=y(n(88)),a=y(n(0)),o=y(n(1)),s=y(n(3)),u=y(n(2)),l=y(n(41)),c=y(n(188)),d=y(n(4)),f=y(n(10)),h=n(5),p=y(n(29)),g=y(n(24));function y(t){return t&&t.__esModule?t:{default:t}}var v=function(t){function e(){(0,a.default)(this,e);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var s=(0,o.default)(this,t.call.apply(t,[this].concat(r)));return s.options.playback||(s.options.playback=s.options),s._minDvrSize=void 0===s.options.hlsMinimumDvrSize?60:s.options.hlsMinimumDvrSize,s._extrapolatedWindowNumSegments=s.options.playback&&void 0!==s.options.playback.extrapolatedWindowNumSegments?s.options.playback.extrapolatedWindowNumSegments:2,s._playbackType=f.default.VOD,s._lastTimeUpdate={current:0,total:0},s._lastDuration=null,s._playableRegionStartTime=0,s._localStartTimeCorrelation=null,s._localEndTimeCorrelation=null,s._playableRegionDuration=0,s._programDateTime=0,s._durationExcludesAfterLiveSyncPoint=!1,s._segmentTargetDuration=null,s._playlistType=null,s._recoverAttemptsRemaining=s.options.hlsRecoverAttempts||16,s}return(0,u.default)(e,t),(0,s.default)(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?-1:this._currentLevel},set:function(t){this._currentLevel=t,this.trigger(d.default.PLAYBACK_LEVEL_SWITCH_START),this.options.hlsUseNextLevel?this._hls.nextLevel=this._currentLevel:this._hls.currentLevel=this._currentLevel}},{key:"isReady",get:function(){return this._isReadyState}},{key:"_startTime",get:function(){return this._playbackType===f.default.LIVE&&"EVENT"!==this._playlistType?this._extrapolatedStartTime:this._playableRegionStartTime}},{key:"_now",get:function(){return(0,h.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}}],[{key:"HLSJS",get:function(){return c.default}}]),e.prototype._setup=function(){var t=this;this._ccIsSetup=!1,this._ccTracksUpdated=!1,this._hls=new c.default((0,h.assign)({},this.options.playback.hlsjsConfig)),this._hls.on(c.default.Events.MEDIA_ATTACHED,(function(){return t._hls.loadSource(t.options.src)})),this._hls.on(c.default.Events.LEVEL_LOADED,(function(e,n){return t._updatePlaybackType(e,n)})),this._hls.on(c.default.Events.LEVEL_UPDATED,(function(e,n){return t._onLevelUpdated(e,n)})),this._hls.on(c.default.Events.LEVEL_SWITCHING,(function(e,n){return t._onLevelSwitch(e,n)})),this._hls.on(c.default.Events.FRAG_LOADED,(function(e,n){return t._onFragmentLoaded(e,n)})),this._hls.on(c.default.Events.ERROR,(function(e,n){return t._onHLSJSError(e,n)})),this._hls.on(c.default.Events.SUBTITLE_TRACK_LOADED,(function(e,n){return t._onSubtitleLoaded(e,n)})),this._hls.on(c.default.Events.SUBTITLE_TRACKS_UPDATED,(function(){return t._ccTracksUpdated=!0})),this._hls.attachMedia(this.el)},e.prototype.render=function(){return this._ready(),t.prototype.render.call(this)},e.prototype._ready=function(){this._isReadyState=!0,this.trigger(d.default.PLAYBACK_READY,this.name)},e.prototype._recover=function(t,e,n){if(this._recoveredDecodingError)if(this._recoveredAudioCodecError){p.default.error("hlsjs: failed to recover",{evt:t,data:e}),n.level=g.default.Levels.FATAL;var r=this.createError(n);this.trigger(d.default.PLAYBACK_ERROR,r),this.stop()}else this._recoveredAudioCodecError=!0,this._hls.swapAudioCodec(),this._hls.recoverMediaError();else 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.getProgramDateTime=function(){return this._programDateTime},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&&(p.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(d.default.PLAYBACK_DVR,t),this.trigger(d.default.PLAYBACK_STATS_ADD,{dvr:t})},e.prototype._updateSettings=function(){this._playbackType===f.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(d.default.PLAYBACK_SETTINGSUPDATE)},e.prototype._onHLSJSError=function(t,e){var n={code:e.type+"_"+e.details,description:this.name+" error: type: "+e.type+", details: "+e.details,raw:e},r=void 0;if(e.response&&(n.description+=", response: "+(0,i.default)(e.response)),e.fatal)if(this._recoverAttemptsRemaining>0)switch(this._recoverAttemptsRemaining-=1,e.type){case c.default.ErrorTypes.NETWORK_ERROR:switch(e.details){case c.default.ErrorDetails.MANIFEST_LOAD_ERROR:case c.default.ErrorDetails.MANIFEST_LOAD_TIMEOUT:case c.default.ErrorDetails.MANIFEST_PARSING_ERROR:case c.default.ErrorDetails.LEVEL_LOAD_ERROR:case c.default.ErrorDetails.LEVEL_LOAD_TIMEOUT:p.default.error("hlsjs: unrecoverable network fatal error.",{evt:t,data:e}),r=this.createError(n),this.trigger(d.default.PLAYBACK_ERROR,r),this.stop();break;default:p.default.warn("hlsjs: trying to recover from network error.",{evt:t,data:e}),n.level=g.default.Levels.WARN,this.createError(n),this._hls.startLoad()}break;case c.default.ErrorTypes.MEDIA_ERROR:p.default.warn("hlsjs: trying to recover from media error.",{evt:t,data:e}),n.level=g.default.Levels.WARN,this.createError(n),this._recover(t,e,n);break;default:p.default.error("hlsjs: could not recover from error.",{evt:t,data:e}),r=this.createError(n),this.trigger(d.default.PLAYBACK_ERROR,r),this.stop()}else p.default.error("hlsjs: could not recover from error after maximum number of attempts.",{evt:t,data:e}),r=this.createError(n),this.trigger(d.default.PLAYBACK_ERROR,r),this.stop();else n.level=g.default.Levels.WARN,this.createError(n),p.default.warn("hlsjs: non-fatal error occurred",{evt:t,data:e})},e.prototype._onTimeUpdate=function(){var t={current:this.getCurrentTime(),total:this.getDuration(),firstFragDateTime:this.getProgramDateTime()};this._lastTimeUpdate&&t.current===this._lastTimeUpdate.current&&t.total===this._lastTimeUpdate.total||(this._lastTimeUpdate=t,this.trigger(d.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((0,r.default)(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 i={start:t[e].start,current:t[e].end,total:this.getDuration()};this.trigger(d.default.PLAYBACK_PROGRESS,i,t)}},e.prototype.play=function(){this._hls||this._setup(),t.prototype.play.call(this),this._startTimeUpdateTimer()},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?f.default.LIVE:f.default.VOD,this._onLevelUpdated(t,e),this._ccTracksUpdated&&this._playbackType===f.default.LIVE&&this.hasClosedCaptionsTracks&&this._onSubtitleLoaded()},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(d.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,a=this._playableRegionStartTime,o=this._playableRegionDuration;if(0!==i.length){if(i[0].rawProgramDateTime&&(this._programDateTime=i[0].rawProgramDateTime),this._playableRegionStartTime!==i[0].start&&(n=!0,this._playableRegionStartTime=i[0].start),n)if(this._localStartTimeCorrelation){var s=this._localStartTimeCorrelation,u=this._now-s.local,l=(s.remote+u)/1e3;l<i[0].start?this._localStartTimeCorrelation={local:this._now,remote:1e3*i[0].start}:l>a+this._extrapolatedWindowDuration&&(this._localStartTimeCorrelation={local:this._now,remote:1e3*Math.max(i[0].start,a+this._extrapolatedWindowDuration)})}else this._localStartTimeCorrelation={local:this._now,remote:1e3*(i[0].start+this._extrapolatedWindowDuration/2)};var d=e.details.totalduration;if(this._playbackType===f.default.LIVE){var h=e.details.targetduration*((this.options.playback.hlsjsConfig||{}).liveSyncDurationCount||c.default.DefaultConfig.liveSyncDurationCount);h<=d?(d-=h,this._durationExcludesAfterLiveSyncPoint=!0):this._durationExcludesAfterLiveSyncPoint=!1}d!==this._playableRegionDuration&&(r=!0,this._playableRegionDuration=d);var p=i[0].start+d,g=a+o;if(p!==g)if(this._localEndTimeCorrelation){var y=this._localEndTimeCorrelation,v=this._now-y.local,m=(y.remote+v)/1e3;m>p?this._localEndTimeCorrelation={local:this._now,remote:1e3*p}:m<p-this._extrapolatedWindowDuration?this._localEndTimeCorrelation={local:this._now,remote:1e3*(p-this._extrapolatedWindowDuration)}:m>g&&(this._localEndTimeCorrelation={local:this._now,remote:1e3*g})}else this._localEndTimeCorrelation={local:this._now,remote:1e3*p};r&&this._onDurationChange(),n&&this._onProgress()}},e.prototype._onFragmentLoaded=function(t,e){this.trigger(d.default.PLAYBACK_FRAGMENT_LOADED,e)},e.prototype._onSubtitleLoaded=function(){if(!this._ccIsSetup){this.trigger(d.default.PLAYBACK_SUBTITLE_AVAILABLE);var t=this._playbackType===f.default.LIVE?-1:this.closedCaptionsTrackId;this.closedCaptionsTrackId=t,this._ccIsSetup=!0}},e.prototype._onLevelSwitch=function(t,e){this.levels.length||this._fillLevels(),this.trigger(d.default.PLAYBACK_LEVEL_SWITCH_END),this.trigger(d.default.PLAYBACK_LEVEL_SWITCH,e);var n=this._hls.levels[e.level];n&&(this.highDefinition=n.height>=720||n.bitrate/1e3>=2e3,this.trigger(d.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(d.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===f.default.VOD||this.dvrEnabled},(0,s.default)(e,[{key:"dvrEnabled",get:function(){return this._durationExcludesAfterLiveSyncPoint&&this._duration>=this._minDvrSize&&this.getPlaybackType()===f.default.LIVE}}]),e}(l.default);e.default=v,v.canPlay=function(t,e){var n=t.split("?")[0].match(/.*\.(.*)$/)||[],r=n.length>1&&"m3u8"===n[1].toLowerCase()||(0,h.listContainsIgnoreCase)(e,["application/vnd.apple.mpegurl","application/x-mpegURL"]);return!(!c.default.isSupported()||!r)},t.exports=e.default},function(t,e,n){var r=n(11),i=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return i.stringify.apply(i,arguments)}},function(t,e,n){var r;"undefined"!=typeof window&&(r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=11)}([function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return f}));var r=n(4),i="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};function a(){}var o={trace:a,debug:a,log:a,warn:a,info:a,error:a},s=o;function u(t,e){return e="["+t+"] > "+e}var l=Object(r.a)();function c(t){var e=l.console[t];return e?function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];r[0]&&(r[0]=u(t,r[0])),e.apply(l.console,r)}:a}var d=function(t){if(!0===t||"object"===(void 0===t?"undefined":i(t))){!function(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){s[e]=t[e]?t[e].bind(t):c(e)}))}(t,"debug","log","info","warn","error");try{s.log()}catch(t){s=o}}else s=o},f=s},function(t,e,n){"use strict";e.a={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_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition"}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i}));var r={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",KEY_SYSTEM_ERROR:"keySystemError",MUX_ERROR:"muxError",OTHER_ERROR:"otherError"},i={KEY_SYSTEM_NO_KEYS:"keySystemNoKeys",KEY_SYSTEM_NO_ACCESS:"keySystemNoAccess",KEY_SYSTEM_NO_SESSION:"keySystemNoSession",KEY_SYSTEM_LICENSE_REQUEST_FAILED:"keySystemLicenseRequestFailed",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_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",REMUX_ALLOC_ERROR:"remuxAllocError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",BUFFER_NUDGE_ON_STALL:"bufferNudgeOnStall",INTERNAL_EXCEPTION:"internalException"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)}},function(t,e,n){"use strict";e.a=function(){return"undefined"==typeof window?self:window}},function(t,e,n){var r,i,a,o,s;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/\;?#]*)?(.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,i=/^([^\/;?#]*)(.*)$/,a=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,s={buildAbsoluteURL:function(t,e,n){if(n=n||{},t=t.trim(),!(e=e.trim())){if(!n.alwaysNormalize)return t;var r=this.parseURL(t);if(!o)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var a=this.parseURL(e);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=s.normalizePath(a.path),s.buildURLFromParts(a)):e;var o=this.parseURL(t);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var u=i.exec(o.path);o.netLoc=u[1],o.path=u[2]}o.netLoc&&!o.path&&(o.path="/");var l={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(l.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var c=o.path,d=c.substring(0,c.lastIndexOf("/")+1)+a.path;l.path=s.normalizePath(d)}else l.path=o.path,a.params||(l.params=o.params,a.query||(l.query=o.query));return null===l.path&&(l.path=n.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(l)},parseURL:function(t){var e=r.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(a,"");t.length!==(t=t.replace(o,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=s},function(t,e,n){"use strict";n.d(e,"b",(function(){return i}));var r=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.isHeader=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.isFooter=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.getID3Data=function(e,n){for(var r=n,i=0;t.isHeader(e,n);)i+=10,i+=t._readSize(e,n+6),t.isFooter(e,n+10)&&(i+=10),n+=i;if(i>0)return e.subarray(r,r+i)},t._readSize=function(t,e){var n=0;return n=(127&t[e])<<21,n|=(127&t[e+1])<<14,n|=(127&t[e+2])<<7,n|=127&t[e+3]},t.getTimeStamp=function(e){for(var n=t.getID3Frames(e),r=0;r<n.length;r++){var i=n[r];if(t.isTimeStampFrame(i))return t._readTimeStamp(i)}},t.isTimeStampFrame=function(t){return t&&"PRIV"===t.key&&"com.apple.streaming.transportStreamTimestamp"===t.info},t._getFrameData=function(e){var n=String.fromCharCode(e[0],e[1],e[2],e[3]),r=t._readSize(e,4);return{type:n,size:r,data:e.subarray(10,10+r)}},t.getID3Frames=function(e){for(var n=0,r=[];t.isHeader(e,n);){for(var i=t._readSize(e,n+6),a=(n+=10)+i;n+8<a;){var o=t._getFrameData(e.subarray(n)),s=t._decodeFrame(o);s&&r.push(s),n+=o.size+10}t.isFooter(e,n)&&(n+=10)}return r},t._decodeFrame=function(e){return"PRIV"===e.type?t._decodePrivFrame(e):"T"===e.type[0]?t._decodeTextFrame(e):"W"===e.type[0]?t._decodeURLFrame(e):void 0},t._readTimeStamp=function(t){if(8===t.data.byteLength){var e=new Uint8Array(t.data),n=1&e[3],r=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return r/=45,n&&(r+=47721858.84),Math.round(r)}},t._decodePrivFrame=function(e){if(!(e.size<2)){var n=t._utf8ArrayToStr(e.data,!0),r=new Uint8Array(e.data.subarray(n.length+1));return{key:e.type,info:n,data:r.buffer}}},t._decodeTextFrame=function(e){if(!(e.size<2)){if("TXXX"===e.type){var n=1,r=t._utf8ArrayToStr(e.data.subarray(n));n+=r.length+1;var i=t._utf8ArrayToStr(e.data.subarray(n));return{key:e.type,info:r,data:i}}var a=t._utf8ArrayToStr(e.data.subarray(1));return{key:e.type,data:a}}},t._decodeURLFrame=function(e){if("WXXX"===e.type){if(e.size<2)return;var n=1,r=t._utf8ArrayToStr(e.data.subarray(n));n+=r.length+1;var i=t._utf8ArrayToStr(e.data.subarray(n));return{key:e.type,info:r,data:i}}var a=t._utf8ArrayToStr(e.data);return{key:e.type,data:a}},t._utf8ArrayToStr=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.length,r=void 0,i=void 0,a=void 0,o="",s=0;s<n;){if(0===(r=t[s++])&&e)return o;if(0!==r&&3!==r)switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(r);break;case 12:case 13:i=t[s++],o+=String.fromCharCode((31&r)<<6|63&i);break;case 14:i=t[s++],a=t[s++],o+=String.fromCharCode((15&r)<<12|(63&i)<<6|(63&a)<<0)}}return o},t}(),i=r._utf8ArrayToStr;e.a=r},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function i(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,o,s,u,l;if(this._events||(this._events={}),"error"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(a(n=this._events[t]))return!1;if(r(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:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(i(n))for(s=Array.prototype.slice.call(arguments,1),o=(l=n.slice()).length,u=0;u<o;u++)l[u].apply(this,s);return!0},n.prototype.addListener=function(t,e){var o;if(!r(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,r(e.listener)?e.listener:e),this._events[t]?i(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,i(this._events[t])&&!this._events[t].warned&&(o=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&o>0&&this._events[t].length>o&&(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},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){if(!r(e))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(t,i),n||(n=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},n.prototype.removeListener=function(t,e){var n,a,o,s;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(o=(n=this._events[t]).length,a=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(n)){for(s=o;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){a=s;break}if(a<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(a,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.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(r(n=this._events[t]))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){"use strict";var r=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.subtle=e,this.aesIV=n}return t.prototype.decrypt=function(t,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,t)},t}(),i=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.subtle=e,this.key=n}return t.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},t}(),a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}return t.prototype.uint8ArrayToUint32Array_=function(t){for(var e=new DataView(t),n=new Uint32Array(4),r=0;r<4;r++)n[r]=e.getUint32(4*r);return n},t.prototype.initTable=function(){var t=this.sBox,e=this.invSBox,n=this.subMix,r=n[0],i=n[1],a=n[2],o=n[3],s=this.invSubMix,u=s[0],l=s[1],c=s[2],d=s[3],f=new Uint32Array(256),h=0,p=0,g=0;for(g=0;g<256;g++)f[g]=g<128?g<<1:g<<1^283;for(g=0;g<256;g++){var y=p^p<<1^p<<2^p<<3^p<<4;y=y>>>8^255&y^99,t[h]=y,e[y]=h;var v=f[h],m=f[v],b=f[m],A=257*f[y]^16843008*y;r[h]=A<<24|A>>>8,i[h]=A<<16|A>>>16,a[h]=A<<8|A>>>24,o[h]=A,A=16843009*b^65537*m^257*v^16843008*h,u[y]=A<<24|A>>>8,l[y]=A<<16|A>>>16,c[y]=A<<8|A>>>24,d[y]=A,h?(h=v^f[f[f[b^v]]],p^=f[f[p]]):h=p=1}},t.prototype.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),n=!0,r=0;r<e.length&&n;)n=e[r]===this.key[r],r++;if(!n){this.key=e;var i=this.keySize=e.length;if(4!==i&&6!==i&&8!==i)throw new Error("Invalid aes key size="+i);var a=this.ksRows=4*(i+6+1),o=void 0,s=void 0,u=this.keySchedule=new Uint32Array(a),l=this.invKeySchedule=new Uint32Array(a),c=this.sBox,d=this.rcon,f=this.invSubMix,h=f[0],p=f[1],g=f[2],y=f[3],v=void 0,m=void 0;for(o=0;o<a;o++)o<i?v=u[o]=e[o]:(m=v,o%i==0?(m=c[(m=m<<8|m>>>24)>>>24]<<24|c[m>>>16&255]<<16|c[m>>>8&255]<<8|c[255&m],m^=d[o/i|0]<<24):i>6&&o%i==4&&(m=c[m>>>24]<<24|c[m>>>16&255]<<16|c[m>>>8&255]<<8|c[255&m]),u[o]=v=(u[o-i]^m)>>>0);for(s=0;s<a;s++)o=a-s,m=3&s?u[o]:u[o-4],l[s]=s<4||o<=4?m:h[c[m>>>24]]^p[c[m>>>16&255]]^g[c[m>>>8&255]]^y[c[255&m]],l[s]=l[s]>>>0}},t.prototype.networkToHostOrderSwap=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},t.prototype.decrypt=function(t,e,n,r){for(var i,a,o,s=this.keySize+6,u=this.invKeySchedule,l=this.invSBox,c=this.invSubMix,d=c[0],f=c[1],h=c[2],p=c[3],g=this.uint8ArrayToUint32Array_(n),y=g[0],v=g[1],m=g[2],b=g[3],A=new Int32Array(t),_=new Int32Array(A.length),E=void 0,T=void 0,w=void 0,S=void 0,k=void 0,C=void 0,L=void 0,x=void 0,R=void 0,I=void 0,P=void 0,O=void 0,D=void 0,M=void 0,N=this.networkToHostOrderSwap;e<A.length;){for(R=N(A[e]),I=N(A[e+1]),P=N(A[e+2]),O=N(A[e+3]),k=R^u[0],C=O^u[1],L=P^u[2],x=I^u[3],D=4,M=1;M<s;M++)E=d[k>>>24]^f[C>>16&255]^h[L>>8&255]^p[255&x]^u[D],T=d[C>>>24]^f[L>>16&255]^h[x>>8&255]^p[255&k]^u[D+1],w=d[L>>>24]^f[x>>16&255]^h[k>>8&255]^p[255&C]^u[D+2],S=d[x>>>24]^f[k>>16&255]^h[C>>8&255]^p[255&L]^u[D+3],k=E,C=T,L=w,x=S,D+=4;E=l[k>>>24]<<24^l[C>>16&255]<<16^l[L>>8&255]<<8^l[255&x]^u[D],T=l[C>>>24]<<24^l[L>>16&255]<<16^l[x>>8&255]<<8^l[255&k]^u[D+1],w=l[L>>>24]<<24^l[x>>16&255]<<16^l[k>>8&255]<<8^l[255&C]^u[D+2],S=l[x>>>24]<<24^l[k>>16&255]<<16^l[C>>8&255]<<8^l[255&L]^u[D+3],D+=3,_[e]=N(E^y),_[e+1]=N(S^v),_[e+2]=N(w^m),_[e+3]=N(T^b),y=R,v=I,m=P,b=O,e+=4}return r?(i=_.buffer,a=i.byteLength,(o=a&&new DataView(i).getUint8(a-1))?i.slice(0,a-o):i):_.buffer},t.prototype.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},t}(),o=n(2),s=n(0),u=n(1),l=n(4);function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var d=Object(l.a)(),f=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.removePKCS7Padding,a=void 0===i||i;if(c(this,t),this.logEnabled=!0,this.observer=e,this.config=n,this.removePKCS7Padding=a,a)try{var o=d.crypto;o&&(this.subtle=o.subtle||o.webkitSubtle)}catch(t){}this.disableWebCrypto=!this.subtle}return t.prototype.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},t.prototype.decrypt=function(t,e,n,o){var u=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(s.b.log("JS AES decrypt"),this.logEnabled=!1);var l=this.decryptor;l||(this.decryptor=l=new a),l.expandKey(e),o(l.decrypt(t,0,n,this.removePKCS7Padding))}else{this.logEnabled&&(s.b.log("WebCrypto AES decrypt"),this.logEnabled=!1);var c=this.subtle;this.key!==e&&(this.key=e,this.fastAesKey=new i(c,e)),this.fastAesKey.expandKey().then((function(i){new r(c,n).decrypt(t,i).catch((function(r){u.onWebCryptoError(r,t,e,n,o)})).then((function(t){o(t)}))})).catch((function(r){u.onWebCryptoError(r,t,e,n,o)}))}},t.prototype.onWebCryptoError=function(t,e,n,r,i){this.config.enableSoftwareAES?(s.b.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(e,n,r,i)):(s.b.error("decrypting error : "+t.message),this.observer.trigger(u.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.FRAG_DECRYPT_ERROR,fatal:!0,reason:t.message}))},t.prototype.destroy=function(){var t=this.decryptor;t&&(t.destroy(),this.decryptor=void 0)},t}();e.a=f},function(t,e,n){"use strict";var r=n(0),i=n(1),a=Math.pow(2,32)-1,o=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observer=e,this.remuxer=n}return t.prototype.resetTimeStamp=function(t){this.initPTS=t},t.prototype.resetInitSegment=function(e,n,r,a){if(e&&e.byteLength){var o=this.initData=t.parseInitSegment(e);null==n&&(n="mp4a.40.5"),null==r&&(r="avc1.42e01e");var s={};o.audio&&o.video?s.audiovideo={container:"video/mp4",codec:n+","+r,initSegment:a?e:null}:(o.audio&&(s.audio={container:"audio/mp4",codec:n,initSegment:a?e:null}),o.video&&(s.video={container:"video/mp4",codec:r,initSegment:a?e:null})),this.observer.trigger(i.a.FRAG_PARSING_INIT_SEGMENT,{tracks:s})}else n&&(this.audioCodec=n),r&&(this.videoCodec=r)},t.probe=function(e){return t.findBox({data:e,start:0,end:Math.min(e.length,16384)},["moof"]).length>0},t.bin2str=function(t){return String.fromCharCode.apply(null,t)},t.readUint16=function(t,e){t.data&&(e+=t.start,t=t.data);var n=t[e]<<8|t[e+1];return n<0?65536+n:n},t.readUint32=function(t,e){t.data&&(e+=t.start,t=t.data);var n=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3];return n<0?4294967296+n:n},t.writeUint32=function(t,e,n){t.data&&(e+=t.start,t=t.data),t[e]=n>>24,t[e+1]=n>>16&255,t[e+2]=n>>8&255,t[e+3]=255&n},t.findBox=function(e,n){var r=[],i=void 0,a=void 0,o=void 0,s=void 0,u=void 0,l=void 0;if(e.data?(u=e.start,o=e.end,e=e.data):(u=0,o=e.byteLength),!n.length)return null;for(i=u;i<o;)l=(a=t.readUint32(e,i))>1?i+a:o,t.bin2str(e.subarray(i+4,i+8))===n[0]&&(1===n.length?r.push({data:e,start:i+8,end:l}):(s=t.findBox({data:e,start:i+8,end:l},n.slice(1))).length&&(r=r.concat(s))),i=l;return r},t.parseSegmentIndex=function(e){var n=t.findBox(e,["moov"])[0],r=n?n.end:null,i=0,a=t.findBox(e,["sidx"]),o=void 0;if(!a||!a[0])return null;o=[];var s=(a=a[0]).data[0];i=0===s?8:16;var u=t.readUint32(a,i);i+=4,i+=0===s?8:16,i+=2;var l=a.end+0,c=t.readUint16(a,i);i+=2;for(var d=0;d<c;d++){var f=i,h=t.readUint32(a,f);f+=4;var p=2147483647&h;if(1==(2147483648&h)>>>31)return void console.warn("SIDX has hierarchical references (not supported)");var g=t.readUint32(a,f);f+=4,o.push({referenceSize:p,subsegmentDuration:g,info:{duration:g/u,start:l,end:l+p-1}}),l+=p,i=f+=4}return{earliestPresentationTime:0,timescale:u,version:s,referencesCount:c,references:o,moovEndOffset:r}},t.parseInitSegment=function(e){var n=[];return t.findBox(e,["moov","trak"]).forEach((function(e){var i=t.findBox(e,["tkhd"])[0];if(i){var a=i.data[i.start],o=0===a?12:20,s=t.readUint32(i,o),u=t.findBox(e,["mdia","mdhd"])[0];if(u){o=0===(a=u.data[u.start])?12:20;var l=t.readUint32(u,o),c=t.findBox(e,["mdia","hdlr"])[0];if(c){var d={soun:"audio",vide:"video"}[t.bin2str(c.data.subarray(c.start+8,c.start+12))];if(d){var f=t.findBox(e,["mdia","minf","stbl","stsd"]);if(f.length){f=f[0];var h=t.bin2str(f.data.subarray(f.start+12,f.start+16));r.b.log("MP4Demuxer:"+d+":"+h+" found")}n[s]={timescale:l,type:d},n[d]={timescale:l,id:s}}}}}})),n},t.getStartDTS=function(e,n){var r,i,a=void 0;return a=t.findBox(n,["moof","traf"]),r=[].concat.apply([],a.map((function(n){return t.findBox(n,["tfhd"]).map((function(r){var i,a;return i=t.readUint32(r,4),a=e[i].timescale||9e4,t.findBox(n,["tfdt"]).map((function(e){var n,r=void 0;return n=e.data[e.start],r=t.readUint32(e,4),1===n&&(r*=Math.pow(2,32),r+=t.readUint32(e,8)),r}))[0]/a}))}))),i=Math.min.apply(null,r),isFinite(i)?i:0},t.offsetStartDTS=function(e,n,r){t.findBox(n,["moof","traf"]).map((function(n){return t.findBox(n,["tfhd"]).map((function(i){var o=t.readUint32(i,4),s=e[o].timescale||9e4;t.findBox(n,["tfdt"]).map((function(e){var n=e.data[e.start],i=t.readUint32(e,4);if(0===n)t.writeUint32(e,4,i-r*s);else{i*=Math.pow(2,32),i+=t.readUint32(e,8),i-=r*s,i=Math.max(i,0);var o=Math.floor(i/(a+1)),u=Math.floor(i%(a+1));t.writeUint32(e,4,o),t.writeUint32(e,8,u)}}))}))}))},t.prototype.append=function(e,n,r,a){var o=this.initData;o||(this.resetInitSegment(e,this.audioCodec,this.videoCodec,!1),o=this.initData);var s,u=this.initPTS;if(void 0===u){var l=t.getStartDTS(o,e);this.initPTS=u=l-n,this.observer.trigger(i.a.INIT_PTS_FOUND,{initPTS:u})}t.offsetStartDTS(o,e,u),s=t.getStartDTS(o,e),this.remuxer.remux(o.audio,o.video,null,null,s,r,a,e)},t.prototype.destroy=function(){},t}();e.a=o},function(t,e,n){"use strict";var r=n(1),i=n(2),a=n(8),o=n(3),s=n(0),u=n(4);function l(t,e){return 255===t[e]&&240==(246&t[e+1])}function c(t,e){return 1&t[e+1]?7:9}function d(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function f(t,e){return!!(e+1<t.length&&l(t,e))}function h(t,e){if(e+1<t.length&&l(t,e)){var n=c(t,e);e+5<t.length&&(n=d(t,e));var r=e+n;if(r===t.length||r+1<t.length&&l(t,r))return!0}return!1}function p(t,e,n,a,o){if(!t.samplerate){var u=function(t,e,n,a){var o,u=void 0,l=void 0,c=void 0,d=void 0,f=navigator.userAgent.toLowerCase(),h=a,p=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];if(u=1+((192&e[n+2])>>>6),!((o=(60&e[n+2])>>>2)>p.length-1))return c=(1&e[n+2])<<2,c|=(192&e[n+3])>>>6,s.b.log("manifest codec:"+a+",ADTS data:type:"+u+",sampleingIndex:"+o+"["+p[o]+"Hz],channelConfig:"+c),/firefox/i.test(f)?o>=6?(u=5,d=new Array(4),l=o-3):(u=2,d=new Array(2),l=o):-1!==f.indexOf("android")?(u=2,d=new Array(2),l=o):(u=5,d=new Array(4),a&&(-1!==a.indexOf("mp4a.40.29")||-1!==a.indexOf("mp4a.40.5"))||!a&&o>=6?l=o-3:((a&&-1!==a.indexOf("mp4a.40.2")&&(o>=6&&1===c||/vivaldi/i.test(f))||!a&&1===c)&&(u=2,d=new Array(2)),l=o)),d[0]=u<<3,d[0]|=(14&o)>>1,d[1]|=(1&o)<<7,d[1]|=c<<3,5===u&&(d[1]|=(14&l)>>1,d[2]=(1&l)<<7,d[2]|=8,d[3]=0),{config:d,samplerate:p[o],channelCount:c,codec:"mp4a.40."+u,manifestCodec:h};t.trigger(r.a.ERROR,{type:i.b.MEDIA_ERROR,details:i.a.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+o})}(e,n,a,o);t.config=u.config,t.samplerate=u.samplerate,t.channelCount=u.channelCount,t.codec=u.codec,t.manifestCodec=u.manifestCodec,s.b.log("parsed codec:"+t.codec+",rate:"+u.samplerate+",nb channel:"+u.channelCount)}}function g(t){return 9216e4/t}function y(t,e,n,r,i){var a=function(t,e,n,r,i){var a,o=void 0,s=t.length;if(a=c(t,e),o=d(t,e),(o-=a)>0&&e+a+o<=s)return{headerLength:a,frameLength:o,stamp:n+r*i}}(e,n,r,i,g(t.samplerate));if(a){var o=a.stamp,s=a.headerLength,u=a.frameLength,l={unit:e.subarray(n+s,n+s+u),pts:o,dts:o};return t.samples.push(l),t.len+=u,{sample:l,length:u+s}}}var v=n(6),m=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observer=e,this.config=r,this.remuxer=n}return t.prototype.resetInitSegment=function(t,e,n,r){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:e,duration:r,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(t){if(!t)return!1;for(var e=(v.a.getID3Data(t,0)||[]).length,n=t.length;e<n;e++)if(h(t,e))return s.b.log("ADTS sync word found !"),!0;return!1},t.prototype.append=function(t,e,n,r){for(var i=this._audioTrack,a=v.a.getID3Data(t,0)||[],u=v.a.getTimeStamp(a),l=Object(o.a)(u)?90*u:9e4*e,c=0,d=l,h=t.length,g=a.length,m=[{pts:d,dts:d,data:a}];g<h-1;)if(f(t,g)&&g+5<h){p(i,this.observer,t,g,i.manifestCodec);var b=y(i,t,g,l,c);if(!b){s.b.log("Unable to parse AAC frame");break}g+=b.length,d=b.sample.pts,c++}else v.a.isHeader(t,g)?(a=v.a.getID3Data(t,g),m.push({pts:d,dts:d,data:a}),g+=a.length):g++;this.remuxer.remux(i,{samples:[]},{samples:m,inputTimeScale:9e4},{samples:[]},e,n,r)},t.prototype.destroy=function(){},t}(),b=n(9),A={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(t,e,n,r,i){if(!(n+24>e.length)){var a=this.parseHeader(e,n);if(a&&n+a.frameLength<=e.length){var o=r+i*(9e4*a.samplesPerFrame/a.sampleRate),s={unit:e.subarray(n,n+a.frameLength),pts:o,dts:o};return t.config=[],t.channelCount=a.channelCount,t.samplerate=a.sampleRate,t.samples.push(s),t.len+=a.frameLength,{sample:s,length:a.frameLength}}}},parseHeader:function(t,e){var n=t[e+1]>>3&3,r=t[e+1]>>1&3,i=t[e+2]>>4&15,a=t[e+2]>>2&3,o=t[e+2]>>1&1;if(1!==n&&0!==i&&15!==i&&3!==a){var s=3===n?3-r:3===r?3:4,u=1e3*A.BitratesMap[14*s+i-1],l=3===n?0:2===n?1:2,c=A.SamplingRateMap[3*l+a],d=t[e+3]>>6==3?1:2,f=A.SamplesCoefficients[n][r],h=A.BytesInSlot[r],p=8*f*h;return{sampleRate:c,channelCount:d,frameLength:parseInt(f*u/c+o,10)*h,samplesPerFrame:p}}},isHeaderPattern:function(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])},isHeader:function(t,e){return!!(e+1<t.length&&this.isHeaderPattern(t,e))},probe:function(t,e){if(e+1<t.length&&this.isHeaderPattern(t,e)){var n=this.parseHeader(t,e),r=4;n&&n.frameLength&&(r=n.frameLength);var i=e+r;if(i===t.length||i+1<t.length&&this.isHeaderPattern(t,i))return!0}return!1}},_=A,E=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}return t.prototype.loadWord=function(){var t=this.data,e=this.bytesAvailable,n=t.byteLength-e,r=new Uint8Array(4),i=Math.min(4,e);if(0===i)throw new Error("no bytes available");r.set(t.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*i,this.bytesAvailable-=i},t.prototype.skipBits=function(t){var e=void 0;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,t-=(e=t>>3)>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},t.prototype.readBits=function(t){var e=Math.min(this.bitsAvailable,t),n=this.word>>>32-e;return t>32&&s.b.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)>0&&this.bitsAvailable?n<<e|this.readBits(e):n},t.prototype.skipLZ=function(){var t=void 0;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()},t.prototype.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.skipEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},t.prototype.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},t.prototype.readBoolean=function(){return 1===this.readBits(1)},t.prototype.readUByte=function(){return this.readBits(8)},t.prototype.readUShort=function(){return this.readBits(16)},t.prototype.readUInt=function(){return this.readBits(32)},t.prototype.skipScalingList=function(t){var e=8,n=8,r=void 0;for(r=0;r<t;r++)0!==n&&(n=(e+this.readEG()+256)%256),e=0===n?e:n},t.prototype.readSPS=function(){var t,e,n,r,i=0,a=0,o=0,s=0,u=void 0,l=void 0,c=void 0,d=this.readUByte.bind(this),f=this.readBits.bind(this),h=this.readUEG.bind(this),p=this.readBoolean.bind(this),g=this.skipBits.bind(this),y=this.skipEG.bind(this),v=this.skipUEG.bind(this),m=this.skipScalingList.bind(this);if(d(),t=d(),f(5),g(3),d(),v(),100===t||110===t||122===t||244===t||44===t||83===t||86===t||118===t||128===t){var b=h();if(3===b&&g(1),v(),v(),g(1),p())for(l=3!==b?8:12,c=0;c<l;c++)p()&&m(c<6?16:64)}v();var A=h();if(0===A)h();else if(1===A)for(g(1),y(),y(),u=h(),c=0;c<u;c++)y();v(),g(1),e=h(),n=h(),0===(r=f(1))&&g(1),g(1),p()&&(i=h(),a=h(),o=h(),s=h());var _=[1,1];if(p()&&p())switch(d()){case 1:_=[1,1];break;case 2:_=[12,11];break;case 3:_=[10,11];break;case 4:_=[16,11];break;case 5:_=[40,33];break;case 6:_=[24,11];break;case 7:_=[20,11];break;case 8:_=[32,11];break;case 9:_=[80,33];break;case 10:_=[18,11];break;case 11:_=[15,11];break;case 12:_=[64,33];break;case 13:_=[160,99];break;case 14:_=[4,3];break;case 15:_=[3,2];break;case 16:_=[2,1];break;case 255:_=[d()<<8|d(),d()<<8|d()]}return{width:Math.ceil(16*(e+1)-2*i-2*a),height:(2-r)*(n+1)*16-(r?2:4)*(o+s),pixelRatio:_}},t.prototype.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},t}(),T=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.decryptdata=r,this.discardEPB=i,this.decrypter=new a.a(e,n,{removePKCS7Padding:!1})}return t.prototype.decryptBuffer=function(t,e){this.decrypter.decrypt(t,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,e)},t.prototype.decryptAacSample=function(t,e,n,r){var i=t[e].unit,a=i.subarray(16,i.length-i.length%16),o=a.buffer.slice(a.byteOffset,a.byteOffset+a.length),s=this;this.decryptBuffer(o,(function(a){a=new Uint8Array(a),i.set(a,16),r||s.decryptAacSamples(t,e+1,n)}))},t.prototype.decryptAacSamples=function(t,e,n){for(;;e++){if(e>=t.length)return void n();if(!(t[e].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(t,e,n,r),!r)return}}},t.prototype.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,n=new Int8Array(e),r=0,i=32;i<=t.length-16;i+=160,r+=16)n.set(t.subarray(i,i+16),r);return n},t.prototype.getAvcDecryptedUnit=function(t,e){e=new Uint8Array(e);for(var n=0,r=32;r<=t.length-16;r+=160,n+=16)t.set(e.subarray(n,n+16),r);return t},t.prototype.decryptAvcSample=function(t,e,n,r,i,a){var o=this.discardEPB(i.data),s=this.getAvcEncryptedData(o),u=this;this.decryptBuffer(s.buffer,(function(s){i.data=u.getAvcDecryptedUnit(o,s),a||u.decryptAvcSamples(t,e,n+1,r)}))},t.prototype.decryptAvcSamples=function(t,e,n,r){for(;;e++,n=0){if(e>=t.length)return void r();for(var i=t[e].units;!(n>=i.length);n++){var a=i[n];if(!(a.length<=48||1!==a.type&&5!==a.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(t,e,n,r,a,o),!o)return}}}},t}(),w={video:1,audio:2,id3:3,text:4},S=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observer=e,this.config=r,this.typeSupported=i,this.remuxer=n,this.sampleAes=null}return t.prototype.setDecryptData=function(t){null!=t&&null!=t.key&&"SAMPLE-AES"===t.method?this.sampleAes=new T(this.observer,this.config,t,this.discardEPB):this.sampleAes=null},t.probe=function(e){var n=t._syncOffset(e);return!(n<0||(n&&s.b.warn("MPEG2-TS detected but first sync word found @ offset "+n+", junk ahead ?"),0))},t._syncOffset=function(t){for(var e=Math.min(1e3,t.length-564),n=0;n<e;){if(71===t[n]&&71===t[n+188]&&71===t[n+376])return n;n++}return-1},t.createTrack=function(t,e){return{container:"video"===t||"audio"===t?"video/mp2t":void 0,type:t,id:w[t],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0,dropped:"video"===t?0:void 0,isAAC:"audio"===t||void 0,duration:"audio"===t?e:void 0}},t.prototype.resetInitSegment=function(e,n,r,i){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=t.createTrack("video",i),this._audioTrack=t.createTrack("audio",i),this._id3Track=t.createTrack("id3",i),this._txtTrack=t.createTrack("text",i),this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=n,this.videoCodec=r,this._duration=i},t.prototype.resetTimeStamp=function(){},t.prototype.append=function(e,n,a,o){var u=void 0,l=e.length,c=void 0,d=void 0,f=void 0,h=void 0,p=!1;this.contiguous=a;var g=this.pmtParsed,y=this._avcTrack,v=this._audioTrack,m=this._id3Track,b=y.pid,A=v.pid,_=m.pid,E=this._pmtId,T=y.pesData,w=v.pesData,S=m.pesData,k=this._parsePAT,C=this._parsePMT,L=this._parsePES,x=this._parseAVCPES.bind(this),R=this._parseAACPES.bind(this),I=this._parseMPEGPES.bind(this),P=this._parseID3PES.bind(this),O=t._syncOffset(e);for(l-=(l+O)%188,u=O;u<l;u+=188)if(71===e[u]){if(c=!!(64&e[u+1]),d=((31&e[u+1])<<8)+e[u+2],(48&e[u+3])>>4>1){if((f=u+5+e[u+4])===u+188)continue}else f=u+4;switch(d){case b:c&&(T&&(h=L(T))&&void 0!==h.pts&&x(h,!1),T={data:[],size:0}),T&&(T.data.push(e.subarray(f,u+188)),T.size+=u+188-f);break;case A:c&&(w&&(h=L(w))&&void 0!==h.pts&&(v.isAAC?R(h):I(h)),w={data:[],size:0}),w&&(w.data.push(e.subarray(f,u+188)),w.size+=u+188-f);break;case _:c&&(S&&(h=L(S))&&void 0!==h.pts&&P(h),S={data:[],size:0}),S&&(S.data.push(e.subarray(f,u+188)),S.size+=u+188-f);break;case 0:c&&(f+=e[f]+1),E=this._pmtId=k(e,f);break;case E:c&&(f+=e[f]+1);var D=C(e,f,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(b=D.avc)>0&&(y.pid=b),(A=D.audio)>0&&(v.pid=A,v.isAAC=D.isAAC),(_=D.id3)>0&&(m.pid=_),p&&!g&&(s.b.log("reparse from beginning"),p=!1,u=O-188),g=this.pmtParsed=!0;break;case 17:case 8191:break;default:p=!0}}else this.observer.trigger(r.a.ERROR,{type:i.b.MEDIA_ERROR,details:i.a.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});T&&(h=L(T))&&void 0!==h.pts?(x(h,!0),y.pesData=null):y.pesData=T,w&&(h=L(w))&&void 0!==h.pts?(v.isAAC?R(h):I(h),v.pesData=null):(w&&w.size&&s.b.log("last AAC PES packet truncated,might overlap between fragments"),v.pesData=w),S&&(h=L(S))&&void 0!==h.pts?(P(h),m.pesData=null):m.pesData=S,null==this.sampleAes?this.remuxer.remux(v,y,m,this._txtTrack,n,a,o):this.decryptAndRemux(v,y,m,this._txtTrack,n,a,o)},t.prototype.decryptAndRemux=function(t,e,n,r,i,a,o){if(t.samples&&t.isAAC){var s=this;this.sampleAes.decryptAacSamples(t.samples,0,(function(){s.decryptAndRemuxAvc(t,e,n,r,i,a,o)}))}else this.decryptAndRemuxAvc(t,e,n,r,i,a,o)},t.prototype.decryptAndRemuxAvc=function(t,e,n,r,i,a,o){if(e.samples){var s=this;this.sampleAes.decryptAvcSamples(e.samples,0,0,(function(){s.remuxer.remux(t,e,n,r,i,a,o)}))}else this.remuxer.remux(t,e,n,r,i,a,o)},t.prototype.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},t.prototype._parsePAT=function(t,e){return(31&t[e+10])<<8|t[e+11]},t.prototype._parsePMT=function(t,e,n,r){var i,a=void 0,o={audio:-1,avc:-1,id3:-1,isAAC:!0};for(i=e+3+((15&t[e+1])<<8|t[e+2])-4,e+=12+((15&t[e+10])<<8|t[e+11]);e<i;){switch(a=(31&t[e+1])<<8|t[e+2],t[e]){case 207:if(!r){s.b.log("unkown stream type:"+t[e]);break}case 15:-1===o.audio&&(o.audio=a);break;case 21:-1===o.id3&&(o.id3=a);break;case 219:if(!r){s.b.log("unkown stream type:"+t[e]);break}case 27:-1===o.avc&&(o.avc=a);break;case 3:case 4:n?-1===o.audio&&(o.audio=a,o.isAAC=!1):s.b.log("MPEG audio found, not supported in this browser for now");break;case 36:s.b.warn("HEVC stream type found, not supported for now");break;default:s.b.log("unkown stream type:"+t[e])}e+=5+((15&t[e+3])<<8|t[e+4])}return o},t.prototype._parsePES=function(t){var e=0,n=void 0,r=void 0,i=void 0,a=void 0,o=void 0,u=void 0,l=void 0,c=void 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(1===((n=d[0])[0]<<16)+(n[1]<<8)+n[2]){if((i=(n[4]<<8)+n[5])&&i>t.size-6)return null;192&(r=n[7])&&((u=536870912*(14&n[9])+4194304*(255&n[10])+16384*(254&n[11])+128*(255&n[12])+(254&n[13])/2)>4294967295&&(u-=8589934592),64&r?((l=536870912*(14&n[14])+4194304*(255&n[15])+16384*(254&n[16])+128*(255&n[17])+(254&n[18])/2)>4294967295&&(l-=8589934592),u-l>54e5&&(s.b.warn(Math.round((u-l)/9e4)+"s delta between PTS and DTS, align them"),u=l)):l=u),c=(a=n[8])+9,t.size-=c,o=new Uint8Array(t.size);for(var h=0,p=d.length;h<p;h++){var g=(n=d[h]).byteLength;if(c){if(c>g){c-=g;continue}n=n.subarray(c),g-=c,c=0}o.set(n,e),e+=g}return i&&(i-=a+3),{data:o,pts:u,dts:l,len:i}}return null},t.prototype.pushAccesUnit=function(t,e){if(t.units.length&&t.frame){var n=e.samples,r=n.length;!this.config.forceKeyFrameOnDiscontinuity||!0===t.key||e.sps&&(r||this.contiguous)?(t.id=r,n.push(t)):e.dropped++}t.debug.length&&s.b.log(t.pts+"/"+t.dts+":"+t.debug)},t.prototype._parseAVCPES=function(t,e){var n=this,r=this._avcTrack,i=this._parseAVCNALu(t.data),a=void 0,o=this.avcSample,s=void 0,u=!1,l=void 0,c=this.pushAccesUnit.bind(this),d=function(t,e,n,r){return{key:t,pts:e,dts:n,units:[],debug:r}};t.data=null,o&&i.length&&!r.audFound&&(c(o,r),o=this.avcSample=d(!1,t.pts,t.dts,"")),i.forEach((function(e){switch(e.type){case 1:s=!0,o||(o=n.avcSample=d(!0,t.pts,t.dts,"")),o.frame=!0;var i=e.data;if(u&&i.length>4){var f=new E(i).readSliceType();2!==f&&4!==f&&7!==f&&9!==f||(o.key=!0)}break;case 5:s=!0,o||(o=n.avcSample=d(!0,t.pts,t.dts,"")),o.key=!0,o.frame=!0;break;case 6:s=!0,(a=new E(n.discardEPB(e.data))).readUByte();for(var h=0,p=0,g=!1,y=0;!g&&a.bytesAvailable>1;){h=0;do{h+=y=a.readUByte()}while(255===y);p=0;do{p+=y=a.readUByte()}while(255===y);if(4===h&&0!==a.bytesAvailable){if(g=!0,181===a.readUByte()&&49===a.readUShort()&&1195456820===a.readUInt()&&3===a.readUByte()){var v=a.readUByte(),m=31&v,b=[v,a.readUByte()];for(l=0;l<m;l++)b.push(a.readUByte()),b.push(a.readUByte()),b.push(a.readUByte());n._insertSampleInOrder(n._txtTrack.samples,{type:3,pts:t.pts,bytes:b})}}else if(p<a.bytesAvailable)for(l=0;l<p;l++)a.readUByte()}break;case 7:if(s=!0,u=!0,!r.sps){var A=(a=new E(e.data)).readSPS();r.width=A.width,r.height=A.height,r.pixelRatio=A.pixelRatio,r.sps=[e.data],r.duration=n._duration;var _=e.data.subarray(1,4),T="avc1.";for(l=0;l<3;l++){var w=_[l].toString(16);w.length<2&&(w="0"+w),T+=w}r.codec=T}break;case 8:s=!0,r.pps||(r.pps=[e.data]);break;case 9:s=!1,r.audFound=!0,o&&c(o,r),o=n.avcSample=d(!1,t.pts,t.dts,"");break;case 12:s=!1;break;default:s=!1,o&&(o.debug+="unknown NAL "+e.type+" ")}o&&s&&o.units.push(e)})),e&&o&&(c(o,r),this.avcSample=null)},t.prototype._insertSampleInOrder=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)},t.prototype._getLastNalUnit=function(){var t=this.avcSample,e=void 0;if(!t||0===t.units.length){var n=this._avcTrack.samples;t=n[n.length-1]}if(t){var r=t.units;e=r[r.length-1]}return e},t.prototype._parseAVCNALu=function(t){var e=0,n=t.byteLength,r=void 0,i=void 0,a=this._avcTrack,o=a.naluState||0,s=o,u=[],l=void 0,c=-1,d=void 0;for(-1===o&&(c=0,d=31&t[0],o=0,e=1);e<n;)if(r=t[e++],o)if(1!==o)if(r)if(1===r){if(c>=0)l={data:t.subarray(c,e-o-1),type:d},u.push(l);else{var f=this._getLastNalUnit();if(f&&(s&&e<=4-s&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-s)),(i=e-o-1)>0)){var h=new Uint8Array(f.data.byteLength+i);h.set(f.data,0),h.set(t.subarray(0,i),f.data.byteLength),f.data=h}}e<n?(c=e,d=31&t[e],o=0):o=-1}else o=0;else o=3;else o=r?0:2;else o=r?0:1;if(c>=0&&o>=0&&(l={data:t.subarray(c,n),type:d,state:o},u.push(l)),0===u.length){var p=this._getLastNalUnit();if(p){var g=new Uint8Array(p.data.byteLength+t.byteLength);g.set(p.data,0),g.set(t,p.data.byteLength),p.data=g}}return a.naluState=o,u},t.prototype.discardEPB=function(t){for(var e,n=t.byteLength,r=[],i=1,a=void 0;i<n-2;)0===t[i]&&0===t[i+1]&&3===t[i+2]?(r.push(i+2),i+=2):i++;if(0===r.length)return t;e=n-r.length,a=new Uint8Array(e);var o=0;for(i=0;i<e;o++,i++)o===r[0]&&(o++,r.shift()),a[i]=t[o];return a},t.prototype._parseAACPES=function(t){var e,n,a=this._audioTrack,o=t.data,u=t.pts,l=this.aacOverFlow,c=this.aacLastPTS,d=void 0,h=void 0,v=void 0;if(l){var m=new Uint8Array(l.byteLength+o.byteLength);m.set(l,0),m.set(o,l.byteLength),o=m}for(h=0,n=o.length;h<n-1&&!f(o,h);h++);if(h){var b=void 0,A=void 0;if(h<n-1?(b="AAC PES did not start with ADTS header,offset:"+h,A=!1):(b="no ADTS header found in AAC PES",A=!0),s.b.warn("parsing error:"+b),this.observer.trigger(r.a.ERROR,{type:i.b.MEDIA_ERROR,details:i.a.FRAG_PARSING_ERROR,fatal:A,reason:b}),A)return}if(p(a,this.observer,o,h,this.audioCodec),d=0,e=g(a.samplerate),l&&c){var _=c+e;Math.abs(_-u)>1&&(s.b.log("AAC: align PTS for overlapping frames by "+Math.round((_-u)/90)),u=_)}for(;h<n;)if(f(o,h)&&h+5<n){var E=y(a,o,h,u,d);if(!E)break;h+=E.length,v=E.sample.pts,d++}else h++;l=h<n?o.subarray(h,n):null,this.aacOverFlow=l,this.aacLastPTS=v},t.prototype._parseMPEGPES=function(t){for(var e=t.data,n=e.length,r=0,i=0,a=t.pts;i<n;)if(_.isHeader(e,i)){var o=_.appendFrame(this._audioTrack,e,i,a,r);if(!o)break;i+=o.length,r++}else i++},t.prototype._parseID3PES=function(t){this._id3Track.samples.push(t)},t}(),k=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observer=e,this.config=r,this.remuxer=n}return t.prototype.resetInitSegment=function(t,e,n,r){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:e,duration:r,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(t){var e=void 0,n=void 0,r=v.a.getID3Data(t,0);if(r&&void 0!==v.a.getTimeStamp(r))for(e=r.length,n=Math.min(t.length-1,e+100);e<n;e++)if(_.probe(t,e))return s.b.log("MPEG Audio sync word found !"),!0;return!1},t.prototype.append=function(t,e,n,r){for(var i=v.a.getID3Data(t,0),a=v.a.getTimeStamp(i),o=a?90*a:9e4*e,s=i.length,u=t.length,l=0,c=0,d=this._audioTrack,f=[{pts:o,dts:o,data:i}];s<u;)if(_.isHeader(t,s)){var h=_.appendFrame(d,t,s,o,l);if(!h)break;s+=h.length,c=h.sample.pts,l++}else v.a.isHeader(t,s)?(i=v.a.getID3Data(t,s),f.push({pts:c,dts:c,data:i}),s+=i.length):s++;this.remuxer.remux(d,{samples:[]},{samples:f,inputTimeScale:9e4},{samples:[]},e,n,r)},t.prototype.destroy=function(){},t}(),C=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.getSilentFrame=function(t,e){switch(t){case"mp4a.40.2":if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},t}(),L=Math.pow(2,32)-1,x=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.init=function(){t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var e=void 0;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]),a=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=a,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 o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),u=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,o,u,o,s),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,i))},t.box=function(t){for(var e=Array.prototype.slice.call(arguments,1),n=8,r=e.length,i=r,a=void 0;r--;)n+=e[r].byteLength;for((a=new Uint8Array(n))[0]=n>>24&255,a[1]=n>>16&255,a[2]=n>>8&255,a[3]=255&n,a.set(t,4),r=0,n=8;r<i;r++)a.set(e[r],n),n+=e[r].byteLength;return a},t.hdlr=function(e){return t.box(t.types.hdlr,t.HDLR_TYPES[e])},t.mdat=function(e){return t.box(t.types.mdat,e)},t.mdhd=function(e,n){n*=e;var r=Math.floor(n/(L+1)),i=Math.floor(n%(L+1));return t.box(t.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=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))},t.moof=function(e,n,r){return t.box(t.types.moof,t.mfhd(e),t.traf(r,n))},t.moov=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)))},t.mvex=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))},t.mvhd=function(e,n){n*=e;var r=Math.floor(n/(L+1)),i=Math.floor(n%(L+1)),a=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,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,a)},t.sdtp=function(e){var n=e.samples||[],r=new Uint8Array(4+n.length),i=void 0,a=void 0;for(a=0;a<n.length;a++)i=n[a].flags,r[a+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return t.box(t.types.sdtp,r)},t.stbl=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))},t.avc1=function(e){var n=[],r=[],i=void 0,a=void 0,o=void 0;for(i=0;i<e.sps.length;i++)o=(a=e.sps[i]).byteLength,n.push(o>>>8&255),n.push(255&o),n=n.concat(Array.prototype.slice.call(a));for(i=0;i<e.pps.length;i++)o=(a=e.pps[i]).byteLength,r.push(o>>>8&255),r.push(255&o),r=r.concat(Array.prototype.slice.call(a));var s=t.box(t.types.avcC,new Uint8Array([1,n[3],n[4],n[5],255,224|e.sps.length].concat(n).concat([e.pps.length]).concat(r))),u=e.width,l=e.height,c=e.pixelRatio[0],d=e.pixelRatio[1];return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,u>>8&255,255&u,l>>8&255,255&l,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,d>>24,d>>16&255,d>>8&255,255&d])))},t.esds=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]))},t.mp4a=function(e){var n=e.samplerate;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)))},t.mp3=function(e){var n=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var n=e.id,r=e.duration*e.timescale,i=e.width,a=e.height,o=Math.floor(r/(L+1)),s=Math.floor(r%(L+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s,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,a>>8&255,255&a,0,0]))},t.traf=function(e,n){var r=t.sdtp(e),i=e.id,a=Math.floor(n/(L+1)),o=Math.floor(n%(L+1));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([1,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,o>>24,o>>16&255,o>>8&255,255&o])),t.trun(e,r.length+16+20+8+16+8+8),r)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=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]))},t.trun=function(e,n){var r=e.samples||[],i=r.length,a=12+16*i,o=new Uint8Array(a),s=void 0,u=void 0,l=void 0,c=void 0,d=void 0,f=void 0;for(n+=8+a,o.set([0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,255&i,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),s=0;s<i;s++)l=(u=r[s]).duration,c=u.size,d=u.flags,f=u.cts,o.set([l>>>24&255,l>>>16&255,l>>>8&255,255&l,c>>>24&255,c>>>16&255,c>>>8&255,255&c,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.paddingValue<<1|d.isNonSync,61440&d.degradPrio,15&d.degradPrio,f>>>24&255,f>>>16&255,f>>>8&255,255&f],12+16*s);return t.box(t.types.trun,o)},t.initSegment=function(e){t.types||t.init();var n=t.moov(e),r=void 0;return(r=new Uint8Array(t.FTYP.byteLength+n.byteLength)).set(t.FTYP),r.set(n,t.FTYP.byteLength),r},t}(),R=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observer=e,this.config=n,this.typeSupported=r;var a=navigator.userAgent;this.isSafari=i&&i.indexOf("Apple")>-1&&a&&!a.match("CriOS"),this.ISGenerated=!1}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(t){this._initPTS=this._initDTS=t},t.prototype.resetInitSegment=function(){this.ISGenerated=!1},t.prototype.remux=function(t,e,n,i,a,o,u){if(this.ISGenerated||this.generateIS(t,e,a),this.ISGenerated){var l=t.samples.length,c=e.samples.length,d=a,f=a;if(l&&c){var h=(t.samples[0].dts-e.samples[0].dts)/e.inputTimeScale;d+=Math.max(0,h),f+=Math.max(0,-h)}if(l){t.timescale||(s.b.warn("regenerate InitSegment as audio detected"),this.generateIS(t,e,a));var p=this.remuxAudio(t,d,o,u);if(c){var g=void 0;p&&(g=p.endPTS-p.startPTS),e.timescale||(s.b.warn("regenerate InitSegment as video detected"),this.generateIS(t,e,a)),this.remuxVideo(e,f,o,g,u)}}else if(c){var y=this.remuxVideo(e,f,o,0,u);y&&t.codec&&this.remuxEmptyAudio(t,d,o,y)}}n.samples.length&&this.remuxID3(n,a),i.samples.length&&this.remuxText(i,a),this.observer.trigger(r.a.FRAG_PARSED)},t.prototype.generateIS=function(t,e,n){var a=this.observer,o=t.samples,u=e.samples,l=this.typeSupported,c="audio/mp4",d={},f={tracks:d},h=void 0===this._initPTS,p=void 0,g=void 0;if(h&&(p=g=1/0),t.config&&o.length&&(t.timescale=t.samplerate,s.b.log("audio sampling rate : "+t.samplerate),t.isAAC||(l.mpeg?(c="audio/mpeg",t.codec=""):l.mp3&&(t.codec="mp3")),d.audio={container:c,codec:t.codec,initSegment:!t.isAAC&&l.mpeg?new Uint8Array:x.initSegment([t]),metadata:{channelCount:t.channelCount}},h&&(p=g=o[0].pts-t.inputTimeScale*n)),e.sps&&e.pps&&u.length){var y=e.inputTimeScale;e.timescale=y,d.video={container:"video/mp4",codec:e.codec,initSegment:x.initSegment([e]),metadata:{width:e.width,height:e.height}},h&&(p=Math.min(p,u[0].pts-y*n),g=Math.min(g,u[0].dts-y*n),this.observer.trigger(r.a.INIT_PTS_FOUND,{initPTS:p}))}Object.keys(d).length?(a.trigger(r.a.FRAG_PARSING_INIT_SEGMENT,f),this.ISGenerated=!0,h&&(this._initPTS=p,this._initDTS=g)):a.trigger(r.a.ERROR,{type:i.b.MEDIA_ERROR,details:i.a.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},t.prototype.remuxVideo=function(t,e,n,a,o){var u,l,c,d=8,f=t.timescale,h=void 0,p=void 0,g=void 0,y=void 0,v=t.samples,m=[],b=v.length,A=this._PTSNormalize,_=this._initDTS,E=this.nextAvcDts,T=this.isSafari;if(0!==b){T&&(n|=v.length&&E&&(o&&Math.abs(e-E/f)<.1||Math.abs(v[0].pts-E-_)<f/5)),n||(E=e*f),v.forEach((function(t){t.pts=A(t.pts-_,E),t.dts=A(t.dts-_,E)})),v.sort((function(t,e){var n=t.dts-e.dts,r=t.pts-e.pts;return n||r||t.id-e.id}));var w=v.reduce((function(t,e){return Math.max(Math.min(t,e.pts-e.dts),-18e3)}),0);if(w<0){s.b.warn("PTS < DTS detected in video samples, shifting DTS by "+Math.round(w/90)+" ms to overcome this issue");for(var S=0;S<v.length;S++)v[S].dts+=w}var k=v[0];y=Math.max(k.dts,0),g=Math.max(k.pts,0);var C=Math.round((y-E)/90);n&&C&&(C>1?s.b.log("AVC:"+C+" ms hole between fragments detected,filling it"):C<-1&&s.b.log("AVC:"+-C+" ms overlapping between fragments detected"),y=E,v[0].dts=y,g=Math.max(g-C,E),v[0].pts=g,s.b.log("Video/PTS/DTS adjusted: "+Math.round(g/90)+"/"+Math.round(y/90)+",delta:"+C+" ms")),k=v[v.length-1],c=Math.max(k.dts,0),l=Math.max(k.pts,0,c),T&&(h=Math.round((c-y)/(v.length-1)));for(var L=0,R=0,I=0;I<b;I++){for(var P=v[I],O=P.units,D=O.length,M=0,N=0;N<D;N++)M+=O[N].data.length;R+=M,L+=D,P.length=M,P.dts=T?y+I*h:Math.max(P.dts,y),P.pts=Math.max(P.pts,P.dts)}var U=R+4*L+8;try{p=new Uint8Array(U)}catch(t){return void this.observer.trigger(r.a.ERROR,{type:i.b.MUX_ERROR,details:i.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:U,reason:"fail allocating video mdat "+U})}var F=new DataView(p.buffer);F.setUint32(0,U),p.set(x.types.mdat,4);for(var B=0;B<b;B++){for(var j=v[B],K=j.units,V=0,G=void 0,H=0,Y=K.length;H<Y;H++){var z=K[H],$=z.data,W=z.data.byteLength;F.setUint32(d,W),d+=4,p.set($,d),d+=W,V+=4+W}if(T)G=Math.max(0,h*Math.round((j.pts-j.dts)/h));else{if(B<b-1)h=v[B+1].dts-j.dts;else{var q=this.config,X=j.dts-v[B>0?B-1:B].dts;if(q.stretchShortVideoTrack){var J=q.maxBufferHole,Q=Math.floor(J*f),Z=(a?g+a*f:this.nextAudioPts)-j.pts;Z>Q?((h=Z-X)<0&&(h=X),s.b.log("It is approximately "+Z/90+" ms to the next segment; using duration "+h/90+" ms for the last video frame.")):h=X}else h=X}G=Math.round(j.pts-j.dts)}m.push({size:V,duration:h,cts:G,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:j.key?2:1,isNonSync:j.key?0:1}})}this.nextAvcDts=c+h;var tt=t.dropped;if(t.len=0,t.nbNalu=0,t.dropped=0,m.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var et=m[0].flags;et.dependsOn=2,et.isNonSync=0}t.samples=m,u=x.moof(t.sequenceNumber++,y,t),t.samples=[];var nt={data1:u,data2:p,startPTS:g/f,endPTS:(l+h)/f,startDTS:y/f,endDTS:this.nextAvcDts/f,type:"video",hasAudio:!1,hasVideo:!0,nb:m.length,dropped:tt};return this.observer.trigger(r.a.FRAG_PARSING_DATA,nt),nt}},t.prototype.remuxAudio=function(t,e,n,a){var o=t.inputTimeScale,u=t.timescale,l=o/u,c=(t.isAAC?1024:1152)*l,d=this._PTSNormalize,f=this._initDTS,h=!t.isAAC&&this.typeSupported.mpeg,p=void 0,g=void 0,y=void 0,v=void 0,m=void 0,b=void 0,A=void 0,_=t.samples,E=[],T=this.nextAudioPts;if(n|=_.length&&T&&(a&&Math.abs(e-T/o)<.1||Math.abs(_[0].pts-T-f)<20*c),_.forEach((function(t){t.pts=t.dts=d(t.pts-f,e*o)})),0!==(_=_.filter((function(t){return t.pts>=0}))).length){if(n||(T=a?e*o:_[0].pts),t.isAAC)for(var w=this.config.maxAudioFramesDrift,S=0,k=T;S<_.length;){var L,R=_[S];L=R.pts-k;var I=Math.abs(1e3*L/o);if(L<=-w*c)s.b.warn("Dropping 1 audio frame @ "+(k/o).toFixed(3)+"s due to "+Math.round(I)+" ms overlap."),_.splice(S,1),t.len-=R.unit.length;else if(L>=w*c&&I<1e4&&k){var P=Math.round(L/c);s.b.warn("Injecting "+P+" audio frame @ "+(k/o).toFixed(3)+"s due to "+Math.round(1e3*L/o)+" ms gap.");for(var O=0;O<P;O++){var D=Math.max(k,0);(y=C.getSilentFrame(t.manifestCodec||t.codec,t.channelCount))||(s.b.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),y=R.unit.subarray()),_.splice(S,0,{unit:y,pts:D,dts:D}),t.len+=y.length,k+=c,S++}R.pts=R.dts=k,k+=c,S++}else Math.abs(L),R.pts=R.dts=k,k+=c,S++}for(var M=0,N=_.length;M<N;M++){var U=_[M],F=U.unit,B=U.pts;if(void 0!==A)g.duration=Math.round((B-A)/l);else{var j=Math.round(1e3*(B-T)/o),K=0;if(n&&t.isAAC&&j){if(j>0&&j<1e4)K=Math.round((B-T)/c),s.b.log(j+" ms hole between AAC samples detected,filling it"),K>0&&((y=C.getSilentFrame(t.manifestCodec||t.codec,t.channelCount))||(y=F.subarray()),t.len+=K*y.length);else if(j<-12){s.b.log("drop overlapping AAC sample, expected/parsed/delta:"+(T/o).toFixed(3)+"s/"+(B/o).toFixed(3)+"s/"+-j+"ms"),t.len-=F.byteLength;continue}B=T}if(b=B,!(t.len>0))return;var V=h?t.len:t.len+8;p=h?0:8;try{v=new Uint8Array(V)}catch(t){return void this.observer.trigger(r.a.ERROR,{type:i.b.MUX_ERROR,details:i.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:V,reason:"fail allocating audio mdat "+V})}h||(new DataView(v.buffer).setUint32(0,V),v.set(x.types.mdat,4));for(var G=0;G<K;G++)(y=C.getSilentFrame(t.manifestCodec||t.codec,t.channelCount))||(s.b.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),y=F.subarray()),v.set(y,p),p+=y.byteLength,g={size:y.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},E.push(g)}v.set(F,p);var H=F.byteLength;p+=H,g={size:H,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},E.push(g),A=B}var Y=0,z=E.length;if(z>=2&&(Y=E[z-2].duration,g.duration=Y),z){this.nextAudioPts=T=A+l*Y,t.len=0,t.samples=E,m=h?new Uint8Array:x.moof(t.sequenceNumber++,b/l,t),t.samples=[];var $=b/o,W=T/o,q={data1:m,data2:v,startPTS:$,endPTS:W,startDTS:$,endDTS:W,type:"audio",hasAudio:!0,hasVideo:!1,nb:z};return this.observer.trigger(r.a.FRAG_PARSING_DATA,q),q}return null}},t.prototype.remuxEmptyAudio=function(t,e,n,r){var i=t.inputTimeScale,a=i/(t.samplerate?t.samplerate:i),o=this.nextAudioPts,u=(void 0!==o?o:r.startDTS*i)+this._initDTS,l=r.endDTS*i+this._initDTS,c=1024*a,d=Math.ceil((l-u)/c),f=C.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(s.b.warn("remux empty Audio"),f){for(var h=[],p=0;p<d;p++){var g=u+p*c;h.push({unit:f,pts:g,dts:g}),t.len+=f.length}t.samples=h,this.remuxAudio(t,e,n)}else s.b.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!")},t.prototype.remuxID3=function(t,e){var n=t.samples.length,i=void 0,a=t.inputTimeScale,o=this._initPTS,s=this._initDTS;if(n){for(var u=0;u<n;u++)(i=t.samples[u]).pts=(i.pts-o)/a,i.dts=(i.dts-s)/a;this.observer.trigger(r.a.FRAG_PARSING_METADATA,{samples:t.samples})}t.samples=[],e=e},t.prototype.remuxText=function(t,e){t.samples.sort((function(t,e){return t.pts-e.pts}));var n=t.samples.length,i=void 0,a=t.inputTimeScale,o=this._initPTS;if(n){for(var s=0;s<n;s++)(i=t.samples[s]).pts=(i.pts-o)/a;this.observer.trigger(r.a.FRAG_PARSING_USERDATA,{samples:t.samples})}t.samples=[],e=e},t.prototype._PTSNormalize=function(t,e){var n=void 0;if(void 0===e)return t;for(n=e<t?-8589934592:8589934592;Math.abs(t-e)>4294967296;)t+=n;return t},t}(),I=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observer=e}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(){},t.prototype.resetInitSegment=function(){},t.prototype.remux=function(t,e,n,i,a,o,s,u){var l=this.observer,c="";t&&(c+="audio"),e&&(c+="video"),l.trigger(r.a.FRAG_PARSING_DATA,{data1:u,startPTS:a,startDTS:a,type:c,hasAudio:!!t,hasVideo:!!e,nb:1,dropped:0}),l.trigger(r.a.FRAG_PARSED)},t}(),P=Object(u.a)().performance,O=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observer=e,this.typeSupported=n,this.config=r,this.vendor=i}return t.prototype.destroy=function(){var t=this.demuxer;t&&t.destroy()},t.prototype.push=function(t,e,n,i,o,s,u,l,c,d,f,h){if(t.byteLength>0&&null!=e&&null!=e.key&&"AES-128"===e.method){var p=this.decrypter;null==p&&(p=this.decrypter=new a.a(this.observer,this.config));var g=this,y=void 0;try{y=P.now()}catch(t){y=Date.now()}p.decrypt(t,e.key.buffer,e.iv.buffer,(function(t){var a=void 0;try{a=P.now()}catch(t){a=Date.now()}g.observer.trigger(r.a.FRAG_DECRYPTED,{stats:{tstart:y,tdecrypt:a}}),g.pushDecrypted(new Uint8Array(t),e,new Uint8Array(n),i,o,s,u,l,c,d,f,h)}))}else this.pushDecrypted(new Uint8Array(t),e,new Uint8Array(n),i,o,s,u,l,c,d,f,h)},t.prototype.pushDecrypted=function(t,e,n,a,o,s,u,l,c,d,f,h){var p=this.demuxer;if(!p||(u||l)&&!this.probe(t)){for(var g=this.observer,y=this.typeSupported,v=this.config,A=[{demux:S,remux:R},{demux:b.a,remux:I},{demux:m,remux:R},{demux:k,remux:R}],_=0,E=A.length;_<E;_++){var T=A[_],w=T.demux.probe;if(w(t)){var C=this.remuxer=new T.remux(g,v,y,this.vendor);p=new T.demux(g,C,v,y),this.probe=w;break}}if(!p)return void g.trigger(r.a.ERROR,{type:i.b.MEDIA_ERROR,details:i.a.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});this.demuxer=p}var L=this.remuxer;(u||l)&&(p.resetInitSegment(n,a,o,d),L.resetInitSegment()),u&&(p.resetTimeStamp(h),L.resetTimeStamp(h)),"function"==typeof p.setDecryptData&&p.setDecryptData(e),p.append(t,s,c,f)},t}();e.a=O},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={};n.d(r,"newCue",(function(){return Ce}));var i=n(5),a=n.n(i),o=n(2),s=n(3),u=n(1),l=n(0),c="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};function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var f=new Set(["hlsEventGeneric","hlsHandlerDestroying","hlsHandlerDestroyed"]),h=function(){function t(e){d(this,t),this.hls=e,this.onEvent=this.onEvent.bind(this);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.handledEvents=r,this.useGenericHandler=!0,this.registerListeners()}return t.prototype.destroy=function(){this.onHandlerDestroying(),this.unregisterListeners(),this.onHandlerDestroyed()},t.prototype.onHandlerDestroying=function(){},t.prototype.onHandlerDestroyed=function(){},t.prototype.isEventHandler=function(){return"object"===c(this.handledEvents)&&this.handledEvents.length&&"function"==typeof this.onEvent},t.prototype.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(t){if(f.has(t))throw new Error("Forbidden event-name: "+t);this.hls.on(t,this.onEvent)}),this)},t.prototype.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(t){this.hls.off(t,this.onEvent)}),this)},t.prototype.onEvent=function(t,e){this.onEventGeneric(t,e)},t.prototype.onEventGeneric=function(t,e){try{(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)}).call(this,t,e).call()}catch(e){l.b.error("An internal error happened while handling event "+t+'. Error message: "'+e.message+'". Here is a stacktrace:',e),this.hls.trigger(u.a.ERROR,{type:o.b.OTHER_ERROR,details:o.a.INTERNAL_EXCEPTION,fatal:!1,event:t,err:e})}},t}(),p=n(9),g=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}}(),y=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.method=null,this.key=null,this.iv=null,this._uri=null}return g(t,[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=a.a.buildAbsoluteURL(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri}}]),t}(),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}}(),m=function(){function t(){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._url=null,this._byteRange=null,this._decryptdata=null,this.tagList=[],this.programDateTime=null,this.rawProgramDateTime=null,this._elementaryStreams=((e={})[t.ElementaryStreamTypes.AUDIO]=!1,e[t.ElementaryStreamTypes.VIDEO]=!1,e)}return t.prototype.addElementaryStream=function(t){this._elementaryStreams[t]=!0},t.prototype.hasElementaryStream=function(t){return!0===this._elementaryStreams[t]},t.prototype.createInitializationVector=function(t){for(var e=new Uint8Array(16),n=12;n<16;n++)e[n]=t>>8*(15-n)&255;return e},t.prototype.fragmentDecryptdataFromLevelkey=function(t,e){var n=t;return t&&t.method&&t.uri&&!t.iv&&((n=new y).method=t.method,n.baseuri=t.baseuri,n.reluri=t.reluri,n.iv=this.createInitializationVector(e)),n},v(t,[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=a.a.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(t){this._url=t}},{key:"byteRange",get:function(){if(!this._byteRange&&!this.rawByteRange)return[];if(this._byteRange)return this._byteRange;var t=[];if(this.rawByteRange){var e=this.rawByteRange.split("@",2);if(1===e.length){var n=this.lastByteRangeEndOffset;t[0]=n||0}else t[0]=parseInt(e[1]);t[1]=parseInt(e[0])+t[0],this._byteRange=t}return t}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){return this._decryptdata||(this._decryptdata=this.fragmentDecryptdataFromLevelkey(this.levelkey,this.sn)),this._decryptdata}},{key:"endProgramDateTime",get:function(){if(!Object(s.a)(this.programDateTime))return null;var t=Object(s.a)(this.duration)?this.duration:0;return this.programDateTime+1e3*t}},{key:"encrypted",get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)}}],[{key:"ElementaryStreamTypes",get:function(){return{AUDIO:"audio",VIDEO:"video"}}}]),t}(),b=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=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.endCC=0,this.endSN=0,this.fragments=[],this.initSegment=null,this.live=!0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=e,this.version=null}return b(t,[{key:"hasProgramDateTime",get:function(){return!(!this.fragments[0]||!Object(s.a)(this.fragments[0].programDateTime))}}]),t}(),_=/^(\d+)x(\d+)$/,E=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,T=function(){function t(e){for(var n in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"string"==typeof e&&(e=t.parseAttrList(e)),e)e.hasOwnProperty(n)&&(this[n]=e[n])}return t.prototype.decimalInteger=function(t){var e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e},t.prototype.hexadecimalInteger=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},t.prototype.hexadecimalIntegerAsNumber=function(t){var e=parseInt(this[t],16);return e>Number.MAX_SAFE_INTEGER?1/0:e},t.prototype.decimalFloatingPoint=function(t){return parseFloat(this[t])},t.prototype.enumeratedString=function(t){return this[t]},t.prototype.decimalResolution=function(t){var e=_.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e=void 0,n={};for(E.lastIndex=0;null!==(e=E.exec(t));){var r=e[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[e[1]]=r}return n},t}(),w={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function S(t,e){return window.MediaSource.isTypeSupported((e||"video")+'/mp4;codecs="'+t+'"')}var k=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,C=/#EXT-X-MEDIA:(.*)/g,L=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)(\S+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),x=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,R=/\.(mp4|m4s|m4v|m4a)$/i,I=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.findGroup=function(t,e){if(!t)return null;for(var n=null,r=0;r<t.length;r++){var i=t[r];i.id===e&&(n=i)}return n},t.convertAVC1ToAVCOTI=function(t){var e=void 0,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},t.resolve=function(t,e){return a.a.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,n){var r=[],i=void 0;function a(t,e){["video","audio"].forEach((function(n){var r=t.filter((function(t){return function(t,e){var n=w[e];return!!n&&!0===n[t.slice(0,4)]}(t,n)}));if(r.length){var i=r.filter((function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)}));e[n+"Codec"]=i.length>0?i[0]:r[0],t=t.filter((function(t){return-1===r.indexOf(t)}))}})),e.unknownCodecs=t}for(k.lastIndex=0;null!=(i=k.exec(e));){var o={},s=o.attrs=new T(i[1]);o.url=t.resolve(i[2],n);var u=s.decimalResolution("RESOLUTION");u&&(o.width=u.width,o.height=u.height),o.bitrate=s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),o.name=s.NAME,a([].concat((s.CODECS||"").split(/[ ,]+/)),o),o.videoCodec&&-1!==o.videoCodec.indexOf("avc1")&&(o.videoCodec=t.convertAVC1ToAVCOTI(o.videoCodec)),r.push(o)}return r},t.parseMasterPlaylistMedia=function(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=void 0,o=[],s=0;for(C.lastIndex=0;null!==(a=C.exec(e));){var u={},l=new T(a[1]);if(l.TYPE===r){if(u.groupId=l["GROUP-ID"],u.name=l.NAME,u.type=r,u.default="YES"===l.DEFAULT,u.autoselect="YES"===l.AUTOSELECT,u.forced="YES"===l.FORCED,l.URI&&(u.url=t.resolve(l.URI,n)),u.lang=l.LANGUAGE,u.name||(u.name=u.lang),i.length){var c=t.findGroup(i,u.groupId);u.audioCodec=c?c.codec:i[0].codec}u.id=s++,o.push(u)}}return o},t.parseLevelPlaylist=function(t,e,n,r,i){var a=0,o=0,u=new A(e),c=new y,d=0,f=null,h=new m,p=void 0,g=void 0,v=null;for(L.lastIndex=0;null!==(p=L.exec(t));){var b=p[1];if(b){h.duration=parseFloat(b);var _=(" "+p[2]).slice(1);h.title=_||null,h.tagList.push(_?["INF",b,_]:["INF",b])}else if(p[3]){if(Object(s.a)(h.duration)){var E=a++;h.type=r,h.start=o,h.levelkey=c,h.sn=E,h.level=n,h.cc=d,h.urlId=i,h.baseurl=e,h.relurl=(" "+p[3]).slice(1),P(h,f),u.fragments.push(h),f=h,o+=h.duration,h=new m}}else if(p[4]){if(h.rawByteRange=(" "+p[4]).slice(1),f){var w=f.byteRangeEndOffset;w&&(h.lastByteRangeEndOffset=w)}}else if(p[5])h.rawProgramDateTime=(" "+p[5]).slice(1),h.tagList.push(["PROGRAM-DATE-TIME",h.rawProgramDateTime]),null===v&&(v=u.fragments.length);else{for(p=p[0].match(x),g=1;g<p.length&&void 0===p[g];g++);var S=(" "+p[g+1]).slice(1),k=(" "+p[g+2]).slice(1);switch(p[g]){case"#":h.tagList.push(k?[S,k]:[S]);break;case"PLAYLIST-TYPE":u.type=S.toUpperCase();break;case"MEDIA-SEQUENCE":a=u.startSN=parseInt(S);break;case"TARGETDURATION":u.targetduration=parseFloat(S);break;case"VERSION":u.version=parseInt(S);break;case"EXTM3U":break;case"ENDLIST":u.live=!1;break;case"DIS":d++,h.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":d=parseInt(S);break;case"KEY":var C=new T(S),I=C.enumeratedString("METHOD"),O=C.URI,D=C.hexadecimalInteger("IV");I&&(c=new y,O&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(I)>=0&&(c.method=I,c.baseuri=e,c.reluri=O,c.key=null,c.iv=D));break;case"START":var M=new T(S).decimalFloatingPoint("TIME-OFFSET");Object(s.a)(M)&&(u.startTimeOffset=M);break;case"MAP":var N=new T(S);h.relurl=N.URI,h.rawByteRange=N.BYTERANGE,h.baseurl=e,h.level=n,h.type=r,h.sn="initSegment",u.initSegment=h,(h=new m).rawProgramDateTime=u.initSegment.rawProgramDateTime;break;default:l.b.warn("line parsed but not handled: "+p)}}}return(h=f)&&!h.relurl&&(u.fragments.pop(),o-=h.duration),u.totalduration=o,u.averagetargetduration=o/u.fragments.length,u.endSN=a-1,u.startCC=u.fragments[0]?u.fragments[0].cc:0,u.endCC=d,!u.initSegment&&u.fragments.length&&u.fragments.every((function(t){return R.test(t.relurl)}))&&(l.b.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(h=new m).relurl=u.fragments[0].relurl,h.baseurl=e,h.level=n,h.type=r,h.sn="initSegment",u.initSegment=h,u.needSidxRanges=!0),v&&function(t,e){for(var n=t[e],r=e-1;r>=0;r--){var i=t[r];i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}(u.fragments,v),u},t}();function P(t,e){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):e&&e.programDateTime&&(t.programDateTime=e.endProgramDateTime),Object(s.a)(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}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}}(),D=window.performance,M={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},N={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"},U=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,t.call(this,n,u.a.MANIFEST_LOADING,u.a.LEVEL_LOADING,u.a.AUDIO_TRACK_LOADING,u.a.SUBTITLE_TRACK_LOADING));return r.loaders={},r}return function(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)}(e,t),e.canHaveQualityLevels=function(t){return t!==M.AUDIO_TRACK&&t!==M.SUBTITLE_TRACK},e.mapContextToLevelType=function(t){switch(t.type){case M.AUDIO_TRACK:return N.AUDIO;case M.SUBTITLE_TRACK:return N.SUBTITLE;default:return N.MAIN}},e.getResponseUrl=function(t,e){var n=t.url;return void 0!==n&&0!==n.indexOf("data:")||(n=e.url),n},e.prototype.createInternalLoader=function(t){var e=this.hls.config,n=e.pLoader,r=e.loader,i=new(n||r)(e);return t.loader=i,this.loaders[t.type]=i,i},e.prototype.getInternalLoader=function(t){return this.loaders[t.type]},e.prototype.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},e.prototype.destroyInternalLoaders=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy(),this.resetInternalLoader(t)}},e.prototype.destroy=function(){this.destroyInternalLoaders(),t.prototype.destroy.call(this)},e.prototype.onManifestLoading=function(t){this.load(t.url,{type:M.MANIFEST,level:0,id:null})},e.prototype.onLevelLoading=function(t){this.load(t.url,{type:M.LEVEL,level:t.level,id:t.id})},e.prototype.onAudioTrackLoading=function(t){this.load(t.url,{type:M.AUDIO_TRACK,level:null,id:t.id})},e.prototype.onSubtitleTrackLoading=function(t){this.load(t.url,{type:M.SUBTITLE_TRACK,level:null,id:t.id})},e.prototype.load=function(t,e){var n=this.hls.config;l.b.debug("Loading playlist of type "+e.type+", level: "+e.level+", id: "+e.id);var r=this.getInternalLoader(e);if(r){var i=r.context;if(i&&i.url===t)return l.b.trace("playlist request ongoing"),!1;l.b.warn("aborting previous loader for type: "+e.type),r.abort()}var a=void 0,o=void 0,s=void 0,u=void 0;switch(e.type){case M.MANIFEST:a=n.manifestLoadingMaxRetry,o=n.manifestLoadingTimeOut,s=n.manifestLoadingRetryDelay,u=n.manifestLoadingMaxRetryTimeout;break;case M.LEVEL:a=0,o=n.levelLoadingTimeOut;break;default:a=n.levelLoadingMaxRetry,o=n.levelLoadingTimeOut,s=n.levelLoadingRetryDelay,u=n.levelLoadingMaxRetryTimeout}r=this.createInternalLoader(e),e.url=t,e.responseType=e.responseType||"";var c={timeout:o,maxRetry:a,retryDelay:s,maxRetryDelay:u},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return l.b.debug("Calling internal loader delegate for URL: "+t),r.load(e,c,d),!0},e.prototype.loadsuccess=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(n.isSidxRequest)return this._handleSidxRequest(t,n),void this._handlePlaylistLoaded(t,e,n,r);this.resetInternalLoader(n.type);var i=t.data;e.tload=D.now(),0===i.indexOf("#EXTM3U")?i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(t,e,n,r):this._handleMasterPlaylist(t,e,n,r):this._handleManifestParsingError(t,n,"no EXTM3U delimiter",r)},e.prototype.loaderror=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._handleNetworkError(e,n)},e.prototype.loadtimeout=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._handleNetworkError(e,n,!0)},e.prototype._handleMasterPlaylist=function(t,n,r,i){var a=this.hls,o=t.data,s=e.getResponseUrl(t,r),c=I.parseMasterPlaylist(o,s);if(c.length){var d=c.map((function(t){return{id:t.attrs.AUDIO,codec:t.audioCodec}})),f=I.parseMasterPlaylistMedia(o,s,"AUDIO",d),h=I.parseMasterPlaylistMedia(o,s,"SUBTITLES");if(f.length){var p=!1;f.forEach((function(t){t.url||(p=!0)})),!1===p&&c[0].audioCodec&&!c[0].attrs.AUDIO&&(l.b.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main"}))}a.trigger(u.a.MANIFEST_LOADED,{levels:c,audioTracks:f,subtitles:h,url:s,stats:n,networkDetails:i})}else this._handleManifestParsingError(t,r,"no level found in manifest",i)},e.prototype._handleTrackOrLevelPlaylist=function(t,n,r,i){var a=this.hls,o=r.id,l=r.level,c=r.type,d=e.getResponseUrl(t,r),f=Object(s.a)(o)?o:0,h=Object(s.a)(l)?l:f,p=e.mapContextToLevelType(r),g=I.parseLevelPlaylist(t.data,d,h,p,f);if(g.tload=n.tload,c===M.MANIFEST){var y={url:d,details:g};a.trigger(u.a.MANIFEST_LOADED,{levels:[y],audioTracks:[],url:d,stats:n,networkDetails:i})}if(n.tparsed=D.now(),g.needSidxRanges){var v=g.initSegment.url;this.load(v,{isSidxRequest:!0,type:c,level:l,levelDetails:g,id:o,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}else r.levelDetails=g,this._handlePlaylistLoaded(t,n,r,i)},e.prototype._handleSidxRequest=function(t,e){var n=p.a.parseSegmentIndex(new Uint8Array(t.data));n.references.forEach((function(t,n){var r=t.info,i=e.levelDetails.fragments[n];0===i.byteRange.length&&(i.rawByteRange=String(1+r.end-r.start)+"@"+String(r.start))})),e.levelDetails.initSegment.rawByteRange=String(n.moovEndOffset)+"@0"},e.prototype._handleManifestParsingError=function(t,e,n,r){this.hls.trigger(u.a.ERROR,{type:o.b.NETWORK_ERROR,details:o.a.MANIFEST_PARSING_ERROR,fatal:!0,url:t.url,reason:n,networkDetails:r})},e.prototype._handleNetworkError=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];l.b.info("A network error occured while loading a "+t.type+"-type playlist");var r=void 0,i=void 0,a=this.getInternalLoader(t);switch(t.type){case M.MANIFEST:r=n?o.a.MANIFEST_LOAD_TIMEOUT:o.a.MANIFEST_LOAD_ERROR,i=!0;break;case M.LEVEL:r=n?o.a.LEVEL_LOAD_TIMEOUT:o.a.LEVEL_LOAD_ERROR,i=!1;break;case M.AUDIO_TRACK:r=n?o.a.AUDIO_TRACK_LOAD_TIMEOUT:o.a.AUDIO_TRACK_LOAD_ERROR,i=!1;break;default:i=!1}a&&(a.abort(),this.resetInternalLoader(t.type)),this.hls.trigger(u.a.ERROR,{type:o.b.NETWORK_ERROR,details:r,fatal:i,url:a.url,loader:a,context:t,networkDetails:e})},e.prototype._handlePlaylistLoaded=function(t,n,r,i){var a=r.type,o=r.level,s=r.id,l=r.levelDetails;if(l.targetduration)if(e.canHaveQualityLevels(r.type))this.hls.trigger(u.a.LEVEL_LOADED,{details:l,level:o||0,id:s||0,stats:n,networkDetails:i});else switch(a){case M.AUDIO_TRACK:this.hls.trigger(u.a.AUDIO_TRACK_LOADED,{details:l,id:s,stats:n,networkDetails:i});break;case M.SUBTITLE_TRACK:this.hls.trigger(u.a.SUBTITLE_TRACK_LOADED,{details:l,id:s,stats:n,networkDetails:i})}else this._handleManifestParsingError(t,r,"invalid target duration",i)},O(e,null,[{key:"ContextType",get:function(){return M}},{key:"LevelType",get:function(){return N}}]),e}(h),F=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,t.call(this,n,u.a.FRAG_LOADING));return r.loaders={},r}return function(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)}(e,t),e.prototype.destroy=function(){var e=this.loaders;for(var n in e){var r=e[n];r&&r.destroy()}this.loaders={},t.prototype.destroy.call(this)},e.prototype.onFragLoading=function(t){var e=t.frag,n=e.type,r=this.loaders,i=this.hls.config,a=i.fLoader,o=i.loader;e.loaded=0;var u=r[n];u&&(l.b.warn("abort previous fragment loader for type: "+n),u.abort()),u=r[n]=e.loader=i.fLoader?new a(i):new o(i);var c,d,f=void 0;f={url:e.url,frag:e,responseType:"arraybuffer",progressData:!1};var h=e.byteRangeStartOffset,p=e.byteRangeEndOffset;Object(s.a)(h)&&Object(s.a)(p)&&(f.rangeStart=h,f.rangeEnd=p),c={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:i.fragLoadingMaxRetryTimeout},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},u.load(f,c,d)},e.prototype.loadsuccess=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=t.data,a=n.frag;a.loader=void 0,this.loaders[a.type]=void 0,this.hls.trigger(u.a.FRAG_LOADED,{payload:i,frag:a,stats:e,networkDetails:r})},e.prototype.loaderror=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=e.frag,i=r.loader;i&&i.abort(),this.loaders[r.type]=void 0,this.hls.trigger(u.a.ERROR,{type:o.b.NETWORK_ERROR,details:o.a.FRAG_LOAD_ERROR,fatal:!1,frag:e.frag,response:t,networkDetails:n})},e.prototype.loadtimeout=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=e.frag,i=r.loader;i&&i.abort(),this.loaders[r.type]=void 0,this.hls.trigger(u.a.ERROR,{type:o.b.NETWORK_ERROR,details:o.a.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e.frag,networkDetails:n})},e.prototype.loadprogress=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=e.frag;i.loaded=t.loaded,this.hls.trigger(u.a.FRAG_LOAD_PROGRESS,{frag:i,stats:t,networkDetails:r})},e}(h),B=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,t.call(this,n,u.a.KEY_LOADING));return r.loaders={},r.decryptkey=null,r.decrypturl=null,r}return function(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)}(e,t),e.prototype.destroy=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={},h.prototype.destroy.call(this)},e.prototype.onKeyLoading=function(t){var e=t.frag,n=e.type,r=this.loaders[n],i=e.decryptdata,a=i.uri;if(a!==this.decrypturl||null===this.decryptkey){var o,s,c,d=this.hls.config;r&&(l.b.warn("abort previous key loader for type:"+n),r.abort()),e.loader=this.loaders[n]=new d.loader(d),this.decrypturl=a,this.decryptkey=null,o={url:a,frag:e,responseType:"arraybuffer"},s={timeout:d.fragLoadingTimeOut,maxRetry:d.fragLoadingMaxRetry,retryDelay:d.fragLoadingRetryDelay,maxRetryDelay:d.fragLoadingMaxRetryTimeout},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},e.loader.load(o,s,c)}else this.decryptkey&&(i.key=this.decryptkey,this.hls.trigger(u.a.KEY_LOADED,{frag:e}))},e.prototype.loadsuccess=function(t,e,n){var r=n.frag;this.decryptkey=r.decryptdata.key=new Uint8Array(t.data),r.loader=void 0,this.loaders[r.type]=void 0,this.hls.trigger(u.a.KEY_LOADED,{frag:r})},e.prototype.loaderror=function(t,e){var n=e.frag,r=n.loader;r&&r.abort(),this.loaders[e.type]=void 0,this.hls.trigger(u.a.ERROR,{type:o.b.NETWORK_ERROR,details:o.a.KEY_LOAD_ERROR,fatal:!1,frag:n,response:t})},e.prototype.loadtimeout=function(t,e){var n=e.frag,r=n.loader;r&&r.abort(),this.loaders[e.type]=void 0,this.hls.trigger(u.a.ERROR,{type:o.b.NETWORK_ERROR,details:o.a.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},e}(h),j="NOT_LOADED",K="APPENDING",V="PARTIAL",G="OK",H=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,t.call(this,n,u.a.BUFFER_APPENDED,u.a.FRAG_BUFFERED,u.a.FRAG_LOADED));return r.bufferPadding=.2,r.fragments=Object.create(null),r.timeRanges=Object.create(null),r.config=n.config,r}return function(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)}(e,t),e.prototype.destroy=function(){this.fragments=null,this.timeRanges=null,this.config=null,h.prototype.destroy.call(this),t.prototype.destroy.call(this)},e.prototype.getBufferedFrag=function(t,e){var n=this.fragments,r=Object.keys(n).filter((function(r){var i=n[r];if(i.body.type!==e)return!1;if(!i.buffered)return!1;var a=i.body;return a.startPTS<=t&&t<=a.endPTS}));if(0===r.length)return null;var i=r.pop();return n[i].body},e.prototype.detectEvictedFragments=function(t,e){var n=this,r=void 0,i=void 0;Object.keys(this.fragments).forEach((function(a){var o=n.fragments[a];if(!0===o.buffered){var s=o.range[t];if(s){r=s.time;for(var u=0;u<r.length;u++)if(i=r[u],!1===n.isTimeBuffered(i.startPTS,i.endPTS,e)){n.removeFragment(o.body);break}}}}))},e.prototype.detectPartialFragments=function(t){var e=this,n=this.getFragmentKey(t),r=this.fragments[n];r&&(r.buffered=!0,Object.keys(this.timeRanges).forEach((function(n){if(t.hasElementaryStream(n)){var i=e.timeRanges[n];r.range[n]=e.getBufferedTimes(t.startPTS,t.endPTS,i)}})))},e.prototype.getBufferedTimes=function(t,e,n){for(var r=[],i=void 0,a=void 0,o=!1,s=0;s<n.length;s++){if(i=n.start(s)-this.bufferPadding,a=n.end(s)+this.bufferPadding,t>=i&&e<=a){r.push({startPTS:Math.max(t,n.start(s)),endPTS:Math.min(e,n.end(s))});break}if(t<a&&e>i)r.push({startPTS:Math.max(t,n.start(s)),endPTS:Math.min(e,n.end(s))}),o=!0;else if(e<=i)break}return{time:r,partial:o}},e.prototype.getFragmentKey=function(t){return t.type+"_"+t.level+"_"+t.urlId+"_"+t.sn},e.prototype.getPartialFragment=function(t){var e=this,n=void 0,r=void 0,i=void 0,a=null,o=0;return Object.keys(this.fragments).forEach((function(s){var u=e.fragments[s];e.isPartial(u)&&(r=u.body.startPTS-e.bufferPadding,i=u.body.endPTS+e.bufferPadding,t>=r&&t<=i&&(n=Math.min(t-r,i-t),o<=n&&(a=u.body,o=n)))})),a},e.prototype.getState=function(t){var e=this.getFragmentKey(t),n=this.fragments[e],r=j;return void 0!==n&&(r=n.buffered?!0===this.isPartial(n)?V:G:K),r},e.prototype.isPartial=function(t){return!0===t.buffered&&(void 0!==t.range.video&&!0===t.range.video.partial||void 0!==t.range.audio&&!0===t.range.audio.partial)},e.prototype.isTimeBuffered=function(t,e,n){for(var r=void 0,i=void 0,a=0;a<n.length;a++){if(r=n.start(a)-this.bufferPadding,i=n.end(a)+this.bufferPadding,t>=r&&e<=i)return!0;if(e<=r)return!1}return!1},e.prototype.onFragLoaded=function(t){var e=t.frag;Object(s.a)(e.sn)&&!e.bitrateTest&&(this.fragments[this.getFragmentKey(e)]={body:e,range:Object.create(null),buffered:!1})},e.prototype.onBufferAppended=function(t){var e=this;this.timeRanges=t.timeRanges,Object.keys(this.timeRanges).forEach((function(t){var n=e.timeRanges[t];e.detectEvictedFragments(t,n)}))},e.prototype.onFragBuffered=function(t){this.detectPartialFragments(t.frag)},e.prototype.hasFragment=function(t){var e=this.getFragmentKey(t);return void 0!==this.fragments[e]},e.prototype.removeFragment=function(t){var e=this.getFragmentKey(t);delete this.fragments[e]},e.prototype.removeAllFragments=function(){this.fragments=Object.create(null)},e}(h),Y={search:function(t,e){for(var n=0,r=t.length-1,i=null,a=null;n<=r;){var o=e(a=t[i=(n+r)/2|0]);if(o>0)n=i+1;else{if(!(o<0))return a;r=i-1}}return null}},z=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.isBuffered=function(t,e){try{if(t)for(var n=t.buffered,r=0;r<n.length;r++)if(e>=n.start(r)&&e<=n.end(r))return!0}catch(t){}return!1},t.bufferInfo=function(t,e,n){try{if(t){var r=t.buffered,i=[],a=void 0;for(a=0;a<r.length;a++)i.push({start:r.start(a),end:r.end(a)});return this.bufferedInfo(i,e,n)}}catch(t){}return{len:0,start:e,end:e,nextStart:void 0}},t.bufferedInfo=function(t,e,n){var r=[],i=void 0,a=void 0,o=void 0,s=void 0,u=void 0;for(t.sort((function(t,e){var n=t.start-e.start;return n||e.end-t.end})),u=0;u<t.length;u++){var l=r.length;if(l){var c=r[l-1].end;t[u].start-c<n?t[u].end>c&&(r[l-1].end=t[u].end):r.push(t[u])}else r.push(t[u])}for(u=0,i=0,a=o=e;u<r.length;u++){var d=r[u].start,f=r[u].end;if(e+n>=d&&e<f)a=d,i=(o=f)-e;else if(e+n<d){s=d;break}}return{len:i,start:a,end:o,nextStart:s}},t}(),$=n(7),W=n.n($),q=n(12),X=n.n(q),J=n(10);function Q(){if("undefined"!=typeof window)return window.MediaSource||window.WebKitMediaSource}var Z=n(4),tt=Object(Z.a)(),et=Q(),nt=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.hls=e,this.id=n;var r=this.observer=new W.a,i=e.config;r.trigger=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];r.emit.apply(r,[t,t].concat(n))},r.off=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];r.removeListener.apply(r,[t].concat(n))};var a=function(t,n){(n=n||{}).frag=this.frag,n.id=this.id,e.trigger(t,n)}.bind(this);r.on(u.a.FRAG_DECRYPTED,a),r.on(u.a.FRAG_PARSING_INIT_SEGMENT,a),r.on(u.a.FRAG_PARSING_DATA,a),r.on(u.a.FRAG_PARSED,a),r.on(u.a.ERROR,a),r.on(u.a.FRAG_PARSING_METADATA,a),r.on(u.a.FRAG_PARSING_USERDATA,a),r.on(u.a.INIT_PTS_FOUND,a);var s={mp4:et.isTypeSupported("video/mp4"),mpeg:et.isTypeSupported("audio/mpeg"),mp3:et.isTypeSupported('audio/mp4; codecs="mp3"')},c=navigator.vendor;if(i.enableWorker&&"undefined"!=typeof Worker){l.b.log("demuxing in webworker");var d=void 0;try{d=this.w=X()(13),this.onwmsg=this.onWorkerMessage.bind(this),d.addEventListener("message",this.onwmsg),d.onerror=function(t){e.trigger(u.a.ERROR,{type:o.b.OTHER_ERROR,details:o.a.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:t.message+" ("+t.filename+":"+t.lineno+")"}})},d.postMessage({cmd:"init",typeSupported:s,vendor:c,id:n,config:JSON.stringify(i)})}catch(t){l.b.error("error while initializing DemuxerWorker, fallback on DemuxerInline"),d&&tt.URL.revokeObjectURL(d.objectURL),this.demuxer=new J.a(r,s,i,c),this.w=void 0}}else this.demuxer=new J.a(r,s,i,c)}return t.prototype.destroy=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.observer;n&&(n.removeAllListeners(),this.observer=null)},t.prototype.push=function(t,e,n,r,i,a,o,u){var c=this.w,d=Object(s.a)(i.startDTS)?i.startDTS:i.start,f=i.decryptdata,h=this.frag,p=!(h&&i.cc===h.cc),g=!(h&&i.level===h.level),y=h&&i.sn===h.sn+1,v=!g&&y;if(p&&l.b.log(this.id+":discontinuity detected"),g&&l.b.log(this.id+":switch detected"),this.frag=i,c)c.postMessage({cmd:"demux",data:t,decryptdata:f,initSegment:e,audioCodec:n,videoCodec:r,timeOffset:d,discontinuity:p,trackSwitch:g,contiguous:v,duration:a,accurateTimeOffset:o,defaultInitPTS:u},t instanceof ArrayBuffer?[t]:[]);else{var m=this.demuxer;m&&m.push(t,f,e,n,r,d,p,g,v,a,o,u)}},t.prototype.onWorkerMessage=function(t){var e=t.data,n=this.hls;switch(e.event){case"init":tt.URL.revokeObjectURL(this.w.objectURL);break;case u.a.FRAG_PARSING_DATA:e.data.data1=new Uint8Array(e.data1),e.data2&&(e.data.data2=new Uint8Array(e.data2));default:e.data=e.data||{},e.data.frag=this.frag,e.data.id=this.id,n.trigger(e.event,e.data)}},t}();function rt(t,e,n){switch(e){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(n);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(n)}}function it(t,e,n){var r=t[e],i=t[n],a=i.startPTS;Object(s.a)(a)?n>e?(r.duration=a-r.start,r.duration<0&&l.b.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&&l.b.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):i.start=n>e?r.start+r.duration:Math.max(r.start-i.duration,0)}function at(t,e,n,r,i,a){var o=n;if(Object(s.a)(e.startPTS)){var u=Math.abs(e.startPTS-n);Object(s.a)(e.deltaPTS)?e.deltaPTS=Math.max(u,e.deltaPTS):e.deltaPTS=u,o=Math.max(n,e.startPTS),n=Math.min(n,e.startPTS),r=Math.max(r,e.endPTS),i=Math.min(i,e.startDTS),a=Math.max(a,e.endDTS)}var l=n-e.start;e.start=e.startPTS=n,e.maxStartPTS=o,e.endPTS=r,e.startDTS=i,e.endDTS=a,e.duration=r-n;var c=e.sn;if(!t||c<t.startSN||c>t.endSN)return 0;var d,f=void 0,h=void 0;for(d=c-t.startSN,(f=t.fragments)[d]=e,h=d;h>0;h--)it(f,h,h-1);for(h=d;h<f.length-1;h++)it(f,h,h+1);return t.PTSKnown=!0,l}function ot(t,e){var n=Math.max(t.startSN,e.startSN)-e.startSN,r=Math.min(t.endSN,e.endSN)-e.startSN,i=e.startSN-t.startSN,a=t.fragments,o=e.fragments,u=0,c=void 0;if(e.initSegment&&t.initSegment&&(e.initSegment=t.initSegment),r<n)e.PTSKnown=!1;else{for(var d=n;d<=r;d++){var f=a[i+d],h=o[d];h&&f&&(u=f.cc-h.cc,Object(s.a)(f.startPTS)&&(h.start=h.startPTS=f.startPTS,h.endPTS=f.endPTS,h.duration=f.duration,h.backtracked=f.backtracked,h.dropped=f.dropped,c=h))}if(u)for(l.b.log("discontinuity sliding from playlist, take drift into account"),d=0;d<o.length;d++)o[d].cc+=u;if(c)at(e,c,c.startPTS,c.endPTS,c.startDTS,c.endDTS);else if(i>=0&&i<a.length){var p=a[i].start;for(d=0;d<o.length;d++)o[d].start+=p}e.PTSKnown=t.PTSKnown}}var st={toString: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}};function ut(t,e){e.fragments.forEach((function(e){if(e){var n=e.start+t;e.start=e.startPTS=n,e.endPTS=n+e.duration}})),e.PTSKnown=!0}function lt(t,e,n){!function(t,e,n){if(function(t,e,n){var r=!1;return e&&e.details&&n&&(n.endCC>n.startCC||t&&t.cc<n.startCC)&&(r=!0),r}(t,n,e)){var r=function(t,e){var n=t.fragments,r=e.fragments;if(r.length&&n.length){var i=function(t,e){for(var n=null,r=0;r<t.length;r+=1){var i=t[r];if(i&&i.cc===e){n=i;break}}return n}(n,r[0].cc);if(i&&(!i||i.startPTS))return i;l.b.log("No frag in previous level to align on")}else l.b.log("No fragments to align")}(n.details,e);r&&(l.b.log("Adjusting PTS using last level due to CC increase within current level"),ut(r.start,e))}}(t,n,e),!n.PTSKnown&&e&&function(t,e){if(e&&e.fragments.length){if(!t.hasProgramDateTime||!e.hasProgramDateTime)return;var n=e.fragments[0].programDateTime,r=(t.fragments[0].programDateTime-n)/1e3+e.fragments[0].start;Object(s.a)(r)&&(l.b.log("adjusting PTS using programDateTime delta, sliding:"+r.toFixed(3)),ut(r,t))}}(n,e.details)}function ct(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dt(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}var ft=function(t){function e(n){ct(this,e);for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];var o=dt(this,t.call.apply(t,[this,n].concat(i)));return o._tickInterval=null,o._tickTimer=null,o._tickCallCount=0,o._boundTick=o.tick.bind(o),o}return function(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)}(e,t),e.prototype.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},e.prototype.hasInterval=function(){return!!this._tickInterval},e.prototype.hasNextTick=function(){return!!this._tickTimer},e.prototype.setInterval=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){return!this._tickInterval&&(this._tickInterval=setInterval(this._boundTick,t),!0)})),e.prototype.clearInterval=function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(){return!!this._tickInterval&&(clearInterval(this._tickInterval),this._tickInterval=null,!0)})),e.prototype.clearNextTick=function(){return!!this._tickTimer&&(clearTimeout(this._tickTimer),this._tickTimer=null,!0)},e.prototype.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&(this.clearNextTick(),this._tickTimer=setTimeout(this._boundTick,0)),this._tickCallCount=0)},e.prototype.doTick=function(){},e}(h);function ht(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments[2],r=Math.min(e,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-r<=t?1:n.start-r>t&&n.start?-1:0}function pt(t,e,n){var r=1e3*Math.min(e,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.endProgramDateTime-r>t}var gt=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.config=e,this.media=n,this.fragmentTracker=r,this.hls=i,this.stallReported=!1}return t.prototype.poll=function(t,e){var n=this.config,r=this.media,i=r.currentTime,a=window.performance.now();if(i!==t)return this.stallReported&&(l.b.warn("playback not stuck anymore @"+i+", after "+Math.round(a-this.stalled)+"ms"),this.stallReported=!1),this.stalled=null,void(this.nudgeRetry=0);if(!(r.ended||!r.buffered.length||r.readyState>2||r.seeking&&z.isBuffered(r,i))){var o=a-this.stalled,s=z.bufferInfo(r,i,n.maxBufferHole);this.stalled?(o>=1e3&&this._reportStall(s.len),this._tryFixBufferStall(s,o)):this.stalled=a}},t.prototype._tryFixBufferStall=function(t,e){var n=this.config,r=this.fragmentTracker,i=this.media.currentTime,a=r.getPartialFragment(i);a&&this._trySkipBufferHole(a),t.len>.5&&e>1e3*n.highBufferWatchdogPeriod&&(this.stalled=null,this._tryNudgeBuffer())},t.prototype._reportStall=function(t){var e=this.hls,n=this.media;this.stallReported||(this.stallReported=!0,l.b.warn("Playback stalling at @"+n.currentTime+" due to low buffer"),e.trigger(u.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},t.prototype._trySkipBufferHole=function(t){for(var e=this.hls,n=this.media,r=n.currentTime,i=0,a=0;a<n.buffered.length;a++){var s=n.buffered.start(a);if(r>=i&&r<s)return n.currentTime=Math.max(s,n.currentTime+.1),l.b.warn("skipping hole, adjusting currentTime from "+r+" to "+n.currentTime),this.stalled=null,void e.trigger(u.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+r+" to "+n.currentTime,frag:t});i=n.buffered.end(a)}},t.prototype._tryNudgeBuffer=function(){var t=this.config,e=this.hls,n=this.media,r=n.currentTime,i=(this.nudgeRetry||0)+1;if(this.nudgeRetry=i,i<t.nudgeMaxRetry){var a=r+i*t.nudgeOffset;l.b.log("adjust currentTime from "+r+" to "+a),n.currentTime=a,e.trigger(u.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_NUDGE_ON_STALL,fatal:!1})}else l.b.error("still stuck in high buffer @"+r+" after "+t.nudgeMaxRetry+", raise fatal error"),e.trigger(u.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_STALLED_ERROR,fatal:!0})},t}(),yt=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}}(),vt="STOPPED",mt="IDLE",bt="KEY_LOADING",At="FRAG_LOADING",_t="FRAG_LOADING_WAITING_RETRY",Et="WAITING_LEVEL",Tt="PARSING",wt="PARSED",St="BUFFER_FLUSHING",kt="ENDED",Ct="ERROR",Lt=function(t){function e(n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(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}(this,t.call(this,n,u.a.MEDIA_ATTACHED,u.a.MEDIA_DETACHING,u.a.MANIFEST_LOADING,u.a.MANIFEST_PARSED,u.a.LEVEL_LOADED,u.a.KEY_LOADED,u.a.FRAG_LOADED,u.a.FRAG_LOAD_EMERGENCY_ABORTED,u.a.FRAG_PARSING_INIT_SEGMENT,u.a.FRAG_PARSING_DATA,u.a.FRAG_PARSED,u.a.ERROR,u.a.AUDIO_TRACK_SWITCHING,u.a.AUDIO_TRACK_SWITCHED,u.a.BUFFER_CREATED,u.a.BUFFER_APPENDED,u.a.BUFFER_FLUSHED));return i.fragmentTracker=r,i.config=n.config,i.audioCodecSwap=!1,i._state=vt,i.stallReported=!1,i.gapController=null,i}return function(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)}(e,t),e.prototype.onHandlerDestroying=function(){this.stopLoad(),t.prototype.onHandlerDestroying.call(this)},e.prototype.onHandlerDestroyed=function(){this.state=vt,this.fragmentTracker=null,t.prototype.onHandlerDestroyed.call(this)},e.prototype.startLoad=function(t){if(this.levels){var e=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var r=n.startLevel;-1===r&&(r=0,this.bitrateTest=!0),this.level=n.nextLoadLevel=r,this.loadedmetadata=!1}e>0&&-1===t&&(l.b.log("override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=mt,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this.forceStartLoad=!0,this.state=vt},e.prototype.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragmentTracker.removeFragment(t),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.clearInterval(),this.state=vt,this.forceStartLoad=!1},e.prototype.doTick=function(){switch(this.state){case St:this.fragLoadError=0;break;case mt:this._doTickIdle();break;case Et:var t=this.levels[this.level];t&&t.details&&(this.state=mt);break;case _t:var e=window.performance.now(),n=this.retryDate;(!n||e>=n||this.media&&this.media.seeking)&&(l.b.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=mt)}this._checkBuffer(),this._checkFragmentChanged()},e.prototype._doTickIdle=function(){var t=this.hls,e=t.config,n=this.media;if(void 0!==this.levelLastLoaded&&(n||!this.startFragRequested&&e.startFragPrefetch)){var r=void 0;r=this.loadedmetadata?n.currentTime:this.nextLoadPosition;var i=t.nextLoadLevel,a=this.levels[i];if(a){var o=a.bitrate,s=void 0;s=o?Math.max(8*e.maxBufferSize/o,e.maxBufferLength):e.maxBufferLength,s=Math.min(s,e.maxMaxBufferLength);var c=z.bufferInfo(this.mediaBuffer?this.mediaBuffer:n,r,e.maxBufferHole),d=c.len;if(!(d>=s)){l.b.trace("buffer length of "+d.toFixed(3)+" is below max of "+s.toFixed(3)+". checking for more payload ..."),this.level=t.nextLoadLevel=i;var f=a.details;if(!f||f.live&&this.levelLastLoaded!==i)this.state=Et;else{var h=this.fragPrevious;if(!f.live&&h&&!h.backtracked&&h.sn===f.endSN&&!c.nextStart&&Math.min(n.duration,h.start+h.duration)-Math.max(c.end,h.start)<=Math.max(.2,h.duration)){var p={};return this.altAudio&&(p.type="video"),this.hls.trigger(u.a.BUFFER_EOS,p),void(this.state=kt)}this._fetchPayloadOrEos(r,c,f)}}}}},e.prototype._fetchPayloadOrEos=function(t,e,n){var r=this.fragPrevious,i=this.level,a=n.fragments,o=a.length;if(0!==o){var s=a[0].start,u=a[o-1].start+a[o-1].duration,c=e.end,d=void 0;if(n.initSegment&&!n.initSegment.data)d=n.initSegment;else if(n.live){var f=this.config.initialLiveManifestSize;if(o<f)return void l.b.warn("Can not start playback of a level, reason: not enough fragments "+o+" < "+f);if(null===(d=this._ensureFragmentAtLivePoint(n,c,s,u,r,a,o)))return}else c<s&&(d=a[0]);d||(d=this._findFragment(s,r,o,a,c,u,n)),d&&(d.encrypted?(l.b.log("Loading key for "+d.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+i),this._loadKey(d)):(l.b.log("Loading "+d.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+i+", currentTime:"+t.toFixed(3)+",bufferEnd:"+c.toFixed(3)),this._loadFragment(d)))}},e.prototype._ensureFragmentAtLivePoint=function(t,e,n,r,i,a,o){var u=this.hls.config,c=this.media,d=void 0,f=void 0!==u.liveMaxLatencyDuration?u.liveMaxLatencyDuration:u.liveMaxLatencyDurationCount*t.targetduration;if(e<Math.max(n-u.maxFragLookUpTolerance,r-f)){var h=this.liveSyncPosition=this.computeLivePosition(n,t);l.b.log("buffer end: "+e.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+h.toFixed(3)),e=h,c&&c.readyState&&c.duration>h&&(c.currentTime=h),this.nextLoadPosition=h}if(t.PTSKnown&&e>r&&c&&c.readyState)return null;if(this.startFragRequested&&!t.PTSKnown){if(i)if(t.hasProgramDateTime)l.b.log("live playlist, switching playlist, load frag with same PDT: "+i.programDateTime),d=function(t,e,n){if(!Array.isArray(t)||!t.length||!Object(s.a)(e))return null;if(e<t[0].programDateTime)return null;if(e>=t[t.length-1].endProgramDateTime)return null;n=n||0;for(var r=0;r<t.length;++r){var i=t[r];if(pt(e,n,i))return i}return null}(a,i.endProgramDateTime,u.maxFragLookUpTolerance);else{var p=i.sn+1;if(p>=t.startSN&&p<=t.endSN){var g=a[p-t.startSN];i.cc===g.cc&&(d=g,l.b.log("live playlist, switching playlist, load frag with next SN: "+d.sn))}d||(d=Y.search(a,(function(t){return i.cc-t.cc})))&&l.b.log("live playlist, switching playlist, load frag with same CC: "+d.sn)}d||(d=a[Math.min(o-1,Math.round(o/2))],l.b.log("live playlist, switching playlist, unknown, load middle frag : "+d.sn))}return d},e.prototype._findFragment=function(t,e,n,r,i,a,o){var s=this.hls.config,u=void 0;if(u=i<a?function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=t?e[t.sn-e[0].sn+1]:null;return i&&!ht(n,r,i)?i:Y.search(e,ht.bind(null,n,r))}(e,r,i,i>a-s.maxFragLookUpTolerance?0:s.maxFragLookUpTolerance):r[n-1]){var c=u.sn-o.startSN,d=e&&u.level===e.level,f=r[c-1],h=r[c+1];if(e&&u.sn===e.sn)if(d&&!u.backtracked)if(u.sn<o.endSN){var p=e.deltaPTS;p&&p>s.maxBufferHole&&e.dropped&&c?(u=f,l.b.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")):(u=h,l.b.log("SN just loaded, load next one: "+u.sn,u))}else u=null;else u.backtracked&&(h&&h.backtracked?(l.b.warn("Already backtracked from fragment "+h.sn+", will not backtrack to fragment "+u.sn+". Loading fragment "+h.sn),u=h):(l.b.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),u.dropped=0,f?(u=f).backtracked=!0:c&&(u=null)))}return u},e.prototype._loadKey=function(t){this.state=bt,this.hls.trigger(u.a.KEY_LOADING,{frag:t})},e.prototype._loadFragment=function(t){var e=this.fragmentTracker.getState(t);this.fragCurrent=t,this.startFragRequested=!0,Object(s.a)(t.sn)&&!t.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),t.backtracked||e===j||e===V?(t.autoLevel=this.hls.autoLevelEnabled,t.bitrateTest=this.bitrateTest,this.hls.trigger(u.a.FRAG_LOADING,{frag:t}),this.demuxer||(this.demuxer=new nt(this.hls,"main")),this.state=At):e===K&&this._reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t)},e.prototype.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,U.LevelType.MAIN)},e.prototype.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.endPTS+.5):null},e.prototype._checkFragmentChanged=function(){var t=void 0,e=void 0,n=this.media;if(n&&n.readyState&&!1===n.seeking&&((e=n.currentTime)>this.lastCurrentTime&&(this.lastCurrentTime=e),z.isBuffered(n,e)?t=this.getBufferedFrag(e):z.isBuffered(n,e+.1)&&(t=this.getBufferedFrag(e+.1)),t)){var r=t;if(r!==this.fragPlaying){this.hls.trigger(u.a.FRAG_CHANGED,{frag:r});var i=r.level;this.fragPlaying&&this.fragPlaying.level===i||this.hls.trigger(u.a.LEVEL_SWITCHED,{level:i}),this.fragPlaying=r}}},e.prototype.immediateLevelSwitch=function(){if(l.b.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.flushMainBuffer(0,Number.POSITIVE_INFINITY)},e.prototype.immediateLevelSwitchEnd=function(){var t=this.media;t&&t.buffered.length&&(this.immediateSwitch=!1,z.isBuffered(t,t.currentTime)&&(t.currentTime-=1e-4),this.previouslyPaused||t.play())},e.prototype.nextLevelSwitch=function(){var t=this.media;if(t&&t.readyState){var e,n=void 0,r=void 0;if((e=this.getBufferedFrag(t.currentTime))&&e.startPTS>1&&this.flushMainBuffer(0,e.startPTS-1),t.paused)n=0;else{var i=this.hls.nextLoadLevel,a=this.levels[i],o=this.fragLastKbps;n=o&&this.fragCurrent?this.fragCurrent.duration*a.bitrate/(1e3*o)+1:0}if((r=this.getBufferedFrag(t.currentTime+n))&&(r=this.followingBufferedFrag(r))){var s=this.fragCurrent;s&&s.loader&&s.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(r.maxStartPTS,Number.POSITIVE_INFINITY)}}},e.prototype.flushMainBuffer=function(t,e){this.state=St;var n={startOffset:t,endOffset:e};this.altAudio&&(n.type="video"),this.hls.trigger(u.a.BUFFER_FLUSHING,n)},e.prototype.onMediaAttached=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),this.gapController=new gt(n,e,this.fragmentTracker,this.hls)},e.prototype.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(l.b.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.backtracked=void 0}))})),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("seeked",this.onvseeked),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},e.prototype.onMediaSeeking=function(){var t=this.media,e=t?t.currentTime:void 0,n=this.config;Object(s.a)(e)&&l.b.log("media seeking to "+e.toFixed(3));var r=this.mediaBuffer?this.mediaBuffer:t,i=z.bufferInfo(r,e,this.config.maxBufferHole);if(this.state===At){var a=this.fragCurrent;if(0===i.len&&a){var o=n.maxFragLookUpTolerance,u=a.start-o,c=a.start+a.duration+o;e<u||e>c?(a.loader&&(l.b.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),a.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=mt):l.b.log("seeking outside of buffer but within currently loaded fragment range")}}else this.state===kt&&(0===i.len&&(this.fragPrevious=0),this.state=mt);t&&(this.lastCurrentTime=e),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=e),this.tick()},e.prototype.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:void 0;Object(s.a)(e)&&l.b.log("media seeked to "+e.toFixed(3)),this.tick()},e.prototype.onMediaEnded=function(){l.b.log("media ended"),this.startPosition=this.lastCurrentTime=0},e.prototype.onManifestLoading=function(){l.b.log("trigger BUFFER_RESET"),this.hls.trigger(u.a.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},e.prototype.onManifestParsed=function(t){var e=!1,n=!1,r=void 0;t.levels.forEach((function(t){(r=t.audioCodec)&&(-1!==r.indexOf("mp4a.40.2")&&(e=!0),-1!==r.indexOf("mp4a.40.5")&&(n=!0))})),this.audioCodecSwitch=e&&n,this.audioCodecSwitch&&l.b.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1;var i=this.config;(i.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(i.startPosition)},e.prototype.onLevelLoaded=function(t){var e=t.details,n=t.level,r=this.levels[this.levelLastLoaded],i=this.levels[n],a=e.totalduration,o=0;if(l.b.log("level "+n+" loaded ["+e.startSN+","+e.endSN+"],duration:"+a),e.live){var c=i.details;c&&e.fragments.length>0?(ot(c,e),o=e.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(o,c),e.PTSKnown&&Object(s.a)(o)?l.b.log("live playlist sliding:"+o.toFixed(3)):(l.b.log("live playlist - outdated PTS, unknown sliding"),lt(this.fragPrevious,r,e))):(l.b.log("live playlist - first load, unknown sliding"),e.PTSKnown=!1,lt(this.fragPrevious,r,e))}else e.PTSKnown=!1;if(i.details=e,this.levelLastLoaded=n,this.hls.trigger(u.a.LEVEL_UPDATED,{details:e,level:n}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var d=e.startTimeOffset;Object(s.a)(d)?(d<0&&(l.b.log("negative start time offset "+d+", count from end of last fragment"),d=o+a+d),l.b.log("start time offset found in playlist, adjust startPosition to "+d),this.startPosition=d):e.live?(this.startPosition=this.computeLivePosition(o,e),l.b.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===Et&&(this.state=mt),this.tick()},e.prototype.onKeyLoaded=function(){this.state===bt&&(this.state=mt,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,n=this.hls,r=this.levels,i=this.media,a=t.frag;if(this.state===At&&e&&"main"===a.type&&a.level===e.level&&a.sn===e.sn){var o=t.stats,s=r[e.level],c=s.details;if(this.bitrateTest=!1,this.stats=o,l.b.log("Loaded "+e.sn+" of ["+c.startSN+" ,"+c.endSN+"],level "+e.level),a.bitrateTest&&n.nextLoadLevel)this.state=mt,this.startFragRequested=!1,o.tparsed=o.tbuffered=window.performance.now(),n.trigger(u.a.FRAG_BUFFERED,{stats:o,frag:e,id:"main"}),this.tick();else if("initSegment"===a.sn)this.state=mt,o.tparsed=o.tbuffered=window.performance.now(),c.initSegment.data=t.payload,n.trigger(u.a.FRAG_BUFFERED,{stats:o,frag:e,id:"main"}),this.tick();else{l.b.log("Parsing "+e.sn+" of ["+c.startSN+" ,"+c.endSN+"],level "+e.level+", cc "+e.cc),this.state=Tt,this.pendingBuffering=!0,this.appended=!1,a.bitrateTest&&(a.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:a}));var d=!(i&&i.seeking)&&(c.PTSKnown||!c.live),f=c.initSegment?c.initSegment.data:[],h=this._getAudioCodec(s);(this.demuxer=this.demuxer||new nt(this.hls,"main")).push(t.payload,f,h,s.videoCodec,e,c.totalduration,d)}}this.fragLoadError=0},e.prototype.onFragParsingInitSegment=function(t){var e=this.fragCurrent,n=t.frag;if(e&&"main"===t.id&&n.sn===e.sn&&n.level===e.level&&this.state===Tt){var r=t.tracks,i=void 0,a=void 0;if(r.audio&&this.altAudio&&delete r.audio,a=r.audio){var o=this.levels[this.level].audioCodec,s=navigator.userAgent.toLowerCase();o&&this.audioCodecSwap&&(l.b.log("swapping playlist audio codec"),o=-1!==o.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==a.metadata.channelCount&&-1===s.indexOf("firefox")&&(o="mp4a.40.5"),-1!==s.indexOf("android")&&"audio/mpeg"!==a.container&&(o="mp4a.40.2",l.b.log("Android: force audio codec to "+o)),a.levelCodec=o,a.id=t.id}for(i in(a=r.video)&&(a.levelCodec=this.levels[this.level].videoCodec,a.id=t.id),this.hls.trigger(u.a.BUFFER_CODECS,r),r){a=r[i],l.b.log("main track:"+i+",container:"+a.container+",codecs[level/parsed]=["+a.levelCodec+"/"+a.codec+"]");var c=a.initSegment;c&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.a.BUFFER_APPENDING,{type:i,data:c,parent:"main",content:"initSegment"}))}this.tick()}},e.prototype.onFragParsingData=function(t){var e=this,n=this.fragCurrent,r=t.frag;if(n&&"main"===t.id&&r.sn===n.sn&&r.level===n.level&&("audio"!==t.type||!this.altAudio)&&this.state===Tt){var i=this.levels[this.level],a=n;if(Object(s.a)(t.endPTS)||(t.endPTS=t.startPTS+n.duration,t.endDTS=t.startDTS+n.duration),!0===t.hasAudio&&a.addElementaryStream(m.ElementaryStreamTypes.AUDIO),!0===t.hasVideo&&a.addElementaryStream(m.ElementaryStreamTypes.VIDEO),l.b.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)),"video"===t.type)if(a.dropped=t.dropped,a.dropped)if(a.backtracked)l.b.warn("Already backtracked on this fragment, appending with the gap",a.sn);else{var o=i.details;if(!o||a.sn!==o.startSN)return l.b.warn("missing video frame(s), backtracking fragment",a.sn),this.fragmentTracker.removeFragment(a),a.backtracked=!0,this.nextLoadPosition=t.startPTS,this.state=mt,this.fragPrevious=a,void this.tick();l.b.warn("missing video frame(s) on first frag, appending with gap",a.sn)}else a.backtracked=!1;var c=at(i.details,a,t.startPTS,t.endPTS,t.startDTS,t.endDTS),d=this.hls;d.trigger(u.a.LEVEL_PTS_UPDATED,{details:i.details,level:this.level,drift:c,type:t.type,start:t.startPTS,end:t.endPTS}),[t.data1,t.data2].forEach((function(n){n&&n.length&&e.state===Tt&&(e.appended=!0,e.pendingBuffering=!0,d.trigger(u.a.BUFFER_APPENDING,{type:t.type,data:n,parent:"main",content:"data"}))})),this.tick()}},e.prototype.onFragParsed=function(t){var e=this.fragCurrent,n=t.frag;e&&"main"===t.id&&n.sn===e.sn&&n.level===e.level&&this.state===Tt&&(this.stats.tparsed=window.performance.now(),this.state=wt,this._checkAppendedParsed())},e.prototype.onAudioTrackSwitching=function(t){var e=!!t.url,n=t.id;if(!e){if(this.mediaBuffer!==this.media){l.b.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var r=this.fragCurrent;r.loader&&(l.b.log("switching to main audio track, cancel main fragment load"),r.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=mt}var i=this.hls;i.trigger(u.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),i.trigger(u.a.AUDIO_TRACK_SWITCHED,{id:n}),this.altAudio=!1}},e.prototype.onAudioTrackSwitched=function(t){var e=t.id,n=!!this.hls.audioTracks[e].url;if(n){var r=this.videoBuffer;r&&this.mediaBuffer!==r&&(l.b.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=n,this.tick()},e.prototype.onBufferCreated=function(t){var e=t.tracks,n=void 0,r=void 0,i=!1;for(var a in e){var o=e[a];"main"===o.id?(r=a,n=o,"video"===a&&(this.videoBuffer=e[a].buffer)):i=!0}i&&n?(l.b.log("alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media},e.prototype.onBufferAppended=function(t){if("main"===t.parent){var e=this.state;e!==Tt&&e!==wt||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},e.prototype._checkAppendedParsed=function(){if(!(this.state!==wt||this.appended&&this.pendingBuffering)){var t=this.fragCurrent;if(t){var e=this.mediaBuffer?this.mediaBuffer:this.media;l.b.log("main buffered : "+st.toString(e.buffered)),this.fragPrevious=t;var n=this.stats;n.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*n.total/(n.tbuffered-n.tfirst)),this.hls.trigger(u.a.FRAG_BUFFERED,{stats:n,frag:t,id:"main"}),this.state=mt}this.tick()}},e.prototype.onError=function(t){var e=t.frag||this.fragCurrent;if(!e||"main"===e.type){var n=!!this.media&&z.isBuffered(this.media,this.media.currentTime)&&z.isBuffered(this.media,this.media.currentTime+.5);switch(t.details){case o.a.FRAG_LOAD_ERROR:case o.a.FRAG_LOAD_TIMEOUT:case o.a.KEY_LOAD_ERROR:case o.a.KEY_LOAD_TIMEOUT:if(!t.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var r=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);l.b.warn("mediaController: frag loading failed, retry in "+r+" ms"),this.retryDate=window.performance.now()+r,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=_t}else l.b.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=Ct;break;case o.a.LEVEL_LOAD_ERROR:case o.a.LEVEL_LOAD_TIMEOUT:this.state!==Ct&&(t.fatal?(this.state=Ct,l.b.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):t.levelRetry||this.state!==Et||(this.state=mt));break;case o.a.BUFFER_FULL_ERROR:"main"!==t.parent||this.state!==Tt&&this.state!==wt||(n?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=mt):(l.b.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},e.prototype._reduceMaxBufferLength=function(t){var e=this.config;return e.maxMaxBufferLength>=t&&(e.maxMaxBufferLength/=2,l.b.warn("main:reduce max buffer length to "+e.maxMaxBufferLength+"s"),!0)},e.prototype._checkBuffer=function(){var t=this.media;if(t&&0!==t.readyState){var e=(this.mediaBuffer?this.mediaBuffer:t).buffered;!this.loadedmetadata&&e.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,e)}},e.prototype.onFragLoadEmergencyAborted=function(){this.state=mt,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},e.prototype.onBufferFlushed=function(){var t=this.mediaBuffer?this.mediaBuffer:this.media;t&&this.fragmentTracker.detectEvictedFragments(m.ElementaryStreamTypes.VIDEO,t.buffered),this.state=mt,this.fragPrevious=null},e.prototype.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},e.prototype.computeLivePosition=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)},e.prototype._seekToStartPos=function(){var t=this.media,e=t.currentTime,n=t.seeking?e:this.startPosition;e!==n&&(l.b.log("target start position not buffered, seek to buffered.start(0) "+n+" from current time "+e+" "),t.currentTime=n)},e.prototype._getAudioCodec=function(t){var e=this.config.defaultAudioCodec||t.audioCodec;return this.audioCodecSwap&&(l.b.log("swapping playlist audio codec"),e&&(e=-1!==e.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),e},yt(e,[{key:"state",set:function(t){if(this.state!==t){var e=this.state;this._state=t,l.b.log("main stream:"+e+"->"+t),this.hls.trigger(u.a.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.getBufferedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;return t?this.followingBufferedFrag(this.getBufferedFrag(t.currentTime)):null}},{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(t){this._liveSyncPosition=t}}]),e}(ft),xt="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},Rt=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}}(),It=window.performance,Pt=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,t.call(this,n,u.a.MANIFEST_LOADED,u.a.LEVEL_LOADED,u.a.AUDIO_TRACK_SWITCHED,u.a.FRAG_LOADED,u.a.ERROR));return r.canload=!1,r.currentLevelIndex=null,r.manualLevelIndex=-1,r.timer=null,r}return function(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)}(e,t),e.prototype.onHandlerDestroying=function(){this.clearTimer(),this.manualLevelIndex=-1},e.prototype.clearTimer=function(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)},e.prototype.startLoad=function(){var t=this._levels;this.canload=!0,this.levelRetryCount=0,t&&t.forEach((function(t){t.loadError=0;var e=t.details;e&&e.live&&(t.details=void 0)})),null!==this.timer&&this.loadLevel()},e.prototype.stopLoad=function(){this.canload=!1},e.prototype.onManifestLoaded=function(t){var e=[],n=void 0,r={},i=null,a=!1,s=!1,c=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),d=[];if(t.levels.forEach((function(t){t.loadError=0,t.fragmentError=!1,a=a||!!t.videoCodec,s=s||!!t.audioCodec||!(!t.attrs||!t.attrs.AUDIO),c&&t.audioCodec&&-1!==t.audioCodec.indexOf("mp4a.40.34")&&(t.audioCodec=void 0),(i=r[t.bitrate])?i.url.push(t.url):(t.url=[t.url],t.urlId=0,r[t.bitrate]=t,e.push(t)),t.attrs&&t.attrs.AUDIO&&rt(i||t,"audio",t.attrs.AUDIO),t.attrs&&t.attrs.SUBTITLES&&rt(i||t,"text",t.attrs.SUBTITLES)})),a&&s&&(e=e.filter((function(t){return!!t.videoCodec}))),e=e.filter((function(t){var e=t.audioCodec,n=t.videoCodec;return(!e||S(e))&&(!n||S(n))})),t.audioTracks&&(d=t.audioTracks.filter((function(t){return!t.audioCodec||S(t.audioCodec,"audio")}))).forEach((function(t,e){t.id=e})),e.length>0){n=e[0].bitrate,e.sort((function(t,e){return t.bitrate-e.bitrate})),this._levels=e;for(var f=0;f<e.length;f++)if(e[f].bitrate===n){this._firstLevel=f,l.b.log("manifest loaded,"+e.length+" level(s) found, first bitrate:"+n);break}this.hls.trigger(u.a.MANIFEST_PARSED,{levels:e,audioTracks:d,firstLevel:this._firstLevel,stats:t.stats,audio:s,video:a,altAudio:d.length>0&&a})}else this.hls.trigger(u.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},e.prototype.setLevelInternal=function(t){var e=this._levels,n=this.hls;if(t>=0&&t<e.length){if(this.clearTimer(),this.currentLevelIndex!==t){l.b.log("switching to level "+t),this.currentLevelIndex=t;var r=e[t];r.level=t,n.trigger(u.a.LEVEL_SWITCHING,r)}var i=e[t],a=i.details;if(!a||a.live){var s=i.urlId;n.trigger(u.a.LEVEL_LOADING,{url:i.url[s],level:t,id:s})}}else n.trigger(u.a.ERROR,{type:o.b.OTHER_ERROR,details:o.a.LEVEL_SWITCH_ERROR,level:t,fatal:!1,reason:"invalid level idx"})},e.prototype.onError=function(t){if(t.fatal)t.type===o.b.NETWORK_ERROR&&this.clearTimer();else{var e=!1,n=!1,r=void 0;switch(t.details){case o.a.FRAG_LOAD_ERROR:case o.a.FRAG_LOAD_TIMEOUT:case o.a.KEY_LOAD_ERROR:case o.a.KEY_LOAD_TIMEOUT:r=t.frag.level,n=!0;break;case o.a.LEVEL_LOAD_ERROR:case o.a.LEVEL_LOAD_TIMEOUT:r=t.context.level,e=!0;break;case o.a.REMUX_ALLOC_ERROR:r=t.level,e=!0}void 0!==r&&this.recoverLevel(t,r,e,n)}},e.prototype.recoverLevel=function(t,e,n,r){var i=this,a=this.hls.config,o=t.details,s=this._levels[e],u=void 0,c=void 0,d=void 0;if(s.loadError++,s.fragmentError=r,n){if(!(this.levelRetryCount+1<=a.levelLoadingMaxRetry))return l.b.error("level controller, cannot recover from "+o+" error"),this.currentLevelIndex=null,this.clearTimer(),void(t.fatal=!0);c=Math.min(Math.pow(2,this.levelRetryCount)*a.levelLoadingRetryDelay,a.levelLoadingMaxRetryTimeout),this.timer=setTimeout((function(){return i.loadLevel()}),c),t.levelRetry=!0,this.levelRetryCount++,l.b.warn("level controller, "+o+", retry in "+c+" ms, current retry count is "+this.levelRetryCount)}(n||r)&&((u=s.url.length)>1&&s.loadError<u?(s.urlId=(s.urlId+1)%u,s.details=void 0,l.b.warn("level controller, "+o+" for level "+e+": switching to redundant URL-id "+s.urlId)):-1===this.manualLevelIndex?(d=0===e?this._levels.length-1:e-1,l.b.warn("level controller, "+o+": switch to "+d),this.hls.nextAutoLevel=this.currentLevelIndex=d):r&&(l.b.warn("level controller, "+o+": reload a fragment"),this.currentLevelIndex=null))},e.prototype.onFragLoaded=function(t){var e=t.frag;if(void 0!==e&&"main"===e.type){var n=this._levels[e.level];void 0!==n&&(n.fragmentError=!1,n.loadError=0,this.levelRetryCount=0)}},e.prototype.onLevelLoaded=function(t){var e=this,n=t.level;if(n===this.currentLevelIndex){var r=this._levels[n];r.fragmentError||(r.loadError=0,this.levelRetryCount=0);var i=t.details;if(i.live){var a=1e3*(i.averagetargetduration?i.averagetargetduration:i.targetduration),o=a,s=r.details;s&&i.endSN===s.endSN&&(o/=2,l.b.log("same live playlist, reload twice faster")),o-=It.now()-t.stats.trequest,o=Math.max(a/2,Math.round(o)),l.b.log("live playlist, reload in "+Math.round(o)+" ms"),this.timer=setTimeout((function(){return e.loadLevel()}),o)}else this.clearTimer()}},e.prototype.onAudioTrackSwitched=function(t){var e=this.hls.audioTracks[t.id].groupId,n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){var r=n.audioGroupIds.findIndex((function(t){return t===e}));r!==n.urlId&&(n.urlId=r,this.startLoad())}},e.prototype.loadLevel=function(){if(l.b.debug("call to loadLevel"),null!==this.currentLevelIndex&&this.canload){var t=this._levels[this.currentLevelIndex];if("object"===(void 0===t?"undefined":xt(t))&&t.url.length>0){var e=this.currentLevelIndex,n=t.urlId,r=t.url[n];l.b.log("Attempt loading level index "+e+" with URL-id "+n),this.hls.trigger(u.a.LEVEL_LOADING,{url:r,level:e,id:n})}}},Rt(e,[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e=this._levels;e&&(t=Math.min(t,e.length-1),this.currentLevelIndex===t&&e[t].details||this.setLevelInternal(t))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(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-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}]),e}(h),Ot=n(6);function Dt(t,e){var n=null;try{n=new window.Event("addtrack")}catch(t){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=t,e.dispatchEvent(n)}function Mt(t){if(t&&t.cues)for(;t.cues.length>0;)t.removeCue(t.cues[0])}var Nt=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,t.call(this,n,u.a.MEDIA_ATTACHED,u.a.MEDIA_DETACHING,u.a.FRAG_PARSING_METADATA));return r.id3Track=void 0,r.media=void 0,r}return function(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)}(e,t),e.prototype.destroy=function(){h.prototype.destroy.call(this)},e.prototype.onMediaAttached=function(t){this.media=t.media,this.media},e.prototype.onMediaDetaching=function(){Mt(this.id3Track),this.id3Track=void 0,this.media=void 0},e.prototype.getID3Track=function(t){for(var e=0;e<t.length;e++){var n=t[e];if("metadata"===n.kind&&"id3"===n.label)return Dt(n,this.media),n}return this.media.addTextTrack("metadata","id3")},e.prototype.onFragParsingMetadata=function(t){var e=t.frag,n=t.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var r=window.WebKitDataCue||window.VTTCue||window.TextTrackCue,i=0;i<n.length;i++){var a=Ot.a.getID3Frames(n[i].data);if(a){var o=n[i].pts,s=i<n.length-1?n[i+1].pts:e.endPTS;o===s&&(s+=1e-4);for(var u=0;u<a.length;u++){var l=a[u];if(!Ot.a.isTimeStampFrame(l)){var c=new r(o,s,"");c.value=l,this.id3Track.addCue(c)}}}}},e}(h),Ut=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=0,this.totalWeight_=0}return t.prototype.sample=function(t,e){var n=Math.pow(this.alpha_,t);this.estimate_=e*(1-n)+n*this.estimate_,this.totalWeight_+=t},t.prototype.getTotalWeight=function(){return this.totalWeight_},t.prototype.getEstimate=function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/t}return this.estimate_},t}(),Ft=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.hls=e,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Ut(n),this.fast_=new Ut(r)}return t.prototype.sample=function(t,e){var n=8e3*e/(t=Math.max(t,this.minDelayMs_)),r=t/1e3;this.fast_.sample(r,n),this.slow_.sample(r,n)},t.prototype.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},t.prototype.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.prototype.destroy=function(){},t}(),Bt=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}}(),jt=window.performance,Kt=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,t.call(this,n,u.a.FRAG_LOADING,u.a.FRAG_LOADED,u.a.FRAG_BUFFERED,u.a.ERROR));return r.lastLoadedFragLevel=0,r._nextAutoLevel=-1,r.hls=n,r.timer=null,r._bwEstimator=null,r.onCheck=r._abandonRulesCheck.bind(r),r}return function(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)}(e,t),e.prototype.destroy=function(){this.clearTimer(),h.prototype.destroy.call(this)},e.prototype.onFragLoading=function(t){var e=t.frag;if("main"===e.type&&(this.timer||(this.fragCurrent=e,this.timer=setInterval(this.onCheck,100)),!this._bwEstimator)){var n=this.hls,r=n.config,i=e.level,a=void 0,o=void 0;n.levels[i].details.live?(a=r.abrEwmaFastLive,o=r.abrEwmaSlowLive):(a=r.abrEwmaFastVoD,o=r.abrEwmaSlowVoD),this._bwEstimator=new Ft(n,o,a,r.abrEwmaDefaultEstimate)}},e.prototype._abandonRulesCheck=function(){var t=this.hls,e=t.media,n=this.fragCurrent;if(n){var r=n.loader,i=t.minAutoLevel;if(!r||r.stats&&r.stats.aborted)return l.b.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);var a=r.stats;if(e&&a&&(!e.paused&&0!==e.playbackRate||!e.readyState)&&n.autoLevel&&n.level){var o=jt.now()-a.trequest,s=Math.abs(e.playbackRate);if(o>500*n.duration/s){var c=t.levels,d=Math.max(1,a.bw?a.bw/8:1e3*a.loaded/o),f=c[n.level],h=f.realBitrate?Math.max(f.realBitrate,f.bitrate):f.bitrate,p=a.total?a.total:Math.max(a.loaded,Math.round(n.duration*h/8)),g=e.currentTime,y=(p-a.loaded)/d,v=(z.bufferInfo(e,g,t.config.maxBufferHole).end-g)/s;if(v<2*n.duration/s&&y>v){var m=void 0,b=void 0;for(b=n.level-1;b>i;b--){var A=c[b].realBitrate?Math.max(c[b].realBitrate,c[b].bitrate):c[b].bitrate;if((m=n.duration*A/(6.4*d))<v)break}m<y&&(l.b.warn("loading too slow, abort fragment loading and switch to level "+b+":fragLoadedDelay["+b+"]<fragLoadedDelay["+(n.level-1)+"];bufferStarvationDelay:"+m.toFixed(1)+"<"+y.toFixed(1)+":"+v.toFixed(1)),t.nextLoadLevel=b,this._bwEstimator.sample(o,a.loaded),r.abort(),this.clearTimer(),t.trigger(u.a.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,stats:a}))}}}}},e.prototype.onFragLoaded=function(t){var e=t.frag;if("main"===e.type&&Object(s.a)(e.sn)){if(this.clearTimer(),this.lastLoadedFragLevel=e.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var n=this.hls.levels[e.level],r=(n.loaded?n.loaded.bytes:0)+t.stats.loaded,i=(n.loaded?n.loaded.duration:0)+t.frag.duration;n.loaded={bytes:r,duration:i},n.realBitrate=Math.round(8*r/i)}if(t.frag.bitrateTest){var a=t.stats;a.tparsed=a.tbuffered=a.tload,this.onFragBuffered(t)}}},e.prototype.onFragBuffered=function(t){var e=t.stats,n=t.frag;if(!0!==e.aborted&&"main"===n.type&&Object(s.a)(n.sn)&&(!n.bitrateTest||e.tload===e.tbuffered)){var r=e.tparsed-e.trequest;l.b.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),e.bwEstimate=this._bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=r/1e3:this.bitrateTestDelay=0}},e.prototype.onError=function(t){switch(t.details){case o.a.FRAG_LOAD_ERROR:case o.a.FRAG_LOAD_TIMEOUT:this.clearTimer()}},e.prototype.clearTimer=function(){clearInterval(this.timer),this.timer=null},e.prototype._findBestLevel=function(t,e,n,r,i,a,o,s,u){for(var c=i;c>=r;c--){var d=u[c];if(d){var f=d.details,h=f?f.totalduration/f.fragments.length:e,p=!!f&&f.live,g=void 0;g=c<=t?o*n:s*n;var y=u[c].realBitrate?Math.max(u[c].realBitrate,u[c].bitrate):u[c].bitrate,v=y*h/g;if(l.b.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+c+"/"+Math.round(g)+"/"+y+"/"+h+"/"+a+"/"+v),g>y&&(!v||p&&!this.bitrateTestDelay||v<a))return c}}return-1},Bt(e,[{key:"nextAutoLevel",get:function(){var t=this._nextAutoLevel,e=this._bwEstimator;if(!(-1===t||e&&e.canEstimate()))return t;var n=this._nextABRAutoLevel;return-1!==t&&(n=Math.min(t,n)),n},set:function(t){this._nextAutoLevel=t}},{key:"_nextABRAutoLevel",get:function(){var t=this.hls,e=t.maxAutoLevel,n=t.levels,r=t.config,i=t.minAutoLevel,a=t.media,o=this.lastLoadedFragLevel,s=this.fragCurrent?this.fragCurrent.duration:0,u=a?a.currentTime:0,c=a&&0!==a.playbackRate?Math.abs(a.playbackRate):1,d=this._bwEstimator?this._bwEstimator.getEstimate():r.abrEwmaDefaultEstimate,f=(z.bufferInfo(a,u,r.maxBufferHole).end-u)/c,h=this._findBestLevel(o,s,d,i,e,f,r.abrBandWidthFactor,r.abrBandWidthUpFactor,n);if(h>=0)return h;l.b.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var p=s?Math.min(s,r.maxStarvationDelay):r.maxStarvationDelay,g=r.abrBandWidthFactor,y=r.abrBandWidthUpFactor;if(0===f){var v=this.bitrateTestDelay;v&&(p=(s?Math.min(s,r.maxLoadingDelay):r.maxLoadingDelay)-v,l.b.trace("bitrate test took "+Math.round(1e3*v)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*p)+" ms"),g=y=1)}return h=this._findBestLevel(o,s,d,i,e,f+p,g,y,n),Math.max(h,0)}}]),e}(h),Vt=Q(),Gt=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,t.call(this,n,u.a.MEDIA_ATTACHING,u.a.MEDIA_DETACHING,u.a.MANIFEST_PARSED,u.a.BUFFER_RESET,u.a.BUFFER_APPENDING,u.a.BUFFER_CODECS,u.a.BUFFER_EOS,u.a.BUFFER_FLUSHING,u.a.LEVEL_PTS_UPDATED,u.a.LEVEL_UPDATED));return r._msDuration=null,r._levelDuration=null,r._live=null,r._objectUrl=null,r.onsbue=r.onSBUpdateEnd.bind(r),r.onsbe=r.onSBUpdateError.bind(r),r.pendingTracks={},r.tracks={},r}return function(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)}(e,t),e.prototype.destroy=function(){h.prototype.destroy.call(this)},e.prototype.onLevelPtsUpdated=function(t){var e=t.type,n=this.tracks.audio;if("audio"===e&&n&&"audio/mpeg"===n.container){var r=this.sourceBuffer.audio;if(Math.abs(r.timestampOffset-t.start)>.1){var i=r.updating;try{r.abort()}catch(t){i=!0,l.b.warn("can not abort audio buffer: "+t)}i?this.audioTimestampOffset=t.start:(l.b.warn("change mpeg audio timestamp offset from "+r.timestampOffset+" to "+t.start),r.timestampOffset=t.start)}}},e.prototype.onManifestParsed=function(t){var e=t.audio,n=t.video||t.levels.length&&t.altAudio,r=0;t.altAudio&&(e||n)&&(r=(e?1:0)+(n?1:0),l.b.log(r+" sourceBuffer(s) expected")),this.sourceBufferNb=r},e.prototype.onMediaAttaching=function(t){var e=this.media=t.media;if(e){var n=this.mediaSource=new Vt;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=window.URL.createObjectURL(n),this._objectUrl=e.src}},e.prototype.onMediaDetaching=function(){l.b.log("media source detaching");var t=this.mediaSource;if(t){if("open"===t.readyState)try{t.endOfStream()}catch(t){l.b.warn("onMediaDetaching:"+t.message+" while calling endOfStream")}t.removeEventListener("sourceopen",this.onmso),t.removeEventListener("sourceended",this.onmse),t.removeEventListener("sourceclose",this.onmsc),this.media&&(window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):l.b.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(u.a.MEDIA_DETACHED)},e.prototype.onMediaSourceOpen=function(){l.b.log("media source opened"),this.hls.trigger(u.a.MEDIA_ATTACHED,{media:this.media});var t=this.mediaSource;t&&t.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()},e.prototype.checkPendingTracks=function(){var t=this.pendingTracks,e=Object.keys(t).length;e&&(this.sourceBufferNb<=e||0===this.sourceBufferNb)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())},e.prototype.onMediaSourceClose=function(){l.b.log("media source closed")},e.prototype.onMediaSourceEnded=function(){l.b.log("media source ended")},e.prototype.onSBUpdateEnd=function(){if(this.audioTimestampOffset){var t=this.sourceBuffer.audio;l.b.warn("change mpeg audio timestamp offset from "+t.timestampOffset+" to "+this.audioTimestampOffset),t.timestampOffset=this.audioTimestampOffset,delete this.audioTimestampOffset}this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1;var e=this.parent,n=this.segments.reduce((function(t,n){return n.parent===e?t+1:t}),0),r={},i=this.sourceBuffer;for(var a in i)r[a]=i[a].buffered;this.hls.trigger(u.a.BUFFER_APPENDED,{parent:e,pending:n,timeRanges:r}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration()},e.prototype.onSBUpdateError=function(t){l.b.error("sourceBuffer error:",t),this.hls.trigger(u.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.prototype.onBufferReset=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},e.prototype.onBufferCodecs=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()}},e.prototype.createSourceBuffers=function(t){var e=this.sourceBuffer,n=this.mediaSource;for(var r in t)if(!e[r]){var i=t[r],a=i.levelCodec||i.codec,s=i.container+";codecs="+a;l.b.log("creating sourceBuffer("+s+")");try{var c=e[r]=n.addSourceBuffer(s);c.addEventListener("updateend",this.onsbue),c.addEventListener("error",this.onsbe),this.tracks[r]={codec:a,container:i.container},i.buffer=c}catch(t){l.b.error("error while trying to add sourceBuffer:"+t.message),this.hls.trigger(u.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:t,mimeType:s})}}this.hls.trigger(u.a.BUFFER_CREATED,{tracks:t})},e.prototype.onBufferAppending=function(t){this._needsFlush||(this.segments?this.segments.push(t):this.segments=[t],this.doAppending())},e.prototype.onBufferAppendFail=function(t){l.b.error("sourceBuffer error:",t.event),this.hls.trigger(u.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.prototype.onBufferEos=function(t){var e=this.sourceBuffer,n=t.type;for(var r in e)n&&r!==n||e[r].ended||(e[r].ended=!0,l.b.log(r+" sourceBuffer now EOS"));this.checkEos()},e.prototype.checkEos=function(){var t=this.sourceBuffer,e=this.mediaSource;if(e&&"open"===e.readyState){for(var n in t){var r=t[n];if(!r.ended)return;if(r.updating)return void(this._needsEos=!0)}l.b.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment");try{e.endOfStream()}catch(t){l.b.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1}else this._needsEos=!1},e.prototype.onBufferFlushing=function(t){this.flushRange.push({start:t.startOffset,end:t.endOffset,type:t.type}),this.flushBufferCounter=0,this.doFlush()},e.prototype.onLevelUpdated=function(t){var e=t.details;e.fragments.length>0&&(this._levelDuration=e.totalduration+e.fragments[0].start,this._live=e.live,this.updateMediaElementDuration())},e.prototype.updateMediaElementDuration=function(){var t,e=this.hls.config;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var n in this.sourceBuffer)if(!0===this.sourceBuffer[n].updating)return;t=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===e.liveDurationInfinity?(l.b.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>t||!Object(s.a)(t))&&(l.b.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},e.prototype.doFlush=function(){for(;this.flushRange.length;){var t=this.flushRange[0];if(!this.flushBuffer(t.start,t.end,t.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var e=0,n=this.sourceBuffer;try{for(var r in n)e+=n[r].buffered.length}catch(t){l.b.error("error while accessing sourceBuffer.buffered")}this.appended=e,this.hls.trigger(u.a.BUFFER_FLUSHED)}},e.prototype.doAppending=function(){var t=this.hls,e=this.sourceBuffer,n=this.segments;if(Object.keys(e).length){if(this.media.error)return this.segments=[],void l.b.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=e[r.type];i?i.updating?n.unshift(r):(i.ended=!1,this.parent=r.parent,i.appendBuffer(r.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(e){l.b.error("error while trying to append buffer:"+e.message),n.unshift(r);var a={type:o.b.MEDIA_ERROR,parent:r.parent};22!==e.code?(this.appendError?this.appendError++:this.appendError=1,a.details=o.a.BUFFER_APPEND_ERROR,this.appendError>t.config.appendErrorMaxRetry?(l.b.log("fail "+t.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),n=[],a.fatal=!0,t.trigger(u.a.ERROR,a)):(a.fatal=!1,t.trigger(u.a.ERROR,a))):(this.segments=[],a.details=o.a.BUFFER_FULL_ERROR,a.fatal=!1,t.trigger(u.a.ERROR,a))}}}},e.prototype.flushBuffer=function(t,e,n){var r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,u=void 0,c=this.sourceBuffer;if(Object.keys(c).length){if(l.b.log("flushBuffer,pos/start/end: "+this.media.currentTime.toFixed(3)+"/"+t+"/"+e),this.flushBufferCounter<this.appended){for(var d in c)if(!n||d===n){if((r=c[d]).ended=!1,r.updating)return l.b.warn("cannot flush, sb updating in progress"),!1;try{for(i=0;i<r.buffered.length;i++)if(a=r.buffered.start(i),o=r.buffered.end(i),-1!==navigator.userAgent.toLowerCase().indexOf("firefox")&&e===Number.POSITIVE_INFINITY?(s=t,u=e):(s=Math.max(a,t),u=Math.min(o,e)),Math.min(u,o)-s>.5)return this.flushBufferCounter++,l.b.log("flush "+d+" ["+s+","+u+"], of ["+a+","+o+"], pos:"+this.media.currentTime),r.remove(s,u),!1}catch(t){l.b.warn("exception while accessing sourcebuffer, it might have been removed from MediaSource")}}}else l.b.warn("abort flushing too many retries");l.b.log("buffer flushed")}return!0},e}(h),Ht=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}}(),Yt=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,t.call(this,n,u.a.FPS_DROP_LEVEL_CAPPING,u.a.MEDIA_ATTACHING,u.a.MANIFEST_PARSED,u.a.BUFFER_CODECS,u.a.MEDIA_DETACHING));return r.autoLevelCapping=Number.POSITIVE_INFINITY,r.firstLevel=null,r.levels=[],r.media=null,r.restrictedLevels=[],r.timer=null,r}return function(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)}(e,t),e.prototype.destroy=function(){this.hls.config.capLevelToPlayerSize&&(this.media=null,this._stopCapping())},e.prototype.onFpsDropLevelCapping=function(t){e.isLevelAllowed(t.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(t.droppedLevel)},e.prototype.onMediaAttaching=function(t){this.media=t.media instanceof window.HTMLVideoElement?t.media:null},e.prototype.onManifestParsed=function(t){var e=this.hls;this.restrictedLevels=[],this.levels=t.levels,this.firstLevel=t.firstLevel,e.config.capLevelToPlayerSize&&(t.video||t.levels.length&&t.altAudio)&&this._startCapping()},e.prototype.onBufferCodecs=function(t){this.hls.config.capLevelToPlayerSize&&t.video&&this._startCapping()},e.prototype.onLevelsUpdated=function(t){this.levels=t.levels},e.prototype.onMediaDetaching=function(){this._stopCapping()},e.prototype.detectPlayerSize=function(){if(this.media){var t=this.levels?this.levels.length:0;if(t){var e=this.hls;e.autoLevelCapping=this.getMaxLevel(t-1),e.autoLevelCapping>this.autoLevelCapping&&e.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},e.prototype.getMaxLevel=function(t){var n=this;if(!this.levels)return-1;var r=this.levels.filter((function(r,i){return e.isLevelAllowed(i,n.restrictedLevels)&&i<=t}));return e.getMaxLevelByMediaSize(r,this.mediaWidth,this.mediaHeight)},e.prototype._startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},e.prototype._stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},e.isLevelAllowed=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return-1===e.indexOf(t)},e.getMaxLevelByMediaSize=function(t,e,n){if(!t||t&&!t.length)return-1;for(var r,i,a=t.length-1,o=0;o<t.length;o+=1){var s=t[o];if((s.width>=e||s.height>=n)&&(r=s,!(i=t[o+1])||r.width!==i.width||r.height!==i.height)){a=o;break}}return a},Ht(e,[{key:"mediaWidth",get:function(){var t=void 0,n=this.media;return n&&(t=n.width||n.clientWidth||n.offsetWidth,t*=e.contentScaleFactor),t}},{key:"mediaHeight",get:function(){var t=void 0,n=this.media;return n&&(t=n.height||n.clientHeight||n.offsetHeight,t*=e.contentScaleFactor),t}}],[{key:"contentScaleFactor",get:function(){var t=1;try{t=window.devicePixelRatio}catch(t){}return t}}]),e}(h),zt=window.performance,$t=function(t){function e(n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(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}(this,t.call(this,n,u.a.MEDIA_ATTACHING))}return function(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)}(e,t),e.prototype.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},e.prototype.onMediaAttaching=function(t){var e=this.hls.config;e.capLevelOnFPSDrop&&("function"==typeof(this.video=t.media instanceof window.HTMLVideoElement?t.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),e.fpsDroppedMonitoringPeriod))},e.prototype.checkFPS=function(t,e,n){var r=zt.now();if(e){if(this.lastTime){var i=r-this.lastTime,a=n-this.lastDroppedFrames,o=e-this.lastDecodedFrames,s=1e3*a/i,c=this.hls;if(c.trigger(u.a.FPS_DROP,{currentDropped:a,currentDecoded:o,totalDroppedFrames:n}),s>0&&a>c.config.fpsDroppedMonitoringThreshold*o){var d=c.currentLevel;l.b.warn("drop FPS ratio greater than max allowed value for currentLevel: "+d),d>0&&(-1===c.autoLevelCapping||c.autoLevelCapping>=d)&&(d-=1,c.trigger(u.a.FPS_DROP_LEVEL_CAPPING,{level:d,droppedLevel:c.currentLevel}),c.autoLevelCapping=d,c.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=e}},e.prototype.checkFPSInterval=function(){var t=this.video;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},e}(h),Wt=window,qt=Wt.performance,Xt=Wt.XMLHttpRequest,Jt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}return t.prototype.destroy=function(){this.abort(),this.loader=null},t.prototype.abort=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},t.prototype.load=function(t,e,n){this.context=t,this.config=e,this.callbacks=n,this.stats={trequest:qt.now(),retry:0},this.retryDelay=e.retryDelay,this.loadInternal()},t.prototype.loadInternal=function(){var t=void 0,e=this.context;t=this.loader=new Xt;var n=this.stats;n.tfirst=0,n.loaded=0;var r=this.xhrSetup;try{if(r)try{r(t,e.url)}catch(n){t.open("GET",e.url,!0),r(t,e.url)}t.readyState||t.open("GET",e.url,!0)}catch(n){return void this.callbacks.onError({code:t.status,text:n.message},e,t)}e.rangeEnd&&t.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.responseType=e.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),t.send()},t.prototype.readystatechange=function(t){var e=t.currentTarget,n=e.readyState,r=this.stats,i=this.context,a=this.config;if(!r.aborted&&n>=2)if(window.clearTimeout(this.requestTimeout),0===r.tfirst&&(r.tfirst=Math.max(qt.now(),r.trequest)),4===n){var o=e.status;if(o>=200&&o<300){r.tload=Math.max(r.tfirst,qt.now());var s=void 0,u=void 0;u="arraybuffer"===i.responseType?(s=e.response).byteLength:(s=e.responseText).length,r.loaded=r.total=u;var c={url:e.responseURL,data:s};this.callbacks.onSuccess(c,r,i,e)}else r.retry>=a.maxRetry||o>=400&&o<499?(l.b.error(o+" while loading "+i.url),this.callbacks.onError({code:o,text:e.statusText},i,e)):(l.b.warn(o+" while loading "+i.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),r.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),a.timeout)},t.prototype.loadtimeout=function(){l.b.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},t.prototype.loadprogress=function(t){var e=t.currentTarget,n=this.stats;n.loaded=t.loaded,t.lengthComputable&&(n.total=t.total);var r=this.callbacks.onProgress;r&&r(n,this.context,null,e)},t}(),Qt=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}}(),Zt=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,t.call(this,n,u.a.MANIFEST_LOADING,u.a.MANIFEST_PARSED,u.a.AUDIO_TRACK_LOADED,u.a.AUDIO_TRACK_SWITCHED,u.a.LEVEL_LOADED,u.a.ERROR));return r._trackId=-1,r._selectDefaultTrack=!0,r.tracks=[],r.trackIdBlacklist=Object.create(null),r.audioGroupId=null,r}return function(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)}(e,t),e.prototype.onManifestLoading=function(){this.tracks=[],this._trackId=-1,this._selectDefaultTrack=!0},e.prototype.onManifestParsed=function(t){var e=this.tracks=t.audioTracks||[];this.hls.trigger(u.a.AUDIO_TRACKS_UPDATED,{audioTracks:e})},e.prototype.onAudioTrackLoaded=function(t){if(t.id>=this.tracks.length)l.b.warn("Invalid audio track id:",t.id);else{if(l.b.log("audioTrack "+t.id+" loaded"),this.tracks[t.id].details=t.details,t.details.live&&!this.hasInterval()){var e=1e3*t.details.targetduration;this.setInterval(e)}!t.details.live&&this.hasInterval()&&this.clearInterval()}},e.prototype.onAudioTrackSwitched=function(t){var e=this.tracks[t.id].groupId;e&&this.audioGroupId!==e&&(this.audioGroupId=e)},e.prototype.onLevelLoaded=function(t){var e=this.hls.levels[t.level];if(e.audioGroupIds){var n=e.audioGroupIds[e.urlId];this.audioGroupId!==n&&(this.audioGroupId=n,this._selectInitialAudioTrack())}},e.prototype.onError=function(t){t.type===o.b.NETWORK_ERROR&&(t.fatal&&this.clearInterval(),t.details===o.a.AUDIO_TRACK_LOAD_ERROR&&(l.b.warn("Network failure on audio-track id:",t.context.id),this._handleLoadError()))},e.prototype._setAudioTrack=function(t){if(this._trackId===t&&this.tracks[this._trackId].details)l.b.debug("Same id as current audio-track passed, and track details available -> no-op");else if(t<0||t>=this.tracks.length)l.b.warn("Invalid id passed to audio-track controller");else{var e=this.tracks[t];l.b.log("Now switching to audio-track index "+t),this.clearInterval(),this._trackId=t;var n=e.url,r=e.type,i=e.id;this.hls.trigger(u.a.AUDIO_TRACK_SWITCHING,{id:i,type:r,url:n}),this._loadTrackDetailsIfNeeded(e)}},e.prototype.doTick=function(){this._updateTrack(this._trackId)},e.prototype._selectInitialAudioTrack=function(){var t=this,e=this.tracks;if(e.length){var n=this.tracks[this._trackId],r=null;if(n&&(r=n.name),this._selectDefaultTrack){var i=e.filter((function(t){return t.default}));i.length?e=i:l.b.warn("No default audio tracks defined")}var a=!1,s=function(){e.forEach((function(e){a||t.audioGroupId&&e.groupId!==t.audioGroupId||r&&r!==e.name||(t._setAudioTrack(e.id),a=!0)}))};s(),a||(r=null,s()),a||(l.b.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(u.a.ERROR,{type:o.b.MEDIA_ERROR,details:o.a.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},e.prototype._needsTrackLoading=function(t){var e=t.details;return!e||!!e.live||void 0},e.prototype._loadTrackDetailsIfNeeded=function(t){if(this._needsTrackLoading(t)){var e=t.url,n=t.id;l.b.log("loading audio-track playlist for id: "+n),this.hls.trigger(u.a.AUDIO_TRACK_LOADING,{url:e,id:n})}},e.prototype._updateTrack=function(t){if(!(t<0||t>=this.tracks.length)){this.clearInterval(),this._trackId=t,l.b.log("trying to update audio-track "+t);var e=this.tracks[t];this._loadTrackDetailsIfNeeded(e)}},e.prototype._handleLoadError=function(){this.trackIdBlacklist[this._trackId]=!0;var t=this._trackId,e=this.tracks[t],n=e.name,r=e.language,i=e.groupId;l.b.warn("Loading failed on audio track id: "+t+", group-id: "+i+', name/language: "'+n+'" / "'+r+'"');for(var a=t,o=0;o<this.tracks.length;o++)if(!this.trackIdBlacklist[o]&&this.tracks[o].name===n){a=o;break}a!==t?(l.b.log("Attempting audio-track fallback id:",a,"group-id:",this.tracks[a].groupId),this._setAudioTrack(a)):l.b.warn('No fallback audio-track found for name/language: "'+n+'" / "'+r+'"')},Qt(e,[{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this._trackId},set:function(t){this._setAudioTrack(t),this._selectDefaultTrack=!1}}]),e}(ft),te=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}}(),ee=window.performance,ne="STOPPED",re="STARTING",ie="IDLE",ae="PAUSED",oe="KEY_LOADING",se="FRAG_LOADING",ue="FRAG_LOADING_WAITING_RETRY",le="WAITING_TRACK",ce="PARSING",de="PARSED",fe="BUFFER_FLUSHING",he="ENDED",pe="ERROR",ge="WAITING_INIT_PTS",ye=function(t){function e(n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(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}(this,t.call(this,n,u.a.MEDIA_ATTACHED,u.a.MEDIA_DETACHING,u.a.AUDIO_TRACKS_UPDATED,u.a.AUDIO_TRACK_SWITCHING,u.a.AUDIO_TRACK_LOADED,u.a.KEY_LOADED,u.a.FRAG_LOADED,u.a.FRAG_PARSING_INIT_SEGMENT,u.a.FRAG_PARSING_DATA,u.a.FRAG_PARSED,u.a.ERROR,u.a.BUFFER_RESET,u.a.BUFFER_CREATED,u.a.BUFFER_APPENDED,u.a.BUFFER_FLUSHED,u.a.INIT_PTS_FOUND));return i.fragmentTracker=r,i.config=n.config,i.audioCodecSwap=!1,i._state=ne,i.initPTS=[],i.waitingFragment=null,i.videoTrackCC=null,i}return function(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)}(e,t),e.prototype.onHandlerDestroying=function(){this.stopLoad(),t.prototype.onHandlerDestroying.call(this)},e.prototype.onHandlerDestroyed=function(){this.state=ne,this.fragmentTracker=null,t.prototype.onHandlerDestroyed.call(this)},e.prototype.onInitPtsFound=function(t){var e=t.id,n=t.frag.cc,r=t.initPTS;"main"===e&&(this.initPTS[n]=r,this.videoTrackCC=n,l.b.log("InitPTS for cc: "+n+" found from video track: "+r),this.state===ge&&this.tick())},e.prototype.startLoad=function(t){if(this.tracks){var e=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,e>0&&-1===t?(l.b.log("audio:override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=ie):(this.lastCurrentTime=this.startPosition?this.startPosition:t,this.state=re),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=t,this.state=ne},e.prototype.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragmentTracker.removeFragment(t),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=ne},e.prototype.doTick=function(){var t=void 0,e=void 0,n=void 0,r=this.hls,i=r.config;switch(this.state){case pe:case ae:case fe:break;case re:this.state=le,this.loadedmetadata=!1;break;case ie:var a=this.tracks;if(!a)break;if(!this.media&&(this.startFragRequested||!i.startFragPrefetch))break;if(this.loadedmetadata)t=this.media.currentTime;else if(void 0===(t=this.nextLoadPosition))break;var o=this.mediaBuffer?this.mediaBuffer:this.media,c=this.videoBuffer?this.videoBuffer:this.media,d=z.bufferInfo(o,t,i.maxBufferHole),f=z.bufferInfo(c,t,i.maxBufferHole),h=d.len,p=d.end,g=this.fragPrevious,y=Math.min(i.maxBufferLength,i.maxMaxBufferLength),v=Math.max(y,f.len),m=this.audioSwitch,b=this.trackId;if((h<v||m)&&b<a.length){if(void 0===(n=a[b].details)){this.state=le;break}if(!m&&!n.live&&g&&g.sn===n.endSN&&!d.nextStart&&(!this.media.seeking||this.media.duration-p<g.duration/2)){this.hls.trigger(u.a.BUFFER_EOS,{type:"audio"}),this.state=he;break}var A=n.fragments,_=A.length,E=A[0].start,T=A[_-1].start+A[_-1].duration,w=void 0;if(m)if(n.live&&!n.PTSKnown)l.b.log("switching audiotrack, live stream, unknown PTS,load first fragment"),p=0;else if(p=t,n.PTSKnown&&t<E){if(!(d.end>E||d.nextStart))return;l.b.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=E+.05}if(n.initSegment&&!n.initSegment.data)w=n.initSegment;else if(p<=E){if(w=A[0],null!==this.videoTrackCC&&w.cc!==this.videoTrackCC&&(w=function(t,e){return Y.search(t,(function(t){return t.cc<e?1:t.cc>e?-1:0}))}(A,this.videoTrackCC)),n.live&&w.loadIdx&&w.loadIdx===this.fragLoadIdx){var S=d.nextStart?d.nextStart:E;return l.b.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(S+.05)),void(this.media.currentTime=S+.05)}}else{var k=void 0,C=i.maxFragLookUpTolerance,L=g?A[g.sn-A[0].sn+1]:void 0,x=function(t){var e=Math.min(C,t.duration);return t.start+t.duration-e<=p?1:t.start-e>p&&t.start?-1:0};p<T?(p>T-C&&(C=0),k=L&&!x(L)?L:Y.search(A,x)):k=A[_-1],k&&(w=k,E=k.start,g&&w.level===g.level&&w.sn===g.sn&&(w.sn<n.endSN?(w=A[w.sn+1-n.startSN],l.b.log("SN just loaded, load next one: "+w.sn)):w=null))}w&&(w.encrypted?(l.b.log("Loading key for "+w.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+b),this.state=oe,r.trigger(u.a.KEY_LOADING,{frag:w})):(l.b.log("Loading "+w.sn+", cc: "+w.cc+" of ["+n.startSN+" ,"+n.endSN+"],track "+b+", currentTime:"+t+",bufferEnd:"+p.toFixed(3)),(m||this.fragmentTracker.getState(w)===j)&&(this.fragCurrent=w,this.startFragRequested=!0,Object(s.a)(w.sn)&&(this.nextLoadPosition=w.start+w.duration),r.trigger(u.a.FRAG_LOADING,{frag:w}),this.state=se)))}break;case le:(e=this.tracks[this.trackId])&&e.details&&(this.state=ie);break;case ue:var R=ee.now(),I=this.retryDate,P=(o=this.media)&&o.seeking;(!I||R>=I||P)&&(l.b.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=ie);break;case ge:var O=this.videoTrackCC;if(void 0===this.initPTS[O])break;var D=this.waitingFragment;if(D){var M=D.frag.cc;O!==M?(e=this.tracks[this.trackId]).details&&e.details.live&&(l.b.warn("Waiting fragment CC ("+M+") does not match video track CC ("+O+")"),this.waitingFragment=null,this.state=ie):(this.state=se,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=ie}},e.prototype.onMediaAttached=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)},e.prototype.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(l.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.stopLoad()},e.prototype.onMediaSeeking=function(){this.state===he&&(this.state=ie),this.media&&(this.lastCurrentTime=this.media.currentTime),this.tick()},e.prototype.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},e.prototype.onAudioTracksUpdated=function(t){l.b.log("audio tracks updated"),this.tracks=t.audioTracks},e.prototype.onAudioTrackSwitching=function(t){var e=!!t.url;this.trackId=t.id,this.fragCurrent=null,this.state=ae,this.waitingFragment=null,e?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),e&&(this.audioSwitch=!0,this.state=ie),this.tick()},e.prototype.onAudioTrackLoaded=function(t){var e=t.details,n=t.id,r=this.tracks[n],i=e.totalduration,a=0;if(l.b.log("track "+n+" loaded ["+e.startSN+","+e.endSN+"],duration:"+i),e.live){var o=r.details;o&&e.fragments.length>0?(ot(o,e),a=e.fragments[0].start,e.PTSKnown?l.b.log("live audio playlist sliding:"+a.toFixed(3)):l.b.log("live audio playlist - outdated PTS, unknown sliding")):(e.PTSKnown=!1,l.b.log("live audio playlist - first load, unknown sliding"))}else e.PTSKnown=!1;if(r.details=e,!this.startFragRequested){if(-1===this.startPosition){var u=e.startTimeOffset;Object(s.a)(u)?(l.b.log("start time offset found in playlist, adjust startPosition to "+u),this.startPosition=u):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===le&&(this.state=ie),this.tick()},e.prototype.onKeyLoaded=function(){this.state===oe&&(this.state=ie,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,n=t.frag;if(this.state===se&&e&&"audio"===n.type&&n.level===e.level&&n.sn===e.sn){var r=this.tracks[this.trackId],i=r.details,a=i.totalduration,o=e.level,s=e.sn,c=e.cc,d=this.config.defaultAudioCodec||r.audioCodec||"mp4a.40.2",f=this.stats=t.stats;if("initSegment"===s)this.state=ie,f.tparsed=f.tbuffered=ee.now(),i.initSegment.data=t.payload,this.hls.trigger(u.a.FRAG_BUFFERED,{stats:f,frag:e,id:"audio"}),this.tick();else{this.state=ce,this.appended=!1,this.demuxer||(this.demuxer=new nt(this.hls,"audio"));var h=this.initPTS[c],p=i.initSegment?i.initSegment.data:[];i.initSegment||void 0!==h?(this.pendingBuffering=!0,l.b.log("Demuxing "+s+" of ["+i.startSN+" ,"+i.endSN+"],track "+o),this.demuxer.push(t.payload,p,d,null,e,a,!1,h)):(l.b.log("unknown video PTS for continuity counter "+c+", waiting for video PTS before demuxing audio frag "+s+" of ["+i.startSN+" ,"+i.endSN+"],track "+o),this.waitingFragment=t,this.state=ge)}}this.fragLoadError=0},e.prototype.onFragParsingInitSegment=function(t){var e=this.fragCurrent,n=t.frag;if(e&&"audio"===t.id&&n.sn===e.sn&&n.level===e.level&&this.state===ce){var r=t.tracks,i=void 0;if(r.video&&delete r.video,i=r.audio){i.levelCodec=i.codec,i.id=t.id,this.hls.trigger(u.a.BUFFER_CODECS,r),l.b.log("audio track:audio,container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var a=i.initSegment;if(a){var o={type:"audio",data:a,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[o]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.a.BUFFER_APPENDING,o))}this.tick()}}},e.prototype.onFragParsingData=function(t){var e=this,n=this.fragCurrent,r=t.frag;if(n&&"audio"===t.id&&"audio"===t.type&&r.sn===n.sn&&r.level===n.level&&this.state===ce){var i=this.trackId,a=this.tracks[i],c=this.hls;Object(s.a)(t.endPTS)||(t.endPTS=t.startPTS+n.duration,t.endDTS=t.startDTS+n.duration),n.addElementaryStream(m.ElementaryStreamTypes.AUDIO),l.b.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),at(a.details,n,t.startPTS,t.endPTS);var d=this.audioSwitch,f=this.media,h=!1;if(d&&f)if(f.readyState){var p=f.currentTime;l.b.log("switching audio track : currentTime:"+p),p>=t.startPTS&&(l.b.log("switching audio track : flushing all audio"),this.state=fe,c.trigger(u.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),h=!0,this.audioSwitch=!1,c.trigger(u.a.AUDIO_TRACK_SWITCHED,{id:i}))}else this.audioSwitch=!1,c.trigger(u.a.AUDIO_TRACK_SWITCHED,{id:i});var g=this.pendingData;if(!g)return l.b.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void c.trigger(u.a.ERROR,{type:o.b.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([t.data1,t.data2].forEach((function(e){e&&e.length&&g.push({type:t.type,data:e,parent:"audio",content:"data"})})),!h&&g.length&&(g.forEach((function(t){e.state===ce&&(e.pendingBuffering=!0,e.hls.trigger(u.a.BUFFER_APPENDING,t))})),this.pendingData=[],this.appended=!0)),this.tick()}},e.prototype.onFragParsed=function(t){var e=this.fragCurrent,n=t.frag;e&&"audio"===t.id&&n.sn===e.sn&&n.level===e.level&&this.state===ce&&(this.stats.tparsed=ee.now(),this.state=de,this._checkAppendedParsed())},e.prototype.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},e.prototype.onBufferCreated=function(t){var e=t.tracks.audio;e&&(this.mediaBuffer=e.buffer,this.loadedmetadata=!0),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},e.prototype.onBufferAppended=function(t){if("audio"===t.parent){var e=this.state;e!==ce&&e!==de||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},e.prototype._checkAppendedParsed=function(){if(!(this.state!==de||this.appended&&this.pendingBuffering)){var t=this.fragCurrent,e=this.stats,n=this.hls;if(t){this.fragPrevious=t,e.tbuffered=ee.now(),n.trigger(u.a.FRAG_BUFFERED,{stats:e,frag:t,id:"audio"});var r=this.mediaBuffer?this.mediaBuffer:this.media;l.b.log("audio buffered : "+st.toString(r.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,n.trigger(u.a.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=ie}this.tick()}},e.prototype.onError=function(t){var e=t.frag;if(!e||"audio"===e.type)switch(t.details){case o.a.FRAG_LOAD_ERROR:case o.a.FRAG_LOAD_TIMEOUT:var n=t.frag;if(n&&"audio"!==n.type)break;if(!t.fatal){var r=this.fragLoadError;r?r++:r=1;var i=this.config;if(r<=i.fragLoadingMaxRetry){this.fragLoadError=r;var a=Math.min(Math.pow(2,r-1)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);l.b.warn("AudioStreamController: frag loading failed, retry in "+a+" ms"),this.retryDate=ee.now()+a,this.state=ue}else l.b.error("AudioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=pe}break;case o.a.AUDIO_TRACK_LOAD_ERROR:case o.a.AUDIO_TRACK_LOAD_TIMEOUT:case o.a.KEY_LOAD_ERROR:case o.a.KEY_LOAD_TIMEOUT:this.state!==pe&&(this.state=t.fatal?pe:ie,l.b.warn("AudioStreamController: "+t.details+" while loading frag, now switching to "+this.state+" state ..."));break;case o.a.BUFFER_FULL_ERROR:if("audio"===t.parent&&(this.state===ce||this.state===de)){var s=this.mediaBuffer,c=this.media.currentTime;if(s&&z.isBuffered(s,c)&&z.isBuffered(s,c+.5)){var d=this.config;d.maxMaxBufferLength>=d.maxBufferLength&&(d.maxMaxBufferLength/=2,l.b.warn("AudioStreamController: reduce max buffer length to "+d.maxMaxBufferLength+"s")),this.state=ie}else l.b.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=fe,this.hls.trigger(u.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}},e.prototype.onBufferFlushed=function(){var t=this,e=this.pendingData;e&&e.length?(l.b.log("AudioStreamController: appending pending audio data after buffer flushed"),e.forEach((function(e){t.hls.trigger(u.a.BUFFER_APPENDING,e)})),this.appended=!0,this.pendingData=[],this.state=de):(this.state=ie,this.fragPrevious=null,this.tick())},te(e,[{key:"state",set:function(t){if(this.state!==t){var e=this.state;this._state=t,l.b.log("audio stream:"+e+"->"+t)}},get:function(){return this._state}}]),e}(ft),ve=function(){if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var t={"":!0,lr:!0,rl:!0},e={start:!0,middle:!0,end:!0,left:!0,right:!0};function n(t){return"string"==typeof t&&!!e[t.toLowerCase()]&&t.toLowerCase()}function r(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function i(e,i,a){var o=this,s=function(){if("undefined"!=typeof navigator)return/MSIE\s8\.0/.test(navigator.userAgent)}(),u={};s?o=document.createElement("custom"):u.enumerable=!0,o.hasBeenReset=!1;var l="",c=!1,d=e,f=i,h=a,p=null,g="",y=!0,v="auto",m="start",b=50,A="middle",_=50,E="middle";if(Object.defineProperty(o,"id",r({},u,{get:function(){return l},set:function(t){l=""+t}})),Object.defineProperty(o,"pauseOnExit",r({},u,{get:function(){return c},set:function(t){c=!!t}})),Object.defineProperty(o,"startTime",r({},u,{get:function(){return d},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");d=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",r({},u,{get:function(){return f},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");f=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"text",r({},u,{get:function(){return h},set:function(t){h=""+t,this.hasBeenReset=!0}})),Object.defineProperty(o,"region",r({},u,{get:function(){return p},set:function(t){p=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",r({},u,{get:function(){return g},set:function(e){var n=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");g=n,this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",r({},u,{get:function(){return y},set:function(t){y=!!t,this.hasBeenReset=!0}})),Object.defineProperty(o,"line",r({},u,{get:function(){return v},set:function(t){if("number"!=typeof t&&"auto"!==t)throw new SyntaxError("An invalid number or illegal string was specified.");v=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",r({},u,{get:function(){return m},set:function(t){var e=n(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");m=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"position",r({},u,{get:function(){return b},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",r({},u,{get:function(){return A},set:function(t){var e=n(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");A=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",r({},u,{get:function(){return _},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");_=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",r({},u,{get:function(){return E},set:function(t){var e=n(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");E=e,this.hasBeenReset=!0}})),o.displayState=void 0,s)return o}return i.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},i}(),me=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}};function be(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new me,this.regionList=[]}function Ae(){this.values=Object.create(null)}function _e(t,e,n,r){var i=r?t.split(r):[t];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&e(o[0],o[1])}}Ae.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,n){return n?this.has(t)?this.values[t]:e[n]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,n){for(var r=0;r<n.length;++r)if(e===n[r]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e))>=0&&e<=100)&&(this.set(t,e),!0)}};var Ee=new ve(0,0,0),Te="middle"===Ee.align?"middle":"center";function we(t,e,n){var r=t;function i(){var e=function(t){function e(t,e,n,r){return 3600*(0|t)+60*(0|e)+(0|n)+(0|r)/1e3}var n=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?e(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?e(n[1],n[2],0,n[4]):e(0,n[1],n[2],n[4]):null}(t);if(null===e)throw new Error("Malformed timestamp: "+r);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function a(){t=t.replace(/^\s+/,"")}if(a(),e.startTime=i(),a(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);t=t.substr(3),a(),e.endTime=i(),a(),function(t,e){var r=new Ae;_e(t,(function(t,e){switch(t){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===e){r.set(t,n[i].region);break}break;case"vertical":r.alt(t,e,["rl","lr"]);break;case"line":var a=e.split(","),o=a[0];r.integer(t,o),r.percent(t,o)&&r.set("snapToLines",!1),r.alt(t,o,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start",Te,"end"]);break;case"position":a=e.split(","),r.percent(t,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start",Te,"end","line-left","line-right","auto"]);break;case"size":r.percent(t,e);break;case"align":r.alt(t,e,["start",Te,"end","left","right"])}}),/:/,/\s/),e.region=r.get("region",null),e.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===Ee.line&&(i=-1),e.line=i,e.lineAlign=r.get("lineAlign","start"),e.snapToLines=r.get("snapToLines",!0),e.size=r.get("size",100),e.align=r.get("align",Te);var a=r.get("position","auto");"auto"===a&&50===Ee.position&&(a="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=a}(t,e)}function Se(t){return t.replace(/<br(?: \/)?>/gi,"\n")}be.prototype={parse:function(t){var e=this;function n(){var t=e.buffer,n=0;for(t=Se(t);n<t.length&&"\r"!==t[n]&&"\n"!==t[n];)++n;var r=t.substr(0,n);return"\r"===t[n]&&++n,"\n"===t[n]&&++n,e.buffer=t.substr(n),r}t&&(e.buffer+=e.decoder.decode(t,{stream:!0}));try{var r=void 0;if("INITIAL"===e.state){if(!/\r\n|\n/.test(e.buffer))return this;var i=(r=n()).match(/^()?WEBVTT([ \t].*)?$/);if(!i||!i[0])throw new Error("Malformed WebVTT signature.");e.state="HEADER"}for(var a=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(a?a=!1:r=n(),e.state){case"HEADER":/:/.test(r)?_e(r,(function(t,e){}),/:/):r||(e.state="ID");continue;case"NOTE":r||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){e.state="NOTE";break}if(!r)continue;if(e.cue=new ve(0,0,""),e.state="CUE",-1===r.indexOf("--\x3e")){e.cue.id=r;continue}case"CUE":try{we(r,e.cue,e.regionList)}catch(t){e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var o=-1!==r.indexOf("--\x3e");if(!r||o&&(a=!0)){e.oncue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}e.cue.text&&(e.cue.text+="\n"),e.cue.text+=r;continue;case"BADCUE":r||(e.state="ID");continue}}}catch(t){"CUETEXT"===e.state&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state="INITIAL"===e.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new Error("Malformed WebVTT signature.")}catch(t){throw t}return this.onflush&&this.onflush(),this}};var ke=be;function Ce(t,e,n,r){for(var i=void 0,a=void 0,o=void 0,s=void 0,u=void 0,l=window.VTTCue||window.TextTrackCue,c=0;c<r.rows.length;c++)if(o=!0,s=0,u="",!(i=r.rows[c]).isEmpty()){for(var d=0;d<i.chars.length;d++)i.chars[d].uchar.match(/\s/)&&o?s++:(u+=i.chars[d].uchar,o=!1);i.cueStartTime=e,e===n&&(n+=1e-4),a=new l(e,n,Se(u.trim())),s>=16?s--:s++,navigator.userAgent.match(/Firefox\//)?a.line=c+1:a.line=c>7?c-2:c+1,a.align="left",a.position=Math.max(0,Math.min(100,s/32*100+(navigator.userAgent.match(/Firefox\//)?50:0))),t.addCue(a)}}function Le(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var xe={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},Re=function(t){var e=t;return xe.hasOwnProperty(t)&&(e=xe[t]),String.fromCharCode(e)},Ie={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Pe={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Oe={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},De={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Me=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],Ne={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){this.verboseFilter[t],this.verboseLevel}},Ue=function(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n].toString(16));return e},Fe=function(){function t(e,n,r,i,a){Le(this,t),this.foreground=e||"white",this.underline=n||!1,this.italics=r||!1,this.background=i||"black",this.flash=a||!1}return t.prototype.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.prototype.setStyles=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])}},t.prototype.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.prototype.equals=function(t){return this.foreground===t.foreground&&this.underline===t.underline&&this.italics===t.italics&&this.background===t.background&&this.flash===t.flash},t.prototype.copy=function(t){this.foreground=t.foreground,this.underline=t.underline,this.italics=t.italics,this.background=t.background,this.flash=t.flash},t.prototype.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},t}(),Be=function(){function t(e,n,r,i,a,o){Le(this,t),this.uchar=e||" ",this.penState=new Fe(n,r,i,a,o)}return t.prototype.reset=function(){this.uchar=" ",this.penState.reset()},t.prototype.setChar=function(t,e){this.uchar=t,this.penState.copy(e)},t.prototype.setPenState=function(t){this.penState.copy(t)},t.prototype.equals=function(t){return this.uchar===t.uchar&&this.penState.equals(t.penState)},t.prototype.copy=function(t){this.uchar=t.uchar,this.penState.copy(t.penState)},t.prototype.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},t}(),je=function(){function t(){Le(this,t),this.chars=[];for(var e=0;e<100;e++)this.chars.push(new Be);this.pos=0,this.currPenState=new Fe}return t.prototype.equals=function(t){for(var e=!0,n=0;n<100;n++)if(!this.chars[n].equals(t.chars[n])){e=!1;break}return e},t.prototype.copy=function(t){for(var e=0;e<100;e++)this.chars[e].copy(t.chars[e])},t.prototype.isEmpty=function(){for(var t=!0,e=0;e<100;e++)if(!this.chars[e].isEmpty()){t=!1;break}return t},t.prototype.setCursor=function(t){this.pos!==t&&(this.pos=t),this.pos<0?(Ne.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>100&&(Ne.log("ERROR","Too large cursor position "+this.pos),this.pos=100)},t.prototype.moveCursor=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)},t.prototype.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.prototype.insertChar=function(t){t>=144&&this.backSpace();var e=Re(t);this.pos>=100?Ne.log("ERROR","Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1))},t.prototype.clearFromPos=function(t){var e=void 0;for(e=t;e<100;e++)this.chars[e].reset()},t.prototype.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.prototype.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.prototype.getTextString=function(){for(var t=[],e=!0,n=0;n<100;n++){var r=this.chars[n].uchar;" "!==r&&(e=!1),t.push(r)}return e?"":t.join("")},t.prototype.setPenStyles=function(t){this.currPenState.setStyles(t),this.chars[this.pos].setPenState(this.currPenState)},t}(),Ke=function(){function t(){Le(this,t),this.rows=[];for(var e=0;e<15;e++)this.rows.push(new je);this.currRow=14,this.nrRollUpRows=null,this.reset()}return t.prototype.reset=function(){for(var t=0;t<15;t++)this.rows[t].clear();this.currRow=14},t.prototype.equals=function(t){for(var e=!0,n=0;n<15;n++)if(!this.rows[n].equals(t.rows[n])){e=!1;break}return e},t.prototype.copy=function(t){for(var e=0;e<15;e++)this.rows[e].copy(t.rows[e])},t.prototype.isEmpty=function(){for(var t=!0,e=0;e<15;e++)if(!this.rows[e].isEmpty()){t=!1;break}return t},t.prototype.backSpace=function(){this.rows[this.currRow].backSpace()},t.prototype.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.prototype.insertChar=function(t){this.rows[this.currRow].insertChar(t)},t.prototype.setPen=function(t){this.rows[this.currRow].setPenStyles(t)},t.prototype.moveCursor=function(t){this.rows[this.currRow].moveCursor(t)},t.prototype.setCursor=function(t){Ne.log("INFO","setCursor: "+t),this.rows[this.currRow].setCursor(t)},t.prototype.setPAC=function(t){Ne.log("INFO","pacData = "+JSON.stringify(t));var e=t.row-1;if(this.nrRollUpRows&&e<this.nrRollUpRows-1&&(e=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==e){for(var n=0;n<15;n++)this.rows[n].clear();var r=this.currRow+1-this.nrRollUpRows,i=this.lastOutputScreen;if(i){var a=i.rows[r].cueStartTime;if(a&&a<Ne.time)for(var o=0;o<this.nrRollUpRows;o++)this.rows[e-this.nrRollUpRows+o+1].copy(i.rows[r+o])}}this.currRow=e;var s=this.rows[this.currRow];if(null!==t.indent){var u=t.indent,l=Math.max(u-1,0);s.setCursor(t.indent),t.color=s.chars[l].penState.foreground}var c={foreground:t.color,underline:t.underline,italics:t.italics,background:"black",flash:!1};this.setPen(c)},t.prototype.setBkgData=function(t){Ne.log("INFO","bkgData = "+JSON.stringify(t)),this.backSpace(),this.setPen(t),this.insertChar(32)},t.prototype.setRollUpRows=function(t){this.nrRollUpRows=t},t.prototype.rollUp=function(){if(null!==this.nrRollUpRows){Ne.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),Ne.log("INFO","Rolling up")}else Ne.log("DEBUG","roll_up but nrRollUpRows not set yet")},t.prototype.getDisplayText=function(t){t=t||!1;for(var e=[],n="",r=-1,i=0;i<15;i++){var a=this.rows[i].getTextString();a&&(r=i+1,t?e.push("Row "+r+": '"+a+"'"):e.push(a.trim()))}return e.length>0&&(n=t?"["+e.join(" | ")+"]":e.join("\n")),n},t.prototype.getTextAndFormat=function(){return this.rows},t}(),Ve=function(){function t(e,n){Le(this,t),this.chNr=e,this.outputFilter=n,this.mode=null,this.verbose=0,this.displayedMemory=new Ke,this.nonDisplayedMemory=new Ke,this.lastOutputScreen=new Ke,this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return t.prototype.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},t.prototype.getHandler=function(){return this.outputFilter},t.prototype.setHandler=function(t){this.outputFilter=t},t.prototype.setPAC=function(t){this.writeScreen.setPAC(t)},t.prototype.setBkgData=function(t){this.writeScreen.setBkgData(t)},t.prototype.setMode=function(t){t!==this.mode&&(this.mode=t,Ne.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)},t.prototype.insertChars=function(t){for(var e=0;e<t.length;e++)this.writeScreen.insertChar(t[e]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";Ne.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(Ne.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},t.prototype.ccRCL=function(){Ne.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.prototype.ccBS=function(){Ne.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.prototype.ccAOF=function(){},t.prototype.ccAON=function(){},t.prototype.ccDER=function(){Ne.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.prototype.ccRU=function(t){Ne.log("INFO","RU("+t+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(t)},t.prototype.ccFON=function(){Ne.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.prototype.ccRDC=function(){Ne.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.prototype.ccTR=function(){Ne.log("INFO","TR"),this.setMode("MODE_TEXT")},t.prototype.ccRTD=function(){Ne.log("INFO","RTD"),this.setMode("MODE_TEXT")},t.prototype.ccEDM=function(){Ne.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.prototype.ccCR=function(){Ne.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.prototype.ccENM=function(){Ne.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.prototype.ccEOC=function(){if(Ne.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,Ne.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},t.prototype.ccTO=function(t){Ne.log("INFO","TO("+t+") - Tab Offset"),this.writeScreen.moveCursor(t)},t.prototype.ccMIDROW=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;e.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}Ne.log("INFO","MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},t.prototype.outputDataUpdate=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=Ne.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),!0===t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue()),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},t.prototype.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}(),Ge=function(){function t(e,n,r){Le(this,t),this.field=e||1,this.outputs=[n,r],this.channels=[new Ve(1,n),new Ve(2,r)],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 t.prototype.getHandler=function(t){return this.channels[t].getHandler()},t.prototype.setHandler=function(t,e){this.channels[t].setHandler(e)},t.prototype.addData=function(t,e){var n=void 0,r=void 0,i=void 0,a=!1;this.lastTime=t,Ne.setTime(t);for(var o=0;o<e.length;o+=2)r=127&e[o],i=127&e[o+1],0!==r||0!==i?(Ne.log("DATA","["+Ue([e[o],e[o+1]])+"] -> ("+Ue([r,i])+")"),(n=this.parseCmd(r,i))||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),n||(a=this.parseChars(r,i))&&(this.currChNr&&this.currChNr>=0?this.channels[this.currChNr-1].insertChars(a):Ne.log("WARNING","No channel found yet. TEXT-MODE?")),n?this.dataCounters.cmd+=2:a?this.dataCounters.char+=2:(this.dataCounters.other+=2,Ne.log("WARNING","Couldn't parse cleaned data "+Ue([r,i])+" orig: "+Ue([e[o],e[o+1]])))):this.dataCounters.padding+=2},t.prototype.parseCmd=function(t,e){var n=null;if(!((20===t||28===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=33&&e<=35))return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,Ne.log("DEBUG","Repeated command ("+Ue([t,e])+") is dropped"),!0;n=20===t||23===t?1:2;var r=this.channels[n-1];return 20===t||28===t?32===e?r.ccRCL():33===e?r.ccBS():34===e?r.ccAOF():35===e?r.ccAON():36===e?r.ccDER():37===e?r.ccRU(2):38===e?r.ccRU(3):39===e?r.ccRU(4):40===e?r.ccFON():41===e?r.ccRDC():42===e?r.ccTR():43===e?r.ccRTD():44===e?r.ccEDM():45===e?r.ccCR():46===e?r.ccENM():47===e&&r.ccEOC():r.ccTO(e-32),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=n,!0},t.prototype.parseMidrow=function(t,e){var n=null;return(17===t||25===t)&&e>=32&&e<=47&&((n=17===t?1:2)!==this.currChNr?(Ne.log("ERROR","Mismatch channel in midrow parsing"),!1):(this.channels[n-1].ccMIDROW(e),Ne.log("DEBUG","MIDROW ("+Ue([t,e])+")"),!0))},t.prototype.parsePAC=function(t,e){var n,r=null;if(!((t>=17&&t<=23||t>=25&&t<=31)&&e>=64&&e<=127||(16===t||24===t)&&e>=64&&e<=95))return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;n=t<=23?1:2,r=e>=64&&e<=95?1===n?Ie[t]:Oe[t]:1===n?Pe[t]:De[t];var i=this.interpretPAC(r,e);return this.channels[n-1].setPAC(i),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=n,!0},t.prototype.interpretPAC=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},t.prototype.parseChars=function(t,e){var n=null,r=null,i=null;if(t>=25?(n=2,i=t-8):(n=1,i=t),i>=17&&i<=19){var a=e;a=17===i?e+80:18===i?e+112:e+144,Ne.log("INFO","Special char '"+Re(a)+"' in channel "+n),r=[a]}else t>=32&&t<=127&&(r=0===e?[t]:[t,e]);if(r){var o=Ue(r);Ne.log("DEBUG","Char codes = "+o.join(",")),this.lastCmdA=null,this.lastCmdB=null}return r},t.prototype.parseBackgroundAttributes=function(t,e){var n,r=void 0,i=void 0;return((16===t||24===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=45&&e<=47)&&(r={},16===t||24===t?(i=Math.floor((e-32)/2),r.background=Me[i],e%2==1&&(r.background=r.background+"_semi")):45===e?r.background="transparent":(r.foreground="black",47===e&&(r.underline=!0)),n=t<24?1:2,this.channels[n-1].setBkgData(r),this.lastCmdA=null,this.lastCmdB=null,!0)},t.prototype.reset=function(){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].reset();this.lastCmdA=null,this.lastCmdB=null},t.prototype.cueSplitAtTime=function(t){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].cueSplitAtTime(t)},t}(),He=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.timelineController=e,this.trackName=n,this.startTime=null,this.endTime=null,this.screen=null}return t.prototype.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen),this.startTime=null)},t.prototype.newCue=function(t,e,n){(null===this.startTime||this.startTime>t)&&(this.startTime=t),this.endTime=e,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},t}(),Ye=function(t,e,n){return t.substr(n||0,e.length)===e},ze=function(t){for(var e=5381,n=t.length;n;)e=33*e^t.charCodeAt(--n);return(e>>>0).toString()},$e={parse:function(t,e,n,r,i,a){var o=Object(Ot.b)(new Uint8Array(t)).trim().replace(/\r\n|\n\r|\n|\r/g,"\n").split("\n"),u="00:00.000",l=0,c=0,d=0,f=[],h=void 0,p=!0,g=new ke;g.oncue=function(t){var e=n[r],i=n.ccOffset;e&&e.new&&(void 0!==c?i=n.ccOffset=e.start:function(t,e,n){var r=t[e],i=t[r.prevCC];if(!i||!i.new&&r.new)return t.ccOffset=t.presentationOffset=r.start,void(r.new=!1);for(;i&&i.new;)t.ccOffset+=r.start-i.start,r.new=!1,i=t[(r=i).prevCC];t.presentationOffset=n}(n,r,d)),d&&(i=d+n.ccOffset-n.presentationOffset),t.startTime+=i-c,t.endTime+=i-c,t.id=ze(t.startTime.toString())+ze(t.endTime.toString())+ze(t.text),t.text=decodeURIComponent(encodeURIComponent(t.text)),t.endTime>0&&f.push(t)},g.onparsingerror=function(t){h=t},g.onflush=function(){h&&a?a(h):i(f)},o.forEach((function(t){if(p){if(Ye(t,"X-TIMESTAMP-MAP=")){p=!1,t.substr(16).split(",").forEach((function(t){Ye(t,"LOCAL:")?u=t.substr(6):Ye(t,"MPEGTS:")&&(l=parseInt(t.substr(7)))}));try{l-=e=e<0?e+8589934592:e,n=u,r=parseInt(n.substr(-3)),i=parseInt(n.substr(-6,2)),a=parseInt(n.substr(-9,2)),o=n.length>9?parseInt(n.substr(0,n.indexOf(":"))):0,c=(Object(s.a)(r)&&Object(s.a)(i)&&Object(s.a)(a)&&Object(s.a)(o)?(r+=1e3*i,r+=6e4*a,r+=36e5*o):-1)/1e3,d=l/9e4,-1===c&&(h=new Error("Malformed X-TIMESTAMP-MAP: "+t))}catch(e){h=new Error("Malformed X-TIMESTAMP-MAP: "+t)}return}""===t&&(p=!1)}var n,r,i,a,o;g.parse(t+"\n")})),g.flush()}},We=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,t.call(this,n,u.a.MEDIA_ATTACHING,u.a.MEDIA_DETACHING,u.a.FRAG_PARSING_USERDATA,u.a.FRAG_DECRYPTED,u.a.MANIFEST_LOADING,u.a.MANIFEST_LOADED,u.a.FRAG_LOADED,u.a.LEVEL_SWITCHING,u.a.INIT_PTS_FOUND));if(r.hls=n,r.config=n.config,r.enabled=!0,r.Cues=n.config.cueHandler,r.textTracks=[],r.tracks=[],r.unparsedVttFrags=[],r.initPTS=void 0,r.cueRanges=[],r.captionsTracks={},r.captionsProperties={textTrack1:{label:r.config.captionsTextTrack1Label,languageCode:r.config.captionsTextTrack1LanguageCode},textTrack2:{label:r.config.captionsTextTrack2Label,languageCode:r.config.captionsTextTrack2LanguageCode}},r.config.enableCEA708Captions){var i=new He(r,"textTrack1"),a=new He(r,"textTrack2");r.cea608Parser=new Ge(0,i,a)}return r}return function(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)}(e,t),e.prototype.addCues=function(t,e,n,r){for(var i,a,o,s,u=this.cueRanges,l=!1,c=u.length;c--;){var d=u[c],f=(i=d[0],a=d[1],o=e,s=n,Math.min(a,s)-Math.max(i,o));if(f>=0&&(d[0]=Math.min(d[0],e),d[1]=Math.max(d[1],n),l=!0,f/(n-e)>.5))return}l||u.push([e,n]),this.Cues.newCue(this.captionsTracks[t],e,n,r)},e.prototype.onInitPtsFound=function(t){var e=this;void 0===this.initPTS&&(this.initPTS=t.initPTS),this.unparsedVttFrags.length&&(this.unparsedVttFrags.forEach((function(t){e.onFragLoaded(t)})),this.unparsedVttFrags=[])},e.prototype.getExistingTrack=function(t){var e=this.media;if(e)for(var n=0;n<e.textTracks.length;n++){var r=e.textTracks[n];if(r[t])return r}return null},e.prototype.createCaptionsTrack=function(t){var e=this.captionsProperties[t],n=e.label,r=e.languageCode,i=this.captionsTracks;if(!i[t]){var a=this.getExistingTrack(t);if(a)i[t]=a,Mt(i[t]),Dt(i[t],this.media);else{var o=this.createTextTrack("captions",n,r);o&&(o[t]=!0,i[t]=o)}}},e.prototype.createTextTrack=function(t,e,n){var r=this.media;if(r)return r.addTextTrack(t,e,n)},e.prototype.destroy=function(){h.prototype.destroy.call(this)},e.prototype.onMediaAttaching=function(t){this.media=t.media,this._cleanTracks()},e.prototype.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach((function(e){Mt(t[e]),delete t[e]}))},e.prototype.onManifestLoading=function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0},this._cleanTracks()},e.prototype._cleanTracks=function(){var t=this.media;if(t){var e=t.textTracks;if(e)for(var n=0;n<e.length;n++)Mt(e[n])}},e.prototype.onManifestLoaded=function(t){var e=this;if(this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=void 0,this.cueRanges=[],this.config.enableWebVTT){this.tracks=t.subtitles||[];var n=this.media?this.media.textTracks:[];this.tracks.forEach((function(t,r){var i=void 0;if(r<n.length){var a=n[r];(function(t,e){return t&&t.label===e.name&&!(t.textTrack1||t.textTrack2)})(a,t)&&(i=a)}i||(i=e.createTextTrack("subtitles",t.name,t.lang)),t.default?i.mode=e.hls.subtitleDisplay?"showing":"hidden":i.mode="disabled",e.textTracks.push(i)}))}},e.prototype.onLevelSwitching=function(){this.enabled="NONE"!==this.hls.currentLevel.closedCaptions},e.prototype.onFragLoaded=function(t){var e=t.frag,n=t.payload;if("main"===e.type){var r=e.sn;if(r!==this.lastSn+1){var i=this.cea608Parser;i&&i.reset()}this.lastSn=r}else if("subtitle"===e.type)if(n.byteLength){if(void 0===this.initPTS)return void this.unparsedVttFrags.push(t);var a=e.decryptdata;null!=a&&null!=a.key&&"AES-128"===a.method||this._parseVTTs(e,n)}else this.hls.trigger(u.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})},e.prototype._parseVTTs=function(t,e){var n=this.vttCCs;n[t.cc]||(n[t.cc]={start:t.start,prevCC:this.prevCC,new:!0},this.prevCC=t.cc);var r=this.textTracks,i=this.hls;$e.parse(e,this.initPTS,n,t.cc,(function(e){var n=r[t.trackId];"disabled"!==n.mode?(e.forEach((function(t){if(!n.cues.getCueById(t.id))try{n.addCue(t)}catch(r){var e=new window.TextTrackCue(t.startTime,t.endTime,t.text);e.id=t.id,n.addCue(e)}})),i.trigger(u.a.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})):i.trigger(u.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t})}),(function(e){l.b.log("Failed to parse VTT cue: "+e),i.trigger(u.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t})}))},e.prototype.onFragDecrypted=function(t){var e=t.payload,n=t.frag;if("subtitle"===n.type){if(void 0===this.initPTS)return void this.unparsedVttFrags.push(t);this._parseVTTs(n,e)}},e.prototype.onFragParsingUserdata=function(t){if(this.enabled&&this.config.enableCEA708Captions)for(var e=0;e<t.samples.length;e++){var n=this.extractCea608Data(t.samples[e].bytes);this.cea608Parser.addData(t.samples[e].pts,n)}},e.prototype.extractCea608Data=function(t){for(var e=31&t[0],n=2,r=void 0,i=void 0,a=void 0,o=[],s=0;s<e;s++)r=t[n++],i=127&t[n++],a=127&t[n++],0===i&&0===a||0!=(4&r)&&0==(3&r)&&(o.push(i),o.push(a));return o},e}(h),qe=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}}();function Xe(t){for(var e=[],n=0;n<t.length;n++)"subtitles"===t[n].kind&&e.push(t[n]);return e}var Je=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,t.call(this,n,u.a.MEDIA_ATTACHED,u.a.MEDIA_DETACHING,u.a.MANIFEST_LOADING,u.a.MANIFEST_LOADED,u.a.SUBTITLE_TRACK_LOADED));return r.tracks=[],r.trackId=-1,r.media=null,r.subtitleDisplay=!0,r}return function(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)}(e,t),e.prototype._onTextTracksChanged=function(){if(this.media){for(var t=-1,e=Xe(this.media.textTracks),n=0;n<e.length;n++)if("hidden"===e[n].mode)t=n;else if("showing"===e[n].mode){t=n;break}this.subtitleTrack=t}},e.prototype.destroy=function(){h.prototype.destroy.call(this)},e.prototype.onMediaAttached=function(t){var e=this;this.media=t.media,this.media&&(this.queuedDefaultTrack&&(this.subtitleTrack=this.queuedDefaultTrack,delete this.queuedDefaultTrack),this.trackChangeListener=this._onTextTracksChanged.bind(this),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.subtitlePollingInterval=setInterval((function(){e.trackChangeListener()}),500):this.media.textTracks.addEventListener("change",this.trackChangeListener))},e.prototype.onMediaDetaching=function(){this.media&&(this.useTextTrackPolling?clearInterval(this.subtitlePollingInterval):this.media.textTracks.removeEventListener("change",this.trackChangeListener),this.media=null)},e.prototype.onManifestLoading=function(){this.tracks=[],this.trackId=-1},e.prototype.onManifestLoaded=function(t){var e=this,n=t.subtitles||[];this.tracks=n,this.trackId=-1,this.hls.trigger(u.a.SUBTITLE_TRACKS_UPDATED,{subtitleTracks:n}),n.forEach((function(t){t.default&&(e.media?e.subtitleTrack=t.id:e.queuedDefaultTrack=t.id)}))},e.prototype.onTick=function(){var t=this.trackId,e=this.tracks[t];if(e){var n=e.details;n&&!n.live||(l.b.log("(re)loading playlist for subtitle track "+t),this.hls.trigger(u.a.SUBTITLE_TRACK_LOADING,{url:e.url,id:t}))}},e.prototype.onSubtitleTrackLoaded=function(t){var e=this;t.id<this.tracks.length&&(l.b.log("subtitle track "+t.id+" loaded"),this.tracks[t.id].details=t.details,t.details.live&&!this.timer&&(this.timer=setInterval((function(){e.onTick()}),1e3*t.details.targetduration,this)),!t.details.live&&this.timer&&this._stopTimer())},e.prototype.setSubtitleTrackInternal=function(t){var e=this.hls,n=this.tracks;if(!("number"!=typeof t||t<-1||t>=n.length)&&(this._stopTimer(),this.trackId=t,l.b.log("switching to subtitle track "+t),e.trigger(u.a.SUBTITLE_TRACK_SWITCH,{id:t}),-1!==t)){var r=n[t],i=r.details;i&&!i.live||(l.b.log("(re)loading playlist for subtitle track "+t),e.trigger(u.a.SUBTITLE_TRACK_LOADING,{url:r.url,id:t}))}},e.prototype._stopTimer=function(){this.timer&&(clearInterval(this.timer),this.timer=null)},e.prototype._toggleTrackModes=function(t){var e=this.media,n=this.subtitleDisplay,r=this.trackId;if(e){var i=Xe(e.textTracks);if(-1===t)[].slice.call(i).forEach((function(t){t.mode="disabled"}));else{var a=i[r];a&&(a.mode="disabled")}var o=i[t];o&&(o.mode=n?"showing":"hidden")}},qe(e,[{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(t){this.trackId!==t&&(this._toggleTrackModes(t),this.setSubtitleTrackInternal(t))}}]),e}(h),Qe=n(8),Ze=window.performance,tn="STOPPED",en="IDLE",nn="KEY_LOADING",rn="FRAG_LOADING",an=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,t.call(this,n,u.a.MEDIA_ATTACHED,u.a.ERROR,u.a.KEY_LOADED,u.a.FRAG_LOADED,u.a.SUBTITLE_TRACKS_UPDATED,u.a.SUBTITLE_TRACK_SWITCH,u.a.SUBTITLE_TRACK_LOADED,u.a.SUBTITLE_FRAG_PROCESSED));return r.config=n.config,r.vttFragSNsProcessed={},r.vttFragQueues=void 0,r.currentlyProcessing=null,r.state=tn,r.currentTrackId=-1,r.decrypter=new Qe.a(n.observer,n.config),r}return function(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)}(e,t),e.prototype.onHandlerDestroyed=function(){this.state=tn},e.prototype.clearVttFragQueues=function(){var t=this;this.vttFragQueues={},this.tracks.forEach((function(e){t.vttFragQueues[e.id]=[]}))},e.prototype.nextFrag=function(){if(null===this.currentlyProcessing&&this.currentTrackId>-1&&this.vttFragQueues[this.currentTrackId].length){var t=this.currentlyProcessing=this.vttFragQueues[this.currentTrackId].shift();this.fragCurrent=t,this.hls.trigger(u.a.FRAG_LOADING,{frag:t}),this.state=rn}},e.prototype.onSubtitleFragProcessed=function(t){t.success&&this.vttFragSNsProcessed[t.frag.trackId].push(t.frag.sn),this.currentlyProcessing=null,this.state=en,this.nextFrag()},e.prototype.onMediaAttached=function(){this.state=en},e.prototype.onError=function(t){var e=t.frag;e&&"subtitle"!==e.type||this.currentlyProcessing&&(this.currentlyProcessing=null,this.nextFrag())},e.prototype.doTick=function(){var t=this;switch(this.state){case en:var e,n=this.tracks,r=this.currentTrackId,i=this.vttFragSNsProcessed[r],a=this.vttFragQueues[r],o=this.currentlyProcessing?this.currentlyProcessing.sn:-1;if(!n)break;if(r<n.length&&(e=n[r].details),void 0===e)break;e.fragments.forEach((function(e){(function(t){return i.indexOf(t.sn)>-1})(e)||e.sn===o||function(t){return a.some((function(e){return e.sn===t.sn}))}(e)||(e.encrypted?(l.b.log("Loading key for "+e.sn),t.state=nn,t.hls.trigger(u.a.KEY_LOADING,{frag:e})):(e.trackId=r,a.push(e),t.nextFrag()))}))}},e.prototype.onSubtitleTracksUpdated=function(t){var e=this;l.b.log("subtitle tracks updated"),this.tracks=t.subtitleTracks,this.clearVttFragQueues(),this.vttFragSNsProcessed={},this.tracks.forEach((function(t){e.vttFragSNsProcessed[t.id]=[]}))},e.prototype.onSubtitleTrackSwitch=function(t){if(this.currentTrackId=t.id,this.tracks&&-1!==this.currentTrackId){var e=this.tracks[this.currentTrackId];e&&e.details&&this.tick()}},e.prototype.onSubtitleTrackLoaded=function(){this.tick()},e.prototype.onKeyLoaded=function(){this.state===nn&&(this.state=en,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,n=t.frag.decryptdata,r=t.frag,i=this.hls;if(this.state===rn&&e&&"subtitle"===t.frag.type&&e.sn===t.frag.sn&&t.payload.byteLength>0&&null!=n&&null!=n.key&&"AES-128"===n.method){var a=void 0;try{a=Ze.now()}catch(t){a=Date.now()}this.decrypter.decrypt(t.payload,n.key.buffer,n.iv.buffer,(function(t){var e=void 0;try{e=Ze.now()}catch(t){e=Date.now()}i.trigger(u.a.FRAG_DECRYPTED,{frag:r,payload:t,stats:{tstart:a,tdecrypt:e}})}))}},e}(ft),on=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}}(),sn=window.XMLHttpRequest,un="com.widevine.alpha",ln="com.microsoft.playready",cn=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,t.call(this,n,u.a.MEDIA_ATTACHED,u.a.MANIFEST_PARSED));return r._widevineLicenseUrl=n.config.widevineLicenseUrl,r._licenseXhrSetup=n.config.licenseXhrSetup,r._emeEnabled=n.config.emeEnabled,r._requestMediaKeySystemAccess=n.config.requestMediaKeySystemAccessFunc,r._mediaKeysList=[],r._media=null,r._hasSetMediaKeys=!1,r._isMediaEncrypted=!1,r._requestLicenseFailureCount=0,r}return function(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)}(e,t),e.prototype.getLicenseServerUrl=function(t){var e=void 0;switch(t){case un:e=this._widevineLicenseUrl;break;default:e=null}return e||(l.b.error('No license server URL configured for key-system "'+t+'"'),this.hls.trigger(u.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})),e},e.prototype._attemptKeySystemAccess=function(t,e,n){var r=this,i=function(t,e,n){switch(t){case un:return function(t,e,n){var r={videoCapabilities:[]};return e.forEach((function(t){r.videoCapabilities.push({contentType:'video/mp4; codecs="'+t+'"'})})),[r]}(0,n);default:throw Error("Unknown key-system: "+t)}}(t,0,n);i?(l.b.log("Requesting encrypted media key-system access"),this.requestMediaKeySystemAccess(t,i).then((function(e){r._onMediaKeySystemAccessObtained(t,e)})).catch((function(e){l.b.error('Failed to obtain key-system "'+t+'" access:',e)}))):l.b.warn("Can not create config for key-system (maybe because platform is not supported):",t)},e.prototype._onMediaKeySystemAccessObtained=function(t,e){var n=this;l.b.log('Access for key-system "'+t+'" obtained');var r={mediaKeys:null,mediaKeysSession:null,mediaKeysSessionInitialized:!1,mediaKeySystemAccess:e,mediaKeySystemDomain:t};this._mediaKeysList.push(r),e.createMediaKeys().then((function(e){r.mediaKeys=e,l.b.log('Media-keys created for key-system "'+t+'"'),n._onMediaKeysCreated()})).catch((function(t){l.b.error("Failed to create media-keys:",t)}))},e.prototype._onMediaKeysCreated=function(){var t=this;this._mediaKeysList.forEach((function(e){e.mediaKeysSession||(e.mediaKeysSession=e.mediaKeys.createSession(),t._onNewMediaKeySession(e.mediaKeysSession))}))},e.prototype._onNewMediaKeySession=function(t){var e=this;l.b.log("New key-system session "+t.sessionId),t.addEventListener("message",(function(n){e._onKeySessionMessage(t,n.message)}),!1)},e.prototype._onKeySessionMessage=function(t,e){l.b.log("Got EME message event, creating license request"),this._requestLicense(e,(function(e){l.b.log("Received license data, updating key-session"),t.update(e)}))},e.prototype._onMediaEncrypted=function(t,e){l.b.log('Media is encrypted using "'+t+'" init data type'),this._isMediaEncrypted=!0,this._mediaEncryptionInitDataType=t,this._mediaEncryptionInitData=e,this._attemptSetMediaKeys(),this._generateRequestWithPreferredKeySession()},e.prototype._attemptSetMediaKeys=function(){if(!this._hasSetMediaKeys){var t=this._mediaKeysList[0];if(!t||!t.mediaKeys)return l.b.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(u.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_KEYS,fatal:!0});l.b.log("Setting keys for encrypted media"),this._media.setMediaKeys(t.mediaKeys),this._hasSetMediaKeys=!0}},e.prototype._generateRequestWithPreferredKeySession=function(){var t=this,e=this._mediaKeysList[0];if(!e)return l.b.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(u.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(e.mediaKeysSessionInitialized)l.b.warn("Key-Session already initialized but requested again");else{var n=e.mediaKeysSession;n||(l.b.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(u.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_SESSION,fatal:!0}));var r=this._mediaEncryptionInitDataType,i=this._mediaEncryptionInitData;l.b.log('Generating key-session request for "'+r+'" init data type'),e.mediaKeysSessionInitialized=!0,n.generateRequest(r,i).then((function(){l.b.debug("Key-session generation succeeded")})).catch((function(e){l.b.error("Error generating key-session request:",e),t.hls.trigger(u.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_SESSION,fatal:!1})}))}},e.prototype._createLicenseXhr=function(t,e,n){var r=new sn,i=this._licenseXhrSetup;try{if(i)try{i(r,t)}catch(e){r.open("POST",t,!0),i(r,t)}r.readyState||r.open("POST",t,!0)}catch(t){return l.b.error("Error setting up key-system license XHR",t),void this.hls.trigger(u.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}return r.responseType="arraybuffer",r.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,r,t,e,n),r},e.prototype._onLicenseRequestReadyStageChange=function(t,e,n,r){switch(t.readyState){case 4:if(200===t.status)this._requestLicenseFailureCount=0,l.b.log("License request succeeded"),r(t.response);else{if(l.b.error("License Request XHR failed ("+e+"). Status: "+t.status+" ("+t.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount<=3){var i=3-this._requestLicenseFailureCount+1;return l.b.warn("Retrying license request, "+i+" attempts left"),void this._requestLicense(n,r)}this.hls.trigger(u.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}}},e.prototype._generateLicenseRequestChallenge=function(t,e){var n=void 0;return t.mediaKeySystemDomain===ln?l.b.error("PlayReady is not supported (yet)"):t.mediaKeySystemDomain===un?n=e:l.b.error("Unsupported key-system:",t.mediaKeySystemDomain),n},e.prototype._requestLicense=function(t,e){l.b.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n)return l.b.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(u.a.ERROR,{type:o.b.KEY_SYSTEM_ERROR,details:o.a.KEY_SYSTEM_NO_ACCESS,fatal:!0});var r=this.getLicenseServerUrl(n.mediaKeySystemDomain),i=this._createLicenseXhr(r,t,e);l.b.log("Sending license request to URL: "+r),i.send(this._generateLicenseRequestChallenge(n,t))},e.prototype.onMediaAttached=function(t){var e=this;if(this._emeEnabled){var n=t.media;this._media=n,n.addEventListener("encrypted",(function(t){e._onMediaEncrypted(t.initDataType,t.initData)}))}},e.prototype.onManifestParsed=function(t){if(this._emeEnabled){var e=t.levels.map((function(t){return t.audioCodec})),n=t.levels.map((function(t){return t.videoCodec}));this._attemptKeySystemAccess(un,e,n)}},on(e,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),e}(h),dn={autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,liveDurationInfinity:!1,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,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:Jt,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,abrController:Kt,bufferController:Gt,capLevelController:Yt,fpsController:$t,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,requestMediaKeySystemAccessFunc:"undefined"!=typeof window&&window.navigator&&window.navigator.requestMediaKeySystemAccess?window.navigator.requestMediaKeySystemAccess.bind(window.navigator):null};dn.subtitleStreamController=an,dn.subtitleTrackController=Je,dn.timelineController=We,dn.cueHandler=r,dn.enableCEA708Captions=!0,dn.enableWebVTT=!0,dn.captionsTextTrack1Label="English",dn.captionsTextTrack1LanguageCode="en",dn.captionsTextTrack2Label="Spanish",dn.captionsTextTrack2LanguageCode="es",dn.audioStreamController=ye,dn.audioTrackController=Zt,dn.emeController=cn;var fn=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}}();function hn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n(14);var pn=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};hn(this,t);var r=t.DefaultConfig;if((n.liveSyncDurationCount||n.liveMaxLatencyDurationCount)&&(n.liveSyncDuration||n.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var i in r)i in n||(n[i]=r[i]);if(void 0!==n.liveMaxLatencyDurationCount&&n.liveMaxLatencyDurationCount<=n.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==n.liveMaxLatencyDuration&&(n.liveMaxLatencyDuration<=n.liveSyncDuration||void 0===n.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(l.a)(n.debug),this.config=n,this._autoLevelCapping=-1;var a=this.observer=new W.a;a.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];a.emit.apply(a,[t,t].concat(n))},a.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];a.removeListener.apply(a,[t].concat(n))},this.on=a.on.bind(a),this.off=a.off.bind(a),this.once=a.once.bind(a),this.trigger=a.trigger.bind(a);var o=this.abrController=new n.abrController(this),s=new n.bufferController(this),u=new n.capLevelController(this),c=new n.fpsController(this),d=new U(this),f=new F(this),h=new B(this),p=new Nt(this),g=this.levelController=new Pt(this),y=new H(this),v=this.streamController=new Lt(this,y),m=[g,v],b=n.audioStreamController;b&&m.push(new b(this,y)),this.networkControllers=m;var A=[d,f,h,o,s,u,c,p,y];if(b=n.audioTrackController){var _=new b(this);this.audioTrackController=_,A.push(_)}if(b=n.subtitleTrackController){var E=new b(this);this.subtitleTrackController=E,A.push(E)}if(b=n.emeController){var T=new b(this);this.emeController=T,A.push(T)}[n.subtitleStreamController,n.timelineController].forEach((function(t){t&&A.push(new t(e))})),this.coreComponents=A}return t.isSupported=function(){return t=Q(),e=window.SourceBuffer||window.WebKitSourceBuffer,n=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove,!!n&&!!r;var t,e,n,r},fn(t,null,[{key:"version",get:function(){return"0.11.0"}},{key:"Events",get:function(){return u.a}},{key:"ErrorTypes",get:function(){return o.b}},{key:"ErrorDetails",get:function(){return o.a}},{key:"DefaultConfig",get:function(){return t.defaultConfig?t.defaultConfig:dn},set:function(e){t.defaultConfig=e}}]),t.prototype.destroy=function(){l.b.log("destroy"),this.trigger(u.a.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach((function(t){t.destroy()})),this.url=null,this.observer.removeAllListeners(),this._autoLevelCapping=-1},t.prototype.attachMedia=function(t){l.b.log("attachMedia"),this.media=t,this.trigger(u.a.MEDIA_ATTACHING,{media:t})},t.prototype.detachMedia=function(){l.b.log("detachMedia"),this.trigger(u.a.MEDIA_DETACHING),this.media=null},t.prototype.loadSource=function(t){t=a.a.buildAbsoluteURL(window.location.href,t,{alwaysNormalize:!0}),l.b.log("loadSource:"+t),this.url=t,this.trigger(u.a.MANIFEST_LOADING,{url:t})},t.prototype.startLoad=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;l.b.log("startLoad("+t+")"),this.networkControllers.forEach((function(e){e.startLoad(t)}))},t.prototype.stopLoad=function(){l.b.log("stopLoad"),this.networkControllers.forEach((function(t){t.stopLoad()}))},t.prototype.swapAudioCodec=function(){l.b.log("swapAudioCodec"),this.streamController.swapAudioCodec()},t.prototype.recoverMediaError=function(){l.b.log("recoverMediaError");var t=this.media;this.detachMedia(),this.attachMedia(t)},fn(t,[{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(t){l.b.log("set currentLevel:"+t),this.loadLevel=t,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(t){l.b.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){l.b.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(t){this.levelController.nextLoadLevel=t}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(t){l.b.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){l.b.log("set startLevel:"+t),-1!==t&&(t=Math.max(t,this.minAutoLevel)),this.levelController.startLevel=t}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(t){l.b.log("set autoLevelCapping:"+t),this._autoLevelCapping=t}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var t=this.levels,e=this.config.minAutoBitrate,n=t?t.length:0,r=0;r<n;r++)if((t[r].realBitrate?Math.max(t[r].realBitrate,t[r].bitrate):t[r].bitrate)>e)return r;return 0}},{key:"maxAutoLevel",get:function(){var t=this.levels,e=this.autoLevelCapping;return-1===e&&t&&t.length?t.length-1:e}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(t){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}}]),t}();e.default=pn},function(t,e,n){function r(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n.oe=function(t){throw console.error(t),t};var r=n(n.s=ENTRY_MODULE);return r.default||r}function i(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function a(t,e,r){var a={};a[r]=[];var o=e.toString(),s=o.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return a;for(var u,l=s[1],c=new RegExp("(\\\\n|\\W)"+i(l)+"\\((/\\*.*?\\*/)?s?.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");u=c.exec(o);)"dll-reference"!==u[3]&&a[r].push(u[3]);for(c=new RegExp("\\("+i(l)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\((/\\*.*?\\*/)?s?.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");u=c.exec(o);)t[u[2]]||(a[r].push(u[1]),t[u[2]]=n(u[1]).m),a[u[2]]=a[u[2]]||[],a[u[2]].push(u[4]);return a}function o(t){return Object.keys(t).reduce((function(e,n){return e||t[n].length>0}),!1)}t.exports=function(t,e){e=e||{};var i={main:n.m},s=e.all?{main:Object.keys(i)}:function(t,e){for(var n={main:[e]},r={main:[]},i={main:{}};o(n);)for(var s=Object.keys(n),u=0;u<s.length;u++){var l=s[u],c=n[l].pop();if(i[l]=i[l]||{},!i[l][c]&&t[l][c]){i[l][c]=!0,r[l]=r[l]||[],r[l].push(c);for(var d=a(t,t[l][c],l),f=Object.keys(d),h=0;h<f.length;h++)n[f[h]]=n[f[h]]||[],n[f[h]]=n[f[h]].concat(d[f[h]])}}return r}(i,t),u="";Object.keys(s).filter((function(t){return"main"!==t})).forEach((function(t){for(var e=0;s[t][e];)e++;s[t].push(e),i[t][e]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",u=u+"var "+t+" = ("+r.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+s[t].map((function(e){return JSON.stringify(e)+": "+i[t][e].toString()})).join(",")+"});\n"})),u=u+"("+r.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+s.main.map((function(t){return JSON.stringify(t)+": "+i.main[t].toString()})).join(",")+"})(self);";var l=new window.Blob([u],{type:"text/javascript"});if(e.bare)return l;var c=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(l),d=new window.Worker(c);return d.objectURL=c,d}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(1),a=n(0),o=n(7),s=n.n(o);e.default=function(t){var e=new s.a;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(i){var o=i.data;switch(o.cmd){case"init":var s=JSON.parse(o.config);t.demuxer=new r.a(e,o.typeSupported,s,o.vendor);try{Object(a.a)(!0===s.debug)}catch(t){console.warn("demuxerWorker: unable to enable logs")}n("init",null);break;case"demux":t.demuxer.push(o.data,o.decryptdata,o.initSegment,o.audioCodec,o.videoCodec,o.timeOffset,o.discontinuity,o.trackSwitch,o.contiguous,o.duration,o.accurateTimeOffset,o.defaultInitPTS)}})),e.on(i.a.FRAG_DECRYPTED,n),e.on(i.a.FRAG_PARSING_INIT_SEGMENT,n),e.on(i.a.FRAG_PARSED,n),e.on(i.a.ERROR,n),e.on(i.a.FRAG_PARSING_METADATA,n),e.on(i.a.FRAG_PARSING_USERDATA,n),e.on(i.a.INIT_PTS_FOUND,n),e.on(i.a.FRAG_PARSING_DATA,(function(e,n){var r=[],i={event:e,data:n};n.data1&&(i.data1=n.data1.buffer,r.push(n.data1.buffer),delete n.data1),n.data2&&(i.data2=n.data2.buffer,r.push(n.data2.buffer),delete n.data2),t.postMessage(i,r)}))}},function(t,e){
|
||
/*! http://mths.be/endswith v0.2.0 by @mathias */
|
||
String.prototype.endsWith||function(){"use strict";var t=function(){try{var t={},e=Object.defineProperty,n=e(t,t,t)&&e}catch(t){}return n}(),e={}.toString,n=function(t){if(null==this)throw TypeError();var n=String(this);if(t&&"[object RegExp]"==e.call(t))throw TypeError();var r=n.length,i=String(t),a=i.length,o=r;if(arguments.length>1){var s=arguments[1];void 0!==s&&(o=s?Number(s):0)!=o&&(o=0)}var u=Math.min(Math.max(o,0),r),l=u-a;if(l<0)return!1;for(var c=-1;++c<a;)if(n.charCodeAt(l+c)!=i.charCodeAt(c))return!1;return!0};t?t(String.prototype,"endsWith",{value:n,configurable:!0,writable:!0}):String.prototype.endsWith=n}()}]).default},t.exports=r())},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(n(0)),i=l(n(1)),a=l(n(3)),o=l(n(2)),s=l(n(10)),u=l(n(4));function l(t){return t&&t.__esModule?t:{default:t}}n(190);var c=function(t){function e(n){(0,r.default)(this,e);var a=(0,i.default)(this,t.call(this,n));return a.el.src=n.src,a}return(0,o.default)(e,t),e.prototype.getPlaybackType=function(){return s.default.NO_OP},(0,a.default)(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(){return this.trigger(u.default.PLAYBACK_READY,this.name),this},e.prototype._onLoad=function(){this.trigger(u.default.PLAYBACK_ENDED,this.name)},e.prototype._onError=function(t){var e="error"===t.type?"load error":"loading aborted";this.trigger(u.default.PLAYBACK_ERROR,{message:e},this.name)},e}(s.default);e.default=c,c.canPlay=function(t){return/\.(png|jpg|jpeg|gif|bmp|tiff|pgm|pnm|webp)(|\?.*)$/i.test(t)},t.exports=e.default},function(t,e,n){var r=n(191);"string"==typeof r&&(r=[[t.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(9)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(8)(!1)).push([t.i,"[data-html-img] {\n max-width: 100%;\n max-height: 100%; }\n",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=f(n(0)),i=f(n(1)),a=f(n(3)),o=f(n(2)),s=n(5),u=f(n(10)),l=f(n(7)),c=f(n(4)),d=f(n(193));function f(t){return t&&t.__esModule?t:{default:t}}n(194);var h=function(t){function e(){(0,r.default)(this,e);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];var s=(0,i.default)(this,t.call.apply(t,[this].concat(a)));return s._noiseFrameNum=-1,s}return(0,o.default)(e,t),(0,a.default)(e,[{key:"name",get:function(){return"no_op"}},{key:"template",get:function(){return(0,l.default)(d.default)}},{key:"attributes",get:function(){return{"data-no-op":""}}}]),e.prototype.render=function(){var t=this.options.playbackNotSupportedMessage||this.i18n.t("playback_not_supported");this.$el.html(this.template({message:t})),this.trigger(c.default.PLAYBACK_READY,this.name);var e=!(!this.options.poster||!this.options.poster.showForNoOp);return!this.options.autoPlay&&e||this._animate(),this},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,a=6*Math.random()+4,o=0,s=0,u=0;u<i;)o<0&&(o=a*Math.random(),s=255*Math.pow(Math.random(),.4)<<24),o-=1,e[u++]=s;this.context.putImageData(t,0,0)}},e.prototype._loop=function(){var t=this;this._stop||(this._noise(),this._animationHandle=(0,s.requestAnimationFrame)((function(){return t._loop()})))},e.prototype.destroy=function(){this._animationHandle&&((0,s.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}(u.default);e.default=h,h.canPlay=function(t){return!0},t.exports=e.default},function(t,e){t.exports="<canvas data-no-op-canvas></canvas>\n<p data-no-op-msg><%=message%><p>\n"},function(t,e,n){var r=n(195);"string"==typeof r&&(r=[[t.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(9)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(8)(!1)).push([t.i,"[data-no-op] {\n position: absolute;\n height: 100%;\n width: 100%;\n text-align: center; }\n\n[data-no-op] p[data-no-op-msg] {\n position: absolute;\n text-align: center;\n font-size: 25px;\n left: 0;\n right: 0;\n color: white;\n padding: 10px;\n /* center vertically */\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n max-height: 100%;\n overflow: auto; }\n\n[data-no-op] canvas[data-no-op-canvas] {\n background-color: #777;\n height: 100%;\n width: 100%; }\n",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=d(n(0)),i=d(n(1)),a=d(n(3)),o=d(n(2)),s=d(n(42)),u=d(n(4)),l=d(n(7)),c=d(n(197));function d(t){return t&&t.__esModule?t:{default:t}}n(198);var f=function(t){function e(n){(0,r.default)(this,e);var a=(0,i.default)(this,t.call(this,n));return a.template=(0,l.default)(c.default),a.showTimeout=null,a.listenTo(a.container,u.default.CONTAINER_STATE_BUFFERING,a.onBuffering),a.listenTo(a.container,u.default.CONTAINER_STATE_BUFFERFULL,a.onBufferFull),a.listenTo(a.container,u.default.CONTAINER_STOP,a.onStop),a.listenTo(a.container,u.default.CONTAINER_ENDED,a.onStop),a.listenTo(a.container,u.default.CONTAINER_ERROR,a.onStop),a.render(),a}return(0,o.default)(e,t),(0,a.default)(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(){return this.$el.html(this.template()),this.container.$el.append(this.$el),this.$el.hide(),this.container.buffering&&this.onBuffering(),this},e}(s.default);e.default=f,t.exports=e.default},function(t,e){t.exports="<div data-bounce1></div><div data-bounce2></div><div data-bounce3></div>\n"},function(t,e,n){var r=n(199);"string"==typeof r&&(r=[[t.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(9)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(8)(!1)).push([t.i,".spinner-three-bounce[data-spinner] {\n position: absolute;\n margin: 0 auto;\n width: 70px;\n text-align: center;\n z-index: 999;\n left: 0;\n right: 0;\n margin-left: auto;\n margin-right: auto;\n /* center vertically */\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%); }\n .spinner-three-bounce[data-spinner] > div {\n width: 18px;\n height: 18px;\n background-color: #FFFFFF;\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: bouncedelay 1.4s infinite ease-in-out;\n animation: bouncedelay 1.4s infinite ease-in-out;\n /* Prevent first frame from flickering when animation starts */\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both; }\n .spinner-three-bounce[data-spinner] [data-bounce1] {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s; }\n .spinner-three-bounce[data-spinner] [data-bounce2] {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s; }\n\n@-webkit-keyframes bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0); }\n 40% {\n -webkit-transform: scale(1);\n transform: scale(1); } }\n\n@keyframes bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0); }\n 40% {\n -webkit-transform: scale(1);\n transform: scale(1); } }\n",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(201),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(n(0)),i=c(n(1)),a=c(n(3)),o=c(n(2)),s=c(n(43)),u=c(n(4)),l=c(n(6));function c(t){return t&&t.__esModule?t:{default:t}}var d=function(t){function e(n){(0,r.default)(this,e);var a=(0,i.default)(this,t.call(this,n));return a.setInitialAttrs(),a.reportInterval=a.options.reportInterval||5e3,a.state="IDLE",a}return(0,o.default)(e,t),(0,a.default)(e,[{key:"name",get:function(){return"stats"}}]),e.prototype.bindEvents=function(){this.listenTo(this.container.playback,u.default.PLAYBACK_PLAY,this.onPlay),this.listenTo(this.container,u.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,u.default.CONTAINER_ENDED,this.onStop),this.listenTo(this.container,u.default.CONTAINER_DESTROYED,this.onStop),this.listenTo(this.container,u.default.CONTAINER_STATE_BUFFERING,this.onBuffering),this.listenTo(this.container,u.default.CONTAINER_STATE_BUFFERFULL,this.onBufferFull),this.listenTo(this.container,u.default.CONTAINER_STATS_ADD,this.onStatsAdd),this.listenTo(this.container,u.default.CONTAINER_BITRATE,this.onStatsAdd),this.listenTo(this.container.playback,u.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(){return Date.now()-this.watchingTimeInit-this.rebufferingTime},e.prototype.isRebuffering=function(){return!!this.rebufferingTimeInit},e.prototype.onStatsAdd=function(t){l.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 l.default.extend(t,this.externalMetrics),t},e.prototype.report=function(){this.container.statsReport(this.getStats())},e}(s.default);e.default=d,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=d(n(0)),i=d(n(1)),a=d(n(3)),o=d(n(2)),s=d(n(42)),u=d(n(4)),l=d(n(7)),c=d(n(203));function d(t){return t&&t.__esModule?t:{default:t}}n(204);var f=function(t){function e(n){(0,r.default)(this,e);var a=(0,i.default)(this,t.call(this,n));return a.configure(),a}return(0,o.default)(e,t),(0,a.default)(e,[{key:"name",get:function(){return"watermark"}},{key:"template",get:function(){return(0,l.default)(c.default)}}]),e.prototype.bindEvents=function(){this.listenTo(this.container,u.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,u.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,u.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};return this.$el.html(this.template(t)),this.container.$el.append(this.$el),this},e}(s.default);e.default=f,t.exports=e.default},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){var r=n(205);"string"==typeof r&&(r=[[t.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(9)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(8)(!1)).push([t.i,"[data-watermark] {\n position: absolute;\n min-width: 70px;\n max-width: 200px;\n width: 12%;\n text-align: center;\n z-index: 10; }\n\n[data-watermark] a {\n outline: none;\n cursor: pointer; }\n\n[data-watermark] img {\n max-width: 100%; }\n\n[data-watermark-bottom-left] {\n bottom: 10px;\n left: 10px; }\n\n[data-watermark-bottom-right] {\n bottom: 10px;\n right: 42px; }\n\n[data-watermark-top-left] {\n top: 10px;\n left: 10px; }\n\n[data-watermark-top-right] {\n top: 10px;\n right: 37px; }\n",""])},function(t,e,n){"use strict";(function(r){Object.defineProperty(e,"__esModule",{value:!0});var i=g(n(0)),a=g(n(1)),o=g(n(3)),s=g(n(2)),u=g(n(42)),l=g(n(4)),c=g(n(7)),d=g(n(10)),f=g(n(79)),h=g(n(207)),p=g(n(64));function g(t){return t&&t.__esModule?t:{default:t}}n(208);var y=function(t){function e(n){(0,i.default)(this,e);var o=(0,a.default)(this,t.call(this,n));return o.hasStartedPlaying=!1,o.playRequested=!1,o.render(),r.nextTick((function(){return o.update()})),o}return(0,s.default)(e,t),(0,o.default)(e,[{key:"name",get:function(){return"poster"}},{key:"template",get:function(){return(0,c.default)(h.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()!==d.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,l.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,l.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,l.default.CONTAINER_STATE_BUFFERING,this.update),this.listenTo(this.container,l.default.CONTAINER_STATE_BUFFERFULL,this.update),this.listenTo(this.container,l.default.CONTAINER_OPTIONS_CHANGE,this.render),this.listenTo(this.container,l.default.CONTAINER_ERROR,this.onError),this.showOnVideoEnd&&this.listenTo(this.container,l.default.CONTAINER_ENDED,this.onStop)},e.prototype.onError=function(t){this.hasFatalError=t.level===f.default.Levels.FATAL,this.hasFatalError&&(this.hasStartedPlaying=!1,this.playRequested=!1,this.showPlayButton())},e.prototype.onPlay=function(){this.hasStartedPlaying=!0,this.update()},e.prototype.onStop=function(){this.hasStartedPlaying=!1,this.playRequested=!1,this.update()},e.prototype.updatePlayButton=function(t){!t||this.options.chromeless&&!this.options.allowUserInteraction?this.hidePlayButton():this.showPlayButton()},e.prototype.showPlayButton=function(){this.hasFatalError&&!this.options.disableErrorScreen||(this.$playButton.show(),this.$el.addClass("clickable"))},e.prototype.hidePlayButton=function(){this.$playButton.hide(),this.$el.removeClass("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.updatePlayButton(t),this.updatePoster()}},e.prototype.updatePoster=function(){this.hasStartedPlaying?this.hidePoster():this.showPoster()},e.prototype.showPoster=function(){this.container.disableMediaControl(),this.$el.show()},e.prototype.hidePoster=function(){this.container.enableMediaControl(),this.shouldHideOnPlay()&&this.$el.hide()},e.prototype.render=function(){if(this.shouldRender){if(this.$el.html(this.template()),this.options.poster&&void 0===this.options.poster.custom){var t=this.options.poster.url||this.options.poster;this.$el.css({"background-image":"url("+t+")"})}else this.options.poster&&this.$el.css({background:this.options.poster.custom});this.container.$el.append(this.el),this.$playWrapper=this.$el.find(".play-wrapper"),this.$playWrapper.append(p.default),this.$playButton=this.$playWrapper.find("svg"),this.$playButton.addClass("poster-icon"),this.$playButton.attr("data-poster","");var e=this.options.mediacontrol&&this.options.mediacontrol.buttons;return e&&this.$el.find("svg path").css("fill",e),this.options.mediacontrol&&this.options.mediacontrol.buttons&&(e=this.options.mediacontrol.buttons,this.$playButton.css("color",e)),this.update(),this}},e}(u.default);e.default=y,t.exports=e.default}).call(e,n(62))},function(t,e){t.exports='<div class="play-wrapper" data-poster></div>\n'},function(t,e,n){var r=n(209);"string"==typeof r&&(r=[[t.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(9)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(8)(!1)).push([t.i,".player-poster[data-poster] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n position: absolute;\n height: 100%;\n width: 100%;\n z-index: 998;\n top: 0;\n left: 0;\n background-color: #000;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: 50% 50%; }\n .player-poster[data-poster].clickable {\n cursor: pointer; }\n .player-poster[data-poster]:hover .play-wrapper[data-poster] {\n opacity: 1; }\n .player-poster[data-poster] .play-wrapper[data-poster] {\n width: 100%;\n height: 25%;\n margin: 0 auto;\n opacity: 0.75;\n transition: opacity 0.1s ease; }\n .player-poster[data-poster] .play-wrapper[data-poster] svg {\n height: 100%; }\n .player-poster[data-poster] .play-wrapper[data-poster] svg path {\n fill: #fff; }\n",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(211),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(n(0)),i=l(n(1)),a=l(n(3)),o=l(n(2)),s=l(n(43)),u=l(n(4));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(n){(0,r.default)(this,e);var a=(0,i.default)(this,t.call(this,n));return a.container.options.gaAccount&&(a.account=a.container.options.gaAccount,a.trackerName=a.container.options.gaTrackerName?a.container.options.gaTrackerName+".":"Clappr.",a.domainName=a.container.options.gaDomainName,a.currentHDState=void 0,a.embedScript()),a}return(0,o.default)(e,t),(0,a.default)(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,u.default.CONTAINER_READY,this.onReady),this.listenTo(this.container,u.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,u.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,u.default.CONTAINER_PAUSE,this.onPause),this.listenTo(this.container,u.default.CONTAINER_ENDED,this.onEnded),this.listenTo(this.container,u.default.CONTAINER_STATE_BUFFERING,this.onBuffering),this.listenTo(this.container,u.default.CONTAINER_STATE_BUFFERFULL,this.onBufferFull),this.listenTo(this.container,u.default.CONTAINER_ERROR,this.onError),this.listenTo(this.container,u.default.CONTAINER_PLAYBACKSTATE,this.onPlaybackChanged),this.listenTo(this.container,u.default.CONTAINER_VOLUME,(function(e){return t.onVolumeChanged(e)})),this.listenTo(this.container,u.default.CONTAINER_SEEK,(function(e){return t.onSeek(e)})),this.listenTo(this.container,u.default.CONTAINER_FULL_SCREEN,this.onFullscreen),this.listenTo(this.container,u.default.CONTAINER_HIGHDEFINITIONUPDATE,this.onHD),this.listenTo(this.container,u.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}(s.default);e.default=c,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(n(0)),i=c(n(1)),a=c(n(3)),o=c(n(2)),s=c(n(43)),u=c(n(4)),l=c(n(10));function c(t){return t&&t.__esModule?t:{default:t}}var d=function(t){function e(n){return(0,r.default)(this,e),(0,i.default)(this,t.call(this,n))}return(0,o.default)(e,t),(0,a.default)(e,[{key:"name",get:function(){return"click_to_pause"}}]),e.prototype.bindEvents=function(){this.listenTo(this.container,u.default.CONTAINER_CLICK,this.click),this.listenTo(this.container,u.default.CONTAINER_SETTINGSUPDATE,this.settingsUpdate)},e.prototype.click=function(){(this.container.getPlaybackType()!==l.default.LIVE||this.container.isDvrEnabled())&&(this.container.isPlaying()?this.container.pause():this.container.play())},e.prototype.settingsUpdate=function(){var t=this.container.getPlaybackType()!==l.default.LIVE||this.container.isDvrEnabled();if(t!==this.pointerEnabled){var e=t?"addClass":"removeClass";this.container.$el[e]("pointer-enabled"),this.pointerEnabled=t}},e}(s.default);e.default=d,t.exports=e.default},function(t,e,n){"use strict";(function(r){Object.defineProperty(e,"__esModule",{value:!0});var i=C(n(88)),a=C(n(0)),o=C(n(1)),s=C(n(3)),u=C(n(2)),l=n(5),c=n(60),d=C(n(4)),f=C(n(23)),h=C(n(14)),p=C(n(31)),g=C(n(7)),y=C(n(10)),v=C(n(6));n(214);var m=C(n(216)),b=C(n(64)),A=C(n(97)),_=C(n(217)),E=C(n(218)),T=C(n(219)),w=C(n(220)),S=C(n(221)),k=C(n(222));function C(t){return t&&t.__esModule?t:{default:t}}var L=function(t){function e(n){(0,a.default)(this,e);var r=(0,o.default)(this,t.call(this,n));return r.persistConfig=r.options.persistConfig,r.container=r.core.activeContainer,r.currentPositionValue=null,r.currentDurationValue=null,r.keepVisible=!1,r.fullScreenOnVideoTagSupported=null,r.setInitialVolume(),r.settings={left:["play","stop","pause"],right:["volume"],default:["position","seekbar","duration"]},r.kibo=new c.Kibo(r.options.focusElement),r.bindKeyEvents(),r.container?v.default.isEmptyObject(r.container.settings)||(r.settings=v.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,v.default)(document).bind("mouseup",r.stopDragHandler),(0,v.default)(document).bind("mousemove",r.updateDragHandler),r}return(0,u.default)(e,t),(0,s.default)(e,[{key:"name",get:function(){return"media_control"}},{key:"disabled",get:function(){var t=this.container&&this.container.getPlaybackType()===y.default.NO_OP;return this.userDisabled||t}},{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,g.default)(m.default)}},{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.getExternalInterface=function(){var t=this;return{setVolume:this.setVolume,getVolume:function(){return t.volume}}},e.prototype.bindEvents=function(){var t=this;this.listenTo(this.core,d.default.CORE_ACTIVE_CONTAINER_CHANGED,this.setContainer),this.listenTo(this.core,d.default.CORE_MOUSE_MOVE,this.show),this.listenTo(this.core,d.default.CORE_MOUSE_LEAVE,(function(){return t.hide(t.options.hideMediaControlDelay)})),this.listenTo(this.core,d.default.CORE_FULLSCREEN,this.show),this.listenTo(this.core,d.default.CORE_OPTIONS_CHANGE,this.configure),p.default.on(this.options.playerId+":"+d.default.PLAYER_RESIZE,this.playerResize,this),this.container&&this.bindContainerEvents()},e.prototype.bindContainerEvents=function(){this.listenTo(this.container,d.default.CONTAINER_PLAY,this.changeTogglePlay),this.listenTo(this.container,d.default.CONTAINER_PAUSE,this.changeTogglePlay),this.listenTo(this.container,d.default.CONTAINER_STOP,this.changeTogglePlay),this.listenTo(this.container,d.default.CONTAINER_DBLCLICK,this.toggleFullscreen),this.listenTo(this.container,d.default.CONTAINER_TIMEUPDATE,this.onTimeUpdate),this.listenTo(this.container,d.default.CONTAINER_PROGRESS,this.updateProgressBar),this.listenTo(this.container,d.default.CONTAINER_SETTINGSUPDATE,this.settingsUpdate),this.listenTo(this.container,d.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.settingsUpdate),this.listenTo(this.container,d.default.CONTAINER_HIGHDEFINITIONUPDATE,this.highDefinitionUpdate),this.listenTo(this.container,d.default.CONTAINER_MEDIACONTROL_DISABLE,this.disable),this.listenTo(this.container,d.default.CONTAINER_MEDIACONTROL_ENABLE,this.enable),this.listenTo(this.container,d.default.CONTAINER_ENDED,this.ended),this.listenTo(this.container,d.default.CONTAINER_VOLUME,this.onVolumeChanged),this.listenTo(this.container,d.default.CONTAINER_OPTIONS_CHANGE,this.setInitialVolume),"video"===this.container.playback.el.nodeName.toLowerCase()&&this.listenToOnce(this.container,d.default.CONTAINER_LOADEDMETADATA,this.onLoadedMetadataOnVideoTag)},e.prototype.disable=function(){this.userDisabled=!0,this.hide(),this.unbindKeyEvents(),this.$el.hide()},e.prototype.enable=function(){this.options.chromeless||(this.userDisabled=!1,this.bindKeyEvents(),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.setInitialVolume=function(){var t=this.persistConfig?l.Config.restore("volume"):100,e=this.container&&this.container.options||this.options;this.setVolume(e.mute?0:t,!0)},e.prototype.onVolumeChanged=function(){this.updateVolumeUI()},e.prototype.onLoadedMetadataOnVideoTag=function(){var t=this.container.playback.el;!l.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(T.default),this.$volumeIcon.addClass("muted")):this.$volumeIcon.append(E.default),this.applyButtonStyle(this.$volumeIcon)}},e.prototype.changeTogglePlay=function(){this.$playPauseToggle.html(""),this.$playStopToggle.html(""),this.container&&this.container.isPlaying()?(this.$playPauseToggle.append(A.default),this.$playStopToggle.append(_.default),this.trigger(d.default.MEDIACONTROL_PLAYING)):(this.$playPauseToggle.append(b.default),this.$playStopToggle.append(b.default),this.trigger(d.default.MEDIACONTROL_NOTPLAYING),h.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(d.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR,t)},e.prototype.mouseleaveOnSeekBar=function(t){this.trigger(d.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("");var e=l.Fullscreen.isFullscreen()?S.default:w.default;this.$fullscreenToggle.append(e),this.applyButtonStyle(this.$fullscreenToggle),0!==this.$el.find(".media-control").length&&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)/this.$seekBarContainer.width()*100;e=Math.min(100,Math.max(e,0)),this.setSeekPercentage(e)}else this.draggingVolumeBar&&(t.preventDefault(),this.setVolume(this.getVolumeFromUIEvent(t)))},e.prototype.getVolumeFromUIEvent=function(t){return(t.pageX-this.$volumeBarContainer.offset().left)/this.$volumeBarContainer.width()*100},e.prototype.toggleMute=function(){this.setVolume(this.muted?100:0)},e.prototype.setVolume=function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=Math.min(100,Math.max(t,0)),this.intendedVolume=t,this.persistConfig&&!n&&l.Config.persist("volume",t);var r=function(){e.container.isReady?e.container.setVolume(t):e.listenToOnce(e.container,d.default.CONTAINER_READY,(function(){e.container.setVolume(t)}))};this.container?r():this.listenToOnce(this,d.default.MEDIACONTROL_CONTAINERCHANGED,(function(){return r()}))},e.prototype.toggleFullscreen=function(){this.trigger(d.default.MEDIACONTROL_FULLSCREEN,this.name),this.container.fullscreen(),this.core.toggleFullscreen(),this.resetUserKeepVisible()},e.prototype.setContainer=function(t){this.container&&(this.stopListening(this.container),this.fullScreenOnVideoTagSupported=null),p.default.off(this.options.playerId+":"+d.default.PLAYER_RESIZE,this.playerResize,this),this.container=t,this.setInitialVolume(),this.changeTogglePlay(),this.bindContainerEvents(),this.settingsUpdate(),this.container.trigger(d.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.container.isDvrInUse()),this.container.mediaControlDisabled&&this.disable(),this.trigger(d.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()!==y.default.LIVE||this.container.isDvrInUse())&&(this.currentSeekBarPercentage=this.currentPositionValue/this.currentDurationValue*100),this.setSeekPercentage(this.currentSeekBarPercentage);var t=(0,l.formatTime)(this.currentPositionValue),e=(0,l.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)/this.$seekBarContainer.width()*100;return e=Math.min(100,Math.max(e,0)),this.container.seekPercentage(e),this.setSeekPercentage(e),!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=t&&t.clientX!==this.lastMouseX&&t.clientY!==this.lastMouseY;(!t||n||navigator.userAgent.match(/firefox/i))&&(clearTimeout(this.hideId),this.$el.show(),this.trigger(d.default.MEDIACONTROL_SHOW,this.name),this.container.trigger(d.default.CONTAINER_MEDIACONTROL_SHOW,this.name),this.$el.removeClass("media-control-hide"),this.hideId=setTimeout((function(){return e.hide()}),2e3),t&&(this.lastMouseX=t.clientX,this.lastMouseY=t.clientY)),this.updateCursorStyle(!0)}},e.prototype.hide=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.isVisible()){var n=e||2e3;if(clearTimeout(this.hideId),this.disabled||!1!==this.options.hideMediaControl){var r=this.userKeepVisible||this.keepVisible,i=this.draggingSeekBar||this.draggingVolumeBar;if(!this.disabled&&(e||r||i))this.hideId=setTimeout((function(){return t.hide()}),n);else{this.trigger(d.default.MEDIACONTROL_HIDE,this.name),this.container.trigger(d.default.CONTAINER_MEDIACONTROL_HIDE,this.name),this.$el.addClass("media-control-hide"),this.hideVolumeBar(0);var a=!1;this.updateCursorStyle(a)}}}},e.prototype.updateCursorStyle=function(t){t?this.core.$el.removeClass("nocursor"):l.Fullscreen.isFullscreen()&&this.core.$el.addClass("nocursor")},e.prototype.settingsUpdate=function(){var t=this.getSettings();!t||this.fullScreenOnVideoTagSupported||l.Fullscreen.fullscreenEnabled()||(t.default&&(0,l.removeArrayItem)(t.default,"fullscreen"),t.left&&(0,l.removeArrayItem)(t.left,"fullscreen"),t.right&&(0,l.removeArrayItem)(t.right,"fullscreen")),(0,i.default)(this.settings)!==(0,i.default)(t)&&(this.settings=t,this.render())},e.prototype.getSettings=function(){return v.default.extend(!0,{},this.container.settings)},e.prototype.highDefinitionUpdate=function(t){this.isHD=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(b.default),t.find("button.media-control-button[data-pause]").append(A.default),t.find("button.media-control-button[data-stop]").append(_.default),this.$playPauseToggle.append(b.default),this.$playStopToggle.append(b.default),this.$volumeIcon.append(E.default),this.$fullscreenToggle.append(w.default),this.$hdIndicator.append(k.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.bindKeyAndShow=function(t,e){var n=this;this.kibo.down(t,(function(){return n.show(),e()}))},e.prototype.bindKeyEvents=function(){var t=this;h.default.isMobile||this.options.disableKeyboardShortcuts||(this.unbindKeyEvents(),this.kibo=new c.Kibo(this.options.focusElement||this.options.parentElement),this.bindKeyAndShow("space",(function(){return t.togglePlayPause()})),this.bindKeyAndShow("left",(function(){return t.seekRelative(-5)})),this.bindKeyAndShow("right",(function(){return t.seekRelative(5)})),this.bindKeyAndShow("shift left",(function(){return t.seekRelative(-10)})),this.bindKeyAndShow("shift right",(function(){return t.seekRelative(10)})),this.bindKeyAndShow("shift ctrl left",(function(){return t.seekRelative(-15)})),this.bindKeyAndShow("shift ctrl right",(function(){return t.seekRelative(15)})),["1","2","3","4","5","6","7","8","9","0"].forEach((function(e){t.bindKeyAndShow(e,(function(){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("shift left"),this.kibo.off("shift right"),this.kibo.off("shift ctrl left"),this.kibo.off("shift ctrl 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,v.default)(t).find("svg path").css("fill",this.buttonsColor)},e.prototype.destroy=function(){(0,v.default)(document).unbind("mouseup",this.stopDragHandler),(0,v.default)(document).unbind("mousemove",this.updateDragHandler),this.unbindKeyEvents(),this.stopListening(),t.prototype.destroy.call(this)},e.prototype.configure=function(){this.options.chromeless?this.disable():this.enable(),this.trigger(d.default.MEDIACONTROL_OPTIONS_CHANGE)},e.prototype.render=function(){var t=this,e=this.options.hideMediaControlDelay||2e3;this.settings&&this.$el.html(this.template({settings:this.settings})),this.createCachedElements(),this.$playPauseToggle.addClass("paused"),this.$playStopToggle.addClass("stopped"),this.changeTogglePlay(),this.container&&(this.hideId=setTimeout((function(){return t.hide()}),e),this.disabled&&this.hide()),h.default.isSafari&&h.default.isMobile&&(h.default.version<10?this.$volumeContainer.css("display","none"):this.$volumeBarContainer.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"),!h.default.isMobile&&!t.options.disableKeyboardShortcuts&&t.bindKeyEvents(),t.playerResize({width:t.options.width,height:t.options.height}),t.hideVolumeBar(0)})),this.parseColors(),this.highDefinitionUpdate(this.isHD),this.core.$el.append(this.el),this.rendered=!0,this.updateVolumeUI(),this.trigger(d.default.MEDIACONTROL_RENDERED),this},e}(f.default);e.default=L,L.extend=function(t){return(0,l.extend)(L,t)},t.exports=e.default}).call(e,n(62))},function(t,e,n){var r=n(215);"string"==typeof r&&(r=[[t.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(9)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){var r=n(81);(t.exports=n(8)(!1)).push([t.i,".media-control-notransition {\n transition: none !important; }\n\n.media-control[data-media-control] {\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 9999;\n pointer-events: none; }\n .media-control[data-media-control].dragging {\n pointer-events: auto;\n cursor: -webkit-grabbing !important;\n cursor: grabbing !important;\n cursor: url("+r(n(96))+"), move; }\n .media-control[data-media-control].dragging * {\n cursor: -webkit-grabbing !important;\n cursor: grabbing !important;\n cursor: url("+r(n(96))+'), move; }\n .media-control[data-media-control] .media-control-background[data-background] {\n position: absolute;\n height: 40%;\n width: 100%;\n bottom: 0;\n background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));\n transition: opacity 0.6s ease-out; }\n .media-control[data-media-control] .media-control-icon {\n line-height: 0;\n letter-spacing: 0;\n speak: none;\n color: #fff;\n opacity: 0.5;\n vertical-align: middle;\n text-align: left;\n transition: all 0.1s ease; }\n .media-control[data-media-control] .media-control-icon:hover {\n color: white;\n opacity: 0.75;\n text-shadow: rgba(255, 255, 255, 0.8) 0 0 5px; }\n .media-control[data-media-control].media-control-hide .media-control-background[data-background] {\n opacity: 0; }\n .media-control[data-media-control].media-control-hide .media-control-layer[data-controls] {\n bottom: -50px; }\n .media-control[data-media-control].media-control-hide .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] {\n opacity: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] {\n position: absolute;\n bottom: 7px;\n width: 100%;\n height: 32px;\n font-size: 0;\n vertical-align: middle;\n pointer-events: auto;\n transition: bottom 0.4s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-left-panel[data-media-control] {\n position: absolute;\n top: 0;\n left: 4px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-center-panel[data-media-control] {\n height: 100%;\n text-align: center;\n line-height: 32px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-right-panel[data-media-control] {\n position: absolute;\n top: 0;\n right: 4px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button {\n background-color: transparent;\n border: 0;\n margin: 0 6px;\n padding: 0;\n cursor: pointer;\n display: inline-block;\n width: 32px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg {\n width: 100%;\n height: 22px; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg path {\n fill: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button:focus {\n outline: none; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-play] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-pause] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-stop] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-fullscreen] {\n float: right;\n background-color: transparent;\n border: 0;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator] {\n background-color: transparent;\n border: 0;\n cursor: default;\n display: none;\n float: right;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled {\n display: block;\n opacity: 1.0; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled:hover {\n opacity: 1.0;\n text-shadow: none; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playpause] {\n float: left; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playstop] {\n float: left; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position], .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration] {\n display: inline-block;\n font-size: 10px;\n color: white;\n cursor: default;\n line-height: 32px;\n position: relative; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position] {\n margin: 0 6px 0 7px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration] {\n color: rgba(255, 255, 255, 0.5);\n margin-right: 6px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]:before {\n content: "|";\n margin-right: 7px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] {\n position: absolute;\n top: -20px;\n left: 0;\n display: inline-block;\n vertical-align: middle;\n width: 100%;\n height: 25px;\n cursor: pointer; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] {\n width: 100%;\n height: 1px;\n position: relative;\n top: 12px;\n background-color: #666666; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-1[data-seekbar] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #c2c2c2;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #005aff;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 0;\n position: absolute;\n top: -3px;\n width: 5px;\n height: 7px;\n background-color: rgba(255, 255, 255, 0.5);\n transition: opacity 0.1s ease; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]:hover .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 1; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled {\n cursor: default; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled:hover .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] {\n position: absolute;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n top: 2px;\n left: 0;\n width: 20px;\n height: 20px;\n opacity: 1;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] .bar-scrubber-icon[data-seekbar] {\n position: absolute;\n left: 6px;\n top: 6px;\n width: 8px;\n height: 8px;\n border-radius: 10px;\n box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);\n background-color: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] {\n float: right;\n display: inline-block;\n height: 32px;\n cursor: pointer;\n margin: 0 6px;\n box-sizing: border-box; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] {\n float: left;\n bottom: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] {\n background-color: transparent;\n border: 0;\n box-sizing: content-box;\n width: 32px;\n height: 32px;\n opacity: 0.5; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]:hover {\n opacity: 0.75; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg {\n height: 24px;\n position: relative;\n top: 3px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg path {\n fill: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume].muted svg {\n margin-left: 2px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] {\n float: left;\n position: relative;\n overflow: hidden;\n top: 6px;\n width: 42px;\n height: 18px;\n padding: 3px 0;\n transition: width .2s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] {\n height: 1px;\n position: relative;\n top: 7px;\n margin: 0 3px;\n background-color: #666666; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-1[data-volume] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #c2c2c2;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-2[data-volume] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #005aff;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-hover[data-volume] {\n opacity: 0;\n position: absolute;\n top: -3px;\n width: 5px;\n height: 7px;\n background-color: rgba(255, 255, 255, 0.5);\n transition: opacity 0.1s ease; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] {\n position: absolute;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n top: 0px;\n left: 0;\n width: 20px;\n height: 20px;\n opacity: 1;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] .bar-scrubber-icon[data-volume] {\n position: absolute;\n left: 6px;\n top: 6px;\n width: 8px;\n height: 8px;\n border-radius: 10px;\n box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);\n background-color: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume] {\n float: left;\n width: 4px;\n padding-left: 2px;\n height: 12px;\n opacity: 0.5;\n box-shadow: inset 2px 0 0 white;\n transition: -webkit-transform .2s ease-out;\n transition: transform .2s ease-out;\n transition: transform .2s ease-out, -webkit-transform .2s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume].fill {\n box-shadow: inset 2px 0 0 #fff;\n opacity: 1; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:nth-of-type(1) {\n padding-left: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:hover {\n -webkit-transform: scaleY(1.5);\n transform: scaleY(1.5); }\n .media-control[data-media-control].w320 .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume].volume-bar-hide {\n width: 0;\n height: 12px;\n top: 9px;\n padding: 0; }\n',""])},function(t,e){t.exports='<div class="media-control-background" data-background></div>\n<div class="media-control-layer" data-controls>\n <% var renderBar = function(name) { %>\n <div class="bar-container" data-<%= name %>>\n <div class="bar-background" data-<%= name %>>\n <div class="bar-fill-1" data-<%= name %>></div>\n <div class="bar-fill-2" data-<%= name %>></div>\n <div class="bar-hover" data-<%= name %>></div>\n </div>\n <div class="bar-scrubber" data-<%= name %>>\n <div class="bar-scrubber-icon" data-<%= name %>></div>\n </div>\n </div>\n <% }; %>\n <% var renderSegmentedBar = function(name, segments) {\n segments = segments || 10; %>\n <div class="bar-container" data-<%= name %>>\n <% for (var i = 0; i < segments; i++) { %>\n <div class="segmented-bar-element" data-<%= name %>></div>\n <% } %>\n </div>\n <% }; %>\n <% var renderDrawer = function(name, renderContent) { %>\n <div class="drawer-container" data-<%= name %>>\n <div class="drawer-icon-container" data-<%= name %>>\n <div class="drawer-icon media-control-icon" data-<%= name %>></div>\n <span class="drawer-text" data-<%= name %>></span>\n </div>\n <% renderContent(name); %>\n </div>\n <% }; %>\n <% var renderIndicator = function(name) { %>\n <div class="media-control-indicator" data-<%= name %>></div>\n <% }; %>\n <% var renderButton = function(name) { %>\n <button type="button" class="media-control-button media-control-icon" data-<%= name %> aria-label="<%= name %>"></button>\n <% }; %>\n <% var templates = {\n bar: renderBar,\n segmentedBar: renderSegmentedBar,\n };\n var render = function(settingsList) {\n settingsList.forEach(function(setting) {\n if(setting === "seekbar") {\n renderBar(setting);\n } else if (setting === "volume") {\n renderDrawer(setting, settings.volumeBarTemplate ? templates[settings.volumeBarTemplate] : function(name) { return renderSegmentedBar(name); });\n } else if (setting === "duration" || setting === "position") {\n renderIndicator(setting);\n } else {\n renderButton(setting);\n }\n });\n }; %>\n <% if (settings.default && settings.default.length) { %>\n <div class="media-control-center-panel" data-media-control>\n <% render(settings.default); %>\n </div>\n <% } %>\n <% if (settings.left && settings.left.length) { %>\n <div class="media-control-left-panel" data-media-control>\n <% render(settings.left); %>\n </div>\n <% } %>\n <% if (settings.right && settings.right.length) { %>\n <div class="media-control-right-panel" data-media-control>\n <% render(settings.right); %>\n </div>\n <% } %>\n</div>\n'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-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){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=f(n(0)),i=f(n(1)),a=f(n(3)),o=f(n(2)),s=f(n(23)),u=f(n(7)),l=f(n(10)),c=f(n(4)),d=f(n(224));function f(t){return t&&t.__esModule?t:{default:t}}n(225);var h=function(t){function e(n){(0,r.default)(this,e);var a=(0,i.default)(this,t.call(this,n));return a.settingsUpdate(),a}return(0,o.default)(e,t),(0,a.default)(e,[{key:"template",get:function(){return(0,u.default)(d.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,c.default.MEDIACONTROL_CONTAINERCHANGED,this.containerChanged),this.listenTo(this.core.mediaControl,c.default.MEDIACONTROL_RENDERED,this.settingsUpdate),this.listenTo(this.core,c.default.CORE_OPTIONS_CHANGE,this.render),this.core.getCurrentContainer()&&(this.listenToOnce(this.core.getCurrentContainer(),c.default.CONTAINER_TIMEUPDATE,this.render),this.listenTo(this.core.getCurrentContainer(),c.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.dvrChanged))},e.prototype.containerChanged=function(){this.stopListening(),this.bindEvents()},e.prototype.dvrChanged=function(t){this.core.getPlaybackType()===l.default.LIVE&&(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.core.mediaControl.$el.removeClass("live"),this.shouldRender()&&(this.render(),this.$el.click((function(){return t.click()}))),this.bindEvents()},e.prototype.shouldRender=function(){return(void 0===this.core.options.useDvrControls||!!this.core.options.useDvrControls)&&this.core.getPlaybackType()===l.default.LIVE},e.prototype.render=function(){return this.$el.html(this.template({live:this.core.i18n.t("live"),backToLive:this.core.i18n.t("back_to_live")})),this.shouldRender()&&(this.core.mediaControl.$el.addClass("live"),this.core.mediaControl.$(".media-control-left-panel[data-media-control]").append(this.$el)),this},e}(s.default);e.default=h,t.exports=e.default},function(t,e){t.exports='<div class="live-info"><%= live %></div>\n<button type="button" class="live-button" aria-label="<%= backToLive %>"><%= backToLive %></button>\n'},function(t,e,n){var r=n(226);"string"==typeof r&&(r=[[t.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(9)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(8)(!1)).push([t.i,'.dvr-controls[data-dvr-controls] {\n display: inline-block;\n float: left;\n color: #fff;\n line-height: 32px;\n font-size: 10px;\n font-weight: bold;\n margin-left: 6px; }\n .dvr-controls[data-dvr-controls] .live-info {\n cursor: default;\n font-family: "Roboto", "Open Sans", Arial, sans-serif;\n text-transform: uppercase; }\n .dvr-controls[data-dvr-controls] .live-info:before {\n content: "";\n display: inline-block;\n position: relative;\n width: 7px;\n height: 7px;\n border-radius: 3.5px;\n margin-right: 3.5px;\n background-color: #ff0101; }\n .dvr-controls[data-dvr-controls] .live-info.disabled {\n opacity: 0.3; }\n .dvr-controls[data-dvr-controls] .live-info.disabled:before {\n background-color: #fff; }\n .dvr-controls[data-dvr-controls] .live-button {\n cursor: pointer;\n outline: none;\n display: none;\n border: 0;\n color: #fff;\n background-color: transparent;\n height: 32px;\n padding: 0;\n opacity: 0.7;\n font-family: "Roboto", "Open Sans", Arial, sans-serif;\n text-transform: uppercase;\n transition: all 0.1s ease; }\n .dvr-controls[data-dvr-controls] .live-button:before {\n content: "";\n display: inline-block;\n position: relative;\n width: 7px;\n height: 7px;\n border-radius: 3.5px;\n margin-right: 3.5px;\n background-color: #fff; }\n .dvr-controls[data-dvr-controls] .live-button:hover {\n opacity: 1;\n text-shadow: rgba(255, 255, 255, 0.75) 0 0 5px; }\n\n.dvr .dvr-controls[data-dvr-controls] .live-info {\n display: none; }\n\n.dvr .dvr-controls[data-dvr-controls] .live-button {\n display: block; }\n\n.dvr.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n background-color: #005aff; }\n\n.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n background-color: #ff0101; }\n',""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(228),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=f(n(0)),i=f(n(1)),a=f(n(3)),o=f(n(2)),s=f(n(23)),u=f(n(7)),l=f(n(4)),c=f(n(229)),d=f(n(230));function f(t){return t&&t.__esModule?t:{default:t}}n(231);var h=function(t){function e(n){(0,r.default)(this,e);var a=(0,i.default)(this,t.call(this,n)),o=n.options.closedCaptionsConfig;return a._title=o&&o.title?o.title:null,a._ariaLabel=o&&o.ariaLabel?o.ariaLabel:"cc-button",a._labelCb=o&&o.labelCallback&&"function"==typeof o.labelCallback?o.labelCallback:function(t){return t.name},a}return(0,o.default)(e,t),(0,a.default)(e,[{key:"name",get:function(){return"closed_captions"}},{key:"template",get:function(){return(0,u.default)(d.default)}},{key:"events",get:function(){return{"click [data-cc-button]":"toggleContextMenu","click [data-cc-select]":"onTrackSelect"}}},{key:"attributes",get:function(){return{class:"cc-controls","data-cc-controls":""}}}]),e.prototype.bindEvents=function(){this.listenTo(this.core,l.default.CORE_ACTIVE_CONTAINER_CHANGED,this.containerChanged),this.listenTo(this.core.mediaControl,l.default.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.core.mediaControl,l.default.MEDIACONTROL_HIDE,this.hideContextMenu),this.container=this.core.getCurrentContainer(),this.container&&(this.listenTo(this.container,l.default.CONTAINER_SUBTITLE_AVAILABLE,this.onSubtitleAvailable),this.listenTo(this.container,l.default.CONTAINER_SUBTITLE_CHANGED,this.onSubtitleChanged),this.listenTo(this.container,l.default.CONTAINER_STOP,this.onContainerStop))},e.prototype.onContainerStop=function(){this.ccAvailable(!1)},e.prototype.containerChanged=function(){this.ccAvailable(!1),this.stopListening(),this.bindEvents()},e.prototype.onSubtitleAvailable=function(){this.renderCcButton(),this.ccAvailable(!0)},e.prototype.onSubtitleChanged=function(t){this.setCurrentContextMenuElement(t.id)},e.prototype.onTrackSelect=function(t){var e=parseInt(t.target.dataset.ccSelect,10);return this.container.closedCaptionsTrackId=e,this.hideContextMenu(),t.stopPropagation(),!1},e.prototype.ccAvailable=function(t){var e=t?"addClass":"removeClass";this.$el[e]("available")},e.prototype.toggleContextMenu=function(){this.$el.find("ul").toggle()},e.prototype.hideContextMenu=function(){this.$el.find("ul").hide()},e.prototype.contextMenuElement=function(t){return this.$el.find("ul a"+(isNaN(t)?"":'[data-cc-select="'+t+'"]')).parent()},e.prototype.setCurrentContextMenuElement=function(t){if(this._trackId!==t){this.contextMenuElement().removeClass("current"),this.contextMenuElement(t).addClass("current");var e=t>-1?"addClass":"removeClass";this.$ccButton[e]("enabled"),this._trackId=t}},e.prototype.renderCcButton=function(){for(var t=this.container?this.container.closedCaptionsTracks:[],e=0;e<t.length;e++)t[e].label=this._labelCb(t[e]);this.$el.html(this.template({ariaLabel:this._ariaLabel,disabledLabel:this.core.i18n.t("disabled"),title:this._title,tracks:t})),this.$ccButton=this.$el.find("button.cc-button[data-cc-button]"),this.$ccButton.append(c.default),this.$el.append(this.style)},e.prototype.render=function(){this.renderCcButton();var t=this.core.mediaControl.$el.find("button[data-fullscreen]");return t[0]?this.$el.insertAfter(t):this.core.mediaControl.$el.find(".media-control-right-panel[data-media-control]").prepend(this.$el),this},e}(s.default);e.default=h,t.exports=e.default},function(t,e){t.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 49 41.8" style="enable-background:new 0 0 49 41.8;" xml:space="preserve"><path d="M47.1,0H3.2C1.6,0,0,1.2,0,2.8v31.5C0,35.9,1.6,37,3.2,37h11.9l3.2,1.9l4.7,2.7c0.9,0.5,2-0.1,2-1.1V37h22.1 c1.6,0,1.9-1.1,1.9-2.7V2.8C49,1.2,48.7,0,47.1,0z M7.2,18.6c0-4.8,3.5-9.3,9.9-9.3c4.8,0,7.1,2.7,7.1,2.7l-2.5,4 c0,0-1.7-1.7-4.2-1.7c-2.8,0-4.3,2.1-4.3,4.3c0,2.1,1.5,4.4,4.5,4.4c2.5,0,4.9-2.1,4.9-2.1l2.2,4.2c0,0-2.7,2.9-7.6,2.9 C10.8,27.9,7.2,23.5,7.2,18.6z M36.9,27.9c-6.4,0-9.9-4.4-9.9-9.3c0-4.8,3.5-9.3,9.9-9.3C41.7,9.3,44,12,44,12l-2.5,4 c0,0-1.7-1.7-4.2-1.7c-2.8,0-4.3,2.1-4.3,4.3c0,2.1,1.5,4.4,4.5,4.4c2.5,0,4.9-2.1,4.9-2.1l2.2,4.2C44.5,25,41.9,27.9,36.9,27.9z"></path></svg>'},function(t,e){t.exports='<button type="button" class="cc-button media-control-button media-control-icon" data-cc-button aria-label="<%= ariaLabel %>"></button>\n<ul>\n <% if (title) { %>\n <li data-title><%= title %></li>\n <% }; %>\n <li><a href="#" data-cc-select="-1"><%= disabledLabel %></a></li>\n <% for (var i = 0; i < tracks.length; i++) { %>\n <li><a href="#" data-cc-select="<%= tracks[i].id %>"><%= tracks[i].label %></a></li>\n <% }; %>\n</ul>\n'},function(t,e,n){var r=n(232);"string"==typeof r&&(r=[[t.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(9)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(8)(!1)).push([t.i,".cc-controls[data-cc-controls] {\n float: right;\n position: relative;\n display: none; }\n .cc-controls[data-cc-controls].available {\n display: block; }\n .cc-controls[data-cc-controls] .cc-button {\n padding: 6px !important; }\n .cc-controls[data-cc-controls] .cc-button.enabled {\n display: block;\n opacity: 1.0; }\n .cc-controls[data-cc-controls] .cc-button.enabled:hover {\n opacity: 1.0;\n text-shadow: none; }\n .cc-controls[data-cc-controls] > ul {\n list-style-type: none;\n position: absolute;\n bottom: 25px;\n border: 1px solid black;\n display: none;\n background-color: #e6e6e6; }\n .cc-controls[data-cc-controls] li {\n font-size: 10px; }\n .cc-controls[data-cc-controls] li[data-title] {\n background-color: #c3c2c2;\n padding: 5px; }\n .cc-controls[data-cc-controls] li a {\n color: #444;\n padding: 2px 10px;\n display: block;\n text-decoration: none; }\n .cc-controls[data-cc-controls] li a:hover {\n background-color: #555;\n color: white; }\n .cc-controls[data-cc-controls] li a:hover a {\n color: white;\n text-decoration: none; }\n .cc-controls[data-cc-controls] li.current a {\n color: #f00; }\n",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=f(n(0)),i=f(n(1)),a=f(n(3)),o=f(n(2)),s=f(n(35)),u=f(n(4)),l=f(n(6)),c=f(n(64)),d=f(n(97));function f(t){return t&&t.__esModule?t:{default:t}}var h=(0,l.default)('link[rel="shortcut icon"]'),p=function(t){function e(n){(0,r.default)(this,e);var a=(0,i.default)(this,t.call(this,n));return a._container=null,a.configure(),a}return(0,o.default)(e,t),(0,a.default)(e,[{key:"name",get:function(){return"favicon"}},{key:"oldIcon",get:function(){return h}}]),e.prototype.configure=function(){this.core.options.changeFavicon?this.enabled||(this.stopListening(this.core,u.default.CORE_OPTIONS_CHANGE),this.enable()):this.enabled&&(this.disable(),this.listenTo(this.core,u.default.CORE_OPTIONS_CHANGE,this.configure))},e.prototype.bindEvents=function(){this.listenTo(this.core,u.default.CORE_OPTIONS_CHANGE,this.configure),this.listenTo(this.core,u.default.CORE_ACTIVE_CONTAINER_CHANGED,this.containerChanged),this.core.activeContainer&&this.containerChanged()},e.prototype.containerChanged=function(){this._container&&this.stopListening(this._container),this._container=this.core.activeContainer,this.listenTo(this._container,u.default.CONTAINER_PLAY,this.setPlayIcon),this.listenTo(this._container,u.default.CONTAINER_PAUSE,this.setPauseIcon),this.listenTo(this._container,u.default.CONTAINER_STOP,this.resetIcon),this.listenTo(this._container,u.default.CONTAINER_ENDED,this.resetIcon),this.listenTo(this._container,u.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,l.default)("<canvas/>");e[0].width=16,e[0].height=16;var n=e[0].getContext("2d");n.fillStyle="#000";var r=(0,l.default)(t).find("path").attr("d"),i=new Path2D(r);n.fill(i);var a=(0,l.default)('<link rel="shortcut icon" type="image/png"/>');return a.attr("href",e[0].toDataURL("image/png")),a},e.prototype.setPlayIcon=function(){this.playIcon||(this.playIcon=this.createIcon(c.default)),this.changeIcon(this.playIcon)},e.prototype.setPauseIcon=function(){this.pauseIcon||(this.pauseIcon=this.createIcon(d.default)),this.changeIcon(this.pauseIcon)},e.prototype.resetIcon=function(){(0,l.default)('link[rel="shortcut icon"]').remove(),(0,l.default)("head").append(this.oldIcon)},e.prototype.changeIcon=function(t){t&&((0,l.default)('link[rel="shortcut icon"]').remove(),(0,l.default)("head").append(t))},e}(s.default);e.default=p,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(235),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=h(n(0)),i=h(n(1)),a=h(n(3)),o=h(n(2)),s=n(5),u=h(n(23)),l=h(n(7)),c=h(n(4)),d=h(n(10)),f=h(n(236));function h(t){return t&&t.__esModule?t:{default:t}}n(237);var p=function(t){function e(n){(0,r.default)(this,e);var a=(0,i.default)(this,t.call(this,n));return a.hoveringOverSeekBar=!1,a.hoverPosition=null,a.duration=null,a.firstFragDateTime=null,a.actualLiveTime=!!a.mediaControl.options.actualLiveTime,a.actualLiveTime&&(a.mediaControl.options.actualLiveServerTime?a.actualLiveServerTimeDiff=(new Date).getTime()-new Date(a.mediaControl.options.actualLiveServerTime).getTime():a.actualLiveServerTimeDiff=0),a}return(0,o.default)(e,t),(0,a.default)(e,[{key:"name",get:function(){return"seek_time"}},{key:"template",get:function(){return(0,l.default)(f.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()===d.default.LIVE&&this.mediaControlContainer.isDvrEnabled()}},{key:"durationShown",get:function(){return this.isLiveStreamWithDvr&&!this.actualLiveTime}},{key:"useActualLiveTime",get:function(){return this.actualLiveTime&&this.isLiveStreamWithDvr}}]),e.prototype.bindEvents=function(){this.listenTo(this.mediaControl,c.default.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.mediaControl,c.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR,this.showTime),this.listenTo(this.mediaControl,c.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR,this.hideTime),this.listenTo(this.mediaControl,c.default.MEDIACONTROL_CONTAINERCHANGED,this.onContainerChanged),this.mediaControlContainer&&(this.listenTo(this.mediaControlContainer,c.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.update),this.listenTo(this.mediaControlContainer,c.default.CONTAINER_TIMEUPDATE,this.updateDuration))},e.prototype.onContainerChanged=function(){this.stopListening(),this.bindEvents()},e.prototype.updateDuration=function(t){this.duration=t.total,this.firstFragDateTime=t.firstFragDateTime,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,n=void 0,r=void 0;return this.useActualLiveTime?(this.firstFragDateTime?(r=new Date(this.firstFragDateTime),(n=new Date(this.firstFragDateTime)).setHours(0,0,0,0),e=(r.getTime()-n.getTime())/1e3+this.duration):(n=new Date((new Date).getTime()-this.actualLiveServerTimeDiff),e=((r=new Date(n))-n.setHours(0,0,0,0))/1e3),(t=e-this.duration+this.hoverPosition*this.duration)<0&&(t+=86400)):t=this.hoverPosition*this.duration,{seekTime:t,secondsSinceMidnight:e}},e.prototype.update=function(){if(this.rendered)if(this.shouldBeVisible()){var t=this.getSeekTime(),e=(0,s.formatTime)(t.seekTime,this.useActualLiveTime);if(e!==this.displayedSeekTime&&(this.$seekTimeEl.text(e),this.displayedSeekTime=e),this.durationShown){this.$durationEl.show();var n=(0,s.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(),a=this.hoverPosition*r;a-=i/2,a=Math.max(0,Math.min(a,r-i)),this.$el.css("left",a)}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,this.$el.html(this.template()),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}(u.default);e.default=p,t.exports=e.default},function(t,e){t.exports="<span data-seek-time></span>\n<span data-duration></span>\n"},function(t,e,n){var r=n(238);"string"==typeof r&&(r=[[t.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(9)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(8)(!1)).push([t.i,'.seek-time[data-seek-time] {\n position: absolute;\n white-space: nowrap;\n height: 20px;\n line-height: 20px;\n font-size: 0;\n left: -100%;\n bottom: 55px;\n background-color: rgba(2, 2, 2, 0.5);\n z-index: 9999;\n transition: opacity 0.1s ease; }\n .seek-time[data-seek-time].hidden[data-seek-time] {\n opacity: 0; }\n .seek-time[data-seek-time] [data-seek-time] {\n display: inline-block;\n color: white;\n font-size: 10px;\n padding-left: 7px;\n padding-right: 7px;\n vertical-align: top; }\n .seek-time[data-seek-time] [data-duration] {\n display: inline-block;\n color: rgba(255, 255, 255, 0.5);\n font-size: 10px;\n padding-right: 7px;\n vertical-align: top; }\n .seek-time[data-seek-time] [data-duration]:before {\n content: "|";\n margin-right: 7px; }\n',""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(n(0)),i=l(n(3)),a=l(n(1)),o=l(n(2)),s=l(n(35)),u=l(n(4));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(){return(0,r.default)(this,e),(0,a.default)(this,t.apply(this,arguments))}return(0,o.default)(e,t),e.prototype.bindEvents=function(){this.listenTo(this.core,u.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()}))},(0,i.default)(e,[{key:"name",get:function(){return"sources"}}]),e}(s.default);e.default=c,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(n(0)),i=c(n(3)),a=c(n(1)),o=c(n(2)),s=c(n(4)),u=c(n(35)),l=n(5);function c(t){return t&&t.__esModule?t:{default:t}}var d=function(t){function e(){return(0,r.default)(this,e),(0,a.default)(this,t.apply(this,arguments))}return(0,o.default)(e,t),e.prototype.bindEvents=function(){this.listenTo(this.core,s.default.CORE_ACTIVE_CONTAINER_CHANGED,this.containerChanged);var t=this.core.activeContainer;t&&(this.listenTo(t,s.default.CONTAINER_ENDED,this.ended),this.listenTo(t,s.default.CONTAINER_STOP,this.ended))},e.prototype.containerChanged=function(){this.stopListening(),this.bindEvents()},e.prototype.ended=function(){(void 0===this.core.options.exitFullscreenOnEnd||this.core.options.exitFullscreenOnEnd)&&l.Fullscreen.isFullscreen()&&this.core.toggleFullscreen()},(0,i.default)(e,[{key:"name",get:function(){return"end_video"}}]),e}(u.default);e.default=d,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(n(0)),i=l(n(1)),a=l(n(3)),o=l(n(2)),s=n(5),u=l(n(6));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(n){(0,r.default)(this,e);var a=(0,i.default)(this,t.call(this,n));return a._initializeMessages(),a}return(0,o.default)(e,t),(0,a.default)(e,[{key:"name",get:function(){return"strings"}}]),e.prototype.t=function(t){var e=this._language(),n=this._messages.en;return(e&&this._messages[e]||n)[t]||n[t]||t},e.prototype._language=function(){return this.core.options.language||(0,s.getBrowserLanguage)()},e.prototype._initializeMessages=function(){this._messages=u.default.extend(!0,{en:{live:"live",back_to_live:"back to live",disabled:"Disabled",playback_not_supported:"Your browser does not support the playback of this video. Please try using a different browser.",default_error_title:"Could not play video.",default_error_message:"There was a problem trying to load the video."},pt:{live:"ao vivo",back_to_live:"voltar para o ao vivo",disabled:"Desativado",playback_not_supported:"Seu navegador não supporta a reprodução deste video. Por favor, tente usar um navegador diferente.",default_error_title:"Não foi possível reproduzir o vídeo.",default_error_message:"Ocorreu um problema ao tentar carregar o vídeo."},es:{live:"vivo",back_to_live:"volver en vivo",disabled:"Discapacitado",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:"к прямому эфиру",disabled:"Отключено",playback_not_supported:"Ваш браузер не поддерживает воспроизведение этого видео. Пожалуйста, попробуйте другой браузер."},fr:{live:"en direct",back_to_live:"retour au direct",disabled:"Désactivé",playback_not_supported:"Votre navigateur ne supporte pas la lecture de cette vidéo. Merci de tenter sur un autre navigateur.",default_error_title:"Impossible de lire la vidéo.",default_error_message:"Un problème est survenu lors du chargement de la vidéo."},tr:{live:"canlı",back_to_live:"canlı yayına dön",disabled:"Engelli",playback_not_supported:"Tarayıcınız bu videoyu oynatma desteğine sahip değil. Lütfen farklı bir tarayıcı ile deneyin."},et:{live:"Otseülekanne",back_to_live:"Tagasi otseülekande juurde",disabled:"Keelatud",playback_not_supported:"Teie brauser ei toeta selle video taasesitust. Proovige kasutada muud brauserit."}},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,this._messages["fr-FR"]=this._messages.fr,this._messages["tr-TR"]=this._messages.tr,this._messages["et-EE"]=this._messages.et},e}(l(n(35)).default);e.default=c,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(243),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=h(n(0)),i=h(n(1)),a=h(n(3)),o=h(n(2)),s=h(n(4)),u=h(n(23)),l=h(n(7)),c=h(n(24)),d=h(n(244)),f=h(n(245));function h(t){return t&&t.__esModule?t:{default:t}}n(246);var p=function(t){function e(n){var a;(0,r.default)(this,e);var o=(0,i.default)(this,t.call(this,n));return o.options.disableErrorScreen?(a=o.disable(),(0,i.default)(o,a)):o}return(0,o.default)(e,t),(0,a.default)(e,[{key:"name",get:function(){return"error_screen"}},{key:"template",get:function(){return(0,l.default)(f.default)}},{key:"container",get:function(){return this.core.getCurrentContainer()}},{key:"attributes",get:function(){return{class:"player-error-screen","data-error-screen":""}}}]),e.prototype.bindEvents=function(){this.listenTo(this.core,s.default.ERROR,this.onError),this.listenTo(this.core,s.default.CORE_ACTIVE_CONTAINER_CHANGED,this.onContainerChanged)},e.prototype.bindReload=function(){this.reloadButton=this.$el.find(".player-error-screen__reload"),this.reloadButton&&this.reloadButton.on("click",this.reload.bind(this))},e.prototype.reload=function(){var t=this;this.listenToOnce(this.core,s.default.CORE_READY,(function(){return t.container.play()})),this.core.load(this.options.sources,this.options.mimeType),this.unbindReload()},e.prototype.unbindReload=function(){this.reloadButton&&this.reloadButton.off("click")},e.prototype.onContainerChanged=function(){this.err=null,this.unbindReload(),this.hide()},e.prototype.onError=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.level===c.default.Levels.FATAL&&(this.err=t,this.container.disableMediaControl(),this.container.stop(),this.show())},e.prototype.show=function(){this.render(),this.$el.show()},e.prototype.hide=function(){this.$el.hide()},e.prototype.render=function(){if(this.err)return this.$el.html(this.template({title:this.err.UI.title,message:this.err.UI.message,code:this.err.code,icon:this.err.UI.icon||"",reloadIcon:d.default})),this.core.$el.append(this.el),this.bindReload(),this},e}(u.default);e.default=p,t.exports=e.default},function(t,e){t.exports='<svg fill="#FFFFFF" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg>'},function(t,e){t.exports='<div class="player-error-screen__content" data-error-screen>\n <% if (icon) { %>\n <div class="player-error-screen__icon" data-error-screen><%= icon %></div>\n <% } %>\n <div class="player-error-screen__title" data-error-screen><%= title %></div>\n <div class="player-error-screen__message" data-error-screen><%= message %></div>\n <div class="player-error-screen__code" data-error-screen>Error code: <%= code %></div>\n <div class="player-error-screen__reload" data-error-screen><%= reloadIcon %></div>\n</div>\n'},function(t,e,n){var r=n(247);"string"==typeof r&&(r=[[t.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(9)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(8)(!1)).push([t.i,"div.player-error-screen {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: #CCCACA;\n position: absolute;\n top: 0;\n height: 100%;\n width: 100%;\n background-color: rgba(0, 0, 0, 0.7);\n z-index: 2000;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center; }\n div.player-error-screen__content[data-error-screen] {\n font-size: 14px;\n color: #CCCACA;\n margin-top: 45px; }\n div.player-error-screen__title[data-error-screen] {\n font-weight: bold;\n line-height: 30px;\n font-size: 18px; }\n div.player-error-screen__message[data-error-screen] {\n width: 90%;\n margin: 0 auto; }\n div.player-error-screen__code[data-error-screen] {\n font-size: 13px;\n margin-top: 15px; }\n div.player-error-screen__reload {\n cursor: pointer;\n width: 30px;\n margin: 15px auto 0; }\n",""])}])},t.exports=r()},function(t,e,n){var r;window,r=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="dist/",n(n.s="./src/clappr-dash-shaka-playback.js")}({"./node_modules/shaka-player/dist/shaka-player.compiled.js":
|
||
/*!*****************************************************************!*\
|
||
!*** ./node_modules/shaka-player/dist/shaka-player.compiled.js ***!
|
||
\*****************************************************************/
|
||
/*! no static exports found */function(t,e,n){(function(t,n){!function(){var r="undefined"!=typeof window?window:t,i={};for(var a in function(t,e){var r,i="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)},a=void 0!==t&&t===this?this:void 0!==e&&null!=e?e:this;function o(){o=function(){},a.Symbol||(a.Symbol=u)}var s,u=(s=0,function(t){return"jscomp_symbol_"+(t||"")+s++});function l(){o();var t=a.Symbol.iterator;t||(t=a.Symbol.iterator=a.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&i(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return c(this)}}),l=function(){}}function c(t){var e=0;return d((function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}))}function d(t){return l(),(t={next:t})[a.Symbol.iterator]=function(){return this},t}function f(t){l();var e=t[Symbol.iterator];return e?e.call(t):c(t)}function h(t,e){if(e){for(var n=a,r=t.split("."),o=0;o<r.length-1;o++){var s=r[o];s in n||(n[s]={}),n=n[s]}(s=e(o=n[r=r[r.length-1]]))!=o&&null!=s&&i(n,r,{configurable:!0,writable:!0,value:s})}}function p(t){return function(t){function e(e){return t.next(e)}function n(e){return t.throw(e)}return new Promise((function(r,i){!function t(a){a.done?r(a.value):Promise.resolve(a.value).then(e,n).then(t,i)}(t.next())}))}(t())}h("Promise",(function(t){function e(t){this.b=0,this.g=void 0,this.a=[];var e=this.c();try{t(e.resolve,e.reject)}catch(t){e.reject(t)}}function n(){this.a=null}function r(t){return t instanceof e?t:new e((function(e){e(t)}))}if(t)return t;n.prototype.b=function(t){null==this.a&&(this.a=[],this.f()),this.a.push(t)},n.prototype.f=function(){var t=this;this.c((function(){t.h()}))};var i=a.setTimeout;n.prototype.c=function(t){i(t,0)},n.prototype.h=function(){for(;this.a&&this.a.length;){var t=this.a;this.a=[];for(var e=0;e<t.length;++e){var n=t[e];t[e]=null;try{n()}catch(t){this.g(t)}}}this.a=null},n.prototype.g=function(t){this.c((function(){throw t}))},e.prototype.c=function(){function t(t){return function(r){n||(n=!0,t.call(e,r))}}var e=this,n=!1;return{resolve:t(this.s),reject:t(this.f)}},e.prototype.s=function(t){if(t===this)this.f(new TypeError("A Promise cannot resolve to itself"));else if(t instanceof e)this.u(t);else{t:switch(typeof t){case"object":var n=null!=t;break t;case"function":n=!0;break t;default:n=!1}n?this.m(t):this.h(t)}},e.prototype.m=function(t){var e=void 0;try{e=t.then}catch(t){return void this.f(t)}"function"==typeof e?this.B(e,t):this.h(t)},e.prototype.f=function(t){this.i(2,t)},e.prototype.h=function(t){this.i(1,t)},e.prototype.i=function(t,e){if(0!=this.b)throw Error("Cannot settle("+t+", "+e+"): Promise already settled in state"+this.b);this.b=t,this.g=e,this.l()},e.prototype.l=function(){if(null!=this.a){for(var t=0;t<this.a.length;++t)o.b(this.a[t]);this.a=null}};var o=new n;return e.prototype.u=function(t){var e=this.c();t.cc(e.resolve,e.reject)},e.prototype.B=function(t,e){var n=this.c();try{t.call(e,n.resolve,n.reject)}catch(t){n.reject(t)}},e.prototype.then=function(t,n){function r(t,e){return"function"==typeof t?function(e){try{i(t(e))}catch(t){a(t)}}:e}var i,a,o=new e((function(t,e){i=t,a=e}));return this.cc(r(t,i),r(n,a)),o},e.prototype.catch=function(t){return this.then(void 0,t)},e.prototype.cc=function(t,e){function n(){switch(r.b){case 1:t(r.g);break;case 2:e(r.g);break;default:throw Error("Unexpected state: "+r.b)}}var r=this;null==this.a?o.b(n):this.a.push(n)},e.resolve=r,e.reject=function(t){return new e((function(e,n){n(t)}))},e.race=function(t){return new e((function(e,n){for(var i=f(t),a=i.next();!a.done;a=i.next())r(a.value).cc(e,n)}))},e.all=function(t){var n=f(t),i=n.next();return i.done?r([]):new e((function(t,e){function a(e){return function(n){o[e]=n,0==--s&&t(o)}}var o=[],s=0;do{o.push(void 0),s++,r(i.value).cc(a(o.length-1),e),i=n.next()}while(!i.done)}))},e})),h("Promise.prototype.finally",(function(t){return t||function(t){return this.then((function(e){return Promise.resolve(t()).then((function(){return e}))}),(function(e){return Promise.resolve(t()).then((function(){throw e}))}))}}));var g,y="function"==typeof Object.create?Object.create:function(t){function e(){}return e.prototype=t,new e};if("function"==typeof Object.setPrototypeOf)g=Object.setPrototypeOf;else{var v;t:{var m={};try{m.__proto__={Ae:!0},v=m.Ae;break t}catch(s){}v=!1}g=v?function(t,e){if(t.__proto__=e,t.__proto__!==e)throw new TypeError(t+" is not extensible");return t}:null}var b=g;function A(t,e){if(t.prototype=y(e.prototype),t.prototype.constructor=t,b)b(t,e);else for(var n in e)if("prototype"!=n)if(Object.defineProperties){var r=Object.getOwnPropertyDescriptor(e,n);r&&Object.defineProperty(t,n,r)}else t[n]=e[n];t.tg=e.prototype}function _(){this.g=!1,this.c=null,this.o=void 0,this.j=1,this.b=this.f=0,this.i=this.a=null}function E(t){if(t.g)throw new TypeError("Generator is already running");t.g=!0}function T(t,e){t.a={Ld:e,Wd:!0},t.j=t.f||t.b}function w(t,e,n){return t.j=n,{value:e}}function S(t){t.j=0}function k(t,e,n){t.f=e,null!=n&&(t.b=n)}function C(t,e){t.f=0,t.b=e||0}function L(t,e){t.j=e,t.f=0}function x(t){t.f=0;var e=t.a.Ld;return t.a=null,e}function R(t){t.i=[t.a],t.f=0,t.b=0}function I(t,e){var n=t.i.splice(0)[0];(n=t.a=t.a||n)?n.Wd?t.j=t.f||t.b:null!=n.A&&t.b<n.A?(t.j=n.A,t.a=null):t.j=t.b:t.j=e}function P(t){this.a=new _,this.b=t}function O(t,e,n,r){try{var i=e.call(t.a.c,n);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");if(!i.done)return t.a.g=!1,i;var a=i.value}catch(e){return t.a.c=null,T(t.a,e),D(t)}return t.a.c=null,r.call(t.a,a),D(t)}function D(t){for(;t.a.j;)try{var e=t.b(t.a);if(e)return t.a.g=!1,{value:e.value,done:!1}}catch(e){t.a.o=void 0,T(t.a,e)}if(t.a.g=!1,t.a.a){if(e=t.a.a,t.a.a=null,e.Wd)throw e.Ld;return{value:e.return,done:!0}}return{value:void 0,done:!0}}function M(t){this.next=function(e){return E(t.a),t.a.c?e=O(t,t.a.c.next,e,t.a.h):(t.a.h(e),e=D(t)),e},this.throw=function(e){return E(t.a),t.a.c?e=O(t,t.a.c.throw,e,t.a.h):(T(t.a,e),e=D(t)),e},this.return=function(e){return function(t,e){E(t.a);var n=t.a.c;return n?O(t,"return"in n?n.return:function(t){return{value:t,done:!0}},e,t.a.return):(t.a.return(e),D(t))}(t,e)},l(),this[Symbol.iterator]=function(){return this}}function N(t,e){return M.prototype=t.prototype,new M(new P(e))}function U(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function F(t,e,n){t instanceof String&&(t=String(t));for(var r=t.length,i=0;i<r;i++){var a=t[i];if(e.call(n,a,i,t))return{Td:i,ve:a}}return{Td:-1,ve:void 0}}function B(t,e,n){if(null==t)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(e instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return t+""}_.prototype.h=function(t){this.o=t},_.prototype.return=function(t){this.a={return:t},this.j=this.b},_.prototype.A=function(t){this.j=t},h("WeakMap",(function(t){function e(t){if(this.a=(s+=Math.random()+1).toString(),t){o(),l(),t=f(t);for(var e;!(e=t.next()).done;)e=e.value,this.set(e[0],e[1])}}function n(t){U(t,a)||i(t,a,{value:{}})}function r(t){var e=Object[t];e&&(Object[t]=function(t){return n(t),e(t)})}if(function(){if(!t||!Object.seal)return!1;try{var e=Object.seal({}),n=Object.seal({}),r=new t([[e,2],[n,3]]);return 2==r.get(e)&&3==r.get(n)&&(r.delete(e),r.set(n,4),!r.has(e)&&4==r.get(n))}catch(t){return!1}}())return t;var a="$jscomp_hidden_"+Math.random();r("freeze"),r("preventExtensions"),r("seal");var s=0;return e.prototype.set=function(t,e){if(n(t),!U(t,a))throw Error("WeakMap key fail: "+t);return t[a][this.a]=e,this},e.prototype.get=function(t){return U(t,a)?t[a][this.a]:void 0},e.prototype.has=function(t){return U(t,a)&&U(t[a],this.a)},e.prototype.delete=function(t){return!(!U(t,a)||!U(t[a],this.a))&&delete t[a][this.a]},e})),h("Map",(function(t){function e(){var t={};return t.Fa=t.next=t.head=t}function n(t,e){var n=t.a;return d((function(){if(n){for(;n.head!=t.a;)n=n.Fa;for(;n.next!=n.head;)return n=n.next,{done:!1,value:e(n)};n=null}return{done:!0,value:void 0}}))}function r(t,e){var n=e&&typeof e;"object"==n||"function"==n?a.has(e)?n=a.get(e):(n=""+ ++s,a.set(e,n)):n="p_"+e;var r=t.b[n];if(r&&U(t.b,n))for(var i=0;i<r.length;i++){var o=r[i];if(e!=e&&o.key!=o.key||e===o.key)return{id:n,list:r,index:i,X:o}}return{id:n,list:r,index:-1,X:void 0}}function i(t){if(this.b={},this.a=e(),this.size=0,t){t=f(t);for(var n;!(n=t.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!t||"function"!=typeof t||!t.prototype.entries||"function"!=typeof Object.seal)return!1;try{var e=Object.seal({x:4}),n=new t(f([[e,"s"]]));if("s"!=n.get(e)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var r=n.entries(),i=r.next();return!i.done&&i.value[0]==e&&"s"==i.value[1]&&!((i=r.next()).done||4!=i.value[0].x||"t"!=i.value[1]||!r.next().done)}catch(t){return!1}}())return t;o(),l();var a=new WeakMap;i.prototype.set=function(t,e){var n=r(this,t);return n.list||(n.list=this.b[n.id]=[]),n.X?n.X.value=e:(n.X={next:this.a,Fa:this.a.Fa,head:this.a,key:t,value:e},n.list.push(n.X),this.a.Fa.next=n.X,this.a.Fa=n.X,this.size++),this},i.prototype.delete=function(t){return!(!(t=r(this,t)).X||!t.list||(t.list.splice(t.index,1),t.list.length||delete this.b[t.id],t.X.Fa.next=t.X.next,t.X.next.Fa=t.X.Fa,t.X.head=null,this.size--,0))},i.prototype.clear=function(){this.b={},this.a=this.a.Fa=e(),this.size=0},i.prototype.has=function(t){return!!r(this,t).X},i.prototype.get=function(t){return(t=r(this,t).X)&&t.value},i.prototype.entries=function(){return n(this,(function(t){return[t.key,t.value]}))},i.prototype.keys=function(){return n(this,(function(t){return t.key}))},i.prototype.values=function(){return n(this,(function(t){return t.value}))},i.prototype.forEach=function(t,e){for(var n,r=this.entries();!(n=r.next()).done;)n=n.value,t.call(e,n[1],n[0],this)},i.prototype[Symbol.iterator]=i.prototype.entries;var s=0;return i})),h("Set",(function(t){function e(t){if(this.a=new Map,t){t=f(t);for(var e;!(e=t.next()).done;)this.add(e.value)}this.size=this.a.size}return function(){if(!t||"function"!=typeof t||!t.prototype.entries||"function"!=typeof Object.seal)return!1;try{var e=Object.seal({x:4}),n=new t(f([e]));if(!n.has(e)||1!=n.size||n.add(e)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var r=n.entries(),i=r.next();return!i.done&&i.value[0]==e&&i.value[1]==e&&!(i=r.next()).done&&i.value[0]!=e&&4==i.value[0].x&&i.value[1]==i.value[0]&&r.next().done}catch(t){return!1}}()?t:(o(),l(),e.prototype.add=function(t){return this.a.set(t,t),this.size=this.a.size,this},e.prototype.delete=function(t){return t=this.a.delete(t),this.size=this.a.size,t},e.prototype.clear=function(){this.a.clear(),this.size=0},e.prototype.has=function(t){return this.a.has(t)},e.prototype.entries=function(){return this.a.entries()},e.prototype.values=function(){return this.a.values()},e.prototype.keys=e.prototype.values,e.prototype[Symbol.iterator]=e.prototype.values,e.prototype.forEach=function(t,e){var n=this;this.a.forEach((function(r){return t.call(e,r,r,n)}))},e)})),h("Array.prototype.findIndex",(function(t){return t||function(t,e){return F(this,t,e).Td}})),h("Array.prototype.keys",(function(t){return t||function(){return function(t,e){l(),t instanceof String&&(t+="");var n=0,r={next:function(){if(n<t.length){var i=n++;return{value:e(i,t[i]),done:!1}}return r.next=function(){return{done:!0,value:void 0}},r.next()}};return r[Symbol.iterator]=function(){return r},r}(this,(function(t){return t}))}})),h("Object.is",(function(t){return t||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}})),h("Array.prototype.includes",(function(t){return t||function(t,e){var n=this;n instanceof String&&(n=String(n));var r=n.length,i=e||0;for(0>i&&(i=Math.max(i+r,0));i<r;i++){var a=n[i];if(a===t||Object.is(a,t))return!0}return!1}})),h("String.prototype.includes",(function(t){return t||function(t,e){return-1!==B(this,t,"includes").indexOf(t,e||0)}})),h("Array.from",(function(t){return t||function(t,e,n){l(),e=null!=e?e:function(t){return t};var r=[],i=t[Symbol.iterator];if("function"==typeof i)for(t=i.call(t);!(i=t.next()).done;)r.push(e.call(n,i.value));else{i=t.length;for(var a=0;a<i;a++)r.push(e.call(n,t[a]))}return r}})),h("String.prototype.startsWith",(function(t){return t||function(t,e){for(var n=B(this,t,"startsWith"),r=n.length,i=t.length,a=Math.max(0,Math.min(0|e,n.length)),o=0;o<i&&a<r;)if(n[a++]!=t[o++])return!1;return o>=i}})),h("Array.prototype.find",(function(t){return t||function(t,e){return F(this,t,e).ve}}));var j="function"==typeof Object.assign?Object.assign:function(t,e){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(r)for(var i in r)U(r,i)&&(t[i]=r[i])}return t};h("Object.assign",(function(t){return t||j}));var K=this;function V(t,e){var n,r=t.split("."),i=K;r[0]in i||!i.execScript||i.execScript("var "+r[0]);for(;r.length&&(n=r.shift());)r.length||void 0===e?i=i[n]?i[n]:i[n]={}:i[n]=e}function G(t,e){function n(){}n.prototype=e.prototype,t.tg=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.Eg=function(t,n,r){return e.prototype[n].apply(t,Array.prototype.slice.call(arguments,2))}}function H(t){this.c=Math.exp(Math.log(.5)/t),this.b=this.a=0}function Y(t,e,n){var r=Math.pow(t.c,e);n=n*(1-r)+r*t.a,isNaN(n)||(t.a=n,t.b+=e)}function z(t){return t.a/(1-Math.pow(t.c,t.b))}function $(){this.b=new H(2),this.c=new H(5),this.a=0}function W(){}function q(){}function X(){}K.a=!0,$.prototype.getBandwidthEstimate=function(t){return 128e3>this.a?t:Math.min(z(this.b),z(this.c))},t.console&&t.console.log.bind&&(q=console.warn.bind(console),W=console.error.bind(console));var J=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function Q(t){var e;t instanceof Q?(Z(this,t.ta),this.bb=t.bb,this.sa=t.sa,tt(this,t.Ab),this.ja=t.ja,et(this,t.a.clone()),this.Sa=t.Sa):t&&(e=String(t).match(J))?(Z(this,e[1]||"",!0),this.bb=nt(e[2]||""),this.sa=nt(e[3]||"",!0),tt(this,e[4]),this.ja=nt(e[5]||"",!0),et(this,e[6]||"",!0),this.Sa=nt(e[7]||"")):this.a=new ct(null)}function Z(t,e,n){t.ta=n?nt(e,!0):e,t.ta&&(t.ta=t.ta.replace(/:$/,""))}function tt(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.Ab=e}else t.Ab=null}function et(t,e,n){e instanceof ct?t.a=e:(n||(e=rt(e,ut)),t.a=new ct(e))}function nt(t,e){return t?e?decodeURI(t):decodeURIComponent(t):""}function rt(t,e,n){return"string"==typeof t?(t=encodeURI(t).replace(e,it),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function it(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}(r=Q.prototype).ta="",r.bb="",r.sa="",r.Ab=null,r.ja="",r.Sa="",r.toString=function(){var t=[],e=this.ta;if(e&&t.push(rt(e,at,!0),":"),e=this.sa){t.push("//");var n=this.bb;n&&t.push(rt(n,at,!0),"@"),t.push(encodeURIComponent(e).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(e=this.Ab)&&t.push(":",String(e))}return(e=this.ja)&&(this.sa&&"/"!=e.charAt(0)&&t.push("/"),t.push(rt(e,"/"==e.charAt(0)?st:ot,!0))),(e=this.a.toString())&&t.push("?",e),(e=this.Sa)&&t.push("#",rt(e,lt)),t.join("")},r.resolve=function(t){var e=this.clone();"data"===e.ta&&(e=new Q);var n=!!t.ta;n?Z(e,t.ta):n=!!t.bb,n?e.bb=t.bb:n=!!t.sa,n?e.sa=t.sa:n=null!=t.Ab;var r=t.ja;if(n)tt(e,t.Ab);else if(n=!!t.ja){if("/"!=r.charAt(0))if(this.sa&&!this.ja)r="/"+r;else{var i=e.ja.lastIndexOf("/");-1!=i&&(r=e.ja.substr(0,i+1)+r)}if(".."==r||"."==r)r="";else if(-1!=r.indexOf("./")||-1!=r.indexOf("/.")){i=0==r.lastIndexOf("/",0),r=r.split("/");for(var a=[],o=0;o<r.length;){var s=r[o++];"."==s?i&&o==r.length&&a.push(""):".."==s?((1<a.length||1==a.length&&""!=a[0])&&a.pop(),i&&o==r.length&&a.push("")):(a.push(s),i=!0)}r=a.join("/")}}return n?e.ja=r:n=""!==t.a.toString(),n?et(e,t.a.clone()):n=!!t.Sa,n&&(e.Sa=t.Sa),e},r.clone=function(){return new Q(this)};var at=/[#\/\?@]/g,ot=/[#\?:]/g,st=/[#\?]/g,ut=/[#\?@]/g,lt=/#/g;function ct(t){this.a=t||null}function dt(t){this.b=t,this.a=null}function ft(t){this.b=t,this.a=null}function ht(t,e){var n={maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0};this.i=null==t.maxAttempts?n.maxAttempts:t.maxAttempts,this.f=null==t.baseDelay?n.baseDelay:t.baseDelay,this.h=null==t.fuzzFactor?n.fuzzFactor:t.fuzzFactor,this.g=null==t.backoffFactor?n.backoffFactor:t.backoffFactor,this.a=0,this.b=this.f,(this.c=void 0!==e&&e)&&(this.a=1)}function pt(t){return p((function e(){var n,r;return N(e,(function(e){switch(e.j){case 1:if(t.a>=t.i){if(!t.c)return e.return(Promise.reject());t.a=1,t.b=t.f}return n=t.a,t.a++,0==n?e.return():(r=t.b*(1+(2*Math.random()-1)*t.h),w(e,new Promise((function(t){new ft(t).R(r/1e3)})),2));case 2:t.b*=t.g,S(e)}}))}))}function gt(t,e,n,r){for(var i=[],a=3;a<arguments.length;++a)i[a-3]=arguments[a];this.severity=t,this.category=e,this.code=n,this.data=i,this.handled=!1}function yt(){var t,e,n=new Promise((function(n,r){t=n,e=r}));return n.resolve=t,n.reject=e,n}function vt(t,e){this.promise=t,this.Zd=e,this.a=!1}function mt(t){return new vt(Promise.reject(t),(function(){return Promise.resolve()}))}function bt(){var t=Promise.reject(new gt(2,7,7001));return t.catch((function(){})),new vt(t,(function(){return Promise.resolve()}))}function At(t){return new vt(Promise.resolve(t),(function(){return Promise.resolve()}))}function _t(t){return new vt(t,(function(){return t.catch((function(){}))}))}function Et(t){return new vt(Promise.all(t.map((function(t){return t.promise}))),(function(){return Promise.all(t.map((function(t){return t.abort()})))}))}function Tt(t,e,n){try{var r=t(e);return r&&r.promise&&r.abort?(n.resolve(r.promise),function(){return r.abort()}):(n.resolve(r),function(){return Promise.resolve(r).then((function(){})).catch((function(){}))})}catch(t){return n.reject(t),function(){return Promise.resolve()}}}function wt(e,n){for(var r in n=void 0===n?{}:n)this[r]=n[r];this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=t.performance&&t.performance.now?t.performance.now():Date.now(),this.type=e,this.isTrusted=!1,this.target=this.currentTarget=null,this.a=!1}function St(){this.a={}}function kt(){this.Jc=new St,this.$b=this}function Ct(t){var e=new Set;return function t(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||n.buffer&&n.buffer.constructor==ArrayBuffer)return n;if(e.has(n))return null;var r=n.constructor==Array;if(n.constructor!=Object&&!r)return null;e.add(n);var i,a=r?[]:{};for(i in n)a[i]=t(n[i]);return r&&(a.length=n.length),a}}(t)}function Lt(t,e){return!("number"!=typeof t||"number"!=typeof e||!isNaN(t)||!isNaN(e))||t===e}function xt(t,e){var n=t.indexOf(e);-1<n&&t.splice(n,1)}function Rt(t,e,n){if(n||(n=Lt),t.length!=e.length)return!1;e=e.slice();for(var r={},i=(t=f(t)).next();!i.done;r={item:r.item},i=t.next()){if(r.item=i.value,-1==(i=e.findIndex(function(t){return function(e){return n(t.item,e)}}(r))))return!1;e[i]=e[e.length-1],e.pop()}return 0==e.length}function It(){this.a=[]}function Pt(t,e){t.a.push(e.finally((function(){xt(t.a,e)})))}function Ot(t){kt.call(this),this.f=!1,this.g=new It,this.a=new Set,this.b=new Set,this.c=t||null}(r=ct.prototype).ha=null,r.fc=null,r.add=function(t,e){if(!this.ha&&(this.ha={},this.fc=0,this.a))for(var n=this.a.split("&"),r=0;r<n.length;r++){var i=n[r].indexOf("="),a=null;if(0<=i){var o=n[r].substring(0,i);a=n[r].substring(i+1)}else o=n[r];o=decodeURIComponent(o.replace(/\+/g," ")),a=a||"",this.add(o,decodeURIComponent(a.replace(/\+/g," ")))}return this.a=null,(n=this.ha.hasOwnProperty(t)&&this.ha[t])||(this.ha[t]=n=[]),n.push(e),this.fc++,this},r.toString=function(){if(this.a)return this.a;if(!this.ha)return"";var t,e=[];for(t in this.ha)for(var n=encodeURIComponent(t),r=this.ha[t],i=0;i<r.length;i++){var a=n;""!==r[i]&&(a+="="+encodeURIComponent(r[i])),e.push(a)}return this.a=e.join("&")},r.clone=function(){var t=new ct;if(t.a=this.a,this.ha){var e,n={};for(e in this.ha)n[e]=this.ha[e].concat();t.ha=n,t.fc=this.fc}return t},dt.prototype.R=function(e){var n=this;this.stop();var r=!0,i=null;return this.a=function(){t.clearTimeout(i),r=!1},i=t.setTimeout((function(){r&&n.b()}),1e3*e),this},dt.prototype.stop=function(){this.a&&(this.a(),this.a=null)},V("shaka.util.Timer",ft),ft.prototype.yc=function(){return this.stop(),this.b(),this},ft.prototype.tickNow=ft.prototype.yc,ft.prototype.R=function(t){var e=this;return this.stop(),this.a=new dt((function(){e.b()})).R(t),this},ft.prototype.tickAfter=ft.prototype.R,ft.prototype.Na=function(t){var e=this;return this.stop(),this.a=new dt((function(){e.a.R(t),e.b()})).R(t),this},ft.prototype.tickEvery=ft.prototype.Na,ft.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)},ft.prototype.stop=ft.prototype.stop,V("shaka.util.Error",gt),gt.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},gt.Severity={RECOVERABLE:1,CRITICAL:2},gt.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9},gt.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013},yt.prototype.resolve=function(){},yt.prototype.reject=function(){},V("shaka.util.AbortableOperation",vt),vt.failed=mt,vt.aborted=bt,vt.completed=At,vt.notAbortable=_t,vt.prototype.abort=function(){return this.a=!0,this.Zd()},vt.prototype.abort=vt.prototype.abort,vt.all=Et,vt.prototype.finally=function(t){return this.promise.then((function(){return t(!0)}),(function(){return t(!1)})),this},vt.prototype.finally=vt.prototype.finally,vt.prototype.U=function(t,e){function n(){return i.reject(new gt(2,7,7001)),r.abort()}var r=this,i=new yt;return this.promise.then((function(e){r.a?i.reject(new gt(2,7,7001)):t?n=Tt(t,e,i):i.resolve(e)}),(function(t){e?n=Tt(e,t,i):i.reject(t)})),new vt(i,(function(){return n()}))},vt.prototype.chain=vt.prototype.U,wt.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},wt.prototype.stopImmediatePropagation=function(){this.a=!0},wt.prototype.stopPropagation=function(){},(r=St.prototype).push=function(t,e){this.a.hasOwnProperty(t)?this.a[t].push(e):this.a[t]=[e]},r.get=function(t){return(t=this.a[t])?t.slice():null},r.getAll=function(){var t,e=[];for(t in this.a)e.push.apply(e,this.a[t]);return e},r.remove=function(t,e){var n=this.a[t];if(n)for(var r=0;r<n.length;++r)n[r]==e&&(n.splice(r,1),--r)},r.forEach=function(t){for(var e in this.a)t(e,this.a[e])},kt.prototype.addEventListener=function(t,e){this.Jc.push(t,e)},kt.prototype.removeEventListener=function(t,e){this.Jc.remove(t,e)},kt.prototype.dispatchEvent=function(t){for(var e=this.Jc.get(t.type)||[],n=0;n<e.length;++n){t.target=this.$b,t.currentTarget=this.$b;var r=e[n];try{r.handleEvent?r.handleEvent(t):r.call(this,t)}catch(t){}if(t.a)break}return t.defaultPrevented},It.prototype.destroy=function(){var t=[];return this.a.forEach((function(e){e.promise.catch((function(){})),t.push(e.abort())})),this.a=[],Promise.all(t)},G(Ot,kt),V("shaka.net.NetworkingEngine",Ot),Ot.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4},Ot.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var Dt={};function Mt(t,e,n){n=n||3;var r=Dt[t];(!r||n>=r.priority)&&(Dt[t]={priority:n,Rf:e})}function Nt(t,e){return{uris:t,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:e,licenseRequestType:null,sessionId:null}}function Ut(){this.a=0}function Ft(t,e,n){vt.call(this,t,e),this.b=n}function Bt(){}function jt(){this.a=new St}function Kt(t,e,n,r){this.target=t,this.type=e,this.listener=n,this.a=function(t,e){if(null==e)return!1;if("boolean"==typeof e)return e;var n=new Set(["passive","capture"]);return Object.keys(e).filter((function(t){return!n.has(t)})),function(t){var e=Vt;if(null==e){e=!1;try{var n={},r={get:function(){return e=!0,!1}};Object.defineProperty(n,"passive",r),Object.defineProperty(n,"capture",r),r=function(){},t.addEventListener("test",r,n),t.removeEventListener("test",r,n)}catch(t){e=!1}Vt=e}return e||!1}(t)?e:e.capture||!1}(t,r),this.target.addEventListener(e,n,this.a)}Ot.registerScheme=Mt,Ot.unregisterScheme=function(t){delete Dt[t]},Ot.prototype.Tf=function(t){this.a.add(t)},Ot.prototype.registerRequestFilter=Ot.prototype.Tf,Ot.prototype.vg=function(t){this.a.delete(t)},Ot.prototype.unregisterRequestFilter=Ot.prototype.vg,Ot.prototype.Ie=function(){this.a.clear()},Ot.prototype.clearAllRequestFilters=Ot.prototype.Ie,Ot.prototype.Uf=function(t){this.b.add(t)},Ot.prototype.registerResponseFilter=Ot.prototype.Uf,Ot.prototype.wg=function(t){this.b.delete(t)},Ot.prototype.unregisterResponseFilter=Ot.prototype.wg,Ot.prototype.Je=function(){this.b.clear()},Ot.prototype.clearAllResponseFilters=Ot.prototype.Je,Ot.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0}},Ot.makeRequest=Nt,Ot.prototype.destroy=function(){return this.f=!0,this.a.clear(),this.b.clear(),this.g.destroy()},Ot.prototype.destroy=Ot.prototype.destroy,Ot.prototype.request=function(t,e){var n=this,r=new Ut;if(this.f){var i=Promise.reject(new gt(2,7,7001));return i.catch((function(){})),new Ft(i,(function(){return Promise.resolve()}),r)}e.method=e.method||"GET",e.headers=e.headers||{},e.retryParameters=e.retryParameters?Ct(e.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},e.uris=Ct(e.uris);var a=(i=function(t,e,n){for(var r=At(void 0),i={},a=(t=f(t.a)).next();!a.done;i={qd:i.qd},a=t.next())i.qd=a.value,r=r.U(function(t){return function(){return t.qd(e,n)}}(i));return r.U(void 0,(function(t){if(t&&7001==t.code)throw t;throw new gt(2,1,1006,t)}))}(this,t,e)).U((function(){return function t(e,n,r,i,a,o,s){var u=new Q(r.uris[a]),l=u.ta,c=!1;l||(l=(l=location.protocol).slice(0,-1),Z(u,l),r.uris[a]=u.toString()),l=l.toLowerCase();var d,f=(l=Dt[l])?l.Rf:null;return f?_t(pt(i)).U((function(){return e.f?bt():(d=Date.now(),f(r.uris[a],r,n,(function(t,r,i){e.c&&1==n&&(e.c(t,r),c=!0,s.a=i)})))})).U((function(t){return null==t.timeMs&&(t.timeMs=Date.now()-d),{response:t,qf:c}}),(function(u){if(u&&7001==u.code)throw u;if(e.f)return bt();if(u&&1==u.severity)return e.dispatchEvent(new wt("retry",{error:u instanceof gt?u:null})),a=(a+1)%r.uris.length,t(e,n,r,i,a,u,s);throw u||o})):mt(new gt(2,1,1e3,u))}(n,t,e,new ht(e.retryParameters,!1),0,null,r)})),o=a.U((function(e){return function(t,e,n){for(var r=At(void 0),i=(t=f(t.b)).next();!i.done;i=t.next())r=r.U(i.value.bind(null,e,n.response));return r.U((function(){return n}),(function(t){if(t&&7001==t.code)throw t;var e=2;throw t instanceof gt&&(e=t.severity),new gt(e,1,1007,t)}))}(n,t,e)})),s=Date.now(),u=0;i.promise.then((function(){u=Date.now()-s}),(function(){}));var l=0;return a.promise.then((function(){l=Date.now()}),(function(){})),i=new Ft((i=o.U((function(e){var r=Date.now()-l,i=e.response;return i.timeMs+=u,i.timeMs+=r,e.qf||!n.c||i.fromCache||1!=t||n.c(i.timeMs,i.data.byteLength),i}),(function(t){throw t&&(t.severity=2),t}))).promise,i.Zd,r),Pt(this.g,i),i},Ot.prototype.request=Ot.prototype.request,Ot.NumBytesRemainingClass=Ut,A(Ft,vt),Ot.PendingRequest=Ft,Ft.all=Et,Ft.notAbortable=_t,Ft.completed=At,Ft.aborted=bt,Ft.failed=mt,V("shaka.util.IReleasable",Bt),Bt.prototype.release=function(){},V("shaka.util.EventManager",jt),jt.prototype.release=function(){this.$a(),this.a=null},jt.prototype.release=jt.prototype.release,jt.prototype.w=function(t,e,n,r){this.a&&(t=new Kt(t,e,n,r),this.a.push(e,t))},jt.prototype.listen=jt.prototype.w,jt.prototype.da=function(t,e,n,r){var i=this;this.w(t,e,(function r(a){i.ea(t,e,r),n(a)}),r)},jt.prototype.listenOnce=jt.prototype.da,jt.prototype.ea=function(t,e,n){if(this.a)for(var r=this.a.get(e)||[],i=(r=f(r)).next();!i.done;i=r.next())(i=i.value).target!=t||n!=i.listener&&n||(i.ea(),this.a.remove(e,i))},jt.prototype.unlisten=jt.prototype.ea,jt.prototype.$a=function(){if(this.a){for(var t=this.a.getAll(),e=(t=f(t)).next();!e.done;e=t.next())e.value.ea();this.a.a={}}},jt.prototype.removeAll=jt.prototype.$a,Kt.prototype.ea=function(){this.target.removeEventListener(this.type,this.listener,this.a),this.listener=this.target=null,this.a=!1},Kt.prototype.unlisten=Kt.prototype.ea;var Vt=void 0;function Gt(t){if(t=new Uint8Array(t),new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(0,!0)+4!=t.byteLength)throw new RangeError("Malformed FairPlay init data");return new Q(t=se(t.subarray(4),!0)).sa}function Ht(t,e,n){function r(t){new DataView(a.buffer).setUint32(o,t.byteLength,!0),o+=4,i(t)}function i(t){a.set(t,o),o+=t.byteLength}if(!n||!n.byteLength)throw new gt(2,6,6015);e="string"==typeof e?new Uint8Array(ce(e,!0)):new Uint8Array(e);var a=new Uint8Array(8+t.byteLength+e.byteLength+n.byteLength),o=0;return i(new Uint8Array(t)),r(e),r(new Uint8Array(n)),a}function Yt(t,e){for(var n=[],r=f(t),i=r.next();!i.done;i=r.next())n.push(e(i.value));return n}function zt(t,e){for(var n=f(t),r=n.next();!r.done;r=n.next())if(!e(r.value))return!1;return!0}function $t(t){var e=new Map;return Object.keys(t).forEach((function(n){e.set(n,t[n])})),e}function Wt(t){var e={};return t.forEach((function(t,n){e[n]=t})),e}function qt(t,e){var n=t;return e&&(n+='; codecs="'+e+'"'),n}function Xt(t){var e=(t=t.split("."))[0];return t.pop(),[e,t.join(".")]}V("shaka.util.FairPlayUtils.defaultGetContentId",Gt),V("shaka.util.FairPlayUtils.initDataTransform",Ht);var Jt=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Qt(){return!(!t.MediaSource||!MediaSource.isTypeSupported)}function Zt(t){return""!=re().canPlayType(t)}function te(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!ne("Tizen")}function ee(){if(!te())return null;var t=navigator.userAgent.match(/Version\/(\d+)/);return t||(t=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(t[1],10):null}function ne(t){return(navigator.userAgent||"").includes(t)}function re(){return ae||(ie||(ie=new ft((function(){ae=null}))),(ae=document.querySelector("video")||document.querySelector("audio"))||(ae=document.createElement("video")),ie.R(1),ae)}var ie=null,ae=null;function oe(t){if(!t)return"";239==(t=new Uint8Array(t))[0]&&187==t[1]&&191==t[2]&&(t=t.subarray(3)),t=de(t),t=escape(t);try{return decodeURIComponent(t)}catch(t){throw new gt(2,2,2004)}}function se(t,e,n){if(!t)return"";if(!n&&0!=t.byteLength%2)throw new gt(2,2,2004);if(t instanceof ArrayBuffer)var r=t;else(n=new Uint8Array(t.byteLength)).set(new Uint8Array(t)),r=n.buffer;t=Math.floor(t.byteLength/2),n=new Uint16Array(t),r=new DataView(r);for(var i=0;i<t;i++)n[i]=r.getUint16(2*i,e);return de(n)}function ue(t){var e=new Uint8Array(t);if(239==e[0]&&187==e[1]&&191==e[2])return oe(e);if(254==e[0]&&255==e[1])return se(e.subarray(2),!1);if(255==e[0]&&254==e[1])return se(e.subarray(2),!0);var n=function(t,e){return t.byteLength<=e||32<=t[e]&&126>=t[e]}.bind(null,e);if(0==e[0]&&0==e[2])return se(t,!1);if(0==e[1]&&0==e[3])return se(t,!0);if(n(0)&&n(1)&&n(2)&&n(3))return oe(t);throw new gt(2,2,2003)}function le(t){t=encodeURIComponent(t),t=unescape(t);for(var e=new Uint8Array(t.length),n=0;n<t.length;++n)e[n]=t.charCodeAt(n);return e.buffer}function ce(t,e){for(var n=new Uint8Array(2*t.length),r=new DataView(n.buffer),i=0;i<t.length;++i)r.setUint16(2*i,t.charCodeAt(i),e);return n.buffer}function de(t){if(!fe)for(var e=function(t){try{var e=new Uint8Array(t);return 0<String.fromCharCode.apply(null,e).length}catch(t){return!1}},n={size:65536};0<n.size;(n={size:n.size}).size/=2)if(e(n.size)){fe=function(t){return function(e){for(var n="",r=0;r<e.length;r+=t.size)n+=String.fromCharCode.apply(null,e.subarray(r,r+t.size));return n}}(n);break}return fe(t)}V("shaka.util.StringUtils.fromUTF8",oe),V("shaka.util.StringUtils.fromUTF16",se),V("shaka.util.StringUtils.fromBytesAutoDetect",ue),V("shaka.util.StringUtils.toUTF8",le),V("shaka.util.StringUtils.toUTF16",ce);var fe=null;V("shaka.util.StringUtils.resetFromCharCode",(function(){fe=null}));var he={zc:function(e,n){var r=de(e);return n=null==n||n,r=t.btoa(r).replace(/\+/g,"-").replace(/\//g,"_"),n?r:r.replace(/=*$/,"")}};function pe(t){var e=this;this.B=t,this.u=new Set,this.h=this.l=null,this.S=!1,this.K=0,this.a=null,this.i=new jt,this.b=new Map,this.s=[],this.m=new yt,this.f=null,this.g=function(n){e.m.reject(n),t.onError(n)},this.pa=new Map,this.W=new Map,this.O=new ft((function(){return function(t){var e=t.pa,n=t.W;n.clear(),e.forEach((function(t,e){return n.set(e,t)})),(e=Array.from(n.values())).length&&e.every((function(t){return"expired"==t}))&&t.g(new gt(2,6,6014)),t.B.qc(Wt(n))}(e)})),this.c=!1,this.na=new yt,this.D=!1,this.F=[],this.oa=!1,this.$=new ft((function(){!function(t){t.b.forEach((function(e,n){var r=e.hd,i=n.expiration;isNaN(i)&&(i=1/0),i!=r&&(t.B.onExpirationUpdated(n.sessionId,i),e.hd=i)}))}(e)})).Na(1),this.m.catch((function(){}))}function ge(t,e,n){return t.s=n,t.D=0<n.length,ye(t,e)}function ye(e,n){var r=function(e){if(0==(e=$t(e.f.clearKeys)).size)return null;var n=[],r=[];e.forEach((function(t,e){var i=he.Qc(e),a=he.Qc(t);i={kty:"oct",kid:he.zc(i,!1),k:he.zc(a,!1)},n.push(i),r.push(i.kid)})),e=JSON.stringify({keys:n});var i=JSON.stringify({kids:r});return i=[{initData:new Uint8Array(le(i)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+t.btoa(e),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:i,keyIds:[]}}(e);if(r)for(var i=f(n),a=i.next();!a.done;a=i.next())a.value.drmInfos=[r];for((r=n.some((function(t){return 0<t.drmInfos.length})))||function(t,e){var n=[];e.forEach((function(t,e){n.push({keySystem:e,licenseServerUri:t,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})}));for(var r=f(t),i=r.next();!i.done;i=r.next())i.value.drmInfos=n}(n,a=$t(e.f.servers)),a=(i=f(n)).next();!a.done;a=i.next())for(var o=(a=f(a.value.drmInfos)).next();!o.done;o=a.next())Oe(o.value,$t(e.f.servers),$t(e.f.advanced||{}));return(a=function(t,e){for(var n=new Set,r=f(e),i=r.next();!i.done;i=r.next()){var a=f(i.value.drmInfos);for(i=a.next();!i.done;i=a.next())n.add(i.value)}for(r=f(n),i=r.next();!i.done;i=r.next())Oe(i.value,$t(t.f.servers),$t(t.f.advanced||{}));a=t.D?"required":"optional";var o=t.D?["persistent-license"]:["temporary"];for(r=new Map,n=f(n),i=n.next();!i.done;i=n.next())i=i.value,r.set(i.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:a,sessionTypes:o,label:i.keySystem,drmInfos:[]});for(n=f(e),i=n.next();!i.done;i=n.next()){i=i.value,a=i.audio,o=i.video;var s=a?qt(a.mimeType,a.codecs):"",u=o?qt(o.mimeType,o.codecs):"",l=f(i.drmInfos);for(i=l.next();!i.done;i=l.next()){i=i.value;var c=r.get(i.keySystem);c.drmInfos.push(i),i.distinctiveIdentifierRequired&&(c.distinctiveIdentifier="required"),i.persistentStateRequired&&(c.persistentState="required"),a&&c.audioCapabilities.push({robustness:i.audioRobustness||"",contentType:s}),o&&c.videoCapabilities.push({robustness:i.videoRobustness||"",contentType:u})}}return r}(e,n)).size?(a=Te(e,a),r?a:a.catch((function(){}))):(e.S=!0,Promise.resolve())}function ve(t){return p((function e(){var n;return N(e,(function(e){switch(e.j){case 1:if(!(t.l&&t.a&&t.a.serverCertificate&&t.a.serverCertificate.length)){e.A(0);break}return k(e,3),w(e,t.l.setServerCertificate(t.a.serverCertificate),5);case 5:L(e,0);break;case 3:return n=x(e),e.return(Promise.reject(new gt(2,6,6004,n.message)))}}))}))}function me(t){var e=t.a?t.a.initData:[];return e.forEach((function(e){return Se(t,e.initDataType,e.initData)})),t.s.forEach((function(e){return we(t,e)})),e.length||t.s.length||t.m.resolve(),t.m}function be(t,e,n){for(var r=t.b.values(),i=(r=f(r)).next();!i.done;i=r.next())if(he.za(n,i.value.initData)&&!ne("Tizen 2"))return;Se(t,e,n)}function Ae(t){return t?t.keySystem:""}function _e(t,e){return!!ne("Edge/")||t.u.has(e)}function Ee(t){return t=Yt(t=t.b.keys(),(function(t){return t.sessionId})),Array.from(t)}function Te(t,e){if(1==e.size&&e.has(""))return Promise.reject(new gt(2,6,6e3));for(var n=f(e.values()),r=n.next();!r.done;r=n.next())0==(r=r.value).audioCapabilities.length&&delete r.audioCapabilities,0==r.videoCapabilities.length&&delete r.videoCapabilities;var i=n=new yt;return[!0,!1].forEach(function(t){var n=this;e.forEach((function(e,r){e.drmInfos.some((function(t){return!!t.licenseServerUri}))==t&&(i=i.catch(function(){if(!this.c)return navigator.requestMediaKeySystemAccess(r,[e])}.bind(n)))}))}.bind(t)),i=(i=i.catch((function(){return Promise.reject(new gt(2,6,6001))}))).then(function(t){if(this.c)return Promise.reject();this.u.clear();var n=t.getConfiguration(),r=n.videoCapabilities||[],i=f(n.audioCapabilities||[]);for(n=i.next();!n.done;n=i.next())this.u.add(n.value.contentType);for(n=(r=f(r)).next();!n.done;n=r.next())this.u.add(n.value.contentType);r=t.keySystem,i=[];var a=[],o=[],s=[];return function(t,e,n,r,i){t.forEach((function(t){if(e.includes(t.licenseServerUri)||e.push(t.licenseServerUri),t.serverCertificate&&(n.some((function(e){return he.za(e,t.serverCertificate)}))||n.push(t.serverCertificate)),t.initData&&t.initData.forEach((function(t){r.some((function(e){return!(!e.keyId||e.keyId!=t.keyId)||e.initDataType==t.initDataType&&he.za(e.initData,t.initData)}))||r.push(t)})),t.keyIds)for(var a=0;a<t.keyIds.length;++a)i.includes(t.keyIds[a])||i.push(t.keyIds[a])}))}((n=e.get(t.keySystem)).drmInfos,i,a,o,s),this.a={keySystem:r,licenseServerUri:i[0],distinctiveIdentifierRequired:"required"==n.distinctiveIdentifier,persistentStateRequired:"required"==n.persistentState,audioRobustness:(n.audioCapabilities?n.audioCapabilities[0].robustness:"")||"",videoRobustness:(n.videoCapabilities?n.videoCapabilities[0].robustness:"")||"",serverCertificate:a[0],initData:o,keyIds:s},this.a.licenseServerUri?t.createMediaKeys():Promise.reject(new gt(2,6,6012,this.a.keySystem))}.bind(t)).then(function(t){if(this.c)return Promise.reject();this.l=t,this.S=!0}.bind(t)).catch(function(t){if(!this.c)return this.a=null,this.u.clear(),t instanceof gt?Promise.reject(t):Promise.reject(new gt(2,6,6002,t.message))}.bind(t)),n.reject(),i}function we(t,e){try{var n=t.l.createSession("persistent-license")}catch(e){var r=new gt(2,6,6005,e.message);return t.g(r),Promise.reject(r)}t.i.w(n,"message",t.fe.bind(t)),t.i.w(n,"keystatuseschange",t.de.bind(t));var i={initData:null,loaded:!1,hd:1/0,ya:null};return t.b.set(n,i),n.load(e).then(function(t){return this.c?Promise.reject():t?(i.loaded=!0,Pe(this)&&this.m.resolve(),n):(this.b.delete(n),void this.g(new gt(2,6,6013)))}.bind(t),function(t){this.c||(this.b.delete(n),this.g(new gt(2,6,6005,t.message)))}.bind(t))}function Se(t,e,n){try{var r=t.D?t.l.createSession("persistent-license"):t.l.createSession()}catch(e){return void t.g(new gt(2,6,6005,e.message))}t.i.w(r,"message",t.fe.bind(t)),t.i.w(r,"keystatuseschange",t.de.bind(t)),t.b.set(r,{initData:n,loaded:!1,hd:1/0,ya:null});try{n=t.f.initDataTransform(n,t.a)}catch(n){return e=n,n instanceof gt||(e=new gt(2,6,6016,n)),void t.g(e)}r.generateRequest(e,n.buffer).catch((function(e){if(!t.c){if(t.b.delete(r),e.errorCode&&e.errorCode.systemCode){var n=e.errorCode.systemCode;0>n&&(n+=Math.pow(2,32)),n="0x"+n.toString(16)}t.g(new gt(2,6,6006,e.message,e,n))}}))}function ke(t,e){if(Ae(e).startsWith("com.apple.fps")){var n=e.serverCertificate;t=Ht(t,Gt(t),n)}return t}function Ce(t,e){var n=e.target,r=t.b.get(n),i=t.a.licenseServerUri,a=t.f.advanced[t.a.keySystem];"individualization-request"==e.messageType&&a&&a.individualizationServer&&(i=a.individualizationServer),(i=Nt([i],t.f.retryParameters)).body=e.message,i.method="POST",i.licenseRequestType=e.messageType,i.sessionId=n.sessionId,"com.microsoft.playready"!=t.a.keySystem&&"com.chromecast.playready"!=t.a.keySystem||function(t){var e=se(t.body,!0,!0);if(e.includes("PlayReadyKeyMessage")){for(var n=(e=(new DOMParser).parseFromString(e,"application/xml")).getElementsByTagName("HttpHeader"),r=0;r<n.length;++r)t.headers[n[r].querySelector("name").textContent]=n[r].querySelector("value").textContent;t.body=he.Ba(e.querySelector("Challenge").textContent).buffer}else t.headers["Content-Type"]="text/xml; charset=utf-8"}(i),t.a.keySystem.startsWith("com.apple.fps")&&t.f.fairPlayTransform&&function(t){var e=new Uint8Array(t.body);e="spc="+he.zc(e),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=le(e)}(i);var o=Date.now();t.B.ub.request(2,i).promise.then(function(t){return this.c?Promise.reject():(this.a.keySystem.startsWith("com.apple.fps")&&this.f.fairPlayTransform&&function(t){try{var e=oe(t.data)}catch(t){return}"<ckc>"===(e=e.trim()).substr(0,5)&&"</ckc>"===e.substr(-6)&&(e=e.slice(5,-6));try{e=JSON.parse(e).ckc}catch(t){}t.data=he.Ba(e).buffer}(t),this.K+=(Date.now()-o)/1e3,n.update(t.data).then(function(){var t=this;this.B.onEvent(new wt("drmsessionupdate")),r&&(r.ya&&r.ya.resolve(),new ft((function(){r.loaded=!0,Pe(t)&&t.m.resolve()})).R(De))}.bind(this)))}.bind(t),function(t){this.c||(t=new gt(2,6,6007,t),this.g(t),r&&r.ya&&r.ya.reject(t))}.bind(t)).catch(function(t){this.c||(t=new gt(2,6,6008,t.message),this.g(t),r&&r.ya&&r.ya.reject(t))}.bind(t))}function Le(){var t=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],e=[{videoCapabilities:t,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:t}],n=new Map;return t="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").map((function(t){return function(t){return p((function r(){var i,a,o;return N(r,(function(r){switch(r.j){case 1:return k(r,2),w(r,navigator.requestMediaKeySystemAccess(t,e),4);case 4:return i=r.o,o=!!(a=i.getConfiguration().sessionTypes)&&a.includes("persistent-license"),ne("Tizen 3")&&(o=!1),n.set(t,{persistentState:o}),w(r,i.createMediaKeys(),5);case 5:L(r,0);break;case 2:x(r),n.set(t,null),S(r)}}))}))}(t)})),Promise.all(t).then((function(){return Wt(n)}))}function xe(t,e){var n=e.audio,r=e.video;if(n&&n.encrypted&&!_e(t,qt(n.mimeType,n.codecs))||r&&r.encrypted&&!_e(t,qt(r.mimeType,r.codecs)))return!1;var i=Ae(t.a);return 0==e.drmInfos.length||e.drmInfos.some((function(t){return t.keySystem==i}))}function Re(t,e){if(!t.length)return e;if(!e.length)return t;for(var n=[],r=0;r<t.length;r++)for(var i=0;i<e.length;i++)if(t[r].keySystem==e[i].keySystem){var a=t[r];i=e[i];var o=[];o=(o=o.concat(a.initData||[])).concat(i.initData||[]);var s=[];s=(s=s.concat(a.keyIds)).concat(i.keyIds),n.push({keySystem:a.keySystem,licenseServerUri:a.licenseServerUri||i.licenseServerUri,distinctiveIdentifierRequired:a.distinctiveIdentifierRequired||i.distinctiveIdentifierRequired,persistentStateRequired:a.persistentStateRequired||i.persistentStateRequired,videoRobustness:a.videoRobustness||i.videoRobustness,audioRobustness:a.audioRobustness||i.audioRobustness,serverCertificate:a.serverCertificate||i.serverCertificate,initData:o,keyIds:s});break}return n}function Ie(t){return p((function e(){var n;return N(e,(function(e){switch(e.j){case 1:return n=Array.from(t.b.keys()),t.b.clear(),w(e,Promise.all(n.map((function(t){return p((function e(){return N(e,(function(e){switch(e.j){case 1:return k(e,2),w(e,Promise.all([t.close(),t.closed]),4);case 4:L(e,0);break;case 2:x(e),S(e)}}))}))}))),0)}}))}))}function Pe(t){return zt(t=t.b.values(),(function(t){return t.loaded}))}function Oe(e,n,r){!e.keySystem||"org.w3.clearkey"==e.keySystem&&e.licenseServerUri||(n.size&&(n=n.get(e.keySystem)||"",e.licenseServerUri=n),e.keyIds||(e.keyIds=[]),(r=r.get(e.keySystem))&&(e.distinctiveIdentifierRequired||(e.distinctiveIdentifierRequired=r.distinctiveIdentifierRequired),e.persistentStateRequired||(e.persistentStateRequired=r.persistentStateRequired),e.videoRobustness||(e.videoRobustness=r.videoRobustness),e.audioRobustness||(e.audioRobustness=r.audioRobustness),e.serverCertificate||(e.serverCertificate=r.serverCertificate)),t.cast&&t.cast.__platform__&&"com.microsoft.playready"==e.keySystem&&(e.keySystem="com.chromecast.playready"))}V("shaka.util.Uint8ArrayUtils.toBase64",he.zc),he.Ba=function(e){e=t.atob(e.replace(/-/g,"+").replace(/_/g,"/"));for(var n=new Uint8Array(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n},V("shaka.util.Uint8ArrayUtils.fromBase64",he.Ba),he.Qc=function(e){for(var n=new Uint8Array(e.length/2),r=0;r<e.length;r+=2)n[r/2]=t.parseInt(e.substr(r,2),16);return n},V("shaka.util.Uint8ArrayUtils.fromHex",he.Qc),he.Ac=function(t){for(var e="",n=0;n<t.length;++n){var r=t[n].toString(16);1==r.length&&(r="0"+r),e+=r}return e},V("shaka.util.Uint8ArrayUtils.toHex",he.Ac),he.za=function(t,e){if(!t&&!e)return!0;if(!t||!e||t.length!=e.length)return!1;for(var n=0;n<t.length;++n)if(t[n]!=e[n])return!1;return!0},V("shaka.util.Uint8ArrayUtils.equal",he.za),he.concat=function(t){for(var e=[],n=0;n<arguments.length;++n)e[n]=arguments[n];for(var r=n=0;r<e.length;++r)n+=e[r].length;n=new Uint8Array(n);for(var i=r=0;i<e.length;++i)n.set(e[i],r),r+=e[i].length;return n},V("shaka.util.Uint8ArrayUtils.concat",he.concat),(r=pe.prototype).destroy=function(){var t=this;return p((function e(){return N(e,(function(e){switch(e.j){case 1:return t.c?w(e,t.na,0):(t.c=!0,w(e,function(t){return p((function e(){return N(e,(function(e){switch(e.j){case 1:return t.i.release(),t.i=null,t.m.reject(),t.$.stop(),t.$=null,t.O.stop(),t.O=null,w(e,Ie(t),2);case 2:if(!t.h){e.A(3);break}return k(e,4),w(e,t.h.setMediaKeys(null),6);case 6:L(e,5);break;case 4:x(e);case 5:t.h=null;case 3:t.a=null,t.u.clear(),t.l=null,t.s=[],t.f=null,t.g=null,t.B=null,S(e)}}))}))}(t),4));case 4:t.na.resolve(),e.A(0)}}))}))},r.configure=function(t){this.f=t},r.Hb=function(t){var e=this;if(!this.l)return this.i.da(t,"encrypted",(function(){e.g(new gt(2,6,6010))})),Promise.resolve();this.h=t,this.i.da(this.h,"play",(function(){for(var t=0;t<e.F.length;t++)Ce(e,e.F[t]);e.oa=!0,e.F=[]})),"webkitCurrentPlaybackTargetIsWireless"in this.h&&this.i.w(this.h,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return Ie(e)})),t=(t=this.h.setMediaKeys(this.l)).catch((function(t){return Promise.reject(new gt(2,6,6003,t.message))}));var n=ve(this);return Promise.all([t,n]).then((function(){if(e.c)return Promise.reject();me(e),e.a.initData.length||e.s.length||e.i.w(e.h,"encrypted",(function(t){return be(e,t.initDataType,new Uint8Array(t.initData))}))})).catch((function(t){if(!e.c)return Promise.reject(t)}))},r.Lb=function(){for(var t=1/0,e=this.b.keys(),n=(e=f(e)).next();!n.done;n=e.next())n=n.value,isNaN(n.expiration)||(t=Math.min(t,n.expiration));return t},r.fe=function(t){this.h&&this.f.delayLicenseRequestUntilPlayed&&this.h.paused&&!this.oa?this.F.push(t):Ce(this,t)},r.de=function(t){t=t.target;var e=this.b.get(t),n=!1;t.keyStatuses.forEach(function(t,r){if("string"==typeof r){var i=r;r=t,t=i}if("com.microsoft.playready"==this.a.keySystem&&16==r.byteLength&&!ne("Tizen")&&!ne("VITIS")){var a=(i=new DataView(r)).getUint32(0,!0),o=i.getUint16(4,!0),s=i.getUint16(6,!0);i.setUint32(0,a,!1),i.setUint16(4,o,!1),i.setUint16(6,s,!1)}"com.microsoft.playready"==this.a.keySystem&&"status-pending"==t&&(t="usable"),"status-pending"!=t&&(e.loaded=!0),"expired"==t&&(n=!0),i=he.Ac(new Uint8Array(r)),this.pa.set(i,t)}.bind(this));var r=t.expiration-Date.now();(0>r||n&&1e3>r)&&e&&!e.ya&&(this.b.delete(t),t.close().catch((function(){}))),Pe(this)&&(this.m.resolve(),this.O.R(Me))};var De=5,Me=.5;function Ne(){this.a=new muxjs.mp4.CaptionParser,this.g=[],this.f={}}function Ue(){}function Fe(t){return!t||1==t.length&&1e-6>t.end(0)-t.start(0)?null:t.length?t.end(t.length-1):null}function Be(t,e,n){return n=void 0===n?0:n,!(!t||!t.length||1==t.length&&1e-6>t.end(0)-t.start(0)||e>t.end(t.length-1))&&e+n>=t.start(0)}function je(t,e){if(!t||!t.length||1==t.length&&1e-6>t.end(0)-t.start(0))return 0;for(var n=0,r=t.length-1;0<=r&&t.end(r)>e;--r)n+=t.end(r)-Math.max(t.start(r),e);return n}function Ke(t){if(!t)return[];for(var e=[],n=0;n<t.length;n++)e.push({start:t.start(n),end:t.end(n)});return e}Ne.prototype.init=function(t){var e=muxjs.mp4.probe;t=new Uint8Array(t),this.g=e.videoTrackIds(t),this.f=e.timescale(t),this.a.init()},Ne.prototype.b=function(t,e){var n=new Uint8Array(t);(n=this.a.parse(n,this.g,this.f))&&n.captions&&e(n.captions),this.a.clearParsedCaptions()},Ne.prototype.c=function(){this.a.resetCaptionStream()},Ue.prototype.init=function(){},Ue.prototype.b=function(){},Ue.prototype.c=function(){};var Ve={Ke:function(t,e){return t.reduce(function(t,e,n){return e.catch(t.bind(null,n))}.bind(null,e),Promise.reject())},Gc:function(t,e){return t.concat(e)},oc:function(){},Ia:function(t){return null!=t}};function Ge(t,e){if(0==e.length)return t;var n=e.map((function(t){return new Q(t)}));return t.map((function(t){return new Q(t)})).map((function(t){return n.map(t.resolve.bind(t))})).reduce(Ve.Gc,[]).map((function(t){return t.toString()}))}function He(t,e){return{keySystem:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:e||[],keyIds:[]}}var Ye={Pa:"video",Eb:"audio",ra:"text",Cg:"image",Ag:"application"};function ze(){this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.b=null,this.g=[],this.c=[],this.f=!1,this.a.on("data",this.i.bind(this)),this.a.on("done",this.h.bind(this))}function $e(e,n){return!(!t.muxjs||"mp2t"!=e.toLowerCase().split(";")[0].split("/")[1])&&(n?MediaSource.isTypeSupported(We(n,e)):MediaSource.isTypeSupported(We("audio",e))||MediaSource.isTypeSupported(We("video",e)))}function We(t,e){var n=e.replace(/mp2t/i,"mp4");"audio"==t&&(n=n.replace("video","audio"));var r=/avc1\.(66|77|100)\.(\d+)/.exec(n);if(r){var i="avc1.",a=r[1],o=Number(r[2]);i=("66"==a?i+"4200":"77"==a?i+"4d00":i+"6400")+(o>>4).toString(16),i+=(15&o).toString(16),n=n.replace(r[0],i)}return n}function qe(t,e,n){this.startTime=t,this.direction=en,this.endTime=e,this.payload=n,this.region=new cn,this.position=null,this.positionAlign=Xe,this.size=100,this.textAlign=Je,this.writingMode=nn,this.lineInterpretation=rn,this.line=null,this.lineHeight="",this.lineAlign=an,this.displayAlign=Ze,this.fontSize=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=sn,this.fontStyle=un,this.fontFamily="",this.textDecoration=[],this.wrapLine=!0,this.id="",this.nestedCues=[],this.spacer=!1}ze.prototype.destroy=function(){return this.a.dispose(),this.a=null,Promise.resolve()},ze.prototype.i=function(t){this.c=t.captions;var e=new Uint8Array(t.data.byteLength+t.initSegment.byteLength);e.set(t.initSegment,0),e.set(t.data,t.initSegment.byteLength),this.g.push(e)},ze.prototype.h=function(){var t={data:he.concat.apply(null,this.g),captions:this.c};this.b.resolve(t),this.f=!1},V("shaka.text.Cue",qe);var Xe="auto";qe.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Xe};var Je="center",Qe={LEFT:"left",RIGHT:"right",CENTER:Je,START:"start",END:"end"};qe.textAlign=Qe;var Ze="after",tn={BEFORE:"before",CENTER:"center",AFTER:Ze};qe.displayAlign=tn;var en="ltr";qe.direction={HORIZONTAL_LEFT_TO_RIGHT:en,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var nn="horizontal-tb";qe.writingMode={HORIZONTAL_TOP_TO_BOTTOM:nn,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var rn=0;qe.lineInterpretation={LINE_NUMBER:rn,PERCENTAGE:1};var an="start",on={CENTER:"center",START:an,END:"end"};qe.lineAlign=on;var sn=400;qe.fontWeight={NORMAL:sn,BOLD:700};var un="normal",ln={NORMAL:un,ITALIC:"italic",OBLIQUE:"oblique"};function cn(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=dn,this.scroll=fn}qe.fontStyle=ln,qe.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},V("shaka.text.CueRegion",cn);var dn=1;cn.units={PX:0,PERCENTAGE:dn,LINES:2};var fn="";function hn(t){this.g=null,this.c=t,this.f=this.m=0,this.h=1/0,this.b=this.a=null,this.l="",this.i=new Map}cn.scrollMode={NONE:fn,UP:"up"};var pn={};function gn(e){return!!(pn[e]||t.muxjs&&"application/cea-608"==e)}function yn(t,e){"application/cea-608"!=e&&(t.g=new pn[e])}function vn(t,e,n,r,i){for(var a=n+" "+r,o=new Map,s=(e=f(e)).next();!s.done;s=e.next()){var u=s.value;s=u.stream,o.has(s)||o.set(s,new Map),o.get(s).has(a)||o.get(s).set(a,[]),u.startTime+=i,u.endTime+=i,u.startTime>=t.f&&u.startTime<t.h&&(u=new qe(u.startTime,u.endTime,u.text),o.get(s).get(a).push(u),s==t.l&&t.c.append([u]))}for(a=(i=f(o.keys())).next();!a.done;a=i.next())for(a=a.value,t.i.has(a)||t.i.set(a,new Map),s=(e=f(o.get(a).keys())).next();!s.done;s=e.next())s=s.value,u=o.get(a).get(s),t.i.get(a).set(s,u);t.a=null==t.a?Math.max(n,t.f):Math.min(t.a,Math.max(n,t.f)),t.b=Math.max(t.b,Math.min(r,t.h))}function mn(t,e,n){this.f=t,this.g=n,this.b={},this.a=null,this.c={},this.i=new jt,this.u=!1,this.l={},this.m=e,t=this.s=new yt,e=new MediaSource,this.i.da(e,"sourceopen",t.resolve),this.f.src=bn(e),this.h=e}V("shaka.text.TextEngine.registerParser",(function(t,e){pn[t]=e})),V("shaka.text.TextEngine.unregisterParser",(function(t){delete pn[t]})),hn.prototype.destroy=function(){return this.c=this.g=null,this.i.clear(),Promise.resolve()},hn.prototype.kc=function(t){try{return this.g.parseMedia(new Uint8Array(t),{periodStart:0,segmentStart:null,segmentEnd:0})[0].startTime}catch(t){throw new gt(2,2,2009,t)}},hn.prototype.remove=function(t,e){return Promise.resolve().then(function(){!this.c||!this.c.remove(t,e)||null==this.a||e<=this.a||t>=this.b||(t<=this.a&&e>=this.b?this.a=this.b=null:t<=this.a&&e<this.b?this.a=e:t>this.a&&e>=this.b&&(this.b=t))}.bind(this))};var bn=t.URL.createObjectURL;function An(t){var e=qt(t.mimeType,t.codecs),n=function(t){var e=[t.mimeType];return Jt.forEach((function(n,r){var i=t[r];i&&e.push(n+'="'+i+'"')})),e.join(";")}(t);return gn(e)||MediaSource.isTypeSupported(n)||$e(e,t.type)}function _n(t,e){t.a||(t.a=new hn(t.g)),yn(t.a,e)}function En(t){return!t.h||"ended"==t.h.readyState}function Tn(t,e){if("text"==e)var n=t.a.a;else n=!(n=Sn(t,e))||1==n.length&&1e-6>n.end(0)-n.start(0)?null:1==n.length&&0>n.start(0)?0:n.length?n.start(0):null;return n}function wn(t,e){return"text"==e?t.a.b:Fe(Sn(t,e))}function Sn(t,e){try{return t.b[e].buffered}catch(t){return null}}function kn(e,n,r,i,a,o){return"text"==n?function(t,e,n,r){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==n||null==r)this.g.parseInit(new Uint8Array(e));else{var t={periodStart:this.m,segmentStart:n,segmentEnd:r};t=this.g.parseMedia(new Uint8Array(e),t).filter(function(t){return t.startTime>=this.f&&t.startTime<this.h}.bind(this)),this.c.append(t),null==this.a&&(this.a=Math.max(n,this.f)),this.b=Math.min(r,this.h)}}.bind(t))}(e.a,r,i,a):e.l[n]?function(t,e){t.f=!0,t.b=new yt,t.g=[],t.c=[];var n=new Uint8Array(e);return t.a.push(n),t.a.flush(),t.f&&t.b.reject(new gt(2,3,3018)),t.b}(e.l[n],r).then(function(t){return this.a||_n(this,"text/vtt"),t.captions&&t.captions.length&&vn(this.a,t.captions,i,a,this.b.video.timestampOffset),xn(this,n,this.re.bind(this,n,t.data.buffer))}.bind(e)):(o&&t.muxjs&&(e.a||_n(e,"text/vtt"),null==i&&null==a?e.m.init(r):e.m.b(r,(function(t){t.length&&vn(e.a,t,i,a,e.b.video.timestampOffset)}))),xn(e,n,e.re.bind(e,n,r)))}function Cn(t,e){var n=wn(t,"video")||0;!function(t,e,n){if(t.l=e,e=t.i.get(e))for(var r=f(e.keys()),i=r.next();!i.done;i=r.next())(i=e.get(i.value).filter((function(t){return t.endTime<=n})))&&t.c.append(i)}(t.a,e,n)}function Ln(t,e){return"text"==e?t.a?(t.m.c(),t.a.remove(0,1/0)):Promise.resolve():xn(t,e,t.se.bind(t,e,0,t.h.duration))}function xn(t,e,n){if(t.u)return Promise.reject();if(n={start:n,p:new yt},t.c[e].push(n),1==t.c[e].length)try{n.start()}catch(r){"QuotaExceededError"==r.name?n.p.reject(new gt(2,3,3017,e)):n.p.reject(new gt(2,3,3015,r)),In(t,e)}return n.p}function Rn(t,e){if(t.u)return Promise.reject();var n,r=[];for(n in t.b){var i=new yt,a={start:function(t){t.resolve()}.bind(null,i),p:i};t.c[n].push(a),r.push(i),1==t.c[n].length&&a.start()}return Promise.all(r).then(function(){try{e()}catch(e){var t=Promise.reject(new gt(2,3,3015,e))}for(var n in this.b)In(this,n);return t}.bind(t),function(t){throw t}.bind(t))}function In(t,e){t.c[e].shift();var n=t.c[e][0];if(n)try{n.start()}catch(r){n.p.reject(new gt(2,3,3015,r)),In(t,e)}}function Pn(t,e){return t=Dn(t),e=Dn(e),t.split("-")[0]==e.split("-")[0]}function On(t,e){t=Dn(t),e=Dn(e);var n=t.split("-"),r=e.split("-");return n[0]==r[0]&&1==n.length&&2==r.length}function Dn(t){var e=t.split("-");return t=e[0]||"",e=e[1]||"",t=t.toLowerCase(),t=Un.get(t)||t,(e=e.toUpperCase())?t+"-"+e:t}function Mn(t){return t.language?Dn(t.language):t.audio&&t.audio.language?Dn(t.audio.language):t.video&&t.video.language?Dn(t.video.language):"und"}function Nn(t,e){for(var n=Dn(t),r=new Set,i=f(e),a=i.next();!a.done;a=i.next())r.add(Dn(a.value));for(a=(i=f(r)).next();!a.done;a=i.next())if((a=a.value)==n)return a;for(a=(i=f(r)).next();!a.done;a=i.next())if(On(a=a.value,n))return a;for(a=(i=f(r)).next();!a.done;a=i.next()){var o=a=a.value,s=n;if(o=Dn(o),s=Dn(s),o=o.split("-"),s=s.split("-"),2==o.length&&2==s.length&&o[0]==s[0])return a}for(a=(r=f(r)).next();!a.done;a=r.next())if(On(n,i=a.value))return i;return null}(r=mn.prototype).destroy=function(){var t=this;this.u=!0;var e,n=[];for(e in this.c){var r=this.c[e],i=r[0];for(this.c[e]=r.slice(0,1),i&&n.push(i.p.catch(Ve.oc)),i=1;i<r.length;++i)r[i].p.reject()}for(var a in this.a&&n.push(this.a.destroy()),this.g&&n.push(this.g.destroy()),this.l)n.push(this.l[a].destroy());return Promise.all(n).then((function(){t.i&&(t.i.release(),t.i=null),t.f&&(t.f.removeAttribute("src"),t.f.load(),t.f=null),t.h=null,t.a=null,t.g=null,t.b={},t.l={},t.m=null,t.c={}}))},r.init=function(t,e){var n=this;return p((function r(){var i;return N(r,(function(r){switch(r.j){case 1:return i=Ye,w(r,n.s,2);case 2:t.forEach((function(t,r){var a=qt(t.mimeType,t.codecs);r==i.ra?_n(n,a):(!e&&MediaSource.isTypeSupported(a)||!$e(a,r)||(n.l[r]=new ze,a=We(r,a)),a=n.h.addSourceBuffer(a),n.i.w(a,"error",n.lg.bind(n,r)),n.i.w(a,"updateend",n.xb.bind(n,r)),n.b[r]=a,n.c[r]=[])})),S(r)}}))}))},r.Sc=function(t){if(t.total=Ke(this.f.buffered),t.audio=Ke(Sn(this,"audio")),t.video=Ke(Sn(this,"video")),t.text=[],this.a){var e=this.a.a,n=this.a.b;null!=e&&null!=n&&t.text.push({start:e,end:n})}},r.remove=function(t,e,n){return"text"==t?this.a.remove(e,n):xn(this,t,this.se.bind(this,t,e,n))},r.flush=function(t){return"text"==t?Promise.resolve():xn(this,t,this.Pe.bind(this,t))},r.endOfStream=function(t){return Rn(this,function(){En(this)||(t?this.h.endOfStream(t):this.h.endOfStream())}.bind(this))},r.xa=function(t){return Rn(this,function(){this.h.duration=t}.bind(this))},r.Y=function(){return this.h.duration},r.re=function(t,e){this.b[t].appendBuffer(e)},r.se=function(t,e,n){n<=e?this.xb(t):this.b[t].remove(e,n)},r.Be=function(t){var e=this.b[t].appendWindowStart,n=this.b[t].appendWindowEnd;this.b[t].abort(),this.b[t].appendWindowStart=e,this.b[t].appendWindowEnd=n,this.xb(t)},r.Pe=function(t){this.f.currentTime-=.001,this.xb(t)},r.kg=function(t,e){0>e&&(e+=.001),this.b[t].timestampOffset=e,this.xb(t)},r.hg=function(t,e,n){this.b[t].appendWindowStart=0,this.b[t].appendWindowEnd=n,this.b[t].appendWindowStart=e,this.xb(t)},r.lg=function(t){this.c[t][0].p.reject(new gt(2,3,3014,this.f.error?this.f.error.code:0))},r.xb=function(t){var e=this.c[t][0];e&&(e.p.resolve(),In(this,t))};var Un=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]),Fn={bd:function(t,e,n){function r(t,e,n){return t>=e&&t<=n}var i=t.video;return!(i&&i.width&&i.height&&(!r(i.width,e.minWidth,Math.min(e.maxWidth,n.width))||!r(i.height,e.minHeight,Math.min(e.maxHeight,n.height))||!r(i.width*i.height,e.minPixels,e.maxPixels))||t&&t.frameRate&&!r(t.frameRate,e.minFrameRate,e.maxFrameRate)||!r(t.bandwidth,e.minBandwidth,e.maxBandwidth))},Gd:function(t,e,n){var r=!1;return t.forEach((function(t){var i=t.allowedByApplication;t.allowedByApplication=Fn.bd(t,e,n),i!=t.allowedByApplication&&(r=!0)})),r},filterNewPeriod:function(t,e,n,r){r.variants=r.variants.filter((function(r){if(t&&t.S&&!xe(t,r))return!1;var i=r.audio;return r=r.video,!(i&&!An(i)||r&&!An(r)||i&&e&&!Fn.Hd(i,e)||r&&n&&!Fn.Hd(r,n))})),r.textStreams=r.textStreams.filter((function(t){return gn(qt(t.mimeType,t.codecs))}))},Hd:function(t,e){return t.mimeType==e.mimeType&&t.codecs.split(".")[0]==e.codecs.split(".")[0]},Ed:function(t){var e=t.audio,n=t.video,r=e?e.codecs:null,i=n?n.codecs:null,a=[];i&&a.push(i),r&&a.push(r);var o=[];n&&o.push(n.mimeType),e&&o.push(e.mimeType),o=o[0]||null;var s=[];e&&s.push(e.kind),n&&s.push(n.kind),s=s[0]||null;var u=new Set;return e&&e.roles.forEach((function(t){return u.add(t)})),n&&n.roles.forEach((function(t){return u.add(t)})),t={id:t.id,active:!1,type:"variant",bandwidth:t.bandwidth,language:t.language,label:null,kind:s,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:o,codecs:a.join(", "),audioCodec:r,videoCodec:i,primary:t.primary,roles:Array.from(u),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null},n&&(t.videoId=n.id,t.originalVideoId=n.originalId,t.width=n.width||null,t.height=n.height||null,t.frameRate=n.frameRate||null,t.pixelAspectRatio=n.pixelAspectRatio||null,t.videoBandwidth=n.bandwidth||null),e&&(t.audioId=e.id,t.originalAudioId=e.originalId,t.channelsCount=e.channelsCount,t.audioSamplingRate=e.audioSamplingRate,t.audioBandwidth=e.bandwidth||null,t.label=e.label,t.audioRoles=e.roles),t},xc:function(t){return{id:t.id,active:!1,type:"text",bandwidth:0,language:t.language,label:t.label,kind:t.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:t.mimeType,codecs:t.codecs||null,audioCodec:null,videoCodec:null,primary:t.primary,roles:t.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:t.originalId}},Wc:function(t){return t.__shaka_id||(t.__shaka_id=Fn.yf++),t.__shaka_id},yf:0,sf:function(t){var e=Fn.Sd(t);return e.active="disabled"!=t.mode,e.type="text",e.originalTextId=t.id,"captions"==t.kind&&(e.mimeType="application/cea-608"),e},rf:function(t){var e=Fn.Sd(t);return e.active=t.enabled,e.type="variant",e.originalAudioId=t.id,"main"==t.kind?(e.primary=!0,e.roles=["main"],e.audioRoles=["main"]):e.audioRoles=[],e},Sd:function(t){return{id:Fn.Wc(t),active:!1,type:"",bandwidth:0,language:Dn(t.language),label:t.label,kind:t.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}},rb:function(t){return t.allowedByApplication&&t.allowedByKeySystem},df:function(t){return t.filter((function(t){return Fn.rb(t)}))},Nd:function(t,e){for(var n=t.filter((function(t){return t.audio&&t.audio.channelsCount})),r=new Map,i=(n=f(n)).next();!i.done;i=n.next()){var a=(i=i.value).audio.channelsCount;r.has(a)||r.set(a,[]),r.get(a).push(i)}return 0==(n=Array.from(r.keys())).length?t:(i=n.filter((function(t){return t<=e}))).length?r.get(Math.max.apply(null,i)):r.get(Math.min.apply(null,n))},Jb:function(t,e,n){var r=t,i=t.filter((function(t){return t.primary}));i.length&&(r=i);var a=r.length?r[0].language:"";if(r=r.filter((function(t){return t.language==a})),e){var o=Nn(Dn(e),t.map((function(t){return t.language})));o&&(r=t.filter((function(t){return Dn(t.language)==o})))}if(n){if((t=Fn.Md(r,n)).length)return t}else if((t=r.filter((function(t){return 0==t.roles.length}))).length)return t;return(t=r.map((function(t){return t.roles})).reduce(Ve.Gc,[])).length?Fn.Md(r,t[0]):r},Md:function(t,e){return t.filter((function(t){return t.roles.includes(e)}))},Qd:function(t,e,n){for(var r=0;r<n.length;r++)if(n[r].audio==t&&n[r].video==e)return n[r];return null},tf:function(t){return"audio"==t.type},wf:function(t){return"video"==t.type},nf:function(t){var e=[];return t.audio&&e.push(t.audio),t.video&&e.push(t.video),e},Gg:function(t){return Fn.tf(t)?"type=audio codecs="+t.codecs+" bandwidth="+t.bandwidth+" channelsCount="+t.channelsCount+" audioSamplingRate="+t.audioSamplingRate:Fn.wf(t)?"type=video codecs="+t.codecs+" bandwidth="+t.bandwidth+" frameRate="+t.frameRate+" width="+t.width+" height="+t.height:"unexpected stream type"}};function Bn(){this.h=null,this.f=!1,this.b=new $,this.c=[],this.i=!1,this.a=this.g=null}function jn(t,e){return t&&(e=e.filter((function(e){return Fn.bd(e,t,{width:1/0,height:1/0})}))),e.sort((function(t,e){return t.bandwidth-e.bandwidth}))}function Kn(t,e){this.a=t,this.b=e}function Vn(t,e){var n=new Kn(2,6),r=Yn,i=r.a,a=n.b-i.b;(0<(n.a-i.a||a)?r.c:r.b)(r.a,n,t,e)}function Gn(t,e,n,r){q([n,"has been deprecated and will be removed in",e,". We are currently at version",t,". Additional information:",r].join(" "))}function Hn(t,e,n,r){W([n,"has been deprecated and has been removed in",e,". We are now at version",t,". Additional information:",r].join(""))}V("shaka.abr.SimpleAbrManager",Bn),Bn.prototype.stop=function(){this.h=null,this.f=!1,this.c=[],this.g=null},Bn.prototype.stop=Bn.prototype.stop,Bn.prototype.init=function(t){this.h=t},Bn.prototype.init=Bn.prototype.init,Bn.prototype.chooseVariant=function(){var t=jn(this.a.restrictions,this.c),e=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!t.length&&(t=[(t=jn(null,this.c))[0]]);for(var n=t[0]||null,r=0;r<t.length;++r){var i=t[r],a=(t[r+1]||{bandwidth:1/0}).bandwidth/this.a.bandwidthUpgradeTarget;e>=i.bandwidth/this.a.bandwidthDowngradeTarget&&e<=a&&(n=i)}return this.g=Date.now(),n},Bn.prototype.chooseVariant=Bn.prototype.chooseVariant,Bn.prototype.enable=function(){this.f=!0},Bn.prototype.enable=Bn.prototype.enable,Bn.prototype.disable=function(){this.f=!1},Bn.prototype.disable=Bn.prototype.disable,Bn.prototype.segmentDownloaded=function(t,e){var n=this.b;if(!(16e3>e)){var r=8e3*e/t,i=t/1e3;n.a+=e,Y(n.b,i,r),Y(n.c,i,r)}if(null!=this.g&&this.f)t:{if(this.i){if(Date.now()-this.g<1e3*this.a.switchInterval)break t}else{if(!(128e3<=this.b.a))break t;this.i=!0}n=this.chooseVariant(),this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate),this.h(n)}},Bn.prototype.segmentDownloaded=Bn.prototype.segmentDownloaded,Bn.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)},Bn.prototype.getBandwidthEstimate=Bn.prototype.getBandwidthEstimate,Bn.prototype.setVariants=function(t){this.c=t},Bn.prototype.setVariants=Bn.prototype.setVariants,Bn.prototype.configure=function(t){this.a=t},Bn.prototype.configure=Bn.prototype.configure,Kn.prototype.toString=function(){return"v"+this.a+"."+this.b};var Yn=null,zn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),$n="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Wn=["loop","playbackRate"],qn=["pause","play"],Xn="abrstatuschanged adaptation buffering drmsessionupdate emsg error expirationupdated largegap loading manifestparsed onstatechange onstateidle streaming textchanged texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged".split(" "),Jn={getAssetUri:2,getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},Qn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Zn=[["getConfiguration","configure"]],tr=[["isTextTrackVisible","setTextTrackVisibility"]],er="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),nr=["attach","detach","load","unload"];function rr(t){return JSON.stringify(t,(function(t,e){if("function"!=typeof e){if(e instanceof Event||e instanceof wt){var n,r={};for(n in e){var i=e[n];i&&"object"==typeof i?"detail"==n&&(r[n]=i):n in Event||(r[n]=i)}return r}if(e instanceof TimeRanges)for(r={__type__:"TimeRanges",length:e.length,start:[],end:[]},n=0;n<e.length;++n)r.start.push(e.start(n)),r.end.push(e.end(n));else r=e instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(e)}:"number"==typeof e?isNaN(e)?"NaN":isFinite(e)?e:0>e?"-Infinity":"Infinity":e;return r}}))}function ir(t){return JSON.parse(t,(function(t,e){return"NaN"==e?NaN:"-Infinity"==e?-1/0:"Infinity"==e?1/0:e&&"object"==typeof e&&"TimeRanges"==e.__type__?function(t){return{length:t.length,start:function(e){return t.start[e]},end:function(e){return t.end[e]}}}(e):e&&"object"==typeof e&&"Uint8Array"==e.__type__?new Uint8Array(e.entries):e}))}function ar(t,e,n,r,i,a){this.O=t,this.f=new ft(e),this.S=n,this.l=!1,this.F=r,this.K=i,this.B=a,this.b=this.h=!1,this.D="",this.i=null,this.m=this.ce.bind(this),this.s=this.Ff.bind(this),this.a={video:{},player:{}},this.u=0,this.c={},this.g=null,pr.add(this)}var or=!1,sr=null;function ur(t){for(var e=f(pr),n=e.next();!n.done;n=e.next())lr(n.value,t)}function lr(t,e){var n=t.B();t.g=new yt,t.l=!0,t.kd(n,e)}function cr(t){for(var e=f(pr),n=e.next();!n.done;n=e.next())n=n.value,or="available"==t,n.f.yc()}function dr(t){var e=sr;e.removeUpdateListener(t.m),e.removeMessageListener("urn:x-cast:com.google.shaka.v2",t.s)}function fr(t){for(var e in t.c){var n=t.c[e];delete t.c[e],n.reject(new gt(1,7,7e3))}}function hr(t){t=rr(t),sr.sendMessage("urn:x-cast:com.google.shaka.v2",t,(function(){}),X)}(r=ar.prototype).destroy=function(){return pr.delete(this),fr(this),sr&&dr(this),this.f&&(this.f.stop(),this.f=null),this.K=this.F=null,this.b=this.h=!1,this.s=this.m=this.g=this.c=this.a=this.i=null,Promise.resolve()},r.ga=function(){return this.b},r.nd=function(){return this.D},r.init=function(){if(t.chrome&&chrome.cast&&chrome.cast.isAvailable&&this.O.length){this.h=!0,this.f.yc();var e=new chrome.cast.SessionRequest(this.O);e=new chrome.cast.ApiConfig(e,ur.bind(this),cr.bind(this),"origin_scoped"),chrome.cast.initialize(e,(function(){}),(function(){})),or&&this.f.R(.02),(e=sr)&&e.status!=chrome.cast.SessionStatus.STOPPED?lr(this,e):sr=null}},r.ud=function(t){this.i=t,this.b&&hr({type:"appData",appData:this.i})},r.cast=function(t){return this.h?or?this.b?Promise.reject(new gt(1,8,8002)):(this.g=new yt,chrome.cast.requestSession(this.kd.bind(this,t),this.be.bind(this)),this.g):Promise.reject(new gt(1,8,8001)):Promise.reject(new gt(1,8,8e3))},r.Kb=function(){this.b&&(fr(this),sr&&(dr(this),sr.stop((function(){}),(function(){})),sr=null))},r.get=function(t,e){if("video"==t){if(qn.includes(e))return this.le.bind(this,t,e)}else if("player"==t){if(Qn[e]&&!this.get("player","isLive")())return function(){};if(er.includes(e))return this.le.bind(this,t,e);if(nr.includes(e))return this.Wf.bind(this,t,e);if(Jn[e])return this.ie.bind(this,t,e)}return this.ie(t,e)},r.set=function(t,e,n){this.a[t][e]=n,hr({type:"set",targetName:t,property:e,value:n})},r.kd=function(t,e){sr=e,e.addUpdateListener(this.m),e.addMessageListener("urn:x-cast:com.google.shaka.v2",this.s),this.ce(),hr({type:"init",initState:t,appData:this.i}),this.g.resolve()},r.be=function(t){var e=8003;switch(t.code){case"cancel":e=8004;break;case"timeout":e=8005;break;case"receiver_unavailable":e=8006}this.g.reject(new gt(2,8,e,t))},r.ie=function(t,e){return this.a[t][e]},r.le=function(t,e,n){for(var r=[],i=2;i<arguments.length;++i)r[i-2]=arguments[i];hr({type:"call",targetName:t,methodName:e,args:r})},r.Wf=function(t,e,n){for(var r=[],i=2;i<arguments.length;++i)r[i-2]=arguments[i];i=new yt;var a=this.u.toString();return this.u++,this.c[a]=i,hr({type:"asyncCall",targetName:t,methodName:e,args:r,id:a}),i},r.ce=function(){var t=!!sr&&"connected"==sr.status;if(this.b&&!t){for(var e in this.K(),this.a)this.a[e]={};fr(this)}this.D=(this.b=t)?sr.receiver.friendlyName:"",this.f.yc()},r.Ff=function(t,e){var n=ir(e);switch(n.type){case"event":var r=n.event;this.F(n.targetName,new wt(r.type,r));break;case"update":for(var i in r=n.update)for(var a in n=this.a[i]||{},r[i])n[a]=r[i][a];this.l&&(this.S(),this.l=!1);break;case"asyncComplete":if(i=n.id,n=n.error,a=this.c[i],delete this.c[i],a)if(n){for(r in i=new gt(n.severity,n.category,n.code),n)i[r]=n[r];a.reject(i)}else a.resolve()}};var pr=new Set;function gr(t,e,n){var r=this;kt.call(this),this.c=t,this.b=e,this.i=this.g=this.f=this.l=this.h=null,this.s=n,this.m=new Map,this.a=new ar(n,(function(){return mr(r)}),(function(){return br(r)}),(function(t,e){return _r(r,t,e)}),(function(){return Ar(r)}),(function(){return vr(r)})),function(t){for(var e in t.a.init(),t.i=new jt,zn.forEach(function(t){this.i.w(this.c,t,this.D.bind(this))}.bind(t)),Xn.forEach(function(t){this.i.w(this.b,t,this.u.bind(this))}.bind(t)),t.h={},t.c)Object.defineProperty(t.h,e,{configurable:!1,enumerable:!0,get:t.B.bind(t,e),set:t.F.bind(t,e)});t.l={},yr(t,(function(e){Object.defineProperty(t.l,e,{configurable:!1,enumerable:!0,get:function(){return function t(e,n){if(e.m.has(n)&&(n=e.m.get(n)),"addEventListener"==n)return e.g.addEventListener.bind(e.g);if("removeEventListener"==n)return e.g.removeEventListener.bind(e.g);if("getMediaElement"==n)return function(){return this.h}.bind(e);if("getSharedConfiguration"==n)return e.a.get("player","getConfiguration");if("getNetworkingEngine"==n)return e.b.Mb.bind(e.b);if(e.a.ga()){if("getManifest"==n||"drmInfo"==n)return function(){return q(n+"() does not work while casting!"),null};if("getManifestUri"==n)return Vn("getManifestUri",'Please use "getAssetUri" instead.'),t(e,"getAssetUri");if("attach"==n||"detach"==n)return function(){return q(n+"() does not work while casting!"),Promise.resolve()}}return e.a.ga()&&0==Object.keys(e.a.a.video).length&&Jn[n]||!e.a.ga()?e.b[n].bind(e.b):e.a.get("player",n)}(t,e)}})})),function(t){var e=new Map;yr(t,(function(n,r){if(e.has(r)){var i=e.get(r);n.length<i.length?t.m.set(n,i):t.m.set(i,n)}else e.set(r,n)}))}(t),t.f=new kt,t.f.$b=t.h,t.g=new kt,t.g.$b=t.l}(this)}function yr(t,e){function n(t){return"constructor"!=t&&"function"==typeof r[t]&&!i.has(t)}var r=t.b,i=new Set;for(a in r)n(a)&&(i.add(a),e(a,r[a]));for(var a=Object.getPrototypeOf(r),o=Object.getPrototypeOf({});a&&a!=o;){for(var s=f(Object.getOwnPropertyNames(a)),u=s.next();!u.done;u=s.next())n(u=u.value)&&(i.add(u),e(u,r[u]));a=Object.getPrototypeOf(a)}}function vr(t){var e={video:{},player:{},playerAfterLoad:{},manifest:t.b.hc(),startTime:null};return t.c.pause(),Wn.forEach(function(t){e.video[t]=this.c[t]}.bind(t)),t.c.ended||(e.startTime=t.c.currentTime),Zn.forEach(function(t){var n=t[1];t=this.b[t[0]](),e.player[n]=t}.bind(t)),tr.forEach(function(t){var n=t[1];t=this.b[t[0]](),e.playerAfterLoad[n]=t}.bind(t)),e}function mr(t){t.dispatchEvent(new wt("caststatuschanged"))}function br(t){t.f.dispatchEvent(new wt(t.h.paused?"pause":"play"))}function Ar(t){Zn.forEach(function(t){var e=t[1];t=this.a.get("player",t[0])(),this.b[e](t)}.bind(t));var e=t.a.get("player","getAssetUri")(),n=t.a.get("video","ended"),r=Promise.resolve(),i=t.c.autoplay,a=null;n||(a=t.a.get("video","currentTime")),e&&(t.c.autoplay=!1,r=t.b.load(e,a));var o={};Wn.forEach(function(t){o[t]=this.a.get("video",t)}.bind(t)),r.then((function(){t.c&&(Wn.forEach(function(t){this.c[t]=o[t]}.bind(t)),tr.forEach(function(t){var e=t[1];t=this.a.get("player",t[0])(),this.b[e](t)}.bind(t)),t.c.autoplay=i,e&&t.c.play())}),(function(e){t.b.dispatchEvent(new wt("error",{detail:e}))}))}function _r(t,e,n){t.a.ga()&&("video"==e?t.f.dispatchEvent(n):"player"==e&&t.g.dispatchEvent(n))}function Er(t,e,n,r){var i=this;kt.call(this),this.a=t,this.b=e,this.c=new jt,this.D={video:t,player:e},this.s=n||function(){},this.F=r||function(t){return t},this.u=!1,this.h=!0,this.g=0,this.m=!1,this.l=!0,this.i=this.f=null,this.B=new ft((function(){wr(i)})),function(t){var e=cast.receiver.CastReceiverManager.getInstance();e.onSenderConnected=t.ee.bind(t),e.onSenderDisconnected=t.ee.bind(t),e.onSystemVolumeChanged=t.Oe.bind(t),t.i=e.getCastMessageBus("urn:x-cast:com.google.cast.media"),t.i.onMessage=t.Af.bind(t),t.f=e.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),t.f.onMessage=t.Kf.bind(t),e.start(),zn.forEach(function(t){this.c.w(this.a,t,this.je.bind(this,"video"))}.bind(t)),Xn.forEach(function(t){this.c.w(this.b,t,this.je.bind(this,"player"))}.bind(t)),cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?t.b.vd(3840,2160):t.b.vd(1920,1080),t.c.w(t.a,"loadeddata",function(){this.m=!0}.bind(t)),t.c.w(t.b,"loading",function(){this.h=!1,Tr(this)}.bind(t)),t.c.w(t.a,"playing",function(){this.h=!1,Tr(this)}.bind(t)),t.c.w(t.a,"pause",function(){Tr(this)}.bind(t)),t.c.w(t.b,"unloading",function(){this.h=!0,Tr(this)}.bind(t)),t.c.w(t.a,"ended",function(){var t=this;new ft((function(){t.a&&t.a.ended&&(t.h=!0,Tr(t))})).R(5)}.bind(t))}(this)}function Tr(t){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new wt("caststatuschanged")),Sr(this)||Lr(this,0))}.bind(t))}function wr(t){t.B.R(.5);var e={video:{},player:{}};if($n.forEach(function(t){e.video[t]=this.a[t]}.bind(t)),t.b.V())for(var n in Qn)0==t.g%Qn[n]&&(e.player[n]=t.b[n]());for(var r in Jn)0==t.g%Jn[r]&&(e.player[r]=t.b[r]());(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(e.video.volume=n.level,e.video.muted=n.muted),t.m&&(t.g+=1),Cr(t,{type:"update",update:e},t.f),Sr(t)}function Sr(t){return!(!t.l||!t.a.duration&&!t.b.V()||(kr(t),t.l=!1,0))}function kr(t){var e={contentId:t.b.hc(),streamType:t.b.V()?"LIVE":"BUFFERED",duration:t.a.duration,contentType:""};Lr(t,0,e)}function Cr(t,e,n,r){t.u&&(t=rr(e),r?n.getCastChannel(r).send(t):n.broadcast(t))}function Lr(t,e,n){var r=t.a.playbackRate,i=xr;r={mediaSessionId:0,playbackRate:r,playerState:i=t.h?i.IDLE:t.b.Xc()?i.we:t.a.paused?i.ye:i.ze,currentTime:t.a.currentTime,supportedMediaCommands:15,volume:{level:t.a.volume,muted:t.a.muted}},n&&(r.media=n),Cr(t,{requestId:e,type:"MEDIA_STATUS",status:[r]},t.i)}t.__onGCastApiAvailable=function(t){if(t)for(var e=(t=f(pr)).next();!e.done;e=t.next())e.value.init()},G(gr,kt),V("shaka.cast.CastProxy",gr),gr.prototype.destroy=function(t){return t&&this.a.Kb(),this.i&&(this.i.release(),this.i=null),t=[],this.b&&(t.push(this.b.destroy()),this.b=null),this.a&&(t.push(this.a.destroy()),this.a=null),this.l=this.h=this.c=null,Promise.all(t)},gr.prototype.destroy=gr.prototype.destroy,gr.prototype.pf=function(){return this.h},gr.prototype.getVideo=gr.prototype.pf,gr.prototype.ff=function(){return this.l},gr.prototype.getPlayer=gr.prototype.ff,gr.prototype.Ee=function(){return this.a.h&&or},gr.prototype.canCast=gr.prototype.Ee,gr.prototype.ga=function(){return this.a.ga()},gr.prototype.isCasting=gr.prototype.ga,gr.prototype.nd=function(){return this.a.nd()},gr.prototype.receiverName=gr.prototype.nd,gr.prototype.cast=function(){var t=vr(this);return this.a.cast(t).then(function(){if(this.b)return this.b.Cd()}.bind(this))},gr.prototype.cast=gr.prototype.cast,gr.prototype.ud=function(t){this.a.ud(t)},gr.prototype.setAppData=gr.prototype.ud,gr.prototype.sg=function(){var t=this.a;if(t.b){var e=t.B();chrome.cast.requestSession(t.kd.bind(t,e),t.be.bind(t))}},gr.prototype.suggestDisconnect=gr.prototype.sg,gr.prototype.He=function(t){var e=this;return p((function n(){return N(n,(function(n){switch(n.j){case 1:return t==e.s?n.return():(e.s=t,e.a.Kb(),w(n,e.a.destroy(),2));case 2:e.a=null,e.a=new ar(t,(function(){return mr(e)}),(function(){return br(e)}),(function(t,n){return _r(e,t,n)}),(function(){return Ar(e)}),(function(){return vr(e)})),e.a.init(),S(n)}}))}))},gr.prototype.changeReceiverId=gr.prototype.He,gr.prototype.Kb=function(){this.a.Kb()},gr.prototype.forceDisconnect=gr.prototype.Kb,gr.prototype.B=function(t){if("addEventListener"==t)return this.f.addEventListener.bind(this.f);if("removeEventListener"==t)return this.f.removeEventListener.bind(this.f);if(this.a.ga()&&0==Object.keys(this.a.a.video).length){var e=this.c[t];if("function"!=typeof e)return e}return this.a.ga()?this.a.get("video",t):("function"==typeof(t=this.c[t])&&(t=t.bind(this.c)),t)},gr.prototype.F=function(t,e){this.a.ga()?this.a.set("video",t,e):this.c[t]=e},gr.prototype.D=function(t){this.a.ga()||this.f.dispatchEvent(new wt(t.type,t))},gr.prototype.u=function(t){this.a.ga()||this.g.dispatchEvent(t)},G(Er,kt),V("shaka.cast.CastReceiver",Er),Er.prototype.isConnected=function(){return this.u},Er.prototype.isConnected=Er.prototype.isConnected,Er.prototype.vf=function(){return this.h},Er.prototype.isIdle=Er.prototype.vf,Er.prototype.destroy=function(){var t=this;return p((function e(){var n;return N(e,(function(e){switch(e.j){case 1:return t.c&&(t.c.release(),t.c=null),n=[],t.b&&(n.push(t.b.destroy()),t.b=null),t.B&&(t.B.stop(),t.B=null),t.a=null,t.D=null,t.s=null,t.u=!1,t.h=!0,t.f=null,t.i=null,w(e,Promise.all(n),2);case 2:cast.receiver.CastReceiverManager.getInstance().stop(),S(e)}}))}))},Er.prototype.destroy=Er.prototype.destroy,(r=Er.prototype).ee=function(){this.g=0,this.l=!0,this.u=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,Tr(this)},r.je=function(t,e){this.b&&(wr(this),Cr(this,{type:"event",targetName:t,event:e},this.f))},r.Oe=function(){var t=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();t&&Cr(this,{type:"update",update:{video:{volume:t.level,muted:t.muted}}},this.f),Cr(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.f)},r.Kf=function(t){var e=ir(t.data);switch(e.type){case"init":this.g=0,this.m=!1,this.l=!0,function(t,e,n){for(var r in e.player)t.b[r](e.player[r]);t.s(n),n=Promise.resolve();var i=t.a.autoplay;e.manifest&&(t.a.autoplay=!1,n=t.b.load(e.manifest,e.startTime)),n.then((function(){if(t.b){for(var n in e.video)t.a[n]=e.video[n];for(var r in e.playerAfterLoad)t.b[r](e.playerAfterLoad[r]);t.a.autoplay=i,e.manifest&&(t.a.play(),Lr(t,0))}}),(function(e){t.b.dispatchEvent(new wt("error",{detail:e}))}))}(this,e.initState,e.appData),wr(this);break;case"appData":this.s(e.appData);break;case"set":var n=e.targetName,r=e.property;if(e=e.value,"video"==n){var i=cast.receiver.CastReceiverManager.getInstance();if("volume"==r){i.setSystemVolumeLevel(e);break}if("muted"==r){i.setSystemVolumeMuted(e);break}}this.D[n][r]=e;break;case"call":(n=this.D[e.targetName])[e.methodName].apply(n,e.args);break;case"asyncCall":n=e.targetName,r=e.methodName,"player"==n&&"load"==r&&(this.g=0,this.m=!1),i=e.id,t=t.senderId;var a=this.D[n];e=a[r].apply(a,e.args),"player"==n&&"load"==r&&(e=e.then(function(){this.l=!0}.bind(this))),e.then(this.oe.bind(this,t,i,null),this.oe.bind(this,t,i))}},r.Af=function(t){var e=ir(t.data);switch(e.type){case"PLAY":this.a.play(),Lr(this,0);break;case"PAUSE":this.a.pause(),Lr(this,0);break;case"SEEK":t=e.currentTime;var n=e.resumeState;null!=t&&(this.a.currentTime=Number(t)),n&&"PLAYBACK_START"==n?(this.a.play(),Lr(this,0)):n&&"PLAYBACK_PAUSE"==n&&(this.a.pause(),Lr(this,0));break;case"STOP":this.b.Cd().then(function(){this.b&&Lr(this,0)}.bind(this));break;case"GET_STATUS":Lr(this,Number(e.requestId));break;case"VOLUME":t=(n=e.volume).level,n=n.muted;var r=this.a.volume,i=this.a.muted;null!=t&&(this.a.volume=Number(t)),null!=n&&(this.a.muted=n),r==this.a.volume&&i==this.a.muted||Lr(this,0);break;case"LOAD":this.g=0,this.l=this.m=!1,t=e.media,n=e.currentTime,r=this.F(t.contentId),i=e.autoplay||!0,this.s(t.customData),i&&(this.a.autoplay=!0),this.b.load(r,n).then(function(){this.b&&kr(this)}.bind(this)).catch(function(t){var n="LOAD_FAILED";7==t.category&&7e3==t.code&&(n="LOAD_CANCELLED"),Cr(this,{requestId:Number(e.requestId),type:n},this.i)}.bind(this));break;default:Cr(this,{requestId:Number(e.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.i)}},r.oe=function(t,e,n){this.b&&Cr(this,{type:"asyncComplete",id:e,error:n},this.f,t)};var xr={IDLE:"IDLE",ze:"PLAYING",we:"BUFFERING",ye:"PAUSED"};function Rr(t,e){this.J=t,this.b=e==Ir,this.a=0}V("shaka.util.DataViewReader",Rr);var Ir=1;function Pr(){throw new gt(2,3,3e3)}function Or(){this.c=[],this.b=[],this.a=!1}function Dr(t){for(var e=null!=t.flags?12:8;t.reader.ua()&&!t.parser.a;)t.parser.sc(t.start+e,t.reader,t.partialOkay)}function Mr(t){for(var e=null!=t.flags?12:8,n=t.reader.G();0<n&&!t.parser.a;--n)t.parser.sc(t.start+e,t.reader,t.partialOkay)}function Nr(t){return function(e){t(e.reader.Za(e.reader.J.byteLength-e.reader.ca()))}}function Ur(t){for(var e=0,n=0;n<t.length;n++)e=e<<8|t.charCodeAt(n);return e}function Fr(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t)}function Br(t){var e=this;this.a=[],this.b=[],this.data=[],(new Or).H("moov",Dr).fa("pssh",(function(t){if(!(1<t.version)){var n=t.reader.J;if(n=new Uint8Array(n.buffer,n.byteOffset-12,t.size),e.data.push(n),e.a.push(he.Ac(t.reader.Za(16))),0<t.version){n=t.reader.G();for(var r=0;r<n;++r){var i=he.Ac(t.reader.Za(16));e.b.push(i)}}}})).parse(t)}Rr.Endianness={Bg:0,Dg:Ir},Rr.prototype.ua=function(){return this.a<this.J.byteLength},Rr.prototype.hasMoreData=Rr.prototype.ua,Rr.prototype.ca=function(){return this.a},Rr.prototype.getPosition=Rr.prototype.ca,Rr.prototype.Ve=function(){return this.J.byteLength},Rr.prototype.getLength=Rr.prototype.Ve,Rr.prototype.la=function(){try{var t=this.J.getUint8(this.a);return this.a+=1,t}catch(t){Pr()}},Rr.prototype.readUint8=Rr.prototype.la,Rr.prototype.Tb=function(){try{var t=this.J.getUint16(this.a,this.b);return this.a+=2,t}catch(t){Pr()}},Rr.prototype.readUint16=Rr.prototype.Tb,Rr.prototype.G=function(){try{var t=this.J.getUint32(this.a,this.b);return this.a+=4,t}catch(t){Pr()}},Rr.prototype.readUint32=Rr.prototype.G,Rr.prototype.ke=function(){try{var t=this.J.getInt32(this.a,this.b);return this.a+=4,t}catch(t){Pr()}},Rr.prototype.readInt32=Rr.prototype.ke,Rr.prototype.Bb=function(){try{if(this.b)var t=this.J.getUint32(this.a,!0),e=this.J.getUint32(this.a+4,!0);else e=this.J.getUint32(this.a,!1),t=this.J.getUint32(this.a+4,!1)}catch(t){Pr()}if(2097151<e)throw new gt(2,3,3001);return this.a+=8,e*Math.pow(2,32)+t},Rr.prototype.readUint64=Rr.prototype.Bb,Rr.prototype.Za=function(t){this.a+t>this.J.byteLength&&Pr();var e=new Uint8Array(this.J.buffer,this.J.byteOffset+this.a,t);return this.a+=t,e},Rr.prototype.readBytes=Rr.prototype.Za,Rr.prototype.M=function(t){this.a+t>this.J.byteLength&&Pr(),this.a+=t},Rr.prototype.skip=Rr.prototype.M,Rr.prototype.me=function(t){this.a<t&&Pr(),this.a-=t},Rr.prototype.rewind=Rr.prototype.me,Rr.prototype.seek=function(t){(0>t||t>this.J.byteLength)&&Pr(),this.a=t},Rr.prototype.seek=Rr.prototype.seek,Rr.prototype.md=function(){for(var t=this.a;this.ua()&&0!=this.J.getUint8(this.a);)this.a+=1;return t=new Uint8Array(this.J.buffer,this.J.byteOffset+t,this.a-t),this.a+=1,oe(t)},Rr.prototype.readTerminatedString=Rr.prototype.md,V("shaka.util.Mp4Parser",Or),Or.prototype.H=function(t,e){var n=Ur(t);return this.c[n]=0,this.b[n]=e,this},Or.prototype.box=Or.prototype.H,Or.prototype.fa=function(t,e){var n=Ur(t);return this.c[n]=1,this.b[n]=e,this},Or.prototype.fullBox=Or.prototype.fa,Or.prototype.stop=function(){this.a=!0},Or.prototype.stop=Or.prototype.stop,Or.prototype.parse=function(t,e){var n=new Uint8Array(t);for(n=new Rr(new DataView(n.buffer,n.byteOffset,n.byteLength),0),this.a=!1;n.ua()&&!this.a;)this.sc(0,n,e)},Or.prototype.parse=Or.prototype.parse,Or.prototype.sc=function(t,e,n){var r=e.ca(),i=e.G(),a=e.G();switch(i){case 0:i=e.J.byteLength-r;break;case 1:i=e.Bb()}var o=this.b[a];if(o){var s=null,u=null;1==this.c[a]&&(s=(u=e.G())>>>24,u&=16777215),a=r+i,n&&a>e.J.byteLength&&(a=e.J.byteLength),a-=e.ca(),e=0<a?e.Za(a):new Uint8Array(0),o({parser:this,partialOkay:n||!1,version:s,flags:u,reader:e=new Rr(new DataView(e.buffer,e.byteOffset,e.byteLength),0),size:i,start:r+t})}else e.M(Math.min(r+i-e.ca(),e.J.byteLength-e.ca()))},Or.prototype.parseNext=Or.prototype.sc,Or.children=Dr,Or.sampleDescription=Mr,Or.allData=Nr,Or.typeToString=Fr;var jr={gc:function(t,e){var n=jr.P(t,e);return 1!=n.length?null:n[0]},Oc:function(t,e,n){return 1!=(t=jr.Od(t,e,n)).length?null:t[0]},P:function(t,e){return Array.prototype.filter.call(t.childNodes,(function(t){return t instanceof Element&&t.tagName==e}))},Od:function(t,e,n){return Array.prototype.filter.call(t.childNodes,(function(t){return t instanceof Element&&t.localName==n&&t.namespaceURI==e}))},getAttributeNS:function(t,e,n){return t.hasAttributeNS(e,n)?t.getAttributeNS(e,n):null},ic:function(t){return Array.prototype.every.call(t.childNodes,(function(t){return t.nodeType==Node.TEXT_NODE||t.nodeType==Node.CDATA_SECTION_NODE}))?t.textContent.trim():null},I:function(t,e,n,r){r=void 0===r?null:r;var i=null;return null!=(t=t.getAttribute(e))&&(i=n(t)),null==i?r:i},Of:function(t){return t?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t)&&(t+="Z"),t=Date.parse(t),isNaN(t)?null:Math.floor(t/1e3)):null},Ea:function(t){return t&&(t=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(t))?(t=31536e3*Number(t[1]||null)+2592e3*Number(t[2]||null)+86400*Number(t[3]||null)+3600*Number(t[4]||null)+60*Number(t[5]||null)+Number(t[6]||null),isFinite(t)?t:null):null},uc:function(t){var e=/([0-9]+)-([0-9]+)/.exec(t);return e?(t=Number(e[1]),isFinite(t)?(e=Number(e[2]),isFinite(e)?{start:t,end:e}:null):null):null},parseInt:function(t){return 0==(t=Number(t))%1?t:null},tc:function(t){return 0==(t=Number(t))%1&&0<t?t:null},yb:function(t){return 0==(t=Number(t))%1&&0<=t?t:null},parseFloat:function(t){return t=Number(t),isNaN(t)?null:t},Me:function(t){var e;return t=(e=t.match(/^(\d+)\/(\d+)$/))?Number(e[1])/Number(e[2]):Number(t),isNaN(t)?null:t},he:function(t,e){var n=new DOMParser;try{var r=n.parseFromString(t,"text/xml")}catch(t){}if(r&&r.documentElement.tagName==e)var i=r.documentElement;return i&&0<i.getElementsByTagName("parsererror").length?null:i},ge:function(t,e){try{var n=oe(t);return jr.he(n,e)}catch(t){}}},Kr=(new Map).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime");function Vr(t,e,n){var r=function(t){for(var e=[],n=(t=f(t)).next();!n.done;n=t.next())(n=Yr(n.value))&&e.push(n);return e}(t),i=null;t=[];var a=[],o=new Set(r.map((function(t){return t.keyId})));if(o.delete(null),1<o.size)throw new gt(2,4,4010);if(n||(a=r.filter((function(t){return"urn:mpeg:dash:mp4protection:2011"!=t.ne||(i=t.init||i,!1)}))).length&&0==(t=function(t,e,n){for(var r=[],i=(n=f(n)).next();!i.done;i=n.next()){i=i.value;var a=Kr.get(i.ne);if(a){var o;if(o=jr.Oc(i.node,"urn:microsoft:playready","pro")){o=he.Ba(o.textContent);var s=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),u=o.length,l=s.length+16+u,c=new ArrayBuffer(l),d=new Uint8Array(c);c=new DataView(c);var h=0;c.setUint32(h,l),h+=4,c.setUint32(h,1886614376),h+=4,c.setUint32(h,0),h+=4,d.set(s,h),h+=s.length,c.setUint32(h,u),h+=4,d.set(o,h),o=[{initData:d,initDataType:"cenc",keyId:i.keyId}]}else o=null;o=He(a,i.init||t||o),(a=Hr.get(a))&&(o.licenseServerUri=a(i)),r.push(o)}else for(i=f(i=e(i.node)||[]),a=i.next();!a.done;a=i.next())r.push(a.value)}return r}(i,e,a)).length&&(t=[He("",i)]),r.length&&(n||!a.length))for(t=[],n=(e=f(Kr.values())).next();!n.done;n=e.next())"org.w3.clearkey"!=(n=n.value)&&t.push(He(n,i));if(o=Array.from(o)[0]||null)for(n=(e=f(t)).next();!n.done;n=e.next())for(r=(n=f(n.value.initData)).next();!r.done;r=n.next())r.value.keyId=o;return{Kd:o,Fg:i,drmInfos:t,Pd:!0}}var Gr,Hr=(new Map).set("com.widevine.alpha",(function(t){return(t=jr.Oc(t.node,"urn:microsoft","laurl"))&&t.getAttribute("licenseUrl")||""})).set("com.microsoft.playready",(function(t){return(t=jr.Oc(t.node,"urn:microsoft:playready","pro"))&&(t=function(t){var e=0,n=new DataView(t).getUint32(e,!0);if(n!==t.byteLength)return[];e+=6,n=[];for(var r=new DataView(t);e<t.byteLength-1;){var i=r.getUint16(e,!0);e+=2;var a=r.getUint16(e,!0);e+=2;var o=new Uint8Array(t,e,a);n.push({type:i,value:o}),e+=a}return n}((t=he.Ba(t.textContent)).buffer).filter((function(t){return 1===t.type}))[0])?(t=se(t.value,!0),(t=jr.he(t,"WRMHEADER"))?function(t){return(t=t.querySelector("DATA > LA_URL"))?t.textContent:""}(t):""):""}));function Yr(t){var e=t.getAttribute("schemeIdUri"),n=jr.getAttributeNS(t,"urn:mpeg:cenc:2013","default_KID"),r=jr.Od(t,"urn:mpeg:cenc:2013","pssh").map(jr.ic);if(!e)return null;if(e=e.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new gt(2,4,4009);var i=[];try{i=r.map((function(t){return{initDataType:"cenc",initData:he.Ba(t),keyId:null}}))}catch(t){throw new gt(2,4,4007)}return{node:t,ne:e,keyId:n,init:0<i.length?i:null}}function zr(e,n,r,i,a){var o={RepresentationID:n,Number:r,Bandwidth:i,Time:a};return e.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,(function(e,n,r,i){if("$$"==e)return"$";var a=o[n];if(null==a)return e;switch("RepresentationID"==n&&r&&(r=void 0),"Time"==n&&(a=Math.round(a)),i){case void 0:case"d":case"i":case"u":e=a.toString();break;case"o":e=a.toString(8);break;case"x":e=a.toString(16);break;case"X":e=a.toString(16).toUpperCase();break;default:e=a.toString()}return r=t.parseInt(r,10)||1,Array(Math.max(0,r-e.length)+1).join("0")+e}))}function $r(t,e){var n=Wr(t,e,"timescale"),r=1;n&&(r=jr.tc(n)||1),n=Wr(t,e,"duration"),(n=jr.tc(n||""))&&(n/=r);var i=Wr(t,e,"startNumber"),a=Number(Wr(t,e,"presentationTimeOffset"))||0,o=jr.yb(i||"");null!=i&&null!=o||(o=1);var s=qr(t,e,"SegmentTimeline");if(i=null,s){i=r;var u=t.T.duration||1/0;s=jr.P(s,"S");for(var l=[],c=0,d=0;d<s.length;++d){var f=s[d],h=jr.I(f,"t",jr.yb),p=jr.I(f,"d",jr.yb);if(f=jr.I(f,"r",jr.parseInt),null!=h&&(h-=a),!p)break;if(h=null!=h?h:c,0>(f=f||0))if(d+1<s.length){if(null==(f=jr.I(s[d+1],"t",jr.yb)))break;if(h>=f)break;f=Math.ceil((f-h)/p)-1}else{if(1/0==u)break;if(h/i>=u)break;f=Math.ceil((u*i-h)/p)-1}0<l.length&&h!=c&&(l[l.length-1].end=h/i);for(var g=0;g<=f;++g)c=h+p,l.push({start:h/i,end:c/i,xg:h}),h=c}i=l}return{timescale:r,Z:n,ab:o,ma:a/r||0,Dd:a,N:i}}function Wr(t,e,n){return[e(t.C),e(t.aa),e(t.ka)].filter(Ve.Ia).map((function(t){return t.getAttribute(n)})).reduce((function(t,e){return t||e}))}function qr(t,e,n){return[e(t.C),e(t.aa),e(t.ka)].filter(Ve.Ia).map((function(t){return jr.gc(t,n)})).reduce((function(t,e){return t||e}))}function Xr(t,e,n,r,i,a){if(a=void 0===a?0:a,jr.getAttributeNS(t,"http://www.w3.org/1999/xlink","href")){var o=function(t,e,n,r,i,a){for(var o=jr.getAttributeNS(t,"http://www.w3.org/1999/xlink","href"),s=jr.getAttributeNS(t,"http://www.w3.org/1999/xlink","actuate")||"onRequest",u=0;u<t.attributes.length;u++){var l=t.attributes[u];"http://www.w3.org/1999/xlink"==l.namespaceURI&&(t.removeAttributeNS(l.namespaceURI,l.localName),--u)}if(5<=a)return mt(new gt(2,4,4028));if("onLoad"!=s)return mt(new gt(2,4,4027));var c=Ge([r],[o]);return i.request(0,Nt(c,e)).U((function(r){if(!(r=jr.ge(r.data,t.tagName)))return mt(new gt(2,4,4001,o));for(;t.childNodes.length;)t.removeChild(t.childNodes[0]);for(;r.childNodes.length;){var s=r.childNodes[0];r.removeChild(s),t.appendChild(s)}for(s=0;s<r.attributes.length;s++){var u=r.attributes[s].nodeName,l=r.getAttribute(u);t.setAttribute(u,l)}return Xr(t,e,n,c[0],i,a+1)}))}(t,e,n,r,i,a);return n&&(o=o.U(void 0,(function(){return Xr(t,e,n,r,i,a)}))),o}o=[];for(var s=0;s<t.childNodes.length;s++){var u=t.childNodes[s];u instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==jr.getAttributeNS(u,"http://www.w3.org/1999/xlink","href")?(t.removeChild(u),--s):"SegmentTimeline"!=u.tagName&&o.push(Xr(u,e,n,r,i,a)))}return Et(o).U((function(){return t}))}function Jr(t,e,n){this.c=t,this.b=e,this.a=n}function Qr(t,e,n,r,i,a){this.position=t,this.startTime=e,this.endTime=n,this.c=r,this.b=i,this.a=a}function Zr(t,e,n,r){var i,a=(new Or).fa("sidx",(function(t){i=function(t,e,n,r){var i=[];r.reader.M(4);var a=r.reader.G();if(0==a)throw new gt(2,3,3005);if(0==r.version)var o=r.reader.G(),s=r.reader.G();else o=r.reader.Bb(),s=r.reader.Bb();r.reader.M(2);var u=r.reader.Tb();for(t=t+r.size+s,s=0;s<u;s++){var l=r.reader.G(),c=(2147483648&l)>>>31;l&=2147483647;var d=r.reader.G();if(r.reader.M(4),1==c)throw new gt(2,3,3006);i.push(new Qr(i.length,o/a-e,(o+d)/a-e,(function(){return n}),t,t+l-1)),o+=d,t+=l}return r.parser.stop(),i}(e,r,n,t)}));if(t&&a.parse(t),i)return i;throw new gt(2,3,3004)}function ti(t){this.a=t}function ei(t,e){for(;t.a.length&&t.a[t.a.length-1].startTime>=e;)t.a.pop();for(;t.a.length&&0>=t.a[0].endTime;)t.a.shift();if(0!=t.a.length){var n=t.a[t.a.length-1];t.a[t.a.length-1]=new Qr(n.position,n.startTime,e,n.c,n.b,n.a)}}function ni(t){this.b=t,this.a=new Rr(t,0),Gr||(Gr=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}function ri(t){var e=ii(t);if(7<e.length)throw new gt(2,3,3002);for(var n=0,r=0;r<e.length;r++)n=256*n+e[r];e=n,n=ii(t);t:{r=he.za;for(var i=0;i<Gr.length;i++)if(r(n,Gr[i])){r=!0;break t}r=!1}if(r)n=t.b.byteLength-t.a.ca();else{if(8==n.length&&224&n[1])throw new gt(2,3,3001);for(r=n[0]&(1<<8-n.length)-1,i=1;i<n.length;i++)r=256*r+n[i];n=r}return n=t.a.ca()+n<=t.b.byteLength?n:t.b.byteLength-t.a.ca(),r=new DataView(t.b.buffer,t.b.byteOffset+t.a.ca(),n),t.a.M(n),new ai(e,r)}function ii(t){var e,n=t.a.la();for(e=1;8>=e&&!(n&1<<8-e);e++);if(8<e)throw new gt(2,3,3002);var r=new Uint8Array(e);for(r[0]=n,n=1;n<e;n++)r[n]=t.a.la();return r}function ai(t,e){this.id=t,this.a=e}function oi(t){if(8<t.a.byteLength)throw new gt(2,3,3002);if(8==t.a.byteLength&&224&t.a.getUint8(0))throw new gt(2,3,3001);for(var e=0,n=0;n<t.a.byteLength;n++)e=256*e+t.a.getUint8(n);return e}function si(){}function ui(t){var e=new ni(t.a);if(179!=(t=ri(e)).id)throw new gt(2,3,3013);if(t=oi(t),183!=(e=ri(e)).id)throw new gt(2,3,3012);e=new ni(e.a);for(var n=0;e.ua();){var r=ri(e);if(241==r.id){n=oi(r);break}}return{yg:t,Vf:n}}function li(t,e){var n=qr(t,e,"Initialization");if(!n)return null;var r=t.C.qa,i=n.getAttribute("sourceURL");i&&(r=Ge(t.C.qa,[i])),i=0;var a=null;return(n=jr.I(n,"range",jr.uc))&&(i=n.start,a=n.end),new Jr((function(){return r}),i,a)}function ci(t,e,n,r,i,a,o,s){var u=t.presentationTimeline,l=!t.mb||!t.T.Zc,c=t.T.start,d=t.T.duration,f=e,h=null;return{createSegmentIndex:function(){var t=[f(r,i,a),"webm"==o?f(n.c(),n.b,n.a):null];return f=null,Promise.all(t).then((function(t){var e=t[0];t=t[1]||null,e="mp4"==o?Zr(e,i,r,s):(new si).parse(e,t,r,s),u.vb(e,c),h=new ti(e),l&&ei(h,d)}))},findSegmentPosition:function(t){return h.find(t)},getSegmentReference:function(t){return h.get(t)}}}function di(t){return t.Ub}function fi(t,e){var n=li(t,hi),r=function(t){return[t.C.La,t.aa.La,t.ka.La].filter(Ve.Ia).map((function(t){return jr.P(t,"SegmentURL")})).reduce((function(t,e){return 0<t.length?t:e})).map((function(e){return e.getAttribute("indexRange")&&!t.Vd&&(t.Vd=!0),{xf:e.getAttribute("media"),start:(e=jr.I(e,"mediaRange",jr.uc,{start:0,end:null})).start,end:e.end}}))}(t),i=$r(t,hi),a=i.ab;0==a&&(a=1);var o=0;if(i.Z?o=i.Z*(a-1):i.N&&0<i.N.length&&(o=i.N[0].start),!(r={Z:i.Z,startTime:o,ab:a,ma:i.ma,N:i.N,tb:r}).Z&&!r.N&&1<r.tb.length)throw new gt(2,4,4002);if(!r.Z&&!t.T.duration&&!r.N&&1==r.tb.length)throw new gt(2,4,4002);if(r.N&&0==r.N.length)throw new gt(2,4,4002);return a=i=null,t.ka.id&&t.C.id&&(i=e[a=t.ka.id+","+t.C.id]),o=function(t,e,n,r){var i=r.tb.length;r.N&&r.N.length!=r.tb.length&&(i=Math.min(r.N.length,r.tb.length));for(var a=[],o=r.startTime,s=0;s<i;s++){var u,l=r.tb[s],c=Ge(n,[l.xf]);u=null!=r.Z?o+r.Z:r.N?r.N[s].end:o+t,a.push(new Qr(s+e,o,u,function(t){return t}.bind(null,c),l.start,l.end)),o=u}return a}(t.T.duration,r.ab,t.C.qa,r),i?(i.cd(o),a=t.presentationTimeline.Ob(),i.Lc(a-t.T.start)):(t.presentationTimeline.vb(o,t.T.start),i=new ti(o),a&&t.mb&&(e[a]=i)),t.mb&&t.T.Zc||ei(i,t.T.duration),{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:i.find.bind(i),getSegmentReference:i.get.bind(i),initSegmentReference:n,ma:r.ma}}function hi(t){return t.La}function pi(t,e,n,r){var i=function(t){var e=Wr(t,gi,"initialization");if(!e)return null;var n=t.C.id,r=t.bandwidth||null,i=t.C.qa;return new Jr((function(){var t=zr(e,n,null,r,null);return Ge(i,[t])}),0,null)}(t),a=$r(t,gi),o=Wr(t,gi,"media"),s=Wr(t,gi,"index");if(o=(a={Z:a.Z,timescale:a.timescale,ab:a.ab,ma:a.ma,Dd:a.Dd,N:a.N,ad:o,Qb:s}).Qb?1:0,o+=a.N?1:0,0==(o+=a.Z?1:0))throw new gt(2,4,4002);if(1!=o&&(a.Qb&&(a.N=null),a.Z=null),!a.Qb&&!a.ad)throw new gt(2,4,4002);if(a.Qb){if("mp4"!=(n=t.C.mimeType.split("/")[1])&&"webm"!=n)throw new gt(2,4,4006);if("webm"==n&&!i)throw new gt(2,4,4005);r=zr(a.Qb,t.C.id,null,t.bandwidth||null,null),t=ci(t,e,i,r=Ge(t.C.qa,[r]),0,null,n,a.ma)}else a.Z?(r||(t.presentationTimeline.ed(a.Z),t.presentationTimeline.fd(t.T.start)),t=function(t,e){var n=t.T.duration,r=e.Z,i=e.ab,a=e.timescale,o=e.ad,s=t.bandwidth||null,u=t.C.id,l=t.C.qa;return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(t){return 0>t||n&&t>=n?null:Math.floor(t/r)},getSegmentReference:function(t){var e=t*r,c=e+r;return n&&(c=Math.min(c,n)),0>c||n&&e>=n?null:new Qr(t,e,c,(function(){var n=zr(o,u,t+i,s,e*a);return Ge(l,[n])}),0,null)}}}(t,a)):(o=e=null,t.ka.id&&t.C.id&&(e=n[o=t.ka.id+","+t.C.id]),s=function(t,e){for(var n=[],r=0;r<e.N.length;r++){var i=r+e.ab;n.push(new Qr(i,e.N[r].start,e.N[r].end,function(t,e,n,r,i,a){return Ge(r,[t=zr(t,e,i,n,a)]).map((function(t){return t.toString()}))}.bind(null,e.ad,t.C.id,t.bandwidth||null,t.C.qa,i,e.N[r].xg+e.Dd),0,null))}return n}(t,a),r=!t.mb||!t.T.Zc,e?(r&&ei(new ti(s),t.T.duration),e.cd(s),n=t.presentationTimeline.Ob(),e.Lc(n-t.T.start)):(t.presentationTimeline.vb(s,t.T.start),e=new ti(s),o&&t.mb&&(n[o]=e)),r&&ei(e,t.T.duration),t={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:e.find.bind(e),getSegmentReference:e.get.bind(e)});return{createSegmentIndex:t.createSegmentIndex,findSegmentPosition:t.findSegmentPosition,getSegmentReference:t.getSegmentReference,initSegmentReference:i,ma:a.ma}}function gi(t){return t.Wb}V("shaka.media.InitSegmentReference",Jr),Jr.prototype.Ic=function(){return this.c()},Jr.prototype.createUris=Jr.prototype.Ic,Jr.prototype.Uc=function(){return this.b},Jr.prototype.getStartByte=Jr.prototype.Uc,Jr.prototype.Tc=function(){return this.a},Jr.prototype.getEndByte=Jr.prototype.Tc,V("shaka.media.SegmentReference",Qr),Qr.prototype.ca=function(){return this.position},Qr.prototype.getPosition=Qr.prototype.ca,Qr.prototype.kc=function(){return this.startTime},Qr.prototype.getStartTime=Qr.prototype.kc,Qr.prototype.Te=function(){return this.endTime},Qr.prototype.getEndTime=Qr.prototype.Te,Qr.prototype.Ic=function(){return this.c()},Qr.prototype.createUris=Qr.prototype.Ic,Qr.prototype.Uc=function(){return this.b},Qr.prototype.getStartByte=Qr.prototype.Uc,Qr.prototype.Tc=function(){return this.a},Qr.prototype.getEndByte=Qr.prototype.Tc,V("shaka.media.SegmentIndex",ti),ti.prototype.destroy=function(){return this.a=null,Promise.resolve()},ti.prototype.destroy=ti.prototype.destroy,ti.prototype.find=function(t){for(var e=this.a.length-1;0<=e;--e){var n=this.a[e];if(t>=n.startTime&&t<n.endTime)return n.position}return this.a.length&&t<this.a[0].startTime?this.a[0].position:null},ti.prototype.find=ti.prototype.find,ti.prototype.get=function(t){return 0==this.a.length||0>(t-=this.a[0].position)||t>=this.a.length?null:this.a[t]},ti.prototype.get=ti.prototype.get,ti.prototype.offset=function(t){for(var e=0;e<this.a.length;++e)this.a[e].startTime+=t,this.a[e].endTime+=t},ti.prototype.offset=ti.prototype.offset,ti.prototype.cd=function(t){for(var e=[],n=0,r=0;n<this.a.length&&r<t.length;){var i=this.a[n],a=t[r];i.startTime<a.startTime?(e.push(i),n++):(i.startTime>a.startTime?0==n&&e.push(a):(.1<Math.abs(i.endTime-a.endTime)?e.push(new Qr(i.position,a.startTime,a.endTime,a.c,a.b,a.a)):e.push(i),n++),r++)}for(;n<this.a.length;)e.push(this.a[n++]);if(e.length)for(n=e[e.length-1].position+1;r<t.length;)i=new Qr(n++,(i=t[r++]).startTime,i.endTime,i.c,i.b,i.a),e.push(i);else e=t;this.a=e},ti.prototype.merge=ti.prototype.cd,ti.prototype.Lc=function(t){for(var e=0;e<this.a.length;++e)if(this.a[e].endTime>t)return void this.a.splice(0,e);this.a=[]},ti.prototype.evict=ti.prototype.Lc,ni.prototype.ua=function(){return this.a.ua()},si.prototype.parse=function(t,e,n,r){var i;if(440786851!=ri(e=new ni(new DataView(e))).id)throw new gt(2,3,3008);var a=ri(e);if(408125543!=a.id)throw new gt(2,3,3009);for(e=a.a.byteOffset,a=new ni(a.a),i=null;a.ua();){var o=ri(a);if(357149030==o.id){i=o;break}}if(!i)throw new gt(2,3,3010);for(a=new ni(i.a),i=1e6,o=null;a.ua();){var s=ri(a);if(2807729==s.id)i=oi(s);else if(17545==s.id)if(4==(o=s).a.byteLength)o=o.a.getFloat32(0);else{if(8!=o.a.byteLength)throw new gt(2,3,3003);o=o.a.getFloat64(0)}}if(null==o)throw new gt(2,3,3011);if(i=o*(a=i/1e9),475249515!=(t=ri(new ni(new DataView(t)))).id)throw new gt(2,3,3007);return function(t,e,n,r,i,a){function o(){return i}var s=[];t=new ni(t.a);for(var u=null,l=null;t.ua();){var c=ri(t);if(187==c.id){var d=ui(c);d&&(c=n*d.yg,d=e+d.Vf,null!=u&&s.push(new Qr(s.length,u-a,c-a,o,l,d-1)),u=c,l=d)}}return null!=u&&s.push(new Qr(s.length,u-a,r-a,o,l,null)),s}(t,e,a,i,n,r)};var yi={zb:{},Sb:{},pd:function(t,e){yi.Sb[t]=e}};function vi(t,e,n){this.f=t,this.vc=e,this.h=this.g=1/0,this.a=1,this.b=this.c=null,this.l=0,this.m=!0,this.i=0,this.s=void 0===n||n}function mi(t,e,n,r){return t=Nt(t,r),0==e&&null==n||(t.headers.Range=n?"bytes="+e+"-"+n:"bytes="+e+"-"),t}function bi(){var t=this;this.b=this.a=null,this.f=[],this.c=null,this.l=[],this.h=1,this.m={},this.s=0,this.u=new H(5),this.i=new ft((function(){!function(t){p((function e(){var n,r;return N(e,(function(e){switch(e.j){case 1:return n=0,k(e,2),w(e,Ai(t),4);case 4:n=e.o,L(e,3);break;case 2:r=x(e),t.b&&(r.severity=1,t.b.onError(r));case 3:if(!t.b)return e.return();wi(t,n),S(e)}}))}))}(t)})),this.g=new It}function Ai(t){var e=Date.now(),n=t.b.networkingEngine.request(0,Nt(t.f,t.a.retryParameters));return Pt(t.g,n),n.promise.then((function(e){if(t.b)return e.uri&&!t.f.includes(e.uri)&&t.f.unshift(e.uri),function(t,e,n){if(!(e=jr.ge(e,"MPD")))throw new gt(2,4,4001,n);return e=Xr(e,t.a.retryParameters,t.a.dash.xlinkFailGracefully,n,t.b.networkingEngine),Pt(t.g,e),e.promise.then((function(e){return function(t,e,n){return p((function r(){var i,a,o,s,u,l,c,d,f,h,p,g,y,v,m,b,A,_,E,T,k,C,L,x;return N(r,(function(r){switch(r.j){case 1:s=Ve,l=[n],0<(c=(u=jr).P(e,"Location").map(u.ic).filter(s.Ia)).length&&(d=Ge(l,c),l=t.f=d),f=u.P(e,"BaseURL").map(u.ic),h=Ge(l,f),p=t.a.dash.ignoreMinBufferTime,g=0,p||(g=u.I(e,"minBufferTime",u.Ea)),t.s=u.I(e,"minimumUpdatePeriod",u.Ea,-1),y=u.I(e,"availabilityStartTime",u.Of),v=u.I(e,"timeShiftBufferDepth",u.Ea),m=u.I(e,"maxSegmentDuration",u.Ea),b=e.getAttribute("type")||"static",A=t.a.dash.ignoreSuggestedPresentationDelay,_=null,A||(_=u.I(e,"suggestedPresentationDelay",u.Ea)),t.c?E=t.c.presentationTimeline:(T=Math.max(t.a.dash.defaultPresentationDelay,1.5*g),E=new vi(y,null!=_?_:T,t.a.dash.autoCorrectDrift));for(var R={mb:"static"!=b,presentationTimeline:E,ka:null,T:null,aa:null,C:null,bandwidth:0,Vd:!1},I=h,P=jr.I(e,"mediaPresentationDuration",jr.Ea),O=[],D=0,M=jr.P(e,"Period"),N=0;N<M.length;N++){var U=M[N];D=jr.I(U,"start",jr.Ea,D);var F=jr.I(U,"duration",jr.Ea),B=null;if(N!=M.length-1){var j=jr.I(M[N+1],"start",jr.Ea);null!=j&&(B=j-D)}else null!=P&&(B=P-D);if(null==B&&(B=F),U=_i(t,R,I,{start:D,duration:B,node:U,Zc:null==B||N==M.length-1}),O.push(U),F=R.ka.id,t.l.includes(F)||(t.l.push(F),t.c&&(t.b.filterNewPeriod(U),t.c.periods.push(U))),null==B){D=null;break}D+=B}if(null==t.c&&t.b.filterAllPeriods(O),null!=P?(i=O,a=P,o=!1):(i=O,a=D,o=!0),k=a,C=i,E.Xb("static"==b),"static"!=b&&o||E.xa(k||1/0),E.V()&&!isNaN(t.a.availabilityWindowOverride)&&(v=t.a.availabilityWindowOverride),null==v&&(v=1/0),E.xd(v),E.ed(m||1),t.c){r.A(0);break}if(t.c={presentationTimeline:E,periods:C,offlineSessionIds:[],minBufferTime:g||0},!E.ue()){r.A(0);break}return L=u.P(e,"UTCTiming"),w(r,function(t,e,n){n=n.map((function(t){return{scheme:t.getAttribute("schemeIdUri"),value:t.getAttribute("value")}}));var r=t.a.dash.clockSyncUri;return!n.length&&r&&n.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),Ve.Ke(n,function(t){var n=t.scheme;switch(t=t.value,n){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return ki(this,e,t,"HEAD");case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return ki(this,e,t,"GET");case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return n=Date.parse(t),isNaN(n)?0:n-Date.now();case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":return q("NTP UTCTiming scheme is not supported"),Promise.reject();default:return q("Unrecognized scheme in UTCTiming element",n),Promise.reject()}}.bind(t)).catch((function(){return q("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),0}))}(t,h,L),4);case 4:if(x=r.o,!t.b)return r.return();E.pe(x),S(r)}}))}))}(t,e,n)}))}(t,e.data,e.uri)})).then((function(){var n=(Date.now()-e)/1e3;return Y(t.u,1,n),n}))}function _i(t,e,n,r){if(e.ka=Si(r.node,null,n),e.T=r,e.ka.id||(e.ka.id="__shaka_period_"+r.start),jr.P(r.node,"EventStream").forEach(t.Pf.bind(t,r.start,r.duration)),n=jr.P(r.node,"AdaptationSet").map(t.Nf.bind(t,e)).filter(Ve.Ia),e.mb){e=[];for(var i=f(n),a=i.next();!a.done;a=i.next())for(var o=(a=f(a.value.Yf)).next();!o.done;o=a.next())e.push(o.value);if(e.length!=new Set(e).size)throw new gt(2,4,4018)}var s=n.filter((function(t){return!t.Bd}));if(n.filter((function(t){return t.Bd})).forEach((function(t){var e=t.streams[0],n=t.Bd;s.forEach((function(t){t.id==n&&t.streams.forEach((function(t){t.trickModeVideo=e}))}))})),e=Ei(s,"video"),i=Ei(s,"audio"),!e.length&&!i.length)throw new gt(2,4,4004);for(n=t.a.disableAudio,i.length&&!n||(i=[null]),n=t.a.disableVideo,e.length&&!n||(e=[null]),n=[],a=0;a<i.length;a++)for(o=0;o<e.length;o++)Ti(t,i[a],e[o],n);if(e=[],!t.a.disableText)for(t=Ei(s,"text"),i=0;i<t.length;i++)e.push.apply(e,t[i].streams);return{startTime:r.start,textStreams:e,variants:n}}function Ei(t,e){return t.filter((function(t){return t.contentType==e}))}function Ti(t,e,n,r){if(e||n)if(e&&n){var i=e.drmInfos,a=n.drmInfos;if(!i.length||!a.length||0<Re(i,a).length){a=Re(e.drmInfos,n.drmInfos);for(var o=0;o<e.streams.length;o++)for(var s=0;s<n.streams.length;s++)i=(n.streams[s].bandwidth||0)+(e.streams[o].bandwidth||0),i={id:t.h++,language:e.language,primary:e.$c||n.$c,audio:e.streams[o],video:n.streams[s],bandwidth:i,drmInfos:a,allowedByApplication:!0,allowedByKeySystem:!0},r.push(i)}}else for(a=e||n,o=0;o<a.streams.length;o++)i=a.streams[o].bandwidth||0,i={id:t.h++,language:a.language||"und",primary:a.$c,audio:e?a.streams[o]:null,video:n?a.streams[o]:null,bandwidth:i,drmInfos:a.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},r.push(i)}function wi(t,e){0>t.s||t.i.R(Math.max(3,t.s-e,z(t.u)))}function Si(t,e,n){e=e||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,gd:null,audioSamplingRate:null},n=n||e.qa;var r=jr.yb,i=jr.Me,a=jr.P(t,"BaseURL").map(jr.ic),o=t.getAttribute("contentType")||e.contentType,s=t.getAttribute("mimeType")||e.mimeType,u=t.getAttribute("codecs")||e.codecs;i=jr.I(t,"frameRate",i)||e.frameRate;for(var l=t.getAttribute("par")||e.pixelAspectRatio,c=jr.P(t,"InbandEventStream"),d=e.emsgSchemeIdUris.slice(),h=(c=f(c)).next();!h.done;h=c.next())h=h.value.getAttribute("schemeIdUri"),d.includes(h)||d.push(h);return c=function(t){for(var e=0;e<t.length;++e){var n=t[e],r=n.getAttribute("schemeIdUri");if(r&&(n=n.getAttribute("value")))switch(r){case"urn:mpeg:dash:outputChannelPositionList:2012":return n.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(r=parseInt(n,10)))continue;return r;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(r=parseInt(n,16)){for(t=0;r;)1&r&&++t,r>>=1;return t}}}return null}(c=jr.P(t,"AudioChannelConfiguration"))||e.gd,h=jr.I(t,"audioSamplingRate",r)||e.audioSamplingRate,o||(o=Ci(s,u)),{qa:Ge(n,a),Ub:jr.gc(t,"SegmentBase")||e.Ub,La:jr.gc(t,"SegmentList")||e.La,Wb:jr.gc(t,"SegmentTemplate")||e.Wb,width:jr.I(t,"width",r)||e.width,height:jr.I(t,"height",r)||e.height,contentType:o,mimeType:s,codecs:u,frameRate:i,pixelAspectRatio:l,emsgSchemeIdUris:d,id:t.getAttribute("id"),gd:c,audioSamplingRate:h}}function ki(t,e,n,r){return(e=Nt(e=Ge(e,[n]),t.a.retryParameters)).method=r,e=t.b.networkingEngine.request(4,e),Pt(t.g,e),e.promise.then((function(t){if("HEAD"==r){if(!t.headers||!t.headers.date)return 0;t=t.headers.date}else t=oe(t.data);return t=Date.parse(t),isNaN(t)?0:t-Date.now()}))}function Ci(t,e){return gn(qt(t,e))?"text":t.split("/")[0]}function Li(t,e,n,r){this.b=t,this.type=e,this.a=n,this.segments=r||null}function xi(t,e,n,r){this.id=t,this.name=e,this.a=n,this.value=void 0===r?null:r}function Ri(t,e){this.name=t,this.value=e}function Ii(t,e,n){return(t=t.getAttribute(e))?t.value:n||null}function Pi(t,e){this.b=e,this.a=t}V("shaka.media.ManifestParser.registerParserByExtension",yi.pd),yi.Cb=function(t,e){yi.zb[t]=e},V("shaka.media.ManifestParser.registerParserByMime",yi.Cb),yi.Sf=function(){var t={};if(Qt()){for(var e in yi.zb)t[e]=!0;for(var n in yi.Sb)t[n]=!0}e={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};for(var r=(n=f(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!r.done;r=n.next())t[r=r.value]=Qt()?!!yi.zb[r]:Zt(r);for(var i in e)t[i]=Qt()?!!yi.Sb[i]:Zt(e[i]);return t},yi.create=function(t,e,n,r){return p((function i(){var a,o;return N(i,(function(i){switch(i.j){case 1:return k(i,2),w(i,yi.Ue(t,e,n,r),4);case 4:return a=i.o,i.return(new a);case 2:throw(o=x(i)).severity=2,o}}))}))},yi.Ue=function(t,e,n,r){return p((function i(){var a,o,s,u,l;return N(i,(function(i){switch(i.j){case 1:if(a=yi,r&&(o=a.zb[r.toLowerCase()]))return i.return(o);if((s=a.getExtension(t))&&(u=a.Sb[s]))return i.return(u);if(r){i.A(2);break}return w(i,a.bf(t,e,n),3);case 3:if((r=i.o)&&(l=yi.zb[r]))return i.return(l);case 2:throw new gt(2,4,4e3,t)}}))}))},yi.bf=function(t,e,n){return p((function r(){var i,a,o;return N(r,(function(r){switch(r.j){case 1:return(i=Nt([t],n)).method="HEAD",w(r,e.request(0,i).promise,2);case 2:return a=r.o,o=a.headers["content-type"],r.return(o?o.toLowerCase().split(";").shift():"")}}))}))},yi.getExtension=function(t){return 1==(t=new Q(t).ja.split("/").pop().split(".")).length?"":t.pop().toLowerCase()},yi.isSupported=function(t,e){return!!Qt()&&(e in yi.zb||yi.getExtension(t)in yi.Sb)},V("shaka.media.PresentationTimeline",vi),vi.prototype.Y=function(){return this.g},vi.prototype.getDuration=vi.prototype.Y,vi.prototype.$e=function(){return this.a},vi.prototype.getMaxSegmentDuration=vi.prototype.$e,vi.prototype.xa=function(t){this.g=t},vi.prototype.setDuration=vi.prototype.xa,vi.prototype.hf=function(){return this.f},vi.prototype.getPresentationStartTime=vi.prototype.hf,vi.prototype.pe=function(t){this.l=t},vi.prototype.setClockOffset=vi.prototype.pe,vi.prototype.Xb=function(t){this.m=t},vi.prototype.setStatic=vi.prototype.Xb,vi.prototype.xd=function(t){this.h=t},vi.prototype.setSegmentAvailabilityDuration=vi.prototype.xd,vi.prototype.ig=function(t){this.vc=t},vi.prototype.setDelay=vi.prototype.ig,vi.prototype.Se=function(){return this.vc},vi.prototype.getDelay=vi.prototype.Se,vi.prototype.vb=function(t,e){if(0!=t.length){var n=t[t.length-1].endTime+e;this.fd(t[0].startTime+e),this.a=t.reduce((function(t,e){return Math.max(t,e.endTime-e.startTime)}),this.a),this.b=Math.max(this.b,n),null!=this.f&&this.s&&(this.f=(Date.now()+this.l)/1e3-this.b-this.a)}},vi.prototype.notifySegments=vi.prototype.vb,vi.prototype.fd=function(t){this.c=null==this.c?t:Math.min(this.c,t)},vi.prototype.notifyMinSegmentStartTime=vi.prototype.fd,vi.prototype.ed=function(t){this.a=Math.max(this.a,t)},vi.prototype.notifyMaxSegmentDuration=vi.prototype.ed,vi.prototype.offset=function(t){null!=this.c&&(this.c+=t),null!=this.b&&(this.b+=t)},vi.prototype.offset=vi.prototype.offset,vi.prototype.V=function(){return 1/0==this.g&&!this.m},vi.prototype.isLive=vi.prototype.V,vi.prototype.Xa=function(){return 1/0!=this.g&&!this.m},vi.prototype.isInProgress=vi.prototype.Xa,vi.prototype.Ob=function(){if(1/0==this.h)return this.i;var t=this.pb()-this.h;return Math.max(this.i,t)},vi.prototype.getSegmentAvailabilityStart=vi.prototype.Ob,vi.prototype.qe=function(t){this.i=t},vi.prototype.setUserSeekStart=vi.prototype.qe,vi.prototype.pb=function(){return this.V()||this.Xa()?Math.min(Math.max(0,(Date.now()+this.l)/1e3-this.a-this.f),this.g):this.g},vi.prototype.getSegmentAvailabilityEnd=vi.prototype.pb,vi.prototype.Nb=function(t){var e=Math.max(this.c,this.i);if(1/0==this.h)return e;var n=this.pb()-this.h;return t=Math.min(n+t,this.Ca()),Math.max(e,t)},vi.prototype.getSafeSeekRangeStart=vi.prototype.Nb,vi.prototype.ob=function(){return this.Nb(0)},vi.prototype.getSeekRangeStart=vi.prototype.ob,vi.prototype.Ca=function(){var t=this.V()||this.Xa()?this.vc:0;return Math.max(0,this.pb()-t)},vi.prototype.getSeekRangeEnd=vi.prototype.Ca,vi.prototype.ue=function(){return!(null==this.f||null!=this.b&&this.s)},vi.prototype.usingPresentationStartTime=vi.prototype.ue,V("shaka.dash.DashParser",bi),(r=bi.prototype).configure=function(t){this.a=t},r.start=function(t,e){var n=this;return p((function r(){var i;return N(r,(function(r){switch(r.j){case 1:return n.f=[t],n.b=e,w(r,Ai(n),2);case 2:if(i=r.o,n.b&&wi(n,i),!n.b)throw new gt(2,7,7001);return r.return(n.c)}}))}))},r.stop=function(){return this.a=this.b=null,this.f=[],this.c=null,this.l=[],this.m={},null!=this.i&&(this.i.stop(),this.i=null),this.g.destroy()},r.update=function(){Ai(this).catch(function(t){this.b&&this.b.onError(t)}.bind(this))},r.onExpirationUpdated=function(){},r.Nf=function(t,e){if(t.aa=Si(e,t.ka,null),"image"==t.aa.contentType)return null;var n=!1,r=jr.P(e,"Role"),i=r.map((function(t){return t.getAttribute("value")})).filter(Ve.Ia),a=void 0,o="text"==t.aa.contentType;o&&(a="subtitle");for(var s=0;s<r.length;s++){var u=r[s].getAttribute("schemeIdUri");if(null==u||"urn:mpeg:dash:role:2011"==u)switch(u=r[s].getAttribute("value"),u){case"main":n=!0;break;case"caption":case"subtitle":a=u}}var l=null,c=!1;jr.P(e,"EssentialProperty").forEach((function(t){"http://dashif.org/guidelines/trickmode"==t.getAttribute("schemeIdUri")?l=t.getAttribute("value"):c=!0})),s=jr.P(e,"Accessibility");var d=new Map;for(r={},u=(s=f(s)).next();!u.done;r={Ib:r.Ib},u=s.next()){var h=u.value;u=h.getAttribute("schemeIdUri"),h=h.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==u||"urn:scte:dash:cc:cea-708:2015"==u?(r.Ib=1,null!=h?h.split(";").forEach(function(t){return function(e){if(e.includes("=")){var n=(e=e.split("="))[0].startsWith("CC")?e[0]:"CC"+e[0];e=e[1].split(",")[0].split(":").pop()}else n="CC"+t.Ib,t.Ib+=2;d.set(n,Dn(e))}}(r)):d.set("CC1","und")):"urn:mpeg:dash:role:2011"==u&&null!=h&&(i.push(h),"captions"==h&&(a="caption"))}if(c)return null;var p=Vr(r=jr.P(e,"ContentProtection"),this.a.dash.customScheme,this.a.dash.ignoreDrmInfo);if(r=Dn(e.getAttribute("lang")||"und"),s=e.getAttribute("label"),(u=jr.P(e,"Label"))&&u.length&&(u=u[0]).textContent&&(s=u.textContent),0==(i=(u=jr.P(e,"Representation")).map(this.Qf.bind(this,t,p,a,r,s,n,i,d)).filter((function(t){return!!t}))).length){if(this.a.dash.ignoreEmptyAdaptationSet||o)return null;throw new gt(2,4,4003)}return t.aa.contentType&&"application"!=t.aa.contentType||(t.aa.contentType=Ci(i[0].mimeType,i[0].codecs),i.forEach((function(e){e.type=t.aa.contentType}))),i.forEach((function(t){p.drmInfos.forEach((function(e){t.keyId&&e.keyIds.push(t.keyId)}))})),o=u.map((function(t){return t.getAttribute("id")})).filter(Ve.Ia),{id:t.aa.id||"__fake__"+this.h++,contentType:t.aa.contentType,language:r,$c:n,streams:i,drmInfos:p.drmInfos,Bd:l,Yf:o}},r.Qf=function(t,e,n,r,i,a,o,s,u){if(t.C=Si(u,t.aa,null),!function(t){var e=t.Ub?1:0;return e+=t.La?1:0,0==(e+=t.Wb?1:0)?"text"==t.contentType||"application"==t.contentType:(1!=e&&(t.Ub&&(t.La=null),t.Wb=null),!0)}(t.C))return null;t.bandwidth=jr.I(u,"bandwidth",jr.tc)||0;var l=t.C.contentType;l="text"==l||"application"==l;try{var c=this.Zf.bind(this);if(t.C.Ub)var d=function(t,e){var n=Number(Wr(t,di,"presentationTimeOffset"))||0,r=Wr(t,di,"timescale"),i=1;r&&(i=jr.tc(r)||1),n=n/i||0,r=li(t,di);var a=t.C.contentType;if(i=t.C.mimeType.split("/")[1],"text"!=a&&"mp4"!=i&&"webm"!=i)throw new gt(2,4,4006);if("webm"==i&&!r)throw new gt(2,4,4005);a=qr(t,di,"RepresentationIndex");var o=Wr(t,di,"indexRange"),s=t.C.qa;if(o=jr.uc(o||""),a){var u=a.getAttribute("sourceURL");u&&(s=Ge(t.C.qa,[u])),o=jr.I(a,"range",jr.uc,o)}if(!o)throw new gt(2,4,4002);return{createSegmentIndex:(i=ci(t,e,r,s,o.start,o.end,i,n)).createSegmentIndex,findSegmentPosition:i.findSegmentPosition,getSegmentReference:i.getSegmentReference,initSegmentReference:r,ma:n}}(t,c);else if(t.C.La)d=fi(t,this.m);else if(t.C.Wb)d=pi(t,c,this.m,!!this.c);else{var f=t.C.qa,h=t.T.duration||0;d={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(t){return 0<=t&&t<h?1:null},getSegmentReference:function(t){return 1!=t?null:new Qr(1,0,h,(function(){return f}),0,null)},initSegmentReference:null,ma:0}}}catch(t){if(l&&4002==t.code)return null;throw t}return u=function(t,e,n,r){var i=Vr(t,e,r);if(n.Pd)t=1==n.drmInfos.length&&!n.drmInfos[0].keySystem,e=0==i.drmInfos.length,(0==n.drmInfos.length||t&&!e)&&(n.drmInfos=i.drmInfos),n.Pd=!1;else if(0<i.drmInfos.length&&(n.drmInfos=n.drmInfos.filter((function(t){return i.drmInfos.some((function(e){return e.keySystem==t.keySystem}))})),0==n.drmInfos.length))throw new gt(2,4,4008);return i.Kd||n.Kd}(u=jr.P(u,"ContentProtection"),this.a.dash.customScheme,e,this.a.dash.ignoreDrmInfo),{id:this.h++,originalId:t.C.id,createSegmentIndex:d.createSegmentIndex,findSegmentPosition:d.findSegmentPosition,getSegmentReference:d.getSegmentReference,initSegmentReference:d.initSegmentReference,presentationTimeOffset:d.ma,mimeType:t.C.mimeType,codecs:t.C.codecs,frameRate:t.C.frameRate,pixelAspectRatio:t.C.pixelAspectRatio,bandwidth:t.bandwidth,width:t.C.width,height:t.C.height,kind:n,encrypted:0<e.drmInfos.length,keyId:u,language:r,label:i,type:t.aa.contentType,primary:a,trickModeVideo:null,emsgSchemeIdUris:t.C.emsgSchemeIdUris,roles:o,channelsCount:t.C.gd,audioSamplingRate:t.C.audioSamplingRate,closedCaptions:s}},r.Pf=function(t,e,n){var r=jr.yb,i=n.getAttribute("schemeIdUri")||"",a=n.getAttribute("value")||"",o=jr.I(n,"timescale",r)||1;jr.P(n,"Event").forEach(function(n){var s=jr.I(n,"presentationTime",r)||0,u=jr.I(n,"duration",r)||0;u=(s=s/o+t)+u/o,null!=e&&(s=Math.min(s,t+e),u=Math.min(u,t+e)),n={schemeIdUri:i,value:a,startTime:s,endTime:u,id:n.getAttribute("id")||"",eventElement:n},this.b.onTimelineRegionAdded(n)}.bind(this))},r.Zf=function(t,e,n){return t=mi(t,e,n,this.a.retryParameters),t=this.b.networkingEngine.request(1,t),Pt(this.g,t),t.promise.then((function(t){return t.data}))},yi.pd("mpd",bi),yi.Cb("application/dash+xml",bi),yi.Cb("video/vnd.mpeg.dash.mpd",bi),xi.prototype.toString=function(){var t="#"+this.name,e=this.a?this.a.map((function(t){return t.name+"="+(isNaN(Number(t.value))?'"'+t.value+'"':t.value)})):[];return this.value&&e.unshift(this.value),0<e.length&&(t+=":"+e.join(",")),t},xi.prototype.getAttribute=function(t){var e=this.a.filter((function(e){return e.name==t}));return e.length?e[0]:null};var Oi={nb:function(t,e){return t.filter((function(t){return t.name==e}))},Ta:function(t,e){var n=Oi.nb(t,e);return n.length?n[0]:null},Pc:function(t,e,n){return t.filter((function(t){var r=t.getAttribute("TYPE");return t=t.getAttribute("GROUP-ID"),r.value==e&&t.value==n}))},Hc:function(t,e){return Ge([t],[e])[0]},Yc:function(t){return/^#(?!EXT)/m.test(t)}};function Di(t){this.b=t,this.a=0}function Mi(t){Ni(t,/[ \t]+/gm)}function Ni(t,e){e.lastIndex=t.a;var n=e.exec(t.b);return n=null==n?null:{position:n.index,length:n[0].length,ag:n},t.a==t.b.length||null==n||n.position!=t.a?null:(t.a+=n.length,n.ag)}function Ui(t){return t.a==t.b.length?null:(t=Ni(t,/[^ \t\n]*/gm))?t[0]:null}function Fi(){this.a=0}function Bi(t,e,n){var r=(e=(e=oe(e)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(r[0]))throw new gt(2,4,4015);e=0;for(var i=1;i<r.length;i++)if(!Oi.Yc(r[i])){var a=Ki(t,r[i]);if(--t.a,Vi.includes(a.name)){e=1;break}"EXT-X-STREAM-INF"==a.name&&(i+=1)}for(i=[],a=1;a<r.length;)if(Oi.Yc(r[a]))a+=1;else{var o=Ki(t,r[a]);if(Gi.includes(o.name)){if(1!=e)throw new gt(2,4,4017);return new Li(n,e,i,t=ji(t,n,r=r.splice(a,r.length-a),i))}i.push(o),a+=1,"EXT-X-STREAM-INF"==o.name&&(o.a.push(new Ri("URI",r[a])),a+=1)}return new Li(n,e,i)}function ji(t,e,n,r){var i=[],a=[];return n.forEach((function(n){if(/^(#EXT)/.test(n))n=Ki(t,n),Vi.includes(n.name)?r.push(n):a.push(n);else{if(Oi.Yc(n))return[];n=Oi.Hc(e,n.trim()),i.push(new Pi(n,a)),a=[]}})),i}function Ki(t,e){var n=t.a++,r=e.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!r)throw new gt(2,4,4016,e);var i,a=r[1],o=r[2];if(r=[],o){var s;(s=Ni(o=new Di(o),/^([^,=]+)(?:,|$)/g))&&(i=s[1]);for(var u=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;s=Ni(o,u);)r.push(new Ri(s[1],s[2]||s[3]))}return new xi(n,a,r,i)}var Vi="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),Gi="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function Hi(t){try{var e=Hi.parse(t);return At({uri:t,ld:t,data:e.data,headers:{"content-type":e.contentType}})}catch(t){return mt(t)}}function Yi(){var t=this;this.a=this.f=null,this.$=1,this.D=new Map,this.S=new Set,this.b=new Map,this.c=null,this.u="",this.s=new Fi,this.O=0,this.h=new ft((function(){!function(t){p((function e(){var n,r;return N(e,(function(e){switch(e.j){case 1:return t.f?(k(e,2),w(e,t.update(),4)):e.return();case 4:n=t.O,t.h.R(n),L(e,0);break;case 2:if(r=x(e),!t.f)return e.return();r.severity=1,t.f.onError(r),t.h.R(.1),S(e)}}))}))}(t)})),this.g=da,this.m=null,this.B=0,this.F=1/0,this.i=new It,this.K=[],this.l=new Map,this.W=!1}function zi(t,e){return p((function n(){var r,i,a,o,s,u,l,c,d,f;return N(n,(function(n){switch(n.j){case 1:return r=Oi,i=fa,a=e.Ce,w(n,la(t,Nt([a],t.a.retryParameters),0),2);case 2:if(o=n.o,1!=(s=Bi(t.s,o.data,o.uri)).type)throw new gt(2,4,4017);return l=(u=r.Ta(s.a,"EXT-X-MEDIA-SEQUENCE"))?Number(u.value):0,c=e.stream,w(n,ta(t,e.Bc,s,l,c.mimeType,c.codecs),3);case 3:d=n.o,e.Vb.a=d,f=d[d.length-1],r.Ta(s.a,"EXT-X-ENDLIST")&&(ua(t,i.Qa),t.c.xa(f.endTime)),S(n)}}))}))}function $i(t){t.forEach((function(t){if(t){var e=t.stream.codecs.split(",");e=e.filter((function(t){return"mp4a.40.34"!=t})),t.stream.codecs=e.join(",")}}))}function Wi(t,e,n,r,i){return{id:t.$++,language:e?e.language:"und",primary:!!e&&e.primary||!!n&&n.primary,audio:e,video:n,bandwidth:r,drmInfos:i,allowedByApplication:!0,allowedByKeySystem:!0}}function qi(t,e,n){return p((function r(){var i,a,o,s,u,l,c,d,f;return N(r,(function(r){switch(r.j){case 1:if(i=ra(e,"URI"),t.b.has(i))return r.return(t.b.get(i));if(a=ra(e,"TYPE").toLowerCase(),o=Ye,"subtitles"==a&&(a=o.ra),s=Dn(Ii(e,"LANGUAGE","und")),u=Ii(e,"NAME"),l=e.getAttribute("DEFAULT"),c=e.getAttribute("AUTOSELECT"),d=Ii(e,"CHANNELS"),"audio"==a)if(d){var h=d.split("/")[0];h=parseInt(h,10)}else h=null;else h=null;return w(r,Xi(t,i,n,a,s,!!l||!!c,u,h,null),2);case 2:return f=r.o,t.b.has(i)?r.return(t.b.get(i)):null==f?r.return(null):(t.D.set(e.id,f),t.b.set(i,f),r.return(f))}}))}))}function Xi(t,e,n,r,i,a,o,s,u){return p((function l(){var c,d,h,g,y,v,m,b,A,_,E,T,S,C,R,I,P,O,D,M,U,F,B,j,K,V;return N(l,(function(l){switch(l.j){case 1:return d=(c=Oi).Hc(t.u,e),w(l,la(t,Nt([d],t.a.retryParameters),0),2);case 2:if(h=l.o,d=h.uri,1!=(g=Bi(t.s,h.data,d)).type)throw new gt(2,4,4017);y=[],g.segments.forEach((function(t){t=c.nb(t.b,"EXT-X-KEY"),y.push.apply(y,t)})),v=!1,m=[],b=null;for(var G=f(y),H=G.next();!H.done;H=G.next())if(A=H.value,"NONE"!=(_=ra(A,"METHOD"))){if(v=!0,"AES-128"==_)return t.W=!0,l.return(null);E=ra(A,"KEYFORMAT"),(S=(T=ca[E])?T(A):null)&&(S.keyIds.length&&(b=S.keyIds[0]),m.push(S))}if(v&&!m.length)throw new gt(2,4,4026);return function(t,e){var n=fa,r=Oi.Ta(e.a,"EXT-X-PLAYLIST-TYPE"),i=Oi.Ta(e.a,"EXT-X-ENDLIST");i=r&&"VOD"==r.value||i,r=r&&"EVENT"==r.value&&!i,r=!i&&!r,i?ua(t,n.Qa):(ua(t,r?n.Fd:n.xe),n=ia(e.a,"EXT-X-TARGETDURATION"),n=Number(n.value),t.B=Math.max(n,t.B),t.F=Math.min(n,t.F))}(t,g),C=function(t,e){if(1==e.length)return e[0];var n=na(t,e);if(null!=n)return n;throw new gt(2,4,4025,e)}(r,n),w(l,function(t,e,n,r){return p((function i(){var a,o,s,u,l,c,d,f,h;return N(i,(function(i){switch(i.j){case 1:return a=Ye,o=r.segments[0].a,s=new Q(o),u=s.ja.split(".").pop(),l=sa[e],(c=l[u])?i.return(c):e==a.ra?n&&"vtt"!=n?i.return("application/mp4"):i.return("text/vtt"):((d=Nt([o],t.a.retryParameters)).method="HEAD",w(i,la(t,d,1),2));case 2:if(f=i.o,!(h=f.headers["content-type"]))throw new gt(2,4,4021,u);return i.return(h.split(";")[0])}}))}))}(t,r,C,g),3);case 3:return R=l.o,oa.includes(R)&&(C=""),P=(I=c.Ta(g.a,"EXT-X-MEDIA-SEQUENCE"))?Number(I.value):0,k(l,4),w(l,ta(t,e,g,P,R,C),6);case 6:O=l.o,L(l,5);break;case 4:if(4035==(D=x(l)).code)return q("Skipping unsupported HLS stream",R,e),l.return(null);throw D;case 5:return M=O[0].startTime,U=O[O.length-1].endTime,F=U-M,B=new ti(O),j=Ji(g),K=void 0,"text"==r&&(K="subtitle"),V={id:t.$++,originalId:o,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:B.find.bind(B),getSegmentReference:B.get.bind(B),initSegmentReference:j,presentationTimeOffset:0,mimeType:R,codecs:C,kind:K,encrypted:v,keyId:b,language:i,label:o,type:r,primary:a,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:s,audioSamplingRate:null,closedCaptions:u},l.return({stream:V,Vb:B,drmInfos:m,Bc:e,Ce:d,dd:M,Hg:U,duration:F})}}))}))}function Ji(t){var e=Oi.nb(t.a,"EXT-X-MAP");if(!e.length)return null;if(1<e.length)throw new gt(2,4,4020);var n=ra(e=e[0],"URI"),r=Oi.Hc(t.b,n);return t=0,n=null,(e=Ii(e,"BYTERANGE"))&&(t=e.split("@"),e=Number(t[0]),n=(t=Number(t[1]))+e-1),new Jr((function(){return[r]}),t,n)}function Qi(t,e,n,r){var i=e.b,a=e.a;e=ia(i,"EXTINF").value.split(","),e=r+Number(e[0]);var o=0,s=null;return(i=Oi.Ta(i,"EXT-X-BYTERANGE"))&&(o=i.value.split("@"),i=Number(o[0]),s=(o=o[1]?Number(o[1]):t.a+1)+i-1),new Qr(n,r,e,(function(){return[a]}),o,s)}function Zi(t){t.c&&(t.K.forEach((function(e){t.c.vb(e,0)})),t.K=[])}function ta(t,e,n,r,i,a){return p((function o(){var s,u,l,c,d,f,h,g,y,v;return N(o,(function(o){switch(o.j){case 1:return s=n.segments,u=[],l=s[0].a,c=Qi(null,s[0],r,0),d=Ji(n),w(o,function(t,e,n,r,i,a){return p((function o(){var s,u,l,c,d,f,h,p,g;return N(o,(function(o){switch(o.j){case 1:if(t.m&&(s=t.b.get(e),u=s.Vb,l=u.get(r.position)))return o.return(l.startTime);if(i=i.toLowerCase(),oa.includes(i))throw q("Raw formats are not yet supported. Skipping "+i),new gt(1,4,4035);if("video/webm"==i)throw q("WebM in HLS is not yet supported. Skipping."),new gt(1,4,4035);if("video/mp4"!=i&&"audio/mp4"!=i){o.A(2);break}return c=[ea(t,r)],n&&c.push(ea(t,n)),w(o,Promise.all(c),3);case 3:return d=o.o,f=d[0],h=d[1]||d[0],o.return(function(t,e,n,r){var i=0;if((new Or).H("moov",Dr).H("trak",Dr).H("mdia",Dr).fa("mdhd",(function(t){t.reader.M(0==t.version?8:16),i=t.reader.G(),t.parser.stop()})).parse(r,!0),!i)throw new gt(2,4,4030,t,e);var a=0,o=!1;if((new Or).H("moof",Dr).H("traf",Dr).fa("tfdt",(function(t){a=(0==t.version?t.reader.G():t.reader.Bb())/i,o=!0,t.parser.stop()})).parse(n,!0),!o)throw new gt(2,4,4030,t,e);return a}(e,f.uri,f.data,h.data));case 2:if("video/mp2t"!=i){o.A(4);break}return w(o,ea(t,r),5);case 5:return p=o.o,o.return(function(t,e,n){function r(){throw new gt(2,4,4030,t,e)}n=new Rr(new DataView(n),0);for(var i=0,a=0;;){if(i=n.ca(),71!=(a=n.la())&&r(),16384&n.Tb()||r(),0!=(a=(48&n.la())>>4)&&2!=a||r(),3==a&&(a=n.la(),n.M(a)),1==n.G()>>8)return n.M(3),0!=(i=n.la()>>6)&&1!=i||r(),0==n.la()&&r(),i=n.la(),a=n.Tb(),n=n.Tb(),(1073741824*((14&i)>>1)+((65534&a)<<14|(65534&n)>>1))/9e4;n.seek(i+188),71!=(a=n.la())&&(n.seek(i+192),a=n.la()),71!=a&&(n.seek(i+204),a=n.la()),71!=a&&r(),n.me(1)}}(e,p.uri,p.data));case 4:if("application/mp4"!=i&&!i.startsWith("text/")){o.A(6);break}return w(o,ea(t,r),7);case 7:return g=o.o,o.return(function(t,e,n){return gn(t=qt(t,e))?(yn(e=new hn(null),t),e.kc(n)):0}(i,a,g.data));case 6:throw new gt(2,4,4030,e)}}))}))}(t,e,d,c,i,a),2);case 2:f=o.o,l.split("/").pop();for(var m=0;m<s.length;++m)h=s[m],g=u[u.length-1],y=0==m?f:g.endTime,v=Qi(g,h,r+m,y),u.push(v);return t.K.push(u),Zi(t),o.return(u)}}))}))}function ea(t,e){return p((function n(){var r,i,a,o,s,u;return N(n,(function(n){switch(n.j){case 1:return r=1,i=mi(e.c(),e.b,e.b+2048-1,t.a.retryParameters),a=mi(e.c(),e.b,e.a,t.a.retryParameters),k(n,2),w(n,la(t,i,r),4);case 4:return o=n.o,n.return(o);case 2:if(7001==(s=x(n)).code)throw s;return q("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",i.uris[0]),w(n,la(t,a,r),5);case 5:return u=n.o,n.return(u)}}))}))}function na(t,e){for(var n=aa[t],r=0;r<n.length;r++)for(var i=0;i<e.length;i++)if(n[r].test(e[i].trim()))return e[i].trim();return"text"==t?"":null}function ra(t,e){var n=t.getAttribute(e);if(!n)throw new gt(2,4,4023,e);return n.value}function ia(t,e){var n=Oi.Ta(t,e);if(!n)throw new gt(2,4,4024,e);return n}V("shaka.net.DataUriPlugin",Hi),Hi.parse=function(e){var n=e.split(":");if(2>n.length||"data"!=n[0])throw new gt(2,1,1004,e);if(2>(n=n.slice(1).join(":").split(",")).length)throw new gt(2,1,1004,e);var r=n[0];n=t.decodeURIComponent(n.slice(1).join(","));var i=null;if(1<(r=r.split(";")).length&&(i=r[1]),"base64"==i)e=he.Ba(n).buffer;else{if(i)throw new gt(2,1,1005,e);e=le(n)}return{data:e,contentType:r[0]}},Mt("data",Hi),V("shaka.hls.HlsParser",Yi),(r=Yi.prototype).configure=function(t){this.a=t},r.start=function(t,e){var n=this;return p((function r(){var i,a;return N(r,(function(r){switch(r.j){case 1:return n.f=e,w(r,la(n,Nt([t],n.a.retryParameters),0),2);case 2:return i=r.o,n.u=i.uri,w(r,function(t,e){return p((function n(){var r,i,a,o,s,u,l,c,d,h,g;return N(n,(function(n){switch(n.j){case 1:if(0!=(r=Bi(t.s,e,t.u)).type)throw new gt(2,4,4022);return w(n,function(t,e){return p((function n(){var r,i,a,o,s,u,l,c,d,h,g,y;return N(n,(function(n){switch(n.j){case 1:return r=Oi,i=Ve,a=e.a,o=r.nb(e.a,"EXT-X-MEDIA"),s=o.filter(function(t){return"SUBTITLES"==ra(t,"TYPE")}.bind(t)),u=s.map(function(t){var e=this;return p((function n(){var r;return N(n,(function(n){switch(n.j){case 1:return e.a.disableText?n.return(null):(k(n,2),w(n,function(t,e){return p((function n(){var r;return N(n,(function(n){switch(n.j){case 1:return ra(e,"TYPE"),w(n,qi(t,e,[]),2);case 2:return r=n.o,n.return(r.stream)}}))}))}(e,t),4));case 4:return n.return(n.o);case 2:if(r=x(n),e.a.hls.ignoreTextStreamFailures)return n.return(null);throw r}}))}))}.bind(t)),l=o.filter((function(t){return"CLOSED-CAPTIONS"==ra(t,"TYPE")})),function(t,e){for(var n=f(e),r=n.next();!r.done;r=n.next()){ra(r=r.value,"TYPE");var i=Ii(r,"LANGUAGE")||"und";i=Dn(i);var a=ra(r,"GROUP-ID");r=ra(r,"INSTREAM-ID"),t.l.get(a)||t.l.set(a,new Map),t.l.get(a).set(r,i)}}(t,l),w(n,Promise.all(u),2);case 2:return c=n.o,d=r.nb(a,"EXT-X-STREAM-INF"),h=d.map(function(t){return function(t,e,n){return p((function r(){var i,a,o,s,u,l,c,d,h,g,y,v,m,b,A,_,E,T,S,k,C,L,x,R,I,P,O;return N(r,(function(r){switch(r.j){case 1:return i=Ye,a=Oi,o=Ii(e,"CODECS","avc1.42E01E,mp4a.40.2"),s=function(t){for(var e=new Set,n=[],r=(t=f(t)).next();!r.done;r=t.next()){var i=Xt(r=r.value)[0];e.has(i)||(n.push(r),e.add(i))}return n}(o.split(/\s*,\s*/)),u=e.getAttribute("RESOLUTION"),c=l=null,d=Ii(e,"FRAME-RATE"),h=Number(ra(e,"BANDWIDTH")),u&&(g=u.value.split("x"),l=g[0],c=g[1]),y=(y=(y=a.nb(n.a,"EXT-X-MEDIA")).filter((function(t){return"CLOSED-CAPTIONS"!=ra(t,"TYPE")}))).filter((function(t){var e=Ii(t,"URI")||"";return"SUBTITLES"==(Ii(t,"TYPE")||"")||""!=e})),v=Ii(e,"AUDIO"),m=Ii(e,"VIDEO"),v?y=a.Pc(y,"AUDIO",v):m&&(y=a.Pc(y,"VIDEO",m)),(b=na(i.ra,s))&&((A=Ii(e,"SUBTITLES"))&&(_=a.Pc(y,"SUBTITLES",A)).length&&(E=t.D.get(_[0].id))&&(E.stream.codecs=b),xt(s,b)),T=y.map(function(t){return qi(this,t,s)}.bind(t)),S=[],k=[],w(r,Promise.all(T),2);case 2:if(L=(L=r.o).filter((function(t){return null!=t})),v?S=L:m&&(k=L),R=!1,S.length||k.length?S.length?(P=ra(e,"URI"),O=S[0].Bc,P==O?(x=i.Eb,R=!0):x=i.Pa):x=i.Eb:1==s.length?(I=na(i.Pa,s),x=u||d||I?i.Pa:i.Eb):(x=i.Pa,s=[s.join(",")]),R){r.A(3);break}return w(r,function(t,e,n,r){return p((function i(){var a,o,s,u,l;return N(i,(function(i){switch(i.j){case 1:return a=Ye,o=ra(e,"URI"),t.b.has(o)?i.return(t.b.get(o)):(s=Ii(e,"CLOSED-CAPTIONS"),u=null,r==a.Pa&&s&&"NONE"!=s&&(u=t.l.get(s)),w(i,Xi(t,o,n,r,"und",!1,null,null,u),2));case 2:return null==(l=i.o)?i.return(null):t.b.has(o)?i.return(t.b.get(o)):(t.b.set(o,l),i.return(l))}}))}))}(t,e,s,x),4);case 4:C=r.o;case 3:if(C)C.stream.type==i.Eb?S=[C]:k=[C];else if(null===C)return r.return([]);return k&&$i(k),S&&$i(S),r.return(function(t,e,n,r,i,a,o){n.forEach(function(t){(t=t.stream)&&(t.width=Number(i)||void 0,t.height=Number(a)||void 0,t.frameRate=Number(o)||void 0)}.bind(t));var s=!!t.a&&t.a.disableAudio;e.length&&!s||(e=[null]),s=!!t.a&&t.a.disableVideo,(!n.length||s)&&(n=[null]),s=[];for(var u=(e=f(e)).next();!u.done;u=e.next()){u=u.value;for(var l=f(n),c=l.next();!c.done;c=l.next()){var d=c.value;c=u?u.stream:null;var h=d?d.stream:null,p=u?u.drmInfos:null,g=d?d.drmInfos:null;d=(d?d.Bc:"")+" - "+(u?u.Bc:"");var y=void 0;if(c&&h){if(p.length&&g.length&&!(0<Re(p,g).length))continue;y=Re(p,g)}else c?y=p:h&&(y=g);t.S.has(d)||(c=Wi(t,c,h,r,y),s.push(c),t.S.add(d))}}return s}(t,S,k,h,l,c,d))}}))}))}(this,t,e)}.bind(t)),w(n,Promise.all(h),3);case 3:return g=n.o,y=(y=g.reduce(i.Gc,[])).filter((function(t){return null!=t})),n.return({startTime:0,variants:y,textStreams:c.filter((function(t){return null!=t}))})}}))}))}(t,r),2);case 2:if(i=n.o,!t.f)throw new gt(2,7,7001);if(t.W&&0==i.variants.length)throw new gt(2,4,4034);t.f.filterAllPeriods([i]),a=1/0,o=0,s=1/0;for(var y=f(t.b.values()),v=y.next();!v.done;v=y.next())u=v.value,a=Math.min(a,u.dd),o=Math.max(o,u.dd),"text"!=u.stream.type&&(s=Math.min(s,u.duration));if(t.g!=fa.Qa?(t.c=new vi(0,3*t.B),t.c.Xb(!1)):(t.c=new vi(null,0),t.c.Xb(!0)),Zi(t),t.g!=fa.Qa){for(t.O=t.F,l=fa,t.g==l.Fd&&(c=t.c.vc,isNaN(t.a.availabilityWindowOverride)||(c=t.a.availabilityWindowOverride),t.c.xd(c)),d=0;95443.7176888889<=o;)d+=95443.7176888889,o-=95443.7176888889;if(d)for(v=(y=f(t.b.values())).next();!v.done;v=y.next())95443.7176888889>(h=v.value).dd&&(h.stream.presentationTimeOffset=-d,h.Vb.offset(d))}else for(t.c.xa(s),t.c.offset(-a),v=(y=f(t.b.values())).next();!v.done;v=y.next())(g=v.value).stream.presentationTimeOffset=a,g.Vb.offset(-a),ei(g.Vb,s);t.m={presentationTimeline:t.c,periods:[i],offlineSessionIds:[],minBufferTime:0},S(n)}}))}))}(n,i.data),3);case 3:return 0<(a=n.O)&&n.h.R(a),r.return(n.m)}}))}))},r.stop=function(){this.h&&(this.h.stop(),this.h=null);var t=[];return this.i&&(t.push(this.i.destroy()),this.i=null),this.a=this.f=null,this.D.clear(),this.S.clear(),this.b.clear(),this.m=null,Promise.all(t)},r.update=function(){if(this.g!=fa.Qa){for(var t=[],e=f(this.b.values()),n=e.next();!n.done;n=e.next())t.push(zi(this,n.value));return Promise.all(t)}},r.onExpirationUpdated=function(){};var aa={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},oa=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],sa={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};function ua(t,e){t.g=e,t.c&&t.c.Xb(t.g==fa.Qa),t.g!=fa.Qa||t.h.stop()}function la(t,e,n){if(!t.i)throw new gt(2,7,7001);return e=t.f.networkingEngine.request(n,e),Pt(t.i,e),e.promise}var ca={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(t){var e=ra(t,"METHOD");return Vn("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227"),["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].includes(e)?(e=ra(t,"URI"),e=Hi.parse(e),e=He("com.widevine.alpha",[{initDataType:"cenc",initData:e=new Uint8Array(e.data)}]),(t=Ii(t,"KEYID"))&&(e.keyIds=[t.substr(2).toLowerCase()]),e):null}},da="VOD",fa={Qa:da,xe:"EVENT",Fd:"LIVE"};function ha(){this.a=new Map}function pa(t,e,n){ga(t,e).text=n}function ga(t,e){return t.a.has(e)||t.a.set(e,new ya),t.a.get(e)}function ya(){this.text=this.variant=null}function va(t,e){this.a=t,this.b=new Set([t]);for(var n=f(e=e||[]),r=n.next();!r.done;r=n.next())this.add(r.value)}function ma(t,e){var n;if(!(n=!!t.audio!=!!e.audio||!!t.video!=!!e.video||t.language!=e.language)&&(n=t.audio&&e.audio)){n=t.audio;var r=e.audio;n=!(n.channelsCount==r.channelsCount&&ba(n,r)&&Aa(n.roles,r.roles))}return!n&&(n=t.video&&e.video)&&(n=!(ba(n=t.video,r=e.video)&&Aa(n.roles,r.roles))),!n}function ba(t,e){if(t.mimeType!=e.mimeType)return!1;var n=t.codecs.split(",").map((function(t){return Xt(t)[0]})),r=e.codecs.split(",").map((function(t){return Xt(t)[0]}));if(n.length!=r.length)return!1;n.sort(),r.sort();for(var i=0;i<n.length;i++)if(n[i]!=r[i])return!1;return!0}function Aa(t,e){var n=new Set(t),r=new Set(e);if(n.delete("main"),r.delete("main"),n.size!=r.size)return!1;for(var i=(n=f(n)).next();!i.done;i=n.next())if(!r.has(i.value))return!1;return!0}function _a(t){this.a=t,this.b=new Ea(t.language,"",t.audio&&t.audio.channelsCount?t.audio.channelsCount:0,"")}function Ea(t,e,n,r,i){this.f=t,this.c=e,this.a=n,this.b=void 0===r?"":r,this.g=void 0===i?"":i}function Ta(){this.a=ka,this.b=(new Map).set(ka,2).set(Sa,1)}function wa(t,e,n){t.b.set(ka,n).set(Sa,e)}yi.pd("m3u8",Yi),yi.Cb("application/x-mpegurl",Yi),yi.Cb("application/vnd.apple.mpegurl",Yi),va.prototype.add=function(t){return!!ma(this.a,t)&&(this.b.add(t),!0)},va.prototype.values=function(){return this.b.values()},_a.prototype.create=function(t){var e=this,n=t.filter((function(t){return ma(e.a,t)}));return n.length?new va(n[0],n):this.b.create(t)},Ea.prototype.create=function(t){var e=[];e=function(t,e){var n=Nn(Dn(e),t.map((function(t){return Mn(t)})));return n?t.filter((function(t){return n==Mn(t)})):[]}(t,this.f);var n=t.filter((function(t){return t.primary}));for(e=e.length?e:n.length?n:t,this.c&&(t=function(t,e,n){return t.filter((function(t){if(n){var r=t[n];return r&&r.roles.includes(e)}return r=t.audio,t=t.video,r&&0<=r.roles.indexOf(e)||t&&0<=t.roles.indexOf(e)}))}(e,this.c,this.g)).length&&(e=t),this.a&&(t=Fn.Nd(e,this.a)).length&&(e=t),this.b&&(t=function(t,e){return t.filter((function(t){return!!t.audio&&t.audio.label.toLowerCase()==e.toLowerCase()}))}(e,this.b)).length&&(e=t),t=new va(e[0]),n=(e=f(e)).next();!n.done;n=e.next())n=n.value,ma(t.a,n)&&t.add(n);return t};var Sa=0,ka=1;function Ca(t,e){this.g=t,this.h=xa(t),this.a=t.a.currentTime,this.f=Date.now()/1e3,this.b=!1,this.i=e,this.c=function(){}}function La(t){this.a=t}function xa(t){if(t.a.paused||0==t.a.playbackRate||null==t.a.buffered)var e=!1;else t:{e=t.a.buffered,t=t.a.currentTime;for(var n=0;n<e.length;n++){var r=e.start(n),i=e.end(n);if(!(t<r||t>i-.5)){e=!0;break t}}e=!1}return e}function Ra(t,e,n,r,i){var a=this;this.a=t,this.u=e,this.s=n,this.l=i,this.f=new jt,this.i=!1,this.m=t.readyState,this.c=!1,this.b=r,this.h=!1,this.f.w(t,"waiting",(function(){return Ia(a)})),this.g=new ft((function(){Ia(a)})).Na(.25)}function Ia(t){if(0!=t.a.readyState){if(t.a.seeking){if(!t.i)return}else t.i=!1;if(!t.a.paused){t.a.readyState!=t.m&&(t.c=!1,t.m=t.a.readyState);var e=t.s.smallGapLimit,n=t.a.currentTime,r=t.a.buffered;t:{if(r&&r.length&&!(1==r.length&&1e-6>r.end(0)-r.start(0)))for(var i=ne("Edge/")||ne("Trident/")||ne("Tizen")||ne("CrKey")?.5:.1,a=0;a<r.length;a++)if(r.start(a)>n&&(0==a||r.end(a-1)-n<=i)){i=a;break t}i=null}if(null==i)t.b&&(n=xa(r=(t=t.b).g),i=r.a.currentTime,a=Date.now()/1e3,t.a==i&&t.h==n||(t.f=a,t.a=i,t.h=n,t.b=!1),(i=a-t.f)>=t.i&&n&&!t.b&&(t.c(t.a,i),t.b=!0,t.a=r.a.currentTime));else if(0!=i||t.h){a=r.start(i);var o=t.u.Ca();if(!(a>=o)){e=(o=a-n)<=e;var s=!1;.001>o||(e||t.c||(t.c=!0,(n=new wt("largegap",{currentTime:n,gapSize:o})).cancelable=!0,t.l(n),t.s.jumpLargeGaps&&!n.defaultPrevented&&(s=!0)),!e&&!s)||(0!=i&&r.end(i-1),t.a.currentTime=a)}}}}}function Pa(t){var e=this;this.c=t,this.a=new Set,this.b=new ft((function(){Oa(e,!1)})).Na(.25)}function Oa(t,e){for(var n=f(t.a),r=n.next();!r.done;r=n.next())r.value.g(t.c.currentTime,e)}function Da(t){for(var e=[],n=(t=f(t)).next();!n.done;n=t.next())for(var r=(n=f(n.value.variants)).next();!r.done;r=n.next())e.push(r.value);return e}function Ma(t,e){for(var n=null,r=f(t),i=r.next();!i.done;i=r.next())e>=(i=i.value).startTime&&(n=i);return n}function Na(t){this.c=t,this.a=null,this.b=function(){}}function Ua(t){var e=this;this.a=t,this.f=!1,this.c=this.a.jc(),this.b=new ft((function(){e.a.Yd(.25*e.c)}))}function Fa(t){t.b.stop();var e=t.f?0:t.c;if(0<=e)try{return void(t.a.jc()!=e&&t.a.wd(e))}catch(t){}t.b.Na(.25),0!=t.a.jc()&&t.a.wd(0)}function Ba(t,e,n){this.a=t,this.f=e,this.g=n,this.h=!1,this.b=new jt,this.c=new Ha(t),0<t.readyState?Va(this,n):Ka(this,n)}function ja(t){return t.h?t.a.currentTime:t.g}function Ka(t,e){t.g=e,t.b.ea(t.a,"loadedmetadata"),t.b.da(t.a,"loadedmetadata",(function(){Va(t,e)}))}function Va(t,e){.001>Math.abs(t.a.currentTime-e)?Ga(t):(t.b.da(t.a,"seeking",(function(){Ga(t)})),Ya(t.c,0==t.a.currentTime?e:t.a.currentTime))}function Ga(t){t.h=!0,t.b.w(t.a,"seeking",(function(){return t.f()}))}function Ha(t){var e=this;this.b=t,this.h=10,this.g=this.f=this.c=0,this.a=new ft((function(){0>=e.c||e.b.currentTime!=e.f?e.a.stop():(e.b.currentTime=e.g,e.c--)}))}function Ya(t,e){t.f=t.b.currentTime,t.g=e,t.c=t.h,t.b.currentTime=e,t.a.Na(.1)}function za(t){function e(){null==n.c?n.f=!0:(n.b.da(n.a,"seeking",(function(){n.f=!0})),n.a.currentTime=Math.max(0,n.a.currentTime+n.c))}var n=this;this.a=t,this.f=!1,this.c=null,this.b=new jt,0==this.a.readyState?this.b.da(this.a,"loadeddata",e):e()}function $a(t,e,n,r,i,a){var o=this;this.b=t,this.a=e.presentationTimeline,this.B=e.minBufferTime||0,this.g=n,this.u=i,this.l=null,this.f=new Ra(t,e.presentationTimeline,n,function(t,e){if(!e.stallEnabled)return null;var n=e.stallSkip,r=new Ca(new La(t),e.stallThreshold);return function(t,e){t.c=e}(r,(function(){t.currentTime+=n})),r}(t,n),a),this.c=new Ba(t,(function(){var t=o.f;t.i=!0,t.h=!1,t.c=!1;var e=ja(o.c);return t=qa(o,e),.001<Math.abs(t-e)&&(e=(new Date).getTime()/1e3,!o.l||o.l<e-1)?(o.l=e,0<(e=o.c).a.readyState?Ya(e.c,t):Ka(e,t),t=void 0):(o.u(),t=void 0),t}),function(t,e){return null==e?e=1/0>t.a.Y()?t.a.ob():t.a.Ca():0>e&&(e=t.a.Ca()+e),Wa(t,Xa(t,e))}(this,r)),this.i=new ft((function(){if(0!=o.b.readyState&&!o.b.paused){var t=o.b.currentTime,e=o.a.ob(),n=o.a.Ca();3>n-e&&(e=n-3),t<e&&(t=qa(o,t),o.b.currentTime=t)}})).Na(.25)}function Wa(t,e){var n=t.a.Y();return e>=n?n-t.g.durationBackoff:e}function qa(t,e){var n=Be.bind(null,t.b.buffered),r=Math.max(t.B,t.g.rebufferingGoal),i=t.g.safeSeekOffset,a=t.a.ob(),o=t.a.Ca(),s=t.a.Y();3>o-a&&(a=o-3);var u=t.a.Nb(r),l=t.a.Nb(i);return r=t.a.Nb(r+i),e>=s?Wa(t,e):e>o?o:e<a?n(l)?l:r:e>=u||n(e)?e:r}function Xa(t,e){var n=t.a.ob();return e<n||e>(n=t.a.Ca())?n:e}function Ja(){this.b=function(){},this.a=new Set}function Qa(t){var e=this;this.h=t,this.f=new Map,this.a=function(){},this.b=function(){},this.c=function(){},this.i=[{eb:null,cb:to,Wa:function(t,n){return e.a(t,n)}},{eb:Za,cb:to,Wa:function(t,n){return e.a(t,n)}},{eb:eo,cb:to,Wa:function(t,n){return e.a(t,n)}},{eb:to,cb:Za,Wa:function(t,n){return e.b(t,n)}},{eb:to,cb:eo,Wa:function(t,n){return e.b(t,n)}},{eb:Za,cb:eo,Wa:function(t,n){return e.c(t,n)}},{eb:eo,cb:Za,Wa:function(t,n){return e.c(t,n)}}]}Ca.prototype.release=function(){this.g=null,this.c=function(){}},Ra.prototype.release=function(){this.f&&(this.f.release(),this.f=null),null!=this.g&&(this.g.stop(),this.g=null),this.b&&(this.b.release(),this.b=null),this.a=this.u=this.l=null},Ra.prototype.jd=function(){this.h=!0,Ia(this)},Pa.prototype.release=function(){this.b.stop();for(var t=f(this.a),e=t.next();!e.done;e=t.next())e.value.release();this.a.clear()},Na.prototype.release=function(){this.a=this.c=null,this.b=function(){}},Na.prototype.g=function(t){var e=this.a,n=this.c.periods;e!=(t=Ma(n,t)||n[0])&&this.b(t),this.a=t},Ua.prototype.release=function(){this.b&&(this.b.stop(),this.b=null),this.a=null},Ua.prototype.set=function(t){this.c=t,Fa(this)},Ba.prototype.release=function(){this.b&&(this.b.release(),this.b=null),null!=this.c&&(this.c.release(),this.c=null),this.f=function(){},this.a=null},Ha.prototype.release=function(){this.a&&(this.a.stop(),this.a=null),this.b=null},za.prototype.release=function(){this.b&&(this.b.release(),this.b=null),this.a=null},za.prototype.m=function(t){this.c=this.f?this.c:t},za.prototype.h=function(){return(this.f?this.a.currentTime:this.c)||0},za.prototype.s=function(){},$a.prototype.release=function(){this.c&&(this.c.release(),this.c=null),this.f&&(this.f.release(),this.f=null),this.i&&(this.i.stop(),this.i=null),this.b=this.c=this.a=this.g=null,this.u=function(){}},$a.prototype.m=function(t){var e=this.c;0<e.a.readyState?Ya(e.c,t):Ka(e,t)},$a.prototype.h=function(){var t=ja(this.c);return 0<this.b.readyState&&!this.b.paused?Xa(this,t):t},$a.prototype.s=function(){this.f.jd()},Ja.prototype.release=function(){this.b=function(){},this.a.clear()},Qa.prototype.release=function(){this.h=null,this.f.clear(),this.a=function(){},this.b=function(){},this.c=function(){}},Qa.prototype.g=function(t,e){for(var n=f(this.h.a),r=n.next();!r.done;r=n.next()){r=r.value;var i=this.f.get(r),a=t<r.startTime?Za:t>r.endTime?eo:to;this.f.set(r,a);for(var o=f(this.i),s=o.next();!s.done;s=o.next())(s=s.value).eb==i&&s.cb==a&&s.Wa(r,e)}};var Za=1,to=2,eo=3;function no(t,e){this.a=e,this.c=t,this.g=null,this.l=1,this.u=Promise.resolve(),this.h=[],this.i=new Map,this.b=new Map,this.s=!1,this.F=null,this.D=this.f=this.m=!1,this.B=0}function ro(t){return ao(t,"audio")}function io(t){return ao(t,"video")}function ao(t,e){var n=t.b.get(e);return n?n.Ka||n.stream:null}function oo(t,e){return p((function n(){var r,i,a,o,s,u,l,c,d;return N(n,(function(n){switch(n.j){case 1:return r=Ye,w(n,Ln(t.a.L,r.ra),2);case 2:return t.B++,t.D=!1,i=t.B,a=t.a.L,o=new Map,s=new Set,o.set(r.ra,e),s.add(e),w(n,a.init(o,!1),3);case 3:return t.f?n.return():w(n,go(t,s),4);case 4:if(t.f)return n.return();u=t.a.L.g.isTextVisible()||t.g.alwaysStreamText,t.B!=i||t.b.has(r.ra)||t.D||!u||(l=t.a.Ua(),c=Eo(t,l),d=ho(e,c,0),t.b.set(r.ra,d),ko(t,d,0)),S(n)}}))}))}function so(t,e){var n=t.b.get("video");if(n){var r=n.stream;if(r)if(e){var i=r.trickModeVideo;i&&!n.Ka&&(lo(t,i,!1,0,!1),n.Ka=r)}else(r=n.Ka)&&(n.Ka=null,lo(t,r,!0,0,!1))}}function uo(t,e,n,r){var i=!1;if(e.video){var a=lo(t,e.video,n,r,!1);i=i||a}return e.audio&&(t=lo(t,e.audio,n,r,!1),i=i||t),i}function lo(t,e,n,r,i){var a=t.b.get(e.type);if(!a&&"text"==e.type&&t.g.ignoreTextStreamFailures)return oo(t,e),!0;if(!a)return!1;var o=To(t,e),s=Array.from(t.b.values()).every((function(t){return t.ia==a.ia}));return n&&o!=a.ia&&s?(t.b.forEach((function(e){co(t,e)})),!0):(a.Ka&&(e.trickModeVideo?(a.Ka=e,e=e.trickModeVideo):a.Ka=null),!(!(s=t.h[o])||!s.Db||!(s=t.i.get(e.id))||!s.Db||a.stream==e&&!i||("text"==e.type&&_n(t.a.L,qt(e.mimeType,e.codecs)),a.stream=e,a.nc=!0,function(t,e,n){if(!e.Rb)return!1;var r=t.a.Ua(),i=wn(t.a.L,e.type),a=mo(t,e,r,i,n);return n=a&&a.a?a.a-a.b:null,a&&!n&&(n=(a.endTime-a.kc())*e.stream.bandwidth/8),!isNaN(n)&&((a=e.stream.initSegmentReference)&&(n+=(a.a?a.a-a.b:null)||0),a=t.a.getBandwidthEstimate(),8*n/a<i-r-Math.max(t.c.minBufferTime||0,t.g.rebufferingGoal)||e.Rb.b.a>n)}(t,a,o)&&a.Rb.abort(),n&&(a.Ra?a.Cc=!0:a.Ja?(a.Oa=!0,a.dc=r,a.Cc=!0):(Co(a),So(t,a,!0,r).catch((function(e){t.a&&t.a.onError(e)})))),0)))}function co(t,e){e.Ra||e.Oa||(e.Ja?(e.Oa=!0,e.dc=0):null==Tn(t.a.L,e.type)?null==e.Ga&&ko(t,e,0):(Co(e),So(t,e,!1,0).catch((function(e){t.a&&t.a.onError(e)}))))}function fo(t,e,n,r,i){return p((function a(){var o,s,u,l,c,d,f;return N(a,(function(a){switch(a.j){case 1:return o=t.a.Ua(),s=Eo(t,o),u=Ye,l=new Map,c=new Set,e&&(l.set(u.Eb,e),c.add(e)),n&&(l.set(u.Pa,n),c.add(n)),r&&(l.set(u.ra,r),c.add(r)),d=t.a.L,f=t.g.forceTransmuxTS,w(a,d.init(l,f),2);case 2:return t.f?a.return():(function(t){var e=t.c.presentationTimeline.Y();1/0>e?t.a.L.xa(e):t.a.L.xa(Math.pow(2,32))}(t),w(a,go(t,c),3));case 3:if(t.f)return a.return();l.forEach((function(e,n){if(!t.b.has(n)){var r=ho(e,s,i);t.b.set(n,r),ko(t,r,0)}})),S(a)}}))}))}function ho(t,e,n){return{stream:t,type:t.type,sb:null,Da:null,Ka:null,nc:!0,ia:e,endOfStream:!1,Ja:!1,Ga:null,Oa:!1,dc:0,Cc:!1,Ra:!1,od:!1,Pb:!1,rd:n||0,Rb:null}}function po(t,e){var n=t.h[e];if(n)return n.promise;n={promise:new yt,Db:!1},t.h[e]=n;for(var r=new Set,i=f(t.c.periods[e].variants),a=i.next();!a.done;a=i.next())(a=a.value).video&&r.add(a.video),a.video&&a.video.trickModeVideo&&r.add(a.video.trickModeVideo),a.audio&&r.add(a.audio);for(a=(i=f(t.c.periods[e].textStreams)).next();!a.done;a=i.next())r.add(a.value);return t.u=t.u.then(function(){if(!this.f)return go(this,r)}.bind(t)).then(function(){this.f||(this.h[e].promise.resolve(),this.h[e].Db=!0)}.bind(t)).catch(function(t){this.f||(this.h[e].promise.catch((function(){})),this.h[e].promise.reject(),delete this.h[e],this.a.onError(t))}.bind(t)),n.promise}function go(t,e){return p((function n(){var r,i,a,o,s,u,l;return N(n,(function(n){switch(n.j){case 1:r=[];for(var c=f(e),d=c.next();!d.done;d=c.next())i=d.value,(a=t.i.get(i.id))?r.push(a.promise):(t.i.set(i.id,{promise:new yt,Db:!1}),r.push(i.createSegmentIndex()));return k(n,2),w(n,Promise.all(r),4);case 4:if(t.f)return n.return();L(n,3);break;case 2:if(o=x(n),t.f)return n.return();for(d=(n=f(e)).next();!d.done;d=n.next())s=d.value,t.i.get(s.id).promise.catch((function(){})),t.i.get(s.id).promise.reject(),t.i.delete(s.id);throw o;case 3:for(d=(c=f(e)).next();!d.done;d=c.next())u=d.value,(l=t.i.get(u.id)).Db||(l.promise.resolve(),l.Db=!0);S(n)}}))}))}function yo(t,e){if(!t.f&&!e.Ja&&null!=e.Ga&&!e.Ra)if(e.Ga=null,e.Oa)So(t,e,e.Cc,e.dc);else{try{var n=function(t,e){if(Ao(e))return Cn(t.a.L,e.stream.originalId||""),null;var n=t.a.Ua(),r=vo(t,e,n),i=To(t,e.stream),a=Eo(t,r),o=function(t,e,n){return"text"==e?null==(t=t.a).b||t.b<n?0:t.b-Math.max(n,t.a):je(t=Sn(t,e),n)}(t.a.L,e.type,n),s=Math.max(t.c.minBufferTime||0,t.g.rebufferingGoal,t.g.bufferingGoal)*t.l;if(r>=t.c.presentationTimeline.Y())return e.endOfStream=!0,"video"==e.type&&(r=t.b.get("text"))&&"application/cea-608"==r.stream.mimeType&&(r.endOfStream=!0),null;if(e.endOfStream=!1,e.ia=a,a!=i)return null;if(o>=s)return.5;if(a=wn(t.a.L,e.type),!(a=mo(t,e,n,a,i)))return 1;var u=1/0;return Array.from(t.b.values()).forEach((function(e){Ao(e)||(e=vo(t,e,n),u=Math.min(u,e))})),r>=u+t.c.presentationTimeline.a?1:(e.rd=0,function(t,e,n,r,i){var a=t.c.periods[r],o=e.stream,s=t.c.presentationTimeline.Y(),u=t.c.periods[r+1];r=function(t,e,n,r,i){return e.nc?(n=function(t,e,n,r,i){return"text"==e?(t.a.m=n,(t=t.a).f=r,t.h=i,Promise.resolve()):Promise.all([xn(t,e,t.Be.bind(t,e)),xn(t,e,t.kg.bind(t,e,n)),xn(t,e,t.hg.bind(t,e,r,i))])}(t.a.L,e.type,t.c.periods[n].startTime-e.stream.presentationTimeOffset,r,i),e.stream.initSegmentReference?(t=wo(t,e,e.stream.initSegmentReference).then(function(t){if(!this.f)return kn(this.a.L,e.type,t,null,null,e.stream.closedCaptions&&0<e.stream.closedCaptions.size)}.bind(t)).catch((function(t){return e.nc=!0,Promise.reject(t)})),Promise.all([n,t])):n):Promise.resolve()}(t,e,r,Math.max(0,a.startTime-.1),u?u.startTime+.01:s),e.Ja=!0,e.nc=!1,s=wo(t,e,i),Promise.all([r,s]).then(function(t){if(!this.f&&!this.m)return function(t,e,n,r,i,a,o){var s=i.closedCaptions&&0<i.closedCaptions.size;return null!=i.emsgSchemeIdUris&&0<i.emsgSchemeIdUris.length&&(new Or).fa("emsg",t.K.bind(t,r,a,i.emsgSchemeIdUris)).parse(o),function(t,e,n){var r=Math.max(t.g.bufferBehind,t.c.presentationTimeline.a),i=Tn(t.a.L,e.type);return null==i||0>=(n=n-i-r)?Promise.resolve():t.a.L.remove(e.type,i,i+n).then(function(){}.bind(t))}(t,e,n).then(function(){if(!this.f)return kn(this.a.L,e.type,o,a.startTime+r.startTime,a.endTime+r.startTime,s)}.bind(t)).then(function(){if(!this.f)return e.sb=i,e.Da=a,Promise.resolve()}.bind(t))}(this,e,n,a,o,i,t[1])}.bind(t)).then(function(){this.f||this.m||(e.Ja=!1,e.od=!1,e.Oa||this.a.jd(),ko(this,e,0),function(t,e){if(!t.s){var n=Array.from(t.b.values());if(1==n.length&&"text"==n[0].type||(t.s=n.every((function(t){return"text"==t.type||!t.Oa&&!t.Ra&&t.Da}))),t.s){for(n=To(t,e),t.h[n]||po(t,n).then(function(){this.f||this.a.$d()}.bind(t)).catch(Ve.oc),n=0;n<t.c.periods.length;++n)po(t,n).catch(Ve.oc);t.a.Lf&&t.a.Lf()}}}(this,o))}.bind(t)).catch(function(t){this.f||this.m||(e.Ja=!1,"text"==e.type&&this.g.ignoreTextStreamFailures?this.b.delete("text"):7001==t.code?(e.Ja=!1,e.Ga=null,ko(this,e,0)):3017==t.code?function(t,e,n){if(!Array.from(t.b.values()).some((function(t){return t!=e&&t.od}))){var r=Math.round(100*t.l);if(20<r)t.l-=.2;else{if(!(4<r))return e.Pb=!0,t.m=!0,void t.a.onError(n);t.l-=.04}e.od=!0}ko(t,e,4)}(this,e,t):(e.Pb=!0,t.severity=2,Lo(this,t)))}.bind(t))}(t,e,n,i,a),null)}(t,e);null!=n&&(ko(t,e,n),e.Pb=!1)}catch(e){return void Lo(t,e)}n=Array.from(t.b.values()),function(t,e){var n=To(t,e.stream);if(e.ia!=n){var r=e.ia,i=Array.from(t.b.values());i.every((function(t){return t.ia==r||Ao(t)}))&&i.every(_o)&&po(t,r).then(function(){if(!this.f&&i.every(function(t){var e=_o(t),n=To(this,t.stream);return!!Ao(t)||e&&t.ia==r&&n!=r}.bind(this))){var t=this.c.periods[r],e=this.a.ae(t),n=new Map;e.variant&&e.variant.video&&n.set("video",e.variant.video),e.variant&&e.variant.audio&&n.set("audio",e.variant.audio),e.text&&n.set("text",e.text);for(var a=(e=f(this.b.keys())).next();!a.done;a=e.next())if(a=a.value,!n.has(a)&&"text"!=a)return void this.a.onError(new gt(2,5,5005));for(a=(e=f(Array.from(n.keys()))).next();!a.done;a=e.next())if(a=a.value,!this.b.has(a)){if("text"!=a)return void this.a.onError(new gt(2,5,5005));fo(this,null,null,n.get("text"),t.startTime),n.delete(a)}for(a=(e=f(Array.from(this.b.keys()))).next();!a.done;a=e.next()){a=a.value;var o=this.b.get(a),s=n.get(a);if(s){var u=Ao(o);u&&(o.ia=r,o.rd=t.startTime),lo(this,s,!1,0,!1),u&&Ao(o)||ko(this,this.b.get(a),0)}else this.b.delete(a)}this.a.$d()}}.bind(t)).catch(Ve.oc)}}(t,e),t.s&&n.every((function(t){return t.endOfStream}))&&t.a.L.endOfStream().then(function(){if(!this.f){var t=this.a.L.Y();0!=t&&t<this.c.presentationTimeline.Y()&&this.c.presentationTimeline.xa(t)}}.bind(t))}}function vo(t,e,n){return e.sb&&e.Da?(n=To(t,e.sb),t.c.periods[n].startTime+e.Da.endTime):Math.max(n,e.rd)}function mo(t,e,n,r,i){if(e.Da&&e.stream==e.sb)return bo(t,e,i,e.Da.position+1);if(e.Da?(n=To(t,e.sb),n=e.stream.findSegmentPosition(Math.max(0,t.c.periods[n].startTime+e.Da.endTime-t.c.periods[i].startTime))):n=e.stream.findSegmentPosition(Math.max(0,(r||n)-t.c.periods[i].startTime)),null==n)return null;var a=null;return null==r&&(a=bo(t,e,i,Math.max(0,n-1))),a||bo(t,e,i,n)}function bo(t,e,n,r){return n=t.c.periods[n],(e=e.stream.getSegmentReference(r))?(t=(r=t.c.presentationTimeline).Ob(),r=r.pb(),n.startTime+e.endTime<t||n.startTime+e.startTime>r?null:e):null}function Ao(t){return t&&"text"==t.type&&"application/cea-608"==t.stream.mimeType}function _o(t){return!t.Ja&&null==t.Ga&&!t.Oa&&!t.Ra}function Eo(t,e){var n=Ma(t.c.periods,e+1/15);return n?t.c.periods.indexOf(n):0}function To(t,e){for(var n=t.c.periods,r=0;r<n.length;r++){for(var i=n[r],a=new Set,o=f(i.variants),s=o.next();!s.done;s=o.next())(s=s.value).audio&&a.add(s.audio),s.video&&a.add(s.video),s.video&&s.video.trickModeVideo&&a.add(s.video.trickModeVideo);for(o=(i=f(i.textStreams)).next();!o.done;o=i.next())a.add(o.value);if(a.has(e))return r}return-1}function wo(t,e,n){return n=mi(n.c(),n.b,n.a,t.g.retryParameters),t=t.a.ub.request(1,n),e.Rb=t,t.promise.then((function(t){return e.Rb=null,t.data}))}function So(t,e,n,r){return p((function i(){var a,o,s;return N(i,(function(i){switch(i.j){case 1:return e.Oa=!1,e.Cc=!1,e.dc=0,e.Ra=!0,r?(o=t.a.Ua(),s=t.a.L.Y(),a=t.a.L.remove(e.type,o+r,s)):a=Ln(t.a.L,e.type).then(function(){if(!this.f&&n)return this.a.L.flush(e.type)}.bind(t)),w(i,a,2);case 2:if(t.f)return i.return();e.sb=null,e.Da=null,e.Ra=!1,e.endOfStream=!1,ko(t,e,0),S(i)}}))}))}function ko(t,e,n){e.Ga=new dt((function(){return p((function n(){var r;return N(n,(function(n){switch(n.j){case 1:return k(n,2),w(n,yo(t,e),4);case 4:L(n,0);break;case 2:r=x(n),t.a&&t.a.onError(r),S(n)}}))}))})).R(n)}function Co(t){null!=t.Ga&&(t.Ga.stop(),t.Ga=null)}function Lo(t,e){pt(t.F).then(function(){this.f||(this.a.onError(e),e.handled||this.g.failureCallback(e))}.bind(t))}function xo(t,e,n,r,i,a){if(200<=n&&299>=n&&202!=n)return{uri:i||r,ld:r,data:e,headers:t,fromCache:!!t["x-shaka-from-cache"]};i=null;try{i=ue(e)}catch(t){}throw new gt(401==n||403==n?2:1,1,1001,r,n,i,t,a)}function Ro(t,e,n,r){var i=new Ro.b;$t(e.headers).forEach((function(t,e){i.append(e,t)}));var a=new Ro.a,o={Id:!1,te:!1};if(t=new vt(t=Ro.l(t,n,{body:e.body||void 0,headers:i,method:e.method,signal:a.signal,credentials:e.allowCrossSiteCredentials?"include":void 0},o,r),(function(){return o.Id=!0,a.abort(),Promise.resolve()})),e=e.retryParameters.timeout){var s=new ft((function(){o.te=!0,a.abort()}));s.R(e/1e3),t.finally((function(){s.stop()}))}return t}function Io(t,e,n,r){var i=new Io.f,a=Date.now(),o=0;return new vt(new Promise((function(s,u){for(var l in i.open(e.method,t,!0),i.responseType="arraybuffer",i.timeout=e.retryParameters.timeout,i.withCredentials=e.allowCrossSiteCredentials,i.onabort=function(){u(new gt(1,1,7001,t,n))},i.onload=function(e){for(var r=(e=e.target).getAllResponseHeaders().trim().split("\r\n"),i={},a=(r=f(r)).next();!a.done;a=r.next())i[(a=a.value.split(": "))[0].toLowerCase()]=a.slice(1).join(": ");try{var o=xo(i,e.response,e.status,t,e.responseURL,n);s(o)}catch(t){u(t)}},i.onerror=function(e){u(new gt(1,1,1002,t,e,n))},i.ontimeout=function(){u(new gt(1,1,1003,t,n))},i.onprogress=function(t){var e=Date.now();(100<e-a||t.lengthComputable&&t.loaded==t.total)&&(r(e-a,t.loaded-o,t.total-t.loaded),o=t.loaded,a=e)},e.headers)i.setRequestHeader(l.toLowerCase(),e.headers[l]);i.send(e.body)})),(function(){return i.abort(),Promise.resolve()}))}function Po(){this.a=this.f=this.b=0,this.c=new Map,this.g=0}function Oo(t,e,n){this.h=t,this.b=new Map,this.c=!1,this.g=e,this.f=n,this.a=new Po}function Do(t,e,n,r,i,a){var o=function(t,e){t.b+=e;var n=t.g;return t.g++,t.c.set(n,e),n}(t.a,r);r=t.b.get(e)||Promise.resolve(),t.b.set(e,r.then((function(){return p((function e(){var r,s,u,l,c,d;return N(e,(function(e){switch(e.j){case 1:return w(e,function(t,e){return p((function n(){var r;return N(n,(function(n){switch(n.j){case 1:return w(n,t.h.request(1,e).promise,2);case 2:return r=n.o,n.return(r.data)}}))}))}(t,n),2);case 2:if(r=e.o,t.c)throw new gt(2,9,7001);if(i)for(var f in s=new Uint8Array(r),(u=new Br(s)).data)l=Number(f),c=u.data[l],d=u.a[l],t.f(c,d);return t.a.close(o,r.byteLength),f=t.a,t.g(0==f.b?0:f.f/f.b,t.a.a),e.return(a(r))}}))}))})))}function Mo(t,e){var n=this;this.c=t,this.b=t.objectStore(e),this.a=new yt,t.onabort=function(t){t.preventDefault(),n.a.reject()},t.onerror=function(t){t.preventDefault(),n.a.reject()},t.oncomplete=function(){n.a.resolve()}}function No(t,e){return new Promise((function(n,r){var i=t.b.openCursor();i.onerror=r,i.onsuccess=function(t){if(!(t=t.target.result))return n();e(t.key,t.value,t),t.continue()}}))}function Uo(t){this.b=t,this.a=[]}function Fo(t,e){return Bo(t,e,"readwrite")}function Bo(t,e,n){var r=new Mo(n=t.b.transaction([e],n),e);return t.a.push(r),r.promise().then((function(){xt(t.a,r)}),(function(){xt(t.a,r)})),r}function jo(t,e,n){this.b=new Uo(t),this.c=e,this.a=n}function Ko(t){return Promise.reject(new gt(2,9,9011,"Cannot add new value to "+t))}function Vo(t,e,n,r){e=(t=Fo(t.b,e)).store();for(var i={},a=(n=f(n)).next();!a.done;i={key:i.key},a=n.next())i.key=a.value,e.delete(i.key).onsuccess=function(t){return function(){return r(t.key)}}(i);return t.promise()}function Go(t,e,n){return p((function r(){var i,a,o,s,u,l,c;return N(r,(function(r){switch(r.j){case 1:for(i=Bo(t.b,e,"readonly"),a=i.store(),o={},s=[],u={},l=f(n),c=l.next();!c.done;u={request:u.request,key:u.key},c=l.next())u.key=c.value,u.request=a.get(u.key),u.request.onsuccess=function(t){return function(){null==t.request.result&&s.push(t.key),o[t.key]=t.request.result}}(u);return w(r,i.promise(),2);case 2:if(s.length)throw new gt(2,9,9012,"Could not find values for "+s);return r.return(n.map((function(t){return o[t]})))}}))}))}function Ho(t){this.a=new Uo(t)}function Yo(){this.a=new Map}function zo(t,e,n){if(!(t=t.a.get(e)))throw new gt(2,9,9013,"Could not find mechanism with name "+e);if(!(e=t.getCells().get(n)))throw new gt(2,9,9013,"Could not find cell with name "+n);return e}function $o(t,e){Wo.set(t,e)}no.prototype.destroy=function(){for(var t=f(this.b.values()),e=t.next();!e.done;e=t.next())Co(e.value);return this.b.clear(),this.i.clear(),this.g=this.h=this.u=this.c=this.a=null,this.f=!0,Promise.resolve()},no.prototype.configure=function(t){this.g=t,this.F=new ht({maxAttempts:Math.max(t.retryParameters.maxAttempts,2),baseDelay:t.retryParameters.baseDelay,backoffFactor:t.retryParameters.backoffFactor,fuzzFactor:t.retryParameters.fuzzFactor,timeout:0},!0)},no.prototype.start=function(){var t=this;return p((function e(){var n,r,i;return N(e,(function(e){switch(e.j){case 1:return n=t.a.Ua(),r=Eo(t,n),(i=t.a.ae(t.c.periods[r])).variant||i.text?w(e,fo(t,i.variant?i.variant.audio:null,i.variant?i.variant.video:null,i.text,n),2):e.return(new gt(2,5,5005));case 2:if(t.f)return e.return();t.a&&t.a.Cf&&t.a.Cf(),S(e)}}))}))},no.prototype.K=function(t,e,n,r){var i=r.reader.md(),a=r.reader.md(),o=r.reader.G(),s=r.reader.G(),u=r.reader.G(),l=r.reader.G();r=r.reader.Za(r.reader.J.byteLength-r.reader.ca()),t=t.startTime+e.startTime+s/o,n.includes(i)&&("urn:mpeg:dash:event:2012"==i?this.a.Df():this.a.onEvent(new wt("emsg",{detail:{startTime:t,endTime:t+u/o,schemeIdUri:i,value:a,timescale:o,presentationTimeDelta:s,eventDuration:u,id:l,messageData:r}})))},V("shaka.net.HttpFetchPlugin",Ro),Ro.l=function(t,e,n,r,i){return p((function a(){var o,s,u,l,c,d,f,h,g,y,v,m;return N(a,(function(a){switch(a.j){case 1:return o=Ro.g,s=Ro.c,d=c=0,f=Date.now(),k(a,2),w(a,o(t,n),4);case 4:return u=a.o,h=u.clone().body.getReader(),y=(g=u.headers.get("Content-Length"))?parseInt(g,10):0,new s({start:function(t){!function e(){return p((function n(){var r,a;return N(n,(function(n){switch(n.j){case 1:return k(n,2),w(n,h.read(),4);case 4:r=n.o,L(n,3);break;case 2:return x(n),n.return();case 3:r.done||(c+=r.value.byteLength),(100<(a=Date.now())-f||r.done)&&(i(a-f,c-d,y-c),d=c,f=a),r.done?t.close():(t.enqueue(r.value),e()),S(n)}}))}))}()}}),w(a,u.arrayBuffer(),5);case 5:l=a.o,L(a,3);break;case 2:if(v=x(a),r.Id)throw new gt(1,1,7001,t,e);if(r.te)throw new gt(1,1,1003,t,e);throw new gt(1,1,1002,t,v,e);case 3:return m={},u.headers.forEach((function(t,e){m[e.trim()]=t})),a.return(xo(m,l,u.status,t,u.url,e))}}))}))},Ro.isSupported=function(){if(!t.ReadableStream)return!1;try{new ReadableStream({})}catch(t){return!1}return!(!t.fetch||!t.AbortController)},Ro.isSupported=Ro.isSupported,Ro.g=t.fetch,Ro.a=t.AbortController,Ro.c=t.ReadableStream,Ro.b=t.Headers,Ro.isSupported()&&(Mt("http",Ro,2),Mt("https",Ro,2)),V("shaka.net.HttpXHRPlugin",Io),Io.f=t.XMLHttpRequest,Mt("http",Io,1),Mt("https",Io,1),Po.prototype.close=function(t,e){if(this.c.has(t)){var n=this.c.get(t);this.c.delete(t),this.f+=n,this.a+=e}},Oo.prototype.destroy=function(){return this.c=!0,Promise.all(this.b.values()).then((function(){}),(function(){}))},Mo.prototype.abort=function(){try{this.c.abort()}catch(t){}return this.a.catch((function(){}))},Mo.prototype.store=function(){return this.b},Mo.prototype.promise=function(){return this.a},Uo.prototype.destroy=function(){return Promise.all(this.a.map((function(t){return t.abort()})))},(r=jo.prototype).destroy=function(){return this.b.destroy()},r.hasFixedKeySpace=function(){return!0},r.addSegments=function(){return Ko(this.c)},r.removeSegments=function(t,e){return Vo(this,this.c,t,e)},r.getSegments=function(t){var e=this;return p((function n(){var r;return N(n,(function(n){switch(n.j){case 1:return w(n,Go(e,e.c,t),2);case 2:return r=n.o,n.return(r.map((function(t){return e.Jd(t)})))}}))}))},r.addManifests=function(){return Ko(this.a)},r.updateManifestExpiration=function(t,e){var n=Fo(this.b,this.a),r=n.store();return r.get(t).onsuccess=function(n){(n=n.target.result)&&(n.expiration=e,r.put(n,t))},n.promise()},r.removeManifests=function(t,e){return Vo(this,this.a,t,e)},r.getManifests=function(t){var e=this;return p((function n(){var r;return N(n,(function(n){switch(n.j){case 1:return w(n,Go(e,e.a,t),2);case 2:return r=n.o,n.return(r.map((function(t){return e.ec(t)})))}}))}))},r.getAllManifests=function(){var t=this;return p((function e(){var n,r;return N(e,(function(e){switch(e.j){case 1:return n=Bo(t.b,t.a,"readonly"),r=new Map,w(e,No(n,(function(e,n){r.set(e,t.ec(n))})),2);case 2:return w(e,n.promise(),3);case 3:return e.return(r)}}))}))},r.Jd=function(t){return t},r.ec=function(t){return t},r.add=function(t,e){var n=this;return p((function r(){var i,a,o,s;return N(r,(function(r){switch(r.j){case 1:i=Fo(n.b,t),a=i.store(),o=[];for(var u=f(e),l=u.next();!l.done;l=u.next())s=l.value,a.add(s).onsuccess=function(t){o.push(t.target.result)};return w(r,i.promise(),2);case 2:return r.return(o)}}))}))},Ho.prototype.destroy=function(){return this.a.destroy()},Ho.prototype.getAll=function(){var t=this;return p((function e(){var n,r;return N(e,(function(e){switch(e.j){case 1:return n=Bo(t.a,"session-ids","readonly"),r=[],w(e,No(n,(function(t,e){r.push(e)})),2);case 2:return w(e,n.promise(),3);case 3:return e.return(r)}}))}))},Ho.prototype.add=function(t){for(var e=Fo(this.a,"session-ids"),n=e.store(),r=(t=f(t)).next();!r.done;r=t.next())n.add(r.value);return e.promise()},Ho.prototype.remove=function(t){var e=this;return p((function n(){var r;return N(n,(function(n){switch(n.j){case 1:return w(n,No(r=Fo(e.a,"session-ids"),(function(e,n,r){0<=t.indexOf(n.sessionId)&&r.delete()})),2);case 2:return w(n,r.promise(),0)}}))}))},Yo.prototype.destroy=function(){for(var t=[],e=f(this.a.values()),n=e.next();!n.done;n=e.next())t.push(n.value.destroy());return this.a.clear(),Promise.all(t)},Yo.prototype.init=function(){var t=this;Wo.forEach((function(e,n){var r=e();r&&t.a.set(n,r)}));for(var e=[],n=f(this.a.values()),r=n.next();!r.done;r=n.next())e.push(r.value.init());return Promise.all(e)},Yo.prototype.erase=function(){var t=this;return p((function e(){var n,r;return N(e,(function(e){switch(e.j){case 1:return n=Array.from(t.a.values()),(r=0<n.length)||Wo.forEach((function(t){(t=t())&&n.push(t)})),w(e,Promise.all(n.map((function(t){return t.erase()}))),2);case 2:if(!r)return w(e,Promise.all(n.map((function(t){return t.destroy()}))),0);e.A(0)}}))}))},V("shaka.offline.StorageMuxer.register",$o),V("shaka.offline.StorageMuxer.unregister",(function(t){Wo.delete(t)}));var Wo=new Map;function qo(t){jo.apply(this,arguments)}function Xo(t){return function(t){var e=t.streams.filter((function(t){return"audio"==t.contentType})),n=t.streams.filter((function(t){return"video"==t.contentType}));if(!e.every((function(t){return t.variantIds}))||!n.every((function(t){return t.variantIds}))){e.forEach((function(t){t.variantIds=[]})),n.forEach((function(t){t.variantIds=[]}));var r=0;if(n.length&&!e.length){var i=r++;n.forEach((function(t){t.variantIds.push(i)}))}if(!n.length&&e.length){var a=r++;e.forEach((function(t){t.variantIds.push(a)}))}n.length&&e.length&&e.forEach((function(t){n.forEach((function(e){var n=r++;t.variantIds.push(n),e.variantIds.push(n)}))}))}}(t),t.streams.forEach((function(){})),{startTime:t.startTime,streams:t.streams.map(Jo)}}function Jo(t){var e=t.initSegmentUri?Zo(t.initSegmentUri):null;return{id:t.id,originalId:null,primary:t.primary,presentationTimeOffset:t.presentationTimeOffset,contentType:t.contentType,mimeType:t.mimeType,codecs:t.codecs,frameRate:t.frameRate,pixelAspectRatio:void 0,kind:t.kind,language:t.language,label:t.label,width:t.width,height:t.height,initSegmentKey:e,encrypted:t.encrypted,keyId:t.keyId,segments:t.segments.map(Qo),variantIds:t.variantIds}}function Qo(t){var e=Zo(t.uri);return{startTime:t.startTime,endTime:t.endTime,dataKey:e}}function Zo(t){var e;if((e=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(t))||(e=/^offline:segment\/([0-9]+)$/.exec(t)))return Number(e[1]);throw new gt(2,9,9004,"Could not parse uri "+t)}function ts(t,e,n,r){jo.call(this,t,e,n),this.f=r}function es(){this.g=this.c=this.b=this.a=this.f=null}function ns(t,e,n,r){this.a=t,this.g=e,this.f=n,this.c=r,this.b=["offline:",t,"/",e,"/",n,"/",r].join("")}function rs(t){if(null==(t=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(t)))return null;var e=t[1];if("manifest"!=e&&"segment"!=e)return null;var n=t[2];if(!n)return null;var r=t[3];return r&&null!=e?new ns(e,n,r,Number(t[4])):null}function is(t,e){this.b=t,this.a=e}function as(t,e,n){var r=e.streams.filter((function(t){return"audio"==t.contentType})),i=e.streams.filter((function(t){return"video"==t.contentType}));return r=function(t,e,n){for(var r=new Set,i=f(e),a=i.next();!a.done;a=i.next()){var o=f(a.value.variantIds);for(a=o.next();!a.done;a=o.next())r.add(a.value)}for(i=f(n),a=i.next();!a.done;a=i.next())for(o=f(a.value.variantIds),a=o.next();!a.done;a=o.next())r.add(a.value);for(i=new Map,r=f(r),a=r.next();!a.done;a=r.next())a=a.value,i.set(a,{id:a,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});for(e=f(e),r=e.next();!r.done;r=e.next())for(r=r.value,a=os(t,r),o=f(r.variantIds),r=o.next();!r.done;r=o.next())(r=i.get(r.value)).language=a.language,r.primary=r.primary||a.primary,r.audio=a;for(n=f(n),e=n.next();!e.done;e=n.next())for(r=e.value,e=os(t,r),a=f(r.variantIds),r=a.next();!r.done;r=a.next())(r=i.get(r.value)).primary=r.primary||e.primary,r.video=e;return i}(t,r,i),i=e.streams.filter((function(t){return"text"==t.contentType})).map((function(e){return os(t,e)})),e.streams.forEach((function(r){r=r.segments.map((function(e,n){return ss(t,n,e)})),n.vb(r,e.startTime)})),{startTime:e.startTime,variants:Array.from(r.values()),textStreams:i}}function os(t,e){var n=e.segments.map((function(e,n){return ss(t,n,e)})),r=new ti(n);return n={id:e.id,originalId:e.originalId,createSegmentIndex:function(){return Promise.resolve()},findSegmentPosition:function(t){return r.find(t)},getSegmentReference:function(t){return r.get(t)},initSegmentReference:null,presentationTimeOffset:e.presentationTimeOffset,mimeType:e.mimeType,codecs:e.codecs,width:e.width||void 0,height:e.height||void 0,frameRate:e.frameRate||void 0,pixelAspectRatio:e.pixelAspectRatio||void 0,kind:e.kind,encrypted:e.encrypted,keyId:e.keyId,language:e.language,label:e.label||null,type:e.contentType,primary:e.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},null!=e.initSegmentKey&&(n.initSegmentReference=function(t,e){var n=new ns("segment",t.b,t.a,e);return new Jr((function(){return[n.toString()]}),0,null)}(t,e.initSegmentKey)),n}function ss(t,e,n){var r=new ns("segment",t.b,t.a,n.dataKey);return new Qr(e,n.startTime,n.endTime,(function(){return[r.toString()]}),0,null)}function us(){this.a=null}function ls(t){var e=rs(t);return e&&"manifest"==e.a?ls.h(t):e&&"segment"==e.a?ls.i(e.key(),e):mt(new gt(2,1,9004,t))}function cs(t,e,n){return p((function r(){var i,a,o,s,u,l;return N(r,(function(r){switch(r.j){case 1:i=[];for(var c=[],d=f(n),h=d.next();!h.done;h=d.next()){h=h.value;for(var g=!1,y=f(c),v=y.next();!v.done;v=y.next())if(ds((v=v.value).info,h)){v.sessionIds.push(h.sessionId),g=!0;break}g||c.push({info:h,sessionIds:[h.sessionId]})}a=f(c),o=a.next();case 2:if(o.done){r.A(4);break}return s=o.value,u=function(t,e,n){return p((function r(){var i,a;return N(r,(function(r){switch(r.j){case 1:return i=new pe({ub:e,onError:function(){},qc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),k(r,2),i.configure(t),w(r,function(t,e,n,r,i,a){var o=new Map;return o.set(e,{audioCapabilities:i,videoCapabilities:a,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:e,drmInfos:[{keySystem:e,licenseServerUri:n,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:r,initData:null,keyIds:null}]}),Te(t,o)}(i,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:L(r,3);break;case 2:return x(r),w(r,i.destroy(),5);case 5:return r.return([]);case 3:return k(r,6),w(r,ve(i),8);case 8:L(r,7);break;case 6:return x(r),w(r,i.destroy(),9);case 9:return r.return([]);case 7:return a=[],w(r,Promise.all(n.sessionIds.map((function(t){return p((function e(){return N(e,(function(e){switch(e.j){case 1:return k(e,2),w(e,function(t,e){return p((function n(){var r,i,a;return N(n,(function(n){switch(n.j){case 1:return w(n,we(t,e),2);case 2:return(r=n.o)?(i=[],(a=t.b.get(r))&&(a.ya=new yt,i.push(a.ya)),i.push(r.remove()),w(n,Promise.all(i),0)):n.return()}}))}))}(i,t),4);case 4:a.push(t),L(e,0);break;case 2:x(e),S(e)}}))}))}))),10);case 10:return w(r,i.destroy(),11);case 11:return r.return(a)}}))}))}(t,e,s),w(r,u,5);case 5:l=r.o,i=i.concat(l),o=a.next(),r.A(2);break;case 4:return r.return(i)}}))}))}function ds(t,e){function n(t,e){return t.robustness==e.robustness&&t.contentType==e.contentType}return t.keySystem==e.keySystem&&t.licenseUri==e.licenseUri&&Rt(t.audioCapabilities,e.audioCapabilities,n)&&Rt(t.videoCapabilities,e.videoCapabilities,n)}function fs(t,e){var n={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null},r=this;this.g=e,this.c=t,this.i=n,this.h=null,this.f=[],this.b=this.a=null,this.l=!0,this.m=Promise.resolve().then((function(){return function(t){return p((function e(){return N(e,(function(e){switch(e.j){case 1:if(t.l){if(0==t.f.length||t.a&&!t.a.Va)var n=!1;else{t.a&&(t.a.va.Ya(),t.a=null);var r=(n=t.f.shift()).create(t.i);r?(n.va.wb(),t.a={node:r.node,payload:r.payload,Va:r.Va,va:n.va}):n.va.rc(),n=!0}return n?n=Promise.resolve():t.a?n=function(t){return p((function e(){var n,r;return N(e,(function(e){switch(e.j){case 1:return t.c=t.g.cf(t.c,t.i,t.a.node,t.a.payload),k(e,2),t.b=t.g.Le(t.c,t.i,t.a.payload),w(e,t.b.promise,4);case 4:t.b=null,t.c==t.a.node&&(t.a.va.pc(),t.a=null),L(e,0);break;case 2:return 7001==(n=x(e)).code?t.a.va.Ya():t.a.va.onError(n),t.a=null,t.b=null,r=t,w(e,t.g.handleError(t.i,n),5);case 5:r.c=e.o,S(e)}}))}))}(t):(t.g.Bf(t.c),t.h=new yt,n=t.h),w(e,n,1)}e.A(0)}}))}))}(r)}))}function hs(t,e){var n={wb:function(){},pc:function(){},Ya:function(){},onError:function(){},rc:function(){},Jg:function(){}};return t.f.push({create:e,va:n}),t.b&&t.b.abort(),ps(t),n}function ps(t){t.h&&(t.h.resolve(),t.h=null)}function gs(t){this.a=null;for(var e=0;e<t.textTracks.length;++e){var n=t.textTracks[e];n.mode="disabled","Shaka Player TextTrack"==n.label&&(this.a=n)}this.a||(this.a=t.addTextTrack("subtitles","Shaka Player TextTrack")),this.a.mode="hidden"}function ys(t){if(t.startTime>=t.endTime)return null;var e=new VTTCue(t.startTime,t.endTime,t.payload);e.lineAlign=t.lineAlign,e.positionAlign=t.positionAlign,e.size=t.size;try{e.align=t.textAlign}catch(t){}return"center"==t.textAlign&&"center"!=e.align&&(e.align="middle"),"vertical-lr"==t.writingMode?e.vertical="lr":"vertical-rl"==t.writingMode&&(e.vertical="rl"),1==t.lineInterpretation&&(e.snapToLines=!1),null!=t.line&&(e.line=t.line),null!=t.position&&(e.position=t.position),e}function vs(t,e){var n=t.mode;t.mode="showing"==n?"showing":"hidden";for(var r=t.cues,i=r.length-1;0<=i;i--){var a=r[i];a&&e(a)&&t.removeCue(a)}t.mode=n}function ms(t,e,n,r,i){var a,o=i in r,s=!0;for(a in e){var u=i+"."+a,l=o?r[i]:n[a];o||a in n?void 0===e[a]?void 0===l||o?delete t[a]:t[a]=Ct(l):l.constructor==Object&&e[a]&&e[a].constructor==Object?(t[a]||(t[a]=Ct(l)),u=ms(t[a],e[a],l,r,u),s=s&&u):typeof e[a]!=typeof l||null==e[a]||"function"!=typeof e[a]&&e[a].constructor!=l.constructor?(W("Invalid config, wrong type for "+u),s=!1):("function"==typeof n[a]&&n[a].length!=e[a].length&&q("Unexpected number of arguments for "+u),t[a]=e[a]):(W("Invalid config, unrecognized key "+u),s=!1)}return s}function bs(t,e){for(var n={},r=n,i=0,a=0;!(0>(i=t.indexOf(".",i)));)0!=i&&"\\"==t[i-1]||(r[a=t.substring(a,i).replace(/\\\./g,".")]={},r=r[a],a=i+1),i+=1;return r[t.substring(a).replace(/\\\./g,".")]=e,n}function As(){}function _s(){var t=5e5,e=1/0;navigator.connection&&(t=1e6*navigator.connection.downlink,navigator.connection.saveData&&(e=360));var n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:ke,fairPlayTransform:!0},r={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,dash:{customScheme:function(t){if(t)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1},hls:{ignoreTextStreamFailures:!1}},i={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},failureCallback:function(t){return[t]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0};ne("Web0S")&&(i.stallEnabled=!1);var a={trackSelectionCallback:function(t){return p((function e(){return N(e,(function(e){switch(e.j){case 1:return e.return(t)}}))}))},progressCallback:function(t,e){return[t,e]},usePersistentLicense:!0},o={drm:n,manifest:r,streaming:i,offline:a,abrFactory:Bn,abr:{enabled:!0,defaultBandwidthEstimate:t,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null}};return a.trackSelectionCallback=function(t){return p((function e(){return N(e,(function(e){switch(e.j){case 1:return e.return(function(t,e){var n=t.filter((function(t){return"variant"==t.type})),r=[],i=Nn(e,n.map((function(t){return t.language})));i&&(r=n.filter((function(t){return Dn(t.language)==i}))),0==r.length&&(r=n.filter((function(t){return t.primary}))),0==r.length&&(n.map((function(t){return t.language})),r=n);var a=r.filter((function(t){return t.height&&480>=t.height}));if(a.length&&(a.sort((function(t,e){return e.height-t.height})),r=a.filter((function(t){return t.height==a[0].height}))),n=[],r.length){var o=Math.floor(r.length/2);r.sort((function(t,e){return t.bandwidth-e.bandwidth})),n.push(r[o])}for(r=f(t),o=r.next();!o.done;o=r.next())"text"==(o=o.value).type&&n.push(o);return n}(t,o.preferredAudioLanguage))}}))}))},o}function Es(t,e,n){var r={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return ms(t,e,n||_s(),r,"")}function Ts(){this.a=null,this.b=[]}function ws(t,e){if(null==t.a)t.a={timestamp:Date.now()/1e3,state:e,duration:0};else{var n=Date.now()/1e3;t.a.duration=n-t.a.timestamp,t.a.state!=e&&(t.b.push(t.a),t.a={timestamp:n,state:e,duration:0})}}function Ss(t,e){var n=0;t.a&&t.a.state==e&&(n+=t.a.duration);for(var r=f(t.b),i=r.next();!i.done;i=r.next())n+=(i=i.value).state==e?i.duration:0;return n}function ks(){this.b=this.c=null,this.a=[]}function Cs(){this.f=this.s=this.h=this.b=this.i=this.l=this.m=this.g=this.u=NaN,this.a=new Ts,this.c=new ks}function Ls(e,n){var r=this;kt.call(this),this.i=pu,this.a=null,this.gb=!1,this.g=new jt,this.Dc=this.l=this.Fb=this.b=this.s=this.f=this.Yb=this.B=this.Zb=this.W=this.ib=this.m=this.D=this.h=this.K=null,this.Xd=1e9,this.ac=new Set,this.kb=!0,this.pa=null,this.Ud=!1,this.Rd=0,this.oa=null,this.$=new ha,this.c=Fs(this),this.bc={width:1/0,height:1/0},this.u=null,this.Gb=new Ea(this.c.preferredAudioLanguage,this.c.preferredVariantRole,this.c.preferredAudioChannelCount),this.na=this.c.preferredTextLanguage,this.fb=this.c.preferredTextRole,n&&n(this),this.K=function(t){return new Ot((function(e,n){t.l&&t.l.segmentDownloaded(e,n)}))}(this),this.g.w(t,"online",(function(){r.sd()})),this.F={name:"detach"},this.O={name:"attach"},this.Ha={name:"unload"},this.Mc={name:"manifest-parser"},this.Kc={name:"manifest"},this.hb={name:"media-source"},this.Ec={name:"drm-engine"},this.S={name:"load"},this.Rc={name:"src-equals-drm-engine"},this.jb={name:"src-equals"};var i=new Map;i.set(this.O,(function(t,e){return _t(function(t,e,n){return null==e.v&&(e.v=n.v,t.g.w(e.v,"error",(function(){var e=tu(t);e&&t.Ma(e)}))),t.a=e.v,Promise.resolve()}(r,t,e))})),i.set(this.F,(function(t){return t.v&&(r.g.ea(t.v,"error"),t.v=null),r.a=null,_t(t=Promise.resolve())})),i.set(this.Ha,(function(t){return _t(Ps(r,t))})),i.set(this.hb,(function(e){return _t(e=function(e,n){return p((function r(){var i,a,o,s;return N(r,(function(r){switch(r.j){case 1:return i=t.muxjs?new Ne:new Ue,a=e.c.textDisplayFactory,o=new a,e.Fc=a,w(r,(s=new mn(n.v,i,o)).s,2);case 2:e.D=s,S(r)}}))}))}(r,e))})),i.set(this.Mc,(function(t,e){return _t(function(t,e,n){return p((function r(){var i,a,o,s;return N(r,(function(r){switch(r.j){case 1:if(e.Aa=n.Aa,e.mimeType=n.mimeType,e.uri=n.uri,i=e.uri,a=t.K,t.Fb=i,e.Aa){t.s=e.Aa(),r.A(2);break}return o=t,w(r,yi.create(i,a,t.c.manifest.retryParameters,e.mimeType),3);case 3:o.s=r.o;case 2:s=Ct(t.c.manifest),n.v&&"AUDIO"===n.v.nodeName&&(s.disableVideo=!0),t.s.configure(s),S(r)}}))}))}(r,t,e))})),i.set(this.Kc,(function(t){return function(t,e){var n=e.uri,r=t.K;t.Yb=new Ja,function(t,e){t.b=e}(t.Yb,(function(e){Zs(t,"timelineregionadded",e)}));var i={networkingEngine:r,filterNewPeriod:function(e){return t.Nc(e)},filterAllPeriods:function(e){return Bs(t,e)},onTimelineRegionAdded:function(e){var n=t.Yb;t:{for(var r=f(n.a),i=r.next();!i.done;i=r.next())if((i=i.value).schemeIdUri==e.schemeIdUri&&i.id==e.id&&i.startTime==e.startTime&&i.endTime==e.endTime){r=i;break t}r=null}null==r&&(n.a.add(e),n.b(e))},onEvent:function(e){return t.dispatchEvent(e)},onError:function(e){return t.Ma(e)}};return new vt(Promise.resolve().then((function(){return p((function e(){var r;return N(e,(function(e){switch(e.j){case 1:return r=t,w(e,t.s.start(n,i),2);case 2:if(r.b=e.o,t.dispatchEvent(new wt("manifestparsed")),0==t.b.periods.length)throw new gt(2,4,4014);!function(t){function e(t){return t.video&&t.audio||t.video&&t.video.codecs.includes(",")}t.some((function(t){return t.variants.some(e)}))&&t.forEach((function(t){t.variants=t.variants.filter(e)}))}(t.b.periods),S(e)}}))}))})),(function(){return t.s.stop()}))}(r,t)})),i.set(this.Ec,(function(){return _t(function(t){return p((function e(){return N(e,(function(e){switch(e.j){case 1:return t.h=new pe({ub:t.K,onError:function(e){t.Ma(e)},qc:function(e){eu(t,e)},onExpirationUpdated:function(e,n){nu(t,e,n)},onEvent:function(e){t.dispatchEvent(e)}}),t.h.configure(t.c.drm),w(e,ge(t.h,Da(t.b.periods),t.b.offlineSessionIds),2);case 2:Bs(t,t.b.periods),S(e)}}))}))}(r))})),i.set(this.S,(function(t,e){return _t(function(t,e,n){return p((function r(){var i,a,o,s,u,l,c,d,h;return N(r,(function(r){switch(r.j){case 1:return e.startTime=n.startTime,i=e.v,a=e.uri,t.Fb=a,t.u=new Cs,o=function(){return Gs(t)},s=function(){var e=t.a.playbackRate;0!=e&&t.W.set(e)},t.g.w(i,"playing",o),t.g.w(i,"pause",o),t.g.w(i,"ended",o),t.g.w(i,"ratechange",s),u=t.c.abrFactory,t.l&&t.Dc==u||(t.Dc=u,t.l=new u,t.l.configure(t.c.abr)),function(t,e){for(var n=0;n<e.length;n++){for(var r=e[n],i=new Map,a=f(r.variants),o=a.next();!o.done;o=a.next())if((o=o.value).video&&o.video.closedCaptions)for(var s=f((o=o.video).closedCaptions.keys()),u=s.next();!u.done;u=s.next())if(u=u.value,!i.has(u)){var l={id:t.Xd++,originalId:u,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"application/cea-608",codecs:"",kind:"caption",encrypted:!1,keyId:null,language:o.closedCaptions.get(u),label:null,type:"text",primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:o.roles,channelsCount:null,audioSamplingRate:null,closedCaptions:null};i.set(u,l)}for(i=f(i.values()),a=i.next();!a.done;a=i.next())r.textStreams.push(a.value)}}(t,t.b.periods),t.Gb=new Ea(t.c.preferredAudioLanguage,t.c.preferredVariantRole,t.c.preferredAudioChannelCount),t.na=t.c.preferredTextLanguage,function(t,e,n){0<e&&(t.V()||t.qe(e)),n<t.Y()&&(t.V()||t.xa(n))}(t.b.presentationTimeline,t.c.playRangeStart,t.c.playRangeEnd),w(r,t.h.Hb(i),2);case 2:return t.l.init((function(e,n,r){n=void 0!==n&&n,r=void 0===r?0:r;t:{for(var i=f(t.b.periods),a=i.next();!a.done;a=i.next())if((a=a.value).variants.includes(e)){i=a;break t}i=null}Ns(t,i,e,!0),t.f&&uo(t.f,e,n,r)&&$s(t)})),t.m=function(t,e){return new $a(t.a,t.b,t.c.streaming,e,(function(){t.ib&&Oa(t.ib,!0),t.f&&function(t){function e(e){var i=t.a.L;return e="text"==e?null!=(e=i.a).a&&null!=e.b&&n>=e.a&&n<e.b:Be(e=Sn(i,e),n,r)}var n=t.a.Ua(),r=t.g.smallGapLimit,i=Eo(t,n);if(zt(t.b.values(),(function(t){return t.ia==i})))for(var a=f(t.b.keys()),o=a.next();!o.done;o=a.next())e(o=o.value)||co(t,t.b.get(o));else zt(t.b.keys(),e)||t.b.forEach((function(e){co(t,e)}))}(t.f),t.B&&Ds(t)}),(function(e){return t.dispatchEvent(e)}))}(t,e.startTime),t.ib=function(t){var e=new Na(t.b);!function(t,e){t.b=e}(e,(function(){Ws(t)}));var n=new Qa(t.Yb);!function(t,e,n,r){t.a=e,t.b=n,t.c=r}(n,(function(e){Zs(t,"timelineregionenter",e)}),(function(e){Zs(t,"timelineregionexit",e)}),(function(e,n){n||(Zs(t,"timelineregionenter",e),Zs(t,"timelineregionexit",e))}));var r=new Pa(t.a);return r.a.add(e),r.a.add(n),r}(t),t.W=new Ua({jc:function(){return e.v.playbackRate},wd:function(t){e.v.playbackRate=t},Yd:function(t){e.v.currentTime+=t}}),l=Math.max(t.b.minBufferTime,t.c.streaming.rebufferingGoal),Os(t,l),t.f=function(t){return new no(t.b,{Ua:function(){return t.m.h()},getBandwidthEstimate:function(){return t.l.getBandwidthEstimate()},L:t.D,ub:t.K,ae:t.zf.bind(t),$d:t.Fe.bind(t),onError:t.Ma.bind(t),onEvent:function(e){return t.dispatchEvent(e)},Df:t.Ef.bind(t),jd:t.Jf.bind(t)})}(t),t.f.configure(t.c.streaming),function(t){function e(t){var e="";t.video&&(e=Xt(t.video.codecs)[0]);var n="";return t.audio&&(n=Xt(t.audio.codecs)[0]),e+"-"+n}var n=t.b.periods.reduce((function(t,e){return t.concat(e.variants)}),[]);n=Fn.Nd(n,t.c.preferredAudioChannelCount);var r=new St;n.forEach((function(t){var n=e(t);r.push(n,t)}));var i=null,a=1/0;r.forEach((function(t,e){var n=0,r=0;e.forEach((function(t){n+=t.bandwidth||0,++r}));var o=n/r;o<a&&(i=t,a=o)})),t.b.periods.forEach((function(t){t.variants=t.variants.filter((function(t){return e(t)==i}))}))}(t),t.i=gu,t.dispatchEvent(new wt("streaming")),w(r,t.f.start(),3);case 3:t.c.streaming.startAtSegmentBoundary&&(c=t.m.h(),d=function(t,e){function n(t,e){if(!t)return null;var n=t.findSegmentPosition(e-a.startTime);return null==n?null:(n=t.getSegmentReference(n))?n.startTime+a.startTime:null}var r=ro(t.f),i=io(t.f),a=uu(t);return r=n(r,e),null!=(i=n(i,e))&&null!=r?Math.max(i,r):null!=i?i:null!=r?r:e}(t,c),t.m.m(d)),t.b.periods.forEach(t.Nc.bind(t)),Ws(t),$s(t),(h=uu(t)||t.b.periods[0]).variants.some((function(t){return t.primary})),Hs(t,h.variants),t.g.da(i,"loadeddata",(function(){t.u.b=Date.now()/1e3-n.zd})),S(r)}}))}))}(r,t,e))})),i.set(this.Rc,(function(t){return _t(t=function(t,e){return p((function n(){var r,i;return N(n,(function(n){switch(n.j){case 1:return r=Ye,t.h=new pe({ub:t.K,onError:function(e){t.Ma(e)},qc:function(e){eu(t,e)},onExpirationUpdated:function(e,n){nu(t,e,n)},onEvent:function(e){t.dispatchEvent(e)}}),t.h.configure(t.c.drm),i={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"video/mp4",codecs:"",encrypted:!0,keyId:null,language:"und",label:null,type:r.Pa,primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},w(n,ge(t.h,[i],[]),2);case 2:return w(n,t.h.Hb(e.v),0)}}))}))}(r,t))})),i.set(this.jb,(function(t,e){return function(t,e,n){function r(){return Gs(t)}if(e.uri=n.uri,e.startTime=n.startTime,t.Fb=e.uri,t.u=new Cs,t.m=new za(e.v),null!=e.startTime&&t.m.m(e.startTime),t.W=new Ua({jc:function(){return e.v.playbackRate},wd:function(t){e.v.playbackRate=t},Yd:function(t){e.v.currentTime+=t}}),Os(t,t.c.streaming.rebufferingGoal),t.g.w(e.v,"playing",r),t.g.w(e.v,"pause",r),t.g.w(e.v,"ended",r),t.g.da(e.v,"loadeddata",(function(){t.u.b=Date.now()/1e3-n.zd})),t.a.audioTracks&&(t.g.w(t.a.audioTracks,"addtrack",(function(){return Ws(t)})),t.g.w(t.a.audioTracks,"removetrack",(function(){return Ws(t)})),t.g.w(t.a.audioTracks,"change",(function(){return Ws(t)}))),t.a.textTracks){var i=t.a.textTracks;t.g.w(i,"addtrack",(function(){return Ws(t)})),t.g.w(i,"removetrack",(function(){return Ws(t)})),t.g.w(i,"change",(function(){return Ws(t)}))}e.v.src=e.uri,t.i=yu,t.dispatchEvent(new wt("streaming"));var a=new yt;return t.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?a.resolve():t.a.error?a.reject(tu(t)):(t.g.da(t.a,"loadeddata",(function(){a.resolve()})),t.g.da(t.a,"error",(function(){a.reject(tu(t))}))),new vt(a,(function(){return a.reject(new gt(2,7,7001)),Promise.resolve()}))}(r,t,e)})),this.lb=new fs(this.F,{cf:function(t,e,n,i){var a=null;return t==r.F&&(a=n==r.F?r.F:r.O),t==r.O&&(a=n==r.F||e.v!=i.v?r.F:n==r.O?r.O:n==r.hb||n==r.S?r.hb:n==r.jb?r.Rc:null),t==r.hb&&(a=n==r.S&&e.v==i.v?r.Mc:r.Ha),t==r.Mc&&(a=du(r.S,r.Kc,r.Ha,n,e,i)),t==r.Kc&&(a=du(r.S,r.Ec,r.Ha,n,e,i)),t==r.Ec&&(a=du(r.S,r.S,r.Ha,n,e,i)),t==r.Rc&&(a=n==r.jb&&e.v==i.v?r.jb:r.Ha),t!=r.S&&t!=r.jb||(a=r.Ha),t==r.Ha&&(a=i.v&&e.v==i.v?r.O:r.F),a},Le:function(t,e,n){return r.dispatchEvent(new wt("onstatechange",{state:t.name})),i.get(t)(e,n)},handleError:function(t){return p((function e(){return N(e,(function(e){switch(e.j){case 1:return w(e,Ps(r,t),2);case 2:return e.return(t.v?r.O:r.F)}}))}))},Bf:function(t){r.dispatchEvent(new wt("onstateidle",{state:t.name}))}}),e&&this.Hb(e,!0)}A(qo,jo),qo.prototype.updateManifestExpiration=function(t,e){var n=Fo(this.b,this.a),r=n.store(),i=new yt;return r.get(t).onsuccess=function(n){(n=n.target.result)?(n.expiration=e,r.put(n),i.resolve()):i.reject(new gt(2,9,9012,"Could not find values for "+t))},n.promise().then((function(){return i}))},qo.prototype.ec=function(t){return{originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:null==t.expiration?1/0:t.expiration,periods:t.periods.map(Xo),sessionIds:t.sessionIds,drmInfo:t.drmInfo,appMetadata:t.appMetadata}},qo.prototype.Jd=function(t){return{data:t.data}},A(ts,jo),ts.prototype.hasFixedKeySpace=function(){return this.f},ts.prototype.addSegments=function(t){return this.f?Ko(this.c):this.add(this.c,t)},ts.prototype.addManifests=function(t){return this.f?Ko(this.a):this.add(this.a,t)},ts.prototype.ec=function(t){return null==t.expiration&&(t.expiration=1/0),t},(r=es.prototype).init=function(){var e=this,n=new yt,r=t.indexedDB.open("shaka_offline_db",4);return r.onsuccess=function(t){t=t.target.result,e.f=t;var r=t.objectStoreNames;r=r.contains("manifest")&&r.contains("segment")?new qo(t,"segment","manifest"):null,e.a=r,r=(r=t.objectStoreNames).contains("manifest-v2")&&r.contains("segment-v2")?new ts(t,"segment-v2","manifest-v2",!0):null,e.b=r,r=(r=t.objectStoreNames).contains("manifest-v3")&&r.contains("segment-v3")?new ts(t,"segment-v3","manifest-v3",!1):null,e.c=r,t=t.objectStoreNames.contains("session-ids")?new Ho(t):null,e.g=t,n.resolve()},r.onupgradeneeded=function(t){t=t.target.result;for(var e=f(["segment-v3","manifest-v3","session-ids"]),n=e.next();!n.done;n=e.next())n=n.value,t.objectStoreNames.contains(n)||t.createObjectStore(n,{autoIncrement:!0})},r.onerror=function(t){n.reject(new gt(2,9,9001,r.error)),t.preventDefault()},n},r.destroy=function(){var t=this;return p((function e(){return N(e,(function(e){switch(e.j){case 1:if(!t.a){e.A(2);break}return w(e,t.a.destroy(),2);case 2:if(!t.b){e.A(4);break}return w(e,t.b.destroy(),4);case 4:if(!t.c){e.A(6);break}return w(e,t.c.destroy(),6);case 6:if(!t.g){e.A(8);break}return w(e,t.g.destroy(),8);case 8:t.f&&t.f.close(),S(e)}}))}))},r.getCells=function(){var t=new Map;return this.a&&t.set("v1",this.a),this.b&&t.set("v2",this.b),this.c&&t.set("v3",this.c),t},r.getEmeSessionCell=function(){return this.g},r.erase=function(){var e=this;return p((function n(){return N(n,(function(n){switch(n.j){case 1:if(!e.a){n.A(2);break}return w(n,e.a.destroy(),2);case 2:if(!e.b){n.A(4);break}return w(n,e.b.destroy(),4);case 4:if(!e.c){n.A(6);break}return w(n,e.c.destroy(),6);case 6:return e.f&&e.f.close(),w(n,function(){var e=new yt,n=t.indexedDB.deleteDatabase("shaka_offline_db");return n.onblocked=function(){},n.onsuccess=function(){e.resolve()},n.onerror=function(t){e.reject(new gt(2,9,9001,n.error)),t.preventDefault()},e}(),8);case 8:return e.f=null,e.a=null,e.b=null,e.c=null,w(n,e.init(),0)}}))}))},$o("idb",(function(){return t.indexedDB?new es:null})),ns.prototype.wa=function(){return this.g},ns.prototype.ba=function(){return this.f},ns.prototype.key=function(){return this.c},ns.prototype.toString=function(){return this.b},(r=us.prototype).configure=function(){},r.start=function(t){var e=this;return p((function n(){var r,i,a,o,s;return N(n,(function(n){switch(n.j){case 1:return r=rs(t),e.a=r,null==r||"manifest"!=r.a?n.return(Promise.reject(new gt(2,1,9004,r))):(i=new Yo,C(n,2),w(n,i.init(),4));case 4:return w(n,zo(i,r.wa(),r.ba()),5);case 5:return w(n,n.o.getManifests([r.key()]),6);case 6:return a=n.o,o=a[0],s=new is(r.wa(),r.ba()),n.return(function(t,e){var n=new vi(null,0);n.xa(e.duration);var r=e.periods.map((function(e){return as(t,e,n)})),i=e.drmInfo?[e.drmInfo]:[];return e.drmInfo&&r.forEach((function(t){t.variants.forEach((function(t){t.drmInfos=i}))})),{presentationTimeline:n,minBufferTime:2,offlineSessionIds:e.sessionIds,periods:r}}(s,o));case 2:return R(n),w(n,i.destroy(),7);case 7:I(n,0)}}))}))},r.stop=function(){return Promise.resolve()},r.update=function(){},r.onExpirationUpdated=function(t,e){var n=this;return p((function r(){var i,a,o,s,u,l,c;return N(r,(function(r){switch(r.j){case 1:return i=n.a,a=new Yo,k(r,2,3),w(r,a.init(),5);case 5:return w(r,zo(a,i.wa(),i.ba()),6);case 6:return w(r,(o=r.o).getManifests([i.key()]),7);case 7:if(s=r.o,u=s[0],l=u.sessionIds.includes(t),c=null==u.expiration||u.expiration>e,!l||!c){r.A(3);break}return w(r,o.updateManifestExpiration(i.key(),e),3);case 3:return R(r),w(r,a.destroy(),10);case 10:I(r,0);break;case 2:x(r),r.A(3)}}))}))},yi.Cb("application/x-offline-manifest",us),V("shaka.offline.OfflineScheme",ls),ls.h=function(t){return At(t={uri:t,ld:t,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}})},ls.i=function(t,e){var n=new Yo;return At(void 0).U((function(){return n.init()})).U((function(){return zo(n,e.wa(),e.ba())})).U((function(t){return t.getSegments([e.key()])})).U((function(t){return{uri:e,ld:e,data:t[0].data,headers:{}}})).finally((function(){return n.destroy()}))},Mt("offline",ls),fs.prototype.destroy=function(){var t=this;return p((function e(){return N(e,(function(e){switch(e.j){case 1:return t.l=!1,t.b&&t.b.abort(),ps(t),w(e,t.m,2);case 2:t.a&&t.a.va.Ya();for(var n=f(t.f),r=n.next();!r.done;r=n.next())r.value.va.Ya();t.a=null,t.f=[],t.g=null,S(e)}}))}))},V("shaka.text.SimpleTextDisplayer",gs),gs.prototype.remove=function(t,e){return!!this.a&&(vs(this.a,(function(n){return n.startTime<e&&n.endTime>t})),!0)},gs.prototype.remove=gs.prototype.remove,gs.prototype.append=function(t){for(var e=ys,n=[],r=0;r<t.length;r++){var i=e(t[r]);i&&n.push(i)}n.slice().sort((function(t,e){return t.startTime!=e.startTime?t.startTime-e.startTime:t.endTime!=e.endTime?t.endTime-e.startTime:n.indexOf(e)-n.indexOf(t)})).forEach(function(t){this.a.addCue(t)}.bind(this))},gs.prototype.append=gs.prototype.append,gs.prototype.destroy=function(){return this.a&&vs(this.a,(function(){return!0})),this.a=null,Promise.resolve()},gs.prototype.destroy=gs.prototype.destroy,gs.prototype.isTextVisible=function(){return"showing"==this.a.mode},gs.prototype.isTextVisible=gs.prototype.isTextVisible,gs.prototype.setTextVisibility=function(t){this.a.mode=t?"showing":"hidden"},gs.prototype.setTextVisibility=gs.prototype.setTextVisibility,V("shaka.util.ConfigUtils.mergeConfigObjects",ms),V("shaka.util.ConfigUtils.convertToConfigObject",bs),V("shaka.util.PlayerConfiguration",As),As.mergeConfigObjects=Es,G(Ls,kt),V("shaka.Player",Ls),Ls.prototype.destroy=function(){var t=this;return p((function e(){var n;return N(e,(function(e){switch(e.j){case 1:return t.i==hu?e.return():(t.i=hu,n=hs(t.lb,(function(){return{node:t.F,payload:{Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null},Va:!1}})),w(e,new Promise((function(e){n.wb=function(){},n.pc=function(){e(),t.dispatchEvent(new wt("loaded"))},n.Ya=function(){e()},n.onError=function(){e()},n.rc=function(){e()}})),2));case 2:return w(e,t.lb.destroy(),3);case 3:if(t.g&&(t.g.release(),t.g=null),t.Dc=null,t.l=null,t.c=null,!t.K){e.A(0);break}return w(e,t.K.destroy(),5);case 5:t.K=null,S(e)}}))}))},Ls.prototype.destroy=Ls.prototype.destroy,Ls.version="v2.5.10";var xs=["2","5"];Yn=new function(t){this.a=t,this.c=Gn,this.b=Hn}(new Kn(Number(xs[0]),Number(xs[1])));var Rs=["output-restricted","internal-error"],Is={};function Ps(t,e){return p((function n(){return N(n,(function(n){switch(n.j){case 1:if(t.i!=hu&&(t.i=pu),t.dispatchEvent(new wt("unloading")),e.Aa=null,e.mimeType=null,e.startTime=null,e.uri=null,e.v&&(t.g.ea(e.v,"loadeddata"),t.g.ea(e.v,"playing"),t.g.ea(e.v,"pause"),t.g.ea(e.v,"ended"),t.g.ea(e.v,"ratechange")),t.ib&&(t.ib.release(),t.ib=null),t.Zb&&(t.Zb.stop(),t.Zb=null),!t.s){n.A(2);break}return w(n,t.s.stop(),3);case 3:t.s=null;case 2:if(!t.l){n.A(4);break}return w(n,t.l.stop(),4);case 4:if(!t.f){n.A(6);break}return w(n,t.f.destroy(),7);case 7:t.f=null;case 6:if(t.m&&(t.m.release(),t.m=null),!t.D){n.A(8);break}return w(n,t.D.destroy(),9);case 9:t.D=null;case 8:if(!e.v||!e.v.src){n.A(10);break}return w(n,new Promise((function(t){return new ft(t).R(.1)})),11);case 11:e.v.removeAttribute("src"),e.v.load();case 10:if(!t.h){n.A(12);break}return w(n,t.h.destroy(),13);case 13:t.h=null;case 12:t.$.a.clear(),t.Fb=null,t.B=null,t.ac.clear(),t.b=null,t.u=null,t.Fc=null,t.kb=!0,Vs(t),S(n)}}))}))}function Os(t,e){t.B=new Ta,t.B.a=Sa,wa(t.B,e,Math.min(.5,e/2)),Vs(t),t.Zb=new ft((function(){Ds(t)})).Na(.25)}function Ds(t){switch(t.i){case yu:var e=!!t.a.ended||Fe(t.a.buffered)>=t.a.duration-1;break;case gu:t:if(t.a.ended||En(t.D))e=!0;else{if(t.b.presentationTimeline.V()){var n=t.b.presentationTimeline.pb();if(Fe(t.a.buffered)>=n){e=!0;break t}}e=!1}break;default:e=!1}var r=je(t.a.buffered,t.a.currentTime),i=e,a=(n=t.B).b.get(n.a);e=n.a,r=i||r>=a?ka:Sa,n.a=r,e!=r&&Vs(t)}function Ms(t){if(t.s){var e=Ct(t.c.manifest);t.a&&"AUDIO"===t.a.nodeName&&(e.disableVideo=!0),t.s.configure(e)}if(t.h&&t.h.configure(t.c.drm),t.f){t.f.configure(t.c.streaming);try{t.b.periods.forEach(t.Nc.bind(t))}catch(e){t.Ma(e)}var n=ro(t.f),r=io(t.f);e=uu(t),n=Fn.Qd(n,r,e.variants),t.l&&n&&n.allowedByApplication&&n.allowedByKeySystem?Hs(t,e.variants):Ys(t,e)}if(t.D&&(e=t.c.textDisplayFactory,t.Fc!=e)){n=new e;var i=(r=t.D).g;r.g=n,i&&(n.setTextVisibility(i.isTextVisible()),i.destroy()),r.a&&(r.a.c=n),t.Fc=e,t.f&&(n=(e=t.f).b.get("text"))&&lo(e,n.stream,!0,0,!0)}t.l&&(t.l.configure(t.c.abr),t.c.abr.enabled&&!t.kb?t.l.enable():t.l.disable(),Qs(t)),t.B&&(e=t.c.streaming.rebufferingGoal,t.b&&(e=Math.max(e,t.b.minBufferTime)),wa(t.B,e,Math.min(.5,e/2)))}function Ns(t,e,n,r){ga(t.$,e).variant=n,(t=t.u.c).c!=n&&(t.c=n,t.a.push({timestamp:Date.now()/1e3,id:n.id,type:"variant",fromAdaptation:r,bandwidth:n.bandwidth}))}function Us(t,e,n,r){pa(t.$,e,n),(t=t.u.c).b!=n&&(t.b=n,t.a.push({timestamp:Date.now()/1e3,id:n.id,type:"text",fromAdaptation:r,bandwidth:null}))}function Fs(t){var e=_s();return e.streaming.failureCallback=function(e){t.V()&&[1001,1002,1003].includes(e.code)&&(e.severity=1,t.sd())},e.textDisplayFactory=function(){return new gs(t.a)},e}function Bs(t,e){var n=t.f?ro(t.f):null,r=t.f?io(t.f):null;if(e.forEach(Fn.filterNewPeriod.bind(null,t.h,n,r)),0==(n=function(t,e){var n=0;return t.forEach((function(t){n+=e(t)?1:0})),n}(e,(function(t){return t.variants.some(Fn.rb)}))))throw new gt(2,4,4032);if(n<e.length)throw new gt(2,4,4011);e.forEach(function(t){Fn.Gd(t.variants,this.c.restrictions,this.bc)&&this.f&&uu(this)==t&&Ws(this),ru(this,t.variants)}.bind(t))}function js(t,e,n,r){return n=void 0!==n&&n,r=void 0===r?0:r,t.kb?(t.pa=e,t.Ud=n,t.Rd=r,!0):((e=uo(t.f,e,n,r))&&qs(t),e)}function Ks(t,e){if(t.kb)return t.oa=e,!0;var n=lo(t.f,e,!0,0,!1);return n&&Xs(t),n}function Vs(t){var e=t.Xc();if(t.u&&t.B&&t.m){var n=t.W;n.f=e,Fa(n),Gs(t)}t.dispatchEvent(new wt("buffering",{buffering:e}))}function Gs(t){if(t.u&&t.B){var e=t.u.a;t.B.a==Sa?ws(e,"buffering"):t.a.paused?ws(e,"paused"):t.a.ended?ws(e,"ended"):ws(e,"playing")}}function Hs(t,e){try{ru(t,e)}catch(e){return t.Ma(e),null}var n=e.filter((function(t){return Fn.rb(t)}));return n=t.Gb.create(n),t.l.setVariants(Array.from(n.values())),t.l.chooseVariant()}function Ys(t,e){var n=zs(t,e,!1),r=Fn.Jb(e.textStreams,t.na,t.fb)[0]||null,i=!1;r&&(t.c.streaming.alwaysStreamText||t.mc())&&(Us(t,e,r,!0),i=Ks(t,r)),(n||i)&&$s(t)}function zs(t,e,n){n=void 0===n||n;var r=Hs(t,e.variants),i=!1;return r&&(Ns(t,e,r,!0),i=js(t,r,!0)),n&&i&&$s(t),i}function $s(t){iu(t,new wt("adaptation"))}function Ws(t){iu(t,new wt("trackschanged"))}function qs(t){iu(t,new wt("variantchanged"))}function Xs(t){iu(t,new wt("textchanged"))}function Js(t){iu(t,new wt("texttrackvisibility"))}function Qs(t){iu(t,new wt("abrstatuschanged",{Ig:t.c.abr.enabled}))}function Zs(t,e,n){t.dispatchEvent(new wt(e,{detail:{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement}}))}function tu(t){if(!t.a.error)return null;var e=t.a.error.code;if(1==e)return null;var n=t.a.error.msExtendedCode;return n&&(0>n&&(n+=Math.pow(2,32)),n=n.toString(16)),new gt(2,3,3016,e,n,t.a.error.message)}function eu(t,e){if(t.f){var n=uu(t),r=!1,i=Object.keys(e),a=1==i.length&&"00"==i[0];i.length&&t.b.periods.forEach((function(t){t.variants.forEach((function(t){Fn.nf(t).forEach((function(n){var i=t.allowedByKeySystem;n.keyId&&(n=e[a?"00":n.keyId],t.allowedByKeySystem=!!n&&!Rs.includes(n)),i!=t.allowedByKeySystem&&(r=!0)}))}))})),i=ro(t.f);var o=io(t.f);(i=Fn.Qd(i,o,n.variants))&&!i.allowedByKeySystem&&zs(t,n),r&&(Ws(t),Hs(t,n.variants))}}function nu(t,e,n){t.s&&t.s.onExpirationUpdated&&t.s.onExpirationUpdated(e,n),t.dispatchEvent(new wt("expirationupdated"))}function ru(t,e){var n=t.h?Wt(t.h.W):{},r=Object.keys(n);r=r.length&&"00"==r[0];for(var i=!1,a=!1,o=[],s=[],u=f(e),l=u.next();!l.done;l=u.next()){var c=[];(l=l.value).audio&&c.push(l.audio),l.video&&c.push(l.video);for(var d=(c=f(c)).next();!d.done;d=c.next())if((d=d.value).keyId){var h=n[r?"00":d.keyId];h?Rs.includes(h)&&(s.includes(h)||s.push(h)):o.includes(d.keyId)||o.push(d.keyId)}l.allowedByApplication?l.allowedByKeySystem&&(i=!0):a=!0}if(!i)throw new gt(2,4,4012,{hasAppRestrictions:a,missingKeys:o,restrictedKeyStatuses:s})}function iu(t,e){p((function n(){return N(n,(function(n){switch(n.j){case 1:return w(n,Promise.resolve(),2);case 2:t.i!=hu&&t.dispatchEvent(e),S(n)}}))}))}function au(t){for(var e=new Set,n=(t=f(t)).next();!n.done;n=t.next())(n=n.value).language?e.add(Dn(n.language)):e.add("und");return e}function ou(t){for(var e=new Map,n=(t=f(t)).next();!n.done;n=t.next()){var r=n.value;n="und";var i=[];for(r.language&&(n=Dn(r.language)),(i="variant"==r.type?r.audioRoles:r.roles)&&i.length||(i=[""]),e.has(n)||e.set(n,new Set),i=(r=f(i)).next();!i.done;i=r.next())i=i.value,e.get(n).add(i)}var a=[];return e.forEach((function(t,e){for(var n=f(t),r=n.next();!r.done;r=n.next())a.push({language:e,role:r.value})})),a}function su(t){return null==(t=uu(t))?[]:t.variants.filter((function(t){return Fn.rb(t)}))}function uu(t){for(var e=t.m.h(),n=null,r=(t=f(t.b.periods)).next();!r.done;r=t.next())(r=r.value).startTime<=e&&(n=r);return n}function lu(t){var e=uu(t);return ga(t.$,e).variant}function cu(){return new gt(2,7,7e3)}function du(t,e,n,r,i,a){return r==t&&i.v==a.v&&i.uri==a.uri&&i.mimeType==a.mimeType&&i.Aa==a.Aa?e:n}function fu(t){return new Promise((function(e,n){t.Ya=function(){return n(cu())},t.pc=function(){return e()},t.onError=function(t){return n(t)},t.rc=function(){return n(cu())}}))}Ls.registerSupportPlugin=function(t,e){Is[t]=e},Ls.isBrowserSupported=function(){if(!(t.Promise&&t.Uint8Array&&Array.prototype.forEach))return!1;var e=ee();return!(e&&12>e||!(t.MediaKeys&&t.navigator&&t.navigator.requestMediaKeySystemAccess&&t.MediaKeySystemAccess&&t.MediaKeySystemAccess.prototype.getConfiguration))&&(!!Qt()||Zt("application/x-mpegurl"))},Ls.probeSupport=function(){return Le().then((function(t){for(var e=yi.Sf(),n={},r=f('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",")),i=r.next();!i.done;i=r.next()){n[i=i.value]=Qt()?!!gn(i)||MediaSource.isTypeSupported(i)||$e(i):Zt(i);var a=i.split(";")[0];n[a]=n[a]||n[i]}for(var o in t={manifest:e,media:n,drm:t},Is)t[o]=Is[o]();return t}))},Ls.prototype.Hb=function(t,e){if(e=void 0===e||e,this.i==hu)return Promise.reject(cu());var n={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null};n.v=t,Qt()||(e=!1);var r=e?this.hb:this.O,i=hs(this.lb,(function(){return{node:r,payload:n,Va:!1}}));return i.wb=function(){},fu(i)},Ls.prototype.attach=Ls.prototype.Hb,Ls.prototype.detach=function(){var t=this;if(this.i==hu)return Promise.reject(cu());var e=hs(this.lb,(function(){return{node:t.F,payload:{Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null},Va:!1}}));return e.wb=function(){},fu(e)},Ls.prototype.detach=Ls.prototype.detach,Ls.prototype.Cd=function(t){var e=this;if(t=void 0===t||t,this.i==hu)return Promise.reject(cu());Qt()||(t=!1);var n={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null},r=hs(this.lb,(function(r){var i=r.v&&t?e.hb:r.v?e.O:e.F;return n.v=r.v,{node:i,payload:n,Va:!1}}));return r.wb=function(){},fu(r)},Ls.prototype.unload=Ls.prototype.Cd,Ls.prototype.load=function(t,e,n){if(this.i==hu)return Promise.reject(cu());this.dispatchEvent(new wt("loading"));var r={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null};r.uri=t,r.zd=Date.now()/1e3,n&&"string"!=typeof n&&(Vn("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),r.Aa=function(){return new n}),n&&"string"==typeof n&&(r.mimeType=n),void 0!==e&&(r.startTime=e);var i=function(t,e){if(e.Aa)return!1;if(!Qt())return!0;var n=e.mimeType,r=e.uri||"";return n||(n={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[yi.getExtension(r)]),!!n&&""!=(e.v||re()).canPlayType(n)&&(!yi.isSupported(r,n)||te()&&t.c.streaming.useNativeHlsOnSafari)}(this,r)?this.jb:this.S,a=hs(this.lb,(function(t){return null==t.v?null:(r.v=t.v,{node:i,payload:r,Va:!0})}));return a.wb=function(){},new Promise((function(t,e){a.rc=function(){return e(new gt(2,7,7002))},a.pc=function(){return t()},a.Ya=function(){return e(cu())},a.onError=function(t){return e(t)}}))},Ls.prototype.load=Ls.prototype.load,Ls.prototype.configure=function(t,e){2==arguments.length&&"string"==typeof t&&(t=bs(t,e));var n=Es(this.c,t,Fs(this));return Ms(this),n},Ls.prototype.configure=Ls.prototype.configure,Ls.prototype.getConfiguration=function(){var t=Fs(this);return Es(t,this.c,Fs(this)),t},Ls.prototype.getConfiguration=Ls.prototype.getConfiguration,Ls.prototype.$f=function(){for(var t in this.c)delete this.c[t];Es(this.c,Fs(this),Fs(this)),Ms(this)},Ls.prototype.resetConfiguration=Ls.prototype.$f,Ls.prototype.We=function(){return this.i},Ls.prototype.getLoadMode=Ls.prototype.We,Ls.prototype.af=function(){return this.a},Ls.prototype.getMediaElement=Ls.prototype.af,Ls.prototype.Mb=function(){return this.K},Ls.prototype.getNetworkingEngine=Ls.prototype.Mb,Ls.prototype.hc=function(){return this.Fb},Ls.prototype.getAssetUri=Ls.prototype.hc,Ls.prototype.Ze=function(){return Vn("getManifestUri",'Please use "getAssetUri" instead.'),this.hc()},Ls.prototype.getManifestUri=Ls.prototype.Ze,Ls.prototype.V=function(){return this.b?this.b.presentationTimeline.V():!(!this.a||!this.a.src)&&1/0==this.a.duration},Ls.prototype.isLive=Ls.prototype.V,Ls.prototype.Xa=function(){return!!this.b&&this.b.presentationTimeline.Xa()},Ls.prototype.isInProgress=Ls.prototype.Xa,Ls.prototype.uf=function(){if(this.b){if(!this.b.periods.length)return!1;var t=this.b.periods[0].variants;return!!t.length&&!t[0].video}return!(!this.a||!this.a.src)&&(this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight)},Ls.prototype.isAudioOnly=Ls.prototype.uf,Ls.prototype.bg=function(){if(this.b){var t=this.b.presentationTimeline;return{start:t.ob(),end:t.Ca()}}return this.a&&this.a.src&&(t=this.a.seekable).length?{start:t.start(0),end:t.end(t.length-1)}:{start:0,end:0}},Ls.prototype.seekRange=Ls.prototype.bg,Ls.prototype.keySystem=function(){return Ae(this.drmInfo())},Ls.prototype.keySystem=Ls.prototype.keySystem,Ls.prototype.drmInfo=function(){return this.h?this.h.a:null},Ls.prototype.drmInfo=Ls.prototype.drmInfo,Ls.prototype.Lb=function(){return this.h?this.h.Lb():1/0},Ls.prototype.getExpiration=Ls.prototype.Lb,Ls.prototype.Xc=function(){return!!this.B&&this.B.a==Sa},Ls.prototype.isBuffering=Ls.prototype.Xc,Ls.prototype.ef=function(){if(this.W){var t=this.W;t=t.f?0:t.c}else t=0;return t},Ls.prototype.getPlaybackRate=Ls.prototype.ef,Ls.prototype.ug=function(t){0==t?q("A trick play rate of 0 is unsupported!"):(this.a.paused&&this.a.play(),this.W.set(t),this.i==gu&&so(this.f,1<Math.abs(t)))},Ls.prototype.trickPlay=Ls.prototype.ug,Ls.prototype.Ge=function(){this.i==yu&&this.W.set(1),this.i==gu&&(this.W.set(1),so(this.f,!1))},Ls.prototype.cancelTrickPlay=Ls.prototype.Ge,Ls.prototype.Vc=function(){if(this.b&&this.m){for(var t=lu(this),e=[],n=f(su(this)),r=n.next();!r.done;r=n.next()){r=r.value;var i=Fn.Ed(r);i.active=r==t,e.push(i)}return e}return this.a&&this.a.audioTracks?Array.from(this.a.audioTracks).map((function(t){return Fn.rf(t)})):[]},Ls.prototype.getVariantTracks=Ls.prototype.Vc,Ls.prototype.qb=function(){if(this.b&&this.m){for(var t=function(t){var e=uu(t);if(null==e)return null;if(!ga(t.$,e).text){var n=Fn.Jb(e.textStreams,t.na,t.fb);n.length&&pa(t.$,e,n[0])}return ga(t.$,e).text}(this),e=[],n=f(function(t){var e=uu(t);return null==e?[]:e.textStreams.filter((function(e){return!t.ac.has(e)}))}(this)),r=n.next();!r.done;r=n.next()){r=r.value;var i=Fn.xc(r);i.active=r==t,e.push(i)}return e}return this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).map((function(t){return Fn.sf(t)})):[]},Ls.prototype.getTextTracks=Ls.prototype.qb,Ls.prototype.td=function(t){if(this.b&&this.f){var e=uu(this),n=e.textStreams.find((function(e){return e.id==t.id}));n&&(Us(this,e,n,!1),Ks(this,n),this.na=n.language)}else if(this.a&&this.a.src&&this.a.textTracks){for(n=(e=f(e=Array.from(this.a.textTracks))).next();!n.done;n=e.next())n=n.value,Fn.Wc(n)==t.id?n.mode=this.gb?"showing":"hidden":n.mode="disabled";Xs(this)}},Ls.prototype.selectTextTrack=Ls.prototype.td,Ls.prototype.dg=function(){Vn("selectEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. Please use SelectTextTrack.");var t=this.qb().filter((function(t){return"application/cea-608"==t.mimeType}));0<t.length&&this.td(t[0])},Ls.prototype.selectEmbeddedTextTrack=Ls.prototype.dg,Ls.prototype.zg=function(){Vn("usingEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. There should be no reason to know if the player is playing embedded text.");var t=this.qb().filter((function(t){return t.active}))[0];return!!t&&"application/cea-608"==t.mimeType},Ls.prototype.usingEmbeddedTextTrack=Ls.prototype.zg,Ls.prototype.fg=function(t,e,n){if(n=void 0===n?0:n,this.b&&this.f){var r=uu(this);this.c.abr.enabled&&q("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var i=r.variants.find((function(e){return e.id==t.id}));i&&Fn.rb(i)&&(Ns(this,r,i,!1),js(this,i,e,n),this.Gb=new _a(i),Hs(this,r.variants))}else if(this.a&&this.a.audioTracks){for(n=(e=f(e=Array.from(this.a.audioTracks))).next();!n.done;n=e.next())n=n.value,Fn.Wc(n)==t.id&&(n.enabled=!0);qs(this)}},Ls.prototype.selectVariantTrack=Ls.prototype.fg,Ls.prototype.Re=function(){return ou(this.Vc())},Ls.prototype.getAudioLanguagesAndRoles=Ls.prototype.Re,Ls.prototype.mf=function(){return ou(this.qb())},Ls.prototype.getTextLanguagesAndRoles=Ls.prototype.mf,Ls.prototype.Qe=function(){return Array.from(au(this.Vc()))},Ls.prototype.getAudioLanguages=Ls.prototype.Qe,Ls.prototype.lf=function(){return Array.from(au(this.qb()))},Ls.prototype.getTextLanguages=Ls.prototype.lf,Ls.prototype.cg=function(t,e){if(this.b&&this.m){var n=uu(this);this.Gb=new Ea(t,e||"",0,"","audio"),zs(this,n)}else if(this.a&&this.a.audioTracks){for(var r=(n=f(n=Array.from(this.a.audioTracks))).next();!r.done;r=n.next())(r=r.value).language==t&&(r.enabled=!0);qs(this)}},Ls.prototype.selectAudioLanguage=Ls.prototype.cg,Ls.prototype.eg=function(t,e){if(this.b&&this.m){var n=uu(this);this.na=t,this.fb=e||"";var r=Fn.Jb(n.textStreams,this.na,this.fb)[0]||null;r&&(Us(this,n,r,!1),(this.c.streaming.alwaysStreamText||this.mc())&&Ks(this,r))}else(n=this.qb().filter((function(e){return e.language==t}))[0])&&this.td(n)},Ls.prototype.selectTextLanguage=Ls.prototype.eg,Ls.prototype.gg=function(t){if(this.b&&this.m){for(var e=uu(this),n=null,r=f(su(this)),i=r.next();!i.done;i=r.next())if((i=i.value).audio.label==t){n=i;break}null!=n&&(this.Gb=new Ea(n.language,"",0,t),zs(this,e))}},Ls.prototype.selectVariantsByLabel=Ls.prototype.gg,Ls.prototype.mc=function(){var t=this.gb;return this.D?this.D.g.isTextVisible():this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).some((function(t){return"showing"==t.mode})):t},Ls.prototype.isTextTrackVisible=Ls.prototype.mc,Ls.prototype.jg=function(t){var e=this;return p((function n(){var r,i,a,o;return N(n,(function(n){switch(n.j){case 1:if(e.gb==(r=!!t))return n.return();if(e.gb=r,e.i!=gu){if(e.a&&e.a.src&&e.a.textTracks)for(var s=f(Array.from(e.a.textTracks)),u=s.next();!u.done;u=s.next())"disabled"!=(i=u.value).mode&&(i.mode=r?"showing":"hidden");n.A(2);break}if(e.D.g.setTextVisibility(r),e.c.streaming.alwaysStreamText){n.A(2);break}if(!r){(s=e.f).D=!0,(u=s.b.get("text"))&&(Co(u),s.b.delete("text")),n.A(2);break}if(a=uu(e),!(0<(o=Fn.Jb(a.textStreams,e.na,e.fb)).length)){n.A(2);break}return w(n,oo(e.f,o[0]),2);case 2:Js(e),S(n)}}))}))},Ls.prototype.setTextTrackVisibility=Ls.prototype.jg,Ls.prototype.gf=function(){if(!this.V())return null;if(this.b)return new Date(1e3*(this.b.presentationTimeline.f+this.a.currentTime));if(this.a&&this.a.getStartDate){var t=this.a.getStartDate();return isNaN(t.getTime())?null:new Date(t.getTime()+1e3*this.a.currentTime)}return null},Ls.prototype.getPlayheadTimeAsDate=Ls.prototype.gf,Ls.prototype.jf=function(){if(!this.V())return null;if(this.b)return new Date(1e3*this.b.presentationTimeline.f);if(this.a&&this.a.getStartDate){var t=this.a.getStartDate();return isNaN(t.getTime())?null:t}return null},Ls.prototype.getPresentationStartTimeAsDate=Ls.prototype.jf,Ls.prototype.Sc=function(){var t={total:[],audio:[],video:[],text:[]};return this.i==yu&&(t.total=Ke(this.a.buffered)),this.i==gu&&this.D.Sc(t),t},Ls.prototype.getBufferedInfo=Ls.prototype.Sc,Ls.prototype.getStats=function(){if(this.i!=gu&&this.i!=yu)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,switchHistory:[],stateHistory:[]};Gs(this);var t=this.a;if(t.getVideoPlaybackQuality){t=t.getVideoPlaybackQuality();var e=this.u,n=Number(t.totalVideoFrames);e.m=Number(t.droppedVideoFrames),e.l=n,this.u.i=Number(t.corruptedVideoFrames)}t=this.h&&(t=this.h).K?t.K:NaN,this.u.h=t,this.i==gu&&((t=lu(this))&&(this.u.s=t.bandwidth),t&&t.video&&(e=this.u,n=t.video.height||NaN,e.u=t.video.width||NaN,e.g=n),t=this.l.getBandwidthEstimate(),this.u.f=t);var r=this.u;t=r.u,e=r.g,n=r.s;for(var i=r.l,a=r.m,o=r.i,s=r.f,u=r.b,l=Ss(r.a,"playing"),c=Ss(r.a,"paused"),d=Ss(r.a,"buffering"),h=r.h,p=function(t){function e(t){return{timestamp:t.timestamp,state:t.state,duration:t.duration}}for(var n=[],r=f(t.b),i=r.next();!i.done;i=r.next())n.push(e(i.value));return t.a&&n.push(e(t.a)),n}(r.a),g=[],y=(r=f(r.c.a)).next();!y.done;y=r.next())y=y.value,g.push({timestamp:y.timestamp,id:y.id,type:y.type,fromAdaptation:y.fromAdaptation,bandwidth:y.bandwidth});return{width:t,height:e,streamBandwidth:n,decodedFrames:i,droppedFrames:a,corruptedFrames:o,estimatedBandwidth:s,loadLatency:u,playTime:l,pauseTime:c,bufferingTime:d,licenseTime:h,stateHistory:p,switchHistory:g}},Ls.prototype.getStats=Ls.prototype.getStats,Ls.prototype.addTextTrack=function(t,e,n,r,i,a){var o=this;return p((function s(){var u,l,c,d,f,h,p,g,y;return N(s,(function(s){switch(s.j){case 1:if(o.i==yu)throw Error("State error!");if(o.i!=gu)throw Error("State error!");if(u=uu(o),l=Ye,c=o.b.periods.indexOf(u),f=(d=c+1)>=o.b.periods.length?o.b.presentationTimeline.Y():o.b.periods[d].startTime,1/0==(h=f-u.startTime))throw new gt(1,4,4033);return p=new Qr(1,0,h,(function(){return[t]}),0,null),g={id:o.Xd++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return 1},getSegmentReference:function(t){return 1==t?p:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:r,codecs:i||"",kind:n,encrypted:!1,keyId:null,language:e,label:a||null,type:l.ra,primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},o.ac.add(g),u.textStreams.push(g),w(s,oo(o.f,g),2);case 2:return(y=ao(o.f,"text"))&&pa(o.$,u,y),o.ac.delete(g),Ys(o,u),Ws(o),s.return(Fn.xc(g))}}))}))},Ls.prototype.addTextTrack=Ls.prototype.addTextTrack,Ls.prototype.vd=function(t,e){this.bc.width=t,this.bc.height=e},Ls.prototype.setMaxHardwareResolution=Ls.prototype.vd,Ls.prototype.sd=function(){if(this.i==gu){var t=this.f;if(t.f)t=!1;else if(t.m)t=!1;else{for(var e=f(t.b.values()),n=e.next();!n.done;n=e.next())(n=n.value).Pb&&(n.Pb=!1,ko(t,n,.1));t=!0}}else t=!1;return t},Ls.prototype.retryStreaming=Ls.prototype.sd,Ls.prototype.Xe=function(){return this.b},Ls.prototype.getManifest=Ls.prototype.Xe,Ls.prototype.Ye=function(){return this.s?this.s.constructor:null},Ls.prototype.getManifestParserFactory=Ls.prototype.Ye,(r=Ls.prototype).Nc=function(t){var e=this.f?ro(this.f):null,n=this.f?io(this.f):null;if(Fn.filterNewPeriod(this.h,e,n,t),!(e=t.variants).some(Fn.rb))throw new gt(2,4,4011);if(ru(this,t.variants),Fn.Gd(e,this.c.restrictions,this.bc)&&this.f&&uu(this)==t&&Ws(this),t=this.h?this.h.a:null)for(n=(e=f(e)).next();!n.done;n=e.next())for(var r=(n=f(n.value.drmInfos)).next();!r.done;r=n.next())if((r=r.value).keySystem==t.keySystem)for(var i=(r=f(r.initData||[])).next();!i.done;i=r.next())i=i.value,be(this.h,i.initDataType,i.initData)},r.zf=function(t){try{this.kb=!0,this.l.disable(),Qs(this);var e=Hs(this,t.variants),n=Fn.Jb(t.textStreams,this.na,this.fb)[0]||null;this.pa&&(t.variants.includes(this.pa)&&(e=this.pa),this.pa=null),this.oa&&(t.textStreams.includes(this.oa)&&(n=this.oa),this.oa=null),e&&Ns(this,t,e,!0),n&&Us(this,t,n,!0);var r=this.f,i=r.b.get("video");if(i)var a=r.c.periods[i.ia];else{var o=r.b.get("audio");a=o?r.c.periods[o.ia]:null}var s=e?e.audio:null;if(!a&&n){var u;if(u=s){t=n;var l=Dn(this.c.preferredTextLanguage),c=Dn(s.language),d=Dn(t.language);u=Pn(d,l)&&!Pn(c,d)}u&&(this.gb=!0),this.gb&&this.D.g.setTextVisibility(!0),Js(this)}return this.c.streaming.alwaysStreamText||this.mc()?{variant:e,text:n}:{variant:e,text:null}}catch(t){return this.Ma(t),{variant:null,text:null}}},r.Fe=function(){this.kb=!1,this.c.abr.enabled&&(this.l.enable(),Qs(this)),this.pa&&(uo(this.f,this.pa,this.Ud,this.Rd),qs(this),this.pa=null),this.oa&&(lo(this.f,this.oa,!0,0,!1),Xs(this),this.oa=null)},r.Ef=function(){this.s&&this.s.update&&this.s.update()},r.Jf=function(){this.m&&this.m.s()},r.Ma=function(t){if(this.i!=hu){var e=new wt("error",{detail:t});this.dispatchEvent(e),e.defaultPrevented&&(t.handled=!0)}};var hu=0,pu=1,gu=2,yu=3;function vu(t,e){var n=as(new is(t.wa(),t.ba()),e.periods[0],new vi(null,0)),r=e.appMetadata||{};return n=mu(n),{offlineUri:t.toString(),originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:e.expiration,tracks:n,appMetadata:r}}function mu(t){for(var e=[],n=Fn.df(t.variants),r=(n=f(n)).next();!r.done;r=n.next())e.push(Fn.Ed(r.value));for(n=(t=f(t.textStreams)).next();!n.done;n=t.next())e.push(Fn.xc(n.value));return e}function bu(){this.a={}}function Au(t,e){var n=e.audio,r=e.video;if(n&&!r&&(t.a[n.id]=n.bandwidth||e.bandwidth),!n&&r&&(t.a[r.id]=r.bandwidth||e.bandwidth),n&&r){var i=n.bandwidth||393216,a=r.bandwidth||e.bandwidth-i;0>=a&&(a=e.bandwidth),t.a[n.id]=i,t.a[r.id]=a}}function _u(t,e){var n=t.a[e];return null==n&&(n=0),n}function Eu(t){this.a=!1,this.b=new yt,this.c=t}function Tu(t){var e=new Su;t.periods.forEach((function(t,n){var r=Cu(t.variants);if(0==n)for(var i=(r=f(r.a)).next();!i.done;i=r.next())e.add(i.value);else!function(t,e){t.a=t.a.filter((function(t){return ku(e,t)}))}(e,r)}));for(var n=(t=f(t.periods)).next();!n.done;n=t.next())(n=n.value).variants=n.variants.filter((function(t){return ku(e,new wu(t))}))}function wu(t){var e=t.audio;t=t.video,this.b=e?e.mimeType:null,this.a=e?e.codecs.split(".")[0]:null,this.f=t?t.mimeType:null,this.c=t?t.codecs.split(".")[0]:null}function Su(){this.a=[]}function ku(t,e){return t.a.some((function(t){return e.b==t.b&&e.a==t.a&&e.f==t.f&&e.c==t.c}))}function Cu(t){for(var e=new Su,n=(t=f(t)).next();!n.done;n=t.next())e.add(new wu(n.value));return e}function Lu(t){var e=this;if(t&&t.constructor!=Ls)throw new gt(2,9,9008);this.b=this.a=null,t?(this.a=t.c,this.b=t.Mb()):(this.a=_s(),this.b=new Ot),this.f=!1,this.c=[],this.g=[];var n=!t;this.h=new Eu((function(){return p((function t(){var r;return N(t,(function(t){switch(t.j){case 1:return r=function(){},w(t,Promise.all(e.g.map((function(t){return t.then(r,r)}))),2);case 2:if(!n){t.A(3);break}return w(t,e.b.destroy(),3);case 3:e.a=null,e.b=null,S(t)}}))}))}))}function xu(){if(Qt())t:{for(var t=f(Wo.values()),e=t.next();!e.done;e=t.next())if(e=(e=e.value)()){e.destroy(),t=!0;break t}t=!1}else t=!1;return t}function Ru(t,e){for(var n=[],r=f(t.periods),i=r.next();!i.done;i=r.next())for(var a=(i=f(i.value.streams)).next();!a.done;a=i.next())a=a.value,e&&"video"==a.contentType?n.push({contentType:qt(a.mimeType,a.codecs),robustness:t.drmInfo.videoRobustness}):e||"audio"!=a.contentType||n.push({contentType:qt(a.mimeType,a.codecs),robustness:t.drmInfo.audioRobustness});return n}function Iu(t,e,n){return p((function r(){return N(r,(function(r){switch(r.j){case 1:return w(r,function(t,e,n,r){return p((function i(){var a,o,s;return N(i,(function(i){switch(i.j){case 1:return r.drmInfo?(a=function(t){var e=Array.from(t.a.keys());if(!e.length)throw new gt(2,9,9e3,"No supported storage mechanisms found");return t.a.get(e[0]).getEmeSessionCell()}(n),o=r.sessionIds.map((function(t){return{sessionId:t,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:Ru(r,!1),videoCapabilities:Ru(r,!0)}})),w(i,cs(e,t,o),2)):i.return();case 2:return s=i.o,w(i,a.remove(s),3);case 3:return w(i,a.add(o.filter((function(t){return-1==s.indexOf(t.sessionId)}))),0)}}))}))}(t.b,t.a.drm,n,e),0)}}))}))}function Pu(t,e,n,r){function i(){s+=1,t.a.offline.progressCallback(u,s/o)}var a=function(t){var e=[];return t.periods.forEach((function(t){t.streams.forEach((function(t){null!=t.initSegmentKey&&e.push(t.initSegmentKey),t.segments.forEach((function(t){e.push(t.dataKey)}))}))})),e}(r),o=a.length+1,s=0,u=vu(n,r);return Promise.all([e.removeSegments(a,i),e.removeManifests([n.key()],i)])}function Ou(t,e,n,r,i,a){var o={id:a.id,originalId:a.originalId,primary:a.primary,presentationTimeOffset:a.presentationTimeOffset||0,contentType:a.type,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,kind:a.kind,language:a.language,label:a.label,width:a.width||null,height:a.height||null,initSegmentKey:null,encrypted:a.encrypted,keyId:a.keyId,segments:[],variantIds:[]};i=i.presentationTimeline.Ob();var s=a.id,u=a.initSegmentReference;return u&&(u=mi(u.c(),u.b,u.a,t.a.streaming.retryParameters),Do(e,s,u,.5*_u(r,a.id),!0,(function(e){return p((function r(){var i;return N(r,(function(r){switch(r.j){case 1:return w(r,n.addSegments([{data:e}]),2);case 2:i=r.o,t.c.push(i[0]),o.initSegmentKey=i[0],S(r)}}))}))}))),function(t,e,n){for(var r=null==(e=t.findSegmentPosition(e))?null:t.getSegmentReference(e);r;)n(r),r=t.getSegmentReference(++e)}(a,i,(function(i){var u=mi(i.c(),i.b,i.a,t.a.streaming.retryParameters);Do(e,s,u,function(t,e,n){return n=n.endTime-n.startTime,_u(t,e)*n}(r,a.id,i),!1,(function(e){return p((function r(){var a;return N(r,(function(r){switch(r.j){case 1:return w(r,n.addSegments([{data:e}]),2);case 2:a=r.o,t.c.push(a[0]),o.segments.push({startTime:i.startTime,endTime:i.endTime,dataKey:a[0]}),S(r)}}))}))}))})),o}function Du(t){if(t.h.a)throw new gt(2,9,7001)}function Mu(){if(!xu())throw new gt(2,9,9e3)}function Nu(t,e){return p((function n(){return N(n,(function(n){switch(n.j){case 1:return t.g.push(e),C(n,2),w(n,e,4);case 4:return n.return(n.o);case 2:R(n),xt(t.g,e),I(n,0)}}))}))}function Uu(t){t.variants.map((function(t){return t.video}));var e=new Set(t.variants.map((function(t){return t.audio})));t=t.textStreams;for(var n=f(e),r=n.next();!r.done;r=n.next())for(var i=(r=f(e)).next();!i.done;i=r.next());for(n=(e=f(t)).next();!n.done;n=e.next())for(r=(n=f(t)).next();!r.done;r=n.next());}Ls.LoadMode={DESTROYED:hu,NOT_LOADED:pu,MEDIA_SOURCE:gu,SRC_EQUALS:yu},Eu.prototype.destroy=function(){var t=this;return this.a?this.b:(this.a=!0,this.c().then((function(){t.b.resolve()}),(function(){t.b.resolve()})))},Su.prototype.add=function(t){ku(this,t)||this.a.push(t)},V("shaka.offline.Storage",Lu),Lu.support=xu,Lu.prototype.destroy=function(){return this.h.destroy()},Lu.prototype.destroy=Lu.prototype.destroy,Lu.prototype.configure=function(t,e){2==arguments.length&&"string"==typeof t&&(t=bs(t,e));var n=t,r=!1;return null!=n.trackSelectionCallback&&(r=!0,n.offline=n.offline||{},n.offline.trackSelectionCallback=n.trackSelectionCallback,delete n.trackSelectionCallback),null!=n.progressCallback&&(r=!0,n.offline=n.offline||{},n.offline.progressCallback=n.progressCallback,delete n.progressCallback),null!=n.usePersistentLicense&&(r=!0,n.offline=n.offline||{},n.offline.usePersistentLicense=n.usePersistentLicense,delete n.usePersistentLicense),r&&Vn("Storage.configure with OfflineConfig","Please configure storage with a player configuration."),Es(this.a,t)},Lu.prototype.configure=Lu.prototype.configure,Lu.prototype.getConfiguration=function(){var t=_s();return Es(t,this.a,_s()),t},Lu.prototype.getConfiguration=Lu.prototype.getConfiguration,Lu.prototype.Mb=function(){return this.b},Lu.prototype.getNetworkingEngine=Lu.prototype.Mb,Lu.prototype.store=function(t,e,n){var r=this;return Nu(this,function(t,e,n,r){return p((function i(){var a,o,s,u,l,c,d,h,g;return N(i,(function(i){switch(i.j){case 1:return Mu(),t.f?i.return(Promise.reject(new gt(2,9,9006))):(t.f=!0,w(i,function(t,e,n){return p((function r(){var i,a,o,s,u,l;return N(r,(function(r){switch(r.j){case 1:return i=null,a=t.b,o={networkingEngine:a,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(t){i=t}},w(r,n(),2);case 2:return(s=r.o).configure(t.a.manifest),Du(t),C(r,3),w(r,s.start(e,o),5);case 5:return u=r.o,Du(t),l=function(t){for(var e=new Set,n=(t=f(t.periods)).next();!n.done;n=t.next()){for(var r=f((n=n.value).textStreams),i=r.next();!i.done;i=r.next())e.add(i.value);for(n=f(n.variants),r=n.next();!r.done;r=n.next())(r=r.value).audio&&e.add(r.audio),r.video&&e.add(r.video)}return e}(u),w(r,Promise.all(Yt(l,(function(t){return t.createSegmentIndex()}))),6);case 6:if(Du(t),i)throw i;return r.return(u);case 3:return R(r),w(r,s.stop(),7);case 7:I(r,0)}}))}))}(t,e,r),2));case 2:if(a=i.o,Du(t),a.presentationTimeline.V()||a.presentationTimeline.Xa())throw new gt(2,9,9005,e);return o=null,s=new Yo,l=u=null,k(i,3,4),w(i,function(t,e,n){return p((function r(){var i,a,o;return N(r,(function(r){switch(r.j){case 1:return i=new pe({ub:t.b,onError:n,qc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),a=Da(e.periods),o=t.a,i.configure(o.drm),w(r,function(t,e,n){return t.s=[],t.D=n,ye(t,e)}(i,a,o.offline.usePersistentLicense),2);case 2:return w(r,ve(i),3);case 3:return w(r,me(i),4);case 4:return r.return(i)}}))}))}(t,a,(function(t){l=l||t})),6);case 6:if(o=i.o,Du(t),l)throw l;return w(i,function(t,e,n){return p((function r(){var i;return N(r,(function(r){switch(r.j){case 1:return i={width:1/0,height:1/0},function(t,e,n){for(var r=(t=f(t.periods)).next();!r.done;r=t.next())(r=r.value).variants=r.variants.filter((function(t){return Fn.bd(t,e,n)}))}(e,t.a.restrictions,i),function(t){for(var e=(t=f(t.periods)).next();!e.done;e=t.next())(e=e.value).variants=e.variants.filter((function(t){var e=!0;return t.audio&&(e=e&&An(t.audio)),t.video&&(e=e&&An(t.video)),e}))}(e),function(t,e){for(var n=f(t.periods),r=n.next();!r.done;r=n.next())(r=r.value).variants=r.variants.filter((function(t){return xe(e,t)}))}(e,n),Tu(e),w(r,function(t,e){return p((function n(){var r,i,a,o;return N(n,(function(n){switch(n.j){case 1:r=null,i=f(t.periods),a=i.next();case 2:if(a.done){n.A(0);break}return o=a.value,r&&(o.variants=o.variants.filter((function(t){return ku(r,new wu(t))}))),w(n,e(o),5);case 5:r=Cu(o.variants),a=i.next(),n.A(2)}}))}))}(e,(function(e){return p((function n(){var r,i,a,o,s,u,l,c;return N(n,(function(n){switch(n.j){case 1:r=Fn,i=[];for(var d=f(e.variants),h=d.next();!h.done;h=d.next())a=h.value,i.push(r.Ed(a));for(h=(d=f(e.textStreams)).next();!h.done;h=d.next())o=h.value,i.push(r.xc(o));return w(n,t.a.offline.trackSelectionCallback(i),2);case 2:for(s=n.o,u=new Set,l=new Set,h=(d=f(s)).next();!h.done;h=d.next())"variant"==(c=h.value).type&&u.add(c.id),"text"==c.type&&l.add(c.id);e.variants=e.variants.filter((function(t){return u.has(t.id)})),e.textStreams=e.textStreams.filter((function(t){return l.has(t.id)})),S(n)}}))}))})),2);case 2:(function(t){if(0==t.periods.length)throw new gt(2,4,4014);for(var e=(t=f(t.periods)).next();!e.done;e=t.next())Uu(e.value)})(e),S(r)}}))}))}(t,a,o),7);case 7:return w(i,s.init(),8);case 8:return Du(t),w(i,function(t){var e=null;if(t.a.forEach((function(t,n){t.getCells().forEach((function(t,r){t.hasFixedKeySpace()||e||(e={path:{wa:n,ba:r},ba:t})}))})),e)return e;throw new gt(2,9,9013,"Could not find a cell that supports add-operations")}(s),9);case 9:return u=i.o,Du(t),w(i,function(t,e,n,r,i,a){return p((function o(){var s,u,l,c,d,h,g,y,v,m;return N(o,(function(o){switch(o.j){case 1:return s=function(t,e,n){var r=null==e.expiration?1/0:e.expiration;return{offlineUri:null,originalManifestUri:t,duration:e.presentationTimeline.Y(),size:0,expiration:r,tracks:e=mu(e.periods[0]),appMetadata:n}}(i,r,a),u=r.periods.some((function(t){return t.variants.some((function(t){return t.drmInfos&&t.drmInfos.length}))})),l=r.periods.some((function(t){return t.variants.some((function(t){return t.drmInfos.some((function(t){return t.initData&&t.initData.length}))}))})),d=null,(c=u&&!l)&&(h=n.a,d=Fu.get(h.keySystem)),g=new Oo(t.b,(function(e,n){s.size=n,t.a.offline.progressCallback(s,e)}),(function(e,r){c&&t.a.offline.usePersistentLicense&&d==r&&be(n,"cenc",e)})),C(o,2),v=y=function(t,e,n,r,i,a,o){var s=new bu,u=i.periods.map((function(r){return function(t,e,n,r,i,a){for(var o=f(a.variants),s=o.next();!s.done;s=o.next())Au(r,s.value);for(o=f(a.textStreams),s=o.next();!s.done;s=o.next())r.a[s.value.id]=52;o=function(t){for(var e=new Set,n=f(t.textStreams),r=n.next();!r.done;r=n.next())e.add(r.value);for(t=f(t.variants),n=t.next();!n.done;n=t.next())(n=n.value).audio&&e.add(n.audio),n.video&&e.add(n.video);return e}(a);var u=new Map;for(o=f(o),s=o.next();!s.done;s=o.next()){s=s.value;var l=Ou(t,e,n,r,i,s);u.set(s.id,l)}return a.variants.forEach((function(t){t.audio&&u.get(t.audio.id).variantIds.push(t.id),t.video&&u.get(t.video.id).variantIds.push(t.id)})),{startTime:a.startTime,streams:Array.from(u.values())}}(t,e,n,s,i,r)})),l=r.a,c=t.a.offline.usePersistentLicense;return l&&c&&(l.initData=[]),{originalManifestUri:a,duration:i.presentationTimeline.Y(),size:0,expiration:r.Lb(),periods:u,sessionIds:c?Ee(r):[],drmInfo:l,appMetadata:o}}(t,g,e,n,r,i,a),w(o,function(t){return p((function e(){return N(e,(function(e){switch(e.j){case 1:return w(e,Promise.all(t.b.values()),2);case 2:return e.return(t.a.a)}}))}))}(g),4);case 4:if(v.size=o.o,y.expiration=n.Lb(),m=Ee(n),y.sessionIds=t.a.offline.usePersistentLicense?m:[],u&&t.a.offline.usePersistentLicense&&!m.length)throw new gt(2,9,9007);return o.return(y);case 2:return R(o),w(o,g.destroy(),5);case 5:I(o,0)}}))}))}(t,u.ba,o,a,e,n),10);case 10:if(c=i.o,Du(t),l)throw l;return w(i,u.ba.addManifests([c]),11);case 11:return d=i.o,Du(t),h=new ns("manifest",u.path.wa,u.path.ba,d[0]),i.return(vu(h,c));case 4:return R(i),t.f=!1,t.c=[],w(i,s.destroy(),12);case 12:if(!o){i.A(13);break}return w(i,o.destroy(),13);case 13:I(i,0);break;case 3:if(g=x(i),!u){i.A(15);break}return w(i,u.ba.removeSegments(t.c,(function(){})),15);case 15:throw l||g}}))}))}(this,t,e||{},(function(){return p((function e(){var i,a;return N(e,(function(e){switch(e.j){case 1:return n&&"string"!=typeof n?(Vn("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),i=n,e.return(new i)):w(e,yi.create(t,r.b,r.a.manifest.retryParameters,n),2);case 2:return a=e.o,e.return(a)}}))}))})))},Lu.prototype.store=Lu.prototype.store,Lu.prototype.kf=function(){return this.f},Lu.prototype.getStoreInProgress=Lu.prototype.kf,Lu.prototype.remove=function(t){return Nu(this,function(t,e){return p((function n(){var r,i,a,o,s,u;return N(n,(function(n){switch(n.j){case 1:return Mu(),null==(r=rs(e))||"manifest"!=r.a?n.return(Promise.reject(new gt(2,9,9004,e))):(i=r,a=new Yo,C(n,2),w(n,a.init(),4));case 4:return w(n,zo(a,i.wa(),i.ba()),5);case 5:return w(n,(o=n.o).getManifests([i.key()]),6);case 6:return s=n.o,u=s[0],w(n,Promise.all([Iu(t,u,a),Pu(t,o,i,u)]),2);case 2:return R(n),w(n,a.destroy(),8);case 8:I(n,0)}}))}))}(this,t))},Lu.prototype.remove=Lu.prototype.remove,Lu.prototype.Xf=function(){return Nu(this,function(t){return p((function e(){var n,r,i,a,o,s,u,l,c;return N(e,(function(e){switch(e.j){case 1:return Mu(),n=t.b,r=t.a.drm,i=new Yo,a=!1,C(e,2),w(e,i.init(),4);case 4:for(o=[],function(t,e){t.a.forEach((function(t){e(t.getEmeSessionCell())}))}(i,(function(t){return o.push(t)})),s=Promise.resolve(),u={},l=f(o),c=l.next();!c.done;u={wc:u.wc},c=l.next())u.wc=c.value,s=s.then(function(t){return function(){return p((function e(){var i,o;return N(e,(function(e){switch(e.j){case 1:return w(e,t.wc.getAll(),2);case 2:return i=e.o,w(e,cs(r,n,i),3);case 3:return o=e.o,w(e,t.wc.remove(o),4);case 4:o.length!=i.length&&(a=!0),S(e)}}))}))}}(u));return w(e,s,2);case 2:return R(e),w(e,i.destroy(),6);case 6:I(e,3);break;case 3:return e.return(!a)}}))}))}(this))},Lu.prototype.removeEmeSessions=Lu.prototype.Xf,Lu.prototype.list=function(){return Nu(this,p((function t(){var e,n,r;return N(t,(function(t){switch(t.j){case 1:return Mu(),e=[],n=new Yo,C(t,2),w(t,n.init(),4);case 4:return r=Promise.resolve(),function(t,e){t.a.forEach((function(t,n){t.getCells().forEach((function(t,r){e({wa:n,ba:r},t)}))}))}(n,(function(t,n){r=r.then((function(){return p((function r(){return N(r,(function(r){switch(r.j){case 1:return w(r,n.getAllManifests(),2);case 2:r.o.forEach((function(n,r){var i=vu(new ns("manifest",t.wa,t.ba,r),n);e.push(i)})),S(r)}}))}))}))})),w(t,r,2);case 2:return R(t),w(t,n.destroy(),6);case 6:I(t,3);break;case 3:return t.return(e)}}))})))},Lu.prototype.list=Lu.prototype.list,Lu.deleteAll=function(){return p((function t(){var e;return N(t,(function(t){switch(t.j){case 1:return e=new Yo,C(t,2),w(t,e.erase(),2);case 2:return R(t),w(t,e.destroy(),5);case 5:I(t,0)}}))}))};var Fu=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");Is.offline=xu,V("shaka.polyfill.installAll",(function(){for(var t=0;t<Ku.length;++t)try{Ku[t].De()}catch(t){q("Error installing polyfill!",t)}}));var Bu,ju,Ku=[];function Vu(t,e){for(var n={priority:e=e||0,De:t},r=0;r<Ku.length;r++)if(Ku[r].priority<e)return void Ku.splice(r,0,n);Ku.push(n)}function Gu(t){var e=t.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"==typeof Event)var n=new Event(e,t);else(n=document.createEvent("Event")).initEvent(e,t.bubbles,t.cancelable);t.target.dispatchEvent(n)}function Hu(t,e,n){if("input"==t)switch(this.type){case"range":t="change"}HTMLInputElement.prototype.originalAddEventListener.call(this,t,e,n)}function Yu(){var t=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(e){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];return(n=t.apply(this,n)).abort=function(){},n}}function zu(t,e){try{var n=new $u(t,e);return Promise.resolve(n)}catch(t){return Promise.reject(t)}}function $u(t,e){if(this.keySystem=t,t.startsWith("com.apple.fps"))for(var n=f(e),r=n.next();!r.done;r=n.next()){var i=r.value;if("required"==i.persistentState)r=null;else{r={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:i.initDataTypes,sessionTypes:["temporary"],label:i.label};var a=!1,o=!1;if(i.audioCapabilities)for(var s=f(i.audioCapabilities),u=s.next();!u.done;u=s.next())if((u=u.value).contentType){a=!0;var l=u.contentType.split(";")[0];WebKitMediaKeys.isTypeSupported(this.keySystem,l)&&(r.audioCapabilities.push(u),o=!0)}if(i.videoCapabilities)for(u=(i=f(i.videoCapabilities)).next();!u.done;u=i.next())(s=u.value).contentType&&(a=!0,u=s.contentType.split(";")[0],WebKitMediaKeys.isTypeSupported(this.keySystem,u)&&(r.videoCapabilities.push(s),o=!0));a||(o=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),r=o?r:null}if(r)return void(this.a=r)}throw(n=Error("Unsupported keySystem")).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function Wu(t){var e=this.mediaKeys;return e&&e!=t&&Xu(e,null),delete this.mediaKeys,(this.mediaKeys=t)?Xu(t,this):Promise.resolve()}function qu(t){this.b=new WebKitMediaKeys(t),this.a=new jt}function Xu(t,e){if(t.a.$a(),!e)return Promise.resolve();t.a.w(e,"webkitneedkey",Qu);try{return 1<=e.readyState?e.webkitSetMediaKeys(t.b):t.a.da(e,"loadedmetadata",(function(){e.webkitSetMediaKeys(t.b)})),Promise.resolve()}catch(t){return Promise.reject(t)}}function Ju(t){kt.call(this),this.b=null,this.g=t,this.c=this.a=null,this.f=new jt,this.sessionId="",this.expiration=NaN,this.closed=new yt,this.keyStatuses=new tl}function Qu(t){var e=new Event("encrypted");e.initDataType="cenc",e.initData=t.initData,this.dispatchEvent(e)}function Zu(t,e){var n=t.keyStatuses;n.size=null==e?0:1,n.a=e,t.dispatchEvent(new wt("keystatuseschange"))}function tl(){this.size=0,this.a=void 0}function el(t,e){try{var n=new nl(t,e);return Promise.resolve(n)}catch(t){return Promise.reject(t)}}function nl(t,e){this.keySystem=t;for(var n=!1,r=0;r<e.length;++r){var i=e[r],a={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:i.initDataTypes,sessionTypes:["temporary"],label:i.label},o=!1;if(i.audioCapabilities)for(var s=0;s<i.audioCapabilities.length;++s){var u=i.audioCapabilities[s];if(u.contentType){o=!0;var l=u.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,l)&&(a.audioCapabilities.push(u),n=!0)}}if(i.videoCapabilities)for(s=0;s<i.videoCapabilities.length;++s)(u=i.videoCapabilities[s]).contentType&&(o=!0,l=u.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,l)&&(a.videoCapabilities.push(u),n=!0));if(o||(n=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),"required"==i.persistentState&&(n=!1),n)return void(this.a=a)}throw(n=Error("Unsupported keySystem")).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function rl(t){var e=this.mediaKeys;return e&&e!=t&&al(e,null),delete this.mediaKeys,(this.mediaKeys=t)?al(t,this):Promise.resolve()}function il(t){this.a=new MSMediaKeys(t),this.b=new jt}function al(t,e){if(t.b.$a(),!e)return Promise.resolve();t.b.w(e,"msneedkey",sl);var n=t;try{return 1<=e.readyState?e.msSetMediaKeys(t.a):e.addEventListener("loadedmetadata",(function t(){e.msSetMediaKeys(n.a),e.removeEventListener("loadedmetadata",t)})),Promise.resolve()}catch(t){return Promise.reject(t)}}function ol(t){kt.call(this),this.c=null,this.g=t,this.b=this.a=null,this.f=new jt,this.sessionId="",this.expiration=NaN,this.closed=new yt,this.keyStatuses=new ll}function sl(t){if(t.initData){var e=document.createEvent("CustomEvent");e.initCustomEvent("encrypted",!1,!1,null),e.initDataType="cenc",e.initData=function(t){if(!t)return t;var e=new Br(t);if(1>=e.data.length)return t;t=[];for(var n={},r=(e=f(e.data)).next();!r.done;n={lc:n.lc},r=e.next())n.lc=r.value,t.some(function(t){return function(e){return he.za(e,t.lc)}}(n))||t.push(n.lc);return he.concat.apply(he,t instanceof Array?t:function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(f(t)))}(t.initData),this.dispatchEvent(e)}}function ul(t,e){var n=t.keyStatuses;n.size=null==e?0:1,n.a=e,t.dispatchEvent(new wt("keystatuseschange"))}function ll(){this.size=0,this.a=void 0}function cl(){return Promise.reject(Error("The key system specified is not supported."))}function dl(t){return null==t?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function fl(){throw new TypeError("Illegal constructor.")}function hl(){throw new TypeError("Illegal constructor.")}V("shaka.polyfill.register",Vu),Vu((function(){wc()}),-1),Vu((function(){if(t.Document){var e=Element.prototype;e.requestFullscreen=e.requestFullscreen||e.mozRequestFullScreen||e.msRequestFullscreen||e.webkitRequestFullscreen,(e=Document.prototype).exitFullscreen=e.exitFullscreen||e.mozCancelFullScreen||e.msExitFullscreen||e.webkitExitFullscreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",Gu),document.addEventListener("webkitfullscreenerror",Gu),document.addEventListener("mozfullscreenchange",Gu),document.addEventListener("mozfullscreenerror",Gu),document.addEventListener("MSFullscreenChange",Gu),document.addEventListener("MSFullscreenError",Gu)}})),Vu((function(){var e=!1;if(ne("CrKey"))e=!0;else try{t.indexedDB&&(e=!1)}catch(t){e=!0}e&&delete t.indexedDB})),Vu((function(){ne("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Hu)})),Vu((function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})})),Vu((function(){})),Vu((function(){var e=ee();t.MediaSource&&(t.cast&&cast.__platform__&&cast.__platform__.canDisplayType?function(){var t=MediaSource.isTypeSupported,e=/^dv(?:h[e1]|a[v1])\./;MediaSource.isTypeSupported=function(n){for(var r=n.split(/ *; */),i=r[0],a={},o=1;o<r.length;++o){var s=r[o].split("="),u=s[0];s=s[1].replace(/"(.*)"/,"$1"),a[u]=s}if(!(r=a.codecs))return t(n);var l=!1,c=!1;for(var d in n=r.split(",").filter((function(t){return e.test(t)&&(c=!0),/^(hev|hvc)1\.2/.test(t)&&(l=!0),!0})),c&&(l=!1),a.codecs=n.join(","),l&&(a.eotf="smpte2084"),a)i+="; "+d+'="'+a[d]+'"';return cast.__platform__.canDisplayType(i)}}():e?(function(){var t=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(e){return"mp2t"!=e.split(/ *; */)[0].split("/")[1].toLowerCase()&&t(e)}}(),12>=e?(Yu(),function(){var t=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(e,n){return t.call(this,e,n-.001)}}()):Yu()):ne("Tizen")&&function(){var t=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(e){return"opus"!=Xt(e)[0]&&t(e)}}())})),$u.prototype.createMediaKeys=function(){var t=new qu(this.keySystem);return Promise.resolve(t)},$u.prototype.getConfiguration=function(){return this.a},qu.prototype.createSession=function(t){if("temporary"!=(t=t||"temporary"))throw new TypeError("Session type "+t+" is unsupported on this platform.");return new Ju(this.b,t)},qu.prototype.setServerCertificate=function(t){return t&&new Uint8Array(t),Promise.resolve(!0)},G(Ju,kt),(r=Ju.prototype).generateRequest=function(t,e){this.a=new yt;try{this.b=this.g.createSession("video/mp4",new Uint8Array(e)),this.sessionId=this.b.sessionId||"",this.f.w(this.b,"webkitkeymessage",this.og.bind(this)),this.f.w(this.b,"webkitkeyadded",this.mg.bind(this)),this.f.w(this.b,"webkitkeyerror",this.ng.bind(this)),Zu(this,"status-pending")}catch(t){this.a.reject(t)}return this.a},r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},r.update=function(t){this.c=new yt;try{this.b.update(new Uint8Array(t))}catch(t){this.c.reject(t)}return this.c},r.close=function(){try{this.b.close(),this.closed.resolve(),this.f.$a()}catch(t){this.closed.reject(t)}return this.closed},r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},r.og=function(t){this.a&&(this.a.resolve(),this.a=null),this.dispatchEvent(new wt("message",{messageType:null==this.keyStatuses.a?"license-request":"license-renewal",message:t.message.buffer}))},r.mg=function(){this.c&&(Zu(this,"usable"),this.c.resolve(),this.c=null)},r.ng=function(){var t=Error("EME PatchedMediaKeysApple key error");if(t.errorCode=this.b.error,null!=this.a)this.a.reject(t),this.a=null;else if(null!=this.c)this.c.reject(t),this.c=null;else switch(this.b.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Zu(this,"output-not-allowed");break;default:Zu(this,"internal-error")}},(r=tl.prototype).forEach=function(t){this.a&&t(this.a,Bu)},r.get=function(t){if(this.has(t))return this.a},r.has=function(t){var e=Bu;return!(!this.a||!he.za(new Uint8Array(t),new Uint8Array(e)))},r.entries=function(){},r.keys=function(){},r.values=function(){},Vu((function(){t.HTMLVideoElement&&t.WebKitMediaKeys&&(Bu=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Wu,t.MediaKeys=qu,t.MediaKeySystemAccess=$u,navigator.requestMediaKeySystemAccess=zu)})),nl.prototype.createMediaKeys=function(){var t=new il(this.keySystem);return Promise.resolve(t)},nl.prototype.getConfiguration=function(){return this.a},il.prototype.createSession=function(t){if("temporary"!=(t=t||"temporary"))throw new TypeError("Session type "+t+" is unsupported on this platform.");return new ol(this.a,t)},il.prototype.setServerCertificate=function(){return Promise.resolve(!1)},G(ol,kt),(r=ol.prototype).generateRequest=function(t,e){this.a=new yt;try{this.c=this.g.createSession("video/mp4",new Uint8Array(e),null),this.f.w(this.c,"mskeymessage",this.If.bind(this)),this.f.w(this.c,"mskeyadded",this.Gf.bind(this)),this.f.w(this.c,"mskeyerror",this.Hf.bind(this)),ul(this,"status-pending")}catch(t){this.a.reject(t)}return this.a},r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},r.update=function(t){this.b=new yt;try{this.c.update(new Uint8Array(t))}catch(t){this.b.reject(t)}return this.b},r.close=function(){try{this.c.close(),this.closed.resolve(),this.f.$a()}catch(t){this.closed.reject(t)}return this.closed},r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},r.If=function(t){this.a&&(this.a.resolve(),this.a=null),this.dispatchEvent(new wt("message",{messageType:null==this.keyStatuses.a?"license-request":"license-renewal",message:t.message.buffer}))},r.Gf=function(){this.a?(ul(this,"usable"),this.a.resolve(),this.a=null):this.b&&(ul(this,"usable"),this.b.resolve(),this.b=null)},r.Hf=function(){var t=Error("EME PatchedMediaKeysMs key error");if(t.errorCode=this.c.error,null!=this.a)this.a.reject(t),this.a=null;else if(null!=this.b)this.b.reject(t),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:ul(this,"output-not-allowed");break;default:ul(this,"internal-error")}},(r=ll.prototype).forEach=function(t){this.a&&t(this.a,ju)},r.get=function(t){if(this.has(t))return this.a},r.has=function(t){var e=ju;return!(!this.a||!he.za(new Uint8Array(t),new Uint8Array(e)))},r.entries=function(){},r.keys=function(){},r.values=function(){},Vu((function(){!t.HTMLVideoElement||!t.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(ju=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=rl,t.MediaKeys=il,t.MediaKeySystemAccess=nl,navigator.requestMediaKeySystemAccess=el)})),fl.prototype.createSession=function(){},fl.prototype.setServerCertificate=function(){},hl.prototype.getConfiguration=function(){},hl.prototype.createMediaKeys=function(){},Vu((function(){!t.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=cl,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=dl,t.MediaKeys=fl,t.MediaKeySystemAccess=hl)}),-10);var pl,gl="";function yl(t){return gl?gl+t.charAt(0).toUpperCase()+t.slice(1):t}function vl(t,e){try{var n=new bl(t,e);return Promise.resolve(n)}catch(t){return Promise.reject(t)}}function ml(t){var e=this.mediaKeys;return e&&e!=t&&_l(e,null),delete this.mediaKeys,(this.mediaKeys=t)&&_l(t,this),Promise.resolve()}function bl(t,e){this.a=this.keySystem=t;var n=!1;"org.w3.clearkey"==t&&(this.a="webkit-org.w3.clearkey",n=!1);var r=!1,i=document.getElementsByTagName("video");i=i.length?i[0]:document.createElement("video");for(var a=0;a<e.length;++a){var o=e[a],s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:o.initDataTypes,sessionTypes:["temporary"],label:o.label},u=!1;if(o.audioCapabilities)for(var l=0;l<o.audioCapabilities.length;++l){var c=o.audioCapabilities[l];if(c.contentType){u=!0;var d=c.contentType.split(";")[0];i.canPlayType(d,this.a)&&(s.audioCapabilities.push(c),r=!0)}}if(o.videoCapabilities)for(l=0;l<o.videoCapabilities.length;++l)(c=o.videoCapabilities[l]).contentType&&(u=!0,i.canPlayType(c.contentType,this.a)&&(s.videoCapabilities.push(c),r=!0));if(u||(r=i.canPlayType("video/mp4",this.a)||i.canPlayType("video/webm",this.a)),"required"==o.persistentState&&(n?(s.persistentState="required",s.sessionTypes=["persistent-license"]):r=!1),r)return void(this.b=s)}throw n="Unsupported keySystem","org.w3.clearkey"!=t&&"com.widevine.alpha"!=t||(n="None of the requested configurations were supported."),(n=Error(n)).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function Al(t){this.g=t,this.b=null,this.a=new jt,this.c=[],this.f={}}function _l(t,e){t.b=e,t.a.$a();var n=gl;e&&(t.a.w(e,n+"needkey",t.Mf.bind(t)),t.a.w(e,n+"keymessage",t.rg.bind(t)),t.a.w(e,n+"keyadded",t.pg.bind(t)),t.a.w(e,n+"keyerror",t.qg.bind(t)))}function El(t,e){var n=t.f[e];return n||((n=t.c.shift())?(n.sessionId=e,t.f[e]=n):null)}function Tl(t,e,n){kt.call(this),this.f=t,this.h=!1,this.a=this.b=null,this.c=e,this.g=n,this.sessionId="",this.expiration=NaN,this.closed=new yt,this.keyStatuses=new kl}function wl(t,e,n){if(t.h)return Promise.reject(Error("The session is already initialized."));t.h=!0;try{if("persistent-license"==t.g)if(n)var r=new Uint8Array(le("LOAD_SESSION|"+n));else{var i=le("PERSISTENT|"),a=new Uint8Array(i.byteLength+e.byteLength);a.set(new Uint8Array(i),0),a.set(new Uint8Array(e),i.byteLength),r=a}else r=new Uint8Array(e)}catch(t){return Promise.reject(t)}t.b=new yt;var o=yl("generateKeyRequest");try{t.f[o](t.c,r)}catch(e){if("InvalidStateError"!=e.name)return t.b=null,Promise.reject(e);new ft((function(){try{t.f[o](t.c,r)}catch(e){t.b.reject(e),t.b=null}})).R(.01)}return t.b}function Sl(t,e){var n=t.keyStatuses;n.size=null==e?0:1,n.a=e,t.dispatchEvent(new wt("keystatuseschange"))}function kl(){this.size=0,this.a=void 0}function Cl(t){if("picture-in-picture"==(t=t.target).webkitPresentationMode){document.pictureInPictureElement=t;var e=new Event("enterpictureinpicture");t.dispatchEvent(e)}else document.pictureInPictureElement==t&&(document.pictureInPictureElement=null),e=new Event("leavepictureinpicture"),t.dispatchEvent(e)}function Ll(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function xl(){var t=document.pictureInPictureElement;return t?(t.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function Rl(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function Il(t){t?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function Pl(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function Ol(e,n,r){return new t.TextTrackCue(e,n,r)}function Dl(e,n,r){return new t.TextTrackCue(e+"-"+n+"-"+r,e,n,r)}function Ml(){}bl.prototype.createMediaKeys=function(){var t=new Al(this.a);return Promise.resolve(t)},bl.prototype.getConfiguration=function(){return this.b},(r=Al.prototype).createSession=function(t){if("temporary"!=(t=t||"temporary")&&"persistent-license"!=t)throw new TypeError("Session type "+t+" is unsupported on this platform.");var e=this.b||document.createElement("video");return e.src||(e.src="about:blank"),t=new Tl(e,this.g,t),this.c.push(t),t},r.setServerCertificate=function(){return Promise.resolve(!1)},r.Mf=function(t){var e=document.createEvent("CustomEvent");e.initCustomEvent("encrypted",!1,!1,null),e.initDataType="webm",e.initData=t.initData,this.b.dispatchEvent(e)},r.rg=function(t){var e=El(this,t.sessionId);e&&(t=new wt("message",{messageType:null==e.keyStatuses.a?"licenserequest":"licenserenewal",message:t.message}),e.b&&(e.b.resolve(),e.b=null),e.dispatchEvent(t))},r.pg=function(t){(t=El(this,t.sessionId))&&(Sl(t,"usable"),t.a&&t.a.resolve(),t.a=null)},r.qg=function(t){var e=El(this,t.sessionId);e&&e.handleError(t)},G(Tl,kt),(r=Tl.prototype).handleError=function(t){var e=Error("EME v0.1b key error");e.errorCode=t.errorCode,e.errorCode.systemCode=t.systemCode,!t.sessionId&&this.b?(e.method="generateRequest",45==t.systemCode&&(e.message="Unsupported session type."),this.b.reject(e),this.b=null):t.sessionId&&this.a?(e.method="update",this.a.reject(e),this.a=null):(e=t.systemCode,t.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Sl(this,"output-restricted"):Sl(this,1==e?"expired":"internal-error"))},r.yd=function(t,e){if(this.a)this.a.then(this.yd.bind(this,t,e)).catch(this.yd.bind(this,t,e));else{if(this.a=t,"webkit-org.w3.clearkey"==this.c){var n=oe(e),r=JSON.parse(n);"oct"!=r.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null),n=he.Ba(r.keys[0].k),r=he.Ba(r.keys[0].kid)}else n=new Uint8Array(e),r=null;var i=yl("addKey");try{this.f[i](this.c,n,r,this.sessionId)}catch(t){this.a.reject(t),this.a=null}}},r.generateRequest=function(t,e){return wl(this,e,null)},r.load=function(t){return"persistent-license"==this.g?wl(this,null,t):Promise.reject(Error("Not a persistent session."))},r.update=function(t){var e=new yt;return this.yd(e,t),e},r.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var t=yl("cancelKeyRequest");try{this.f[t](this.c,this.sessionId)}catch(t){}}return this.closed.resolve(),this.closed},r.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()},(r=kl.prototype).forEach=function(t){this.a&&t(this.a,pl)},r.get=function(t){if(this.has(t))return this.a},r.has=function(t){var e=pl;return!(!this.a||!he.za(new Uint8Array(t),new Uint8Array(e)))},r.entries=function(){},r.keys=function(){},r.values=function(){},Vu((function(){if(!(!t.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)gl="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;pl=new Uint8Array([0]).buffer,navigator.requestMediaKeySystemAccess=vl,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ml,t.MediaKeys=Al,t.MediaKeySystemAccess=bl}})),Vu((function(){if(t.HTMLVideoElement){var e=HTMLVideoElement.prototype;e.requestPictureInPicture&&document.exitPictureInPicture||!e.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,e.requestPictureInPicture=Ll,Object.defineProperty(e,"disablePictureInPicture",{get:Rl,set:Il,enumerable:!0,configurable:!0}),document.exitPictureInPicture=xl,document.addEventListener("webkitpresentationmodechanged",Cl,!0))}})),Vu((function(){if(t.HTMLMediaElement){var e=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var t=e.apply(this);return t&&t.catch((function(){})),t}}})),Vu((function(){if(t.HTMLVideoElement){var e=HTMLVideoElement.prototype;!e.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in e&&(e.getVideoPlaybackQuality=Pl)}})),Vu((function(){if(!t.VTTCue&&t.TextTrackCue){var e=TextTrackCue.length;if(3==e)t.VTTCue=Ol;else if(6==e)t.VTTCue=Dl;else{try{var n=!!Ol(1,2,"")}catch(t){n=!1}n&&(t.VTTCue=Ol)}}})),V("shaka.text.TtmlTextParser",Ml),Ml.prototype.parseInit=function(){},Ml.prototype.parseInit=Ml.prototype.parseInit,Ml.prototype.parseMedia=function(t,e){var n=oe(t),r=[],i=new DOMParser,a=null;if(""==n)return r;try{a=i.parseFromString(n,"text/xml")}catch(t){throw new gt(2,2,2005,"Failed to parse TTML.")}if(a){if(n=a.getElementsByTagName("parsererror")[0])throw new gt(2,2,2005,n.textContent);if(!(i=a.getElementsByTagName("tt")[0]))throw new gt(2,2,2005,"TTML does not contain <tt> tag.");var o=jr.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","frameRate"),s=jr.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","subFrameRate"),u=jr.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier"),l=jr.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","tickRate");if(a=i.getAttribute("xml:space")||"default",n=i.getAttribute("tts:extent"),"default"!=a&&"preserve"!=a)throw new gt(2,2,2005,"Invalid xml:space value: "+a);a="default"==a,o=new ic(o,s,u,l),s=ql(i.getElementsByTagName("metadata")[0]),u=ql(i.getElementsByTagName("styling")[0]),l=ql(i.getElementsByTagName("layout")[0]);for(var c=[],d=0;d<l.length;d++){var h,p,g=l[d],y=u,v=n,m=new cn,b=g.getAttribute("xml:id");b?(m.id=b,b=null,v&&(b=Fl.exec(v)||jl.exec(v)),v=b?Number(b[1]):null,b=b?Number(b[2]):null,(h=Zl(g,y,"extent"))&&null!=(h=(p=Fl.exec(h))||jl.exec(h))&&(m.width=null!=v?100*Number(h[1])/v:Number(h[1]),m.height=null!=b?100*Number(h[2])/b:Number(h[2]),m.widthUnits=p||null!=v?dn:0,m.heightUnits=p||null!=b?dn:0),(g=Zl(g,y,"origin"))&&null!=(h=(p=Fl.exec(g))||jl.exec(g))&&(m.viewportAnchorX=null!=b?100*Number(h[1])/b:Number(h[1]),m.viewportAnchorY=null!=v?100*Number(h[2])/v:Number(h[2]),m.viewportAnchorUnits=p||null!=v?dn:0)):m=null,m&&c.push(m)}for(n=(n=i.getElementsByTagName("body")[0])?Array.from(n.querySelectorAll("[begin]")):[],i=(n=f(n)).next();!i.done;i=n.next())(i=Xl(i.value,e.periodStart,o,s,u,l,c,a,!1))&&r.push(i)}return r},Ml.prototype.parseMedia=Ml.prototype.parseMedia;var Nl,Ul,Fl=/^(\d{1,2}(?:\.\d+)?|100)% (\d{1,2}(?:\.\d+)?|100)%$/,Bl=/^(\d+px|\d+em)$/,jl=/^(\d+)px (\d+)px$/,Kl=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Vl=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Gl=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Hl=/^(\d*(?:\.\d*)?)f$/,Yl=/^(\d*(?:\.\d*)?)t$/,zl=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,$l={left:an,center:"center",right:"end",start:an,end:"end"},Wl={left:"line-left",center:"center",right:"line-right"};function ql(t){var e=[];if(!t)return e;for(var n=f(t.childNodes),r=n.next();!r.done;r=n.next())(r=r.value).nodeType==Node.ELEMENT_NODE&&"br"!==r.nodeName&&(r=ql(r),e=e.concat(r));return e.length||e.push(t),e}function Xl(t,e,n,r,i,a,o,s,u){if(u&&"br"==t.nodeName)return(t=new qe(0,0,"")).spacer=!0,t;var l=/^[\s\n]*$/.test(t.textContent),c=t.nodeType==Node.ELEMENT_NODE&&!t.hasAttribute("begin")&&!t.hasAttribute("end");if(t.nodeType!=Node.ELEMENT_NODE||c&&l||c&&!u)return null;l=nc(t.getAttribute("begin"),n),c=nc(t.getAttribute("end"),n);var d=nc(t.getAttribute("dur"),n);if(null==c&&null!=d&&(c=l+d),!u&&(null==l||null==c))throw new gt(2,2,2001);if(l+=e,c+=e,d="",u=[],Array.from(t.childNodes).find((function(t){return t.nodeType===Node.TEXT_NODE&&/\w+/.test(t.textContent)})))d=function t(e,n){for(var r="",i=f(e.childNodes),a=i.next();!a.done;a=i.next())"br"==(a=a.value).nodeName&&e.childNodes[0]!==a?r+="\n":a.childNodes&&0<a.childNodes.length?r+=t(a,n):r+=n?a=(a=a.textContent.trim()).replace(/\s+/g," "):a.textContent;return r}(t,s);else for(var h=f(t.childNodes),p=h.next();!p.done;p=h.next())(p=Xl(p.value,e,n,r,i,a,o,s,!0))&&u.push(p);if((e=new qe(l,c,d)).nestedCues=u,(a=ec(t,"region",a,"")[0])&&a.getAttribute("xml:id")){var g=a.getAttribute("xml:id");e.region=o.filter((function(t){return t.id==g}))[0]}return function(t,e,n,r,i){"rtl"==Ql(e,n,i,"direction")&&(t.direction="rtl");var a=Ql(e,n,i,"writingMode");if("tb"==a||"tblr"==a?t.writingMode="vertical-lr":"tbrl"==a?t.writingMode="vertical-rl":"rltb"==a||"rl"==a?t.direction="rtl":a&&(t.direction=en),(a=Ql(e,n,i,"textAlign"))?(t.positionAlign=Wl[a],t.lineAlign=$l[a],t.textAlign=Qe[a.toUpperCase()]):t.textAlign="start",(a=Ql(e,n,i,"displayAlign"))&&(t.displayAlign=tn[a.toUpperCase()]),(a=Ql(e,n,i,"color"))&&(t.color=a),(a=Ql(e,n,i,"backgroundColor"))&&(t.backgroundColor=a),(a=Ql(e,n,i,"fontFamily"))&&(t.fontFamily=a),(a=Ql(e,n,i,"fontWeight"))&&"bold"==a&&(t.fontWeight=700),(a=Ql(e,n,i,"wrapOption"))&&"noWrap"==a&&(t.wrapLine=!1),(a=Ql(e,n,i,"lineHeight"))&&a.match(Bl)&&(t.lineHeight=a),(a=Ql(e,n,i,"fontSize"))&&a.match(Bl)&&(t.fontSize=a),(a=Ql(e,n,i,"fontStyle"))&&(t.fontStyle=ln[a.toUpperCase()]),r){a=r.getAttribute("imagetype");var o=r.getAttribute("encoding");r=r.textContent.trim(),"PNG"==a&&"Base64"==o&&r&&(t.backgroundImage="data:image/png;base64,"+r)}(n=Zl(n,i,"textDecoration"))&&Jl(t,n),(e=tc(e,i,"textDecoration"))&&Jl(t,e)}(e,t,a,r=ec(t,"smpte:backgroundImage",r,"#")[0],i),e}function Jl(t,e){for(var n=e.split(" "),r=0;r<n.length;r++)switch(n[r]){case"underline":t.textDecoration.includes("underline")||t.textDecoration.push("underline");break;case"noUnderline":t.textDecoration.includes("underline")&&xt(t.textDecoration,"underline");break;case"lineThrough":t.textDecoration.includes("lineThrough")||t.textDecoration.push("lineThrough");break;case"noLineThrough":t.textDecoration.includes("lineThrough")&&xt(t.textDecoration,"lineThrough");break;case"overline":t.textDecoration.includes("overline")||t.textDecoration.push("overline");break;case"noOverline":t.textDecoration.includes("overline")&&xt(t.textDecoration,"overline")}}function Ql(t,e,n,r){return(t=tc(t,n,r))?t:Zl(e,n,r)}function Zl(t,e,n){for(var r=ql(t),i=0;i<r.length;i++){var a=jr.getAttributeNS(r[i],"http://www.w3.org/ns/ttml#styling",n);if(a)return a}return(t=ec(t,"style",e,"")[0])?jr.getAttributeNS(t,"http://www.w3.org/ns/ttml#styling",n):null}function tc(t,e,n){var r=jr.getAttributeNS(t,"http://www.w3.org/ns/ttml#styling",n);if(r)return r;for(t=ec(t,"style",e,""),e=null,r=0;r<t.length;r++){var i=jr.getAttributeNS(t[r],"http://www.w3.org/ns/ttml#styling",n);i&&(e=i)}return e}function ec(t,e,n,r){var i=[];if(!t||1>n.length)return i;var a=t;for(t=null;a&&!(t=a.getAttribute(e))&&(a=a.parentNode)instanceof Element;);if(e=t)for(t=(e=f(e=e.split(" "))).next();!t.done;t=e.next()){t=t.value;for(var o=(a=f(n)).next();!o.done;o=a.next())if(r+(o=o.value).getAttribute("xml:id")==t){i.push(o);break}}return i}function nc(t,e){var n=null;if(Kl.test(t)){n=Kl.exec(t);var r=Number(n[1]),i=Number(n[2]),a=Number(n[3]),o=Number(n[4]);n=(a+=(o+=(Number(n[5])||0)/e.b)/e.frameRate)+60*i+3600*r}else Vl.test(t)?n=rc(Vl,t):Gl.test(t)?n=rc(Gl,t):Hl.test(t)?(n=Hl.exec(t),n=Number(n[1])/e.frameRate):Yl.test(t)?(n=Yl.exec(t),n=Number(n[1])/e.a):zl.test(t)&&(n=rc(zl,t));return n}function rc(t,e){var n=t.exec(e);return null==n||""==n[0]?null:(Number(n[4])||0)/1e3+(Number(n[3])||0)+60*(Number(n[2])||0)+3600*(Number(n[1])||0)}function ic(t,e,n,r){this.frameRate=Number(t)||30,this.b=Number(e)||1,this.a=Number(r),0==this.a&&(this.a=t?this.frameRate*this.b:1),n&&(t=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(t[1])/Number(t[2]))}function ac(){this.a=new Ml}function oc(){}function sc(t,e,n){var r;(r=/^align:(start|middle|center|end|left|right)$/.exec(e))?(e=r[1],t.textAlign="middle"==e?Je:Qe[e.toUpperCase()]):(r=/^vertical:(lr|rl)$/.exec(e))?t.writingMode="lr"==r[1]?"vertical-lr":"vertical-rl":(r=/^size:([\d.]+)%$/.exec(e))?t.size=Number(r[1]):(r=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(e))?(t.position=Number(r[1]),r[2]&&(e=r[2],t.positionAlign="line-left"==e||"start"==e?"line-left":"line-right"==e||"end"==e?"line-right":"center")):(r=/^region:(.*)$/.exec(e))?(e=function(t,e){var n=t.filter((function(t){return t.id==e}));return n.length?n[0]:null}(n,r[1]))&&(t.region=e):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(e))?(t.lineInterpretation=1,t.line=Number(n[1]),n[2]&&(t.lineAlign=on[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(e))&&(t.lineInterpretation=rn,t.line=Number(n[1]),n[2]&&(t.lineAlign=on[n[2].toUpperCase()]))}function uc(t){if(null==(t=Ni(t,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g)))return null;var e=Number(t[2]),n=Number(t[3]);return 59<e||59<n?null:Number(t[4])/1e3+n+60*e+3600*(Number(t[1])||0)}function lc(){this.a=null}function cc(t,e,n){var r,i,a;return(new Or).H("payl",Nr((function(t){r=oe(t)}))).H("iden",Nr((function(t){i=oe(t)}))).H("sttg",Nr((function(t){a=oe(t)}))).parse(t),r?function(t,e,n,r,i){if(t=new qe(r,i,t),e&&(t.id=e),n)for(e=new Di(n),n=Ui(e);n;)sc(t,n,[]),Mi(e),n=Ui(e);return t}(r,i,a,e,n):null}
|
||
/*
|
||
@license
|
||
EME Encryption Scheme Polyfill
|
||
Copyright 2019 Google LLC
|
||
SPDX-License-Identifier: Apache-2.0
|
||
*/
|
||
function dc(){}function fc(){Nl?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Nl=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=hc):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function hc(t,e){var n=this;return p((function r(){var i;return N(r,(function(r){switch(r.j){case 1:return console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),w(r,Nl.call(n,t,e),2);case 2:return Ec(i=r.o)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Nl,r.return(i)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=pc,r.return(pc.call(n,t,e)))}}))}))}function pc(t,e){var n=this;return p((function r(){var i,a,o,s,u,l,c,d;return N(r,(function(r){switch(r.j){case 1:console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),i=_c(t),a=[];for(var h=f(e),p=h.next();!p.done;p=h.next())o=p.value,s=gc(o.videoCapabilities,i),u=gc(o.audioCapabilities,i),o.videoCapabilities&&o.videoCapabilities.length&&!s.length||o.audioCapabilities&&o.audioCapabilities.length&&!u.length||((l=Object.assign({},o)).videoCapabilities=s,l.audioCapabilities=u,a.push(l));if(!a.length)throw(c=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",c.code=DOMException.NOT_SUPPORTED_ERR,c;return w(r,Nl.call(n,t,a),2);case 2:return d=r.o,r.return(new Ac(d,i))}}))}))}function gc(t,e){return t?t.filter((function(t){return!t.encryptionScheme||t.encryptionScheme==e})):t}function yc(){}function vc(){navigator.mediaCapabilities?(Ul=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=mc):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function mc(t){var e=this;return p((function n(){var r;return N(n,(function(n){switch(n.j){case 1:return console.assert(e==navigator.mediaCapabilities,'bad "this" for decodingInfo'),w(n,Ul.call(e,t),2);case 2:return r=n.o,t.keySystemConfiguration?Ec(r.keySystemAccess)?(console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Ul,n.return(r)):(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=bc,n.return(bc.call(e,t))):n.return(r)}}))}))}function bc(t){var e=this;return p((function n(){var r,i,a,o,s,u,l;return N(n,(function(n){switch(n.j){case 1:return console.assert(e==navigator.mediaCapabilities,'bad "this" for decodingInfo'),r=null,t.keySystemConfiguration&&(i=t.keySystemConfiguration,a=i.keySystem,o=i.audio&&i.audio.encryptionScheme,s=i.video&&i.video.encryptionScheme,r=_c(a),u={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:t},o&&o!=r||s&&s!=r)?n.return(u):w(n,Ul.call(e,t),2);case 2:return(l=n.o).keySystemAccess&&(l.keySystemAccess=new Ac(l.keySystemAccess,r)),n.return(l)}}))}))}function Ac(t,e){this.b=t,this.a=e,this.keySystem=t.keySystem}function _c(t){return t.startsWith("com.widevine")||t.startsWith("com.microsoft")||t.startsWith("com.adobe")||t.startsWith("org.w3")?"cenc":t.startsWith("com.apple")?"cbcs-1-9":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",t,"Please contribute!"),null)}function Ec(t){var e=(t=t.getConfiguration()).audioCapabilities&&t.audioCapabilities[0];return!(!(t=t.videoCapabilities&&t.videoCapabilities[0]||e)||void 0===t.encryptionScheme)}function Tc(){}function wc(){fc(),vc()}pn["application/ttml+xml"]=Ml,V("shaka.text.Mp4TtmlParser",ac),ac.prototype.parseInit=function(t){var e=!1;if((new Or).H("moov",Dr).H("trak",Dr).H("mdia",Dr).H("minf",Dr).H("stbl",Dr).fa("stsd",Mr).H("stpp",(function(t){e=!0,t.parser.stop()})).parse(t),!e)throw new gt(2,2,2007)},ac.prototype.parseInit=ac.prototype.parseInit,ac.prototype.parseMedia=function(t,e){var n=!1,r=[];if((new Or).H("mdat",Nr(function(t){n=!0,r=r.concat(this.a.parseMedia(t,e))}.bind(this))).parse(t),!n)throw new gt(2,2,2007);return r},ac.prototype.parseMedia=ac.prototype.parseMedia,pn['application/mp4; codecs="stpp"']=ac,pn['application/mp4; codecs="stpp.ttml.im1t"']=ac,pn['application/mp4; codecs="stpp.TTML.im1t"']=ac,V("shaka.text.VttTextParser",oc),oc.prototype.parseInit=function(){},oc.prototype.parseInit=oc.prototype.parseInit,oc.prototype.parseMedia=function(t,e){var n=oe(t);if(n=(n=n.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m),!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new gt(2,2,2e3);var r=e.segmentStart;if(null==r&&(r=0,n[0].includes("X-TIMESTAMP-MAP"))){var i=n[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),a=n[0].match(/MPEGTS:(\d+)/m);if(i&&a){if(null==(r=uc(new Di(i[1]))))throw new gt(2,2,2e3);r=e.periodStart+(Number(a[1])/9e4-r)}}a=[];var o=n[0].split("\n");for(i=1;i<o.length;i++)if(/^Region:/.test(o[i])){var s=new Di(o[i]),u=new cn;Ui(s),Mi(s);for(var l=Ui(s);l;){var c=u,d=l;(l=/^id=(.*)$/.exec(d))?c.id=l[1]:(l=/^width=(\d{1,2}|100)%$/.exec(d))?c.width=Number(l[1]):(l=/^lines=(\d+)$/.exec(d))?(c.height=Number(l[1]),c.heightUnits=2):(l=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))?(c.regionAnchorX=Number(l[1]),c.regionAnchorY=Number(l[2])):(l=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))?(c.viewportAnchorX=Number(l[1]),c.viewportAnchorY=Number(l[2])):/^scroll=up$/.exec(d)&&(c.scroll="up"),Mi(s),l=Ui(s)}a.push(u)}for(i=[],s=1;s<n.length;s++){if(l=o=n[s].split("\n"),d=r,o=a,1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0])o=null;else{u=null,l[0].includes("--\x3e")||(u=l[0],l.splice(0,1));var f=uc(c=new Di(l[0])),h=Ni(c,/[ \t]+--\x3e[ \t]+/g),p=uc(c);if(null==f||null==h||null==p)throw new gt(2,2,2001);for(l=new qe(f+d,p+d,l.slice(1).join("\n").trim()),Mi(c),d=Ui(c);d;)sc(l,d,o),Mi(c),d=Ui(c);null!=u&&(l.id=u),o=l}o&&i.push(o)}return i},oc.prototype.parseMedia=oc.prototype.parseMedia,pn["text/vtt"]=oc,pn['text/vtt; codecs="vtt"']=oc,V("shaka.text.Mp4VttParser",lc),lc.prototype.parseInit=function(t){var e=!1;if((new Or).H("moov",Dr).H("trak",Dr).H("mdia",Dr).fa("mdhd",function(t){0==t.version?(t.reader.M(4),t.reader.M(4),this.a=t.reader.G(),t.reader.M(4)):(t.reader.M(8),t.reader.M(8),this.a=t.reader.G(),t.reader.M(8)),t.reader.M(4)}.bind(this)).H("minf",Dr).H("stbl",Dr).fa("stsd",Mr).H("wvtt",(function(){e=!0})).parse(t),!this.a)throw new gt(2,2,2008);if(!e)throw new gt(2,2,2008)},lc.prototype.parseInit=lc.prototype.parseInit,lc.prototype.parseMedia=function(t,e){var n=this;if(!this.a)throw new gt(2,2,2008);var r,i=0,a=[],o=[],s=!1,u=!1,l=!1,c=null;if((new Or).H("moof",Dr).H("traf",Dr).fa("tfdt",(function(t){s=!0,i=0==t.version?t.reader.G():t.reader.Bb()})).fa("tfhd",(function(t){var e=t.flags;(t=t.reader).M(4),1&e&&t.M(8),2&e&&t.M(4),c=8&e?t.G():null})).fa("trun",(function(t){u=!0;var e=t.version,n=t.flags,r=(t=t.reader).G();1&n&&t.M(4),4&n&&t.M(4);for(var i=[],o=0;o<r;o++){var s={duration:null,sampleSize:null,Ad:null};256&n&&(s.duration=t.G()),512&n&&(s.sampleSize=t.G()),1024&n&&t.M(4),2048&n&&(s.Ad=0==e?t.G():t.ke()),i.push(s)}a=i})).H("mdat",Nr((function(t){l=!0,r=t}))).parse(t),!l&&!s&&!u)throw new gt(2,2,2008);var d=i,f=new Rr(new DataView(r.buffer,r.byteOffset,r.byteLength),0);return a.forEach((function(t){var r=t.duration||c,a=t.Ad?i+t.Ad:d;d=a+(r||0);var s=0;do{var u=f.G();s+=u;var l=null;"vttc"==Fr(f.G())?8<u&&(l=f.Za(u-8)):f.M(u-8),r&&l&&o.push(cc(l,e.periodStart+a/n.a,e.periodStart+d/n.a))}while(t.sampleSize&&s<t.sampleSize)})),o.filter(Ve.Ia)},lc.prototype.parseMedia=lc.prototype.parseMedia,pn['application/mp4; codecs="wvtt"']=lc,V("shaka.util.Dom.createHTMLElement",(function(t){return document.createElement(t)})),V("shaka.util.Dom.createVideoElement",(function(){var t=document.createElement("video");return t.muted=!0,t.width=600,t.height=400,t})),V("shaka.util.Dom.asHTMLElement",(function(t){return t})),V("shaka.util.Dom.asHTMLMediaElement",(function(t){return t})),V("shaka.util.Dom.removeAllChildren",(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)})),V("EmeEncryptionSchemePolyfill",dc),dc.install=fc,V("McEncryptionSchemePolyfill",yc),yc.install=vc,Ac.prototype.getConfiguration=function(){var t=this.b.getConfiguration();if(t.videoCapabilities)for(var e=f(t.videoCapabilities),n=e.next();!n.done;n=e.next())n.value.encryptionScheme=this.a;if(t.audioCapabilities)for(n=(e=f(t.audioCapabilities)).next();!n.done;n=e.next())n.value.encryptionScheme=this.a;return t},Ac.prototype.createMediaKeys=function(){return this.b.createMediaKeys()},V("EncryptionSchemePolyfills",Tc),Tc.install=wc,n.Ne&&(n.Ne=Tc)}.call(i,r,r),i.shaka)e[a]=i.shaka[a]}()}).call(this,n(/*! ./../../webpack/buildin/global.js */"./node_modules/webpack/buildin/global.js"),n(/*! ./../../webpack/buildin/module.js */"./node_modules/webpack/buildin/module.js")(t))},"./node_modules/webpack/buildin/global.js":
|
||
/*!***********************************!*\
|
||
!*** (webpack)/buildin/global.js ***!
|
||
\***********************************/
|
||
/*! no static exports found */function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},"./node_modules/webpack/buildin/module.js":
|
||
/*!***********************************!*\
|
||
!*** (webpack)/buildin/module.js ***!
|
||
\***********************************/
|
||
/*! no static exports found */function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},"./src/clappr-dash-shaka-playback.js":
|
||
/*!*******************************************!*\
|
||
!*** ./src/clappr-dash-shaka-playback.js ***!
|
||
\*******************************************/
|
||
/*! no static exports found */function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,r)}if("value"in i)return i.value;var o=i.get;return void 0!==o?o.call(r):void 0},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}}(),o=n(/*! clappr */"clappr"),s=n(/*! shaka-player */"./node_modules/shaka-player/dist/shaka-player.compiled.js"),u=(r=s)&&r.__esModule?r:{default:r};function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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}var d=function(t){function e(){var t;l(this,e);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=c(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(r)));return a._levels=[],a._pendingAdaptationEvent=!1,a._isShakaReadyState=!1,a._minDvrSize=void 0===a.options.shakaMinimumDvrSize?60:a.options.shakaMinimumDvrSize,a}return function(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)}(e,t),a(e,[{key:"getDuration",value:function(){return this._duration}},{key:"getCurrentTime",value:function(){return this.shakaPlayerInstance.getMediaElement().currentTime-this.seekRange.start}},{key:"name",get:function(){return"dash_shaka_playback"}},{key:"shakaVersion",get:function(){return u.default.player.Player.version}},{key:"shakaPlayerInstance",get:function(){return this._player}},{key:"levels",get:function(){return this._levels}},{key:"seekRange",get:function(){return this.shakaPlayerInstance.seekRange()}},{key:"currentLevel",set:function(t){var e=this;this._currentLevelId=t;var n=-1===this._currentLevelId;this.trigger(o.Events.PLAYBACK_LEVEL_SWITCH_START),n?(this._player.configure({abr:{enabled:!0}}),this.trigger(o.Events.PLAYBACK_LEVEL_SWITCH_END)):(this._player.configure({abr:{enabled:!1}}),this._pendingAdaptationEvent=!0,this.selectTrack(this.videoTracks.filter((function(t){return t.id===e._currentLevelId}))[0]))},get:function(){return this._currentLevelId||-1}},{key:"dvrEnabled",get:function(){return this._duration>=this._minDvrSize&&"live"===this.getPlaybackType()}},{key:"_duration",get:function(){return this.shakaPlayerInstance?this.seekRange.end-this.seekRange.start:0}},{key:"_startTime",get:function(){return this.seekRange.start}},{key:"presentationTimeline",get:function(){var t=this.shakaPlayerInstance.getManifest();return t?t.presentationTimeline:null}},{key:"bandwidthEstimate",get:function(){if(this.shakaPlayerInstance)return this.shakaPlayerInstance.getStats().estimatedBandwidth}}],[{key:"canPlay",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";u.default.polyfill.installAll();var n=u.default.Player.isBrowserSupported(),r=t.split("?")[0].match(/.*\.(.*)$/)||[];return n&&("mpd"===r[1]||e.indexOf("application/dash+xml")>-1)}},{key:"Events",get:function(){return{SHAKA_READY:"shaka:ready"}}}]),a(e,[{key:"getProgramDateTime",value:function(){var t=this.presentationTimeline;return t?new Date(1e3*(t.getPresentationStartTime()+this.seekRange.start)):null}},{key:"_updateDvr",value:function(t){this.trigger(o.Events.PLAYBACK_DVR,t),this.trigger(o.Events.PLAYBACK_STATS_ADD,{dvr:t})}},{key:"seek",value:function(t){t<0&&(o.Log.warn("Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point."),t=this._duration),this.dvrEnabled&&this._updateDvr(t<this._duration-3),t+=this._startTime,i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"seek",this).call(this,t)}},{key:"pause",value:function(){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"pause",this).call(this),this.dvrEnabled&&this._updateDvr(!0)}},{key:"play",value:function(){this._player||this._setup(),this.isReady?(this._stopped=!1,this._src=this.el.src,i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"play",this).call(this),this._startTimeUpdateTimer()):this.once(e.Events.SHAKA_READY,this.play)}},{key:"_startTimeUpdateTimer",value:function(){var t=this;this._stopTimeUpdateTimer(),this._timeUpdateTimer=setInterval((function(){t._onTimeUpdate()}),100)}},{key:"_stopTimeUpdateTimer",value:function(){this._timeUpdateTimer&&clearInterval(this._timeUpdateTimer)}},{key:"_setupSrc",value:function(){}},{key:"_ready",value:function(){}},{key:"_onShakaReady",value:function(){this._isShakaReadyState=!0,this.trigger(e.Events.SHAKA_READY),this.trigger(o.Events.PLAYBACK_READY,this.name)}},{key:"error",value:function(t){o.Log.error("an error was raised by the video tag",t,this.el.error)}},{key:"isHighDefinitionInUse",value:function(){return!1}},{key:"stop",value:function(){var t=this;this._stopTimeUpdateTimer(),clearInterval(this.sendStatsId),this._stopped=!0,this._player?(this._sendStats(),this._player.unload().then((function(){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"stop",t).call(t),t._player=null,t._isShakaReadyState=!1})).catch((function(){o.Log.error("shaka could not be unloaded")}))):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"stop",this).call(this)}},{key:"getPlaybackType",value:function(){return(this.isReady&&this._player.isLive()?"live":"vod")||""}},{key:"selectAudioLanguage",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this._player.selectAudioLanguage(t,e)}},{key:"selectTrack",value:function(t){if("text"===t.type)this._player.selectTextTrack(t);else{if("variant"!==t.type)throw new Error("Unhandled track type:",t.type);this._player.selectVariantTrack(t),t.mimeType.startsWith("video/")&&this._onAdaptation()}}},{key:"_enableShakaTextTrack",value:function(t){this.el.textTracks&&(this._shakaTTVisible=t,Array.from(this.el.textTracks).filter((function(t){return"subtitles"===t.kind})).forEach((function(e){return e.mode=!0===t?"showing":"hidden"})))}},{key:"_checkForClosedCaptions",value:function(){if(!this._ccIsSetup){if(this.hasClosedCaptionsTracks){this.trigger(o.Events.PLAYBACK_SUBTITLE_AVAILABLE);var t=this.closedCaptionsTrackId;this.closedCaptionsTrackId=t}this._ccIsSetup=!0}}},{key:"destroy",value:function(){var t=this;this._stopTimeUpdateTimer(),clearInterval(this.sendStatsId),this._player?this._player.destroy().then((function(){return t._destroy()})).catch((function(){t._destroy(),o.Log.error("shaka could not be destroyed")})):this._destroy(),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"_setup",value:function(){var t=this;this._isShakaReadyState=!1,this._ccIsSetup=!1,this._player=this._createPlayer(),this._options.shakaConfiguration&&this._player.configure(this._options.shakaConfiguration),this._options.shakaOnBeforeLoad&&this._options.shakaOnBeforeLoad(this._player),this._player.load(this._options.src).then((function(){return t._loaded()})).catch((function(e){return t._setupError(e)}))}},{key:"_createPlayer",value:function(){var t=new u.default.Player(this.el);return t.addEventListener("error",this._onError.bind(this)),t.addEventListener("adaptation",this._onAdaptation.bind(this)),t.addEventListener("buffering",this._onBuffering.bind(this)),t}},{key:"_onTimeUpdate",value:function(){if(this.shakaPlayerInstance){var t=this.getProgramDateTime();if(t){var e={current:this.getCurrentTime(),total:this.getDuration(),firstFragDateTime:t};this._lastTimeUpdate&&e.current===this._lastTimeUpdate.current&&e.total===this._lastTimeUpdate.total||(this._lastTimeUpdate=e,this.trigger(o.Events.PLAYBACK_TIMEUPDATE,e,this.name))}}}},{key:"_onBuffering",value:function(t){if(!this._stopped){var e=t.buffering?o.Events.PLAYBACK_BUFFERING:o.Events.PLAYBACK_BUFFERFULL;this.trigger(e)}}},{key:"_loaded",value:function(){this._onShakaReady(),this._startToSendStats(),this._fillLevels(),this._checkForClosedCaptions()}},{key:"_fillLevels",value:function(){0===this._levels.length&&(this._levels=this.videoTracks.slice(0).reverse(),this.trigger(o.Events.PLAYBACK_LEVELS_AVAILABLE,this.levels))}},{key:"_startToSendStats",value:function(){var t=this,e=this._options.shakaSendStatsInterval||3e4;this.sendStatsId=setInterval((function(){return t._sendStats()}),e)}},{key:"_sendStats",value:function(){this.trigger(o.Events.PLAYBACK_STATS_ADD,this._player.getStats())}},{key:"_setupError",value:function(t){this._onError(t)}},{key:"_onError",value:function(t){var n={shakaError:t,videoError:this.el.error},r=n.shakaError.detail||n.shakaError,a=r.category,s=r.code,l=r.severity;if(n.videoError||!s&&!a)return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_onError",this).call(this);var c={code:a+"_"+s,description:"Category: "+a+", code: "+s+", severity: "+l,level:l===u.default.util.Error.Severity.CRITICAL?o.PlayerError.Levels.FATAL:o.PlayerError.Levels.WARN,raw:t},d=this.createError(c);o.Log.error("Shaka error event:",d),this.trigger(o.Events.PLAYBACK_ERROR,d)}},{key:"_onAdaptation",value:function(){var t=this.videoTracks.filter((function(t){return!0===t.active}))[0];this._fillLevels(),this._sendStats(),this._pendingAdaptationEvent&&(this.trigger(o.Events.PLAYBACK_LEVEL_SWITCH_END),this._pendingAdaptationEvent=!1),o.Log.debug("an adaptation has happened:",t),this.highDefinition=t.height>=720,this.trigger(o.Events.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(o.Events.PLAYBACK_BITRATE,{bandwidth:t.bandwidth,width:t.width,height:t.height,language:t.language,level:t.id,bitrate:t.videoBandwidth})}},{key:"_updateSettings",value:function(){"vod"===this.getPlaybackType()?this.settings.left=["playpause","position","duration"]:this.dvrEnabled?this.settings.left=["playpause"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(o.Events.PLAYBACK_SETTINGSUPDATE)}},{key:"_destroy",value:function(){this._isShakaReadyState=!1,o.Log.debug("shaka was destroyed")}},{key:"isReady",get:function(){return this._isShakaReadyState}},{key:"textTracks",get:function(){return this.isReady&&this._player.getTextTracks()}},{key:"audioLanguages",get:function(){return this.isReady&&this._player.getAudioLanguages()}},{key:"audioTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter((function(t){return t.mimeType.startsWith("audio/")}))}},{key:"videoTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter((function(t){return t.mimeType.startsWith("video/")}))}},{key:"closedCaptionsTracks",get:function(){var t=0;return(this.textTracks||[]).filter((function(t){return"subtitle"===t.kind})).map((function(e){return{id:t++,name:e.label||e.language,track:e}}))}},{key:"closedCaptionsTrackId",get:function(){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"closedCaptionsTrackId",this)},set:function(t){if(this._player){var e=this.closedCaptionsTracks,n=void 0;if(-1!==t){if(!(n=e.find((function(e){return e.id===t}))))return void o.Log.warn('Track id "'+t+'" not found');if(this._shakaTTVisible&&!0===n.track.active)return void o.Log.info('Track id "'+t+'" already showing')}n?(this._player.selectTextTrack(n.track),this._player.setTextTrackVisibility(!0),this._enableShakaTextTrack(!0)):(this._player.setTextTrackVisibility(!1),this._enableShakaTextTrack(!1)),this._ccTrackId=t,this.trigger(o.Events.PLAYBACK_SUBTITLE_CHANGED,{id:t})}}}]),e}(o.HTML5Video);e.default=d,t.exports=e.default},clappr:
|
||
/*!******************************************************************************************!*\
|
||
!*** external {"amd":"clappr","commonjs":"clappr","commonjs2":"clappr","root":"Clappr"} ***!
|
||
\******************************************************************************************/
|
||
/*! no static exports found */function(e,n){e.exports=t}})},t.exports=r(n(0))},function(t,e,n){var r;"undefined"!=typeof self&&self,r=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="<%=baseUrl%>/",n(n.s=40)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(10),i=n(29),a=n(15),o=Object.defineProperty;e.f=n(3)?Object.defineProperty:function(t,e,n){if(r(t),e=a(e,!0),r(n),i)try{return o(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(11)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(2),i=n(12);t.exports=n(3)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(56),i=n(17);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(22)("wks"),i=n(14),a=n(0).Symbol,o="function"==typeof a;(t.exports=function(t){return r[t]||(r[t]=o&&a[t]||(o?a:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(0),i=n(1),a=n(28),o=n(5),s=n(4),u=function(t,e,n){var l,c,d,f=t&u.F,h=t&u.G,p=t&u.S,g=t&u.P,y=t&u.B,v=t&u.W,m=h?i:i[e]||(i[e]={}),b=m.prototype,A=h?r:p?r[e]:(r[e]||{}).prototype;for(l in h&&(n=e),n)(c=!f&&A&&void 0!==A[l])&&s(m,l)||(d=c?A[l]:n[l],m[l]=h&&"function"!=typeof A[l]?n[l]:y&&c?a(d,r):v&&A[l]==d?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(d):g&&"function"==typeof d?a(Function.call,d):d,g&&((m.virtual||(m.virtual={}))[l]=d,t&u.R&&b&&!b[l]&&o(b,l,d)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){var r=n(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(6);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports={}},function(t,e,n){var r=n(10),i=n(55),a=n(23),o=n(21)("IE_PROTO"),s=function(){},u=function(){var t,e=n(30)("iframe"),r=a.length;for(e.style.display="none",n(60).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[a[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[o]=t):n=u(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(34),i=n(23);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(22)("keys"),i=n(14);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(1),i=n(0),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(13)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(2).f,i=n(4),a=n(8)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,a)&&r(t,a,{configurable:!0,value:e})}},function(t,e,n){e.f=n(8)},function(t,e,n){var r=n(0),i=n(1),a=n(13),o=n(25),s=n(2).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=a?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:o.f(t)})}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(48);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){t.exports=!n(3)&&!n(11)((function(){return 7!=Object.defineProperty(n(30)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(6),i=n(0).document,a=r(i)&&r(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e,n){"use strict";e.__esModule=!0;var r=o(n(50)),i=o(n(66)),a="function"==typeof i.default&&"symbol"==typeof r.default?function(t){return typeof t}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":typeof t};function o(t){return t&&t.__esModule?t:{default:t}}e.default="function"==typeof i.default&&"symbol"===a(r.default)?function(t){return void 0===t?"undefined":a(t)}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":void 0===t?"undefined":a(t)}},function(t,e,n){"use strict";var r=n(13),i=n(9),a=n(33),o=n(5),s=n(18),u=n(54),l=n(24),c=n(61),d=n(8)("iterator"),f=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,p,g,y,v){u(n,e,p);var m,b,A,_=function(t){if(!f&&t in S)return S[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},E=e+" Iterator",T="values"==g,w=!1,S=t.prototype,k=S[d]||S["@@iterator"]||g&&S[g],C=k||_(g),L=g?T?_("entries"):C:void 0,x="Array"==e&&S.entries||k;if(x&&(A=c(x.call(new t)))!==Object.prototype&&A.next&&(l(A,E,!0),r||"function"==typeof A[d]||o(A,d,h)),T&&k&&"values"!==k.name&&(w=!0,C=function(){return k.call(this)}),r&&!v||!f&&!w&&S[d]||o(S,d,C),s[e]=C,s[E]=h,g)if(m={values:T?C:_("values"),keys:y?C:_("keys"),entries:L},v)for(b in m)b in S||a(S,b,m[b]);else i(i.P+i.F*(f||w),e,m);return m}},function(t,e,n){t.exports=n(5)},function(t,e,n){var r=n(4),i=n(7),a=n(57)(!1),o=n(21)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),u=0,l=[];for(n in s)n!=o&&r(s,n)&&l.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~a(l,n)||l.push(n));return l}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(17);t.exports=function(t){return Object(r(t))}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(34),i=n(23).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(27),i=n(12),a=n(7),o=n(15),s=n(4),u=n(29),l=Object.getOwnPropertyDescriptor;e.f=n(3)?l:function(t,e){if(t=a(t),e=o(e,!0),u)try{return l(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(41),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default,t.exports=e.default},function(t,e,n){"use strict";(function(r){Object.defineProperty(e,"__esModule",{value:!0});var i=d(n(43)),a=d(n(44)),o=d(n(49)),s=d(n(76)),u=n(84),l=d(n(85)),c=d(n(86));function d(t){return t&&t.__esModule?t:{default:t}}var f=function(t){function e(){return(0,i.default)(this,e),(0,o.default)(this,t.apply(this,arguments))}return(0,s.default)(e,t),e.prototype.bindEvents=function(){this.listenTo(this.core,u.Events.CORE_READY,this.bindPlaybackEvents),u.Events.CORE_ACTIVE_CONTAINER_CHANGED?this.listenTo(this.core,u.Events.CORE_ACTIVE_CONTAINER_CHANGED,this.reload):this.listenTo(this.core.mediaControl,u.Events.MEDIACONTROL_CONTAINERCHANGED,this.reload),this.listenTo(this.core.mediaControl,u.Events.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.core.mediaControl,u.Events.MEDIACONTROL_HIDE,this.hideSelectLevelMenu)},e.prototype.bindPlaybackEvents=function(){this.playback&&(this.listenTo(this.playback,u.Events.PLAYBACK_LEVELS_AVAILABLE,this.fillLevels),this.listenTo(this.playback,u.Events.PLAYBACK_LEVEL_SWITCH_START,this.startLevelSwitch),this.listenTo(this.playback,u.Events.PLAYBACK_LEVEL_SWITCH_END,this.stopLevelSwitch),this.listenTo(this.playback,u.Events.PLAYBACK_BITRATE,this.updateCurrentLevel),this.playback.levels&&this.playback.levels.length>0&&this.fillLevels(this.playback.levels))},e.prototype.reload=function(){var t=this;this.stopListening(),r.nextTick((function(){t.bindEvents(),t.bindPlaybackEvents()}))},e.prototype.shouldRender=function(){if(!this.container||!this.playback)return!1;var t=void 0!==this.playback.currentLevel,e=!!(this.levels&&this.levels.length>1);return t&&e},e.prototype.render=function(){if(this.shouldRender()){var t=u.Styler.getStyleFor(c.default,{baseUrl:this.core.options.baseUrl});this.$el.html(this.template({levels:this.levels,title:this.getTitle()})),this.$el.append(t),this.core.mediaControl.$(".media-control-right-panel").append(this.el),this.$(".level_selector ul").css("max-height",.8*this.core.el.offsetHeight),this.highlightCurrentLevel()}return this},e.prototype.fillLevels=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;void 0===this.selectedLevelId&&(this.selectedLevelId=e);var n=this.core.options&&this.core.options.levelSelectorConfig&&this.core.options.levelSelectorConfig.onLevelsAvailable;if(n){if("function"!=typeof n)throw new TypeError("onLevelsAvailable must be a function");t=n(t.slice())}this.levels=t,this.configureLevelsLabels(),this.render()},e.prototype.configureLevelsLabels=function(){if(void 0!==this.core.options.levelSelectorConfig){var t=this.core.options.levelSelectorConfig.labelCallback;if(t&&"function"!=typeof t)throw new TypeError("labelCallback must be a function");var e=this.core.options.levelSelectorConfig.labels,n=e?this.core.options.levelSelectorConfig.labels:{};if(t||e){var r=void 0,i=void 0;for(var a in this.levels)i=n[(r=this.levels[a]).id],t?r.label=t(r,i):i&&(r.label=i)}}},e.prototype.findLevelBy=function(t){var e=void 0;return this.levels.forEach((function(n){n.id===t&&(e=n)})),e},e.prototype.onLevelSelect=function(t){return this.selectedLevelId=parseInt(t.target.dataset.levelSelectorSelect,10),this.playback.currentLevel==this.selectedLevelId||(this.playback.currentLevel=this.selectedLevelId,this.toggleContextMenu(),t.stopPropagation()),!1},e.prototype.onShowLevelSelectMenu=function(){this.toggleContextMenu()},e.prototype.hideSelectLevelMenu=function(){this.$(".level_selector ul").hide()},e.prototype.toggleContextMenu=function(){this.$(".level_selector ul").toggle()},e.prototype.buttonElement=function(){return this.$(".level_selector button")},e.prototype.levelElement=function(t){return this.$(".level_selector ul a"+(isNaN(t)?"":'[data-level-selector-select="'+t+'"]')).parent()},e.prototype.getTitle=function(){return(this.core.options.levelSelectorConfig||{}).title},e.prototype.startLevelSwitch=function(){this.buttonElement().addClass("changing")},e.prototype.stopLevelSwitch=function(){this.buttonElement().removeClass("changing")},e.prototype.updateText=function(t){-1===t?this.buttonElement().text(this.currentLevel?"AUTO ("+this.currentLevel.label+")":"AUTO"):this.buttonElement().text(this.findLevelBy(t).label)},e.prototype.updateCurrentLevel=function(t){var e=this.findLevelBy(t.level);this.currentLevel=e||null,this.highlightCurrentLevel()},e.prototype.highlightCurrentLevel=function(){var t=this;this.levelElement().removeClass("current"),this.currentLevel&&this.levelElement(this.currentLevel.id).addClass("current"),this.updateText(this.selectedLevelId);var e=this.currentLevel&&this.currentLevel.language;e&&(this.levelElement().removeClass("hidden"),this.levels.forEach((function(n){n.language!=e&&t.levelElement(n.id).addClass("hidden")})))},(0,a.default)(e,[{key:"name",get:function(){return"level_selector"}},{key:"template",get:function(){return(0,u.template)(l.default)}},{key:"attributes",get:function(){return{class:this.name,"data-level-selector":""}}},{key:"events",get:function(){return{"click [data-level-selector-select]":"onLevelSelect","click [data-level-selector-button]":"onShowLevelSelectMenu"}}},{key:"container",get:function(){return this.core.activeContainer?this.core.activeContainer:this.core.mediaControl.container}},{key:"playback",get:function(){return this.core.activePlayback?this.core.activePlayback:this.core.getCurrentPlayback()}}],[{key:"version",get:function(){return VERSION}}]),e}(u.UICorePlugin);e.default=f,t.exports=e.default}).call(e,n(42))},function(t,e){var n,r,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(t){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var u,l=[],c=!1,d=-1;function f(){c&&u&&(c=!1,u.length?l=u.concat(l):d=-1,l.length&&h())}function h(){if(!c){var t=s(f);c=!0;for(var e=l.length;e;){for(u=l,l=[];++d<e;)u&&u[d].run();d=-1,e=l.length}u=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}i.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];l.push(new p(t,e)),1!==l.length||c||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(45),a=(r=i)&&r.__esModule?r:{default:r};e.default=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),(0,a.default)(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()},function(t,e,n){t.exports={default:n(46),__esModule:!0}},function(t,e,n){n(47);var r=n(1).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(9);r(r.S+r.F*!n(3),"Object",{defineProperty:n(2).f})},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(31),a=(r=i)&&r.__esModule?r:{default:r};e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,a.default)(e))&&"function"!=typeof e?t:e}},function(t,e,n){t.exports={default:n(51),__esModule:!0}},function(t,e,n){n(52),n(62),t.exports=n(25).f("iterator")},function(t,e,n){"use strict";var r=n(53)(!0);n(32)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e,n){var r=n(16),i=n(17);t.exports=function(t){return function(e,n){var a,o,s=String(i(e)),u=r(n),l=s.length;return u<0||u>=l?t?"":void 0:(a=s.charCodeAt(u))<55296||a>56319||u+1===l||(o=s.charCodeAt(u+1))<56320||o>57343?t?s.charAt(u):a:t?s.slice(u,u+2):o-56320+(a-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(19),i=n(12),a=n(24),o={};n(5)(o,n(8)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(o,{next:i(1,n)}),a(t,e+" Iterator")}},function(t,e,n){var r=n(2),i=n(10),a=n(20);t.exports=n(3)?Object.defineProperties:function(t,e){i(t);for(var n,o=a(e),s=o.length,u=0;s>u;)r.f(t,n=o[u++],e[n]);return t}},function(t,e,n){var r=n(35);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(7),i=n(58),a=n(59);t.exports=function(t){return function(e,n,o){var s,u=r(e),l=i(u.length),c=a(o,l);if(t&&n!=n){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((t||c in u)&&u[c]===n)return t||c||0;return!t&&-1}}},function(t,e,n){var r=n(16),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(16),i=Math.max,a=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):a(t,e)}},function(t,e,n){var r=n(0).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(4),i=n(36),a=n(21)("IE_PROTO"),o=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?o:null}},function(t,e,n){n(63);for(var r=n(0),i=n(5),a=n(18),o=n(8)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<s.length;u++){var l=s[u],c=r[l],d=c&&c.prototype;d&&!d[o]&&i(d,o,l),a[l]=a.Array}},function(t,e,n){"use strict";var r=n(64),i=n(65),a=n(18),o=n(7);t.exports=n(32)(Array,"Array",(function(t,e){this._t=o(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){t.exports={default:n(67),__esModule:!0}},function(t,e,n){n(68),n(73),n(74),n(75),t.exports=n(1).Symbol},function(t,e,n){"use strict";var r=n(0),i=n(4),a=n(3),o=n(9),s=n(33),u=n(69).KEY,l=n(11),c=n(22),d=n(24),f=n(14),h=n(8),p=n(25),g=n(26),y=n(70),v=n(71),m=n(10),b=n(6),A=n(36),_=n(7),E=n(15),T=n(12),w=n(19),S=n(72),k=n(39),C=n(37),L=n(2),x=n(20),R=k.f,I=L.f,P=S.f,O=r.Symbol,D=r.JSON,M=D&&D.stringify,N=h("_hidden"),U=h("toPrimitive"),F={}.propertyIsEnumerable,B=c("symbol-registry"),j=c("symbols"),K=c("op-symbols"),V=Object.prototype,G="function"==typeof O&&!!C.f,H=r.QObject,Y=!H||!H.prototype||!H.prototype.findChild,z=a&&l((function(){return 7!=w(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=R(V,e);r&&delete V[e],I(t,e,n),r&&t!==V&&I(V,e,r)}:I,$=function(t){var e=j[t]=w(O.prototype);return e._k=t,e},W=G&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O},q=function(t,e,n){return t===V&&q(K,e,n),m(t),e=E(e,!0),m(n),i(j,e)?(n.enumerable?(i(t,N)&&t[N][e]&&(t[N][e]=!1),n=w(n,{enumerable:T(0,!1)})):(i(t,N)||I(t,N,T(1,{})),t[N][e]=!0),z(t,e,n)):I(t,e,n)},X=function(t,e){m(t);for(var n,r=y(e=_(e)),i=0,a=r.length;a>i;)q(t,n=r[i++],e[n]);return t},J=function(t){var e=F.call(this,t=E(t,!0));return!(this===V&&i(j,t)&&!i(K,t))&&(!(e||!i(this,t)||!i(j,t)||i(this,N)&&this[N][t])||e)},Q=function(t,e){if(t=_(t),e=E(e,!0),t!==V||!i(j,e)||i(K,e)){var n=R(t,e);return!n||!i(j,e)||i(t,N)&&t[N][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=P(_(t)),r=[],a=0;n.length>a;)i(j,e=n[a++])||e==N||e==u||r.push(e);return r},tt=function(t){for(var e,n=t===V,r=P(n?K:_(t)),a=[],o=0;r.length>o;)!i(j,e=r[o++])||n&&!i(V,e)||a.push(j[e]);return a};G||(s((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===V&&e.call(K,n),i(this,N)&&i(this[N],t)&&(this[N][t]=!1),z(this,t,T(1,n))};return a&&Y&&z(V,t,{configurable:!0,set:e}),$(t)}).prototype,"toString",(function(){return this._k})),k.f=Q,L.f=q,n(38).f=S.f=Z,n(27).f=J,C.f=tt,a&&!n(13)&&s(V,"propertyIsEnumerable",J,!0),p.f=function(t){return $(h(t))}),o(o.G+o.W+o.F*!G,{Symbol:O});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)h(et[nt++]);for(var rt=x(h.store),it=0;rt.length>it;)g(rt[it++]);o(o.S+o.F*!G,"Symbol",{for:function(t){return i(B,t+="")?B[t]:B[t]=O(t)},keyFor:function(t){if(!W(t))throw TypeError(t+" is not a symbol!");for(var e in B)if(B[e]===t)return e},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),o(o.S+o.F*!G,"Object",{create:function(t,e){return void 0===e?w(t):X(w(t),e)},defineProperty:q,defineProperties:X,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var at=l((function(){C.f(1)}));o(o.S+o.F*at,"Object",{getOwnPropertySymbols:function(t){return C.f(A(t))}}),D&&o(o.S+o.F*(!G||l((function(){var t=O();return"[null]"!=M([t])||"{}"!=M({a:t})||"{}"!=M(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(b(e)||void 0!==t)&&!W(t))return v(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!W(e))return e}),r[1]=e,M.apply(D,r)}}),O.prototype[U]||n(5)(O.prototype,U,O.prototype.valueOf),d(O,"Symbol"),d(Math,"Math",!0),d(r.JSON,"JSON",!0)},function(t,e,n){var r=n(14)("meta"),i=n(6),a=n(4),o=n(2).f,s=0,u=Object.isExtensible||function(){return!0},l=!n(11)((function(){return u(Object.preventExtensions({}))})),c=function(t){o(t,r,{value:{i:"O"+ ++s,w:{}}})},d=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,r)){if(!u(t))return"F";if(!e)return"E";c(t)}return t[r].i},getWeak:function(t,e){if(!a(t,r)){if(!u(t))return!0;if(!e)return!1;c(t)}return t[r].w},onFreeze:function(t){return l&&d.NEED&&u(t)&&!a(t,r)&&c(t),t}}},function(t,e,n){var r=n(20),i=n(37),a=n(27);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var o,s=n(t),u=a.f,l=0;s.length>l;)u.call(t,o=s[l++])&&e.push(o);return e}},function(t,e,n){var r=n(35);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(7),i=n(38).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return o&&"[object Window]"==a.call(t)?function(t){try{return i(t)}catch(t){return o.slice()}}(t):i(r(t))}},function(t,e){},function(t,e,n){n(26)("asyncIterator")},function(t,e,n){n(26)("observable")},function(t,e,n){"use strict";e.__esModule=!0;var r=o(n(77)),i=o(n(81)),a=o(n(31));function o(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,a.default)(e)));t.prototype=(0,i.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(r.default?(0,r.default)(t,e):t.__proto__=e)}},function(t,e,n){t.exports={default:n(78),__esModule:!0}},function(t,e,n){n(79),t.exports=n(1).Object.setPrototypeOf},function(t,e,n){var r=n(9);r(r.S,"Object",{setPrototypeOf:n(80).set})},function(t,e,n){var r=n(6),i=n(10),a=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(28)(Function.call,n(39).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return a(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:a}},function(t,e,n){t.exports={default:n(82),__esModule:!0}},function(t,e,n){n(83);var r=n(1).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){var r=n(9);r(r.S,"Object",{create:n(19)})},function(e,n){e.exports=t},function(t,e){t.exports='<button data-level-selector-button>\n Auto\n</button>\n<ul>\n <% if (title) { %>\n <li data-title><%= title %></li>\n <% }; %>\n <li><a href="#" data-level-selector-select="-1">AUTO</a></li>\n <% for (var i = 0; i < levels.length; i++) { %>\n <li><a href="#" data-level-selector-select="<%= levels[i].id %>"><%= levels[i].label %></a></li>\n <% }; %>\n</ul>\n'},function(t,e,n){var r=n(87);"string"==typeof r&&(r=[[t.i,r,""]]),n(89)(r,{singleton:!0}),r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(88)(!1)).push([t.i,'.level_selector[data-level-selector] {\n float: right;\n position: relative;\n height: 100%; }\n .level_selector[data-level-selector] button {\n background-color: transparent;\n color: #fff;\n font-family: Roboto,"Open Sans",Arial,sans-serif;\n -webkit-font-smoothing: antialiased;\n border: none;\n font-size: 12px;\n height: 100%; }\n .level_selector[data-level-selector] button:hover {\n color: #c9c9c9; }\n .level_selector[data-level-selector] button.changing {\n -webkit-animation: pulse 0.5s infinite alternate; }\n .level_selector[data-level-selector] > ul {\n overflow-x: hidden;\n overflow-y: auto;\n list-style-type: none;\n position: absolute;\n bottom: 100%;\n display: none;\n background-color: rgba(28, 28, 28, 0.9);\n white-space: nowrap; }\n .level_selector[data-level-selector] li {\n font-size: 12px;\n color: #eee; }\n .level_selector[data-level-selector] li[data-title] {\n background-color: #333;\n padding: 8px 25px; }\n .level_selector[data-level-selector] li a {\n color: #eee;\n padding: 5px 18px;\n display: block;\n text-decoration: none; }\n .level_selector[data-level-selector] li a:hover {\n background-color: rgba(255, 255, 255, 0.1);\n color: #fff; }\n .level_selector[data-level-selector] li a:hover a {\n color: #fff;\n text-decoration: none; }\n .level_selector[data-level-selector] li.current a {\n color: #2ecc71; }\n .level_selector[data-level-selector] li.hidden {\n display: none; }\n',""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,r=t[1]||"",i=t[3];if(!i)return r;if(e&&"function"==typeof btoa){var a=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),o=i.sources.map((function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"}));return[r].concat(o).concat([a]).join("\n")}return[r].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var a=this[i][0];"number"==typeof a&&(r[a]=!0)}for(i=0;i<t.length;i++){var o=t[i];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),e.push(o))}},e}},function(t,e){var n={},r=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}},i=r((function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())})),a=r((function(){return document.head||document.getElementsByTagName("head")[0]})),o=null,s=0;function u(t,e){for(var r=0;r<t.length;r++){var i=t[r],a=n[i.id];if(a){a.refs++;for(var o=0;o<a.parts.length;o++)a.parts[o](i.parts[o]);for(;o<i.parts.length;o++)a.parts.push(d(i.parts[o],e))}else{var s=[];for(o=0;o<i.parts.length;o++)s.push(d(i.parts[o],e));n[i.id]={id:i.id,refs:1,parts:s}}}}function l(t){for(var e=[],n={},r=0;r<t.length;r++){var i=t[r],a=i[0],o={css:i[1],media:i[2],sourceMap:i[3]};n[a]?n[a].parts.push(o):e.push(n[a]={id:a,parts:[o]})}return e}function c(){var t=document.createElement("style"),e=a();return t.type="text/css",e.appendChild(t),t}function d(t,e){var n,r,i,u,l;if(e.singleton){var d=s++;n=o||(o=c()),r=p.bind(null,n,d,!1),i=p.bind(null,n,d,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(u=document.createElement("link"),l=a(),u.rel="stylesheet",l.appendChild(u),n=u,r=y.bind(null,n),i=function(){n.parentNode.removeChild(n),n.href&&URL.revokeObjectURL(n.href)}):(n=c(),r=g.bind(null,n),i=function(){n.parentNode.removeChild(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");void 0===(e=e||{}).singleton&&(e.singleton=i());var r=l(t);return u(r,e),function(t){for(var i=[],a=0;a<r.length;a++){var o=r[a];(s=n[o.id]).refs--,i.push(s)}for(t&&u(l(t),e),a=0;a<i.length;a++){var s;if(0===(s=i[a]).refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete n[s.id]}}}};var f,h=(f=[],function(t,e){return f[t]=e,f.filter(Boolean).join("\n")});function p(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=h(e,i);else{var a=document.createTextNode(i),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(a,o[e]):t.appendChild(a)}}function g(t,e){var n=e.css,r=e.media;if(e.sourceMap,r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function y(t,e){var n=e.css,r=(e.media,e.sourceMap);r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),a=t.href;t.href=URL.createObjectURL(i),a&&URL.revokeObjectURL(a)}}])},t.exports=r(n(0))},function(module,exports,__webpack_require__){var factory;window,factory=function(__WEBPACK_EXTERNAL_MODULE_clappr__){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="./src/main.js")}({"./node_modules/css-loader/dist/runtime/api.js":
|
||
/*!*****************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/runtime/api.js ***!
|
||
\*****************************************************/
|
||
/*! no static exports found */function(module,exports,__webpack_require__){"use strict";eval('/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/ // css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports=function(useSourceMap){var list=[];// return the list of modules as css string\nlist.toString=function toString(){return this.map(function(item){var content=cssWithMappingToString(item,useSourceMap);if(item[2]){return"@media ".concat(item[2]," {").concat(content,"}");}return content;}).join(\'\');};// import a list of modules into the list\n// eslint-disable-next-line func-names\nlist.i=function(modules,mediaQuery,dedupe){if(typeof modules===\'string\'){// eslint-disable-next-line no-param-reassign\nmodules=[[null,modules,\'\']];}var alreadyImportedModules={};if(dedupe){for(var i=0;i<this.length;i++){// eslint-disable-next-line prefer-destructuring\nvar id=this[i][0];if(id!=null){alreadyImportedModules[id]=true;}}}for(var _i=0;_i<modules.length;_i++){var item=[].concat(modules[_i]);if(dedupe&&alreadyImportedModules[item[0]]){// eslint-disable-next-line no-continue\ncontinue;}if(mediaQuery){if(!item[2]){item[2]=mediaQuery;}else{item[2]="".concat(mediaQuery," and ").concat(item[2]);}}list.push(item);}};return list;};function cssWithMappingToString(item,useSourceMap){var content=item[1]||\'\';// eslint-disable-next-line prefer-destructuring\nvar cssMapping=item[3];if(!cssMapping){return content;}if(useSourceMap&&typeof btoa===\'function\'){var sourceMapping=toComment(cssMapping);var sourceURLs=cssMapping.sources.map(function(source){return"/*# sourceURL=".concat(cssMapping.sourceRoot||\'\').concat(source," */");});return[content].concat(sourceURLs).concat([sourceMapping]).join(\'\\n\');}return[content].join(\'\\n\');}// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap){// eslint-disable-next-line no-undef\nvar base64=btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));var data="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);return"/*# ".concat(data," */");}\n\n//# sourceURL=webpack://AudioTrackSelector/./node_modules/css-loader/dist/runtime/api.js?')},"./src/main.js":
|
||
/*!*********************!*\
|
||
!*** ./src/main.js ***!
|
||
\*********************/
|
||
/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return AudioTrackSelector; });\n/* harmony import */ var clappr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! clappr */ \"clappr\");\n/* harmony import */ var clappr__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(clappr__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _public_audio_track_selector_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./public/audio-track-selector.html */ \"./src/public/audio-track-selector.html\");\n/* harmony import */ var _public_audio_track_selector_html__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_public_audio_track_selector_html__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _public_style_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./public/style.scss */ \"./src/public/style.scss\");\n/* harmony import */ var _public_style_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_public_style_scss__WEBPACK_IMPORTED_MODULE_2__);\nclass AudioTrackSelector extends clappr__WEBPACK_IMPORTED_MODULE_0__[\"UICorePlugin\"]{static get version(){return VERSION;}get name(){return'audio_track_selector';}get template(){return Object(clappr__WEBPACK_IMPORTED_MODULE_0__[\"template\"])(_public_audio_track_selector_html__WEBPACK_IMPORTED_MODULE_1___default.a);}get attributes(){return{'class':this.name,'data-audio-track-selector':''};}get events(){return{'click [data-audio-track-selector-lang]':'handleLanguageSelect','click [data-audio-track-selector-button]':'handleAudioTrackSelectorClick'};}get container(){return this.core.activeContainer?this.core.activeContainer:this.core.mediaControl.container;}get playback(){return this.core.activePlayback?this.core.activePlayback:this.core.getCurrentPlayback();}bindEvents(){if(clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].CORE_ACTIVE_CONTAINER_CHANGED)this.listenTo(this.core,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].CORE_ACTIVE_CONTAINER_CHANGED,this.reload);else this.listenTo(this.core.mediaControl,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].MEDIACONTROL_CONTAINERCHANGED,this.reload);this.listenTo(this.core,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].CORE_READY,this.bindPlaybackEvents);this.listenTo(this.core.mediaControl,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].MEDIACONTROL_RENDERED,this.render);this.listenTo(this.core.mediaControl,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].MEDIACONTROL_HIDE,this._hideContextMenu);}bindPlaybackEvents(){this.listenTo(this.playback,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].PLAYBACK_LEVELS_AVAILABLE,this._handleLevels);this.listenTo(this.playback,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].PLAYBACK_BITRATE,this._handleAdaptation);this.listenTo(this.playback,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].PLAYBACK_PLAY,this._handlePlay);}reload(){this.stopListening();this.bindEvents();this.bindPlaybackEvents();}shouldRender(){if(!this.container)return false;if(!this.playback)return false;// Only display if we have at least 2 languages to choose from\nvar hasChoice=!!(this.languages&&this.languages.size>1);return hasChoice;}render(){if(this.shouldRender()){var style=clappr__WEBPACK_IMPORTED_MODULE_0__[\"Styler\"].getStyleFor(_public_style_scss__WEBPACK_IMPORTED_MODULE_2___default.a,{baseUrl:this.core.options.baseUrl});this.$el.html(this.template({'title':this._getTitle(),'languages':this.languages}));this.$el.append(style);this.core.mediaControl.$('.media-control-right-panel').append(this.el);this._highlightCurrentElement();}return this;}_setLanguage(language){console.log(\"setLanguage\",language);// custom voc dash-shaka-playback\nif(this.playback.selectAudioLanguage){this.nextLanguage=language;this.playback.selectAudioLanguage(language);// hlsjs playback\n}else if(this.playback._hls){// hlsjs may have multiple audiotracks with the same language\n// this will just switch to the first one\nconst track=this.playback._hls.audioTracks.find(track=>track.lang==language||track.name===language);if(!track)return;this.playback._hls.audioTrack=track.id;this.activeLanguage=language;this._highlightCurrentElement();// html5 track change\n}else if(this.playback.el.audioTracks){// also just selects the first track matching the label\nconst audioTracks=[...this.playback.el.audioTracks];const track=audioTracks.find(track=>track.language==language||track.label===language);if(!track)return;track.enabled=true;this.activeLanguage=language;this._highlightCurrentElement();}}_fillLanguages(){// custom voc dash-shaka-playback\nif(this.playback.audioLanguages){this.languages=new Set(this.playback.audioLanguages);// hlsjs playback\n}else if(this.playback._hls){const audioTracks=this.playback._hls.audioTracks;const currentId=this.playback._hls.audioTrack;const current=audioTracks.find(track=>track.id==currentId);this.languages=new Set(audioTracks.map(track=>track.lang||track.name));if(current){this.activeLanguage=current.lang||current.name;}// native playback\n}else if(this.playback.el.audioTracks){const audioTracks=[...this.playback.el.audioTracks];const current=audioTracks.find(track=>track.enabled);this.languages=new Set(audioTracks.map(track=>track.language||track.label));if(current){this.activeLanguage=current.language||current.label;}}this.render();}handleLanguageSelect(event){event.preventDefault();event.stopPropagation();const selected=event.target.dataset.audioTrackSelectorLang;if(this.activeLanguage==selected)return false;this._setLanguage(selected);this._toggleContextMenu();return false;}// Handles adaptation event from shaka-playback\n_handleAdaptation(variant){if(variant.language){this.activeLanguage=variant.language;this._highlightCurrentElement();}}// shaka-playback knows languages on level event\n_handleLevels(){this._fillLanguages();}// hlsjs-playback and html5video-playback only know languages on play\n_handlePlay(){if(this.playback._hls||this.playback instanceof clappr__WEBPACK_IMPORTED_MODULE_0__[\"HTML5Video\"]){this._fillLanguages();}}handleAudioTrackSelectorClick(event){this._toggleContextMenu();}_toggleContextMenu(){this.$('.audio_track_selector ul').toggle();}_hideContextMenu(){this.$('.audio_track_selector ul').hide();}_getLanguageElement(language=null){if(language)return this.$('.audio_track_selector a[data-audio-track-selector-lang=\"'+language+'\"]').parent();else return this.$('.audio_track_selector a').parent();}_getButtonElement(){return this.$('.audio_track_selector button');}_getTitle(){return(this.core.options.audioTrackSelectorConfig||{}).title;}_highlightCurrentElement(){if(!this.activeLanguage)return;this._getLanguageElement().removeClass('current');this._getLanguageElement(this.activeLanguage).addClass('current');this._getButtonElement().text(this.activeLanguage);}}\n\n//# sourceURL=webpack://AudioTrackSelector/./src/main.js?")},"./src/public/audio-track-selector.html":
|
||
/*!**********************************************!*\
|
||
!*** ./src/public/audio-track-selector.html ***!
|
||
\**********************************************/
|
||
/*! no static exports found */function(module,exports){eval('// Module\nvar code = "<button data-audio-track-selector-button>\\n Language\\n</button>\\n<ul>\\n <% if (title) { %>\\n <li data-title><%= title %></li>\\n <% }; %>\\n <% languages.forEach((language) => { %>\\n <li><a href=\\"#\\" data-audio-track-selector-lang=\\"<%= language %>\\"><%= language %></a></li>\\n <% }); %>\\n</ul>\\n";\n// Exports\nmodule.exports = code;\n\n//# sourceURL=webpack://AudioTrackSelector/./src/public/audio-track-selector.html?')},"./src/public/style.scss":
|
||
/*!*******************************!*\
|
||
!*** ./src/public/style.scss ***!
|
||
\*******************************/
|
||
/*! no static exports found */function(module,exports,__webpack_require__){eval('// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, ".audio_track_selector[data-audio-track-selector] {\\n float: right;\\n height: 100%;\\n position: relative; }\\n .audio_track_selector[data-audio-track-selector] button {\\n background-color: transparent;\\n color: #fff;\\n font-family: Roboto,\\"Open Sans\\",Arial,sans-serif;\\n -webkit-font-smoothing: antialiased;\\n border: none;\\n font-size: 12px;\\n height: 100%; }\\n .audio_track_selector[data-audio-track-selector] button:hover {\\n color: #c9c9c9; }\\n .audio_track_selector[data-audio-track-selector] button.changing {\\n -webkit-animation: pulse 0.5s infinite alternate; }\\n .audio_track_selector[data-audio-track-selector] > ul {\\n overflow-x: hidden;\\n overflow-y: auto;\\n list-style-type: none;\\n position: absolute;\\n bottom: 100%;\\n display: none;\\n background-color: rgba(28, 28, 28, 0.9);\\n white-space: nowrap; }\\n .audio_track_selector[data-audio-track-selector] li {\\n font-size: 12px;\\n color: #eee; }\\n .audio_track_selector[data-audio-track-selector] li[data-title] {\\n background-color: #333;\\n padding: 8px 25px; }\\n .audio_track_selector[data-audio-track-selector] li a {\\n color: #eee;\\n padding: 5px 18px;\\n display: block;\\n text-decoration: none; }\\n .audio_track_selector[data-audio-track-selector] li a:hover {\\n background-color: rgba(255, 255, 255, 0.1);\\n color: #fff; }\\n .audio_track_selector[data-audio-track-selector] li a:hover a {\\n color: #fff;\\n text-decoration: none; }\\n .audio_track_selector[data-audio-track-selector] li.current a {\\n color: #2ecc71; }\\n\\n@-webkit-keyframes pulse {\\n 0% {\\n color: #fff; }\\n 50% {\\n color: #ff0101; }\\n 100% {\\n color: #B80000; } }\\n", ""]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack://AudioTrackSelector/./src/public/style.scss?')},clappr:
|
||
/*!******************************************************************************************!*\
|
||
!*** external {"amd":"clappr","commonjs":"clappr","commonjs2":"clappr","root":"Clappr"} ***!
|
||
\******************************************************************************************/
|
||
/*! no static exports found */function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_clappr__;\n\n//# sourceURL=webpack://AudioTrackSelector/external_%7B%22amd%22:%22clappr%22,%22commonjs%22:%22clappr%22,%22commonjs2%22:%22clappr%22,%22root%22:%22Clappr%22%7D?")}}).default},module.exports=factory(__webpack_require__(0))},function(t,e,n){"use strict";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,i,a=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);o=!0);}catch(t){s=!0,i=t}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}t.exports=function(t){var e=r(t,4),n=e[1],i=e[3];if("function"==typeof btoa){var a=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),s="/*# ".concat(o," */"),u=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[n].concat(u).concat([s]).join("\n")}return[n].join("\n")}},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(r)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(i[o]=!0)}for(var s=0;s<t.length;s++){var u=[].concat(t[s]);r&&i[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),e.push(u))}},e}},function(t,e,n){var r=n(7),i=n(8);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[t.i,i,""]]);var a={insert:"head",singleton:!1};r(i,a);t.exports=i.locals||{}},function(t,e,n){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},a=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),o=[];function s(t){for(var e=-1,n=0;n<o.length;n++)if(o[n].identifier===t){e=n;break}return e}function u(t,e){for(var n={},r=[],i=0;i<t.length;i++){var a=t[i],u=e.base?a[0]+e.base:a[0],l=n[u]||0,c="".concat(u," ").concat(l);n[u]=l+1;var d=s(c),f={css:a[1],media:a[2],sourceMap:a[3]};-1!==d?(o[d].references++,o[d].updater(f)):o.push({identifier:c,updater:y(f,e),references:1}),r.push(c)}return r}function l(t){var e=document.createElement("style"),r=t.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(t){e.setAttribute(t,r[t])})),"function"==typeof t.insert)t.insert(e);else{var o=a(t.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(e)}return e}var c,d=(c=[],function(t,e){return c[t]=e,c.filter(Boolean).join("\n")});function f(t,e,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(t.styleSheet)t.styleSheet.cssText=d(e,i);else{var a=document.createTextNode(i),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(a,o[e]):t.appendChild(a)}}function h(t,e,n){var r=n.css,i=n.media,a=n.sourceMap;if(i?t.setAttribute("media",i):t.removeAttribute("media"),a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}var p=null,g=0;function y(t,e){var n,r,i;if(e.singleton){var a=g++;n=p||(p=l(e)),r=f.bind(null,n,a,!1),i=f.bind(null,n,a,!0)}else n=l(e),r=h.bind(null,n,e),i=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=i());var n=u(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var r=0;r<n.length;r++){var i=s(n[r]);o[i].references--}for(var a=u(t,e),l=0;l<n.length;l++){var c=s(n[l]);0===o[c].references&&(o[c].updater(),o.splice(c,1))}n=a}}}},function(t,e,n){"use strict";n.r(e);var r=n(4),i=n.n(r),a=n(5),o=n.n(a)()(i.a);o.push([t.i,"button.media-control-button[data-hd-indicator]{display:none !important}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]{height:40px}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar]{height:2px;background-color:#ccc}.player-poster[data-poster] .play-wrapper[data-poster] svg path{fill:#ccc}.spinner-three-bounce[data-spinner]>div{background-color:#ccc}.clappr-watermark[data-watermark]{transition:opacity .5s ease-out;width:8%;min-width:50px;max-width:100px}.clappr-watermark[data-watermark].clappr-watermark-hide{opacity:0}.clappr-watermark[data-watermark-top-left]{top:0px;left:15px;text-align:left}@media(min-width: 768px){.clappr-watermark[data-watermark-top-left]{top:10px;left:30px}}","",{version:3,sources:["webpack://./src/public/style.scss"],names:[],mappings:"AAAA,+CACC,uBAAA,CAGD,oGACC,WAAA,CAGD,kIACC,UAAA,CACA,qBAAA,CAID,gEACC,SAAA,CAID,wCACC,qBAAA,CAID,kCACC,+BAAA,CACA,QAAA,CACA,cAAA,CACA,eAAA,CACA,wDACC,SAAA,CAIF,2CACC,OAAA,CACA,SAAA,CACA,eAAA,CAEA,yBALD,2CAME,QAAA,CACA,SAAA,CAAA",sourcesContent:["button.media-control-button[data-hd-indicator] {\n\tdisplay: none !important;\n}\n\n.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] {\n\theight: 40px;\n}\n\n.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] {\n\theight: 2px;\n\tbackground-color: #ccc;\n}\n\n// Change play button color from #FFF to grey.\n.player-poster[data-poster] .play-wrapper[data-poster] svg path {\n\tfill: #ccc;\n}\n\n// Change loading indicator color from #FFF to grey.\n.spinner-three-bounce[data-spinner] > div {\n\tbackground-color: #ccc;\n}\n\n// Fade out watermark with media control\n.clappr-watermark[data-watermark] {\n\ttransition: opacity 0.5s ease-out;\n\twidth: 8%;\n\tmin-width: 50px;\n\tmax-width: 100px;\n\t&.clappr-watermark-hide{\n\t\topacity: 0;\n\t}\n}\n\n.clappr-watermark[data-watermark-top-left]{\n\ttop: 0px;\n\tleft: 15px;\n\ttext-align: left;\n\n\t@media (min-width: 768px) {\n\t\ttop: 10px;\n\t\tleft: 30px;\n\t}\n}"],sourceRoot:""}]),e.default=o},function(t,e,n){"use strict";n.r(e),n.d(e,"Player",(function(){return D})),n.d(e,"Mediator",(function(){return r.Mediator})),n.d(e,"Events",(function(){return r.Events})),n.d(e,"Browser",(function(){return r.Browser})),n.d(e,"PlayerInfo",(function(){return r.PlayerInfo})),n.d(e,"MediaControl",(function(){return r.MediaControl})),n.d(e,"ContainerPlugin",(function(){return r.ContainerPlugin})),n.d(e,"UIContainerPlugin",(function(){return r.UIContainerPlugin})),n.d(e,"CorePlugin",(function(){return r.CorePlugin})),n.d(e,"UICorePlugin",(function(){return r.UICorePlugin})),n.d(e,"Playback",(function(){return r.Playback})),n.d(e,"Container",(function(){return r.Container})),n.d(e,"Core",(function(){return r.Core})),n.d(e,"PlayerError",(function(){return r.PlayerError})),n.d(e,"Loader",(function(){return r.Loader})),n.d(e,"BaseObject",(function(){return r.BaseObject})),n.d(e,"UIObject",(function(){return r.UIObject})),n.d(e,"Utils",(function(){return r.Utils})),n.d(e,"BaseFlashPlayback",(function(){return r.BaseFlashPlayback})),n.d(e,"Flash",(function(){return r.Flash})),n.d(e,"FlasHLS",(function(){return r.FlasHLS})),n.d(e,"HLS",(function(){return r.HLS})),n.d(e,"HTML5Audio",(function(){return r.HTML5Audio})),n.d(e,"HTML5Video",(function(){return r.HTML5Video})),n.d(e,"HTMLImg",(function(){return r.HTMLImg})),n.d(e,"NoOp",(function(){return r.NoOp})),n.d(e,"ClickToPausePlugin",(function(){return r.ClickToPausePlugin})),n.d(e,"DVRControls",(function(){return r.DVRControls})),n.d(e,"Favicon",(function(){return r.Favicon})),n.d(e,"Log",(function(){return r.Log})),n.d(e,"Poster",(function(){return r.Poster})),n.d(e,"SpinnerThreeBouncePlugin",(function(){return r.SpinnerThreeBouncePlugin})),n.d(e,"WaterMarkPlugin",(function(){return r.WaterMarkPlugin})),n.d(e,"Styler",(function(){return r.Styler})),n.d(e,"Vendor",(function(){return r.Vendor})),n.d(e,"version",(function(){return r.version})),n.d(e,"template",(function(){return r.template})),n.d(e,"$",(function(){return r.$}));var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2),u=n.n(s),l=n(3),c=n.n(l);n(6);function d(t){return(d="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})(t)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(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)}}function p(t,e,n){return e&&h(t.prototype,e),n&&h(t,n),t}function g(t,e){return(g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=m(t);if(e){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(t,e){return!e||"object"!==d(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e)}(n,t);var e=y(n);function n(){var t;f(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(t=e.call.apply(e,[this].concat(i))).timeout=1,t.max_timeout=10,t}return p(n,[{key:"name",get:function(){return"error_plugin"}},{key:"background",get:function(){return"data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22100%22%20height%3D%22100%22%20viewBox%3D%220%200%2026.458318%2026.458333%22%3E%3Cpath%20d%3D%22M13.23.302C6.07.302.264%206.107.264%2013.267a12.965%2012.965%200%200%200%20.847%204.595c.19-.497.408-.982.682-1.438.14-.232.294-.457.396-.707.103-.25.15-.533.072-.792a1.362%201.362%200%200%200-.22-.404c-.092-.123-.192-.24-.275-.37a1.662%201.662%200%200%201-.255-1.12%201.5%201.5%200%200%201%20.58-.987c.28-.208.635-.3.985-.288a1.757%201.757%200%200%201%20.346.048c.452.11.852.393%201.148.75.368.447.584%201.01.637%201.586a3.574%203.574%200%200%201-.275%201.693c-.4.955-1.15%201.725-1.565%202.673-.338.775-.435%201.638-.39%202.483.007.077.018.155.025.234a12.965%2012.965%200%200%200%203.62%203.18%2017.63%2017.63%200%200%201-.13-2.11c.002-.56.03-1.12.085-1.675-.34-.236-.65-.51-.87-.86-.392-.62-.466-1.408-.305-2.124.16-.717.54-1.37.997-1.945a7.833%207.833%200%200%201%202.835-2.223%2010.305%2010.305%200%200%201-.09-.126%204.854%204.854%200%200%201-.702-2.176c-.06-.777.064-1.554.115-2.33.037-.543.04-1.085.07-1.627.038-.627.114-1.255.29-1.858a2.36%202.36%200%200%201%20.266-.63%201.4%201.4%200%200%201%20.594-.514c.274-.108.51-.132.776-.087.22.046.425.156.604.294.18.138.335.304.48.477a7.298%207.298%200%200%201%201.04%201.617%203.57%203.57%200%200%201%201.09%200%207.287%207.287%200%200%201%201.04-1.616%203.21%203.21%200%200%201%20.48-.476c.18-.14.383-.248.604-.295a1.268%201.268%200%200%201%20.78.086%201.402%201.402%200%200%201%20.595.517c.124.19.202.408.266.626.175.602.252%201.23.29%201.856.03.543.033%201.087.07%201.628.05.777.175%201.554.116%202.33a4.855%204.855%200%200%201-.705%202.178c-.03.05-.07.096-.103.145.247.278.598.513.898.614a1.956%201.956%200%200%200%201.05.044%201.65%201.65%200%200%200%20.533-.226%201.253%201.253%200%200%200%20.397-.418c.118-.21.166-.45.192-.687.067-.61%200-1.224-.05-1.835-.034-.396-.062-.8.027-1.187.06-.26.177-.518.373-.7a1.106%201.106%200%200%201%20.465-.255%201.312%201.312%200%200%201%20.53-.03c.38.057.736.274.948.594.12.18.194.39.238.604.044.213.06.43.072.648.04.76.04%201.522.018%202.284-.018.665-.055%201.348-.32%201.957-.343.782-1.032%201.366-1.775%201.786a7.052%207.052%200%200%201-1.588.647c.482%201.54.733%203.24.733%204.968a17.6%2017.6%200%200%201-.135%202.125%2012.964%2012.964%200%200%200%206.384-11.152c0-7.16-5.806-12.965-12.965-12.965zM9.602%2016.284v1.483a1.88%201.88%200%200%201%201.083.362%201.738%201.738%200%200%201%20.556.68c.122.27.166.576.116.868a1.493%201.493%200%200%201-.332.708%201.647%201.647%200%200%201-.635.458%201.738%201.738%200%200%201-.787.122v3.73l7.762-4.208-7.762-4.204z%22%20fill%3D%22%23999%22%2F%3E%3C%2Fsvg%3E"}}]),p(n,[{key:"bindEvents",value:function(){this.listenTo(this.container,i.a.Events.CONTAINER_ERROR,this.onError)}},{key:"hide",value:function(){this._err&&this._err.remove()}},{key:"show",value:function(t){var e=i.a.$;this.hide();var n=t&&t.title||"Oh no, we encountered an error",r=t&&t.subtitle||"Please reload the page";this._err=e("<div>").css({position:"absolute","z-index":"999",width:"100%",height:"100%","background-image":"url("+this.background+")","background-size":"18%","background-repeat":"no-repeat","background-color":"black","background-position":"center","text-align":"center","font-weight":"bold",color:"#eee"});var a=e("<div>").css({position:"absolute",width:"100%","padding-bottom":"5%",bottom:0}).append(e("<h2>").text(n).css({"font-size":"2em"})).append(e("<p>").text(r).css({"font-size":"1.2em",margin:"15px"}));this._err.append(a),this.container&&this.container.$el.prepend(this._err)}},{key:"onError",value:function(t){var e=this;if(this.container){var n=this.options.errorPlugin.onError,r=null;n&&"function"==typeof n&&(r=n(t,(function(){e.hide(),e.container.getPlugin("click_to_pause").enable()}))),this.show(r),this.container.getPlugin("click_to_pause").disable()}}}]),n}(i.a.ContainerPlugin);function A(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&null!=t[n]&&e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e.join("&")}function _(t){return function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(new Headers,e.replace(/\s+/g," ")),i=A({query:r,operation:t,variables:JSON.stringify(n)});return fetch("https://media.ccc.de/graphql?".concat(i),{method:"GET",headers:{Accept:"application/json"}}).then((function(t){var e=t.body.getReader(),n="",r=new TextDecoder("utf-8");return e.read().then((function t(i){var a=i.done,o=i.value;return a?JSON.parse(n):(n+=r.decode(o),e.read().then(t))}))}))}("LectureBySlug","\n query LectureBySlug($slug: ID!) {\n lecture: lectureBySlug(slug: $slug) {\n originalLanguage\n timelens { thumbnailsUrl, timelineUrl }\n videos { label, source: url, mimeType }\n images { posterUrl }\n relive\n playerConfig\n }\n }\n ",{slug:t}).then((function(t){if(!t.data.lecture)throw new Error("Lecture could not be found");return t.data.lecture}))}var E=function(t,e,n,r,i){var a="MediaSource"in window,o={poster:"//cdn.c3voc.de/thumbnail/".concat(t,"/poster.jpeg"),levelSelectorConfig:{labelCallback:function(t){var e=t.videoBandwidth||t.level.bitrate;return e<=1e5?"Slides":e<=2e6?"SD":e<=5e6?"HD":"Source"},title:"Quality"},disableErrorScreen:!0,errorPlugin:{onError:i},vocConfigUpdate:function(e){if("visible"===document.visibilityState&&!e.isPlaying()){var n,r="//cdn.c3voc.de/thumbnail/".concat(t,"/poster.jpeg?t=").concat(Date.now());(n=r,new Promise((function(t,e){var r=new Image;r.onload=function(){t()},r.onerror=function(){e()},r.src=n}))).then((function(){e.configure({poster:r})}))}}};return!(-1!=navigator.userAgent.indexOf("Firefox"))&&!n&&a&&MediaSource.isTypeSupported('video/webm; codecs="vp9,opus"')?(o.source={source:"//cdn.c3voc.de/dash/".concat(t,"/manifest.mpd")},o.shakaConfiguration={preferredAudioLanguage:r,abr:{defaultBandwidthEstimate:1e6},streaming:{jumpLargeGaps:!0},manifest:{dash:{defaultPresentationDelay:3,ignoreSuggestedPresentationDelay:!0}}}):e||!a&&""==document.createElement("video").canPlayType("application/vnd.apple.mpegURL")?o.source=e?{source:"//cdn.c3voc.de/".concat(t,"_native.mp3"),mimeType:"audio/mp3"}:{source:"//cdn.c3voc.de/".concat(t,"_native_hd.webm"),mimeType:"video/webm"}:o.source={source:"//cdn.c3voc.de/hls/".concat(t,"/native_hd.m3u8"),mimeType:"application/vnd.apple.mpegURL"},Promise.resolve(o)};function T(t){return(T="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})(t)}function w(t){return function(t){if(Array.isArray(t))return S(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return S(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function k(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)}}function C(t,e){return(C=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function L(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=I(t);if(e){var i=I(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x(this,n)}}function x(t,e){return!e||"object"!==T(e)&&"function"!=typeof e?R(t):e}function R(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function I(t){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var P=function(t,e){return"dash_shaka_playback"==t.origin&&(t.raw.code==e||t.raw.detail&&t.raw.detail.code==e)},O=function(t,e){return"hls"==t.origin&&t.raw.response.code==e},D=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&C(t,e)}(s,t);var e,n,i,a=L(s);function s(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.call(this)).timeout=5,e.maxTimeout=15,e._playerPromise=e._getConfig(t).then((function(t){return e._options=t,e._player=new r.Player(e._options),e._player.core&&e._player.core.isReady?e._addEventListeners():e.listenToOnce(e._player,r.Events.PLAYER_READY,e._addEventListeners.bind(R(e))),t.vocConfigUpdate&&setInterval((function(){return t.vocConfigUpdate(e._player)}),3e4),e._player})),e}return e=s,(n=[{key:"attachTo",value:function(){var t,e=arguments;(t=console).log.apply(t,["will attach"].concat(Array.prototype.slice.call(arguments))),this._playerPromise.then((function(t){var n;(n=console).log.apply(n,["attach"].concat(w(e))),t.attachTo.apply(t,e)}))}},{key:"_getConfig",value:function(t){var e=[c.a,u.a,o.a,b];t.plugins&&t.plugins.length&&(e=e.concat(t.plugins),console.log("loading plugins"),e.forEach((function(t){return console.log(t.name,t.type)})));var n=Promise.resolve({});return t.vocStream?n=E(t.vocStream,t.audioOnly,t.h264Only,t.preferredAudioLanguage,this._handleError.bind(this)):t.vocLecture&&(n=_(t.vocLecture).then((function(t){var e,n,r,i;return{sources:t.videos||(null===(e=t.relive)||void 0===e?void 0:e.playlistCut)||(null===(n=t.relive)||void 0===n?void 0:n.playlist),poster:null===(r=t.images)||void 0===r?void 0:r.posterUrl,timelens:t.timelens,playback:{externalTracks:null===(i=t.playerConfig)||void 0===i?void 0:i.subtitles},levelSelectorConfig:{labelCallback:function(t,e){console.log("labelCallback",arguments);var n=t.videoBandwidth||t.level.bitrate;return n<=1e5?"Slides":n<=9e5?"SD":"HD"},title:"Quality"}}})).catch((function(t){return console.log("Failed to fetch media sources",t),{playbackNotSupportedMessage:"".concat(t.message)}}))),n.then((function(n){return Object.assign({width:"100%",height:"100%",hideMediaControlDelay:1e3,position:"top-left",watermark:"data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3Csvg%0A%20%20%20xmlns%3Adc%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%22%0A%20%20%20xmlns%3Acc%3D%22http%3A%2F%2Fcreativecommons.org%2Fns%23%22%0A%20%20%20xmlns%3Ardf%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%0A%20%20%20xmlns%3Asvg%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20%20id%3D%22svg4568%22%0A%20%20%20version%3D%221.1%22%0A%20%20%20viewBox%3D%220%200%2026.458318%2026.458333%22%0A%20%20%20height%3D%22100%22%0A%20%20%20width%3D%22100%22%3E%0A%20%20%3Cmetadata%0A%20%20%20%20%20id%3D%22metadata4574%22%3E%0A%20%20%20%20%3Crdf%3ARDF%3E%0A%20%20%20%20%20%20%3Ccc%3AWork%0A%20%20%20%20%20%20%20%20%20rdf%3Aabout%3D%22%22%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Aformat%3Eimage%2Fsvg%2Bxml%3C%2Fdc%3Aformat%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atype%0A%20%20%20%20%20%20%20%20%20%20%20rdf%3Aresource%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Fdcmitype%2FStillImage%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atitle%3E%3C%2Fdc%3Atitle%3E%0A%20%20%20%20%20%20%3C%2Fcc%3AWork%3E%0A%20%20%20%20%3C%2Frdf%3ARDF%3E%0A%20%20%3C%2Fmetadata%3E%0A%20%20%3Cdefs%0A%20%20%20%20%20id%3D%22defs4572%22%20%2F%3E%0A%20%20%3Cpath%0A%20%20%20%20%20style%3D%22fill%3A%23ffffff%3Bfill-opacity%3A0.8627451%3Bstroke-width%3A0.79176539%22%0A%20%20%20%20%20id%3D%22path4566%22%0A%20%20%20%20%20d%3D%22m%2012.91039%2C7.1445417%20c%20-5.6690402%2C0%20-10.2660306%2C4.5961993%20-10.2660306%2C10.2652403%20a%2010.265238%2C10.265238%200%200%200%200.6706253%2C3.63816%20c%200.1504354%2C-0.393506%200.3230402%2C-0.777512%200.539984%2C-1.138557%200.1108472%2C-0.18369%200.2327789%2C-0.361837%200.313539%2C-0.559779%200.081551%2C-0.197941%200.1187648%2C-0.42201%200.057007%2C-0.627078%20A%201.0783844%2C1.0783844%200%200%200%204.0513264%2C18.402655%20C%203.9784841%2C18.305267%203.8993075%2C18.212631%203.833591%2C18.109702%20A%201.3159141%2C1.3159141%200%200%201%203.6316909%2C17.222924%201.1876481%2C1.1876481%200%200%201%204.0909148%2C16.441452%20c%200.2216944%2C-0.164688%200.5027709%2C-0.23753%200.7798889%2C-0.228028%20a%201.3911318%2C1.3911318%200%200%201%200.2739508%2C0.03801%20c%200.3578779%2C0.08709%200.6745841%2C0.311164%200.9089467%2C0.593824%200.2913696%2C0.353919%200.462391%2C0.799683%200.5043546%2C1.25574%20a%202.8297696%2C2.8297696%200%200%201%20-0.2177355%2C1.34046%20C%206.0236142%2C20.197593%205.42979%2C20.807252%205.1012074%2C21.557847%204.8335907%2C22.171464%204.7567894%2C22.854758%204.7924189%2C23.5238%20c%200.00554%2C0.06096%200.014251%2C0.122723%200.019794%2C0.185272%20a%2010.265238%2C10.265238%200%200%200%202.866191%2C2.517815%2013.958824%2C13.958824%200%200%201%20-0.1029298%2C-1.670626%20c%200.00161%2C-0.443389%200.023751%2C-0.886777%200.067304%2C-1.326206%20C%207.3735785%2C23.043191%207.1281312%2C22.826248%206.9539421%2C22.54913%206.6435705%2C22.058235%206.5849797%2C21.434324%206.712454%2C20.867421%206.8391365%2C20.299724%207.1400069%2C19.782702%207.5018439%2C19.327437%20A%206.2018984%2C6.2018984%200%200%201%209.7464993%2C17.567343%208.1591425%2C8.1591425%200%200%201%209.6752356%2C17.46758%203.8432293%2C3.8432293%200%200%201%209.1194163%2C15.744698%20c%20-0.047503%2C-0.615201%200.050669%2C-1.230403%200.091055%2C-1.844814%200.02929%2C-0.429928%200.031672%2C-0.859064%200.055423%2C-1.288201%200.030084%2C-0.496437%200.090261%2C-0.993667%200.2296124%2C-1.471101%20a%201.8685664%2C1.8685664%200%200%201%200.21061%2C-0.498812%201.1084716%2C1.1084716%200%200%201%200.4703083%2C-0.406968%20c%200.216945%2C-0.0855%200.403801%2C-0.104512%200.614411%2C-0.06888%200.174189%2C0.03642%200.3365%2C0.123516%200.478227%2C0.232779%200.142518%2C0.109264%200.26524%2C0.240698%200.380047%2C0.377673%20a%205.7783039%2C5.7783039%200%200%201%200.823436%2C1.280285%202.8266025%2C2.8266025%200%200%201%200.863024%2C0%205.7695944%2C5.7695944%200%200%201%200.823436%2C-1.279493%202.5415669%2C2.5415669%200%200%201%200.380047%2C-0.376881%20c%200.142518%2C-0.110847%200.303246%2C-0.196358%200.478227%2C-0.23357%20a%201.0039585%2C1.0039585%200%200%201%200.617577%2C0.06809%201.1100551%2C1.1100551%200%200%201%200.4711%2C0.409343%20c%200.09818%2C0.150436%200.159936%2C0.323041%200.21061%2C0.495645%200.138558%2C0.476643%200.199525%2C0.973872%200.229612%2C1.469517%200.02375%2C0.429928%200.02612%2C0.860649%200.05542%2C1.288995%200.0396%2C0.615201%200.138559%2C1.230403%200.09185%2C1.844813%20a%203.844021%2C3.844021%200%200%201%20-0.558194%2C1.724465%20c%20-0.02375%2C0.0396%20-0.05542%2C0.076%20-0.08154%2C0.114805%200.195565%2C0.220111%200.473476%2C0.406176%200.711006%2C0.486144%20a%201.5486932%2C1.5486932%200%200%200%200.831353%2C0.03484%201.3064129%2C1.3064129%200%200%200%200.42201%2C-0.17894%200.99208205%2C0.99208205%200%200%200%200.314331%2C-0.330957%20c%200.09343%2C-0.166272%200.131433%2C-0.356295%200.152019%2C-0.543944%200.05305%2C-0.482977%200%2C-0.96912%20-0.0396%2C-1.452889%20-0.02692%2C-0.313539%20-0.04909%2C-0.633412%200.02138%2C-0.939826%200.0475%2C-0.205858%200.140142%2C-0.410133%200.295328%2C-0.554235%20a%200.87569253%2C0.87569253%200%200%201%200.36817%2C-0.2019%201.0387963%2C1.0387963%200%200%201%200.419637%2C-0.02375%20c%200.30087%2C0.04514%200.582739%2C0.216942%200.750593%2C0.470308%200.09502%2C0.142517%200.153603%2C0.308788%200.18844%2C0.478226%200.03484%2C0.168646%200.0475%2C0.340459%200.05701%2C0.513064%200.03167%2C0.601741%200.03167%2C1.205067%200.01426%2C1.808392%20-0.01426%2C0.526524%20-0.04355%2C1.0673%20-0.253366%2C1.549486%20-0.271575%2C0.619159%20-0.817101%2C1.08155%20-1.405383%2C1.414092%20a%205.5835296%2C5.5835296%200%200%201%20-1.257323%2C0.512272%20c%200.38163%2C1.219319%200.580363%2C2.56532%200.580363%2C3.93349%20a%2013.935071%2C13.935071%200%200%201%20-0.106901%2C1.682498%2010.264446%2C10.264446%200%200%200%205.054631%2C-8.829768%20c%200%2C-5.669041%20-4.59699%2C-10.2652391%20-10.265238%2C-10.2652391%20z%20M%2010.037865%2C19.798537%20v%201.174188%20a%201.488519%2C1.488519%200%200%201%200.857482%2C0.286619%201.3760882%2C1.3760882%200%200%201%200.440222%2C0.538402%20c%200.0966%2C0.213775%200.131432%2C0.456056%200.09184%2C0.687252%20a%201.1821057%2C1.1821057%200%200%201%20-0.262867%2C0.560568%201.3040376%2C1.3040376%200%200%201%20-0.502772%2C0.36263%201.3760882%2C1.3760882%200%200%201%20-0.623119%2C0.0966%20v%202.953287%20l%206.145683%2C-3.33175%20-6.145683%2C-3.328583%20z%22%20%2F%3E%0A%3C%2Fsvg%3E",watermarkLink:"https://c3voc.de",levelSelectorConfig:{labelCallback:function(t){var e="unknown";return t.height?e=t.height:t.level&&t.level.height&&(e=t.level.height),e+"p"},title:"Quality"},audioTrackSelectorConfig:{title:"Language"}},n,t,{plugins:e})}))}},{key:"_containerChanged",value:function(){this.stopListening(),this._addEventListeners()}},{key:"_addEventListeners",value:function(){var t=this._player.core;this._container=t.activeContainer,this.listenTo(this._player,r.Events.PLAYER_PLAY,this._handlePlay),this.listenTo(this._player,r.Events.PLAYER_STOP,this._handleStop),this.listenTo(t,r.Events.CORE_ACTIVE_CONTAINER_CHANGED,this._containerChanged),this.listenTo(this._container,r.Events.CONTAINER_STATE_BUFFERFULL,this._handleBufferFull),this.listenTo(this._container,r.Events.CONTAINER_MEDIACONTROL_HIDE,this._handleMediaControlHide),this.listenTo(this._container,r.Events.CONTAINER_MEDIACONTROL_SHOW,this._handleMediaControlShow)}},{key:"_handleMediaControlHide",value:function(){this._container.$el.find(".clappr-watermark[data-watermark]").addClass("clappr-watermark-hide")}},{key:"_handleMediaControlShow",value:function(){this._container.$el.find(".clappr-watermark[data-watermark]").removeClass("clappr-watermark-hide")}},{key:"_getTimeout",value:function(){var t=.6*this.timeout+.4*this.timeout*Math.random();return this.timeout=Math.min(2*this.timeout,this.maxTimeout),t}},{key:"_resetTimeout",value:function(){this.timeout=5}},{key:"_handleError",value:function(t,e){this._recovery?clearTimeout(this._recovery.timeout):this._player.stop();var n=this._getTimeout();return console.log("got error",t,"retrying in ".concat(Math.round(n),"s")),this._recovery={clearOverlay:e,state:"restarting",timeout:setTimeout(this._waitForMedia.bind(this),1e3*n)},P(t,1001)||O(t,404)?{title:"Stream is offline",subtitle:"We will be right back"}:P(t,1002)||O(0)?{title:"A network error ocurred",subtitle:"Please check your internet connection"}:{title:"Oh no, an unknown error occured",subtitle:"Please try reloading the page"}}},{key:"_handlePlay",value:function(){this._recovery&&(console.log("soft recovery: play"),this._recovery.clearOverlay(),clearTimeout(this._recovery.timeout),this._recovery=null),this._resetTimeout()}},{key:"_handleStop",value:function(t){this._recovery&&this._container&&(console.log("soft recovery: stop"),this._container.playback.play.call(this._container.playback))}},{key:"_handleBufferFull",value:function(){if(this._recovery&&"live"==this._container.playback.getPlaybackType()){console.log("seeking to end for recovery");var t=Math.max(this._player.getDuration()-6,0);this._player.seek(t)}}},{key:"_handleMediaCheck",value:function(t){if(t)console.log("try playing again, media should be available"),this._player.play();else{var e=this._getTimeout();console.log("test for media failed, retrying in ~".concat(Math.round(e),"s")),setTimeout(this._waitForMedia.bind(this),1e3*e)}}},{key:"_waitForMedia",value:function(){var t=this._player.options.source;t&&t.source&&(t=t.source),"string"==typeof t?function(t,e){if(!e||"function"!=typeof e)throw new Error("Excepted function, got '".concat(e,"'"));var n=new XMLHttpRequest;n.onreadystatechange=function(){this.readyState===XMLHttpRequest.HEADERS_RECEIVED&&(200===this.status?e(!0):e(!1),n.abort())},n.open("GET",t,!0),n.send(null)}(t,this._handleMediaCheck.bind(this)):this.reset()}},{key:"reset",value:function(){console.log("performing hard reset"),this._recovery=null;var t=0==this._player.getVolume();t||this._player.mute(),this._player.configure({source:this._player.options.source,autoPlay:!0}),t||this._player.unmute()}}])&&k(e.prototype,n),i&&k(e,i),s}(r.BaseObject)}])}));
|
||
//# sourceMappingURL=player.js.map
|