aboutsummaryrefslogtreecommitdiff
path: root/assets/netcut/lib/videojs/alt/video.core.min.js
diff options
context:
space:
mode:
authorAndreas Hubel2020-06-07 21:41:40 +0200
committerAndreas Hubel2020-06-07 21:41:40 +0200
commita66c79184091efdac09ee31a3778c6fc850dbbda (patch)
treed0c8f474548d8699411b7e33ee3fde62029c13da /assets/netcut/lib/videojs/alt/video.core.min.js
parentd0a9d8b2b0d28dbef209c7cbcbfd56eaeac24d9b (diff)
add netcut assets to repo
submodules are propably to complicated for deployment.... :-)
Diffstat (limited to 'assets/netcut/lib/videojs/alt/video.core.min.js')
m---------assets/netcut0
-rw-r--r--assets/netcut/lib/videojs/alt/video.core.min.js12
2 files changed, 12 insertions, 0 deletions
diff --git a/assets/netcut b/assets/netcut
deleted file mode 160000
-Subproject 3dcf07d83e57191c79654d97310cbeb494ea52b
diff --git a/assets/netcut/lib/videojs/alt/video.core.min.js b/assets/netcut/lib/videojs/alt/video.core.min.js
new file mode 100644
index 0000000..6918003
--- /dev/null
+++ b/assets/netcut/lib/videojs/alt/video.core.min.js
@@ -0,0 +1,12 @@
+/**
+ * @license
+ * Video.js 7.2.4 <http://videojs.com/>
+ * Copyright Brightcove, Inc. <https://www.brightcove.com/>
+ * Available under Apache License Version 2.0
+ * <https://github.com/videojs/video.js/blob/master/LICENSE>
+ *
+ * Includes vtt.js <https://github.com/mozilla/vtt.js>
+ * Available under Apache License Version 2.0
+ * <https://github.com/mozilla/vtt.js/blob/master/LICENSE>
+ */
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.videojs=e()}(this,function(){var p="7.2.4",t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n,d="undefined"!=typeof window?window:"undefined"!=typeof t?t:"undefined"!=typeof self?self:{},r={},i=Object.freeze({default:r}),o=i&&r||i,s="undefined"!=typeof t?t:"undefined"!=typeof window?window:{};"undefined"!=typeof document?n=document:(n=s["__GLOBAL_DOCUMENT_CACHE@4"])||(n=s["__GLOBAL_DOCUMENT_CACHE@4"]=o);var f=n,a=void 0,l="info",c=[],u=function(t,e){var n=a.levels[l],r=new RegExp("^("+n+")$");if("log"!==t&&e.unshift(t.toUpperCase()+":"),c&&c.push([].concat(e)),e.unshift("VIDEOJS:"),d.console){var i=d.console[t];i||"debug"!==t||(i=d.console.info||d.console.log),i&&n&&r.test(t)&&i[Array.isArray(e)?"apply":"call"](d.console,e)}};(a=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];u("log",e)}).levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:l},a.level=function(t){if("string"==typeof t){if(!a.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');l=t}return l},a.history=function(){return c?[].concat(c):[]},a.history.clear=function(){c&&(c.length=0)},a.history.disable=function(){null!==c&&(c.length=0,c=null)},a.history.enable=function(){null===c&&(c=[])},a.error=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return u("error",e)},a.warn=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return u("warn",e)},a.debug=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return u("debug",e)};var v=a;var y=function(t){for(var e="",n=0;n<arguments.length;n++)e+=t[n].replace(/\n\r?\s*/g,"")+(arguments[n+1]||"");return e},h="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},g=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},m=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)},_=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},b=function(t,e){return t.raw=e,t},T=Object.prototype.toString,C=function(t){return E(t)?Object.keys(t):[]};function k(e,n){C(e).forEach(function(t){return n(e[t],t)})}function w(n){for(var t=arguments.length,e=Array(1<t?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return Object.assign?Object.assign.apply(Object,[n].concat(e)):(e.forEach(function(t){t&&k(t,function(t,e){n[e]=t})}),n)}function E(t){return!!t&&"object"===("undefined"==typeof t?"undefined":h(t))}function S(t){return E(t)&&"[object Object]"===T.call(t)&&t.constructor===Object}function x(t,e){if(!t||!e)return"";if("function"==typeof d.getComputedStyle){var n=d.getComputedStyle(t);return n?n[e]:""}return""}var j=b(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."]);function A(t){return"string"==typeof t&&/\S/.test(t)}function P(t){if(/\s/.test(t))throw new Error("class has illegal whitespace characters")}function M(){return f===d.document}function O(t){return E(t)&&1===t.nodeType}function N(){try{return d.parent!==d.self}catch(t){return!0}}function L(r){return function(t,e){if(!A(t))return f[r](null);A(e)&&(e=f.querySelector(e));var n=O(e)?e:f;return n[r]&&n[r](t)}}function I(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"div",n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],i=f.createElement(t);return Object.getOwnPropertyNames(n).forEach(function(t){var e=n[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(v.warn(y(j,t,e)),i.setAttribute(t,e)):"textContent"===t?D(i,e):i[t]=e}),Object.getOwnPropertyNames(e).forEach(function(t){i.setAttribute(t,e[t])}),r&&et(i,r),i}function D(t,e){return"undefined"==typeof t.textContent?t.innerText=e:t.textContent=e,t}function R(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function F(t,e){return P(e),t.classList?t.classList.contains(e):(n=e,new RegExp("(^|\\s)"+n+"($|\\s)")).test(t.className);var n}function B(t,e){return t.classList?t.classList.add(e):F(t,e)||(t.className=(t.className+" "+e).trim()),t}function H(t,e){return t.classList?t.classList.remove(e):(P(e),t.className=t.className.split(/\s+/).filter(function(t){return t!==e}).join(" ")),t}function V(t,e,n){var r=F(t,e);if("function"==typeof n&&(n=n(t,e)),"boolean"!=typeof n&&(n=!r),n!==r)return n?B(t,e):H(t,e),t}function z(n,r){Object.getOwnPropertyNames(r).forEach(function(t){var e=r[t];null===e||"undefined"==typeof e||!1===e?n.removeAttribute(t):n.setAttribute(t,!0===e?"":e)})}function W(t){var e={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(t&&t.attributes&&0<t.attributes.length)for(var r=t.attributes,i=r.length-1;0<=i;i--){var o=r[i].name,s=r[i].value;"boolean"!=typeof t[o]&&-1===n.indexOf(","+o+",")||(s=null!==s),e[o]=s}return e}function U(t,e){return t.getAttribute(e)}function X(t,e,n){t.setAttribute(e,n)}function q(t,e){t.removeAttribute(e)}function K(){f.body.focus(),f.onselectstart=function(){return!1}}function $(){f.onselectstart=function(){return!0}}function Y(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach(function(t){void 0!==e[t]&&(n[t]=e[t])}),n.height||(n.height=parseFloat(x(t,"height"))),n.width||(n.width=parseFloat(x(t,"width"))),n}}function G(t){var e=void 0;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var n=f.documentElement,r=f.body,i=n.clientLeft||r.clientLeft||0,o=d.pageXOffset||r.scrollLeft,s=e.left+o-i,a=n.clientTop||r.clientTop||0,l=d.pageYOffset||r.scrollTop,c=e.top+l-a;return{left:Math.round(s),top:Math.round(c)}}function J(t,e){var n={},r=G(t),i=t.offsetWidth,o=t.offsetHeight,s=r.top,a=r.left,l=e.pageY,c=e.pageX;return e.changedTouches&&(c=e.changedTouches[0].pageX,l=e.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(s-l+o)/o)),n.x=Math.max(0,Math.min(1,(c-a)/i)),n}function Q(t){return E(t)&&3===t.nodeType}function Z(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function tt(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map(function(t){return"function"==typeof t&&(t=t()),O(t)||Q(t)?t:"string"==typeof t&&/\S/.test(t)?f.createTextNode(t):void 0}).filter(function(t){return t})}function et(e,t){return tt(t).forEach(function(t){return e.appendChild(t)}),e}function nt(t,e){return et(Z(t),e)}function rt(t){return void 0===t.button&&void 0===t.buttons||(0===t.button&&void 0===t.buttons||0===t.button&&1===t.buttons)}var it=L("querySelector"),ot=L("querySelectorAll"),st=Object.freeze({isReal:M,isEl:O,isInFrame:N,createEl:I,textContent:D,prependTo:R,hasClass:F,addClass:B,removeClass:H,toggleClass:V,setAttributes:z,getAttributes:W,getAttribute:U,setAttribute:X,removeAttribute:q,blockTextSelection:K,unblockTextSelection:$,getBoundingClientRect:Y,findPosition:G,getPointerPosition:J,isTextNode:Q,emptyEl:Z,normalizeContent:tt,appendContent:et,insertContent:nt,isSingleLeftClick:rt,$:it,$$:ot}),at=1;function lt(){return at++}var ct={},ut="vdata"+(new Date).getTime();function ht(t){var e=t[ut];return e||(e=t[ut]=lt()),ct[e]||(ct[e]={}),ct[e]}function pt(t){var e=t[ut];return!!e&&!!Object.getOwnPropertyNames(ct[e]).length}function dt(e){var t=e[ut];if(t){delete ct[t];try{delete e[ut]}catch(t){e.removeAttribute?e.removeAttribute(ut):e[ut]=null}}}function ft(t,e){var n=ht(t);0===n.handlers[e].length&&(delete n.handlers[e],t.removeEventListener?t.removeEventListener(e,n.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&dt(t)}function vt(e,n,t,r){t.forEach(function(t){e(n,t,r)})}function yt(t){function e(){return!0}function n(){return!1}if(!t||!t.isPropagationStopped){var r=t||d.event;for(var i in t={},r)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&("returnValue"===i&&r.preventDefault||(t[i]=r[i]));if(t.target||(t.target=t.srcElement||f),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){r.preventDefault&&r.preventDefault(),t.returnValue=!1,r.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),t.cancelBubble=!0,r.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=n,null!==t.clientX&&void 0!==t.clientX){var o=f.documentElement,s=f.body;t.pageX=t.clientX+(o&&o.scrollLeft||s&&s.scrollLeft||0)-(o&&o.clientLeft||s&&s.clientLeft||0),t.pageY=t.clientY+(o&&o.scrollTop||s&&s.scrollTop||0)-(o&&o.clientTop||s&&s.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 gt=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){gt=!0}});d.addEventListener("test",null,t),d.removeEventListener("test",null,t)}catch(t){}}();var mt=["touchstart","touchmove"];function _t(s,t,e){if(Array.isArray(t))return vt(_t,s,t,e);var a=ht(s);if(a.handlers||(a.handlers={}),a.handlers[t]||(a.handlers[t]=[]),e.guid||(e.guid=lt()),a.handlers[t].push(e),a.dispatcher||(a.disabled=!1,a.dispatcher=function(t,e){if(!a.disabled){t=yt(t);var n=a.handlers[t.type];if(n)for(var r=n.slice(0),i=0,o=r.length;i<o&&!t.isImmediatePropagationStopped();i++)try{r[i].call(s,t,e)}catch(t){v.error(t)}}}),1===a.handlers[t].length)if(s.addEventListener){var n=!1;gt&&-1<mt.indexOf(t)&&(n={passive:!0}),s.addEventListener(t,a.dispatcher,n)}else s.attachEvent&&s.attachEvent("on"+t,a.dispatcher)}function bt(t,e,n){if(pt(t)){var r=ht(t);if(r.handlers){if(Array.isArray(e))return vt(bt,t,e,n);var i=function(t,e){r.handlers[e]=[],ft(t,e)};if(void 0!==e){var o=r.handlers[e];if(o)if(n){if(n.guid)for(var s=0;s<o.length;s++)o[s].guid===n.guid&&o.splice(s--,1);ft(t,e)}else i(t,e)}else for(var a in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},a)&&i(t,a)}}}function Tt(t,e,n){var r=pt(t)?ht(t):{},i=t.parentNode||t.ownerDocument;if("string"==typeof e?e={type:e,target:t}:e.target||(e.target=t),e=yt(e),r.dispatcher&&r.dispatcher.call(t,e,n),i&&!e.isPropagationStopped()&&!0===e.bubbles)Tt.call(null,i,e,n);else if(!i&&!e.defaultPrevented){var o=ht(e.target);e.target[e.type]&&(o.disabled=!0,"function"==typeof e.target[e.type]&&e.target[e.type](),o.disabled=!1)}return!e.defaultPrevented}function Ct(e,n,r){if(Array.isArray(n))return vt(Ct,e,n,r);var t=function t(){bt(e,n,t),r.apply(this,arguments)};t.guid=r.guid=r.guid||lt(),_t(e,n,t)}var kt=Object.freeze({fixEvent:yt,on:_t,off:bt,trigger:Tt,one:Ct}),wt=!1,Et=void 0,St=function(){if(M()&&!1!==Et.options.autoSetup){var t=Array.prototype.slice.call(f.getElementsByTagName("video")),e=Array.prototype.slice.call(f.getElementsByTagName("audio")),n=Array.prototype.slice.call(f.getElementsByTagName("video-js")),r=t.concat(e,n);if(r&&0<r.length)for(var i=0,o=r.length;i<o;i++){var s=r[i];if(!s||!s.getAttribute){xt(1);break}void 0===s.player&&null!==s.getAttribute("data-setup")&&Et(s)}else wt||xt(1)}};function xt(t,e){e&&(Et=e),d.setTimeout(St,t)}M()&&"complete"===f.readyState?wt=!0:Ct(d,"load",function(){wt=!0});var jt=function(t){var e=f.createElement("style");return e.className=t,e},At=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e},Pt=function(t,e,n){e.guid||(e.guid=lt());var r=function(){return e.apply(t,arguments)};return r.guid=n?n+"_"+e.guid:e.guid,r},Mt=function(e,n){var r=Date.now();return function(){var t=Date.now();n<=t-r&&(e.apply(void 0,arguments),r=t)}},Ot=function(r,i,o){var s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:d,a=void 0,t=function(){var t=this,e=arguments,n=function(){n=a=null,o||r.apply(t,e)};!a&&o&&r.apply(t,e),s.clearTimeout(a),a=s.setTimeout(n,i)};return t.cancel=function(){s.clearTimeout(a),a=null},t},Nt=function(){};Nt.prototype.allowedEvents_={},Nt.prototype.addEventListener=Nt.prototype.on=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},_t(this,t,e),this.addEventListener=n},Nt.prototype.removeEventListener=Nt.prototype.off=function(t,e){bt(this,t,e)},Nt.prototype.one=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},Ct(this,t,e),this.addEventListener=n},Nt.prototype.dispatchEvent=Nt.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=yt(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),Tt(this,t)};var Lt=void 0;Nt.prototype.queueTrigger=function(t){var e=this;Lt||(Lt=new Map);var n=t.type||t,r=Lt.get(this);r||(r=new Map,Lt.set(this,r));var i=r.get(n);r.delete(n),d.clearTimeout(i);var o=d.setTimeout(function(){0===r.size&&(r=null,Lt.delete(e)),e.trigger(t)},0);r.set(n,o)};var It=function(e){return e instanceof Nt||!!e.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"==typeof e[t]})},Dt=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},Rt=function(t){if(!t.nodeName&&!It(t))throw new Error("Invalid target; must be a DOM node or evented object.")},Ft=function(t){if(!Dt(t))throw new Error("Invalid event type; must be a non-empty string or array.")},Bt=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},Ht=function(t,e){var n=e.length<3||e[0]===t||e[0]===t.eventBusEl_,r=void 0,i=void 0,o=void 0;return n?(r=t.eventBusEl_,3<=e.length&&e.shift(),i=e[0],o=e[1]):(r=e[0],i=e[1],o=e[2]),Rt(r),Ft(i),Bt(o),{isTargetingSelf:n,target:r,type:i,listener:o=Pt(t,o)}},Vt=function(t,e,n,r){Rt(t),t.nodeName?kt[e](t,n,r):t[e](n,r)},zt={on:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=Ht(this,n),o=i.isTargetingSelf,s=i.target,a=i.type,l=i.listener;if(Vt(s,"on",a,l),!o){var c=function(){return t.off(s,a,l)};c.guid=l.guid;var u=function(){return t.off("dispose",c)};u.guid=l.guid,Vt(this,"on","dispose",c),Vt(s,"on","dispose",u)}},one:function(){for(var i=this,t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Ht(this,e),o=r.isTargetingSelf,s=r.target,a=r.type,l=r.listener;if(o)Vt(s,"one",a,l);else{var c=function t(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];i.off(s,a,t),l.apply(null,n)};c.guid=l.guid,Vt(s,"one",a,c)}},off:function(t,e,n){if(!t||Dt(t))bt(this.eventBusEl_,t,e);else{var r=t,i=e;Rt(r),Ft(i),Bt(n),n=Pt(this,n),this.off("dispose",n),r.nodeName?(bt(r,i,n),bt(r,"dispose",n)):It(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(t,e){return Tt(this.eventBusEl_,t,e)}};function Wt(t){var e=(1<arguments.length&&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_=I("span",{className:"vjs-event-bus"});return w(t,zt),t.on("dispose",function(){t.off(),d.setTimeout(function(){t.eventBusEl_=null},0)}),t}var Ut={state:{},setState:function(t){var n=this;"function"==typeof t&&(t=t());var r=void 0;return k(t,function(t,e){n.state[e]!==t&&((r=r||{})[e]={from:n.state[e],to:t}),n.state[e]=t}),r&&It(this)&&this.trigger({changes:r,type:"statechanged"}),r}};function Xt(t,e){return w(t,Ut),t.state=w({},t.state,e),"function"==typeof t.handleStateChanged&&It(t)&&t.on("statechanged",t.handleStateChanged),t}function qt(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function Kt(){for(var n={},t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.forEach(function(t){t&&k(t,function(t,e){S(t)?(S(n[e])||(n[e]={}),n[e]=Kt(n[e],t)):n[e]=t})}),n}var $t=function(){function c(t,e,n){if(g(this,c),!t&&this.play?this.player_=t=this:this.player_=t,this.options_=Kt({},this.options_),e=this.options_=Kt(this.options_,e),this.id_=e.id||e.el&&e.el.id,!this.id_){var r=t&&t.id&&t.id()||"no_player";this.id_=r+"_component_"+lt()}this.name_=e.name||null,e.el?this.el_=e.el:!1!==e.createEl&&(this.el_=this.createEl()),!1!==e.evented&&Wt(this,{eventBusKey:this.el_?"el_":null}),Xt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},!(this.childNameIndex_={})!==e.initChildren&&this.initChildren(),this.ready(n),!1!==e.reportTouchActivity&&this.enableTouchActivity()}return c.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var t=this.children_.length-1;0<=t;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),dt(this.el_),this.el_=null),this.player_=null},c.prototype.player=function(){return this.player_},c.prototype.options=function(t){return v.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t&&(this.options_=Kt(this.options_,t)),this.options_},c.prototype.el=function(){return this.el_},c.prototype.createEl=function(t,e,n){return I(t,e,n)},c.prototype.localize=function(t,i){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t,n=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),o=r&&r[n],s=n&&n.split("-")[0],a=r&&r[s],l=e;return o&&o[t]?l=o[t]:a&&a[t]&&(l=a[t]),i&&(l=l.replace(/\{(\d+)\}/g,function(t,e){var n=i[e-1],r=n;return"undefined"==typeof n&&(r=t),r})),l},c.prototype.contentEl=function(){return this.contentEl_||this.el_},c.prototype.id=function(){return this.id_},c.prototype.name=function(){return this.name_},c.prototype.children=function(){return this.children_},c.prototype.getChildById=function(t){return this.childIndex_[t]},c.prototype.getChild=function(t){if(t)return t=qt(t),this.childNameIndex_[t]},c.prototype.addChild=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.children_.length,r=void 0,i=void 0;if("string"==typeof t){i=qt(t);var o=e.componentClass||i;e.name=i;var s=c.getComponent(o);if(!s)throw new Error("Component "+o+" does not exist");if("function"!=typeof s)return null;r=new s(this.player_||this,e)}else r=t;if(this.children_.splice(n,0,r),"function"==typeof r.id&&(this.childIndex_[r.id()]=r),(i=i||r.name&&qt(r.name()))&&(this.childNameIndex_[i]=r),"function"==typeof r.el&&r.el()){var a=this.contentEl().children[n]||null;this.contentEl().insertBefore(r.el(),a)}return r},c.prototype.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,n=this.children_.length-1;0<=n;n--)if(this.children_[n]===t){e=!0,this.children_.splice(n,1);break}if(e){this.childIndex_[t.id()]=null,this.childNameIndex_[t.name()]=null;var r=t.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},c.prototype.initChildren=function(){var i=this,r=this.options_.children;if(r){var o=this.options_,t=void 0,n=c.getComponent("Tech");(t=Array.isArray(r)?r:Object.keys(r)).concat(Object.keys(this.options_).filter(function(e){return!t.some(function(t){return"string"==typeof t?e===t:e===t.name})})).map(function(t){var e=void 0,n=void 0;return"string"==typeof t?n=r[e=t]||i.options_[e]||{}:(e=t.name,n=t),{name:e,opts:n}}).filter(function(t){var e=c.getComponent(t.opts.componentClass||qt(t.name));return e&&!n.isTech(e)}).forEach(function(t){var e=t.name,n=t.opts;if(void 0!==o[e]&&(n=o[e]),!1!==n){!0===n&&(n={}),n.playerOptions=i.options_.playerOptions;var r=i.addChild(e,n);r&&(i[e]=r)}})}},c.prototype.buildCSSClass=function(){return""},c.prototype.ready=function(t){var e=1<arguments.length&&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))},c.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var t=this.readyQueue_;this.readyQueue_=[],t&&0<t.length&&t.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)},c.prototype.$=function(t,e){return it(t,e||this.contentEl())},c.prototype.$$=function(t,e){return ot(t,e||this.contentEl())},c.prototype.hasClass=function(t){return F(this.el_,t)},c.prototype.addClass=function(t){B(this.el_,t)},c.prototype.removeClass=function(t){H(this.el_,t)},c.prototype.toggleClass=function(t,e){V(this.el_,t,e)},c.prototype.show=function(){this.removeClass("vjs-hidden")},c.prototype.hide=function(){this.addClass("vjs-hidden")},c.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},c.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},c.prototype.getAttribute=function(t){return U(this.el_,t)},c.prototype.setAttribute=function(t,e){X(this.el_,t,e)},c.prototype.removeAttribute=function(t){q(this.el_,t)},c.prototype.width=function(t,e){return this.dimension("width",t,e)},c.prototype.height=function(t,e){return this.dimension("height",t,e)},c.prototype.dimensions=function(t,e){this.width(t,!0),this.height(e)},c.prototype.dimension=function(t,e,n){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(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[t],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+qt(t)],10)},c.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 d.getComputedStyle){var n=d.getComputedStyle(this.el_);e=n.getPropertyValue(t)||n[t]}if(0===(e=parseFloat(e))){var r="offset"+qt(t);e=this.el_[r]}return e},c.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},c.prototype.currentWidth=function(){return this.currentDimension("width")},c.prototype.currentHeight=function(){return this.currentDimension("height")},c.prototype.focus=function(){this.el_.focus()},c.prototype.blur=function(){this.el_.blur()},c.prototype.emitTapEvents=function(){var e=0,r=null,i=void 0;this.on("touchstart",function(t){1===t.touches.length&&(r={pageX:t.touches[0].pageX,pageY:t.touches[0].pageY},e=(new Date).getTime(),i=!0)}),this.on("touchmove",function(t){if(1<t.touches.length)i=!1;else if(r){var e=t.touches[0].pageX-r.pageX,n=t.touches[0].pageY-r.pageY;10<Math.sqrt(e*e+n*n)&&(i=!1)}});var t=function(){i=!1};this.on("touchleave",t),this.on("touchcancel",t),this.on("touchend",function(t){!(r=null)===i&&((new Date).getTime()-e<200&&(t.preventDefault(),this.trigger("tap")))})},c.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e=Pt(this.player(),this.player().reportUserActivity),n=void 0;this.on("touchstart",function(){e(),this.clearInterval(n),n=this.setInterval(e,250)});var t=function(t){e(),this.clearInterval(n)};this.on("touchmove",e),this.on("touchend",t),this.on("touchcancel",t)}},c.prototype.setTimeout=function(t,e){var n,r,i=this;return t=Pt(this,t),n=d.setTimeout(function(){i.off("dispose",r),t()},e),(r=function(){return i.clearTimeout(n)}).guid="vjs-timeout-"+n,this.on("dispose",r),n},c.prototype.clearTimeout=function(t){d.clearTimeout(t);var e=function(){};return e.guid="vjs-timeout-"+t,this.off("dispose",e),t},c.prototype.setInterval=function(t,e){var n=this;t=Pt(this,t);var r=d.setInterval(t,e),i=function(){return n.clearInterval(r)};return i.guid="vjs-interval-"+r,this.on("dispose",i),r},c.prototype.clearInterval=function(t){d.clearInterval(t);var e=function(){};return e.guid="vjs-interval-"+t,this.off("dispose",e),t},c.prototype.requestAnimationFrame=function(t){var e,n,r=this;return this.supportsRaf_?(t=Pt(this,t),e=d.requestAnimationFrame(function(){r.off("dispose",n),t()}),(n=function(){return r.cancelAnimationFrame(e)}).guid="vjs-raf-"+e,this.on("dispose",n),e):this.setTimeout(t,1e3/60)},c.prototype.cancelAnimationFrame=function(t){if(this.supportsRaf_){d.cancelAnimationFrame(t);var e=function(){};return e.guid="vjs-raf-"+t,this.off("dispose",e),t}return this.clearTimeout(t)},c.registerComponent=function(t,e){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var n=c.getComponent("Tech"),r=n&&n.isTech(e),i=c===e||c.prototype.isPrototypeOf(e.prototype);if(r||!i){var o=void 0;throw o=r?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+o+".")}t=qt(t),c.components_||(c.components_={});var s=c.getComponent("Player");if("Player"===t&&s&&s.players){var a=s.players,l=Object.keys(a);if(a&&0<l.length&&l.map(function(t){return a[t]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return c.components_[t]=e},c.getComponent=function(t){if(t)return t=qt(t),c.components_&&c.components_[t]?c.components_[t]:void 0},c}();$t.prototype.supportsRaf_="function"==typeof d.requestAnimationFrame&&"function"==typeof d.cancelAnimationFrame,$t.registerComponent("Component",$t);var Yt,Gt,Jt,Qt,Zt=d.navigator&&d.navigator.userAgent||"",te=/AppleWebKit\/([\d.]+)/i.exec(Zt),ee=te?parseFloat(te.pop()):null,ne=/iPad/i.test(Zt),re=/iPhone/i.test(Zt)&&!ne,ie=/iPod/i.test(Zt),oe=re||ne||ie,se=(Yt=Zt.match(/OS (\d+)_/i))&&Yt[1]?Yt[1]:null,ae=/Android/i.test(Zt),le=function(){var t=Zt.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);return e&&n?parseFloat(t[1]+"."+t[2]):e||null}(),ce=ae&&le<5&&ee<537,ue=/Firefox/i.test(Zt),he=/Edge/i.test(Zt),pe=!he&&(/Chrome/i.test(Zt)||/CriOS/i.test(Zt)),de=(Gt=Zt.match(/(Chrome|CriOS)\/(\d+)/))&&Gt[2]?parseFloat(Gt[2]):null,fe=(Jt=/MSIE\s(\d+)\.\d/.exec(Zt),!(Qt=Jt&&parseFloat(Jt[1]))&&/Trident\/7.0/i.test(Zt)&&/rv:11.0/.test(Zt)&&(Qt=11),Qt),ve=/Safari/i.test(Zt)&&!pe&&!ae&&!he,ye=(ve||oe)&&!pe,ge=M()&&("ontouchstart"in d||d.navigator.maxTouchPoints||d.DocumentTouch&&d.document instanceof d.DocumentTouch),me=Object.freeze({IS_IPAD:ne,IS_IPHONE:re,IS_IPOD:ie,IS_IOS:oe,IOS_VERSION:se,IS_ANDROID:ae,ANDROID_VERSION:le,IS_NATIVE_ANDROID:ce,IS_FIREFOX:ue,IS_EDGE:he,IS_CHROME:pe,CHROME_VERSION:de,IE_VERSION:fe,IS_SAFARI:ve,IS_ANY_SAFARI:ye,TOUCH_ENABLED:ge});function _e(t,e,n,r){return function(t,e,n){if("number"!=typeof e||e<0||n<e)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+n+").")}(t,r,n.length-1),n[r][e]}function be(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:_e.bind(null,"start",0,t),end:_e.bind(null,"end",1,t)}}function Te(t,e){return Array.isArray(t)?be(t):void 0===t||void 0===e?be():be([[t,e]])}function Ce(t,e){var n=0,r=void 0,i=void 0;if(!e)return 0;t&&t.length||(t=Te(0,0));for(var o=0;o<t.length;o++)r=t.start(o),e<(i=t.end(o))&&(i=e),n+=i-r;return n/e}for(var ke={},we=[["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"]],Ee=we[0],Se=void 0,xe=0;xe<we.length;xe++)if(we[xe][1]in f){Se=we[xe];break}if(Se)for(var je=0;je<Se.length;je++)ke[Ee[je]]=Se[je];function Ae(t){if(t instanceof Ae)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:E(t)&&("number"==typeof t.code&&(this.code=t.code),w(this,t)),this.message||(this.message=Ae.defaultMessages[this.code]||"")}Ae.prototype.code=0,Ae.prototype.message="",Ae.prototype.status=null,Ae.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Ae.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Pe=0;Pe<Ae.errorTypes.length;Pe++)Ae[Ae.errorTypes[Pe]]=Pe,Ae.prototype[Ae.errorTypes[Pe]]=Pe;var Me=function(t,e){var n,r=null;try{n=JSON.parse(t,e)}catch(t){r=t}return[r,n]};function Oe(t){return null!=t&&"function"==typeof t.then}function Ne(t){Oe(t)&&t.then(null,function(t){})}var Le=function(r){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(t,e,n){return r[e]&&(t[e]=r[e]),t},{cues:r.cues&&Array.prototype.map.call(r.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})})},Ie=function(t){var e=t.$$("track"),n=Array.prototype.map.call(e,function(t){return t.track});return Array.prototype.map.call(e,function(t){var e=Le(t.track);return t.src&&(e.src=t.src),e}).concat(Array.prototype.filter.call(t.textTracks(),function(t){return-1===n.indexOf(t)}).map(Le))},De=function(t,n){return t.forEach(function(t){var e=n.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach(function(t){return e.addCue(t)})}),n.textTracks()},Re="vjs-modal-dialog",Fe=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.opened_=n.hasBeenOpened_=n.hasBeenFilled_=!1,n.closeable(!n.options_.uncloseable),n.content(n.options_.content),n.contentEl_=I("div",{className:Re+"-content"},{role:"document"}),n.descEl_=I("p",{className:Re+"-description vjs-control-text",id:n.el().getAttribute("aria-describedby")}),D(n.descEl_,n.description()),n.el_.appendChild(n.descEl_),n.el_.appendChild(n.contentEl_),n}return m(i,r),i.prototype.createEl=function(){return r.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},i.prototype.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,r.prototype.dispose.call(this)},i.prototype.buildCSSClass=function(){return Re+" vjs-hidden "+r.prototype.buildCSSClass.call(this)},i.prototype.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},i.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")},i.prototype.description=function(){var t=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},i.prototype.open=function(){if(!this.opened_){var t=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!t.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&t.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",Pt(this,this.handleKeyPress)),this.hadControls_=t.controls(),t.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},i.prototype.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.opened_},i.prototype.close=function(){if(this.opened_){var t=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",Pt(this,this.handleKeyPress)),this.hadControls_&&t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},i.prototype.closeable=function(t){if("boolean"==typeof t){var e=this.closeable_=!!t,n=this.getChild("closeButton");if(e&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close)}!e&&n&&(this.off(n,"close",this.close),this.removeChild(n),n.dispose())}return this.closeable_},i.prototype.fill=function(){this.fillWith(this.content())},i.prototype.fillWith=function(t){var e=this.contentEl(),n=e.parentNode,r=e.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(e),this.empty(),nt(e,t),this.trigger("modalfill"),r?n.insertBefore(e,r):n.appendChild(e);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},i.prototype.empty=function(){this.trigger("beforemodalempty"),Z(this.contentEl()),this.trigger("modalempty")},i.prototype.content=function(t){return"undefined"!=typeof t&&(this.content_=t),this.content_},i.prototype.conditionalFocus_=function(){var t=f.activeElement,e=this.player_.el_;this.previouslyActiveEl_=null,(e.contains(t)||e===t)&&(this.previouslyActiveEl_=t,this.focus(),this.on(f,"keydown",this.handleKeyDown))},i.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(f,"keydown",this.handleKeyDown)},i.prototype.handleKeyDown=function(t){if(9===t.which){for(var e=this.focusableEls_(),n=this.el_.querySelector(":focus"),r=void 0,i=0;i<e.length;i++)if(n===e[i]){r=i;break}f.activeElement===this.el_&&(r=0),t.shiftKey&&0===r?(e[e.length-1].focus(),t.preventDefault()):t.shiftKey||r!==e.length-1||(e[0].focus(),t.preventDefault())}},i.prototype.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,function(t){return(t instanceof d.HTMLAnchorElement||t instanceof d.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof d.HTMLInputElement||t instanceof d.HTMLSelectElement||t instanceof d.HTMLTextAreaElement||t instanceof d.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof d.HTMLIFrameElement||t instanceof d.HTMLObjectElement||t instanceof d.HTMLEmbedElement||t.hasAttribute("tabindex")&&-1!==t.getAttribute("tabindex")||t.hasAttribute("contenteditable")})},i}($t);Fe.prototype.options_={pauseOnOpen:!0,temporary:!0},$t.registerComponent("ModalDialog",Fe);var Be=function(r){function i(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];g(this,i);var e=_(this,r.call(this));e.tracks_=[],Object.defineProperty(e,"length",{get:function(){return this.tracks_.length}});for(var n=0;n<t.length;n++)e.addTrack(t[n]);return e}return m(i,r),i.prototype.addTrack=function(t){var e=this.tracks_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.tracks_[e]}}),-1===this.tracks_.indexOf(t)&&(this.tracks_.push(t),this.trigger({track:t,type:"addtrack"}))},i.prototype.removeTrack=function(t){for(var e=void 0,n=0,r=this.length;n<r;n++)if(this[n]===t){(e=this[n]).off&&e.off(),this.tracks_.splice(n,1);break}e&&this.trigger({track:e,type:"removetrack"})},i.prototype.getTrackById=function(t){for(var e=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===t){e=i;break}}return e},i}(Nt);for(var He in Be.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},Be.prototype.allowedEvents_)Be.prototype["on"+He]=null;var Ve=function(t,e){for(var n=0;n<t.length;n++)Object.keys(t[n]).length&&e.id!==t[n].id&&(t[n].enabled=!1)},ze=function(r){function i(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];g(this,i);for(var e=t.length-1;0<=e;e--)if(t[e].enabled){Ve(t,t[e]);break}var n=_(this,r.call(this,t));return n.changing_=!1,n}return m(i,r),i.prototype.addTrack=function(t){var e=this;t.enabled&&Ve(this,t),r.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("enabledchange",function(){e.changing_||(e.changing_=!0,Ve(e,t),e.changing_=!1,e.trigger("change"))})},i}(Be),We=function(t,e){for(var n=0;n<t.length;n++)Object.keys(t[n]).length&&e.id!==t[n].id&&(t[n].selected=!1)},Ue=function(r){function i(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];g(this,i);for(var e=t.length-1;0<=e;e--)if(t[e].selected){We(t,t[e]);break}var n=_(this,r.call(this,t));return n.changing_=!1,Object.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n}return m(i,r),i.prototype.addTrack=function(t){var e=this;t.selected&&We(this,t),r.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("selectedchange",function(){e.changing_||(e.changing_=!0,We(e,t),e.changing_=!1,e.trigger("change"))})},i}(Be),Xe=function(e){function t(){return g(this,t),_(this,e.apply(this,arguments))}return m(t,e),t.prototype.addTrack=function(t){e.prototype.addTrack.call(this,t),t.addEventListener("modechange",Pt(this,function(){this.queueTrigger("change")}));-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",Pt(this,function(){this.trigger("selectedlanguagechange")}))},t}(Be),qe=function(){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];g(this,r),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var e=0,n=t.length;e<n;e++)this.addTrackElement_(t[e])}return r.prototype.addTrackElement_=function(t){var e=this.trackElements_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.trackElements_[e]}}),-1===this.trackElements_.indexOf(t)&&this.trackElements_.push(t)},r.prototype.getTrackElementByTrack_=function(t){for(var e=void 0,n=0,r=this.trackElements_.length;n<r;n++)if(t===this.trackElements_[n].track){e=this.trackElements_[n];break}return e},r.prototype.removeTrackElement_=function(t){for(var e=0,n=this.trackElements_.length;e<n;e++)if(t===this.trackElements_[e]){this.trackElements_.splice(e,1);break}},r}(),Ke=function(){function e(t){g(this,e),e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}return e.prototype.setCues_=function(t){var e=this.length||0,n=0,r=t.length;this.cues_=t,this.length_=t.length;var i=function(t){""+t in this||Object.defineProperty(this,""+t,{get:function(){return this.cues_[t]}})};if(e<r)for(n=e;n<r;n++)i.call(this,n)},e.prototype.getCueById=function(t){for(var e=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===t){e=i;break}}return e},e}(),$e={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Ye={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Ge={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Je={disabled:"disabled",hidden:"hidden",showing:"showing"},Qe=function(o){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};g(this,s);var e=_(this,o.call(this)),n={id:t.id||"vjs_track_"+lt(),kind:t.kind||"",label:t.label||"",language:t.language||""},r=function(t){Object.defineProperty(e,t,{get:function(){return n[t]},set:function(){}})};for(var i in n)r(i);return e}return m(s,o),s}(Nt),Ze=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],n=f.createElement("a");n.href=t;var r=""===n.host&&"file:"!==n.protocol,i=void 0;r&&((i=f.createElement("div")).innerHTML='<a href="'+t+'"></a>',n=i.firstChild,i.setAttribute("style","display:none; position:absolute;"),f.body.appendChild(i));for(var o={},s=0;s<e.length;s++)o[e[s]]=n[e[s]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=d.location.protocol),r&&f.body.removeChild(i),o},tn=function(t){if(!t.match(/^https?:\/\//)){var e=f.createElement("div");e.innerHTML='<a href="'+t+'">x</a>',t=e.firstChild.href}return t},en=function(t){if("string"==typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(t);if(e)return e.pop().toLowerCase()}return""},nn=function(t){var e=d.location,n=Ze(t);return(":"===n.protocol?e.protocol:n.protocol)+n.host!==e.protocol+e.host},rn=Object.freeze({parseUrl:Ze,getAbsoluteURL:tn,getFileExtension:en,isCrossOrigin:nn}),on=function(t){var e=sn.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)},sn=Object.prototype.toString;var an=e(function(t,e){(e=t.exports=function(t){return t.replace(/^\s*|\s*$/g,"")}).left=function(t){return t.replace(/^\s*/,"")},e.right=function(t){return t.replace(/\s*$/,"")}}),ln=(an.left,an.right,function(t,e,n){if(!on(e))throw new TypeError("iterator must be a function");arguments.length<3&&(n=this);"[object Array]"===cn.call(t)?function(t,e,n){for(var r=0,i=t.length;r<i;r++)un.call(t,r)&&e.call(n,t[r],r,t)}(t,e,n):"string"==typeof t?function(t,e,n){for(var r=0,i=t.length;r<i;r++)e.call(n,t.charAt(r),r,t)}(t,e,n):function(t,e,n){for(var r in t)un.call(t,r)&&e.call(n,t[r],r,t)}(t,e,n)}),cn=Object.prototype.toString,un=Object.prototype.hasOwnProperty;var hn=function(t){if(!t)return{};var o={};return ln(an(t).split("\n"),function(t){var e,n=t.indexOf(":"),r=an(t.slice(0,n)).toLowerCase(),i=an(t.slice(n+1));"undefined"==typeof o[r]?o[r]=i:(e=o[r],"[object Array]"===Object.prototype.toString.call(e)?o[r].push(i):o[r]=[o[r],i])}),o},pn=function(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var r in n)dn.call(n,r)&&(t[r]=n[r])}return t},dn=Object.prototype.hasOwnProperty;var fn=yn;function vn(t,e,n){var r=t;return on(e)?(n=e,"string"==typeof t&&(r={uri:t})):r=pn(e,{uri:t}),r.callback=n,r}function yn(t,e,n){return gn(e=vn(t,e,n))}function gn(r){if("undefined"==typeof r.callback)throw new Error("callback argument missing");var i=!1,o=function(t,e,n){i||(i=!0,r.callback(t,e,n))};function e(t){return clearTimeout(l),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,o(t,v)}function t(){if(!s){var t;clearTimeout(l),t=r.useXDR&&void 0===a.status?200:1223===a.status?204:a.status;var e=v,n=null;return 0!==t?(e={body:function(){var t=void 0;if(t=a.response?a.response:a.responseText||function(t){if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;return""!==t.responseType||e?null:t.responseXML}(a),f)try{t=JSON.parse(t)}catch(t){}return t}(),statusCode:t,method:u,headers:{},url:c,rawRequest:a},a.getAllResponseHeaders&&(e.headers=hn(a.getAllResponseHeaders()))):n=new Error("Internal XMLHttpRequest Error"),o(n,e,e.body)}}var n,s,a=r.xhr||null;a||(a=r.cors||r.useXDR?new yn.XDomainRequest:new yn.XMLHttpRequest);var l,c=a.url=r.uri||r.url,u=a.method=r.method||"GET",h=r.body||r.data,p=a.headers=r.headers||{},d=!!r.sync,f=!1,v={body:void 0,headers:{},statusCode:0,method:u,url:c,rawRequest:a};if("json"in r&&!1!==r.json&&(f=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==u&&"HEAD"!==u&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),h=JSON.stringify(!0===r.json?h:r.json))),a.onreadystatechange=function(){4===a.readyState&&setTimeout(t,0)},a.onload=t,a.onerror=e,a.onprogress=function(){},a.onabort=function(){s=!0},a.ontimeout=e,a.open(u,c,!d,r.username,r.password),d||(a.withCredentials=!!r.withCredentials),!d&&0<r.timeout&&(l=setTimeout(function(){if(!s){s=!0,a.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",e(t)}},r.timeout)),a.setRequestHeader)for(n in p)p.hasOwnProperty(n)&&a.setRequestHeader(n,p[n]);else if(r.headers&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(r.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in r&&(a.responseType=r.responseType),"beforeSend"in r&&"function"==typeof r.beforeSend&&r.beforeSend(a),a.send(h||null),a}yn.XMLHttpRequest=d.XMLHttpRequest||function(){},yn.XDomainRequest="withCredentials"in new yn.XMLHttpRequest?yn.XMLHttpRequest:d.XDomainRequest,function(t,e){for(var n=0;n<t.length;n++)e(t[n])}(["get","put","post","patch","head","delete"],function(r){yn["delete"===r?"del":r]=function(t,e,n){return(e=vn(t,e,n)).method=r.toUpperCase(),gn(e)}});var mn=function(t,e){var n=new d.WebVTT.Parser(d,d.vttjs,d.WebVTT.StringDecoder()),r=[];n.oncue=function(t){e.addCue(t)},n.onparsingerror=function(t){r.push(t)},n.onflush=function(){e.trigger({type:"loadeddata",target:e})},n.parse(t),0<r.length&&(d.console&&d.console.groupCollapsed&&d.console.groupCollapsed("Text Track parsing errors for "+e.src),r.forEach(function(t){return v.error(t)}),d.console&&d.console.groupEnd&&d.console.groupEnd()),n.flush()},_n=function(t,i){var e={uri:t},n=nn(t);n&&(e.cors=n),fn(e,Pt(this,function(t,e,n){if(t)return v.error(t,e);if(i.loaded_=!0,"function"!=typeof d.WebVTT){if(i.tech_){var r=function(){return mn(n,i)};i.tech_.on("vttjsloaded",r),i.tech_.on("vttjserror",function(){v.error("vttjs failed to load, stopping trying to process "+i.src),i.tech_.off("vttjsloaded",r)})}}else mn(n,i)}))},bn=function(c){function u(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(g(this,u),!t.tech)throw new Error("A tech was not provided.");var e=Kt(t,{kind:Ge[t.kind]||"subtitles",language:t.language||t.srclang||""}),n=Je[e.mode]||"disabled",r=e.default;"metadata"!==e.kind&&"chapters"!==e.kind||(n="hidden");var i=_(this,c.call(this,e));i.tech_=e.tech,i.cues_=[],i.activeCues_=[];var o=new Ke(i.cues_),s=new Ke(i.activeCues_),a=!1,l=Pt(i,function(){this.activeCues=this.activeCues,a&&(this.trigger("cuechange"),a=!1)});return"disabled"!==n&&i.tech_.ready(function(){i.tech_.on("timeupdate",l)},!0),Object.defineProperties(i,{default:{get:function(){return r},set:function(){}},mode:{get:function(){return n},set:function(t){var e=this;Je[t]&&("disabled"!==(n=t)?this.tech_.ready(function(){e.tech_.on("timeupdate",l)},!0):this.tech_.off("timeupdate",l),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?o:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return s;for(var t=this.tech_.currentTime(),e=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];i.startTime<=t&&i.endTime>=t?e.push(i):i.startTime===i.endTime&&i.startTime<=t&&i.startTime+.5>=t&&e.push(i)}if(a=!1,e.length!==this.activeCues_.length)a=!0;else for(var o=0;o<e.length;o++)-1===this.activeCues_.indexOf(e[o])&&(a=!0);return this.activeCues_=e,s.setCues_(this.activeCues_),s},set:function(){}}}),e.src?(i.src=e.src,_n(e.src,i)):i.loaded_=!0,i}return m(u,c),u.prototype.addCue=function(t){var e=t;if(d.vttjs&&!(t instanceof d.vttjs.VTTCue)){for(var n in e=new d.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)n in e||(e[n]=t[n]);e.id=t.id,e.originalCue_=t}for(var r=this.tech_.textTracks(),i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(e);this.cues_.push(e),this.cues.setCues_(this.cues_)},u.prototype.removeCue=function(t){for(var e=this.cues_.length;e--;){var n=this.cues_[e];if(n===t||n.originalCue_&&n.originalCue_===t){this.cues_.splice(e,1),this.cues.setCues_(this.cues_);break}}},u}(Qe);bn.prototype.allowedEvents_={cuechange:"cuechange"};var Tn=function(i){function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};g(this,o);var e=Kt(t,{kind:Ye[t.kind]||""}),n=_(this,i.call(this,e)),r=!1;return Object.defineProperty(n,"enabled",{get:function(){return r},set:function(t){"boolean"==typeof t&&t!==r&&(r=t,this.trigger("enabledchange"))}}),e.enabled&&(n.enabled=e.enabled),n.loaded_=!0,n}return m(o,i),o}(Qe),Cn=function(i){function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};g(this,o);var e=Kt(t,{kind:$e[t.kind]||""}),n=_(this,i.call(this,e)),r=!1;return Object.defineProperty(n,"selected",{get:function(){return r},set:function(t){"boolean"==typeof t&&t!==r&&(r=t,this.trigger("selectedchange"))}}),e.selected&&(n.selected=e.selected),n}return m(o,i),o}(Qe),kn=0,wn=2,En=function(i){function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};g(this,o);var e=_(this,i.call(this)),n=void 0,r=new bn(t);return e.kind=r.kind,e.src=r.src,e.srclang=r.language,e.label=r.label,e.default=r.default,Object.defineProperties(e,{readyState:{get:function(){return n}},track:{get:function(){return r}}}),n=kn,r.addEventListener("loadeddata",function(){n=wn,e.trigger({type:"load",target:e})}),e}return m(o,i),o}(Nt);En.prototype.allowedEvents_={load:"load"},En.NONE=kn,En.LOADING=1,En.LOADED=wn,En.ERROR=3;var Sn={audio:{ListClass:ze,TrackClass:Tn,capitalName:"Audio"},video:{ListClass:Ue,TrackClass:Cn,capitalName:"Video"},text:{ListClass:Xe,TrackClass:bn,capitalName:"Text"}};Object.keys(Sn).forEach(function(t){Sn[t].getterName=t+"Tracks",Sn[t].privateName=t+"Tracks_"});var xn={remoteText:{ListClass:Xe,TrackClass:bn,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:qe,TrackClass:En,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},jn=Kt(Sn,xn);xn.names=Object.keys(xn),Sn.names=Object.keys(Sn),jn.names=[].concat(xn.names).concat(Sn.names);var An=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function Pn(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}function Mn(t){function e(t,e,n,r){return 3600*(0|t)+60*(0|e)+(0|n)+(0|r)/1e3}var n=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?e(n[1],n[2],n[3].replace(":",""),n[4]):59<n[1]?e(n[1],n[2],0,n[4]):e(0,n[1],n[2],n[4]):null}function On(){this.values=An(null)}function Nn(t,e,n,r){var i=r?t.split(r):[t];for(var o in i)if("string"==typeof i[o]){var s=i[o].split(n);if(2===s.length)e(s[0],s[1])}}function Ln(e,t,o){var n,r,s,i=e;function a(){var t=Mn(e);if(null===t)throw new Pn(Pn.Errors.BadTimeStamp,"Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function l(){e=e.replace(/^\s+/,"")}if(l(),t.startTime=a(),l(),"--\x3e"!==e.substr(0,3))throw new Pn(Pn.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.substr(3),l(),t.endTime=a(),l(),n=e,r=t,s=new On,Nn(n,function(t,e){switch(t){case"region":for(var n=o.length-1;0<=n;n--)if(o[n].id===e){s.set(t,o[n].region);break}break;case"vertical":s.alt(t,e,["rl","lr"]);break;case"line":var r=e.split(","),i=r[0];s.integer(t,i),s.percent(t,i)&&s.set("snapToLines",!1),s.alt(t,i,["auto"]),2===r.length&&s.alt("lineAlign",r[1],["start","middle","end"]);break;case"position":r=e.split(","),s.percent(t,r[0]),2===r.length&&s.alt("positionAlign",r[1],["start","middle","end"]);break;case"size":s.percent(t,e);break;case"align":s.alt(t,e,["start","middle","end","left","right"])}},/:/,/\s/),r.region=s.get("region",null),r.vertical=s.get("vertical",""),r.line=s.get("line","auto"),r.lineAlign=s.get("lineAlign","start"),r.snapToLines=s.get("snapToLines",!0),r.size=s.get("size",100),r.align=s.get("align","middle"),r.position=s.get("position",{start:0,left:0,middle:50,end:100,right:100},r.align),r.positionAlign=s.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},r.align)}((Pn.prototype=An(Error.prototype)).constructor=Pn).Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},On.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,n){return n?this.has(t)?this.values[t]:e[n]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,n){for(var r=0;r<n.length;++r)if(e===n[r]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&0<=(e=parseFloat(e))&&e<=100)&&(this.set(t,e),!0)}};var In={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},Dn={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Rn={v:"title",lang:"lang"},Fn={rt:"ruby"};function Bn(o,n){function t(){if(!n)return null;var t,e=n.match(/^([^<]*)(<[^>]*>?)?/);return t=e[1]?e[1]:e[2],n=n.substr(t.length),t}function e(t){return In[t]}function r(t){for(;f=t.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)t=t.replace(f[0],e);return t}function i(t,e){var n=Dn[t];if(!n)return null;var r=o.document.createElement(n);r.localName=n;var i=Rn[t];return i&&e&&(r[i]=e.trim()),r}for(var s,a,l,c=o.document.createElement("div"),u=c,h=[];null!==(s=t());)if("<"!==s[0])u.appendChild(o.document.createTextNode(r(s)));else{if("/"===s[1]){h.length&&h[h.length-1]===s.substr(2).replace(">","")&&(h.pop(),u=u.parentNode);continue}var p,d=Mn(s.substr(1,s.length-2));if(d){p=o.document.createProcessingInstruction("timestamp",d),u.appendChild(p);continue}var f=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!f)continue;if(!(p=i(f[1],f[3])))continue;if(a=u,Fn[(l=p).localName]&&Fn[l.localName]!==a.localName)continue;f[2]&&(p.className=f[2].substr(1).replace("."," ")),h.push(f[1]),u.appendChild(p),u=p}return c}var Hn=[[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 Vn(t){for(var e=0;e<Hn.length;e++){var n=Hn[e];if(t>=n[0]&&t<=n[1])return!0}return!1}function zn(){}function Wn(t,e,n){zn.call(this),this.cue=e,this.cueDiv=Bn(t,e.text);var r={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:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=t.document.createElement("div"),r={direction:function(t){var e=[],n="";if(!t||!t.childNodes)return"ltr";function i(t,e){for(var n=e.childNodes.length-1;0<=n;n--)t.push(e.childNodes[n])}function o(t){if(!t||!t.length)return null;var e=t.pop(),n=e.textContent||e.innerText;if(n){var r=n.match(/^.*(\n|\r)/);return r?r[t.length=0]:n}return"ruby"===e.tagName?o(t):e.childNodes?(i(t,e),o(t)):void 0}for(i(e,t);n=o(e);)for(var r=0;r<n.length;r++)if(Vn(n.charCodeAt(r)))return"rtl";return"ltr"}(this.cueDiv),writingMode:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===e.align?"center":e.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var i=0;switch(e.positionAlign){case"start":i=e.position;break;case"middle":i=e.position-e.size/2;break;case"end":i=e.position-e.size}""===e.vertical?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(t){this.applyStyles({top:this.formatStyle(t.top,"px"),bottom:this.formatStyle(t.bottom,"px"),left:this.formatStyle(t.left,"px"),right:this.formatStyle(t.right,"px"),height:this.formatStyle(t.height,"px"),width:this.formatStyle(t.width,"px")})}}function Un(t){var e,n,r,i;if(t.div){n=t.div.offsetHeight,r=t.div.offsetWidth,i=t.div.offsetTop;var o=(o=t.div.childNodes)&&(o=o[0])&&o.getClientRects&&o.getClientRects();t=t.div.getBoundingClientRect(),e=o?Math.max(o[0]&&o[0].height||0,t.height/o.length):0}this.left=t.left,this.right=t.right,this.top=t.top||i,this.height=t.height||n,this.bottom=t.bottom||i+(t.height||n),this.width=t.width||r,this.lineHeight=void 0!==e?e:t.lineHeight}function Xn(t,e,a,l){var n=new Un(e),r=e.cue,i=function(t){if("number"==typeof t.line&&(t.snapToLines||0<=t.line&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,n=e.textTrackList,r=0,i=0;i<n.length&&n[i]!==e;i++)"showing"===n[i].mode&&r++;return-1*++r}(r),o=[];if(r.snapToLines){var s;switch(r.vertical){case"":o=["+y","-y"],s="height";break;case"rl":o=["+x","-x"],s="width";break;case"lr":o=["-x","+x"],s="width"}var c=n.lineHeight,u=c*Math.round(i),h=a[s]+c,p=o[0];Math.abs(u)>h&&(u=u<0?-1:1,u*=Math.ceil(h/c)*c),i<0&&(u+=""===r.vertical?a.height:a.width,o=o.reverse()),n.move(p,u)}else{var d=n.lineHeight/a.height*100;switch(r.lineAlign){case"middle":i-=d/2;break;case"end":i-=d}switch(r.vertical){case"":e.applyStyles({top:e.formatStyle(i,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(i,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(i,"%")})}o=["+y","-x","+x","-y"],n=new Un(e)}var f=function(t,e){for(var n,r=new Un(t),i=1,o=0;o<e.length;o++){for(;t.overlapsOppositeAxis(a,e[o])||t.within(a)&&t.overlapsAny(l);)t.move(e[o]);if(t.within(a))return t;var s=t.intersectPercentage(a);s<i&&(n=new Un(t),i=s),t=new Un(r)}return n||r}(n,o);e.move(f.toCSSCompatValues(a))}function qn(){}zn.prototype.applyStyles=function(t,e){for(var n in e=e||this.div,t)t.hasOwnProperty(n)&&(e.style[n]=t[n])},zn.prototype.formatStyle=function(t,e){return 0===t?0:t+e},(Wn.prototype=An(zn.prototype)).constructor=Wn,Un.prototype.move=function(t,e){switch(e=void 0!==e?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e}},Un.prototype.overlaps=function(t){return this.left<t.right&&this.right>t.left&&this.top<t.bottom&&this.bottom>t.top},Un.prototype.overlapsAny=function(t){for(var e=0;e<t.length;e++)if(this.overlaps(t[e]))return!0;return!1},Un.prototype.within=function(t){return this.top>=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},Un.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.left<t.left;case"-x":return this.right>t.right;case"+y":return this.top<t.top;case"-y":return this.bottom>t.bottom}},Un.prototype.intersectPercentage=function(t){return Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left))*Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top))/(this.height*this.width)},Un.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},Un.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,n=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,r=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;return{left:(t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t).left,right:t.right,top:t.top||r,height:t.height||e,bottom:t.bottom||r+(t.height||e),width:t.width||n}},qn.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},qn.convertCueToDOMTree=function(t,e){return t&&e?Bn(t,e):null};qn.processCues=function(r,i,t){if(!r||!i||!t)return null;for(;t.firstChild;)t.removeChild(t.firstChild);var o=r.document.createElement("div");if(o.style.position="absolute",o.style.left="0",o.style.right="0",o.style.top="0",o.style.bottom="0",o.style.margin="1.5%",t.appendChild(o),function(t){for(var e=0;e<t.length;e++)if(t[e].hasBeenReset||!t[e].displayState)return!0;return!1}(i)){var s=[],a=Un.getSimpleBoxPosition(o),l={font:Math.round(.05*a.height*100)/100+"px sans-serif"};!function(){for(var t,e,n=0;n<i.length;n++)e=i[n],t=new Wn(r,e,l),o.appendChild(t.div),Xn(0,t,a,s),e.displayState=t.div,s.push(Un.getSimpleBoxPosition(t))}()}else for(var e=0;e<i.length;e++)o.appendChild(i[e].displayState)},(qn.Parser=function(t,e,n){n||(n=e,e={}),e||(e={}),this.window=t,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]}).prototype={reportOrThrowError:function(t){if(!(t instanceof Pn))throw t;this.onparsingerror&&this.onparsingerror(t)},parse:function(t){var o=this;function e(){for(var t=o.buffer,e=0;e<t.length&&"\r"!==t[e]&&"\n"!==t[e];)++e;var n=t.substr(0,e);return"\r"===t[e]&&++e,"\n"===t[e]&&++e,o.buffer=t.substr(e),n}function n(t){t.match(/X-TIMESTAMP-MAP/)?Nn(t,function(t,e){switch(t){case"X-TIMESTAMP-MAP":n=e,r=new On,Nn(n,function(t,e){switch(t){case"MPEGT":r.integer(t+"S",e);break;case"LOCA":r.set(t+"L",Mn(e))}},/[^\d]:/,/,/),o.ontimestampmap&&o.ontimestampmap({MPEGTS:r.get("MPEGTS"),LOCAL:r.get("LOCAL")})}var n,r},/=/):Nn(t,function(t,e){switch(t){case"Region":!function(t){var i=new On;if(Nn(t,function(t,e){switch(t){case"id":i.set(t,e);break;case"width":i.percent(t,e);break;case"lines":i.integer(t,e);break;case"regionanchor":case"viewportanchor":var n=e.split(",");if(2!==n.length)break;var r=new On;if(r.percent("x",n[0]),r.percent("y",n[1]),!r.has("x")||!r.has("y"))break;i.set(t+"X",r.get("x")),i.set(t+"Y",r.get("y"));break;case"scroll":i.alt(t,e,["up"])}},/=/,/\s/),i.has("id")){var e=new(o.vttjs.VTTRegion||o.window.VTTRegion);e.width=i.get("width",100),e.lines=i.get("lines",3),e.regionAnchorX=i.get("regionanchorX",0),e.regionAnchorY=i.get("regionanchorY",100),e.viewportAnchorX=i.get("viewportanchorX",0),e.viewportAnchorY=i.get("viewportanchorY",100),e.scroll=i.get("scroll",""),o.onregion&&o.onregion(e),o.regionList.push({id:i.get("id"),region:e})}}(e)}},/:/)}t&&(o.buffer+=o.decoder.decode(t,{stream:!0}));try{var r;if("INITIAL"===o.state){if(!/\r\n|\n/.test(o.buffer))return this;var i=(r=e()).match(/^WEBVTT([ \t].*)?$/);if(!i||!i[0])throw new Pn(Pn.Errors.BadSignature);o.state="HEADER"}for(var s=!1;o.buffer;){if(!/\r\n|\n/.test(o.buffer))return this;switch(s?s=!1:r=e(),o.state){case"HEADER":/:/.test(r)?n(r):r||(o.state="ID");continue;case"NOTE":r||(o.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){o.state="NOTE";break}if(!r)continue;if(o.cue=new(o.vttjs.VTTCue||o.window.VTTCue)(0,0,""),o.state="CUE",-1===r.indexOf("--\x3e")){o.cue.id=r;continue}case"CUE":try{Ln(r,o.cue,o.regionList)}catch(t){o.reportOrThrowError(t),o.cue=null,o.state="BADCUE";continue}o.state="CUETEXT";continue;case"CUETEXT":var a=-1!==r.indexOf("--\x3e");if(!r||a&&(s=!0)){o.oncue&&o.oncue(o.cue),o.cue=null,o.state="ID";continue}o.cue.text&&(o.cue.text+="\n"),o.cue.text+=r;continue;case"BADCUE":r||(o.state="ID");continue}}}catch(t){o.reportOrThrowError(t),"CUETEXT"===o.state&&o.cue&&o.oncue&&o.oncue(o.cue),o.cue=null,o.state="INITIAL"===o.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new Pn(Pn.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var Kn=qn,$n="auto",Yn={"":1,lr:1,rl:1},Gn={start:1,middle:1,end:1,left:1,right:1};function Jn(t){return"string"==typeof t&&(!!Gn[t.toLowerCase()]&&t.toLowerCase())}function Qn(t,e,n){this.hasBeenReset=!1;var r="",i=!1,o=t,s=e,a=n,l=null,c="",u=!0,h="auto",p="start",d=50,f="middle",v=50,y="middle";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return r},set:function(t){r=""+t}},pauseOnExit:{enumerable:!0,get:function(){return i},set:function(t){i=!!t}},startTime:{enumerable:!0,get:function(){return o},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");o=t,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");s=t,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return a},set:function(t){a=""+t,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(t){l=t,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(t){var e,n="string"==typeof(e=t)&&!!Yn[e.toLowerCase()]&&e.toLowerCase();if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");c=n,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return u},set:function(t){u=!!t,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return h},set:function(t){if("number"!=typeof t&&t!==$n)throw new SyntaxError("An invalid number or illegal string was specified.");h=t,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return p},set:function(t){var e=Jn(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");p=e,this.hasBeenReset=!0}},position:{enumerable:!0,get:function(){return d},set:function(t){if(t<0||100<t)throw new Error("Position must be between 0 and 100.");d=t,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return f},set:function(t){var e=Jn(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");f=e,this.hasBeenReset=!0}},size:{enumerable:!0,get:function(){return v},set:function(t){if(t<0||100<t)throw new Error("Size must be between 0 and 100.");v=t,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return y},set:function(t){var e=Jn(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");y=e,this.hasBeenReset=!0}}}),this.displayState=void 0}Qn.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Zn=Qn,tr={"":!0,up:!0};function er(t){return"number"==typeof t&&0<=t&&t<=100}var nr=function(){var e=100,n=3,r=0,i=100,o=0,s=100,a="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!er(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return n},set:function(t){if("number"!=typeof t)throw new TypeError("Lines must be set to a number.");n=t}},regionAnchorY:{enumerable:!0,get:function(){return i},set:function(t){if(!er(t))throw new Error("RegionAnchorX must be between 0 and 100.");i=t}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(t){if(!er(t))throw new Error("RegionAnchorY must be between 0 and 100.");r=t}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(t){if(!er(t))throw new Error("ViewportAnchorY must be between 0 and 100.");s=t}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(t){if(!er(t))throw new Error("ViewportAnchorX must be between 0 and 100.");o=t}},scroll:{enumerable:!0,get:function(){return a},set:function(t){var e,n="string"==typeof(e=t)&&!!tr[e.toLowerCase()]&&e.toLowerCase();if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");a=n}}})},rr=e(function(t){var e=t.exports={WebVTT:Kn,VTTCue:Zn,VTTRegion:nr};d.vttjs=e,d.WebVTT=e.WebVTT;var n=e.VTTCue,r=e.VTTRegion,i=d.VTTCue,o=d.VTTRegion;e.shim=function(){d.VTTCue=n,d.VTTRegion=r},e.restore=function(){d.VTTCue=i,d.VTTRegion=o},d.VTTCue||e.shim()});rr.WebVTT,rr.VTTCue,rr.VTTRegion;var ir=function(e){function i(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){};g(this,i),n.reportTouchActivity=!1;var r=_(this,e.call(this,null,n,t));return r.hasStarted_=!1,r.on("playing",function(){this.hasStarted_=!0}),r.on("loadstart",function(){this.hasStarted_=!1}),jn.names.forEach(function(t){var e=jn[t];n&&n[e.getterName]&&(r[e.privateName]=n[e.getterName])}),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){!1===n["native"+t+"Tracks"]&&(r["featuresNative"+t+"Tracks"]=!1)}),!1===n.nativeCaptions||!1===n.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==n.nativeCaptions&&!0!==n.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.autoRemoteTextTracks_=new jn.text.ListClass,r.initTrackListeners(),n.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}return m(i,e),i.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"})},i.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},i.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},i.prototype.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Pt(this,function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),1===(this.bufferedPercent_=t)&&this.stopTrackingProgress()}),500)},i.prototype.onDurationChange=function(t){this.duration_=this.duration()},i.prototype.buffered=function(){return Te(0,0)},i.prototype.bufferedPercent=function(){return Ce(this.buffered(),this.duration_)},i.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},i.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},i.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},i.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},i.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.prototype.dispose=function(){this.clearTracks(Sn.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},i.prototype.clearTracks=function(t){var i=this;(t=[].concat(t)).forEach(function(t){for(var e=i[t+"Tracks"]()||[],n=e.length;n--;){var r=e[n];"text"===t&&i.removeRemoteTextTrack(r),e.removeTrack(r)}})},i.prototype.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],e=t.length;e--;){var n=t[e];this.removeRemoteTextTrack(n)}},i.prototype.reset=function(){},i.prototype.error=function(t){return void 0!==t&&(this.error_=new Ae(t),this.trigger("error")),this.error_},i.prototype.played=function(){return this.hasStarted_?Te(0,0):Te()},i.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.prototype.initTrackListeners=function(){var i=this;Sn.names.forEach(function(t){var e=Sn[t],n=function(){i.trigger(t+"trackchange")},r=i[e.getterName]();r.addEventListener("removetrack",n),r.addEventListener("addtrack",n),i.on("dispose",function(){r.removeEventListener("removetrack",n),r.removeEventListener("addtrack",n)})})},i.prototype.addWebVttScript_=function(){var t=this;if(!d.WebVTT)if(f.body.contains(this.el())){if(!this.options_["vtt.js"]&&S(rr)&&0<Object.keys(rr).length)return void this.trigger("vttjsloaded");var e=f.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=function(){t.trigger("vttjsloaded")},e.onerror=function(){t.trigger("vttjserror")},this.on("dispose",function(){e.onload=null,e.onerror=null}),d.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)},i.prototype.emulateTextTracks=function(){var t=this,n=this.textTracks(),e=this.remoteTextTracks(),r=function(t){return n.addTrack(t.track)},i=function(t){return n.removeTrack(t.track)};e.on("addtrack",r),e.on("removetrack",i),this.addWebVttScript_();var o=function(){return t.trigger("texttrackchange")},s=function(){o();for(var t=0;t<n.length;t++){var e=n[t];e.removeEventListener("cuechange",o),"showing"===e.mode&&e.addEventListener("cuechange",o)}};s(),n.addEventListener("change",s),n.addEventListener("addtrack",s),n.addEventListener("removetrack",s),this.on("dispose",function(){e.off("addtrack",r),e.off("removetrack",i),n.removeEventListener("change",s),n.removeEventListener("addtrack",s),n.removeEventListener("removetrack",s);for(var t=0;t<n.length;t++){n[t].removeEventListener("cuechange",o)}})},i.prototype.addTextTrack=function(t,e,n){if(!t)throw new Error("TextTrack kind is required but was not provided");return function(t,e,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},o=t.textTracks();i.kind=e,n&&(i.label=n),r&&(i.language=r),i.tech=t;var s=new jn.text.TrackClass(i);return o.addTrack(s),s}(this,t,e,n)},i.prototype.createRemoteTextTrack=function(t){var e=Kt(t,{tech:this});return new xn.remoteTextEl.TrackClass(e)},i.prototype.addRemoteTextTrack=function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],r=this.createRemoteTextTrack(e);return!0!==n&&!1!==n&&(v.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),n=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==n&&this.ready(function(){return t.autoRemoteTextTracks_.addTrack(r.track)}),r},i.prototype.removeRemoteTextTrack=function(t){var e=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},i.prototype.getVideoPlaybackQuality=function(){return{}},i.prototype.setPoster=function(){},i.prototype.playsinline=function(){},i.prototype.setPlaysinline=function(){},i.prototype.overrideNativeAudioTracks=function(){},i.prototype.overrideNativeVideoTracks=function(){},i.prototype.canPlayType=function(){return""},i.canPlayType=function(){return""},i.canPlaySource=function(t,e){return i.canPlayType(t.type)},i.isTech=function(t){return t.prototype instanceof i||t instanceof i||t===i},i.registerTech=function(t,e){if(i.techs_||(i.techs_={}),!i.isTech(e))throw new Error("Tech "+t+" must be a Tech");if(!i.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!i.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=qt(t),i.techs_[t]=e,"Tech"!==t&&i.defaultTechOrder_.push(t),e},i.getTech=function(t){if(t)return t=qt(t),i.techs_&&i.techs_[t]?i.techs_[t]:d&&d.videojs&&d.videojs[t]?(v.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),d.videojs[t]):void 0},i}($t);jn.names.forEach(function(t){var e=jn[t];ir.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}}),ir.prototype.featuresVolumeControl=!0,ir.prototype.featuresMuteControl=!0,ir.prototype.featuresFullscreenResize=!1,ir.prototype.featuresPlaybackRate=!1,ir.prototype.featuresProgressEvents=!1,ir.prototype.featuresSourceset=!1,ir.prototype.featuresTimeupdateEvents=!1,ir.prototype.featuresNativeTextTracks=!1,ir.withSourceHandlers=function(i){i.registerSourceHandler=function(t,e){var n=i.sourceHandlers;n||(n=i.sourceHandlers=[]),void 0===e&&(e=n.length),n.splice(e,0,t)},i.canPlayType=function(t){for(var e=i.sourceHandlers||[],n=void 0,r=0;r<e.length;r++)if(n=e[r].canPlayType(t))return n;return""},i.selectSourceHandler=function(t,e){for(var n=i.sourceHandlers||[],r=0;r<n.length;r++)if(n[r].canHandleSource(t,e))return n[r];return null},i.canPlaySource=function(t,e){var n=i.selectSourceHandler(t,e);return n?n.canHandleSource(t,e):""};["seekable","seeking","duration"].forEach(function(t){var e=this[t];"function"==typeof e&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):e.apply(this,arguments)})},i.prototype),i.prototype.setSource=function(t){var e=i.selectSourceHandler(t,this.options_);e||(i.nativeSourceHandler?e=i.nativeSourceHandler:v.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),e!==i.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=e.handleSource(t,this,this.options_),this.on("dispose",this.disposeSourceHandler)},i.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},$t.registerComponent("Tech",ir),ir.registerTech("Tech",ir),ir.defaultTechOrder_=[];var or={},sr={},ar={};function lr(t,e,n){t.setTimeout(function(){return function n(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];var i=arguments[2];var o=arguments[3];var s=4<arguments.length&&void 0!==arguments[4]?arguments[4]:[];var a=5<arguments.length&&void 0!==arguments[5]&&arguments[5];var e=t[0],l=t.slice(1);if("string"==typeof e)n(r,or[e],i,o,s,a);else if(e){var c=function(t,e){var n=sr[t.id()],r=null;if(null==n)return r=e(t),sr[t.id()]=[[e,r]],r;for(var i=0;i<n.length;i++){var o=n[i],s=o[0],a=o[1];s===e&&(r=a)}null===r&&(r=e(t),n.push([e,r]));return r}(o,e);if(!c.setSource)return s.push(c),n(r,l,i,o,s,a);c.setSource(w({},r),function(t,e){if(t)return n(r,l,i,o,s,a);s.push(c),n(e,r.type===e.type?l:or[e.type],i,o,s,a)})}else l.length?n(r,l,i,o,s,a):a?i(r,s):n(r,or["*"],i,o,s,!0)}(e,or[e.type],n,t)},1)}function cr(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,i="call"+qt(n),o=t.reduce(dr(i),r),s=o===ar,a=s?null:e[n](o);return function(t,e,n,r){for(var i=t.length-1;0<=i;i--){var o=t[i];o[e]&&o[e](r,n)}}(t,n,a,s),a}var ur={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},hr={setCurrentTime:1},pr={play:1,pause:1};function dr(n){return function(t,e){return t===ar?ar:e[n]?e[n](t):t}}var fr={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"},vr=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=en(t);return fr[e.toLowerCase()]||""};function yr(t){var e=vr(t.src);return!t.type&&e&&(t.type=e),t}var gr=function(c){function u(t,e,n){g(this,u);var r=Kt({createEl:!1},e),i=_(this,c.call(this,t,r,n));if(e.playerOptions.sources&&0!==e.playerOptions.sources.length)t.src(e.playerOptions.sources);else for(var o=0,s=e.playerOptions.techOrder;o<s.length;o++){var a=qt(s[o]),l=ir.getTech(a);if(a||(l=$t.getComponent(a)),l&&l.isSupported()){t.loadTech_(a);break}}return i}return m(u,c),u}($t);$t.registerComponent("MediaLoader",gr);var mr=function(i){function r(t,e){g(this,r);var n=_(this,i.call(this,t,e));return n.emitTapEvents(),n.enable(),n}return m(r,i),r.prototype.createEl=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"div",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};e=w({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},e),"button"===t&&v.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),n=w({role:"button"},n),this.tabIndex_=e.tabIndex;var r=i.prototype.createEl.call(this,t,e,n);return this.createControlTextEl(r),r},r.prototype.dispose=function(){this.controlTextEl_=null,i.prototype.dispose.call(this)},r.prototype.createControlTextEl=function(t){return this.controlTextEl_=I("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},r.prototype.controlText=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===t)return this.controlText_||"Need Text";var n=this.localize(t);this.controlText_=t,D(this.controlTextEl_,n),this.nonIconControl||e.setAttribute("title",n)},r.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+i.prototype.buildCSSClass.call(this)},r.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!=typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},r.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!=typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},r.prototype.handleClick=function(t){},r.prototype.handleFocus=function(t){_t(f,"keydown",Pt(this,this.handleKeyPress))},r.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.trigger("click")):i.prototype.handleKeyPress&&i.prototype.handleKeyPress.call(this,t)},r.prototype.handleBlur=function(t){bt(f,"keydown",Pt(this,this.handleKeyPress))},r}($t);$t.registerComponent("ClickableComponent",mr);var _r=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.update(),t.on("posterchange",Pt(n,n.update)),n}return m(i,r),i.prototype.dispose=function(){this.player().off("posterchange",this.update),r.prototype.dispose.call(this)},i.prototype.createEl=function(){return I("div",{className:"vjs-poster",tabIndex:-1})},i.prototype.update=function(t){var e=this.player().poster();this.setSrc(e),e?this.show():this.hide()},i.prototype.setSrc=function(t){var e="";t&&(e='url("'+t+'")'),this.el_.style.backgroundImage=e},i.prototype.handleClick=function(t){this.player_.controls()&&(this.player_.paused()?Ne(this.player_.play()):this.player_.pause())},i}(mr);$t.registerComponent("PosterImage",_r);var br="#222",Tr={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 Cr(t,e){var n=void 0;if(4===t.length)n=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.");n=t.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+e+")"}function kr(t,e,n){try{t.style[e]=n}catch(t){return}}var wr=function(o){function s(n,t,e){g(this,s);var r=_(this,o.call(this,n,t,e)),i=Pt(r,r.updateDisplay);return n.on("loadstart",Pt(r,r.toggleDisplay)),n.on("texttrackchange",i),n.on("loadstart",Pt(r,r.preselectTrack)),n.ready(Pt(r,function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)this.hide();else{n.on("fullscreenchange",i),n.on("playerresize",i),d.addEventListener("orientationchange",i),n.on("dispose",function(){return d.removeEventListener("orientationchange",i)});for(var t=this.options_.playerOptions.tracks||[],e=0;e<t.length;e++)this.player_.addRemoteTextTrack(t[e],!0);this.preselectTrack()}})),r}return m(s,o),s.prototype.preselectTrack=function(){for(var t={captions:1,subtitles:1},e=this.player_.textTracks(),n=this.player_.cache_.selectedLanguage,r=void 0,i=void 0,o=void 0,s=0;s<e.length;s++){var a=e[s];n&&n.enabled&&n.language===a.language?a.kind===n.kind?o=a:o||(o=a):n&&!n.enabled?i=r=o=null:a.default&&("descriptions"!==a.kind||r?a.kind in t&&!i&&(i=a):r=a)}o?o.mode="showing":i?i.mode="showing":r&&(r.mode="showing")},s.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},s.prototype.createEl=function(){return o.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},s.prototype.clearDisplay=function(){"function"==typeof d.WebVTT&&d.WebVTT.processCues(d,[],this.el_)},s.prototype.updateDisplay=function(){var t=this.player_.textTracks();this.clearDisplay();for(var e=null,n=null,r=t.length;r--;){var i=t[r];"showing"===i.mode&&("descriptions"===i.kind?e=i:n=i)}n?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(n)):e&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(e))},s.prototype.updateForTrack=function(t){if("function"==typeof d.WebVTT&&t.activeCues){for(var e=[],n=0;n<t.activeCues.length;n++)e.push(t.activeCues[n]);if(d.WebVTT.processCues(d,e,this.el_),this.player_.textTrackSettings)for(var r=this.player_.textTrackSettings.getValues(),i=e.length;i--;){var o=e[i];if(o){var s=o.displayState;if(r.color&&(s.firstChild.style.color=r.color),r.textOpacity&&kr(s.firstChild,"color",Cr(r.color||"#fff",r.textOpacity)),r.backgroundColor&&(s.firstChild.style.backgroundColor=r.backgroundColor),r.backgroundOpacity&&kr(s.firstChild,"backgroundColor",Cr(r.backgroundColor||"#000",r.backgroundOpacity)),r.windowColor&&(r.windowOpacity?kr(s,"backgroundColor",Cr(r.windowColor,r.windowOpacity)):s.style.backgroundColor=r.windowColor),r.edgeStyle&&("dropshadow"===r.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+br:"raised"===r.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+br:"depressed"===r.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+br:"uniform"===r.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+br)),r.fontPercent&&1!==r.fontPercent){var a=d.parseFloat(s.style.fontSize);s.style.fontSize=a*r.fontPercent+"px",s.style.height="auto",s.style.top="auto",s.style.bottom="2px"}r.fontFamily&&"default"!==r.fontFamily&&("small-caps"===r.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=Tr[r.fontFamily])}}}},s}($t);$t.registerComponent("TextTrackDisplay",wr);var Er=function(i){function t(){return g(this,t),_(this,i.apply(this,arguments))}return m(t,i),t.prototype.createEl=function(){var t=this.player_.isAudio(),e=this.localize(t?"Audio Player":"Video Player"),n=I("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[e])}),r=i.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(n),r},t}($t);$t.registerComponent("LoadingSpinner",Er);var Sr=function(e){function t(){return g(this,t),_(this,e.apply(this,arguments))}return m(t,e),t.prototype.createEl=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};e=w({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},e),n=w({type:"button"},n);var r=$t.prototype.createEl.call(this,"button",e,n);return this.createControlTextEl(r),r},t.prototype.addChild=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=this.constructor.name;return v.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),$t.prototype.addChild.call(this,t,e)},t.prototype.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},t.prototype.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},t.prototype.handleKeyPress=function(t){32!==t.which&&13!==t.which&&e.prototype.handleKeyPress.call(this,t)},t}(mr);$t.registerComponent("Button",Sr);var xr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.mouseused_=!1,n.on("mousedown",n.handleMouseDown),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-big-play-button"},i.prototype.handleClick=function(t){var e=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY)Ne(e);else{var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(r){var i=function(){return r.focus()};Oe(e)?e.then(i,function(){}):this.setTimeout(i,1)}else this.player_.focus()}},i.prototype.handleKeyPress=function(t){this.mouseused_=!1,r.prototype.handleKeyPress.call(this,t)},i.prototype.handleMouseDown=function(t){this.mouseused_=!0},i}(Sr);xr.prototype.controlText_="Play Video",$t.registerComponent("BigPlayButton",xr);var jr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.controlText(e&&e.controlText||n.localize("Close")),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-close-button "+r.prototype.buildCSSClass.call(this)},i.prototype.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},i}(Sr);$t.registerComponent("CloseButton",jr);var Ar=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.on(t,"play",n.handlePlay),n.on(t,"pause",n.handlePause),n.on(t,"ended",n.handleEnded),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-play-control "+r.prototype.buildCSSClass.call(this)},i.prototype.handleClick=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},i.prototype.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},i.prototype.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},i.prototype.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},i.prototype.handleEnded=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},i}(Sr);Ar.prototype.controlText_="Play",$t.registerComponent("PlayToggle",Ar);var Pr=function(t,e){t=t<0?0:t;var n=Math.floor(t%60),r=Math.floor(t/60%60),i=Math.floor(t/3600),o=Math.floor(e/60%60),s=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(i=r=n="-"),(i=0<i||0<s?i+":":"")+(r=((i||10<=o)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},Mr=Pr;function Or(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t;return Mr(t,e)}var Nr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.throttledUpdateContent=Mt(Pt(n,n.updateContent),25),n.on(t,"timeupdate",n.throttledUpdateContent),n}return m(i,r),i.prototype.createEl=function(t){var e=this.buildCSSClass(),n=r.prototype.createEl.call(this,"div",{className:e+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=I("span",{className:e+"-display"},{"aria-live":"off"}),this.updateTextNode_(),n.appendChild(this.contentEl_),n},i.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,r.prototype.dispose.call(this)},i.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=f.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},i.prototype.formatTime_=function(t){return Or(t)},i.prototype.updateFormattedTime_=function(t){var e=this.formatTime_(t);e!==this.formattedTime_&&(this.formattedTime_=e,this.requestAnimationFrame(this.updateTextNode_))},i.prototype.updateContent=function(t){},i}($t);Nr.prototype.labelText_="Time",Nr.prototype.controlText_="Time",$t.registerComponent("TimeDisplay",Nr);var Lr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.on(t,"ended",n.handleEnded),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-current-time"},i.prototype.updateContent=function(t){var e=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(e)},i.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},i}(Nr);Lr.prototype.labelText_="Current Time",Lr.prototype.controlText_="Current Time",$t.registerComponent("CurrentTimeDisplay",Lr);var Ir=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.on(t,"durationchange",n.updateContent),n.on(t,"loadedmetadata",n.throttledUpdateContent),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-duration"},i.prototype.updateContent=function(t){var e=this.player_.duration();e&&this.duration_!==e&&(this.duration_=e,this.updateFormattedTime_(e))},i}(Nr);Ir.prototype.labelText_="Duration",Ir.prototype.controlText_="Duration",$t.registerComponent("DurationDisplay",Ir);var Dr=function(t){function e(){return g(this,e),_(this,t.apply(this,arguments))}return m(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},e}($t);$t.registerComponent("TimeDivider",Dr);var Rr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.on(t,"durationchange",n.throttledUpdateContent),n.on(t,"ended",n.handleEnded),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-remaining-time"},i.prototype.formatTime_=function(t){return"-"+r.prototype.formatTime_.call(this,t)},i.prototype.updateContent=function(t){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},i.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(0)},i}(Nr);Rr.prototype.labelText_="Remaining Time",Rr.prototype.controlText_="Remaining Time",$t.registerComponent("RemainingTimeDisplay",Rr);var Fr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.updateShowing(),n.on(n.player(),"durationchange",n.updateShowing),n}return m(i,r),i.prototype.createEl=function(){var t=r.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=I("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},i.prototype.dispose=function(){this.contentEl_=null,r.prototype.dispose.call(this)},i.prototype.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},i}($t);$t.registerComponent("LiveDisplay",Fr);var Br=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.bar=n.getChild(n.options_.barName),n.vertical(!!n.options_.vertical),n.enable(),n}return m(i,r),i.prototype.enabled=function(){return this.enabled_},i.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)},i.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}},i.prototype.createEl=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return e.className=e.className+" vjs-slider",e=w({tabIndex:0},e),n=w({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),r.prototype.createEl.call(this,t,e,n)},i.prototype.handleMouseDown=function(t){var e=this.bar.el_.ownerDocument;"mousedown"===t.type&&t.preventDefault(),"touchstart"!==t.type||pe||t.preventDefault(),K(),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)},i.prototype.handleMouseMove=function(t){},i.prototype.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;$(),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()},i.prototype.update=function(){if(this.el_){var t=this.getPercent(),e=this.bar;if(e){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var n=(100*t).toFixed(2)+"%",r=e.el().style;return this.vertical()?r.height=n:r.width=n,t}}},i.prototype.calculateDistance=function(t){var e=J(this.el_,t);return this.vertical()?e.y:e.x},i.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},i.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},i.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},i.prototype.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},i.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")},i}($t);$t.registerComponent("Slider",Br);var Hr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.partEls_=[],n.on(t,"progress",n.update),n}return m(i,r),i.prototype.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},i.prototype.dispose=function(){this.partEls_=null,r.prototype.dispose.call(this)},i.prototype.update=function(t){var e=this.player_.buffered(),n=this.player_.duration(),r=this.player_.bufferedEnd(),i=this.partEls_,o=function(t,e){var n=t/e||0;return 100*(1<=n?1:n)+"%"};this.el_.style.width=o(r,n);for(var s=0;s<e.length;s++){var a=e.start(s),l=e.end(s),c=i[s];c||(c=this.el_.appendChild(I()),i[s]=c),c.style.left=o(a,r),c.style.width=o(l-a,r)}for(var u=i.length;u>e.length;u--)this.el_.removeChild(i[u-1]);i.length=e.length},i}($t);$t.registerComponent("LoadProgressBar",Hr);var Vr=function(t){function e(){return g(this,e),_(this,t.apply(this,arguments))}return m(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},e.prototype.update=function(t,e,n){var r=Y(this.el_),i=Y(this.player_.el()),o=t.width*e;if(i&&r){var s=t.left-i.left+o,a=t.width-o+(i.right-t.right),l=r.width/2;s<l?l+=l-s:a<l&&(l=a),l<0?l=0:l>r.width&&(l=r.width),this.el_.style.right="-"+l+"px",D(this.el_,n)}},e}($t);$t.registerComponent("TimeTooltip",Vr);var zr=function(t){function e(){return g(this,e),_(this,t.apply(this,arguments))}return m(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"})},e.prototype.update=function(n,r){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var t=Or(i.player_.scrubbing()?i.player_.getCache().currentTime:i.player_.currentTime(),i.player_.duration()),e=i.getChild("timeTooltip");e&&e.update(n,r,t)})},e}($t);zr.prototype.options_={children:[]},oe||ae||zr.prototype.options_.children.push("timeTooltip"),$t.registerComponent("PlayProgressBar",zr);var Wr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.update=Mt(Pt(n,n.update),25),n}return m(i,r),i.prototype.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},i.prototype.update=function(n,r){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var t=i.player_.duration(),e=Or(r*t,t);i.el_.style.left=n.width*r+"px",i.getChild("timeTooltip").update(n,r,e)})},i}($t);Wr.prototype.options_={children:["timeTooltip"]},$t.registerComponent("MouseTimeDisplay",Wr);var Ur=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.setEventHandlers_(),n}return m(i,r),i.prototype.setEventHandlers_=function(){var t=this;this.update=Mt(Pt(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)},i.prototype.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},i.prototype.update_=function(t,e){var n=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}",[Or(t,n),Or(n,n)],"{1} of {2}")),this.bar.update(Y(this.el_),e)},i.prototype.update=function(t){var e=r.prototype.update.call(this);return this.update_(this.getCurrentTime_(),e),e},i.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},i.prototype.handleEnded=function(t){this.update_(this.player_.duration(),1)},i.prototype.getPercent=function(){var t=this.getCurrentTime_()/this.player_.duration();return 1<=t?1:t||0},i.prototype.handleMouseDown=function(t){rt(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),r.prototype.handleMouseDown.call(this,t))},i.prototype.handleMouseMove=function(t){if(rt(t)){var e=this.calculateDistance(t)*this.player_.duration();e===this.player_.duration()&&(e-=.1),this.player_.currentTime(e)}},i.prototype.enable=function(){r.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},i.prototype.disable=function(){r.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},i.prototype.handleMouseUp=function(t){r.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&Ne(this.player_.play())},i.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},i.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},i.prototype.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},i.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleAction(t)):r.prototype.handleKeyPress&&r.prototype.handleKeyPress.call(this,t)},i}(Br);Ur.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},oe||ae||Ur.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Ur.prototype.playerEvent="timeupdate",$t.registerComponent("SeekBar",Ur);var Xr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.handleMouseMove=Mt(Pt(n,n.handleMouseMove),25),n.throttledHandleMouseSeek=Mt(Pt(n,n.handleMouseSeek),25),n.enable(),n}return m(i,r),i.prototype.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i.prototype.handleMouseMove=function(t){var e=this.getChild("seekBar");if(e){var n=e.getChild("mouseTimeDisplay"),r=e.el(),i=Y(r),o=J(r,t).x;1<o?o=1:o<0&&(o=0),n&&n.update(i,o)}},i.prototype.handleMouseSeek=function(t){var e=this.getChild("seekBar");e&&e.handleMouseMove(t)},i.prototype.enabled=function(){return this.enabled_},i.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)},i.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)},i.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.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)},i.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.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)},i}($t);Xr.prototype.options_={children:["seekBar"]},$t.registerComponent("ProgressControl",Xr);var qr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.on(t,"fullscreenchange",n.handleFullscreenChange),!1===f[ke.fullscreenEnabled]&&n.disable(),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+r.prototype.buildCSSClass.call(this)},i.prototype.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},i.prototype.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},i}(Sr);qr.prototype.controlText_="Fullscreen",$t.registerComponent("FullscreenToggle",qr);var Kr=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")})},$r=function(t){function e(){return g(this,e),_(this,t.apply(this,arguments))}return m(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},e}($t);$t.registerComponent("VolumeLevel",$r);var Yr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.on("slideractive",n.updateLastVolume_),n.on(t,"volumechange",n.updateARIAAttributes),t.ready(function(){return n.updateARIAAttributes()}),n}return m(i,r),i.prototype.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},i.prototype.handleMouseDown=function(t){rt(t)&&r.prototype.handleMouseDown.call(this,t)},i.prototype.handleMouseMove=function(t){rt(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},i.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},i.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},i.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},i.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},i.prototype.updateARIAAttributes=function(t){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},i.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},i.prototype.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",function(){0===t.player_.volume()&&t.player_.lastVolume_(e)})},i}(Br);Yr.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Yr.prototype.playerEvent="volumechange",$t.registerComponent("VolumeBar",Yr);var Gr=function(r){function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};g(this,i),e.vertical=e.vertical||!1,("undefined"==typeof e.volumeBar||S(e.volumeBar))&&(e.volumeBar=e.volumeBar||{},e.volumeBar.vertical=e.vertical);var n=_(this,r.call(this,t,e));return Kr(n,t),n.throttledHandleMouseMove=Mt(Pt(n,n.handleMouseMove),25),n.on("mousedown",n.handleMouseDown),n.on("touchstart",n.handleMouseDown),n.on(n.volumeBar,["focus","slideractive"],function(){n.volumeBar.addClass("vjs-slider-active"),n.addClass("vjs-slider-active"),n.trigger("slideractive")}),n.on(n.volumeBar,["blur","sliderinactive"],function(){n.volumeBar.removeClass("vjs-slider-active"),n.removeClass("vjs-slider-active"),n.trigger("sliderinactive")}),n}return m(i,r),i.prototype.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),r.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},i.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)},i.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)},i.prototype.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},i}($t);Gr.prototype.options_={children:["volumeBar"]},$t.registerComponent("VolumeControl",Gr);var Jr=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")})},Qr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return Jr(n,t),n.on(t,["loadstart","volumechange"],n.update),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-mute-control "+r.prototype.buildCSSClass.call(this)},i.prototype.handleClick=function(t){var e=this.player_.volume(),n=this.player_.lastVolume_();if(0===e){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},i.prototype.update=function(t){this.updateIcon_(),this.updateControlText_()},i.prototype.updateIcon_=function(){var t=this.player_.volume(),e=3;oe&&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 n=0;n<4;n++)H(this.el_,"vjs-vol-"+n);B(this.el_,"vjs-vol-"+e)},i.prototype.updateControlText_=function(){var t=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)},i}(Sr);Qr.prototype.controlText_="Mute",$t.registerComponent("MuteToggle",Qr);var Zr=function(r){function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};g(this,i),"undefined"!=typeof e.inline?e.inline=e.inline:e.inline=!0,("undefined"==typeof e.volumeControl||S(e.volumeControl))&&(e.volumeControl=e.volumeControl||{},e.volumeControl.vertical=!e.inline);var n=_(this,r.call(this,t,e));return n.on(t,["loadstart"],n.volumePanelState_),n.on(n.volumeControl,["slideractive"],n.sliderActive_),n.on(n.volumeControl,["sliderinactive"],n.sliderInactive_),n}return m(i,r),i.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},i.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},i.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")},i.prototype.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),r.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},i}($t);Zr.prototype.options_={children:["muteToggle","volumeControl"]},$t.registerComponent("VolumePanel",Zr);var ti=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return e&&(n.menuButton_=e.menuButton),n.focusedChild_=-1,n.on("keydown",n.handleKeyPress),n}return m(i,r),i.prototype.addItem=function(e){this.addChild(e),e.on("click",Pt(this,function(t){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())}))},i.prototype.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=I(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var e=r.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return e.appendChild(this.contentEl_),_t(e,"click",function(t){t.preventDefault(),t.stopImmediatePropagation()}),e},i.prototype.dispose=function(){this.contentEl_=null,r.prototype.dispose.call(this)},i.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},i.prototype.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},i.prototype.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},i.prototype.focus=function(){var t=0<arguments.length&&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(),0<e.length&&(t<0?t=0:t>=e.length&&(t=e.length-1),e[this.focusedChild_=t].el_.focus())},i}($t);$t.registerComponent("Menu",ti);var ei=function(i){function o(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};g(this,o);var n=_(this,i.call(this,t,e));n.menuButton_=new Sr(t,e),n.menuButton_.controlText(n.controlText_),n.menuButton_.el_.setAttribute("aria-haspopup","true");var r=Sr.prototype.buildCSSClass();return n.menuButton_.el_.className=n.buildCSSClass()+" "+r,n.menuButton_.removeClass("vjs-control"),n.addChild(n.menuButton_),n.update(),n.enabled_=!0,n.on(n.menuButton_,"tap",n.handleClick),n.on(n.menuButton_,"click",n.handleClick),n.on(n.menuButton_,"focus",n.handleFocus),n.on(n.menuButton_,"blur",n.handleBlur),n.on("keydown",n.handleSubmenuKeyPress),n}return m(o,i),o.prototype.update=function(){var t=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=t,this.addChild(t),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},o.prototype.createMenu=function(){var t=new ti(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var e=I("li",{className:"vjs-menu-title",innerHTML:qt(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,t.children_.unshift(e),R(e,t.contentEl())}if(this.items=this.createItems(),this.items)for(var n=0;n<this.items.length;n++)t.addItem(this.items[n]);return t},o.prototype.createItems=function(){},o.prototype.createEl=function(){return i.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},o.prototype.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+Sr.prototype.buildCSSClass()+" "+i.prototype.buildCSSClass.call(this)},o.prototype.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+i.prototype.buildCSSClass.call(this)},o.prototype.controlText=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(t,e)},o.prototype.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",Pt(this,function(t){this.unpressButton(),this.el_.blur()})),this.buttonPressed_?this.unpressButton():this.pressButton()},o.prototype.focus=function(){this.menuButton_.focus()},o.prototype.blur=function(){this.menuButton_.blur()},o.prototype.handleFocus=function(){_t(f,"keydown",Pt(this,this.handleKeyPress))},o.prototype.handleBlur=function(){bt(f,"keydown",Pt(this,this.handleKeyPress))},o.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())},o.prototype.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus()))},o.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),oe&&N())return;this.menu.focus()}},o.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},o.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},o.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},o}($t);$t.registerComponent("MenuButton",ei);var ni=function(o){function s(t,e){g(this,s);var n=e.tracks,r=_(this,o.call(this,t,e));if(r.items.length<=1&&r.hide(),!n)return _(r);var i=Pt(r,r.update);return n.addEventListener("removetrack",i),n.addEventListener("addtrack",i),r.player_.on("ready",i),r.player_.on("dispose",function(){n.removeEventListener("removetrack",i),n.removeEventListener("addtrack",i)}),r}return m(s,o),s}(ei);$t.registerComponent("TrackButton",ni);var ri=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.selectable=e.selectable,n.isSelected_=e.selected||!1,n.multiSelectable=e.multiSelectable,n.selected(n.isSelected_),n.selectable?n.multiSelectable?n.el_.setAttribute("role","menuitemcheckbox"):n.el_.setAttribute("role","menuitemradio"):n.el_.setAttribute("role","menuitem"),n}return m(i,r),i.prototype.createEl=function(t,e,n){return this.nonIconControl=!0,r.prototype.createEl.call(this,"li",w({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},e),n)},i.prototype.handleClick=function(t){this.selected(!0)},i.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))},i}(mr);$t.registerComponent("MenuItem",ri);var ii=function(l){function c(t,e){g(this,c);var n=e.track,r=t.textTracks();e.label=n.label||n.language||"Unknown",e.selected="showing"===n.mode;var i=_(this,l.call(this,t,e));i.track=n;var o=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];i.handleTracksChange.apply(i,e)},s=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];i.handleSelectedLanguageChange.apply(i,e)};if(t.on(["loadstart","texttrackchange"],o),r.addEventListener("change",o),r.addEventListener("selectedlanguagechange",s),i.on("dispose",function(){t.off(["loadstart","texttrackchange"],o),r.removeEventListener("change",o),r.removeEventListener("selectedlanguagechange",s)}),void 0===r.onchange){var a=void 0;i.on(["tap","click"],function(){if("object"!==h(d.Event))try{a=new d.Event("change")}catch(t){}a||(a=f.createEvent("Event")).initEvent("change",!0,!0),r.dispatchEvent(a)})}return i.handleTracksChange(),i}return m(c,l),c.prototype.handleClick=function(t){var e=this.track.kind,n=this.track.kinds,r=this.player_.textTracks();if(n||(n=[e]),l.prototype.handleClick.call(this,t),r)for(var i=0;i<r.length;i++){var o=r[i];o===this.track&&-1<n.indexOf(o.kind)?"showing"!==o.mode&&(o.mode="showing"):"disabled"!==o.mode&&(o.mode="disabled")}},c.prototype.handleTracksChange=function(t){var e="showing"===this.track.mode;e!==this.isSelected_&&this.selected(e)},c.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}}},c.prototype.dispose=function(){this.track=null,l.prototype.dispose.call(this)},c}(ri);$t.registerComponent("TextTrackMenuItem",ii);var oi=function(n){function r(t,e){return g(this,r),e.track={player:t,kind:e.kind,kinds:e.kinds,default:!1,mode:"disabled"},e.kinds||(e.kinds=[e.kind]),e.label?e.track.label=e.label:e.track.label=e.kinds.join(" and ")+" off",e.selectable=!0,e.multiSelectable=!1,_(this,n.call(this,t,e))}return m(r,n),r.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),n=!0,r=0,i=e.length;r<i;r++){var o=e[r];if(-1<this.options_.kinds.indexOf(o.kind)&&"showing"===o.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},r.prototype.handleSelectedLanguageChange=function(t){for(var e=this.player().textTracks(),n=!0,r=0,i=e.length;r<i;r++){var o=e[r];if(-1<["captions","descriptions","subtitles"].indexOf(o.kind)&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},r}(ii);$t.registerComponent("OffTextTrackMenuItem",oi);var si=function(n){function r(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return g(this,r),e.tracks=t.textTracks(),_(this,n.call(this,t,e))}return m(r,n),r.prototype.createItems=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ii,n=void 0;this.label_&&(n=this.label_+" off"),t.push(new oi(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(-1<this.kinds_.indexOf(o.kind)){var s=new e(this.player_,{track:o,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+o.kind+"-menu-item"),t.push(s)}}return t},r}(ni);$t.registerComponent("TextTrackButton",si);var ai=function(s){function a(t,e){g(this,a);var n=e.track,r=e.cue,i=t.currentTime();e.selectable=!0,e.multiSelectable=!1,e.label=r.text,e.selected=r.startTime<=i&&i<r.endTime;var o=_(this,s.call(this,t,e));return o.track=n,o.cue=r,n.addEventListener("cuechange",Pt(o,o.update)),o}return m(a,s),a.prototype.handleClick=function(t){s.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},a.prototype.update=function(t){var e=this.cue,n=this.player_.currentTime();this.selected(e.startTime<=n&&n<e.endTime)},a}(ri);$t.registerComponent("ChaptersTrackMenuItem",ai);var li=function(r){function i(t,e,n){return g(this,i),_(this,r.call(this,t,e,n))}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-chapters-button "+r.prototype.buildCSSClass.call(this)},i.prototype.buildWrapperCSSClass=function(){return"vjs-chapters-button "+r.prototype.buildWrapperCSSClass.call(this)},i.prototype.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),r.prototype.update.call(this)},i.prototype.setTrack=function(t){if(this.track_!==t){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=t,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},i.prototype.findChaptersTrack=function(){for(var t=this.player_.textTracks()||[],e=t.length-1;0<=e;e--){var n=t[e];if(n.kind===this.kind_)return n}},i.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(qt(this.kind_))},i.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),r.prototype.createMenu.call(this)},i.prototype.createItems=function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var n=0,r=e.length;n<r;n++){var i=e[n],o=new ai(this.player_,{track:this.track_,cue:i});t.push(o)}return t},i}(si);li.prototype.kind_="chapters",li.prototype.controlText_="Chapters",$t.registerComponent("ChaptersButton",li);var ci=function(s){function a(t,e,n){g(this,a);var r=_(this,s.call(this,t,e,n)),i=t.textTracks(),o=Pt(r,r.handleTracksChange);return i.addEventListener("change",o),r.on("dispose",function(){i.removeEventListener("change",o)}),r}return m(a,s),a.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),n=!1,r=0,i=e.length;r<i;r++){var o=e[r];if(o.kind!==this.kind_&&"showing"===o.mode){n=!0;break}}n?this.disable():this.enable()},a.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+s.prototype.buildCSSClass.call(this)},a.prototype.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+s.prototype.buildWrapperCSSClass.call(this)},a}(si);ci.prototype.kind_="descriptions",ci.prototype.controlText_="Descriptions",$t.registerComponent("DescriptionsButton",ci);var ui=function(r){function i(t,e,n){return g(this,i),_(this,r.call(this,t,e,n))}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+r.prototype.buildCSSClass.call(this)},i.prototype.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+r.prototype.buildWrapperCSSClass.call(this)},i}(si);ui.prototype.kind_="subtitles",ui.prototype.controlText_="Subtitles",$t.registerComponent("SubtitlesButton",ui);var hi=function(r){function i(t,e){g(this,i),e.track={player:t,kind:e.kind,label:e.kind+" settings",selectable:!1,default:!1,mode:"disabled"},e.selectable=!1,e.name="CaptionSettingsMenuItem";var n=_(this,r.call(this,t,e));return n.addClass("vjs-texttrack-settings"),n.controlText(", opens "+e.kind+" settings dialog"),n}return m(i,r),i.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").open()},i}(ii);$t.registerComponent("CaptionSettingsMenuItem",hi);var pi=function(r){function i(t,e,n){return g(this,i),_(this,r.call(this,t,e,n))}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-captions-button "+r.prototype.buildCSSClass.call(this)},i.prototype.buildWrapperCSSClass=function(){return"vjs-captions-button "+r.prototype.buildWrapperCSSClass.call(this)},i.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new hi(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),r.prototype.createItems.call(this,t)},i}(si);pi.prototype.kind_="captions",pi.prototype.controlText_="Captions",$t.registerComponent("CaptionsButton",pi);var di=function(i){function t(){return g(this,t),_(this,i.apply(this,arguments))}return m(t,i),t.prototype.createEl=function(t,e,n){var r='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(r+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),r+="</span>",i.prototype.createEl.call(this,t,w({innerHTML:r},e),n)},t}(ii);$t.registerComponent("SubsCapsMenuItem",di);var fi=function(r){function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};g(this,i);var n=_(this,r.call(this,t,e));return n.label_="subtitles",-1<["en","en-us","en-ca","fr-ca"].indexOf(n.player_.language_)&&(n.label_="captions"),n.menuButton_.controlText(qt(n.label_)),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+r.prototype.buildCSSClass.call(this)},i.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+r.prototype.buildWrapperCSSClass.call(this)},i.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new hi(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=r.prototype.createItems.call(this,t,di)},i}(si);fi.prototype.kinds_=["captions","subtitles"],fi.prototype.controlText_="Subtitles",$t.registerComponent("SubsCapsButton",fi);var vi=function(s){function a(t,e){g(this,a);var n=e.track,r=t.audioTracks();e.label=n.label||n.language||"Unknown",e.selected=n.enabled;var i=_(this,s.call(this,t,e));i.track=n,i.addClass("vjs-"+n.kind+"-menu-item");var o=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];i.handleTracksChange.apply(i,e)};return r.addEventListener("change",o),i.on("dispose",function(){r.removeEventListener("change",o)}),i}return m(a,s),a.prototype.createEl=function(t,e,n){var r='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(r+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),r+="</span>",s.prototype.createEl.call(this,t,w({innerHTML:r},e),n)},a.prototype.handleClick=function(t){var e=this.player_.audioTracks();s.prototype.handleClick.call(this,t);for(var n=0;n<e.length;n++){var r=e[n];r.enabled=r===this.track}},a.prototype.handleTracksChange=function(t){this.selected(this.track.enabled)},a}(ri);$t.registerComponent("AudioTrackMenuItem",vi);var yi=function(n){function r(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return g(this,r),e.tracks=t.audioTracks(),_(this,n.call(this,t,e))}return m(r,n),r.prototype.buildCSSClass=function(){return"vjs-audio-button "+n.prototype.buildCSSClass.call(this)},r.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+n.prototype.buildWrapperCSSClass.call(this)},r.prototype.createItems=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var e=this.player_.audioTracks(),n=0;n<e.length;n++){var r=e[n];t.push(new vi(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return t},r}(ni);yi.prototype.controlText_="Audio Track",$t.registerComponent("AudioTrackButton",yi);var gi=function(o){function s(t,e){g(this,s);var n=e.rate,r=parseFloat(n,10);e.label=n,e.selected=1===r,e.selectable=!0,e.multiSelectable=!1;var i=_(this,o.call(this,t,e));return i.label=n,i.rate=r,i.on(t,"ratechange",i.update),i}return m(s,o),s.prototype.handleClick=function(t){o.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},s.prototype.update=function(t){this.selected(this.player().playbackRate()===this.rate)},s}(ri);gi.prototype.contentElType="button",$t.registerComponent("PlaybackRateMenuItem",gi);var mi=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.updateVisibility(),n.updateLabel(),n.on(t,"loadstart",n.updateVisibility),n.on(t,"ratechange",n.updateLabel),n}return m(i,r),i.prototype.createEl=function(){var t=r.prototype.createEl.call(this);return this.labelEl_=I("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},i.prototype.dispose=function(){this.labelEl_=null,r.prototype.dispose.call(this)},i.prototype.buildCSSClass=function(){return"vjs-playback-rate "+r.prototype.buildCSSClass.call(this)},i.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+r.prototype.buildWrapperCSSClass.call(this)},i.prototype.createMenu=function(){var t=new ti(this.player()),e=this.playbackRates();if(e)for(var n=e.length-1;0<=n;n--)t.addChild(new gi(this.player(),{rate:e[n]+"x"}));return t},i.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},i.prototype.handleClick=function(t){for(var e=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;i<n.length;i++)if(n[i]>e){r=n[i];break}this.player().playbackRate(r)},i.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},i.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0<this.playbackRates().length},i.prototype.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},i.prototype.updateLabel=function(t){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},i}(ei);mi.prototype.controlText_="Playback Rate",$t.registerComponent("PlaybackRateMenuButton",mi);var _i=function(t){function e(){return g(this,e),_(this,t.apply(this,arguments))}return m(e,t),e.prototype.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},e}($t);$t.registerComponent("Spacer",_i);var bi=function(e){function t(){return g(this,t),_(this,e.apply(this,arguments))}return m(t,e),t.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(_i);$t.registerComponent("CustomControlSpacer",bi);var Ti=function(t){function e(){return g(this,e),_(this,t.apply(this,arguments))}return m(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},e}($t);Ti.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},$t.registerComponent("ControlBar",Ti);var Ci=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.on(t,"error",n.open),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-error-display "+r.prototype.buildCSSClass.call(this)},i.prototype.content=function(){var t=this.player().error();return t?this.localize(t.message):""},i}(Fe);Ci.prototype.options_=Kt(Fe.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),$t.registerComponent("ErrorDisplay",Ci);var ki="vjs-text-track-settings",wi=["#000","Black"],Ei=["#00F","Blue"],Si=["#0FF","Cyan"],xi=["#0F0","Green"],ji=["#F0F","Magenta"],Ai=["#F00","Red"],Pi=["#FFF","White"],Mi=["#FF0","Yellow"],Oi=["1","Opaque"],Ni=["0.5","Semi-Transparent"],Li=["0","Transparent"],Ii={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[wi,Pi,Ai,xi,Ei,Mi,ji,Si]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Oi,Ni,Li]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Pi,wi,Ai,xi,Ei,Mi,ji,Si]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Oi,Ni]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Li,Ni,Oi]}};function Di(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}Ii.windowColor.options=Ii.backgroundColor.options;var Ri=function(r){function i(t,e){g(this,i),e.temporary=!1;var n=_(this,r.call(this,t,e));return n.updateDisplay=Pt(n,n.updateDisplay),n.fill(),n.hasBeenOpened_=n.hasBeenFilled_=!0,n.endDialog=I("p",{className:"vjs-control-text",textContent:n.localize("End of dialog window.")}),n.el().appendChild(n.endDialog),n.setDefaults(),void 0===e.persistTextTrackSettings&&(n.options_.persistTextTrackSettings=n.options_.playerOptions.persistTextTrackSettings),n.on(n.$(".vjs-done-button"),"click",function(){n.saveSettings(),n.close()}),n.on(n.$(".vjs-default-button"),"click",function(){n.setDefaults(),n.updateDisplay()}),k(Ii,function(t){n.on(n.$(t.selector),"change",n.updateDisplay)}),n.options_.persistTextTrackSettings&&n.restoreSettings(),n}return m(i,r),i.prototype.dispose=function(){this.endDialog=null,r.prototype.dispose.call(this)},i.prototype.createElSelect_=function(t){var n=this,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"label",i=Ii[t],o=i.id.replace("%s",this.id_),s=[e,o].join(" ").trim();return["<"+r+' id="'+o+'" class="'+("label"===r?"vjs-label":"")+'">',this.localize(i.label),"</"+r+">",'<select aria-labelledby="'+s+'">'].concat(i.options.map(function(t){var e=o+"-"+t[1].replace(/\W+/g,"");return['<option id="'+e+'" value="'+t[0]+'" ','aria-labelledby="'+s+" "+e+'">',n.localize(t[1]),"</option>"].join("")})).concat("</select>").join("")},i.prototype.createElFgColor_=function(){var t="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",t),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",t),"</span>","</fieldset>"].join("")},i.prototype.createElBgColor_=function(){var t="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",t),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",t),"</span>","</fieldset>"].join("")},i.prototype.createElWinColor_=function(){var t="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",t),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",t),"</span>","</fieldset>"].join("")},i.prototype.createElColors_=function(){return I("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},i.prototype.createElFont_=function(){return I("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},i.prototype.createElControls_=function(){var t=this.localize("restore all settings to the default values");return I("div",{className:"vjs-track-settings-controls",innerHTML:['<button class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</span>","</button>",'<button class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},i.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},i.prototype.label=function(){return this.localize("Caption Settings Dialog")},i.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},i.prototype.buildCSSClass=function(){return r.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},i.prototype.getValues=function(){var s=this;return function(n,r){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;return C(n).reduce(function(t,e){return r(t,n[e],e)},t)}(Ii,function(t,e,n){var r,i,o=(r=s.$(e.selector),i=e.parser,Di(r.options[r.options.selectedIndex].value,i));return void 0!==o&&(t[n]=o),t},{})},i.prototype.setValues=function(n){var r=this;k(Ii,function(t,e){!function(t,e,n){if(e)for(var r=0;r<t.options.length;r++)if(Di(t.options[r].value,n)===e){t.selectedIndex=r;break}}(r.$(t.selector),n[e],t.parser)})},i.prototype.setDefaults=function(){var n=this;k(Ii,function(t){var e=t.hasOwnProperty("default")?t.default:0;n.$(t.selector).selectedIndex=e})},i.prototype.restoreSettings=function(){var t=void 0;try{t=JSON.parse(d.localStorage.getItem(ki))}catch(t){v.warn(t)}t&&this.setValues(t)},i.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?d.localStorage.setItem(ki,JSON.stringify(t)):d.localStorage.removeItem(ki)}catch(t){v.warn(t)}}},i.prototype.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},i.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(f,"keydown",this.handleKeyDown);var t=this.player_.controlBar,e=t&&t.subsCapsButton,n=t&&t.captionsButton;e?e.focus():n&&n.focus()},i}(Fe);$t.registerComponent("TextTrackSettings",Ri);var Fi=function(o){function s(t,e){g(this,s);var n=e.ResizeObserver||d.ResizeObserver;null===e.ResizeObserver&&(n=!1);var r=Kt({createEl:!n,reportTouchActivity:!1},e),i=_(this,o.call(this,t,r));return i.ResizeObserver=e.ResizeObserver||d.ResizeObserver,i.loadListener_=null,i.resizeObserver_=null,i.debouncedHandler_=Ot(function(){i.resizeHandler()},100,!1,i),n?(i.resizeObserver_=new i.ResizeObserver(i.debouncedHandler_),i.resizeObserver_.observe(t.el())):(i.loadListener_=function(){i.el_&&i.el_.contentWindow&&_t(i.el_.contentWindow,"resize",i.debouncedHandler_)},i.one("load",i.loadListener_)),i}return m(s,o),s.prototype.createEl=function(){return o.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})},s.prototype.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},s.prototype.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.el_&&this.el_.contentWindow&&bt(this.el_.contentWindow,"resize",this.debouncedHandler_),this.loadListener_&&this.off("load",this.loadListener_),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null},s}($t);$t.registerComponent("ResizeManager",Fi);var Bi=function(t){var e=t.el();if(e.hasAttribute("src"))return t.triggerSourceset(e.src),!0;var n=t.$$("source"),r=[],i="";if(!n.length)return!1;for(var o=0;o<n.length;o++){var s=n[o].src;s&&-1===r.indexOf(s)&&r.push(s)}return!!r.length&&(1===r.length&&(i=r[0]),t.triggerSourceset(i),!0)},Hi=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(t){var e=f.createElement(this.nodeName.toLowerCase());e.innerHTML=t;for(var n=f.createDocumentFragment();e.childNodes.length;)n.appendChild(e.childNodes[0]);return this.innerText="",d.Element.prototype.appendChild.call(this,n),this.innerHTML}}),Vi=function(t,e){for(var n={},r=0;r<t.length&&!((n=Object.getOwnPropertyDescriptor(t[r],e))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n},zi=function(o){var s=o.el();if(!s.resetSourceWatch_){var e={},t=Vi([o.el(),d.HTMLMediaElement.prototype,d.Element.prototype,Hi],"innerHTML"),n=function(i){return function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=i.apply(s,e);return Bi(o),r}};["append","appendChild","insertAdjacentHTML"].forEach(function(t){s[t]&&(e[t]=s[t],s[t]=n(e[t]))}),Object.defineProperty(s,"innerHTML",Kt(t,{set:n(t.set)})),s.resetSourceWatch_=function(){s.resetSourceWatch_=null,Object.keys(e).forEach(function(t){s[t]=e[t]}),Object.defineProperty(s,"innerHTML",t)},o.one("sourceset",s.resetSourceWatch_)}},Wi=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?tn(d.Element.prototype.getAttribute.call(this,"src")):""},set:function(t){return d.Element.prototype.setAttribute.call(this,"src",t),t}}),Ui=function(r){if(r.featuresSourceset){var i=r.el();if(!i.resetSourceset_){var n=Vi([r.el(),d.HTMLMediaElement.prototype,Wi],"src"),o=i.setAttribute,e=i.load;Object.defineProperty(i,"src",Kt(n,{set:function(t){var e=n.set.call(i,t);return r.triggerSourceset(i.src),e}})),i.setAttribute=function(t,e){var n=o.call(i,t,e);return/src/i.test(t)&&r.triggerSourceset(i.src),n},i.load=function(){var t=e.call(i);return Bi(r)||(r.triggerSourceset(""),zi(r)),t},i.currentSrc?r.triggerSourceset(i.currentSrc):Bi(r)||zi(r),i.resetSourceset_=function(){i.resetSourceset_=null,i.load=e,i.setAttribute=o,Object.defineProperty(i,"src",n),i.resetSourceWatch_&&i.resetSourceWatch_()}}}},Xi=b(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."],["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."]),qi=function(u){function h(t,e){g(this,h);var n=_(this,u.call(this,t,e)),r=t.source,i=!1;if(r&&(n.el_.currentSrc!==r.src||t.tag&&3===t.tag.initNetworkState_)?n.setSource(r):n.handleLateInit_(n.el_),t.enableSourceset&&n.setupSourcesetHandling_(),n.el_.hasChildNodes()){for(var o=n.el_.childNodes,s=o.length,a=[];s--;){var l=o[s];"track"===l.nodeName.toLowerCase()&&(n.featuresNativeTextTracks?(n.remoteTextTrackEls().addTrackElement_(l),n.remoteTextTracks().addTrack(l.track),n.textTracks().addTrack(l.track),i||n.el_.hasAttribute("crossorigin")||!nn(l.src)||(i=!0)):a.push(l))}for(var c=0;c<a.length;c++)n.el_.removeChild(a[c])}return n.proxyNativeTracks_(),n.featuresNativeTextTracks&&i&&v.warn(y(Xi)),n.restoreMetadataTracksInIOSNativePlayer_(),(ge||re||ce)&&!0===t.nativeControlsForTouch&&n.setControls(!0),n.proxyWebkitFullscreen_(),n.triggerReady(),n}return m(h,u),h.prototype.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),h.disposeMediaElement(this.el_),this.options_=null,u.prototype.dispose.call(this)},h.prototype.setupSourcesetHandling_=function(){Ui(this)},h.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var r=this.textTracks(),i=void 0,t=function(){i=[];for(var t=0;t<r.length;t++){var e=r[t];"metadata"===e.kind&&i.push({track:e,storedMode:e.mode})}};t(),r.addEventListener("change",t),this.on("dispose",function(){return r.removeEventListener("change",t)});var e=function t(){for(var e=0;e<i.length;e++){var n=i[e];"disabled"===n.track.mode&&n.track.mode!==n.storedMode&&(n.track.mode=n.storedMode)}r.removeEventListener("change",t)};this.on("webkitbeginfullscreen",function(){r.removeEventListener("change",t),r.removeEventListener("change",e),r.addEventListener("change",e)}),this.on("webkitendfullscreen",function(){r.removeEventListener("change",t),r.addEventListener("change",t),r.removeEventListener("change",e)})},h.prototype.overrideNative_=function(t,e){var n=this;if(e===this["featuresNative"+t+"Tracks"]){var r=t.toLowerCase();this[r+"TracksListeners_"]&&Object.keys(this[r+"TracksListeners_"]).forEach(function(t){n.el()[r+"Tracks"].removeEventListener(t,n[r+"TracksListeners_"][t])}),this["featuresNative"+t+"Tracks"]=!e,this[r+"TracksListeners_"]=null,this.proxyNativeTracksForType_(r)}},h.prototype.overrideNativeAudioTracks=function(t){this.overrideNative_("Audio",t)},h.prototype.overrideNativeVideoTracks=function(t){this.overrideNative_("Video",t)},h.prototype.proxyNativeTracksForType_=function(t){var r=this,e=Sn[t],i=this.el()[e.getterName],o=this[e.getterName]();if(this["featuresNative"+e.capitalName+"Tracks"]&&i&&i.addEventListener){var s={change:function(t){o.trigger({type:"change",target:o,currentTarget:o,srcElement:o})},addtrack:function(t){o.addTrack(t.track)},removetrack:function(t){o.removeTrack(t.track)}},n=function(){for(var t=[],e=0;e<o.length;e++){for(var n=!1,r=0;r<i.length;r++)if(i[r]===o[e]){n=!0;break}n||t.push(o[e])}for(;t.length;)o.removeTrack(t.shift())};this[e.getterName+"Listeners_"]=s,Object.keys(s).forEach(function(e){var n=s[e];i.addEventListener(e,n),r.on("dispose",function(t){return i.removeEventListener(e,n)})}),this.on("loadstart",n),this.on("dispose",function(t){return r.off("loadstart",n)})}},h.prototype.proxyNativeTracks_=function(){var e=this;Sn.names.forEach(function(t){e.proxyNativeTracksForType_(t)})},h.prototype.createEl=function(){var t=this.options_.tag;if(!t||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(t){var e=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(e,t),h.disposeMediaElement(t),t=e}else{t=f.createElement("video");var n=Kt({},this.options_.tag&&W(this.options_.tag));ge&&!0===this.options_.nativeControlsForTouch||delete n.controls,z(t,w(n,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}"undefined"!=typeof this.options_.preload&&X(t,"preload",this.options_.preload);for(var r=["loop","muted","playsinline","autoplay"],i=0;i<r.length;i++){var o=r[i],s=this.options_[o];"undefined"!=typeof s&&(s?X(t,o,o):q(t,o),t[o]=s)}return t},h.prototype.handleLateInit_=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var e=!1,n=function(){e=!0};this.on("loadstart",n);var r=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready(function(){this.off("loadstart",n),this.off("loadedmetadata",r),e||this.trigger("loadstart")})}var i=["loadstart"];i.push("loadedmetadata"),2<=t.readyState&&i.push("loadeddata"),3<=t.readyState&&i.push("canplay"),4<=t.readyState&&i.push("canplaythrough"),this.ready(function(){i.forEach(function(t){this.trigger(t)},this)})}},h.prototype.setCurrentTime=function(t){try{this.el_.currentTime=t}catch(t){v(t,"Video is not ready. (Video.js)")}},h.prototype.duration=function(){var e=this;if(this.el_.duration===1/0&&ae&&pe&&0===this.el_.currentTime){return this.on("timeupdate",function t(){0<e.el_.currentTime&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))}),NaN}return this.el_.duration||NaN},h.prototype.width=function(){return this.el_.offsetWidth},h.prototype.height=function(){return this.el_.offsetHeight},h.prototype.proxyWebkitFullscreen_=function(){var t=this;if("webkitDisplayingFullscreen"in this.el_){var e=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",function(){t.off("webkitbeginfullscreen",n),t.off("webkitendfullscreen",e)})}},h.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var t=d.navigator&&d.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},h.prototype.enterFullScreen=function(){var t=this.el_;t.paused&&t.networkState<=t.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){t.pause(),t.webkitEnterFullScreen()},0)):t.webkitEnterFullScreen()},h.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},h.prototype.src=function(t){if(void 0===t)return this.el_.src;this.setSrc(t)},h.prototype.reset=function(){h.resetMediaElement(this.el_)},h.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},h.prototype.setControls=function(t){this.el_.controls=!!t},h.prototype.addTextTrack=function(t,e,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,e,n):u.prototype.addTextTrack.call(this,t,e,n)},h.prototype.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return u.prototype.createRemoteTextTrack.call(this,t);var e=f.createElement("track");return t.kind&&(e.kind=t.kind),t.label&&(e.label=t.label),(t.language||t.srclang)&&(e.srclang=t.language||t.srclang),t.default&&(e.default=t.default),t.id&&(e.id=t.id),t.src&&(e.src=t.src),e},h.prototype.addRemoteTextTrack=function(t,e){var n=u.prototype.addRemoteTextTrack.call(this,t,e);return this.featuresNativeTextTracks&&this.el().appendChild(n),n},h.prototype.removeRemoteTextTrack=function(t){if(u.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var e=this.$$("track"),n=e.length;n--;)t!==e[n]&&t!==e[n].track||this.el().removeChild(e[n])},h.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return"undefined"!=typeof this.el().webkitDroppedFrameCount&&"undefined"!=typeof this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),d.performance&&"function"==typeof d.performance.now?t.creationTime=d.performance.now():d.performance&&d.performance.timing&&"number"==typeof d.performance.timing.navigationStart&&(t.creationTime=d.Date.now()-d.performance.timing.navigationStart),t},h}(ir);if(M()){qi.TEST_VID=f.createElement("video");var Ki=f.createElement("track");Ki.kind="captions",Ki.srclang="en",Ki.label="English",qi.TEST_VID.appendChild(Ki)}qi.isSupported=function(){try{qi.TEST_VID.volume=.5}catch(t){return!1}return!(!qi.TEST_VID||!qi.TEST_VID.canPlayType)},qi.canPlayType=function(t){return qi.TEST_VID.canPlayType(t)},qi.canPlaySource=function(t,e){return qi.canPlayType(t.type)},qi.canControlVolume=function(){try{var t=qi.TEST_VID.volume;return qi.TEST_VID.volume=t/2+.1,t!==qi.TEST_VID.volume}catch(t){return!1}},qi.canMuteVolume=function(){try{var t=qi.TEST_VID.muted;return qi.TEST_VID.muted=!t,qi.TEST_VID.muted?X(qi.TEST_VID,"muted","muted"):q(qi.TEST_VID,"muted"),t!==qi.TEST_VID.muted}catch(t){return!1}},qi.canControlPlaybackRate=function(){if(ae&&pe&&de<58)return!1;try{var t=qi.TEST_VID.playbackRate;return qi.TEST_VID.playbackRate=t/2+.1,t!==qi.TEST_VID.playbackRate}catch(t){return!1}},qi.canOverrideAttributes=function(){try{var t=function(){};Object.defineProperty(f.createElement("video"),"src",{get:t,set:t}),Object.defineProperty(f.createElement("audio"),"src",{get:t,set:t}),Object.defineProperty(f.createElement("video"),"innerHTML",{get:t,set:t}),Object.defineProperty(f.createElement("audio"),"innerHTML",{get:t,set:t})}catch(t){return!1}return!0},qi.supportsNativeTextTracks=function(){return ye||oe&&pe},qi.supportsNativeVideoTracks=function(){return!(!qi.TEST_VID||!qi.TEST_VID.videoTracks)},qi.supportsNativeAudioTracks=function(){return!(!qi.TEST_VID||!qi.TEST_VID.audioTracks)},qi.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],qi.prototype.featuresVolumeControl=qi.canControlVolume(),qi.prototype.featuresMuteControl=qi.canMuteVolume(),qi.prototype.featuresPlaybackRate=qi.canControlPlaybackRate(),qi.prototype.featuresSourceset=qi.canOverrideAttributes(),qi.prototype.movingMediaElementInDOM=!oe,qi.prototype.featuresFullscreenResize=!0,qi.prototype.featuresProgressEvents=!0,qi.prototype.featuresTimeupdateEvents=!0,qi.prototype.featuresNativeTextTracks=qi.supportsNativeTextTracks(),qi.prototype.featuresNativeVideoTracks=qi.supportsNativeVideoTracks(),qi.prototype.featuresNativeAudioTracks=qi.supportsNativeAudioTracks();var $i=qi.TEST_VID&&qi.TEST_VID.constructor.prototype.canPlayType,Yi=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;qi.patchCanPlayType=function(){4<=le&&!ue&&!pe&&(qi.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Yi.test(t)?"maybe":$i.call(this,t)})},qi.unpatchCanPlayType=function(){var t=qi.TEST_VID.constructor.prototype.canPlayType;return qi.TEST_VID.constructor.prototype.canPlayType=$i,t},qi.patchCanPlayType(),qi.disposeMediaElement=function(t){if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},qi.resetMediaElement=function(t){if(t){for(var e=t.querySelectorAll("source"),n=e.length;n--;)t.removeChild(e[n]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(t){qi.prototype[t]=function(){return this.el_[t]||this.el_.hasAttribute(t)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(e){qi.prototype["set"+qt(e)]=function(t){(this.el_[e]=t)?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(t){qi.prototype[t]=function(){return this.el_[t]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(e){qi.prototype["set"+qt(e)]=function(t){this.el_[e]=t}}),["pause","load","play"].forEach(function(t){qi.prototype[t]=function(){return this.el_[t]()}}),ir.withSourceHandlers(qi),qi.nativeSourceHandler={},qi.nativeSourceHandler.canPlayType=function(t){try{return qi.TEST_VID.canPlayType(t)}catch(t){return""}},qi.nativeSourceHandler.canHandleSource=function(t,e){if(t.type)return qi.nativeSourceHandler.canPlayType(t.type);if(t.src){var n=en(t.src);return qi.nativeSourceHandler.canPlayType("video/"+n)}return""},qi.nativeSourceHandler.handleSource=function(t,e,n){e.setSrc(t.src)},qi.nativeSourceHandler.dispose=function(){},qi.registerSourceHandler(qi.nativeSourceHandler),ir.registerTech("Html5",qi);var Gi=b(["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "],["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "]),Ji=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Qi={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Zi=function(u){function h(t,e,n){if(g(this,h),t.id=t.id||e.id||"vjs_video_"+lt(),(e=w(h.getTagSettings(t),e)).initChildren=!1,e.createEl=!1,e.evented=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof t.closest){var r=t.closest("[lang]");r&&r.getAttribute&&(e.language=r.getAttribute("lang"))}else for(var i=t;i&&1===i.nodeType;){if(W(i).hasOwnProperty("lang")){e.language=i.getAttribute("lang");break}i=i.parentNode}var o=_(this,u.call(this,null,e,n));if(o.isPosterFromTech_=!1,o.queuedCallbacks_=[],o.isReady_=!1,o.hasStarted_=!1,o.userActive_=!1,!o.options_||!o.options_.techOrder||!o.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(o.tag=t,o.tagAttributes=t&&W(t),o.language(o.options_.language),e.languages){var s={};Object.getOwnPropertyNames(e.languages).forEach(function(t){s[t.toLowerCase()]=e.languages[t]}),o.languages_=s}else o.languages_=h.prototype.options_.languages;o.cache_={},o.poster_=e.poster||"",o.controls_=!!e.controls,o.cache_.lastVolume=1,t.controls=!1,t.removeAttribute("controls"),t.hasAttribute("autoplay")?o.options_.autoplay=!0:o.autoplay(o.options_.autoplay),o.scrubbing_=!1,o.el_=o.createEl(),o.cache_.lastPlaybackRate=o.defaultPlaybackRate(),Wt(o,{eventBusKey:"el_"});var a=Kt(o.options_);if(e.plugins){var l=e.plugins;Object.keys(l).forEach(function(t){if("function"!=typeof this[t])throw new Error('plugin "'+t+'" does not exist');this[t](l[t])},o)}o.options_.playerOptions=a,o.middleware_=[],o.initChildren(),o.isAudio("audio"===t.nodeName.toLowerCase()),o.controls()?o.addClass("vjs-controls-enabled"):o.addClass("vjs-controls-disabled"),o.el_.setAttribute("role","region"),o.isAudio()?o.el_.setAttribute("aria-label",o.localize("Audio Player")):o.el_.setAttribute("aria-label",o.localize("Video Player")),o.isAudio()&&o.addClass("vjs-audio"),o.flexNotSupported_()&&o.addClass("vjs-no-flex"),oe||o.addClass("vjs-workinghover"),h.players[o.id_]=o;var c=p.split(".")[0];return o.addClass("vjs-v"+c),o.userActive(!0),o.reportUserActivity(),o.one("play",o.listenForUserActivity_),o.on("fullscreenchange",o.handleFullscreenChange_),o.on("stageclick",o.handleStageClick_),o.changingSrc_=!1,o.playWaitingForReady_=!1,o.playOnLoadstart_=null,o}return m(h,u),h.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),h.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),sr[this.id()]=null,u.prototype.dispose.call(this)},h.prototype.createEl=function(){var e=this.tag,n=void 0,t=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player"),r="video-js"===this.tag.tagName.toLowerCase();t?n=this.el_=e.parentNode:r||(n=this.el_=u.prototype.createEl.call(this,"div"));var i=W(e);if(r){for(n=this.el_=e,e=this.tag=f.createElement("video");n.children.length;)e.appendChild(n.firstChild);F(n,"video-js")||B(n,"video-js"),n.appendChild(e),t=this.playerElIngest_=n,Object.keys(n).forEach(function(t){e[t]=n[t]})}if(e.setAttribute("tabindex","-1"),i.tabindex="-1",fe&&(e.setAttribute("role","application"),i.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in i&&delete i.width,"height"in i&&delete i.height,Object.getOwnPropertyNames(i).forEach(function(t){r&&"class"===t||n.setAttribute(t,i[t]),r&&e.setAttribute(t,i[t])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=n.player=this,this.addClass("vjs-paused"),!0!==d.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=jt("vjs-styles-dimensions");var o=it(".vjs-styles-defaults"),s=it("head");s.insertBefore(this.styleEl_,o?o.nextSibling:s.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var a=e.getElementsByTagName("a"),l=0;l<a.length;l++){var c=a.item(l);B(c,"vjs-hidden"),c.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!t&&e.parentNode.insertBefore(n,e),R(e,n),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_=n},h.prototype.width=function(t){return this.dimension("width",t)},h.prototype.height=function(t){return this.dimension("height",t)},h.prototype.dimension=function(t,e){var n=t+"_";if(void 0===e)return this[n]||0;if(""===e)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(e);isNaN(r)?v.error('Improper value "'+e+'" supplied for for '+t):(this[n]=r,this.updateStyleEl_())},h.prototype.fluid=function(t){if(void 0===t)return!!this.fluid_;this.fluid_=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.updateStyleEl_()},h.prototype.aspectRatio=function(t){if(void 0===t)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(t))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=t,this.fluid(!0),this.updateStyleEl_()},h.prototype.updateStyleEl_=function(){if(!0!==d.VIDEOJS_NO_DYNAMIC_STYLE){var t=void 0,e=void 0,n=void 0,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:0<this.videoWidth()?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),i=r[1]/r[0];t=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,e=void 0!==this.height_?this.height_:t*i,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),At(this.styleEl_,"\n ."+n+" {\n width: "+t+"px;\n height: "+e+"px;\n }\n\n ."+n+".vjs-fluid {\n padding-top: "+100*i+"%;\n }\n ")}else{var o="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,a=this.tech_&&this.tech_.el();a&&(0<=o&&(a.width=o),0<=s&&(a.height=s))}},h.prototype.loadTech_=function(t,e){var n=this;this.tech_&&this.unloadTech_();var r=qt(t),i=t.charAt(0).toLowerCase()+t.slice(1);"Html5"!==r&&this.tag&&(ir.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var o={source:e,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+i+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};jn.names.forEach(function(t){var e=jn[t];o[e.getterName]=n[e.privateName]}),w(o,this.options_[r]),w(o,this.options_[i]),w(o,this.options_[t.toLowerCase()]),this.tag&&(o.tag=this.tag),e&&e.src===this.cache_.src&&0<this.cache_.currentTime&&(o.startTime=this.cache_.currentTime);var s=ir.getTech(t);if(!s)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new s(o),this.tech_.ready(Pt(this,this.handleTechReady_),!0),De(this.textTracksJson_||[],this.tech_),Ji.forEach(function(t){n.on(n.tech_,t,n["handleTech"+qt(t)+"_"])}),Object.keys(Qi).forEach(function(e){n.on(n.tech_,e,function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Qi[e]+"_"].bind(n),event:t}):n["handleTech"+Qi[e]+"_"](t)})}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||R(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},h.prototype.unloadTech_=function(){var n=this;jn.names.forEach(function(t){var e=jn[t];n[e.privateName]=n[e.getterName]()}),this.textTracksJson_=Ie(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},h.prototype.tech=function(t){return void 0===t&&v.warn(y(Gi)),this.tech_},h.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"dblclick",this.handleTechDoubleClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},h.prototype.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},h.prototype.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},h.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},h.prototype.manualAutoplay_=function(e){var n=this;if(this.tech_&&"string"==typeof e){var t=function(){var e=n.muted();n.muted(!0);var t=n.play();if(t&&t.then&&t.catch)return t.catch(function(t){n.muted(e)})},r=void 0;if("any"===e?(r=this.play())&&r.then&&r.catch&&r.catch(function(){return t()}):r="muted"===e?t():this.play(),r&&r.then&&r.catch)return r.then(function(){n.trigger({type:"autoplay-success",autoplay:e})}).catch(function(t){n.trigger({type:"autoplay-failure",autoplay:e})})}},h.prototype.updateSourceCaches_=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=t,n="";if("string"!=typeof e&&(e=t.src,n=t.type),!/^blob:/.test(e)){this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],e&&!n&&(n=function(t,e){if(!e)return"";if(t.cache_.source.src===e&&t.cache_.source.type)return t.cache_.source.type;var n=t.cache_.sources.filter(function(t){return t.src===e});if(n.length)return n[0].type;for(var r=t.$$("source"),i=0;i<r.length;i++){var o=r[i];if(o.type&&o.src&&o.src===e)return o.type}return vr(e)}(this,e)),this.cache_.source=Kt({},t,{src:e,type:n});for(var r=this.cache_.sources.filter(function(t){return t.src&&t.src===e}),i=[],o=this.$$("source"),s=[],a=0;a<o.length;a++){var l=W(o[a]);i.push(l),l.src&&l.src===e&&s.push(l.src)}s.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=e}},h.prototype.handleTechSourceset_=function(t){var n=this;if(!this.changingSrc_&&(this.updateSourceCaches_(t.src),!t.src)){this.tech_.one(["sourceset","loadstart"],function t(e){"sourceset"!==e.type&&n.updateSourceCaches_(n.techGet_("currentSrc")),n.tech_.off(["sourceset","loadstart"],t)})}this.trigger({src:t.src,type:"sourceset"})},h.prototype.hasStarted=function(t){if(void 0===t)return this.hasStarted_;t!==this.hasStarted_&&(this.hasStarted_=t,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},h.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},h.prototype.handleTechRateChange_=function(){0<this.tech_.playbackRate()&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(t){return t.callback(t.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},h.prototype.handleTechWaiting_=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return t.removeClass("vjs-waiting")})},h.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},h.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},h.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},h.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},h.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},h.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(v.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},h.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},h.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},h.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},h.prototype.handleTechClick_=function(t){rt(t)&&this.controls_&&(this.paused()?Ne(this.play()):this.pause())},h.prototype.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(t){return t.contains(e.target)})||(this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},h.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},h.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},h.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},h.prototype.handleTechTouchEnd_=function(t){t.preventDefault()},h.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},h.prototype.handleStageClick_=function(){this.reportUserActivity()},h.prototype.handleTechFullscreenChange_=function(t,e){e&&this.isFullscreen(e.isFullscreen),this.trigger("fullscreenchange")},h.prototype.handleTechError_=function(){var t=this.tech_.error();this.error(t)},h.prototype.handleTechTextData_=function(){var t=null;1<arguments.length&&(t=arguments[1]),this.trigger("textdata",t)},h.prototype.getCache=function(){return this.cache_},h.prototype.techCall_=function(i,o){this.ready(function(){if(i in hr)return t=this.middleware_,e=this.tech_,r=o,e[n=i](t.reduce(dr(n),r));if(i in pr)return cr(this.middleware_,this.tech_,i,o);var t,e,n,r;try{this.tech_&&this.tech_[i](o)}catch(t){throw v(t),t}},!0)},h.prototype.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in ur)return t=this.middleware_,n=this.tech_,r=e,t.reduceRight(dr(r),n[r]());if(e in pr)return cr(this.middleware_,this.tech_,e);var t,n,r;try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw v("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw v("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw v(t),t}}},h.prototype.play=function(){var e=this,t=this.options_.Promise||d.Promise;return t?new t(function(t){e.play_(t)}):this.play_()},h.prototype.play_=function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Ne;if(this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return void e(this.techGet_("play"));this.playOnLoadstart_=function(){t.playOnLoadstart_=null,e(t.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready(function(){t.playWaitingForReady_=!1,e(t.play())})}},h.prototype.pause=function(){this.techCall_("pause")},h.prototype.paused=function(){return!1!==this.techGet_("paused")},h.prototype.played=function(){return this.techGet_("played")||Te(0,0)},h.prototype.scrubbing=function(t){if("undefined"==typeof t)return this.scrubbing_;this.scrubbing_=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},h.prototype.currentTime=function(t){return"undefined"!=typeof t?(t<0&&(t=0),void this.techCall_("setCurrentTime",t)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},h.prototype.duration=function(t){if(void 0===t)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(t=parseFloat(t))<0&&(t=1/0),t!==this.cache_.duration&&((this.cache_.duration=t)===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},h.prototype.remainingTime=function(){return this.duration()-this.currentTime()},h.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},h.prototype.buffered=function(){var t=this.techGet_("buffered");return t&&t.length||(t=Te(0,0)),t},h.prototype.bufferedPercent=function(){return Ce(this.buffered(),this.duration())},h.prototype.bufferedEnd=function(){var t=this.buffered(),e=this.duration(),n=t.end(t.length-1);return e<n&&(n=e),n},h.prototype.volume=function(t){var e=void 0;return void 0!==t?(e=Math.max(0,Math.min(1,parseFloat(t))),this.cache_.volume=e,this.techCall_("setVolume",e),void(0<e&&this.lastVolume_(e))):(e=parseFloat(this.techGet_("volume")),isNaN(e)?1:e)},h.prototype.muted=function(t){if(void 0===t)return this.techGet_("muted")||!1;this.techCall_("setMuted",t)},h.prototype.defaultMuted=function(t){return void 0!==t?this.techCall_("setDefaultMuted",t):this.techGet_("defaultMuted")||!1},h.prototype.lastVolume_=function(t){if(void 0===t||0===t)return this.cache_.lastVolume;this.cache_.lastVolume=t},h.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},h.prototype.isFullscreen=function(t){if(void 0===t)return!!this.isFullscreen_;this.isFullscreen_=!!t},h.prototype.requestFullscreen=function(){var n=ke;this.isFullscreen(!0),n.requestFullscreen?(_t(f,n.fullscreenchange,Pt(this,function t(e){this.isFullscreen(f[n.fullscreenElement]),!1===this.isFullscreen()&&bt(f,n.fullscreenchange,t),this.trigger("fullscreenchange")})),this.el_[n.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},h.prototype.exitFullscreen=function(){var t=ke;this.isFullscreen(!1),t.requestFullscreen?f[t.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},h.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=f.documentElement.style.overflow,_t(f,"keydown",Pt(this,this.fullWindowOnEscKey)),f.documentElement.style.overflow="hidden",B(f.body,"vjs-full-window"),this.trigger("enterFullWindow")},h.prototype.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},h.prototype.exitFullWindow=function(){this.isFullWindow=!1,bt(f,"keydown",this.fullWindowOnEscKey),f.documentElement.style.overflow=this.docOrigOverflow,H(f.body,"vjs-full-window"),this.trigger("exitFullWindow")},h.prototype.canPlayType=function(t){for(var e=void 0,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],o=ir.getTech(i);if(o||(o=$t.getComponent(i)),o){if(o.isSupported()&&(e=o.canPlayType(t)))return e}else v.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},h.prototype.selectSource=function(t){var n,r=this,e=this.options_.techOrder.map(function(t){return[t,ir.getTech(t)]}).filter(function(t){var e=t[0],n=t[1];return n?n.isSupported():(v.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),i=function(t,n,r){var i=void 0;return t.some(function(e){return n.some(function(t){if(i=r(e,t))return!0})}),i},o=function(t,e){var n=t[0];if(t[1].canPlaySource(e,r.options_[n.toLowerCase()]))return{source:e,tech:n}};return(this.options_.sourceOrder?i(t,e,(n=o,function(t,e){return n(e,t)})):i(e,t,o))||!1},h.prototype.src=function(t){var i=this;if("undefined"==typeof t)return this.cache_.src||"";var o=function e(t){if(Array.isArray(t)){var n=[];t.forEach(function(t){t=e(t),Array.isArray(t)?n=n.concat(t):E(t)&&n.push(t)}),t=n}else t="string"==typeof t&&t.trim()?[yr({src:t})]:E(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[yr(t)]:[];return t}(t);o.length?(this.changingSrc_=!0,this.cache_.sources=o,this.updateSourceCaches_(o[0]),lr(this,o[0],function(t,e){var n,r;if(i.middleware_=e,i.cache_.sources=o,i.updateSourceCaches_(t),i.src_(t))return 1<o.length?i.src(o.slice(1)):(i.changingSrc_=!1,i.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void i.triggerReady());n=e,r=i.tech_,n.forEach(function(t){return t.setTech&&t.setTech(r)})})):this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},h.prototype.src_=function(t){var e,n,r=this,i=this.selectSource([t]);return!i||(e=i.tech,n=this.techName_,qt(e)!==qt(n)?(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready(function(){r.changingSrc_=!1})):this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",t):this.techCall_("src",t.src),this.changingSrc_=!1},!0),!1)},h.prototype.load=function(){this.techCall_("load")},h.prototype.reset=function(){this.tech_&&this.tech_.clearTracks("text"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},h.prototype.currentSources=function(){var t=this.currentSource(),e=[];return 0!==Object.keys(t).length&&e.push(t),this.cache_.sources||e},h.prototype.currentSource=function(){return this.cache_.source||{}},h.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},h.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},h.prototype.preload=function(t){return void 0!==t?(this.techCall_("setPreload",t),void(this.options_.preload=t)):this.techGet_("preload")},h.prototype.autoplay=function(t){if(void 0===t)return this.options_.autoplay||!1;var e=void 0;"string"==typeof t&&/(any|play|muted)/.test(t)?(this.options_.autoplay=t,this.manualAutoplay_(t),e=!1):this.options_.autoplay=!!t,e=e||this.options_.autoplay,this.tech_&&this.techCall_("setAutoplay",e)},h.prototype.playsinline=function(t){return void 0!==t?(this.techCall_("setPlaysinline",t),this.options_.playsinline=t,this):this.techGet_("playsinline")},h.prototype.loop=function(t){return void 0!==t?(this.techCall_("setLoop",t),void(this.options_.loop=t)):this.techGet_("loop")},h.prototype.poster=function(t){if(void 0===t)return this.poster_;t||(t=""),t!==this.poster_&&(this.poster_=t,this.techCall_("setPoster",t),this.isPosterFromTech_=!1,this.trigger("posterchange"))},h.prototype.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var t=this.tech_.poster()||"";t!==this.poster_&&(this.poster_=t,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},h.prototype.controls=function(t){if(void 0===t)return!!this.controls_;t=!!t,this.controls_!==t&&(this.controls_=t,this.usingNativeControls()&&this.techCall_("setControls",t),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},h.prototype.usingNativeControls=function(t){if(void 0===t)return!!this.usingNativeControls_;t=!!t,this.usingNativeControls_!==t&&(this.usingNativeControls_=t,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},h.prototype.error=function(t){return void 0===t?this.error_||null:null===t?(this.error_=t,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new Ae(t),this.addClass("vjs-error"),v.error("(CODE:"+this.error_.code+" "+Ae.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},h.prototype.reportUserActivity=function(t){this.userActivity_=!0},h.prototype.userActive=function(t){if(void 0===t)return this.userActive_;if((t=!!t)!==this.userActive_){if(this.userActive_=t,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",function(t){t.stopPropagation(),t.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},h.prototype.listenForUserActivity_=function(){var e=void 0,n=void 0,r=void 0,i=Pt(this,this.reportUserActivity);this.on("mousedown",function(){i(),this.clearInterval(e),e=this.setInterval(i,250)}),this.on("mousemove",function(t){t.screenX===n&&t.screenY===r||(n=t.screenX,r=t.screenY,i())}),this.on("mouseup",function(t){i(),this.clearInterval(e)}),this.on("keydown",i),this.on("keyup",i);var o=void 0;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(o);var t=this.options_.inactivityTimeout;t<=0||(o=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},t))}},250)},h.prototype.playbackRate=function(t){if(void 0===t)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",t)},h.prototype.defaultPlaybackRate=function(t){return void 0!==t?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},h.prototype.isAudio=function(t){if(void 0===t)return!!this.isAudio_;this.isAudio_=!!t},h.prototype.addTextTrack=function(t,e,n){if(this.tech_)return this.tech_.addTextTrack(t,e,n)},h.prototype.addRemoteTextTrack=function(t,e){if(this.tech_)return this.tech_.addRemoteTextTrack(t,e)},h.prototype.removeRemoteTextTrack=function(){var t=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).track,e=void 0===t?arguments[0]:t;if(this.tech_)return this.tech_.removeRemoteTextTrack(e)},h.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},h.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},h.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},h.prototype.language=function(t){if(void 0===t)return this.language_;this.language_=String(t).toLowerCase()},h.prototype.languages=function(){return Kt(h.prototype.options_.languages,this.languages_)},h.prototype.toJSON=function(){var t=Kt(this.options_),e=t.tracks;t.tracks=[];for(var n=0;n<e.length;n++){var r=e[n];(r=Kt(r)).player=void 0,t.tracks[n]=r}return t},h.prototype.createModal=function(t,e){var n=this;(e=e||{}).content=t||"";var r=new Fe(this,e);return this.addChild(r),r.on("dispose",function(){n.removeChild(r)}),r.open(),r},h.getTagSettings=function(t){var e={sources:[],tracks:[]},n=W(t),r=n["data-setup"];if(F(t,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=Me(r||"{}"),o=i[0],s=i[1];o&&v.error(o),w(n,s)}if(w(e,n),t.hasChildNodes())for(var a=t.childNodes,l=0,c=a.length;l<c;l++){var u=a[l],h=u.nodeName.toLowerCase();"source"===h?e.sources.push(W(u)):"track"===h&&e.tracks.push(W(u))}return e},h.prototype.flexNotSupported_=function(){var t=f.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},h}($t);jn.names.forEach(function(t){var e=jn[t];Zi.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}}),Zi.players={};var to=d.navigator;Zi.prototype.options_={techOrder:ir.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:to&&(to.languages&&to.languages[0]||to.userLanguage||to.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media."},["ended","seeking","seekable","networkState","readyState"].forEach(function(t){Zi.prototype[t]=function(){return this.techGet_(t)}}),Ji.forEach(function(t){Zi.prototype["handleTech"+qt(t)+"_"]=function(){return this.trigger(t)}}),$t.registerComponent("Player",Zi);var eo="plugin",no="activePlugins_",ro={},io=function(t){return ro.hasOwnProperty(t)},oo=function(t){return io(t)?ro[t]:void 0},so=function(t,e){t[no]=t[no]||{},t[no][e]=!0},ao=function(t,e,n){var r=(n?"before":"")+"pluginsetup";t.trigger(r,e),t.trigger(r+":"+e.name,e)},lo=function(i,o){return o.prototype.name=i,function(){ao(this,{name:i,plugin:o,instance:null},!0);for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=new(Function.prototype.bind.apply(o,[null].concat([this].concat(e))));return this[i]=function(){return r},ao(this,r.getEventHash()),r}},co=function(){function o(t){if(g(this,o),this.constructor===o)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,Wt(this),delete this.trigger,Xt(this,this.constructor.defaultState),so(t,this.name),this.dispose=Pt(this,this.dispose),t.on("dispose",this.dispose)}return o.prototype.version=function(){return this.constructor.VERSION},o.prototype.getEventHash=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return t.name=this.name,t.plugin=this.constructor,t.instance=this,t},o.prototype.trigger=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return Tt(this.eventBusEl_,t,this.getEventHash(e))},o.prototype.handleStateChanged=function(t){},o.prototype.dispose=function(){var t=this.name,e=this.player;this.trigger("dispose"),this.off(),e.off("dispose",this.dispose),e[no][t]=!1,this.player=this.state=null,e[t]=lo(t,ro[t])},o.isBasic=function(t){var e="string"==typeof t?oo(t):t;return"function"==typeof e&&!o.prototype.isPrototypeOf(e.prototype)},o.registerPlugin=function(t,e){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+("undefined"==typeof t?"undefined":h(t))+".");if(io(t))v.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Zi.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof e)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+("undefined"==typeof e?"undefined":h(e))+".");var n,r,i;return ro[t]=e,t!==eo&&(o.isBasic(e)?Zi.prototype[t]=(n=t,r=e,i=function(){ao(this,{name:n,plugin:r,instance:null},!0);var t=r.apply(this,arguments);return so(this,n),ao(this,{name:n,plugin:r,instance:t}),t},Object.keys(r).forEach(function(t){i[t]=r[t]}),i):Zi.prototype[t]=lo(t,e)),e},o.deregisterPlugin=function(t){if(t===eo)throw new Error("Cannot de-register base plugin.");io(t)&&(delete ro[t],delete Zi.prototype[t])},o.getPlugins=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Object.keys(ro),n=void 0;return t.forEach(function(t){var e=oo(t);e&&((n=n||{})[t]=e)}),n},o.getPluginVersion=function(t){var e=oo(t);return e&&e.VERSION||""},o}();co.getPlugin=oo,co.BASE_PLUGIN_NAME=eo,co.registerPlugin(eo,co),Zi.prototype.usingPlugin=function(t){return!!this[no]&&!0===this[no][t]},Zi.prototype.hasPlugin=function(t){return!!io(t)};var uo=function(t){return 0===t.indexOf("#")?t.slice(1):t};function ho(t,n,e){var r=ho.getPlayer(t);if(r)return n&&v.warn('Player "'+t+'" is already initialised. Options will not be applied.'),e&&r.ready(e),r;var i="string"==typeof t?it("#"+uo(t)):t;if(!O(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");f.body.contains(i)||v.warn("The element supplied is not included in the DOM"),n=n||{},ho.hooks("beforesetup").forEach(function(t){var e=t(i,Kt(n));E(e)&&!Array.isArray(e)?n=Kt(n,e):v.error("please return an object in beforesetup hooks")});var o=$t.getComponent("Player");return r=new o(i,n,e),ho.hooks("setup").forEach(function(t){return t(r)}),r}if(ho.hooks_={},ho.hooks=function(t,e){return ho.hooks_[t]=ho.hooks_[t]||[],e&&(ho.hooks_[t]=ho.hooks_[t].concat(e)),ho.hooks_[t]},ho.hook=function(t,e){ho.hooks(t,e)},ho.hookOnce=function(n,t){ho.hooks(n,[].concat(t).map(function(e){return function t(){return ho.removeHook(n,t),e.apply(void 0,arguments)}}))},ho.removeHook=function(t,e){var n=ho.hooks(t).indexOf(e);return!(n<=-1)&&(ho.hooks_[t]=ho.hooks_[t].slice(),ho.hooks_[t].splice(n,1),!0)},!0!==d.VIDEOJS_NO_DYNAMIC_STYLE&&M()){var po=it(".vjs-styles-defaults");if(!po){po=jt("vjs-styles-defaults");var fo=it("head");fo&&fo.insertBefore(po,fo.firstChild),At(po,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}return xt(1,ho),ho.VERSION=p,ho.options=Zi.prototype.options_,ho.getPlayers=function(){return Zi.players},ho.getPlayer=function(t){var e=Zi.players,n=void 0;if("string"==typeof t){var r=uo(t),i=e[r];if(i)return i;n=it("#"+r)}else n=t;if(O(n)){var o=n,s=o.player,a=o.playerId;if(s||e[a])return s||e[a]}},ho.getAllPlayers=function(){return Object.keys(Zi.players).map(function(t){return Zi.players[t]}).filter(Boolean)},ho.players=Zi.players,ho.getComponent=$t.getComponent,ho.registerComponent=function(t,e){ir.isTech(e)&&v.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),$t.registerComponent.call($t,t,e)},ho.getTech=ir.getTech,ho.registerTech=ir.registerTech,ho.use=function(t,e){or[t]=or[t]||[],or[t].push(e)},Object.defineProperty(ho,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(ho.middleware,"TERMINATOR",{value:ar,writeable:!1,enumerable:!0}),ho.browser=me,ho.TOUCH_ENABLED=ge,ho.extend=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=function(){t.apply(this,arguments)},r={};for(var i in"object"===("undefined"==typeof e?"undefined":h(e))?(e.constructor!==Object.prototype.constructor&&(n=e.constructor),r=e):"function"==typeof e&&(n=e),function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":h(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.super_=e)}(n,t),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},ho.mergeOptions=Kt,ho.bind=Pt,ho.registerPlugin=co.registerPlugin,ho.deregisterPlugin=co.deregisterPlugin,ho.plugin=function(t,e){return v.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),co.registerPlugin(t,e)},ho.getPlugins=co.getPlugins,ho.getPlugin=co.getPlugin,ho.getPluginVersion=co.getPluginVersion,ho.addLanguage=function(t,e){var n;return t=(""+t).toLowerCase(),ho.options.languages=Kt(ho.options.languages,((n={})[t]=e,n)),ho.options.languages[t]},ho.log=v,ho.createTimeRange=ho.createTimeRanges=Te,ho.formatTime=Or,ho.setFormatTime=function(t){Mr=t},ho.resetFormatTime=function(){Mr=Pr},ho.parseUrl=Ze,ho.isCrossOrigin=nn,ho.EventTarget=Nt,ho.on=_t,ho.one=Ct,ho.off=bt,ho.trigger=Tt,ho.xhr=fn,ho.TextTrack=bn,ho.AudioTrack=Tn,ho.VideoTrack=Cn,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(t){ho[t]=function(){return v.warn("videojs."+t+"() is deprecated; use videojs.dom."+t+"() instead"),st[t].apply(null,arguments)}}),ho.computedStyle=x,ho.dom=st,ho.url=rn,ho}); \ No newline at end of file