!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("global/window"),require("global/document")):"function"==typeof define&&define.amd?define(["global/window","global/document"],t):(e=e||self).videojs=t(e.window,e.document)}(this,function(e,t){e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var n="7.6.3",i=[],r=function(t,n){return function(r,a,s){var o=n.levels[a],u=new RegExp("^("+o+")$");if("log"!==r&&s.unshift(r.toUpperCase()+":"),s.unshift(t+":"),i&&i.push([].concat(s)),e.console){var l=e.console[r];l||"debug"!==r||(l=e.console.info||e.console.log),l&&o&&u.test(r)&&l[Array.isArray(s)?"apply":"call"](e.console,s)}}};var a=function e(t){var n,a="info",s=function(){for(var e=arguments.length,t=new Array(e),i=0;i1?t-1:0),i=1;i0)for(var i=e.attributes,r=i.length-1;r>=0;r--){var a=i[r].name,s=i[r].value;"boolean"!=typeof e[a]&&-1===n.indexOf(","+a+",")||(s=null!==s),t[a]=s}return t}function R(e,t){return e.getAttribute(t)}function L(e,t,n){e.setAttribute(t,n)}function O(e,t){e.removeAttribute(t)}function I(){t.body.focus(),t.onselectstart=function(){return!1}}function x(){t.onselectstart=function(){return!0}}function D(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach(function(e){void 0!==t[e]&&(n[e]=t[e])}),n.height||(n.height=parseFloat(f(e,"height"))),n.width||(n.width=parseFloat(f(e,"width"))),n}}function M(n){var i;if(n.getBoundingClientRect&&n.parentNode&&(i=n.getBoundingClientRect()),!i)return{left:0,top:0};var r=t.documentElement,a=t.body,s=r.clientLeft||a.clientLeft||0,o=e.pageXOffset||a.scrollLeft,u=i.left+o-s,l=r.clientTop||a.clientTop||0,c=e.pageYOffset||a.scrollTop,d=i.top+c-l;return{left:Math.round(u),top:Math.round(d)}}function U(e,t){var n={},i=M(e),r=e.offsetWidth,a=e.offsetHeight,s=i.top,o=i.left,u=t.pageY,l=t.pageX;return t.changedTouches&&(l=t.changedTouches[0].pageX,u=t.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(s-u+a)/a)),n.x=Math.max(0,Math.min(1,(l-o)/r)),n}function j(e){return d(e)&&3===e.nodeType}function B(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function N(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(function(e){return"function"==typeof e&&(e=e()),v(e)||j(e)?e:"string"==typeof e&&/\S/.test(e)?t.createTextNode(e):void 0}).filter(function(e){return e})}function F(e,t){return N(t).forEach(function(t){return e.appendChild(t)}),e}function V(e,t){return F(B(e),t)}function G(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||("mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons))}var H=_("querySelector"),z=_("querySelectorAll"),q=Object.freeze({isReal:g,isEl:v,isInFrame:y,createEl:b,textContent:T,prependTo:S,hasClass:k,addClass:E,removeClass:C,toggleClass:w,setAttributes:P,getAttributes:A,getAttribute:R,setAttribute:L,removeAttribute:O,blockTextSelection:I,unblockTextSelection:x,getBoundingClientRect:D,findPosition:M,getPointerPosition:U,isTextNode:j,emptyEl:B,normalizeContent:N,appendContent:F,insertContent:V,isSingleLeftClick:G,$:H,$$:z}),W=new WeakMap,K=1;function $(){return K++}function X(e,t){if(W.has(e)){var n=W.get(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&W.delete(e)}}function Y(e,t,n,i){n.forEach(function(n){e(t,n,i)})}function J(n){function i(){return!0}function r(){return!1}if(!n||!n.isPropagationStopped){var a=n||e.event;for(var s in n={},a)"layerX"!==s&&"layerY"!==s&&"keyLocation"!==s&&"webkitMovementX"!==s&&"webkitMovementY"!==s&&("returnValue"===s&&a.preventDefault||(n[s]=a[s]));if(n.target||(n.target=n.srcElement||t),n.relatedTarget||(n.relatedTarget=n.fromElement===n.target?n.toElement:n.fromElement),n.preventDefault=function(){a.preventDefault&&a.preventDefault(),n.returnValue=!1,a.returnValue=!1,n.defaultPrevented=!0},n.defaultPrevented=!1,n.stopPropagation=function(){a.stopPropagation&&a.stopPropagation(),n.cancelBubble=!0,a.cancelBubble=!0,n.isPropagationStopped=i},n.isPropagationStopped=r,n.stopImmediatePropagation=function(){a.stopImmediatePropagation&&a.stopImmediatePropagation(),n.isImmediatePropagationStopped=i,n.stopPropagation()},n.isImmediatePropagationStopped=r,null!==n.clientX&&void 0!==n.clientX){var o=t.documentElement,u=t.body;n.pageX=n.clientX+(o&&o.scrollLeft||u&&u.scrollLeft||0)-(o&&o.clientLeft||u&&u.clientLeft||0),n.pageY=n.clientY+(o&&o.scrollTop||u&&u.scrollTop||0)-(o&&o.clientTop||u&&u.clientTop||0)}n.which=n.charCode||n.keyCode,null!==n.button&&void 0!==n.button&&(n.button=1&n.button?0:4&n.button?1:2&n.button?2:0)}return n}var Q=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){Q=!0}});e.addEventListener("test",null,t),e.removeEventListener("test",null,t)}catch(e){}}();var Z=["touchstart","touchmove"];function ee(e,t,n){if(Array.isArray(t))return Y(ee,e,t,n);W.has(e)||W.set(e,{});var i=W.get(e);if(i.handlers||(i.handlers={}),i.handlers[t]||(i.handlers[t]=[]),n.guid||(n.guid=$()),i.handlers[t].push(n),i.dispatcher||(i.disabled=!1,i.dispatcher=function(t,n){if(!i.disabled){t=J(t);var r=i.handlers[t.type];if(r)for(var s=r.slice(0),o=0,u=s.length;o-1&&(r={passive:!0}),e.addEventListener(t,i.dispatcher,r)}else e.attachEvent&&e.attachEvent("on"+t,i.dispatcher)}function te(e,t,n){if(W.has(e)){var i=W.get(e);if(i.handlers){if(Array.isArray(t))return Y(te,e,t,n);var r=function(e,t){i.handlers[t]=[],X(e,t)};if(void 0!==t){var a=i.handlers[t];if(a)if(n){if(n.guid)for(var s=0;s0)for(var a=0,s=r.length;a=n&&(t.apply(void 0,arguments),i=r)}},ge=function(t,n,i,r){var a;void 0===r&&(r=e);var s=function(){var e=this,s=arguments,o=function(){a=null,o=null,i||t.apply(e,s)};!a&&i&&t.apply(e,s),r.clearTimeout(a),a=r.setTimeout(o,n)};return s.cancel=function(){r.clearTimeout(a),a=null},s},ve=function(){};ve.prototype.allowedEvents_={},ve.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},ee(this,e,t),this.addEventListener=n},ve.prototype.addEventListener=ve.prototype.on,ve.prototype.off=function(e,t){te(this,e,t)},ve.prototype.removeEventListener=ve.prototype.off,ve.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},ie(this,e,t),this.addEventListener=n},ve.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},re(this,e,t),this.addEventListener=n},ve.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=J(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),ne(this,e)},ve.prototype.dispatchEvent=ve.prototype.trigger,ve.prototype.queueTrigger=function(t){var n=this;ce||(ce=new Map);var i=t.type||t,r=ce.get(this);r||(r=new Map,ce.set(this,r));var a=r.get(i);r.delete(i),e.clearTimeout(a);var s=e.setTimeout(function(){0===r.size&&(r=null,ce.delete(n)),n.trigger(t)},0);r.set(i,s)};var ye=function(e){return e instanceof ve||!!e.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"==typeof e[t]})},_e=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},be=function(e){if(!e.nodeName&&!ye(e))throw new Error("Invalid target; must be a DOM node or evented object.")},Te=function(e){if(!_e(e))throw new Error("Invalid event type; must be a non-empty string or array.")},Se=function(e){if("function"!=typeof e)throw new Error("Invalid listener; must be a function.")},ke=function(e,t){var n,i,r,a=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return a?(n=e.eventBusEl_,t.length>=3&&t.shift(),i=t[0],r=t[1]):(n=t[0],i=t[1],r=t[2]),be(n),Te(i),Se(r),{isTargetingSelf:a,target:n,type:i,listener:r=pe(e,r)}},Ee=function(e,t,n,i){be(e),e.nodeName?se[t](e,n,i):e[t](n,i)},Ce={on:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),W.has(this.el_)&&W.delete(this.el_),this.el_=null),this.player_=null},n.player=function(){return this.player_},n.options=function(e){return e?(this.options_=Oe(this.options_,e),this.options_):this.options_},n.el=function(){return this.el_},n.createEl=function(e,t,n){return b(e,t,n)},n.localize=function(e,t,n){void 0===n&&(n=e);var i=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),a=r&&r[i],s=i&&i.split("-")[0],o=r&&r[s],u=n;return a&&a[e]?u=a[e]:o&&o[e]&&(u=o[e]),t&&(u=u.replace(/\{(\d+)\}/g,function(e,n){var i=t[n-1],r=i;return void 0===i&&(r=e),r})),u},n.contentEl=function(){return this.contentEl_||this.el_},n.id=function(){return this.id_},n.name=function(){return this.name_},n.children=function(){return this.children_},n.getChildById=function(e){return this.childIndex_[e]},n.getChild=function(e){if(e)return this.childNameIndex_[e]},n.addChild=function(e,n,i){var r,a;if(void 0===n&&(n={}),void 0===i&&(i=this.children_.length),"string"==typeof e){a=Le(e);var s=n.componentClass||a;n.name=a;var o=t.getComponent(s);if(!o)throw new Error("Component "+s+" does not exist");if("function"!=typeof o)return null;r=new o(this.player_||this,n)}else r=e;if(r.parentComponent_&&r.parentComponent_.removeChild(r),this.children_.splice(i,0,r),r.parentComponent_=this,"function"==typeof r.id&&(this.childIndex_[r.id()]=r),(a=a||r.name&&Le(r.name()))&&(this.childNameIndex_[a]=r,this.childNameIndex_[Re(a)]=r),"function"==typeof r.el&&r.el()){var u=this.contentEl().children[i]||null;this.contentEl().insertBefore(r.el(),u)}return r},n.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Le(e.name())]=null,this.childNameIndex_[Re(e.name())]=null;var i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},n.initChildren=function(){var e=this,n=this.options_.children;if(n){var i,r=this.options_,a=t.getComponent("Tech");(i=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter(function(e){return!i.some(function(t){return"string"==typeof t?e===t:e===t.name})})).map(function(t){var i,r;return"string"==typeof t?r=n[i=t]||e.options_[i]||{}:(i=t.name,r=t),{name:i,opts:r}}).filter(function(e){var n=t.getComponent(e.opts.componentClass||Le(e.name));return n&&!a.isTech(n)}).forEach(function(t){var n=t.name,i=t.opts;if(void 0!==r[n]&&(i=r[n]),!1!==i){!0===i&&(i={}),i.playerOptions=e.options_.playerOptions;var a=e.addChild(n,i);a&&(e[n]=a)}})}},n.buildCSSClass=function(){return""},n.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},n.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)},n.$=function(e,t){return H(e,t||this.contentEl())},n.$$=function(e,t){return z(e,t||this.contentEl())},n.hasClass=function(e){return k(this.el_,e)},n.addClass=function(e){E(this.el_,e)},n.removeClass=function(e){C(this.el_,e)},n.toggleClass=function(e,t){w(this.el_,e,t)},n.show=function(){this.removeClass("vjs-hidden")},n.hide=function(){this.addClass("vjs-hidden")},n.lockShowing=function(){this.addClass("vjs-lock-showing")},n.unlockShowing=function(){this.removeClass("vjs-lock-showing")},n.getAttribute=function(e){return R(this.el_,e)},n.setAttribute=function(e,t){L(this.el_,e,t)},n.removeAttribute=function(e){O(this.el_,e)},n.width=function(e,t){return this.dimension("width",e,t)},n.height=function(e,t){return this.dimension("height",e,t)},n.dimensions=function(e,t){this.width(e,!0),this.height(t)},n.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var i=this.el_.style[e],r=i.indexOf("px");return-1!==r?parseInt(i.slice(0,r),10):parseInt(this.el_["offset"+Le(e)],10)},n.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=f(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+Le(e);t=this.el_[n]}return t},n.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},n.currentWidth=function(){return this.currentDimension("width")},n.currentHeight=function(){return this.currentDimension("height")},n.focus=function(){this.el_.focus()},n.blur=function(){this.el_.blur()},n.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},n.handleKeyPress=function(e){this.handleKeyDown(e)},n.emitTapEvents=function(){var t,n=0,i=null;this.on("touchstart",function(r){1===r.touches.length&&(i={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},n=e.performance.now(),t=!0)}),this.on("touchmove",function(e){if(e.touches.length>1)t=!1;else if(i){var n=e.touches[0].pageX-i.pageX,r=e.touches[0].pageY-i.pageY;Math.sqrt(n*n+r*r)>10&&(t=!1)}});var r=function(){t=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",function(r){(i=null,!0===t)&&(e.performance.now()-n<200&&(r.preventDefault(),this.trigger("tap")))})},n.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=pe(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){t(),this.clearInterval(e),e=this.setInterval(t,250)});var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},n.setTimeout=function(t,n){var i,r=this;return t=pe(this,t),this.clearTimersOnDispose_(),i=e.setTimeout(function(){r.setTimeoutIds_.has(i)&&r.setTimeoutIds_.delete(i),t()},n),this.setTimeoutIds_.add(i),i},n.clearTimeout=function(t){return this.setTimeoutIds_.has(t)&&(this.setTimeoutIds_.delete(t),e.clearTimeout(t)),t},n.setInterval=function(t,n){t=pe(this,t),this.clearTimersOnDispose_();var i=e.setInterval(t,n);return this.setIntervalIds_.add(i),i},n.clearInterval=function(t){return this.setIntervalIds_.has(t)&&(this.setIntervalIds_.delete(t),e.clearInterval(t)),t},n.requestAnimationFrame=function(t){var n,i=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),t=pe(this,t),n=e.requestAnimationFrame(function(){i.rafIds_.has(n)&&i.rafIds_.delete(n),t()}),this.rafIds_.add(n),n):this.setTimeout(t,1e3/60)},n.cancelAnimationFrame=function(t){return this.supportsRaf_?(this.rafIds_.has(t)&&(this.rafIds_.delete(t),e.cancelAnimationFrame(t)),t):this.clearTimeout(t)},n.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(function(t){var n=t[0],i=t[1];e[n].forEach(e[i],e)}),e.clearingTimersOnDispose_=!1}))},t.registerComponent=function(e,n){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var i,r=t.getComponent("Tech"),a=r&&r.isTech(n),s=t===n||t.prototype.isPrototypeOf(n.prototype);if(a||!s)throw i=a?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+i+".");e=Le(e),t.components_||(t.components_={});var o=t.getComponent("Player");if("Player"===e&&o&&o.players){var u=o.players,l=Object.keys(u);if(u&&l.length>0&&l.map(function(e){return u[e]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=n,t.components_[Re(e)]=n,n},t.getComponent=function(e){if(e&&t.components_)return t.components_[e]},t}();function xe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function De(e,t){return(De=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Me(e,t,n){return(Me=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(e){return!1}}()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&De(r,n.prototype),r}).apply(null,arguments)}function Ue(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Ie.prototype.supportsRaf_="function"==typeof e.requestAnimationFrame&&"function"==typeof e.cancelAnimationFrame,Ie.registerComponent("Component",Ie);var je,Be=e.navigator&&e.navigator.userAgent||"",Ne=/AppleWebKit\/([\d.]+)/i.exec(Be),Fe=Ne?parseFloat(Ne.pop()):null,Ve=/iPad/i.test(Be),Ge=/iPhone/i.test(Be)&&!Ve,He=/iPod/i.test(Be),ze=Ge||Ve||He,qe=(je=Be.match(/OS (\d+)_/i))&&je[1]?je[1]:null,We=/Android/i.test(Be),Ke=function(){var e=Be.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),$e=We&&Ke<5&&Fe<537,Xe=/Firefox/i.test(Be),Ye=/Edge/i.test(Be),Je=!Ye&&(/Chrome/i.test(Be)||/CriOS/i.test(Be)),Qe=function(){var e=Be.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),Ze=function(){var e=/MSIE\s(\d+)\.\d/.exec(Be),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(Be)&&/rv:11.0/.test(Be)&&(t=11),t}(),et=/Safari/i.test(Be)&&!Je&&!We&&!Ye,tt=(et||ze)&&!Je,nt=/Windows/i.test(Be),it=g()&&("ontouchstart"in e||e.navigator.maxTouchPoints||e.DocumentTouch&&e.document instanceof e.DocumentTouch),rt=Object.freeze({IS_IPAD:Ve,IS_IPHONE:Ge,IS_IPOD:He,IS_IOS:ze,IOS_VERSION:qe,IS_ANDROID:We,ANDROID_VERSION:Ke,IS_NATIVE_ANDROID:$e,IS_FIREFOX:Xe,IS_EDGE:Ye,IS_CHROME:Je,CHROME_VERSION:Qe,IE_VERSION:Ze,IS_SAFARI:et,IS_ANY_SAFARI:tt,IS_WINDOWS:nt,TOUCH_ENABLED:it});function at(e,t,n,i){return function(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,i,n.length-1),n[i][t]}function st(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:at.bind(null,"start",0,e),end:at.bind(null,"end",1,e)}}function ot(e,t){return Array.isArray(e)?st(e):void 0===e||void 0===t?st():st([[e,t]])}function ut(e,t){var n,i,r=0;if(!t)return 0;e&&e.length||(e=ot(0,0));for(var a=0;at&&(i=t),r+=i-n;return r/t}for(var lt,ct={prefixed:!0},dt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],ht=dt[0],ft=0;ft=0;i--)if(t[i].enabled){Rt(t,t[i]);break}return(n=e.call(this,t)||this).changing_=!1,n}xe(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&Rt(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,Rt(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(Pt),Ot=function(e,t){for(var n=0;n=0;i--)if(t[i].selected){Ot(t,t[i]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty(Ue(n),"selectedIndex",{get:function(){for(var e=0;e',r=a.firstChild,a.setAttribute("style","display:none; position:absolute;"),t.body.appendChild(a));for(var o={},u=0;ux',e=n.firstChild.href}return e},Ht=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},zt=function(t){var n=e.location,i=Vt(t);return(":"===i.protocol?n.protocol:i.protocol)+i.host!==n.protocol+n.host},qt=Object.freeze({parseUrl:Vt,getAbsoluteURL:Gt,getFileExtension:Ht,isCrossOrigin:zt}),Wt=function(e){var t=Kt.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},Kt=Object.prototype.toString;var $t,Xt=Array.prototype.slice,Yt=Object.prototype.toString,Jt=Function.prototype.bind||function(e){var t=this;if("function"!=typeof t||"[object Function]"!==Yt.call(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var n,i=Xt.call(arguments,1),r=Math.max(0,t.length-i.length),a=[],s=0;s=0&&"[object Function]"===Qt.call(e.callee)),n};if(!Object.keys){var en=Object.prototype.hasOwnProperty,tn=Object.prototype.toString,nn=Zt,rn=Object.prototype.propertyIsEnumerable,an=!rn.call({toString:null},"toString"),sn=rn.call(function(){},"prototype"),on=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],un=function(e){var t=e.constructor;return t&&t.prototype===e},ln={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},cn=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!ln["$"+e]&&en.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{un(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();$t=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===tn.call(e),i=nn(e),r=t&&"[object String]"===tn.call(e),a=[];if(!t&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var s=sn&&n;if(r&&e.length>0&&!en.call(e,0))for(var o=0;o0)for(var u=0;u2?arguments[2]:{},i=gn(t);vn&&(i=_n.call(i,Object.getOwnPropertySymbols(t)));for(var r=0;r1&&"boolean"!=typeof t)throw new TypeError('"allowMissing" argument must be a boolean');var n="$ "+e;if(!(n in Rn))throw new SyntaxError("intrinsic "+e+" does not exist!");if(void 0===Rn[n]&&!t)throw new TypeError("intrinsic "+e+" exists, but is not available. Please file an issue!");return Rn[n]},On=Jt.call(Function.call,Object.prototype.hasOwnProperty),In=Ln("%TypeError%"),xn=Ln("%SyntaxError%"),Dn={"Property Descriptor":function(e,t){if("Object"!==e.Type(t))return!1;var n={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var i in t)if(On(t,i)&&!n[i])return!1;var r=On(t,"[[Value]]"),a=On(t,"[[Get]]")||On(t,"[[Set]]");if(r&&a)throw new In("Property Descriptors may not be both accessor and data descriptors");return!0}},Mn=function(e,t,n,i){var r=Dn[t];if("function"!=typeof r)throw new xn("unknown record type: "+t);if(!r(e,i))throw new In(n+" must be a "+t);console.log(r(e,i),i)},Un=Number.isNaN||function(e){return e!=e},jn=Number.isNaN||function(e){return e!=e},Bn=Number.isFinite||function(e){return"number"==typeof e&&!jn(e)&&e!==1/0&&e!==-1/0},Nn=function(e){return e>=0?1:-1},Fn=Function.prototype.toString,Vn=/^\s*class\b/,Gn=function(e){try{var t=Fn.call(e);return Vn.test(t)}catch(e){return!1}},Hn=Object.prototype.toString,zn="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,qn=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(zn)return function(e){try{return!Gn(e)&&(Fn.call(e),!0)}catch(e){return!1}}(e);if(Gn(e))return!1;var t=Hn.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t},Wn=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e},Kn=Object.prototype.toString,$n=function(e){var t;if((t=arguments.length>1?arguments[1]:"[object Date]"===Kn.call(e)?String:Number)===String||t===Number){var n,i,r=t===String?["toString","valueOf"]:["valueOf","toString"];for(i=0;i1?$n(e,arguments[1]):$n(e)},ToBoolean:function(e){return!!e},ToNumber:function(e){return+e},ToInteger:function(e){var t=this.ToNumber(e);return Un(t)?0:0!==t&&Bn(t)?Nn(t)*Math.floor(Math.abs(t)):t},ToInt32:function(e){return this.ToNumber(e)>>0},ToUint32:function(e){return this.ToNumber(e)>>>0},ToUint16:function(e){var t=this.ToNumber(e);return Un(t)||0===t||!Bn(t)?0:function(e,t){var n=e%t;return Math.floor(n>=0?n:n+t)}(Nn(t)*Math.floor(Math.abs(t)),65536)},ToString:function(e){return Jn(e)},ToObject:function(e){return this.CheckObjectCoercible(e),Xn(e)},CheckObjectCoercible:function(e,t){if(null==e)throw new Yn(t||"Cannot call method on "+e);return e},IsCallable:qn,SameValue:function(e,t){return e===t?0!==e||1/e==1/t:Un(e)&&Un(t)},Type:function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0},IsPropertyDescriptor:function(e){if("Object"!==this.Type(e))return!1;var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(On(e,n)&&!t[n])return!1;var i=On(e,"[[Value]]"),r=On(e,"[[Get]]")||On(e,"[[Set]]");if(i&&r)throw new Yn("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(e){return void 0!==e&&(Mn(this,"Property Descriptor","Desc",e),!(!On(e,"[[Get]]")&&!On(e,"[[Set]]")))},IsDataDescriptor:function(e){return void 0!==e&&(Mn(this,"Property Descriptor","Desc",e),!(!On(e,"[[Value]]")&&!On(e,"[[Writable]]")))},IsGenericDescriptor:function(e){return void 0!==e&&(Mn(this,"Property Descriptor","Desc",e),!this.IsAccessorDescriptor(e)&&!this.IsDataDescriptor(e))},FromPropertyDescriptor:function(e){if(void 0===e)return e;if(Mn(this,"Property Descriptor","Desc",e),this.IsDataDescriptor(e))return{value:e["[[Value]]"],writable:!!e["[[Writable]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};if(this.IsAccessorDescriptor(e))return{get:e["[[Get]]"],set:e["[[Set]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};throw new Yn("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(e){if("Object"!==this.Type(e))throw new Yn("ToPropertyDescriptor requires an object");var t={};if(On(e,"enumerable")&&(t["[[Enumerable]]"]=this.ToBoolean(e.enumerable)),On(e,"configurable")&&(t["[[Configurable]]"]=this.ToBoolean(e.configurable)),On(e,"value")&&(t["[[Value]]"]=e.value),On(e,"writable")&&(t["[[Writable]]"]=this.ToBoolean(e.writable)),On(e,"get")){var n=e.get;if(void 0!==n&&!this.IsCallable(n))throw new TypeError("getter must be a function");t["[[Get]]"]=n}if(On(e,"set")){var i=e.set;if(void 0!==i&&!this.IsCallable(i))throw new Yn("setter must be a function");t["[[Set]]"]=i}if((On(t,"[[Get]]")||On(t,"[[Set]]"))&&(On(t,"[[Value]]")||On(t,"[[Writable]]")))throw new Yn("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},Zn=Jt.call(Function.call,String.prototype.replace),ei=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,ti=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,ni=function(){var e=Qn.ToString(Qn.CheckObjectCoercible(this));return Zn(Zn(e,ei,""),ti,"")},ii=function(){return String.prototype.trim&&"​"==="​".trim()?String.prototype.trim:ni},ri=Jt.call(Function.call,ii());En(ri,{getPolyfill:ii,implementation:ni,shim:function(){var e=ii();return En(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var ai=ri,si=Object.prototype.toString,oi=Object.prototype.hasOwnProperty,ui=function(e,t,n){if(!qn(t))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),"[object Array]"===si.call(e)?function(e,t,n){for(var i=0,r=e.length;i0&&(u=setTimeout(function(){if(!s){s=!0,o.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}},e.timeout)),o.setRequestHeader)for(a in h)h.hasOwnProperty(a)&&o.setRequestHeader(a,h[a]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(o.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(o),o.send(d||null),o}pi.XMLHttpRequest=e.XMLHttpRequest||function(){},pi.XDomainRequest="withCredentials"in new pi.XMLHttpRequest?pi.XMLHttpRequest:e.XDomainRequest,function(e,t){for(var n=0;n0&&(e.console&&e.console.groupCollapsed&&e.console.groupCollapsed("Text Track parsing errors for "+n.src),r.forEach(function(e){return a.error(e)}),e.console&&e.console.groupEnd&&e.console.groupEnd()),i.flush()},vi=function(t,n){var i={uri:t},r=zt(t);r&&(i.cors=r),hi(i,pe(this,function(t,i,r){if(t)return a.error(t,i);n.loaded_=!0,"function"!=typeof e.WebVTT?n.tech_&&n.tech_.any(["vttjsloaded","vttjserror"],function(e){if("vttjserror"!==e.type)return gi(r,n);a.error("vttjs failed to load, stopping trying to process "+n.src)}):gi(r,n)}))},yi=function(t){function n(e){var n;if(void 0===e&&(e={}),!e.tech)throw new Error("A tech was not provided.");var i=Oe(e,{kind:Bt[e.kind]||"subtitles",language:e.language||e.srclang||""}),r=Nt[i.mode]||"disabled",a=i.default;"metadata"!==i.kind&&"chapters"!==i.kind||(r="hidden"),(n=t.call(this,i)||this).tech_=i.tech,n.cues_=[],n.activeCues_=[];var s=new Mt(n.cues_),o=new Mt(n.activeCues_),u=!1,l=pe(Ue(n),function(){this.activeCues=this.activeCues,u&&(this.trigger("cuechange"),u=!1)});return"disabled"!==r&&n.tech_.ready(function(){n.tech_.on("timeupdate",l)},!0),Object.defineProperties(Ue(n),{default:{get:function(){return a},set:function(){}},mode:{get:function(){return r},set:function(e){var t=this;Nt[e]&&("disabled"!==(r=e)?this.tech_.ready(function(){t.tech_.on("timeupdate",l)},!0):this.tech_.off("timeupdate",l),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?s:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return o;for(var e=this.tech_.currentTime(),t=[],n=0,i=this.cues.length;n=e?t.push(r):r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e&&t.push(r)}if(u=!1,t.length!==this.activeCues_.length)u=!0;else for(var a=0;a59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function Li(){this.values=Pi(null)}function Oi(e,t,n,i){var r=i?e.split(i):[e];for(var a in r)if("string"==typeof r[a]){var s=r[a].split(n);if(2===s.length)t(s[0],s[1])}}function Ii(e,t,n){var i=e;function r(){var t=Ri(e);if(null===t)throw new Ai(Ai.Errors.BadTimeStamp,"Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=r(),a(),"--\x3e"!==e.substr(0,3))throw new Ai(Ai.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.substr(3),a(),t.endTime=r(),a(),function(e,t){var i=new Li;Oi(e,function(e,t){switch(e){case"region":for(var r=n.length-1;r>=0;r--)if(n[r].id===t){i.set(e,n[r].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),s=a[0];i.integer(e,s),i.percent(e,s)&&i.set("snapToLines",!1),i.alt(e,s,["auto"]),2===a.length&&i.alt("lineAlign",a[1],["start","middle","end"]);break;case"position":a=t.split(","),i.percent(e,a[0]),2===a.length&&i.alt("positionAlign",a[1],["start","middle","end"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start","middle","end","left","right"])}},/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical",""),t.line=i.get("line","auto"),t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100),t.align=i.get("align","middle"),t.position=i.get("position",{start:0,left:0,middle:50,end:100,right:100},t.align),t.positionAlign=i.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}(e,t)}Ai.prototype=Pi(Error.prototype),Ai.prototype.constructor=Ai,Ai.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},Li.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var i=0;i=0&&t<=100)&&(this.set(e,t),!0)}};var xi={"&":"&","<":"<",">":">","‎":"‎","‏":"‏"," ":" "},Di={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Mi={v:"title",lang:"lang"},Ui={rt:"ruby"};function ji(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function i(e){return xi[e]}function r(e){for(;f=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(f[0],i);return e}function a(e,t){return!Ui[t.localName]||Ui[t.localName]===e.localName}function s(t,n){var i=Di[t];if(!i)return null;var r=e.document.createElement(i);r.localName=i;var a=Mi[t];return a&&n&&(r[a]=n.trim()),r}for(var o,u=e.document.createElement("div"),l=u,c=[];null!==(o=n());)if("<"!==o[0])l.appendChild(e.document.createTextNode(r(o)));else{if("/"===o[1]){c.length&&c[c.length-1]===o.substr(2).replace(">","")&&(c.pop(),l=l.parentNode);continue}var d,h=Ri(o.substr(1,o.length-2));if(h){d=e.document.createProcessingInstruction("timestamp",h),l.appendChild(d);continue}var f=o.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!f)continue;if(!(d=s(f[1],f[3])))continue;if(!a(l,d))continue;f[2]&&(d.className=f[2].substr(1).replace("."," ")),c.push(f[1]),l.appendChild(d),l=d}return u}var Bi=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function Ni(e){for(var t=0;t=n[0]&&e<=n[1])return!0}return!1}function Fi(){}function Vi(e,t,n){Fi.call(this),this.cue=t,this.cueDiv=ji(e,t.text);var i={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(i,this.cueDiv),this.div=e.document.createElement("div"),i={direction:function(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function i(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function r(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):n}return"ruby"===t.tagName?r(e):t.childNodes?(i(e,t),r(e)):void 0}for(i(t,e);n=r(t);)for(var a=0;a=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,i=0,r=0;rd&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),s<0&&(c+=""===a.vertical?n.height:n.width,o=o.reverse()),r.move(h,c)}else{var f=r.lineHeight/n.height*100;switch(a.lineAlign){case"middle":s-=f/2;break;case"end":s-=f}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(s,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(s,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(s,"%")})}o=["+y","-x","+x","-y"],r=new Gi(t)}var p=function(e,t){for(var r,a=new Gi(e),s=1,o=0;ou&&(r=new Gi(e),s=u),e=new Gi(a)}return r||a}(r,o);t.move(p.toCSSCompatValues(n))}function zi(){}Fi.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},Fi.prototype.formatStyle=function(e,t){return 0===e?0:e+t},Vi.prototype=Pi(Fi.prototype),Vi.prototype.constructor=Vi,Gi.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},Gi.prototype.overlaps=function(e){return this.lefte.left&&this.tope.top},Gi.prototype.overlapsAny=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Gi.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},Gi.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Gi.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Gi.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,i=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||i,height:e.height||t,bottom:e.bottom||i+(e.height||t),width:e.width||n}},zi.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},zi.convertCueToDOMTree=function(e,t){return e&&t?ji(e,t):null};zi.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var i=e.document.createElement("div");if(i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.margin="1.5%",n.appendChild(i),function(e){for(var t=0;t100)throw new Error("Position must be between 0 and 100.");f=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return p},set:function(e){var t=Xi(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");p=t,this.hasBeenReset=!0}},size:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");m=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return g},set:function(e){var t=Xi(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");g=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Yi.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ji=Yi,Qi={"":!0,up:!0};function Zi(e){return"number"==typeof e&&e>=0&&e<=100}var er=function(){var e=100,t=3,n=0,i=100,r=0,a=100,s="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Zi(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return i},set:function(e){if(!Zi(e))throw new Error("RegionAnchorX must be between 0 and 100.");i=e}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Zi(e))throw new Error("RegionAnchorY must be between 0 and 100.");n=e}},viewportAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!Zi(e))throw new Error("ViewportAnchorY must be between 0 and 100.");a=e}},viewportAnchorX:{enumerable:!0,get:function(){return r},set:function(e){if(!Zi(e))throw new Error("ViewportAnchorX must be between 0 and 100.");r=e}},scroll:{enumerable:!0,get:function(){return s},set:function(e){var t=function(e){return"string"==typeof e&&!!Qi[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");s=t}}})},tr=kt(function(t){var n=t.exports={WebVTT:qi,VTTCue:Ji,VTTRegion:er};e.vttjs=n,e.WebVTT=n.WebVTT;var i=n.VTTCue,r=n.VTTRegion,a=e.VTTCue,s=e.VTTRegion;n.shim=function(){e.VTTCue=i,e.VTTRegion=r},n.restore=function(){e.VTTCue=a,e.VTTRegion=s},e.VTTCue||n.shim()});tr.WebVTT,tr.VTTCue,tr.VTTRegion;var nr=function(n){function i(e,t){var i;return void 0===e&&(e={}),void 0===t&&(t=function(){}),e.reportTouchActivity=!1,(i=n.call(this,null,e,t)||this).hasStarted_=!1,i.on("playing",function(){this.hasStarted_=!0}),i.on("loadstart",function(){this.hasStarted_=!1}),wi.names.forEach(function(t){var n=wi[t];e&&e[n.getterName]&&(i[n.privateName]=e[n.getterName])}),i.featuresProgressEvents||i.manualProgressOn(),i.featuresTimeupdateEvents||i.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){!1===e["native"+t+"Tracks"]&&(i["featuresNative"+t+"Tracks"]=!1)}),!1===e.nativeCaptions||!1===e.nativeTextTracks?i.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(i.featuresNativeTextTracks=!0),i.featuresNativeTextTracks||i.emulateTextTracks(),i.autoRemoteTextTracks_=new wi.text.ListClass,i.initTrackListeners(),e.nativeControlsForTouch||i.emitTapEvents(),i.constructor&&(i.name_=i.constructor.name||"Unknown Tech"),i}xe(i,n);var r=i.prototype;return r.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",function(){return t.setTimeout(function(){return t.triggerSourceset(e)},1)}),this.trigger({src:e,type:"sourceset"})},r.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},r.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},r.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(pe(this,function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()}),500)},r.onDurationChange=function(e){this.duration_=this.duration()},r.buffered=function(){return ot(0,0)},r.bufferedPercent=function(){return ut(this.buffered(),this.duration_)},r.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},r.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},r.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},r.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},r.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},r.dispose=function(){this.clearTracks(Ei.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),n.prototype.dispose.call(this)},r.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach(function(e){for(var n=t[e+"Tracks"]()||[],i=n.length;i--;){var r=n[i];"text"===e&&t.removeRemoteTextTrack(r),n.removeTrack(r)}})},r.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},r.reset=function(){},r.error=function(e){return void 0!==e&&(this.error_=new mt(e),this.trigger("error")),this.error_},r.played=function(){return this.hasStarted_?ot(0,0):ot()},r.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},r.initTrackListeners=function(){var e=this;Ei.names.forEach(function(t){var n=Ei[t],i=function(){e.trigger(t+"trackchange")},r=e[n.getterName]();r.addEventListener("removetrack",i),r.addEventListener("addtrack",i),e.on("dispose",function(){r.removeEventListener("removetrack",i),r.removeEventListener("addtrack",i)})})},r.addWebVttScript_=function(){var n=this;if(!e.WebVTT)if(t.body.contains(this.el())){if(!this.options_["vtt.js"]&&h(tr)&&Object.keys(tr).length>0)return void this.trigger("vttjsloaded");var i=t.createElement("script");i.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",i.onload=function(){n.trigger("vttjsloaded")},i.onerror=function(){n.trigger("vttjserror")},this.on("dispose",function(){i.onload=null,i.onerror=null}),e.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.addWebVttScript_)},r.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),i=function(e){return t.addTrack(e.track)},r=function(e){return t.removeTrack(e.track)};n.on("addtrack",i),n.on("removetrack",r),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},s=function(){a();for(var e=0;e=0;r--){var a=e[r];a[t]&&a[t](i,n)}}(e,n,o,s),o}var ur={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1,volume:1},lr={setCurrentTime:1,setVolume:1},cr={play:1,pause:1};function dr(e){return function(t,n){return t===ar?ar:n[e]?n[e](t):t}}var hr={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},fr=function(e){void 0===e&&(e="");var t=Ht(e);return hr[t.toLowerCase()]||""};function pr(e){if(!e.type){var t=fr(e.src);t&&(e.type=t)}return e}var mr=function(e){function t(t,n,i){var r,a=Oe({createEl:!1},n);if(r=e.call(this,t,a,i)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var s=0,o=n.playerOptions.techOrder;s