/*! For license information please see LICENSES */ (window.webpackJsonp=window.webpackJsonp||[]).push([[265],{687:function(t,e,r){function n(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var o,l=n(r(282)),c=n(r(688)),h=n(r(690)),d=n(r(691)),f=n(r(692)),v=n(r(696)),y="6.13.0",m=l.navigator&&l.navigator.userAgent||"",_=/AppleWebKit\/([\d.]+)/i.exec(m),T=_?parseFloat(_.pop()):null,C=/iPad/i.test(m),k=/iPhone/i.test(m)&&!C,E=/iPod/i.test(m),S=k||C||E,w=(o=m.match(/OS (\d+)_/i))&&o[1]?o[1]:null,x=/Android/i.test(m),j=function(){var t=m.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),r=t[2]&&parseFloat(t[2]);return e&&r?parseFloat(t[1]+"."+t[2]):e||null}(),P=x&&/webkit/i.test(m)&&j<2.3,A=x&&j<5&&T<537,O=/Firefox/i.test(m),M=/Edge/i.test(m),N=!M&&(/Chrome/i.test(m)||/CriOS/i.test(m)),I=function(){var t=m.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),D=/MSIE\s8\.0/.test(m),L=function(){var t=/MSIE\s(\d+)\.\d/.exec(m),e=t&&parseFloat(t[1]);return!e&&/Trident\/7.0/i.test(m)&&/rv:11.0/.test(m)&&(e=11),e}(),F=/Safari/i.test(m)&&!N&&!x&&!M,R=(F||S)&&!N,B=lt()&&("ontouchstart"in l||l.navigator.maxTouchPoints||l.DocumentTouch&&l.document instanceof l.DocumentTouch),H=lt()&&"backgroundSize"in l.document.createElement("video").style,V=(Object.freeze||Object)({IS_IPAD:C,IS_IPHONE:k,IS_IPOD:E,IS_IOS:S,IOS_VERSION:w,IS_ANDROID:x,ANDROID_VERSION:j,IS_OLD_ANDROID:P,IS_NATIVE_ANDROID:A,IS_FIREFOX:O,IS_EDGE:M,IS_CHROME:N,CHROME_VERSION:I,IS_IE8:D,IE_VERSION:L,IS_SAFARI:F,IS_ANY_SAFARI:R,TOUCH_ENABLED:B,BACKGROUND_SIZE_SUPPORTED:H}),z="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},W=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},U=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)},K=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},$=function(t,e){return t.raw=e,t},G=Object.prototype.toString,Y=function(object){return Q(object)?Object.keys(object):[]};function X(object,t){Y(object).forEach((function(e){return t(object[e],e)}))}function J(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},content=arguments[3],n=c.createElement(t);return Object.getOwnPropertyNames(e).forEach((function(t){var r=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(et.warn(h(ot,t,r)),n.setAttribute(t,r)):"textContent"===t?ft(n,r):n[t]=r})),Object.getOwnPropertyNames(r).forEach((function(t){n.setAttribute(t,r[t])})),content&&Nt(n,content),n}function ft(t,text){return void 0===t.textContent?t.innerText=text:t.textContent=text,t}function vt(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function yt(element,t){return at(t),element.classList?element.classList.contains(t):(e=t,new RegExp("(^|\\s)"+e+"($|\\s)")).test(element.className);var e}function gt(element,t){return element.classList?element.classList.add(t):yt(element,t)||(element.className=(element.className+" "+t).trim()),element}function mt(element,t){return element.classList?element.classList.remove(t):(at(t),element.className=element.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),element}function _t(element,t,e){var r=yt(element,t);if("function"==typeof e&&(e=e(element,t)),"boolean"!=typeof e&&(e=!r),e!==r)return e?gt(element,t):mt(element,t),element}function bt(t,e){Object.getOwnPropertyNames(e).forEach((function(r){var n=e[r];null==n||!1===n?t.removeAttribute(r):t.setAttribute(r,!0===n?"":n)}))}function Tt(t){var e={},r=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(t&&t.attributes&&t.attributes.length>0)for(var n=t.attributes,i=n.length-1;i>=0;i--){var o=n[i].name,l=n[i].value;"boolean"!=typeof t[o]&&-1===r.indexOf(","+o+",")||(l=null!==l),e[o]=l}return e}function Ct(t,e){return t.getAttribute(e)}function kt(t,e,r){t.setAttribute(e,r)}function Et(t,e){t.removeAttribute(e)}function St(){c.body.focus(),c.onselectstart=function(){return!1}}function wt(){c.onselectstart=function(){return!0}}function xt(t){if(t&&t.getBoundingClientRect&&t.parentNode){var rect=t.getBoundingClientRect(),e={};return["bottom","height","left","right","top","width"].forEach((function(t){void 0!==rect[t]&&(e[t]=rect[t])})),e.height||(e.height=parseFloat(it(t,"height"))),e.width||(e.width=parseFloat(it(t,"width"))),e}}function jt(t){var e=void 0;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var r=c.documentElement,body=c.body,n=r.clientLeft||body.clientLeft||0,o=l.pageXOffset||body.scrollLeft,h=e.left+o-n,d=r.clientTop||body.clientTop||0,f=l.pageYOffset||body.scrollTop,v=e.top+f-d;return{left:Math.round(h),top:Math.round(v)}}function Pt(t,e){var r={},n=jt(t),o=t.offsetWidth,l=t.offsetHeight,c=n.top,h=n.left,d=e.pageY,f=e.pageX;return e.changedTouches&&(f=e.changedTouches[0].pageX,d=e.changedTouches[0].pageY),r.y=Math.max(0,Math.min(1,(c-d+l)/l)),r.x=Math.max(0,Math.min(1,(f-h)/o)),r}function At(t){return Q(t)&&3===t.nodeType}function Ot(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function Mt(content){return"function"==typeof content&&(content=content()),(Array.isArray(content)?content:[content]).map((function(t){return"function"==typeof t&&(t=t()),ct(t)||At(t)?t:"string"==typeof t&&/\S/.test(t)?c.createTextNode(t):void 0})).filter((function(t){return t}))}function Nt(t,content){return Mt(content).forEach((function(e){return t.appendChild(e)})),t}function It(t,content){return Nt(Ot(t),content)}function Dt(t){return void 0===t.button&&void 0===t.buttons||(0===t.button&&void 0===t.buttons||(9===L||0===t.button&&1===t.buttons))}var Lt=ht("querySelector"),Ft=ht("querySelectorAll"),Rt=(Object.freeze||Object)({isReal:lt,isEl:ct,isInFrame:ut,createEl:pt,textContent:ft,prependTo:vt,hasClass:yt,addClass:gt,removeClass:mt,toggleClass:_t,setAttributes:bt,getAttributes:Tt,getAttribute:Ct,setAttribute:kt,removeAttribute:Et,blockTextSelection:St,unblockTextSelection:wt,getBoundingClientRect:xt,findPosition:jt,getPointerPosition:Pt,isTextNode:At,emptyEl:Ot,normalizeContent:Mt,appendContent:Nt,insertContent:It,isSingleLeftClick:Dt,$:Lt,$$:Ft}),Bt=1;function Ht(){return Bt++}var Vt={},zt="vdata"+(new Date).getTime();function Wt(t){var e=t[zt];return e||(e=t[zt]=Ht()),Vt[e]||(Vt[e]={}),Vt[e]}function Ut(t){var e=t[zt];return!!e&&!!Object.getOwnPropertyNames(Vt[e]).length}function Kt(t){var e=t[zt];if(e){delete Vt[e];try{delete t[zt]}catch(e){t.removeAttribute?t.removeAttribute(zt):t[zt]=null}}}function qt(t,e){var data=Wt(t);0===data.handlers[e].length&&(delete data.handlers[e],t.removeEventListener?t.removeEventListener(e,data.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,data.dispatcher)),Object.getOwnPropertyNames(data.handlers).length<=0&&(delete data.handlers,delete data.dispatcher,delete data.disabled),0===Object.getOwnPropertyNames(data).length&&Kt(t)}function $t(t,e,r,n){r.forEach((function(r){t(e,r,n)}))}function Gt(t){function e(){return!0}function r(){return!1}if(!t||!t.isPropagationStopped){var n=t||l.event;for(var o in t={},n)"layerX"!==o&&"layerY"!==o&&"keyLocation"!==o&&"webkitMovementX"!==o&&"webkitMovementY"!==o&&("returnValue"===o&&n.preventDefault||(t[o]=n[o]));if(t.target||(t.target=t.srcElement||c),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){n.preventDefault&&n.preventDefault(),t.returnValue=!1,n.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),t.cancelBubble=!0,n.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=r,t.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=r,null!==t.clientX&&void 0!==t.clientX){var h=c.documentElement,body=c.body;t.pageX=t.clientX+(h&&h.scrollLeft||body&&body.scrollLeft||0)-(h&&h.clientLeft||body&&body.clientLeft||0),t.pageY=t.clientY+(h&&h.scrollTop||body&&body.scrollTop||0)-(h&&h.clientTop||body&&body.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var Yt=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){Yt=!0}});l.addEventListener("test",null,t),l.removeEventListener("test",null,t)}catch(t){}}();var Xt=["touchstart","touchmove"];function Jt(t,e,r){if(Array.isArray(e))return $t(Jt,t,e,r);var data=Wt(t);if(data.handlers||(data.handlers={}),data.handlers[e]||(data.handlers[e]=[]),r.guid||(r.guid=Ht()),data.handlers[e].push(r),data.dispatcher||(data.disabled=!1,data.dispatcher=function(e,r){if(!data.disabled){e=Gt(e);var n=data.handlers[e.type];if(n)for(var o=n.slice(0),l=0,c=o.length;l-1&&(n={passive:!0}),t.addEventListener(e,data.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+e,data.dispatcher)}function Qt(t,e,r){if(Ut(t)){var data=Wt(t);if(data.handlers){if(Array.isArray(e))return $t(Qt,t,e,r);var n=function(t,e){data.handlers[e]=[],qt(t,e)};if(void 0!==e){var o=data.handlers[e];if(o)if(r){if(r.guid)for(var l=0;l0)for(var i=0,o=t.length;i0)for(var l=0,h=e.length;l0)for(var d=0,f=r.length;d0)for(var v=0,y=n.length;v=e&&(t.apply(void 0,arguments),r=n)}},ue=function(){};ue.prototype.allowedEvents_={},ue.prototype.on=function(t,e){var r=this.addEventListener;this.addEventListener=function(){},Jt(this,t,e),this.addEventListener=r},ue.prototype.addEventListener=ue.prototype.on,ue.prototype.off=function(t,e){Qt(this,t,e)},ue.prototype.removeEventListener=ue.prototype.off,ue.prototype.one=function(t,e){var r=this.addEventListener;this.addEventListener=function(){},te(this,t,e),this.addEventListener=r},ue.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=Gt(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),Zt(this,t)},ue.prototype.dispatchEvent=ue.prototype.trigger;var he=function(object){return object instanceof ue||!!object.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof object[t]}))},pe=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},de=function(t){if(!t.nodeName&&!he(t))throw new Error("Invalid target; must be a DOM node or evented object.")},fe=function(t){if(!pe(t))throw new Error("Invalid event type; must be a non-empty string or array.")},ve=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},ye=function(t,e){var r=e.length<3||e[0]===t||e[0]===t.eventBusEl_,n=void 0,o=void 0,l=void 0;return r?(n=t.eventBusEl_,e.length>=3&&e.shift(),o=e[0],l=e[1]):(n=e[0],o=e[1],l=e[2]),de(n),fe(o),ve(l),{isTargetingSelf:r,target:n,type:o,listener:l=le(t,l)}},ge=function(t,e,r,n){de(t),t.nodeName?ee[e](t,r,n):t[e](r,n)},me={on:function(){for(var t=this,e=arguments.length,r=Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{}).eventBusKey;if(e){if(!t[e].nodeName)throw new Error('The eventBusKey "'+e+'" does not refer to an element.');t.eventBusEl_=t[e]}else t.eventBusEl_=pt("span",{className:"vjs-event-bus"});return J(t,me),t.on("dispose",(function(){t.off(),l.setTimeout((function(){t.eventBusEl_=null}),0)})),t}var be={state:{},setState:function(t){var e=this;"function"==typeof t&&(t=t());var r=void 0;return X(t,(function(t,n){e.state[n]!==t&&((r=r||{})[n]={from:e.state[n],to:t}),e.state[n]=t})),r&&he(this)&&this.trigger({changes:r,type:"statechanged"}),r}};function Te(t,e){return J(t,be),t.state=J({},t.state,e),"function"==typeof t.handleStateChanged&&he(t)&&t.on("statechanged",t.handleStateChanged),t}function Ce(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function ke(){for(var t={},e=arguments.length,r=Array(e),n=0;n=0;i--)this.children_[i].dispose&&this.children_[i].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Kt(this.el_),this.el_=null),this.player_=null},t.prototype.player=function(){return this.player_},t.prototype.options=function(t){return et.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.options_=ke(this.options_,t),this.options_):this.options_},t.prototype.el=function(){return this.el_},t.prototype.createEl=function(t,e,r){return pt(t,e,r)},t.prototype.localize=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,code=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),o=n&&n[code],l=code&&code.split("-")[0],c=n&&n[l],h=r;return o&&o[t]?h=o[t]:c&&c[t]&&(h=c[t]),e&&(h=h.replace(/\{(\d+)\}/g,(function(t,r){var n=e[r-1],o=n;return void 0===n&&(o=t),o}))),h},t.prototype.contentEl=function(){return this.contentEl_||this.el_},t.prototype.id=function(){return this.id_},t.prototype.name=function(){return this.name_},t.prototype.children=function(){return this.children_},t.prototype.getChildById=function(t){return this.childIndex_[t]},t.prototype.getChild=function(t){if(t)return t=Ce(t),this.childNameIndex_[t]},t.prototype.addChild=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,component=void 0,o=void 0;if("string"==typeof e){o=Ce(e);var l=r.componentClass||o;r.name=o;var c=t.getComponent(l);if(!c)throw new Error("Component "+l+" does not exist");if("function"!=typeof c)return null;component=new c(this.player_||this,r)}else component=e;if(this.children_.splice(n,0,component),"function"==typeof component.id&&(this.childIndex_[component.id()]=component),(o=o||component.name&&Ce(component.name()))&&(this.childNameIndex_[o]=component),"function"==typeof component.el&&component.el()){var h=this.contentEl().children[n]||null;this.contentEl().insertBefore(component.el(),h)}return component},t.prototype.removeChild=function(component){if("string"==typeof component&&(component=this.getChild(component)),component&&this.children_){for(var t=!1,i=this.children_.length-1;i>=0;i--)if(this.children_[i]===component){t=!0,this.children_.splice(i,1);break}if(t){this.childIndex_[component.id()]=null,this.childNameIndex_[component.name()]=null;var e=component.el();e&&e.parentNode===this.contentEl()&&this.contentEl().removeChild(component.el())}}},t.prototype.initChildren=function(){var e=this,r=this.options_.children;if(r){var n=this.options_,o=void 0,l=t.getComponent("Tech");(o=Array.isArray(r)?r:Object.keys(r)).concat(Object.keys(this.options_).filter((function(t){return!o.some((function(e){return"string"==typeof e?t===e:t===e.name}))}))).map((function(t){var n=void 0,o=void 0;return"string"==typeof t?o=r[n=t]||e.options_[n]||{}:(n=t.name,o=t),{name:n,opts:o}})).filter((function(e){var r=t.getComponent(e.opts.componentClass||Ce(e.name));return r&&!l.isTech(r)})).forEach((function(t){var r=t.name,o=t.opts;if(void 0!==n[r]&&(o=n[r]),!1!==o){!0===o&&(o={}),o.playerOptions=e.options_.playerOptions;var l=e.addChild(r,o);l&&(e[r]=l)}}))}},t.prototype.buildCSSClass=function(){return""},t.prototype.ready=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},t.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},t.prototype.$=function(t,e){return Lt(t,e||this.contentEl())},t.prototype.$$=function(t,e){return Ft(t,e||this.contentEl())},t.prototype.hasClass=function(t){return yt(this.el_,t)},t.prototype.addClass=function(t){gt(this.el_,t)},t.prototype.removeClass=function(t){mt(this.el_,t)},t.prototype.toggleClass=function(t,e){_t(this.el_,t,e)},t.prototype.show=function(){this.removeClass("vjs-hidden")},t.prototype.hide=function(){this.addClass("vjs-hidden")},t.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},t.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.prototype.getAttribute=function(t){return Ct(this.el_,t)},t.prototype.setAttribute=function(t,e){kt(this.el_,t,e)},t.prototype.removeAttribute=function(t){Et(this.el_,t)},t.prototype.width=function(t,e){return this.dimension("width",t,e)},t.prototype.height=function(t,e){return this.dimension("height",t,e)},t.prototype.dimensions=function(t,e){this.width(t,!0),this.height(e)},t.prototype.dimension=function(t,e,r){if(void 0!==e)return null!==e&&e==e||(e=0),-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?this.el_.style[t]=e:this.el_.style[t]="auto"===e?"":e+"px",void(r||this.trigger("componentresize"));if(!this.el_)return 0;var n=this.el_.style[t],o=n.indexOf("px");return-1!==o?parseInt(n.slice(0,o),10):parseInt(this.el_["offset"+Ce(t)],10)},t.prototype.currentDimension=function(t){var e=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if("function"==typeof l.getComputedStyle){var r=l.getComputedStyle(this.el_);e=r.getPropertyValue(t)||r[t]}if(0===(e=parseFloat(e))){var n="offset"+Ce(t);e=this.el_[n]}return e},t.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.prototype.currentWidth=function(){return this.currentDimension("width")},t.prototype.currentHeight=function(){return this.currentDimension("height")},t.prototype.focus=function(){this.el_.focus()},t.prototype.blur=function(){this.el_.blur()},t.prototype.emitTapEvents=function(){var t=0,e=null,r=void 0;this.on("touchstart",(function(n){1===n.touches.length&&(e={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t=(new Date).getTime(),r=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)r=!1;else if(e){var n=t.touches[0].pageX-e.pageX,o=t.touches[0].pageY-e.pageY;Math.sqrt(n*n+o*o)>10&&(r=!1)}}));var n=function(){r=!1};this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",(function(n){(e=null,!0===r)&&((new Date).getTime()-t<200&&(n.preventDefault(),this.trigger("tap")))}))},t.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t=le(this.player(),this.player().reportUserActivity),e=void 0;this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var r=function(r){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",r),this.on("touchcancel",r)}},t.prototype.setTimeout=function(t,e){var r,n,o=this;return t=le(this,t),r=l.setTimeout((function(){o.off("dispose",n),t()}),e),(n=function(){return o.clearTimeout(r)}).guid="vjs-timeout-"+r,this.on("dispose",n),r},t.prototype.clearTimeout=function(t){l.clearTimeout(t);var e=function(){};return e.guid="vjs-timeout-"+t,this.off("dispose",e),t},t.prototype.setInterval=function(t,e){var r=this;t=le(this,t);var n=l.setInterval(t,e),o=function(){return r.clearInterval(n)};return o.guid="vjs-interval-"+n,this.on("dispose",o),n},t.prototype.clearInterval=function(t){l.clearInterval(t);var e=function(){};return e.guid="vjs-interval-"+t,this.off("dispose",e),t},t.prototype.requestAnimationFrame=function(t){var e,r,n=this;return this.supportsRaf_?(t=le(this,t),e=l.requestAnimationFrame((function(){n.off("dispose",r),t()})),(r=function(){return n.cancelAnimationFrame(e)}).guid="vjs-raf-"+e,this.on("dispose",r),e):this.setTimeout(t,1e3/60)},t.prototype.cancelAnimationFrame=function(t){if(this.supportsRaf_){l.cancelAnimationFrame(t);var e=function(){};return e.guid="vjs-raf-"+t,this.off("dispose",e),t}return this.clearTimeout(t)},t.registerComponent=function(e,r){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var n=t.getComponent("Tech"),o=n&&n.isTech(r),l=t===r||t.prototype.isPrototypeOf(r.prototype);if(o||!l){var c=void 0;throw c=o?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+c+".")}e=Ce(e),t.components_||(t.components_={});var h=t.getComponent("Player");if("Player"===e&&h&&h.players){var d=h.players,f=Object.keys(d);if(d&&f.length>0&&f.map((function(t){return d[t]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=r,r},t.getComponent=function(e){if(e)return e=Ce(e),t.components_&&t.components_[e]?t.components_[e]:void 0},t}();function Se(t,e,r,n){return function(t,e,r){if("number"!=typeof e||e<0||e>r)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+r+").")}(t,n,r.length-1),r[n][e]}function we(t){return void 0===t||0===t.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:t.length,start:Se.bind(null,"start",0,t),end:Se.bind(null,"end",1,t)}}function xe(t,e){return Array.isArray(t)?we(t):void 0===t||void 0===e?we():we([[t,e]])}function je(t,e){var r=0,n=void 0,o=void 0;if(!e)return 0;t&&t.length||(t=xe(0,0));for(var i=0;ie&&(o=e),r+=o-n;return r/e}Ee.prototype.supportsRaf_="function"==typeof l.requestAnimationFrame&&"function"==typeof l.cancelAnimationFrame,Ee.registerComponent("Component",Ee);for(var Pe={},Ae=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Oe=Ae[0],Me=void 0,i=0;i0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;W(this,e);var o=K(this,t.call(this));if(!n&&(n=o,D))for(var l in n=c.createElement("custom"),e.prototype)"constructor"!==l&&(n[l]=e.prototype[l]);n.tracks_=[],Object.defineProperty(n,"length",{get:function(){return this.tracks_.length}});for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:[];W(this,e);for(var o=void 0,i=n.length-1;i>=0;i--)if(n[i].enabled){Ke(n,n[i]);break}if(D){for(var l in o=c.createElement("custom"),We.prototype)"constructor"!==l&&(o[l]=We.prototype[l]);for(var h in e.prototype)"constructor"!==h&&(o[h]=e.prototype[h])}return(o=r=K(this,t.call(this,n,o))).changing_=!1,K(r,o)}return U(e,t),e.prototype.addTrack=function(track){var e=this;track.enabled&&Ke(this,track),t.prototype.addTrack.call(this,track),track.addEventListener&&track.addEventListener("enabledchange",(function(){e.changing_||(e.changing_=!0,Ke(e,track),e.changing_=!1,e.trigger("change"))}))},e}(We),$e=function(t,track){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:[];W(this,e);for(var o=void 0,i=n.length-1;i>=0;i--)if(n[i].selected){$e(n,n[i]);break}if(D){for(var l in o=c.createElement("custom"),We.prototype)"constructor"!==l&&(o[l]=We.prototype[l]);for(var h in e.prototype)"constructor"!==h&&(o[h]=e.prototype[h])}return(o=r=K(this,t.call(this,n,o))).changing_=!1,Object.defineProperty(o,"selectedIndex",{get:function(){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:[];W(this,e);var o=void 0;if(D){for(var l in o=c.createElement("custom"),We.prototype)"constructor"!==l&&(o[l]=We.prototype[l]);for(var h in e.prototype)"constructor"!==h&&(o[h]=e.prototype[h])}return r=K(this,t.call(this,n,o)),K(r,o=r)}return U(e,t),e.prototype.addTrack=function(track){t.prototype.addTrack.call(this,track),track.addEventListener("modechange",le(this,(function(){this.trigger("change")})));-1===["metadata","chapters"].indexOf(track.kind)&&track.addEventListener("modechange",le(this,(function(){this.trigger("selectedlanguagechange")})))},e}(We),Xe=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];W(this,t);var r=this;if(D)for(var n in r=c.createElement("custom"),t.prototype)"constructor"!==n&&(r[n]=t.prototype[n]);r.trackElements_=[],Object.defineProperty(r,"length",{get:function(){return this.trackElements_.length}});for(var i=0,o=e.length;i0&&void 0!==arguments[0]?arguments[0]:{};W(this,e);var n=K(this,t.call(this)),track=n;if(D)for(var o in track=c.createElement("custom"),e.prototype)"constructor"!==o&&(track[o]=e.prototype[o]);var l={id:r.id||"vjs_track_"+Ht(),kind:r.kind||"",label:r.label||"",language:r.language||""},h=function(t){Object.defineProperty(track,t,{get:function(){return l[t]},set:function(){}})};for(var d in l)h(d);return K(n,track)}return U(e,t),e}(ue),ir=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],a=c.createElement("a");a.href=t;var r=""===a.host&&"file:"!==a.protocol,div=void 0;r&&((div=c.createElement("div")).innerHTML='',a=div.firstChild,div.setAttribute("style","display:none; position:absolute;"),c.body.appendChild(div));for(var details={},i=0;ix',t=div.firstChild.href}return t},sr=function(path){if("string"==typeof path){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(path);if(t)return t.pop().toLowerCase()}return""},ar=function(t){var e=l.location,r=ir(t);return(":"===r.protocol?e.protocol:r.protocol)+r.host!==e.protocol+e.host},lr=(Object.freeze||Object)({parseUrl:ir,getAbsoluteURL:or,getFileExtension:sr,isCrossOrigin:ar}),cr=function(t,track){var e=new l.WebVTT.Parser(l,l.vttjs,l.WebVTT.StringDecoder()),r=[];e.oncue=function(t){track.addCue(t)},e.onparsingerror=function(t){r.push(t)},e.onflush=function(){track.trigger({type:"loadeddata",target:track})},e.parse(t),r.length>0&&(l.console&&l.console.groupCollapsed&&l.console.groupCollapsed("Text Track parsing errors for "+track.src),r.forEach((function(t){return et.error(t)})),l.console&&l.console.groupEnd&&l.console.groupEnd()),e.flush()},ur=function(t){function e(){var r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(W(this,e),!n.tech)throw new Error("A tech was not provided.");var o=ke(n,{kind:er[n.kind]||"subtitles",language:n.language||n.srclang||""}),c=rr[o.mode]||"disabled",h=o.default;"metadata"!==o.kind&&"chapters"!==o.kind||(c="hidden");var d=r=K(this,t.call(this,o));if(d.tech_=o.tech,D)for(var v in e.prototype)"constructor"!==v&&(d[v]=e.prototype[v]);d.cues_=[],d.activeCues_=[];var y=new Je(d.cues_),m=new Je(d.activeCues_),_=!1,T=le(d,(function(){this.activeCues=this.activeCues,_&&(this.trigger("cuechange"),_=!1)}));return"disabled"!==c&&d.tech_.ready((function(){d.tech_.on("timeupdate",T)}),!0),Object.defineProperty(d,"default",{get:function(){return h},set:function(){}}),Object.defineProperty(d,"mode",{get:function(){return c},set:function(t){var e=this;rr[t]&&("disabled"!==(c=t)?this.tech_.ready((function(){e.tech_.on("timeupdate",T)}),!0):this.tech_.off("timeupdate",T),this.trigger("modechange"))}}),Object.defineProperty(d,"cues",{get:function(){return this.loaded_?y:null},set:function(){}}),Object.defineProperty(d,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return m;for(var t=this.tech_.currentTime(),e=[],i=0,r=this.cues.length;i=t||n.startTime===n.endTime&&n.startTime<=t&&n.startTime+.5>=t)&&e.push(n)}if(_=!1,e.length!==this.activeCues_.length)_=!0;else for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:{};W(this,e);var o=ke(n,{kind:Ze[n.kind]||""}),track=r=K(this,t.call(this,o)),l=!1;if(D)for(var c in e.prototype)"constructor"!==c&&(track[c]=e.prototype[c]);return Object.defineProperty(track,"enabled",{get:function(){return l},set:function(t){"boolean"==typeof t&&t!==l&&(l=t,this.trigger("enabledchange"))}}),o.enabled&&(track.enabled=o.enabled),track.loaded_=!0,K(r,track)}return U(e,t),e}(nr),dr=function(t){function e(){var r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};W(this,e);var o=ke(n,{kind:Qe[n.kind]||""}),track=r=K(this,t.call(this,o)),l=!1;if(D)for(var c in e.prototype)"constructor"!==c&&(track[c]=e.prototype[c]);return Object.defineProperty(track,"selected",{get:function(){return l},set:function(t){"boolean"==typeof t&&t!==l&&(l=t,this.trigger("selectedchange"))}}),o.selected&&(track.selected=o.selected),K(r,track)}return U(e,t),e}(nr),fr=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};W(this,e);var n=K(this,t.call(this)),o=void 0,l=n;if(D)for(var h in l=c.createElement("custom"),e.prototype)"constructor"!==h&&(l[h]=e.prototype[h]);var track=new ur(r);return l.kind=track.kind,l.src=track.src,l.srclang=track.language,l.label=track.label,l.default=track.default,Object.defineProperty(l,"readyState",{get:function(){return o}}),Object.defineProperty(l,"track",{get:function(){return track}}),o=0,track.addEventListener("loadeddata",(function(){o=2,l.trigger({type:"load",target:l})})),D?K(n,l):n}return U(e,t),e}(ue);fr.prototype.allowedEvents_={load:"load"},fr.NONE=0,fr.LOADING=1,fr.LOADED=2,fr.ERROR=3;var vr={audio:{ListClass:qe,TrackClass:pr,capitalName:"Audio"},video:{ListClass:Ge,TrackClass:dr,capitalName:"Video"},text:{ListClass:Ye,TrackClass:ur,capitalName:"Text"}};Object.keys(vr).forEach((function(t){vr[t].getterName=t+"Tracks",vr[t].privateName=t+"Tracks_"}));var yr={remoteText:{ListClass:Ye,TrackClass:ur,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Xe,TrackClass:fr,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},gr=ke(vr,yr);yr.names=Object.keys(yr),vr.names=Object.keys(vr),gr.names=[].concat(yr.names).concat(vr.names);var mr=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};W(this,e),r.reportTouchActivity=!1;var o=K(this,t.call(this,null,r,n));return o.hasStarted_=!1,o.on("playing",(function(){this.hasStarted_=!0})),o.on("loadstart",(function(){this.hasStarted_=!1})),gr.names.forEach((function(t){var e=gr[t];r&&r[e.getterName]&&(o[e.privateName]=r[e.getterName])})),o.featuresProgressEvents||o.manualProgressOn(),o.featuresTimeupdateEvents||o.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(track){!1===r["native"+track+"Tracks"]&&(o["featuresNative"+track+"Tracks"]=!1)})),!1===r.nativeCaptions||!1===r.nativeTextTracks?o.featuresNativeTextTracks=!1:!0!==r.nativeCaptions&&!0!==r.nativeTextTracks||(o.featuresNativeTextTracks=!0),o.featuresNativeTextTracks||o.emulateTextTracks(),o.autoRemoteTextTracks_=new gr.text.ListClass,o.initTrackListeners(),r.nativeControlsForTouch||o.emitTapEvents(),o.constructor&&(o.name_=o.constructor.name||"Unknown Tech"),o}return U(e,t),e.prototype.triggerSourceset=function(t){var e=this;this.isReady_||this.one("ready",(function(){return e.setTimeout((function(){return e.triggerSourceset(t)}),1)})),this.trigger({src:t,type:"sourceset"})},e.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},e.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},e.prototype.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(le(this,(function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,1===t&&this.stopTrackingProgress()})),500)},e.prototype.onDurationChange=function(t){this.duration_=this.duration()},e.prototype.buffered=function(){return xe(0,0)},e.prototype.bufferedPercent=function(){return je(this.buffered(),this.duration_)},e.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},e.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},e.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},e.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},e.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.dispose=function(){this.clearTracks(vr.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},e.prototype.clearTracks=function(t){var e=this;(t=[].concat(t)).forEach((function(t){for(var r=e[t+"Tracks"]()||[],i=r.length;i--;){var track=r[i];"text"===t&&e.removeRemoteTextTrack(track),r.removeTrack(track)}}))},e.prototype.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],i=t.length;i--;){var track=t[i];this.removeRemoteTextTrack(track)}},e.prototype.reset=function(){},e.prototype.error=function(t){return void 0!==t&&(this.error_=new Ie(t),this.trigger("error")),this.error_},e.prototype.played=function(){return this.hasStarted_?xe(0,0):xe()},e.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.initTrackListeners=function(){var t=this;vr.names.forEach((function(e){var r=vr[e],n=function(){t.trigger(e+"trackchange")},o=t[r.getterName]();o.addEventListener("removetrack",n),o.addEventListener("addtrack",n),t.on("dispose",(function(){o.removeEventListener("removetrack",n),o.removeEventListener("addtrack",n)}))}))},e.prototype.addWebVttScript_=function(){var t=this;if(!l.WebVTT)if(c.body.contains(this.el())){if(!this.options_["vtt.js"]&&Z(v)&&Object.keys(v).length>0)return void this.trigger("vttjsloaded");var script=c.createElement("script");script.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",script.onload=function(){t.trigger("vttjsloaded")},script.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){script.onload=null,script.onerror=null})),l.WebVTT=!0,this.el().parentNode.appendChild(script)}else this.ready(this.addWebVttScript_)},e.prototype.emulateTextTracks=function(){var t=this,e=this.textTracks(),r=this.remoteTextTracks(),n=function(t){return e.addTrack(t.track)},o=function(t){return e.removeTrack(t.track)};r.on("addtrack",n),r.on("removetrack",o),this.addWebVttScript_();var l=function(){return t.trigger("texttrackchange")},c=function(){l();for(var i=0;i4&&void 0!==arguments[4]?arguments[4]:{},o=t.textTracks();n.kind=e,label&&(n.label=label),r&&(n.language=r),n.tech=t;var track=new gr.text.TrackClass(n);return o.addTrack(track),track}(this,t,label,e)},e.prototype.createRemoteTextTrack=function(t){var track=ke(t,{tech:this});return new yr.remoteTextEl.TrackClass(track)},e.prototype.addRemoteTextTrack=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments[1],n=this.createRemoteTextTrack(e);return!0!==r&&!1!==r&&(et.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),r=!0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!0!==r&&this.ready((function(){return t.autoRemoteTextTracks_.addTrack(n.track)})),n},e.prototype.removeRemoteTextTrack=function(track){var t=this.remoteTextTrackEls().getTrackElementByTrack_(track);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(track),this.autoRemoteTextTracks_.removeTrack(track)},e.prototype.getVideoPlaybackQuality=function(){return{}},e.prototype.setPoster=function(){},e.prototype.playsinline=function(){},e.prototype.setPlaysinline=function(){},e.prototype.canPlayType=function(){return""},e.canPlayType=function(){return""},e.canPlaySource=function(t,r){return e.canPlayType(t.type)},e.isTech=function(component){return component.prototype instanceof e||component instanceof e||component===e},e.registerTech=function(t,r){if(e.techs_||(e.techs_={}),!e.isTech(r))throw new Error("Tech "+t+" must be a Tech");if(!e.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!e.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=Ce(t),e.techs_[t]=r,"Tech"!==t&&e.defaultTechOrder_.push(t),r},e.getTech=function(t){if(t)return t=Ce(t),e.techs_&&e.techs_[t]?e.techs_[t]:l&&l.videojs&&l.videojs[t]?(et.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),l.videojs[t]):void 0},e}(Ee);gr.names.forEach((function(t){var e=gr[t];mr.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}})),mr.prototype.featuresVolumeControl=!0,mr.prototype.featuresMuteControl=!0,mr.prototype.featuresFullscreenResize=!1,mr.prototype.featuresPlaybackRate=!1,mr.prototype.featuresProgressEvents=!1,mr.prototype.featuresSourceset=!1,mr.prototype.featuresTimeupdateEvents=!1,mr.prototype.featuresNativeTextTracks=!1,mr.withSourceHandlers=function(t){t.registerSourceHandler=function(e,r){var n=t.sourceHandlers;n||(n=t.sourceHandlers=[]),void 0===r&&(r=n.length),n.splice(r,0,e)},t.canPlayType=function(e){for(var r=t.sourceHandlers||[],n=void 0,i=0;i3&&void 0!==arguments[3]?arguments[3]:null,o="call"+Ce(r),l=t.reduce(jr(o),n),c=l===Cr,h=c?null:e[r](l);return function(t,e,r,n){for(var i=t.length-1;i>=0;i--){var o=t[i];o[e]&&o[e](n,r)}}(t,r,h,c),h}var Sr={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},wr={setCurrentTime:1},xr={play:1,pause:1};function jr(t){return function(e,r){return e===Cr?Cr:r[t]?r[t](e):e}}function Pr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],n=arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],l=arguments.length>5&&void 0!==arguments[5]&&arguments[5],c=e[0],h=e.slice(1);if("string"==typeof c)Pr(t,_r[c],r,n,o,l);else if(c){var d=function(t,e){var r=Tr[t.id()],n=null;if(null==r)return n=e(t),Tr[t.id()]=[[e,n]],n;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:"");return Ar[t.toLowerCase()]||""},Mr=function t(e){if(Array.isArray(e)){var r=[];e.forEach((function(e){e=t(e),Array.isArray(e)?r=r.concat(e):Q(e)&&r.push(e)})),e=r}else e="string"==typeof e&&e.trim()?[Nr({src:e})]:Q(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[Nr(e)]:[];return e};function Nr(t){var e=Or(t.src);return!t.type&&e&&(t.type=e),t}var Ir=function(t){function e(r,n,o){W(this,e);var l=ke({createEl:!1},n),c=K(this,t.call(this,r,l,o));if(n.playerOptions.sources&&0!==n.playerOptions.sources.length)r.src(n.playerOptions.sources);else for(var i=0,h=n.playerOptions.techOrder;i0&&void 0!==arguments[0]?arguments[0]:"div",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r=J({innerHTML:'',className:this.buildCSSClass(),tabIndex:0},r),"button"===e&&et.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),n=J({role:"button"},n),this.tabIndex_=r.tabIndex;var o=t.prototype.createEl.call(this,e,r,n);return this.createControlTextEl(o),o},e.prototype.dispose=function(){this.controlTextEl_=null,t.prototype.dispose.call(this)},e.prototype.createControlTextEl=function(t){return this.controlTextEl_=pt("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},e.prototype.controlText=function(text){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===text)return this.controlText_||"Need Text";var e=this.localize(text);this.controlText_=text,ft(this.controlTextEl_,e),this.nonIconControl||t.setAttribute("title",e)},e.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},e.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},e.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},e.prototype.handleClick=function(t){},e.prototype.handleFocus=function(t){Jt(c,"keydown",le(this,this.handleKeyPress))},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.trigger("click")):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e.prototype.handleBlur=function(t){Qt(c,"keydown",le(this,this.handleKeyPress))},e}(Ee);Ee.registerComponent("ClickableComponent",Dr);var Lr=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return o.update(),r.on("posterchange",le(o,o.update)),o}return U(e,t),e.prototype.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},e.prototype.createEl=function(){var t=pt("div",{className:"vjs-poster",tabIndex:-1});return H||(this.fallbackImg_=pt("img"),t.appendChild(this.fallbackImg_)),t},e.prototype.update=function(t){var e=this.player().poster();this.setSrc(e),e?this.show():this.hide()},e.prototype.setSrc=function(t){if(this.fallbackImg_)this.fallbackImg_.src=t;else{var e="";t&&(e='url("'+t+'")'),this.el_.style.backgroundImage=e}},e.prototype.handleClick=function(t){this.player_.controls()&&(this.player_.paused()?Fe(this.player_.play()):this.player_.pause())},e}(Dr);Ee.registerComponent("PosterImage",Lr);var Fr="#222",Rr={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Br(t,e){var r=void 0;if(4===t.length)r=t[1]+t[1]+t[2]+t[2]+t[3]+t[3];else{if(7!==t.length)throw new Error("Invalid color code provided, "+t+"; must be formatted as e.g. #f0e or #f604e2.");r=t.slice(1)}return"rgba("+parseInt(r.slice(0,2),16)+","+parseInt(r.slice(2,4),16)+","+parseInt(r.slice(4,6),16)+","+e+")"}function Hr(t,style,e){try{t.style[style]=e}catch(t){return}}var Vr=function(t){function e(r,n,o){W(this,e);var c=K(this,t.call(this,r,n,o)),h=le(c,c.updateDisplay);return r.on("loadstart",le(c,c.toggleDisplay)),r.on("texttrackchange",h),r.on("loadstart",le(c,c.preselectTrack)),r.ready(le(c,(function(){if(r.tech_&&r.tech_.featuresNativeTextTracks)this.hide();else{r.on("fullscreenchange",h),r.on("playerresize",h),l.addEventListener&&l.addEventListener("orientationchange",h),r.on("dispose",(function(){return l.removeEventListener("orientationchange",h)}));for(var t=this.options_.playerOptions.tracks||[],i=0;i1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t="button",e=J({innerHTML:'',className:this.buildCSSClass()},e),r=J({type:"button"},r);var n=Ee.prototype.createEl.call(this,t,e,r);return this.createControlTextEl(n),n},e.prototype.addChild=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.constructor.name;return et.warn("Adding an actionable (user controllable) child to a Button ("+r+") is not supported; use a ClickableComponent instead."),Ee.prototype.addChild.call(this,t,e)},e.prototype.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},e.prototype.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},e.prototype.handleKeyPress=function(e){32!==e.which&&13!==e.which&&t.prototype.handleKeyPress.call(this,e)},e}(Dr);Ee.registerComponent("Button",Wr);var Ur=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return o.mouseused_=!1,o.on("mousedown",o.handleMouseDown),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-big-play-button"},e.prototype.handleClick=function(t){var e=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY)Fe(e);else{var r=this.player_.getChild("controlBar"),n=r&&r.getChild("playToggle");if(n){var o=function(){return n.focus()};Le(e)?e.then(o,(function(){})):this.setTimeout(o,1)}else this.player_.focus()}},e.prototype.handleKeyPress=function(e){this.mouseused_=!1,t.prototype.handleKeyPress.call(this,e)},e.prototype.handleMouseDown=function(t){this.mouseused_=!0},e}(Wr);Ur.prototype.controlText_="Play Video",Ee.registerComponent("BigPlayButton",Ur);var Kr=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return o.controlText(n&&n.controlText||o.localize("Close")),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},e}(Wr);Ee.registerComponent("CloseButton",Kr);var qr=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return o.on(r,"play",o.handlePlay),o.on(r,"pause",o.handlePause),o.on(r,"ended",o.handleEnded),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},e.prototype.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},e.prototype.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},e.prototype.handleEnded=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(Wr);qr.prototype.controlText_="Play",Ee.registerComponent("PlayToggle",qr);var $r=function(t,e){t=t<0?0:t;var s=Math.floor(t%60),r=Math.floor(t/60%60),n=Math.floor(t/3600),o=Math.floor(e/60%60),l=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(n=r=s="-"),(n=n>0||l>0?n+":":"")+(r=((n||o>=10)&&r<10?"0"+r:r)+":")+(s=s<10?"0"+s:s)},Gr=$r;var Yr=function(t){return Gr(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t)},Xr=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return o.throttledUpdateContent=ce(le(o,o.updateContent),25),o.on(r,"timeupdate",o.throttledUpdateContent),o}return U(e,t),e.prototype.createEl=function(e){var r=this.buildCSSClass(),n=t.prototype.createEl.call(this,"div",{className:r+" vjs-time-control vjs-control",innerHTML:''+this.localize(this.labelText_)+" "});return this.contentEl_=pt("span",{className:r+"-display"},{"aria-live":"off"}),this.updateTextNode_(),n.appendChild(this.contentEl_),n},e.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,t.prototype.dispose.call(this)},e.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=c.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},e.prototype.formatTime_=function(time){return Yr(time)},e.prototype.updateFormattedTime_=function(time){var t=this.formatTime_(time);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},e.prototype.updateContent=function(t){},e}(Ee);Xr.prototype.labelText_="Time",Xr.prototype.controlText_="Time",Ee.registerComponent("TimeDisplay",Xr);var Jr=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return o.on(r,"ended",o.handleEnded),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-current-time"},e.prototype.updateContent=function(t){var time=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(time)},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},e}(Xr);Jr.prototype.labelText_="Current Time",Jr.prototype.controlText_="Current Time",Ee.registerComponent("CurrentTimeDisplay",Jr);var Qr=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return o.on(r,"durationchange",o.updateContent),o.on(r,"loadedmetadata",o.throttledUpdateContent),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-duration"},e.prototype.updateContent=function(t){var e=this.player_.duration();e&&this.duration_!==e&&(this.duration_=e,this.updateFormattedTime_(e))},e}(Xr);Qr.prototype.labelText_="Duration",Qr.prototype.controlText_="Duration",Ee.registerComponent("DurationDisplay",Qr);var Zr=function(t){function e(){return W(this,e),K(this,t.apply(this,arguments))}return U(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"
/
"})},e}(Ee);Ee.registerComponent("TimeDivider",Zr);var tn=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return o.on(r,"durationchange",o.throttledUpdateContent),o.on(r,"ended",o.handleEnded),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-remaining-time"},e.prototype.formatTime_=function(time){return"-"+t.prototype.formatTime_.call(this,time)},e.prototype.updateContent=function(t){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(0)},e}(Xr);tn.prototype.labelText_="Remaining Time",tn.prototype.controlText_="Remaining Time",Ee.registerComponent("RemainingTimeDisplay",tn);var en=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return o.updateShowing(),o.on(o.player(),"durationchange",o.updateShowing),o}return U(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=pt("div",{className:"vjs-live-display",innerHTML:''+this.localize("Stream Type")+" "+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},e.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},e.prototype.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},e}(Ee);Ee.registerComponent("LiveDisplay",en);var rn=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return o.bar=o.getChild(o.options_.barName),o.vertical(!!o.options_.vertical),o.enable(),o}return U(e,t),e.prototype.enabled=function(){return this.enabled_},e.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},e.prototype.disable=function(){if(this.enabled()){var t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},e.prototype.createEl=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.className=r.className+" vjs-slider",r=J({tabIndex:0},r),n=J({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),t.prototype.createEl.call(this,e,r,n)},e.prototype.handleMouseDown=function(t){var e=this.bar.el_.ownerDocument;"mousedown"===t.type&&t.preventDefault(),"touchstart"!==t.type||N||t.preventDefault(),St(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(e,"mousemove",this.handleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchmove",this.handleMouseMove),this.on(e,"touchend",this.handleMouseUp),this.handleMouseMove(t)},e.prototype.handleMouseMove=function(t){},e.prototype.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;wt(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},e.prototype.update=function(){if(this.el_){var progress=this.getPercent(),t=this.bar;if(t){("number"!=typeof progress||progress!=progress||progress<0||progress===1/0)&&(progress=0);var e=(100*progress).toFixed(2)+"%",style=t.el().style;return this.vertical()?style.height=e:style.width=e,progress}}},e.prototype.calculateDistance=function(t){var e=Pt(this.el_,t);return this.vertical()?e.y:e.x},e.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},e.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},e.prototype.vertical=function(t){if(void 0===t)return this.vertical_||!1;this.vertical_=!!t,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},e}(Ee);Ee.registerComponent("Slider",rn);var nn=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return o.partEls_=[],o.on(r,"progress",o.update),o}return U(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+": 0%"})},e.prototype.dispose=function(){this.partEls_=null,t.prototype.dispose.call(this)},e.prototype.update=function(t){var e=this.player_.buffered(),r=this.player_.duration(),n=this.player_.bufferedEnd(),o=this.partEls_,l=function(time,t){var e=time/t||0;return 100*(e>=1?1:e)+"%"};this.el_.style.width=l(n,r);for(var i=0;ie.length;f--)this.el_.removeChild(o[f-1]);o.length=e.length},e}(Ee);Ee.registerComponent("LoadProgressBar",nn);var on=function(t){function e(){return W(this,e),K(this,t.apply(this,arguments))}return U(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},e.prototype.update=function(t,e,content){var r=xt(this.el_),n=xt(this.player_.el()),o=t.width*e;if(n&&r){var l=t.left-n.left+o,c=t.width-o+(n.right-t.right),h=r.width/2;lr.width&&(h=r.width),this.el_.style.right="-"+h+"px",ft(this.el_,content)}},e}(Ee);Ee.registerComponent("TimeTooltip",on);var sn=function(t){function e(){return W(this,e),K(this,t.apply(this,arguments))}return U(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:''+this.localize("Progress")+": 0%"})},e.prototype.update=function(t,e){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var time=r.player_.scrubbing()?r.player_.getCache().currentTime:r.player_.currentTime(),content=Yr(time,r.player_.duration()),n=r.getChild("timeTooltip");n&&n.update(t,e,content)}))},e}(Ee);sn.prototype.options_={children:[]},L&&!(L>8)||S||x||sn.prototype.options_.children.push("timeTooltip"),Ee.registerComponent("PlayProgressBar",sn);var an=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return o.update=ce(le(o,o.update),25),o}return U(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},e.prototype.update=function(t,e){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var n=r.player_.duration(),content=Yr(e*n,n);r.el_.style.left=t.width*e+"px",r.getChild("timeTooltip").update(t,e,content)}))},e}(Ee);an.prototype.options_={children:["timeTooltip"]},Ee.registerComponent("MouseTimeDisplay",an);var ln=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return o.setEventHandlers_(),o}return U(e,t),e.prototype.setEventHandlers_=function(){var t=this;this.update=ce(le(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],(function(){t.clearInterval(t.updateInterval),t.updateInterval=t.setInterval((function(){t.requestAnimationFrame((function(){t.update()}))}),30)})),this.on(this.player_,["ended","pause","waiting"],(function(){t.clearInterval(t.updateInterval)})),this.on(this.player_,["timeupdate","ended"],this.update)},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},e.prototype.update_=function(t,e){var r=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*e).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Yr(t,r),Yr(r,r)],"{1} of {2}")),this.bar.update(xt(this.el_),e)},e.prototype.update=function(e){var r=t.prototype.update.call(this);return this.update_(this.getCurrentTime_(),r),r},e.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},e.prototype.handleEnded=function(t){this.update_(this.player_.duration(),1)},e.prototype.getPercent=function(){var t=this.getCurrentTime_()/this.player_.duration();return t>=1?1:t},e.prototype.handleMouseDown=function(e){Dt(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),t.prototype.handleMouseDown.call(this,e))},e.prototype.handleMouseMove=function(t){if(Dt(t)){var e=this.calculateDistance(t)*this.player_.duration();e===this.player_.duration()&&(e-=.1),this.player_.currentTime(e)}},e.prototype.enable=function(){t.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},e.prototype.disable=function(){t.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},e.prototype.handleMouseUp=function(e){t.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&Fe(this.player_.play())},e.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},e.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},e.prototype.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.handleAction(e)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e}(rn);ln.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},L&&!(L>8)||S||x||ln.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),ln.prototype.playerEvent="timeupdate",Ee.registerComponent("SeekBar",ln);var cn=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return o.handleMouseMove=ce(le(o,o.handleMouseMove),25),o.throttledHandleMouseSeek=ce(le(o,o.handleMouseSeek),25),o.enable(),o}return U(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},e.prototype.handleMouseMove=function(t){var e=this.getChild("seekBar");if(e){var r=e.getChild("mouseTimeDisplay"),n=e.el(),o=xt(n),l=Pt(n,t).x;l>1?l=1:l<0&&(l=0),r&&r.update(o,l)}},e.prototype.handleMouseSeek=function(t){var e=this.getChild("seekBar");e&&e.handleMouseMove(t)},e.prototype.enabled=function(){return this.enabled_},e.prototype.disable=function(){this.children().forEach((function(t){return t.disable&&t.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},e.prototype.enable=function(){this.children().forEach((function(t){return t.enable&&t.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument,r=this.getChild("seekBar");r&&r.handleMouseDown(t),this.on(e,"mousemove",this.throttledHandleMouseSeek),this.on(e,"touchmove",this.throttledHandleMouseSeek),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument,r=this.getChild("seekBar");r&&r.handleMouseUp(t),this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e}(Ee);cn.prototype.options_={children:["seekBar"]},Ee.registerComponent("ProgressControl",cn);var un=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return o.on(r,"fullscreenchange",o.handleFullscreenChange),!1===c[Pe.fullscreenEnabled]&&o.disable(),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},e.prototype.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(Wr);un.prototype.controlText_="Fullscreen",Ee.registerComponent("FullscreenToggle",un);var hn=function(t){function e(){return W(this,e),K(this,t.apply(this,arguments))}return U(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},e}(Ee);Ee.registerComponent("VolumeLevel",hn);var pn=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return o.on("slideractive",o.updateLastVolume_),o.on(r,"volumechange",o.updateARIAAttributes),r.ready((function(){return o.updateARIAAttributes()})),o}return U(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},e.prototype.handleMouseDown=function(e){Dt(e)&&t.prototype.handleMouseDown.call(this,e)},e.prototype.handleMouseMove=function(t){Dt(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},e.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},e.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},e.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},e.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},e.prototype.updateARIAAttributes=function(t){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},e.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},e.prototype.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",(function(){0===t.player_.volume()&&t.player_.lastVolume_(e)}))},e}(rn);pn.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},pn.prototype.playerEvent="volumechange",Ee.registerComponent("VolumeBar",pn);var dn=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W(this,e),n.vertical=n.vertical||!1,(void 0===n.volumeBar||Z(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical);var o=K(this,t.call(this,r,n));return function(t,e){e.tech_&&!e.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",(function(){e.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")}))}(o,r),o.throttledHandleMouseMove=ce(le(o,o.handleMouseMove),25),o.on("mousedown",o.handleMouseDown),o.on("touchstart",o.handleMouseDown),o.on(o.volumeBar,["focus","slideractive"],(function(){o.volumeBar.addClass("vjs-slider-active"),o.addClass("vjs-slider-active"),o.trigger("slideractive")})),o.on(o.volumeBar,["blur","sliderinactive"],(function(){o.volumeBar.removeClass("vjs-slider-active"),o.removeClass("vjs-slider-active"),o.trigger("sliderinactive")})),o}return U(e,t),e.prototype.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument;this.on(e,"mousemove",this.throttledHandleMouseMove),this.on(e,"touchmove",this.throttledHandleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseMove),this.off(e,"touchmove",this.throttledHandleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},e}(Ee);dn.prototype.options_={children:["volumeBar"]},Ee.registerComponent("VolumeControl",dn);var fn=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return function(t,e){e.tech_&&!e.tech_.featuresMuteControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",(function(){e.tech_.featuresMuteControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")}))}(o,r),o.on(r,["loadstart","volumechange"],o.update),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){var e=this.player_.volume(),r=this.player_.lastVolume_();if(0===e){var n=r<.1?.1:r;this.player_.volume(n),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},e.prototype.update=function(t){this.updateIcon_(),this.updateControlText_()},e.prototype.updateIcon_=function(){var t=this.player_.volume(),e=3;S&&this.player_.muted(this.player_.tech_.el_.muted),0===t||this.player_.muted()?e=0:t<.33?e=1:t<.67&&(e=2);for(var i=0;i<4;i++)mt(this.el_,"vjs-vol-"+i);gt(this.el_,"vjs-vol-"+e)},e.prototype.updateControlText_=function(){var text=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==text&&this.controlText(text)},e}(Wr);fn.prototype.controlText_="Mute",Ee.registerComponent("MuteToggle",fn);var vn=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W(this,e),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||Z(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline);var o=K(this,t.call(this,r,n));return o.on(r,["loadstart"],o.volumePanelState_),o.on(o.volumeControl,["slideractive"],o.sliderActive_),o.on(o.volumeControl,["sliderinactive"],o.sliderInactive_),o}return U(e,t),e.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},e.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},e.prototype.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},e.prototype.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},e}(Ee);vn.prototype.options_={children:["muteToggle","volumeControl"]},Ee.registerComponent("VolumePanel",vn);var yn=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return n&&(o.menuButton_=n.menuButton),o.focusedChild_=-1,o.on("keydown",o.handleKeyPress),o}return U(e,t),e.prototype.addItem=function(component){this.addChild(component),component.on("click",le(this,(function(t){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==component.name()&&this.menuButton_.focus())})))},e.prototype.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=pt(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var r=t.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return r.appendChild(this.contentEl_),Jt(r,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),r},e.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},e.prototype.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},e.prototype.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},e.prototype.focus=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.children().slice();e.length&&e[0].className&&/vjs-menu-title/.test(e[0].className)&&e.shift(),e.length>0&&(t<0?t=0:t>=e.length&&(t=e.length-1),this.focusedChild_=t,e[t].el_.focus())},e}(Ee);Ee.registerComponent("Menu",yn);var gn=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W(this,e);var o=K(this,t.call(this,r,n));o.menuButton_=new Wr(r,n),o.menuButton_.controlText(o.controlText_),o.menuButton_.el_.setAttribute("aria-haspopup","true");var l=Wr.prototype.buildCSSClass();return o.menuButton_.el_.className=o.buildCSSClass()+" "+l,o.menuButton_.removeClass("vjs-control"),o.addChild(o.menuButton_),o.update(),o.enabled_=!0,o.on(o.menuButton_,"tap",o.handleClick),o.on(o.menuButton_,"click",o.handleClick),o.on(o.menuButton_,"focus",o.handleFocus),o.on(o.menuButton_,"blur",o.handleBlur),o.on("keydown",o.handleSubmenuKeyPress),o}return U(e,t),e.prototype.update=function(){var menu=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=menu,this.addChild(menu),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},e.prototype.createMenu=function(){var menu=new yn(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var title=pt("li",{className:"vjs-menu-title",innerHTML:Ce(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,menu.children_.unshift(title),vt(title,menu.contentEl())}if(this.items=this.createItems(),this.items)for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(text,t)},e.prototype.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",le(this,(function(t){this.unpressButton(),this.el_.blur()}))),this.buttonPressed_?this.unpressButton():this.pressButton()},e.prototype.focus=function(){this.menuButton_.focus()},e.prototype.blur=function(){this.menuButton_.blur()},e.prototype.handleFocus=function(){Jt(c,"keydown",le(this,this.handleKeyPress))},e.prototype.handleBlur=function(){Qt(c,"keydown",le(this,this.handleKeyPress))},e.prototype.handleKeyPress=function(t){27===t.which||9===t.which?(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus())):38!==t.which&&40!==t.which||this.buttonPressed_||(this.pressButton(),t.preventDefault())},e.prototype.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus()))},e.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),S&&ut())return;this.menu.focus()}},e.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},e.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},e.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},e}(Ee);Ee.registerComponent("MenuButton",gn);var mn=function(t){function e(r,n){W(this,e);var o=n.tracks,l=K(this,t.call(this,r,n));if(l.items.length<=1&&l.hide(),!o)return K(l);var c=le(l,l.update);return o.addEventListener("removetrack",c),o.addEventListener("addtrack",c),l.player_.on("ready",c),l.player_.on("dispose",(function(){o.removeEventListener("removetrack",c),o.removeEventListener("addtrack",c)})),l}return U(e,t),e}(gn);Ee.registerComponent("TrackButton",mn);var _n=function(t){function e(r,n){W(this,e);var o=K(this,t.call(this,r,n));return o.selectable=n.selectable,o.isSelected_=n.selected||!1,o.multiSelectable=n.multiSelectable,o.selected(o.isSelected_),o.selectable?o.multiSelectable?o.el_.setAttribute("role","menuitemcheckbox"):o.el_.setAttribute("role","menuitemradio"):o.el_.setAttribute("role","menuitem"),o}return U(e,t),e.prototype.createEl=function(e,r,n){return this.nonIconControl=!0,t.prototype.createEl.call(this,"li",J({className:"vjs-menu-item",innerHTML:''+this.localize(this.options_.label)+"",tabIndex:-1},r),n)},e.prototype.handleClick=function(t){this.selected(!0)},e.prototype.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},e}(Dr);Ee.registerComponent("MenuItem",_n);var bn=function(t){function e(r,n){W(this,e);var track=n.track,o=r.textTracks();n.label=track.label||track.language||"Unknown",n.selected="showing"===track.mode;var h=K(this,t.call(this,r,n));h.track=track;var d=function(){for(var t=arguments.length,e=Array(t),r=0;r-1?"showing"!==track.mode&&(track.mode="showing"):"disabled"!==track.mode&&(track.mode="disabled")}},e.prototype.handleTracksChange=function(t){var e="showing"===this.track.mode;e!==this.isSelected_&&this.selected(e)},e.prototype.handleSelectedLanguageChange=function(t){if("showing"===this.track.mode){var e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},e.prototype.dispose=function(){this.track=null,t.prototype.dispose.call(this)},e}(_n);Ee.registerComponent("TextTrackMenuItem",bn);var Tn=function(t){function e(r,n){return W(this,e),n.track={player:r,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,K(this,t.call(this,r,n))}return U(e,t),e.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),r=!0,i=0,n=e.length;i-1&&"showing"===track.mode){r=!1;break}}r!==this.isSelected_&&this.selected(r)},e.prototype.handleSelectedLanguageChange=function(t){for(var e=this.player().textTracks(),r=!0,i=0,n=e.length;i-1&&"showing"===track.mode){r=!1;break}}r&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(bn);Ee.registerComponent("OffTextTrackMenuItem",Tn);var Cn=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return W(this,e),n.tracks=r.textTracks(),K(this,t.call(this,r,n))}return U(e,t),e.prototype.createItems=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bn,label=void 0;this.label_&&(label=this.label_+" off"),t.push(new Tn(this.player_,{kinds:this.kinds_,kind:this.kind_,label:label})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i-1){var n=new e(this.player_,{track:track,selectable:!0,multiSelectable:!1});n.addClass("vjs-"+track.kind+"-menu-item"),t.push(n)}}return t},e}(mn);Ee.registerComponent("TextTrackButton",Cn);var kn=function(t){function e(r,n){W(this,e);var track=n.track,o=n.cue,l=r.currentTime();n.selectable=!0,n.multiSelectable=!1,n.label=o.text,n.selected=o.startTime<=l&&l=0;i--){var track=t[i];if(track.kind===this.kind_)return track}},e.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Ce(this.kind_))},e.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},e.prototype.createItems=function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var i=0,r=e.length;i