芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/moodledata/localcache/requirejs/1d8400bca352526a5dd0df1039c81bb2d9377b7c
!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define('media_videojs/video-lazy', b):a.videojs=b()}(this,function(){function a(a,b){return b={exports:{}},a(b,b.exports),b.exports}function b(a,b){Pb(a).forEach(function(c){return b(a[c],c)})}function c(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Pb(a).reduce(function(c,d){return b(c,a[d],d)},c)}function d(a){for(var c=arguments.length,d=Array(c>1?c-1:0),e=1;e
0&&void 0!==arguments[0]?arguments[0]:"div",b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},d=arguments[3],e=lb.createElement(a);return Object.getOwnPropertyNames(b).forEach(function(a){var c=b[a];a.indexOf("aria-")!==-1||"role"===a||"type"===a?(Ub.warn(Vb(Wb,a,c)),e.setAttribute(a,c)):"textContent"===a?q(e,c):e[a]=c}),Object.getOwnPropertyNames(c).forEach(function(a){e.setAttribute(a,c[a])}),d&&J(e,d),e}function q(a,b){return"undefined"==typeof a.textContent?a.innerText=b:a.textContent=b,a}function r(a,b){b.firstChild?b.insertBefore(a,b.firstChild):b.appendChild(a)}function s(a,b){return j(b),a.classList?a.classList.contains(b):k(b).test(a.className)}function t(a,b){return a.classList?a.classList.add(b):s(a,b)||(a.className=(a.className+" "+b).trim()),a}function u(a,b){return a.classList?a.classList.remove(b):(j(b),a.className=a.className.split(/\s+/).filter(function(a){return a!==b}).join(" ")),a}function v(a,b,c){var d=s(a,b);if("function"==typeof c&&(c=c(a,b)),"boolean"!=typeof c&&(c=!d),c!==d)return c?t(a,b):u(a,b),a}function w(a,b){Object.getOwnPropertyNames(b).forEach(function(c){var d=b[c];null===d||"undefined"==typeof d||d===!1?a.removeAttribute(c):a.setAttribute(c,d===!0?"":d)})}function x(a){var b={},c=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(a&&a.attributes&&a.attributes.length>0)for(var d=a.attributes,e=d.length-1;e>=0;e--){var f=d[e].name,g=d[e].value;"boolean"!=typeof a[f]&&c.indexOf(","+f+",")===-1||(g=null!==g),b[f]=g}return b}function y(a,b){return a.getAttribute(b)}function z(a,b,c){a.setAttribute(b,c)}function A(a,b){a.removeAttribute(b)}function B(){lb.body.focus(),lb.onselectstart=function(){return!1}}function C(){lb.onselectstart=function(){return!0}}function D(a){if(a&&a.getBoundingClientRect&&a.parentNode){var b=a.getBoundingClientRect(),c={};return["bottom","height","left","right","top","width"].forEach(function(a){void 0!==b[a]&&(c[a]=b[a])}),c.height||(c.height=parseFloat(h(a,"height"))),c.width||(c.width=parseFloat(h(a,"width"))),c}}function E(a){var b=void 0;if(a.getBoundingClientRect&&a.parentNode&&(b=a.getBoundingClientRect()),!b)return{left:0,top:0};var c=lb.documentElement,d=lb.body,e=c.clientLeft||d.clientLeft||0,f=gb.pageXOffset||d.scrollLeft,g=b.left+f-e,h=c.clientTop||d.clientTop||0,i=gb.pageYOffset||d.scrollTop,j=b.top+i-h;return{left:Math.round(g),top:Math.round(j)}}function F(a,b){var c={},d=E(a),e=a.offsetWidth,f=a.offsetHeight,g=d.top,h=d.left,i=b.pageY,j=b.pageX;return b.changedTouches&&(j=b.changedTouches[0].pageX,i=b.changedTouches[0].pageY),c.y=Math.max(0,Math.min(1,(g-i+f)/f)),c.x=Math.max(0,Math.min(1,(j-h)/e)),c}function G(a){return e(a)&&3===a.nodeType}function H(a){for(;a.firstChild;)a.removeChild(a.firstChild);return a}function I(a){return"function"==typeof a&&(a=a()),(Array.isArray(a)?a:[a]).map(function(a){return"function"==typeof a&&(a=a()),m(a)||G(a)?a:"string"==typeof a&&/\S/.test(a)?lb.createTextNode(a):void 0}).filter(function(a){return a})}function J(a,b){return I(b).forEach(function(b){return a.appendChild(b)}),a}function K(a,b){return J(H(a),b)}function L(){return $b++}function M(a){var b=a[ac];return b||(b=a[ac]=L()),_b[b]||(_b[b]={}),_b[b]}function N(a){var b=a[ac];return!!b&&!!Object.getOwnPropertyNames(_b[b]).length}function O(a){var b=a[ac];if(b){delete _b[b];try{delete a[ac]}catch(c){a.removeAttribute?a.removeAttribute(ac):a[ac]=null}}}function P(a,b){var c=M(a);0===c.handlers[b].length&&(delete c.handlers[b],a.removeEventListener?a.removeEventListener(b,c.dispatcher,!1):a.detachEvent&&a.detachEvent("on"+b,c.dispatcher)),Object.getOwnPropertyNames(c.handlers).length<=0&&(delete c.handlers,delete c.dispatcher,delete c.disabled),0===Object.getOwnPropertyNames(c).length&&O(a)}function Q(a,b,c,d){c.forEach(function(c){a(b,c,d)})}function R(a){function b(){return!0}function c(){return!1}if(!a||!a.isPropagationStopped){var d=a||gb.event;a={};for(var e in d)"layerX"!==e&&"layerY"!==e&&"keyLocation"!==e&&"webkitMovementX"!==e&&"webkitMovementY"!==e&&("returnValue"===e&&d.preventDefault||(a[e]=d[e]));if(a.target||(a.target=a.srcElement||lb),a.relatedTarget||(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement),a.preventDefault=function(){d.preventDefault&&d.preventDefault(),a.returnValue=!1,d.returnValue=!1,a.defaultPrevented=!0},a.defaultPrevented=!1,a.stopPropagation=function(){d.stopPropagation&&d.stopPropagation(),a.cancelBubble=!0,d.cancelBubble=!0,a.isPropagationStopped=b},a.isPropagationStopped=c,a.stopImmediatePropagation=function(){d.stopImmediatePropagation&&d.stopImmediatePropagation(),a.isImmediatePropagationStopped=b,a.stopPropagation()},a.isImmediatePropagationStopped=c,null!==a.clientX&&void 0!==a.clientX){var f=lb.documentElement,g=lb.body;a.pageX=a.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=a.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)}a.which=a.charCode||a.keyCode,null!==a.button&&void 0!==a.button&&(a.button=1&a.button?0:4&a.button?1:2&a.button?2:0)}return a}function S(a,b,c){if(Array.isArray(b))return Q(S,a,b,c);var d=M(a);if(d.handlers||(d.handlers={}),d.handlers[b]||(d.handlers[b]=[]),c.guid||(c.guid=L()),d.handlers[b].push(c),d.dispatcher||(d.disabled=!1,d.dispatcher=function(b,c){if(!d.disabled){b=R(b);var e=d.handlers[b.type];if(e)for(var f=e.slice(0),g=0,h=f.length;g
-1&&(e={passive:!0}),a.addEventListener(b,d.dispatcher,e)}else a.attachEvent&&a.attachEvent("on"+b,d.dispatcher)}function T(a,b,c){if(N(a)){var d=M(a);if(d.handlers){if(Array.isArray(b))return Q(T,a,b,c);var e=function(b){d.handlers[b]=[],P(a,b)};if(b){var f=d.handlers[b];if(f){if(!c)return void e(b);if(c.guid)for(var g=0;g
1&&void 0!==arguments[1]?arguments[1]:{},c=b.eventBusKey;if(c){if(!a[c].nodeName)throw new Error('The eventBusKey "'+c+'" does not refer to an element.');a.eventBusEl_=a[c]}else a.eventBusEl_=p("span",{className:"vjs-event-bus"});return d(a,tc),a.on("dispose",function(){return a.off()}),a}function Y(a,b){return d(a,uc),a.state=d({},a.state,b),"function"==typeof a.handleStateChanged&&mc(a)&&a.on("statechanged",a.handleStateChanged),a}function Z(a){return"string"!=typeof a?a:a.charAt(0).toUpperCase()+a.slice(1)}function $(a,b){return Z(a)===Z(b)}function _(){for(var a={},c=arguments.length,d=Array(c),e=0;e
c)throw new Error("Failed to execute '"+a+"' on 'TimeRanges': The index provided ("+b+") is non-numeric or out of bounds (0-"+c+").")}function ba(a,b,c,d){return aa(a,d,c.length-1),c[d][b]}function ca(a){return void 0===a||0===a.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:a.length,start:ba.bind(null,"start",0,a),end:ba.bind(null,"end",1,a)}}function da(a,b){return Array.isArray(a)?ca(a):void 0===a||void 0===b?ca():ca([[a,b]])}function ea(a,b){var c=0,d=void 0,e=void 0;if(!b)return 0;a&&a.length||(a=da(0,0));for(var f=0;f
b&&(e=b),c+=e-d;return c/b}function fa(a){return a instanceof fa?a:("number"==typeof a?this.code=a:"string"==typeof a?this.message=a:e(a)&&("number"==typeof a.code&&(this.code=a.code),d(this,a)),void(this.message||(this.message=fa.defaultMessages[this.code]||"")))}function ga(a,b){var c,d=null;try{c=JSON.parse(a,b)}catch(e){d=e}return[d,c]}function ha(a){var b=dd.call(a);return"[object Function]"===b||"function"==typeof a&&"[object RegExp]"!==b||"undefined"!=typeof window&&(a===window.setTimeout||a===window.alert||a===window.confirm||a===window.prompt)}function ia(a,b,c){if(!cd(b))throw new TypeError("iterator must be a function");arguments.length<3&&(c=this),"[object Array]"===gd.call(a)?ja(a,b,c):"string"==typeof a?ka(a,b,c):la(a,b,c)}function ja(a,b,c){for(var d=0,e=a.length;d
0&&(k=setTimeout(function(){if(!j){j=!0,h.abort("timeout");var a=new Error("XMLHttpRequest timeout");a.code="ETIMEDOUT",d(a)}},a.timeout)),h.setRequestHeader)for(i in o)o.hasOwnProperty(i)&&h.setRequestHeader(i,o[i]);else if(a.headers&&!oa(a.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in a&&(h.responseType=a.responseType),"beforeSend"in a&&"function"==typeof a.beforeSend&&a.beforeSend(h),h.send(n||null),h}function sa(a){if("document"===a.responseType)return a.responseXML;var b=a.responseXML&&"parsererror"===a.responseXML.documentElement.nodeName;return""!==a.responseType||b?null:a.responseXML}function ta(){}function ua(a,b){this.name="ParsingError",this.code=a.code,this.message=b||a.message}function va(a){function b(a,b,c,d){return 3600*(0|a)+60*(0|b)+(0|c)+(0|d)/1e3}var c=a.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return c?c[3]?b(c[1],c[2],c[3].replace(":",""),c[4]):c[1]>59?b(c[1],c[2],0,c[4]):b(0,c[1],c[2],c[4]):null}function wa(){this.values=Ad(null)}function xa(a,b,c,d){var e=d?a.split(d):[a];for(var f in e)if("string"==typeof e[f]){var g=e[f].split(c);if(2===g.length){var h=g[0],i=g[1];b(h,i)}}}function ya(a,b,c){function d(){var b=va(a);if(null===b)throw new ua(ua.Errors.BadTimeStamp,"Malformed timestamp: "+g);return a=a.replace(/^[^\sa-zA-Z-]+/,""),b}function e(a,b){var d=new wa;xa(a,function(a,b){switch(a){case"region":for(var e=c.length-1;e>=0;e--)if(c[e].id===b){d.set(a,c[e].region);break}break;case"vertical":d.alt(a,b,["rl","lr"]);break;case"line":var f=b.split(","),g=f[0];d.integer(a,g),d.percent(a,g)?d.set("snapToLines",!1):null,d.alt(a,g,["auto"]),2===f.length&&d.alt("lineAlign",f[1],["start","middle","end"]);break;case"position":f=b.split(","),d.percent(a,f[0]),2===f.length&&d.alt("positionAlign",f[1],["start","middle","end"]);break;case"size":d.percent(a,b);break;case"align":d.alt(a,b,["start","middle","end","left","right"])}},/:/,/\s/),b.region=d.get("region",null),b.vertical=d.get("vertical",""),b.line=d.get("line","auto"),b.lineAlign=d.get("lineAlign","start"),b.snapToLines=d.get("snapToLines",!0),b.size=d.get("size",100),b.align=d.get("align","middle"),b.position=d.get("position",{start:0,left:0,middle:50,end:100,right:100},b.align),b.positionAlign=d.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},b.align)}function f(){a=a.replace(/^\s+/,"")}var g=a;if(f(),b.startTime=d(),f(),"-->"!==a.substr(0,3))throw new ua(ua.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+g);a=a.substr(3),f(),b.endTime=d(),f(),e(a,b)}function za(a,b){function c(){function a(a){return b=b.substr(a.length),a}if(!b)return null;var c=b.match(/^([^<]*)(<[^>]+>?)?/);return a(c[1]?c[1]:c[2])}function d(a){return Bd[a]}function e(a){for(;n=a.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)a=a.replace(n[0],d);return a}function f(a,b){return!Ed[b.localName]||Ed[b.localName]===a.localName}function g(b,c){var d=Cd[b];if(!d)return null;var e=a.document.createElement(d);e.localName=d;var f=Dd[b];return f&&c&&(e[f]=c.trim()),e}for(var h,i=a.document.createElement("div"),j=i,k=[];null!==(h=c());)if("<"!==h[0])j.appendChild(a.document.createTextNode(e(h)));else{if("/"===h[1]){k.length&&k[k.length-1]===h.substr(2).replace(">","")&&(k.pop(),j=j.parentNode);continue}var l,m=va(h.substr(1,h.length-2));if(m){l=a.document.createProcessingInstruction("timestamp",m),j.appendChild(l);continue}var n=h.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!n)continue;if(l=g(n[1],n[3]),!l)continue;if(!f(j,l))continue;n[2]&&(l.className=n[2].substr(1).replace("."," ")),k.push(n[1]),j.appendChild(l),j=l}return i}function Aa(a){for(var b=0;b
=c[0]&&a<=c[1])return!0}return!1}function Ba(a){function b(a,b){for(var c=b.childNodes.length-1;c>=0;c--)a.push(b.childNodes[c])}function c(a){if(!a||!a.length)return null;var d=a.pop(),e=d.textContent||d.innerText;if(e){var f=e.match(/^.*(\n|\r)/);return f?(a.length=0,f[0]):e}return"ruby"===d.tagName?c(a):d.childNodes?(b(a,d),c(a)):void 0}var d,e=[],f="";if(!a||!a.childNodes)return"ltr";for(b(e,a);f=c(e);)for(var g=0;g
=0&&a.line<=100))return a.line;if(!a.track||!a.track.textTrackList||!a.track.textTrackList.mediaElement)return-1;for(var b=a.track,c=b.textTrackList,d=0,e=0;e
i&&(e=new Fa(a),g=i),a=new Fa(f)}return e||f}var f=new Fa(b),g=b.cue,h=Ca(g),i=[];if(g.snapToLines){var j;switch(g.vertical){case"":i=["+y","-y"],j="height";break;case"rl":i=["+x","-x"],j="width";break;case"lr":i=["-x","+x"],j="width"}var k=f.lineHeight,l=k*Math.round(h),m=c[j]+k,n=i[0];Math.abs(l)>m&&(l=l<0?-1:1,l*=Math.ceil(m/k)*k),h<0&&(l+=""===g.vertical?c.height:c.width,i=i.reverse()),f.move(n,l)}else{var o=f.lineHeight/c.height*100;switch(g.lineAlign){case"middle":h-=o/2;break;case"end":h-=o}switch(g.vertical){case"":b.applyStyles({top:b.formatStyle(h,"%")});break;case"rl":b.applyStyles({left:b.formatStyle(h,"%")});break;case"lr":b.applyStyles({right:b.formatStyle(h,"%")})}i=["+y","-x","+x","-y"],f=new Fa(b)}var p=e(f,i);b.move(p.toCSSCompatValues(c))}function Ha(){}function Ia(a){if("string"!=typeof a)return!1;var b=Ld[a.toLowerCase()];return!!b&&a.toLowerCase()}function Ja(a){if("string"!=typeof a)return!1;var b=Md[a.toLowerCase()];return!!b&&a.toLowerCase()}function Ka(a){for(var b=1;b
100)throw new Error("Position must be between 0 and 100.");q=a,this.hasBeenReset=!0}})),Object.defineProperty(d,"positionAlign",Ka({},f,{get:function(){return r},set:function(a){var b=Ja(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");r=b,this.hasBeenReset=!0}})),Object.defineProperty(d,"size",Ka({},f,{get:function(){return s},set:function(a){if(a<0||a>100)throw new Error("Size must be between 0 and 100.");s=a,this.hasBeenReset=!0}})),Object.defineProperty(d,"align",Ka({},f,{get:function(){return t},set:function(a){var b=Ja(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");t=b,this.hasBeenReset=!0}})),d.displayState=void 0,e)return d}function Ma(a){if("string"!=typeof a)return!1;var b=Od[a.toLowerCase()];return!!b&&a.toLowerCase()}function Na(a){return"number"==typeof a&&a>=0&&a<=100}function Oa(){var a=100,b=3,c=0,d=100,e=0,f=100,g="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return a},set:function(b){if(!Na(b))throw new Error("Width must be between 0 and 100.");a=b}},lines:{enumerable:!0,get:function(){return b},set:function(a){if("number"!=typeof a)throw new TypeError("Lines must be set to a number.");b=a}},regionAnchorY:{enumerable:!0,get:function(){return d},set:function(a){if(!Na(a))throw new Error("RegionAnchorX must be between 0 and 100.");d=a}},regionAnchorX:{enumerable:!0,get:function(){return c},set:function(a){if(!Na(a))throw new Error("RegionAnchorY must be between 0 and 100.");c=a}},viewportAnchorY:{enumerable:!0,get:function(){return f},set:function(a){if(!Na(a))throw new Error("ViewportAnchorY must be between 0 and 100.");f=a}},viewportAnchorX:{enumerable:!0,get:function(){return e},set:function(a){if(!Na(a))throw new Error("ViewportAnchorX must be between 0 and 100.");e=a}},scroll:{enumerable:!0,get:function(){return g},set:function(a){var b=Ma(a);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");g=b}}})}function Pa(a,b,c,d){var e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},f=a.textTracks();e.kind=b,c&&(e.label=c),d&&(e.language=d),e.tech=a;var g=new zd.text.TrackClass(e);return f.addTrack(g),g}function Qa(a,b){Sd[a]=Sd[a]||[],Sd[a].push(b)}function Ra(a,b,c){a.setTimeout(function(){return Wa(b,Sd[b.type],c,a)},1)}function Sa(a,b){a.forEach(function(a){return a.setTech&&a.setTech(b)})}function Ta(a,b,c){return a.reduceRight(Va(c),b[c]())}function Ua(a,b,c,d){return b[c](a.reduce(Va(c),d))}function Va(a){return function(b,c){return c[a]?c[a](b):b}}function Wa(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=arguments[2],e=arguments[3],f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],g=arguments.length>5&&void 0!==arguments[5]&&arguments[5],h=b[0],i=b.slice(1);if("string"==typeof h)Wa(a,Sd[h],c,e,f,g);else if(h){var j=h(e);j.setSource(d({},a),function(b,d){return b?Wa(a,i,c,e,f,g):(f.push(j),void Wa(d,a.type===d.type?i:Sd[d.type],c,e,f,g))})}else i.length?Wa(a,i,c,e,f,g):g?c(a,f):Wa(a,Sd["*"],c,e,f,!0)}function Xa(a,b){return"rgba("+parseInt(a[1]+a[1],16)+","+parseInt(a[2]+a[2],16)+","+parseInt(a[3]+a[3],16)+","+b+")"}function Ya(a,b,c){try{a.style[b]=c}catch(d){return}}function Za(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;a=a<0?0:a;var c=Math.floor(a%60),d=Math.floor(a/60%60),e=Math.floor(a/3600),f=Math.floor(b/60%60),g=Math.floor(b/3600);return(isNaN(a)||a===1/0)&&(e=d=c="-"),e=e>0||g>0?e+":":"",d=((e||f>=10)&&d<10?"0"+d:d)+":",c=c<10?"0"+c:c,e+d+c}function $a(a,b){if(b&&(a=b(a)),a&&"none"!==a)return a}function _a(a,b){var c=a.options[a.options.selectedIndex].value;return $a(c,b)}function ab(a,b,c){if(b)for(var d=0;d
2&&void 0!==arguments[2]?arguments[2]:!!Db&&Db<11,d=Qb.levels[Rb],f=new RegExp("^("+d+")$");"log"!==a&&b.unshift(a.toUpperCase()+":"),Sb&&Sb.push([].concat(b)),b.unshift("VIDEOJS:");var g=gb.console&&gb.console[a];g&&d&&f.test(a)&&(c&&(b=b.map(function(a){if(e(a)||Array.isArray(a))try{return JSON.stringify(a)}catch(b){return String(a)}return String(a)}).join(" ")),g.apply?g[Array.isArray(b)?"apply":"call"](gb.console,b):g(b))};Qb=function(){for(var a=arguments.length,b=Array(a),c=0;c
0)for(var d=0,e=a.length;d
0)for(var f=0,g=b.length;f
0)for(var h=0,i=c.length;h
=b&&(a.apply(void 0,arguments),c=d)};return d},lc=function(){};lc.prototype.allowedEvents_={},lc.prototype.on=function(a,b){var c=this.addEventListener;this.addEventListener=function(){},S(this,a,b),this.addEventListener=c},lc.prototype.addEventListener=lc.prototype.on,lc.prototype.off=function(a,b){T(this,a,b)},lc.prototype.removeEventListener=lc.prototype.off,lc.prototype.one=function(a,b){var c=this.addEventListener;this.addEventListener=function(){},V(this,a,b),this.addEventListener=c},lc.prototype.trigger=function(a){var b=a.type||a;"string"==typeof a&&(a={type:b}),a=R(a),this.allowedEvents_[b]&&this["on"+b]&&this["on"+b](a),U(this,a)},lc.prototype.dispatchEvent=lc.prototype.trigger;var mc=function(a){return a instanceof lc||!!a.eventBusEl_&&["on","one","off","trigger"].every(function(b){return"function"==typeof a[b]})},nc=function(a){return"string"==typeof a&&/\S/.test(a)||Array.isArray(a)&&!!a.length},oc=function(a){if(!a.nodeName&&!mc(a))throw new Error("Invalid target; must be a DOM node or evented object.")},pc=function(a){if(!nc(a))throw new Error("Invalid event type; must be a non-empty string or array.")},qc=function(a){if("function"!=typeof a)throw new Error("Invalid listener; must be a function.")},rc=function(a,b){var c=b.length<3||b[0]===a||b[0]===a.eventBusEl_,d=void 0,e=void 0,f=void 0;return c?(d=a.eventBusEl_,b.length>=3&&b.shift(),e=b[0],f=b[1]):(d=b[0],e=b[1],f=b[2]),oc(d),pc(e),qc(f),f=jc(a,f),{isTargetingSelf:c,target:d,type:e,listener:f}},sc=function(a,b,c,d){oc(a),a.nodeName?dc[b](a,c,d):a[b](c,d)},tc={on:function(){for(var a=this,b=arguments.length,c=Array(b),d=0;d
=0;a--)this.children_[a].dispose&&this.children_[a].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),O(this.el_),this.el_=null)},a.prototype.player=function(){return this.player_},a.prototype.options=function(a){return Ub.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),a?(this.options_=_(this.options_,a),this.options_):this.options_},a.prototype.el=function(){return this.el_},a.prototype.createEl=function(a,b,c){return p(a,b,c)},a.prototype.localize=function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,d=this.player_.language&&this.player_.language(),e=this.player_.languages&&this.player_.languages(),f=e&&e[d],g=d&&d.split("-")[0],h=e&&e[g],i=c;return f&&f[a]?i=f[a]:h&&h[a]&&(i=h[a]),b&&(i=i.replace(/\{(\d+)\}/g,function(a,c){var d=b[c-1],e=d;return"undefined"==typeof d&&(e=a),e})),i},a.prototype.contentEl=function(){return this.contentEl_||this.el_},a.prototype.id=function(){return this.id_},a.prototype.name=function(){return this.name_},a.prototype.children=function(){return this.children_},a.prototype.getChildById=function(a){return this.childIndex_[a]},a.prototype.getChild=function(a){if(a)return a=Z(a),this.childNameIndex_[a]},a.prototype.addChild=function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,e=void 0,f=void 0;if("string"==typeof b){f=Z(b);var g=c.componentClass||f;c.name=f;var h=a.getComponent(g);if(!h)throw new Error("Component "+g+" does not exist");if("function"!=typeof h)return null;e=new h(this.player_||this,c)}else e=b;if(this.children_.splice(d,0,e),"function"==typeof e.id&&(this.childIndex_[e.id()]=e),f=f||e.name&&Z(e.name()),f&&(this.childNameIndex_[f]=e),"function"==typeof e.el&&e.el()){var i=this.contentEl().children,j=i[d]||null;this.contentEl().insertBefore(e.el(),j)}return e},a.prototype.removeChild=function(a){if("string"==typeof a&&(a=this.getChild(a)),a&&this.children_){for(var b=!1,c=this.children_.length-1;c>=0;c--)if(this.children_[c]===a){b=!0,this.children_.splice(c,1);break}if(b){this.childIndex_[a.id()]=null,this.childNameIndex_[a.name()]=null;var d=a.el();d&&d.parentNode===this.contentEl()&&this.contentEl().removeChild(a.el())}}},a.prototype.initChildren=function(){var b=this,c=this.options_.children;if(c){var d=this.options_,e=function(a){var c=a.name,e=a.opts;if(void 0!==d[c]&&(e=d[c]),e!==!1){e===!0&&(e={}),e.playerOptions=b.options_.playerOptions;var f=b.addChild(c,e);f&&(b[c]=f)}},f=void 0,g=a.getComponent("Tech");f=Array.isArray(c)?c:Object.keys(c),f.concat(Object.keys(this.options_).filter(function(a){return!f.some(function(b){return"string"==typeof b?a===b:a===b.name})})).map(function(a){var d=void 0,e=void 0;return"string"==typeof a?(d=a,e=c[d]||b.options_[d]||{}):(d=a.name,e=a),{name:d,opts:e}}).filter(function(b){var c=a.getComponent(b.opts.componentClass||Z(b.name));return c&&!g.isTech(c)}).forEach(e)}},a.prototype.buildCSSClass=function(){return""},a.prototype.ready=function(a){var b=arguments.length>1&&void 0!==arguments[1]&&arguments[1];a&&(this.isReady_?b?a.call(this):this.setTimeout(a,1):(this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(a)))},a.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var a=this.readyQueue_;this.readyQueue_=[],a&&a.length>0&&a.forEach(function(a){a.call(this)},this),this.trigger("ready")},1)},a.prototype.$=function(a,b){return Xb(a,b||this.contentEl())},a.prototype.$$=function(a,b){return Yb(a,b||this.contentEl())},a.prototype.hasClass=function(a){return s(this.el_,a)},a.prototype.addClass=function(a){t(this.el_,a)},a.prototype.removeClass=function(a){u(this.el_,a)},a.prototype.toggleClass=function(a,b){v(this.el_,a,b)},a.prototype.show=function(){this.removeClass("vjs-hidden")},a.prototype.hide=function(){this.addClass("vjs-hidden")},a.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},a.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},a.prototype.getAttribute=function(a){return y(this.el_,a)},a.prototype.setAttribute=function(a,b){z(this.el_,a,b)},a.prototype.removeAttribute=function(a){A(this.el_,a)},a.prototype.width=function(a,b){return this.dimension("width",a,b)},a.prototype.height=function(a,b){return this.dimension("height",a,b)},a.prototype.dimensions=function(a,b){this.width(a,!0),this.height(b)},a.prototype.dimension=function(a,b,c){if(void 0!==b)return null!==b&&b===b||(b=0),(""+b).indexOf("%")!==-1||(""+b).indexOf("px")!==-1?this.el_.style[a]=b:"auto"===b?this.el_.style[a]="":this.el_.style[a]=b+"px",void(c||this.trigger("componentresize"));if(!this.el_)return 0;var d=this.el_.style[a],e=d.indexOf("px");return e!==-1?parseInt(d.slice(0,e),10):parseInt(this.el_["offset"+Z(a)],10)},a.prototype.currentDimension=function(a){var b=0;if("width"!==a&&"height"!==a)throw new Error("currentDimension only accepts width or height value");if("function"==typeof gb.getComputedStyle){var c=gb.getComputedStyle(this.el_);b=c.getPropertyValue(a)||c[a]}if(b=parseFloat(b),0===b){var d="offset"+Z(a);b=this.el_[d]}return b},a.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},a.prototype.currentWidth=function(){return this.currentDimension("width")},a.prototype.currentHeight=function(){return this.currentDimension("height")},a.prototype.focus=function(){this.el_.focus()},a.prototype.blur=function(){this.el_.blur()},a.prototype.emitTapEvents=function(){var a=0,b=null,c=10,d=200,e=void 0;this.on("touchstart",function(c){1===c.touches.length&&(b={pageX:c.touches[0].pageX,pageY:c.touches[0].pageY},a=(new Date).getTime(),e=!0)}),this.on("touchmove",function(a){if(a.touches.length>1)e=!1;else if(b){var d=a.touches[0].pageX-b.pageX,f=a.touches[0].pageY-b.pageY,g=Math.sqrt(d*d+f*f);g>c&&(e=!1)}});var f=function(){e=!1};this.on("touchleave",f),this.on("touchcancel",f),this.on("touchend",function(c){if(b=null,e===!0){var f=(new Date).getTime()-a;f
0&&j.map(function(a){return i[a]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return a.components_[b]=c,c},a.getComponent=function(b){if(b)return b=Z(b),a.components_&&a.components_[b]?a.components_[b]:void 0},a}();vc.prototype.supportsRaf_="function"==typeof gb.requestAnimationFrame&&"function"==typeof gb.cancelAnimationFrame,vc.registerComponent("Component",vc);for(var wc={},xc=[["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"]],yc=xc[0],zc=void 0,Ac=0;Ac
0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Kb(this,b);var f=Mb(this,a.call(this));if(!e&&(e=f,Cb)){e=lb.createElement("custom");for(var g in b.prototype)"constructor"!==g&&(e[g]=b.prototype[g])}e.tracks_=[],Object.defineProperty(e,"length",{get:function(){return this.tracks_.length}});for(var h=0;h
0&&void 0!==arguments[0]?arguments[0]:[];Kb(this,b);for(var f=void 0,g=e.length-1;g>=0;g--)if(e[g].enabled){Nc(e,e[g]);break}if(Cb){f=lb.createElement("custom");for(var h in Lc.prototype)"constructor"!==h&&(f[h]=Lc.prototype[h]);for(var i in b.prototype)"constructor"!==i&&(f[i]=b.prototype[i])}return f=c=Mb(this,a.call(this,e,f)),f.changing_=!1,d=f,Mb(c,d)}return Lb(b,a),b.prototype.addTrack=function(b){var c=this;b.enabled&&Nc(this,b),a.prototype.addTrack.call(this,b),b.addEventListener&&b.addEventListener("enabledchange",function(){c.changing_||(c.changing_=!0,Nc(c,b),c.changing_=!1,c.trigger("change"))})},b}(Lc),Pc=function(a,b){for(var c=0;c
0&&void 0!==arguments[0]?arguments[0]:[];Kb(this,b);for(var f=void 0,g=e.length-1;g>=0;g--)if(e[g].selected){Pc(e,e[g]);break}if(Cb){f=lb.createElement("custom");for(var h in Lc.prototype)"constructor"!==h&&(f[h]=Lc.prototype[h]);for(var i in b.prototype)"constructor"!==i&&(f[i]=b.prototype[i])}return f=c=Mb(this,a.call(this,e,f)),f.changing_=!1,Object.defineProperty(f,"selectedIndex",{get:function(){for(var a=0;a
0&&void 0!==arguments[0]?arguments[0]:[];Kb(this,b);var f=void 0;if(Cb){f=lb.createElement("custom");for(var g in Lc.prototype)"constructor"!==g&&(f[g]=Lc.prototype[g]);for(var h in b.prototype)"constructor"!==h&&(f[h]=b.prototype[h])}return f=c=Mb(this,a.call(this,e,f)),d=f,Mb(c,d)}return Lb(b,a),b.prototype.addTrack=function(b){a.prototype.addTrack.call(this,b),b.addEventListener("modechange",jc(this,function(){this.trigger("change")}));var c=["metadata","chapters"];c.indexOf(b.kind)===-1&&b.addEventListener("modechange",jc(this,function(){this.trigger("selectedlanguagechange")}))},b}(Lc),Sc=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Kb(this,a);var c=this;if(Cb){c=lb.createElement("custom");for(var d in a.prototype)"constructor"!==d&&(c[d]=a.prototype[d])}c.trackElements_=[],Object.defineProperty(c,"length",{get:function(){return this.trackElements_.length}});for(var e=0,f=b.length;e
0&&void 0!==arguments[0]?arguments[0]:{};Kb(this,b);var e=Mb(this,a.call(this)),f=e;if(Cb){f=lb.createElement("custom");for(var g in b.prototype)"constructor"!==g&&(f[g]=b.prototype[g])}var h={id:d.id||"vjs_track_"+L(),kind:d.kind||"",label:d.label||"",language:d.language||""},i=function(a){Object.defineProperty(f,a,{get:function(){return h[a]},set:function(){}})};for(var j in h)i(j);return c=f,Mb(e,c)}return Lb(b,a),b}(lc),Zc=function(a){var b=["protocol","hostname","port","pathname","search","hash","host"],c=lb.createElement("a");c.href=a;var d=""===c.host&&"file:"!==c.protocol,e=void 0;d&&(e=lb.createElement("div"),e.innerHTML='
',c=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),lb.body.appendChild(e));for(var f={},g=0;g
x
',a=b.firstChild.href}return a},_c=function(a){if("string"==typeof a){var b=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,c=b.exec(a);if(c)return c.pop().toLowerCase()}return""},ad=function(a){var b=gb.location,c=Zc(a),d=":"===c.protocol?b.protocol:c.protocol,e=d+c.host!==b.protocol+b.host;return e},bd=(Object.freeze||Object)({parseUrl:Zc,getAbsoluteURL:$c,getFileExtension:_c,isCrossOrigin:ad}),cd=ha,dd=Object.prototype.toString,ed=a(function(a,b){function c(a){return a.replace(/^\s*|\s*$/g,"")}b=a.exports=c,b.left=function(a){return a.replace(/^\s*/,"")},b.right=function(a){return a.replace(/\s*$/,"")}}),fd=ia,gd=Object.prototype.toString,hd=Object.prototype.hasOwnProperty,id=function(a){return"[object Array]"===Object.prototype.toString.call(a)},jd=function(a){if(!a)return{};var b={};return fd(ed(a).split("\n"),function(a){var c=a.indexOf(":"),d=ed(a.slice(0,c)).toLowerCase(),e=ed(a.slice(c+1));"undefined"==typeof b[d]?b[d]=e:id(b[d])?b[d].push(e):b[d]=[b[d],e]}),b},kd=ma,ld=Object.prototype.hasOwnProperty,md=qa;qa.XMLHttpRequest=gb.XMLHttpRequest||ta,qa.XDomainRequest="withCredentials"in new qa.XMLHttpRequest?qa.XMLHttpRequest:gb.XDomainRequest,na(["get","put","post","patch","head","delete"],function(a){qa["delete"===a?"del":a]=function(b,c,d){return c=pa(b,c,d),c.method=a.toUpperCase(),ra(c)}});var nd=function(a,b){var c=new gb.WebVTT.Parser(gb,gb.vttjs,gb.WebVTT.StringDecoder()),d=[];c.oncue=function(a){b.addCue(a)},c.onparsingerror=function(a){d.push(a)},c.onflush=function(){b.trigger({type:"loadeddata",target:b})},c.parse(a),d.length>0&&(gb.console&&gb.console.groupCollapsed&&gb.console.groupCollapsed("Text Track parsing errors for "+b.src),d.forEach(function(a){return Ub.error(a)}),gb.console&&gb.console.groupEnd&&gb.console.groupEnd()),c.flush()},od=function(a,b){var c={uri:a},d=ad(a);d&&(c.cors=d),md(c,jc(this,function(a,c,d){if(a)return Ub.error(a,c);if(b.loaded_=!0,"function"!=typeof gb.WebVTT){if(b.tech_){var e=function(){return nd(d,b)};b.tech_.on("vttjsloaded",e),b.tech_.on("vttjserror",function(){Ub.error("vttjs failed to load, stopping trying to process "+b.src),b.tech_.off("vttjsloaded",e)})}}else nd(d,b)}))},pd=function(a){function b(){var c,d,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Kb(this,b),!e.tech)throw new Error("A tech was not provided.");var f=_(e,{kind:Wc[e.kind]||"subtitles",language:e.language||e.srclang||""}),g=Xc[f.mode]||"disabled",h=f["default"];"metadata"!==f.kind&&"chapters"!==f.kind||(g="hidden");var i=c=Mb(this,a.call(this,f));if(i.tech_=f.tech,Cb)for(var j in b.prototype)"constructor"!==j&&(i[j]=b.prototype[j]);i.cues_=[],i.activeCues_=[];var k=new Tc(i.cues_),l=new Tc(i.activeCues_),m=!1,n=jc(i,function(){this.activeCues,m&&(this.trigger("cuechange"),m=!1)});return"disabled"!==g&&i.tech_.ready(function(){i.tech_.on("timeupdate",n)},!0),Object.defineProperty(i,"default",{get:function(){return h},set:function(){}}),Object.defineProperty(i,"mode",{get:function(){return g},set:function(a){var b=this;Xc[a]&&(g=a,"showing"===g&&this.tech_.ready(function(){b.tech_.on("timeupdate",n)},!0),this.trigger("modechange"))}}),Object.defineProperty(i,"cues",{get:function(){return this.loaded_?k:null},set:function(){}}),Object.defineProperty(i,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return l;for(var a=this.tech_.currentTime(),b=[],c=0,d=this.cues.length;c
=a?b.push(e):e.startTime===e.endTime&&e.startTime<=a&&e.startTime+.5>=a&&b.push(e)}if(m=!1,b.length!==this.activeCues_.length)m=!0;else for(var f=0;f
0&&void 0!==arguments[0]?arguments[0]:{};Kb(this,b);var f=_(e,{kind:Vc[e.kind]||""}),g=c=Mb(this,a.call(this,f)),h=!1;if(Cb)for(var i in b.prototype)"constructor"!==i&&(g[i]=b.prototype[i]);return Object.defineProperty(g,"enabled",{get:function(){return h},set:function(a){"boolean"==typeof a&&a!==h&&(h=a,this.trigger("enabledchange"))}}),f.enabled&&(g.enabled=f.enabled),g.loaded_=!0,d=g,Mb(c,d)}return Lb(b,a),b}(Yc),rd=function(a){function b(){var c,d,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Kb(this,b);var f=_(e,{kind:Uc[e.kind]||""}),g=c=Mb(this,a.call(this,f)),h=!1;if(Cb)for(var i in b.prototype)"constructor"!==i&&(g[i]=b.prototype[i]);return Object.defineProperty(g,"selected",{get:function(){return h},set:function(a){"boolean"==typeof a&&a!==h&&(h=a,this.trigger("selectedchange")); }}),f.selected&&(g.selected=f.selected),d=g,Mb(c,d)}return Lb(b,a),b}(Yc),sd=0,td=1,ud=2,vd=3,wd=function(a){function b(){var c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Kb(this,b);var d=Mb(this,a.call(this)),e=void 0,f=d;if(Cb){f=lb.createElement("custom");for(var g in b.prototype)"constructor"!==g&&(f[g]=b.prototype[g])}var h=new pd(c);if(f.kind=h.kind,f.src=h.src,f.srclang=h.language,f.label=h.label,f["default"]=h["default"],Object.defineProperty(f,"readyState",{get:function(){return e}}),Object.defineProperty(f,"track",{get:function(){return h}}),e=sd,h.addEventListener("loadeddata",function(){e=ud,f.trigger({type:"load",target:f})}),Cb){var i;return i=f,Mb(d,i)}return d}return Lb(b,a),b}(lc);wd.prototype.allowedEvents_={load:"load"},wd.NONE=sd,wd.LOADING=td,wd.LOADED=ud,wd.ERROR=vd;var xd={audio:{ListClass:Oc,TrackClass:qd,capitalName:"Audio"},video:{ListClass:Qc,TrackClass:rd,capitalName:"Video"},text:{ListClass:Rc,TrackClass:pd,capitalName:"Text"}};Object.keys(xd).forEach(function(a){xd[a].getterName=a+"Tracks",xd[a].privateName=a+"Tracks_"});var yd={remoteText:{ListClass:Rc,TrackClass:pd,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Sc,TrackClass:wd,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},zd=_(xd,yd);yd.names=Object.keys(yd),xd.names=Object.keys(xd),zd.names=[].concat(yd.names).concat(xd.names);var Ad=Object.create||function(){function a(){}return function(b){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return a.prototype=b,new a}}();ua.prototype=Ad(Error.prototype),ua.prototype.constructor=ua,ua.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},wa.prototype={set:function(a,b){this.get(a)||""===b||(this.values[a]=b)},get:function(a,b,c){return c?this.has(a)?this.values[a]:b[c]:this.has(a)?this.values[a]:b},has:function(a){return a in this.values},alt:function(a,b,c){for(var d=0;d
=0&&b<=100))&&(this.set(a,b),!0)}};var Bd={"&":"&","<":"<",">":">","":"","":""," ":" "},Cd={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Dd={v:"title",lang:"lang"},Ed={rt:"ruby"},Fd=[[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]];Da.prototype.applyStyles=function(a,b){b=b||this.div;for(var c in a)a.hasOwnProperty(c)&&(b.style[c]=a[c])},Da.prototype.formatStyle=function(a,b){return 0===a?0:a+b},Ea.prototype=Ad(Da.prototype),Ea.prototype.constructor=Ea,Fa.prototype.move=function(a,b){switch(b=void 0!==b?b:this.lineHeight,a){case"+x":this.left+=b,this.right+=b;break;case"-x":this.left-=b,this.right-=b;break;case"+y":this.top+=b,this.bottom+=b;break;case"-y":this.top-=b,this.bottom-=b}},Fa.prototype.overlaps=function(a){return this.left
a.left&&this.top
a.top},Fa.prototype.overlapsAny=function(a){for(var b=0;b
=a.top&&this.bottom<=a.bottom&&this.left>=a.left&&this.right<=a.right},Fa.prototype.overlapsOppositeAxis=function(a,b){switch(b){case"+x":return this.left
a.right;case"+y":return this.top
a.bottom}},Fa.prototype.intersectPercentage=function(a){var b=Math.max(0,Math.min(this.right,a.right)-Math.max(this.left,a.left)),c=Math.max(0,Math.min(this.bottom,a.bottom)-Math.max(this.top,a.top)),d=b*c;return d/(this.height*this.width)},Fa.prototype.toCSSCompatValues=function(a){return{top:this.top-a.top,bottom:a.bottom-this.bottom,left:this.left-a.left,right:a.right-this.right,height:this.height,width:this.width}},Fa.getSimpleBoxPosition=function(a){var b=a.div?a.div.offsetHeight:a.tagName?a.offsetHeight:0,c=a.div?a.div.offsetWidth:a.tagName?a.offsetWidth:0,d=a.div?a.div.offsetTop:a.tagName?a.offsetTop:0;a=a.div?a.div.getBoundingClientRect():a.tagName?a.getBoundingClientRect():a;var e={left:a.left,right:a.right,top:a.top||d,height:a.height||b,bottom:a.bottom||d+(a.height||b),width:a.width||c};return e},Ha.StringDecoder=function(){return{decode:function(a){if(!a)return"";if("string"!=typeof a)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(a))}}},Ha.convertCueToDOMTree=function(a,b){return a&&b?za(a,b):null};var Gd=.05,Hd="sans-serif",Id="1.5%";Ha.processCues=function(a,b,c){function d(a){for(var b=0;b
")===-1){f.cue.id=g;continue}case"CUE":try{ya(g,f.cue,f.regionList)}catch(j){f.reportOrThrowError(j),f.cue=null,f.state="BADCUE";continue}f.state="CUETEXT";continue;case"CUETEXT":var k=g.indexOf("-->")!==-1;if(!g||k&&(i=!0)){f.oncue&&f.oncue(f.cue),f.cue=null,f.state="ID";continue}f.cue.text&&(f.cue.text+="\n"),f.cue.text+=g;continue;case"BADCUE":g||(f.state="ID");continue}}}catch(j){f.reportOrThrowError(j),"CUETEXT"===f.state&&f.cue&&f.oncue&&f.oncue(f.cue),f.cue=null,f.state="INITIAL"===f.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var a=this;try{if(a.buffer+=a.decoder.decode(),(a.cue||"HEADER"===a.state)&&(a.buffer+="\n\n",a.parse()),"INITIAL"===a.state)throw new ua(ua.Errors.BadSignature)}catch(b){a.reportOrThrowError(b)}return a.onflush&&a.onflush(),this}};var Jd=Ha,Kd="auto",Ld={"":!0,lr:!0,rl:!0},Md={start:!0,middle:!0,end:!0,left:!0,right:!0};La.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Nd=La,Od={"":!0,up:!0},Pd=Oa,Qd=a(function(a){var b=a.exports={WebVTT:Jd,VTTCue:Nd,VTTRegion:Pd};gb.vttjs=b,gb.WebVTT=b.WebVTT;var c=b.VTTCue,d=b.VTTRegion,e=gb.VTTCue,f=gb.VTTRegion;b.shim=function(){gb.VTTCue=c,gb.VTTRegion=d},b.restore=function(){gb.VTTCue=e,gb.VTTRegion=f},gb.VTTCue||b.shim()}),Rd=function(a){function b(){var c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};Kb(this,b),c.reportTouchActivity=!1;var e=Mb(this,a.call(this,null,c,d));return e.hasStarted_=!1,e.on("playing",function(){this.hasStarted_=!0}),e.on("loadstart",function(){this.hasStarted_=!1}),zd.names.forEach(function(a){var b=zd[a];c&&c[b.getterName]&&(e[b.privateName]=c[b.getterName])}),e.featuresProgressEvents||e.manualProgressOn(),e.featuresTimeupdateEvents||e.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(a){c["native"+a+"Tracks"]===!1&&(e["featuresNative"+a+"Tracks"]=!1)}),c.nativeCaptions===!1||c.nativeTextTracks===!1?e.featuresNativeTextTracks=!1:c.nativeCaptions!==!0&&c.nativeTextTracks!==!0||(e.featuresNativeTextTracks=!0),e.featuresNativeTextTracks||e.emulateTextTracks(),e.autoRemoteTextTracks_=new zd.text.ListClass,e.initTrackListeners(),c.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.name_=e.constructor.name||"Unknown Tech"),e}return Lb(b,a),b.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},b.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},b.prototype.trackProgress=function(a){this.stopTrackingProgress(),this.progressInterval=this.setInterval(jc(this,function(){var a=this.bufferedPercent();this.bufferedPercent_!==a&&this.trigger("progress"),this.bufferedPercent_=a,1===a&&this.stopTrackingProgress()}),500)},b.prototype.onDurationChange=function(a){this.duration_=this.duration()},b.prototype.buffered=function(){return da(0,0)},b.prototype.bufferedPercent=function(){return ea(this.buffered(),this.duration_)},b.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},b.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},b.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},b.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},b.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},b.prototype.dispose=function(){this.clearTracks(xd.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),a.prototype.dispose.call(this)},b.prototype.clearTracks=function(a){var b=this;a=[].concat(a),a.forEach(function(a){for(var c=b[a+"Tracks"]()||[],d=c.length;d--;){var e=c[d];"text"===a&&b.removeRemoteTextTrack(e),c.removeTrack(e)}})},b.prototype.cleanupAutoTextTracks=function(){for(var a=this.autoRemoteTextTracks_||[],b=a.length;b--;){var c=a[b];this.removeRemoteTextTrack(c)}},b.prototype.reset=function(){},b.prototype.error=function(a){return void 0!==a&&(this.error_=new fa(a),this.trigger("error")),this.error_},b.prototype.played=function(){return this.hasStarted_?da(0,0):da()},b.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},b.prototype.initTrackListeners=function(){var a=this;xd.names.forEach(function(b){var c=xd[b],d=function(){a.trigger(b+"trackchange")},e=a[c.getterName]();e.addEventListener("removetrack",d),e.addEventListener("addtrack",d),a.on("dispose",function(){e.removeEventListener("removetrack",d),e.removeEventListener("addtrack",d)})})},b.prototype.addWebVttScript_=function(){var a=this;if(!gb.WebVTT)if(lb.body.contains(this.el())){if(!this.options_["vtt.js"]&&f(Qd)&&Object.keys(Qd).length>0)return void this.trigger("vttjsloaded");var b=lb.createElement("script");b.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",b.onload=function(){a.trigger("vttjsloaded")},b.onerror=function(){a.trigger("vttjserror")},this.on("dispose",function(){b.onload=null,b.onerror=null}),gb.WebVTT=!0,this.el().parentNode.appendChild(b)}else this.ready(this.addWebVttScript_)},b.prototype.emulateTextTracks=function(){var a=this,b=this.textTracks(),c=this.remoteTextTracks(),d=function(a){return b.addTrack(a.track)},e=function(a){return b.removeTrack(a.track)};c.on("addtrack",d),c.on("removetrack",e),this.addWebVttScript_();var f=function(){return a.trigger("texttrackchange")},g=function(){f();for(var a=0;a
0&&void 0!==arguments[0]?arguments[0]:{},c=arguments[1],d=this.createRemoteTextTrack(b);return c!==!0&&c!==!1&&(Ub.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),c=!0),this.remoteTextTrackEls().addTrackElement_(d),this.remoteTextTracks().addTrack(d.track),c!==!0&&this.ready(function(){return a.autoRemoteTextTracks_.addTrack(d.track)}),d},b.prototype.removeRemoteTextTrack=function(a){var b=this.remoteTextTrackEls().getTrackElementByTrack_(a);this.remoteTextTrackEls().removeTrackElement_(b),this.remoteTextTracks().removeTrack(a),this.autoRemoteTextTracks_.removeTrack(a)},b.prototype.getVideoPlaybackQuality=function(){return{}},b.prototype.setPoster=function(){},b.prototype.playsinline=function(){},b.prototype.setPlaysinline=function(){},b.prototype.canPlayType=function(){return""},b.canPlayType=function(){return""},b.canPlaySource=function(a,c){return b.canPlayType(a.type)},b.isTech=function(a){return a.prototype instanceof b||a instanceof b||a===b},b.registerTech=function(a,c){if(b.techs_||(b.techs_={}),!b.isTech(c))throw new Error("Tech "+a+" must be a Tech");if(!b.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!b.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return a=Z(a),b.techs_[a]=c,"Tech"!==a&&b.defaultTechOrder_.push(a),c},b.getTech=function(a){if(a)return a=Z(a),b.techs_&&b.techs_[a]?b.techs_[a]:gb&&gb.videojs&&gb.videojs[a]?(Ub.warn("The "+a+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),gb.videojs[a]):void 0},b}(vc);zd.names.forEach(function(a){var b=zd[a];Rd.prototype[b.getterName]=function(){return this[b.privateName]=this[b.privateName]||new b.ListClass,this[b.privateName]}}),Rd.prototype.featuresVolumeControl=!0,Rd.prototype.featuresFullscreenResize=!1,Rd.prototype.featuresPlaybackRate=!1,Rd.prototype.featuresProgressEvents=!1,Rd.prototype.featuresTimeupdateEvents=!1,Rd.prototype.featuresNativeTextTracks=!1,Rd.withSourceHandlers=function(a){a.registerSourceHandler=function(b,c){var d=a.sourceHandlers;d||(d=a.sourceHandlers=[]),void 0===c&&(c=d.length),d.splice(c,0,b)},a.canPlayType=function(b){for(var c=a.sourceHandlers||[],d=void 0,e=0;e
0&&void 0!==arguments[0]?arguments[0]:"div",c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};c=d({innerHTML:'
',className:this.buildCSSClass(),tabIndex:0},c),"button"===b&&Ub.error("Creating a ClickableComponent with an HTML element of "+b+" is not supported; use a Button instead."),e=d({role:"button","aria-live":"polite"},e),this.tabIndex_=c.tabIndex;var f=a.prototype.createEl.call(this,b,c,e);return this.createControlTextEl(f),f},b.prototype.createControlTextEl=function(a){return this.controlTextEl_=p("span",{className:"vjs-control-text"}),a&&a.appendChild(this.controlTextEl_),this.controlText(this.controlText_,a),this.controlTextEl_},b.prototype.controlText=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(!a)return this.controlText_||"Need Text";var c=this.localize(a);this.controlText_=a,q(this.controlTextEl_,c),this.nonIconControl||b.setAttribute("title",c)},b.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+a.prototype.buildCSSClass.call(this)},b.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))},b.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)},b.prototype.handleClick=function(a){},b.prototype.handleFocus=function(a){S(lb,"keydown",jc(this,this.handleKeyPress))},b.prototype.handleKeyPress=function(b){32===b.which||13===b.which?(b.preventDefault(),this.trigger("click")):a.prototype.handleKeyPress&&a.prototype.handleKeyPress.call(this,b)},b.prototype.handleBlur=function(a){T(lb,"keydown",jc(this,this.handleKeyPress))},b}(vc);vc.registerComponent("ClickableComponent",Xd);var Yd=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.update(),c.on("posterchange",jc(e,e.update)),e}return Lb(b,a),b.prototype.dispose=function(){this.player().off("posterchange",this.update),a.prototype.dispose.call(this)},b.prototype.createEl=function(){var a=p("div",{className:"vjs-poster",tabIndex:-1});return Hb||(this.fallbackImg_=p("img"),a.appendChild(this.fallbackImg_)),a},b.prototype.update=function(a){var b=this.player().poster();this.setSrc(b),b?this.show():this.hide()},b.prototype.setSrc=function(a){if(this.fallbackImg_)this.fallbackImg_.src=a;else{var b="";a&&(b='url("'+a+'")'),this.el_.style.backgroundImage=b}},b.prototype.handleClick=function(a){this.player_.controls()&&(this.player_.paused()?this.player_.play():this.player_.pause())},b}(Xd);vc.registerComponent("PosterImage",Yd);var Zd="#222",$d="#ccc",_d={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'},ae=function(a){function b(c,d,e){Kb(this,b);var f=Mb(this,a.call(this,c,d,e));return c.on("loadstart",jc(f,f.toggleDisplay)),c.on("texttrackchange",jc(f,f.updateDisplay)),c.on("loadstart",jc(f,f.preselectTrack)),c.ready(jc(f,function(){if(c.tech_&&c.tech_.featuresNativeTextTracks)return void this.hide();c.on("fullscreenchange",jc(this,this.updateDisplay));for(var a=this.options_.playerOptions.tracks||[],b=0;b
1&&void 0!==arguments[1]?arguments[1]:{},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a="button",b=d({innerHTML:'
',className:this.buildCSSClass()},b),c=d({type:"button","aria-live":"polite"},c);var e=vc.prototype.createEl.call(this,a,b,c);return this.createControlTextEl(e),e},b.prototype.addChild=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=this.constructor.name;return Ub.warn("Adding an actionable (user controllable) child to a Button ("+c+") is not supported; use a ClickableComponent instead."),vc.prototype.addChild.call(this,a,b)},b.prototype.enable=function(){a.prototype.enable.call(this),this.el_.removeAttribute("disabled")},b.prototype.disable=function(){a.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},b.prototype.handleKeyPress=function(b){32!==b.which&&13!==b.which&&a.prototype.handleKeyPress.call(this,b)},b}(Xd);vc.registerComponent("Button",ce);var de=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.mouseused_=!1,e.on("mousedown",e.handleMouseDown),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-big-play-button"},b.prototype.handleClick=function(a){var b=this.player_.play();if(!(this.mouseused_&&a.clientX&&a.clientY)){var c=this.player_.getChild("controlBar"),d=c&&c.getChild("playToggle");if(!d)return void this.player_.focus();var e=function(){return d.focus()};if(b&&b.then){var f=function(){};b.then(e,f)}else this.setTimeout(e,1)}},b.prototype.handleKeyPress=function(b){this.mouseused_=!1,a.prototype.handleKeyPress.call(this,b)},b.prototype.handleMouseDown=function(a){this.mouseused_=!0},b}(ce);de.prototype.controlText_="Play Video",vc.registerComponent("BigPlayButton",de);var ee=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.controlText(d&&d.controlText||e.localize("Close")),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-close-button "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(a){this.trigger({type:"close",bubbles:!1})},b}(ce);vc.registerComponent("CloseButton",ee);var fe=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.on(c,"play",e.handlePlay),e.on(c,"pause",e.handlePause),e.on(c,"ended",e.handleEnded),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-play-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(a){this.player_.paused()?this.player_.play():this.player_.pause()},b.prototype.handleSeeked=function(a){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(a):this.handlePlay(a)},b.prototype.handlePlay=function(a){this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},b.prototype.handlePause=function(a){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},b.prototype.handleEnded=function(a){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},b}(ce);fe.prototype.controlText_="Play",vc.registerComponent("PlayToggle",fe);var ge=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.throttledUpdateContent=kc(jc(e,e.updateContent),25),e.on(c,"timeupdate",e.throttledUpdateContent),e}return Lb(b,a),b.prototype.createEl=function(b){var c=this.buildCSSClass(),d=a.prototype.createEl.call(this,"div",{className:c+" vjs-time-control vjs-control"});return this.contentEl_=p("div",{className:c+"-display"},{"aria-live":"off"},p("span",{className:"vjs-control-text",textContent:this.localize(this.contentText_)})),this.updateTextNode_(),d.appendChild(this.contentEl_),d},b.prototype.updateTextNode_=function(){this.textNode_&&this.contentEl_.removeChild(this.textNode_),this.textNode_=lb.createTextNode(this.formattedTime_||"0:00"),this.contentEl_.appendChild(this.textNode_)},b.prototype.formatTime_=function(a){return Za(a)},b.prototype.updateFormattedTime_=function(a){var b=this.formatTime_(a);b!==this.formattedTime_&&(this.formattedTime_=b,this.requestAnimationFrame(this.updateTextNode_))},b.prototype.updateContent=function(a){},b}(vc);ge.prototype.controlText_="Time",vc.registerComponent("TimeDisplay",ge); var he=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.on(c,"ended",e.handleEnded),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-current-time"},b.prototype.updateContent=function(a){var b=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(b)},b.prototype.handleEnded=function(a){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},b}(ge);he.prototype.controlText_="Current Time",vc.registerComponent("CurrentTimeDisplay",he);var ie=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.on(c,["durationchange","loadedmetadata"],e.throttledUpdateContent),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-duration"},b.prototype.updateContent=function(a){var b=this.player_.duration();b&&this.duration_!==b&&(this.duration_=b,this.updateFormattedTime_(b))},b}(ge);ie.prototype.controlText_="Duration Time",vc.registerComponent("DurationDisplay",ie);var je=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"
/
"})},b}(vc);vc.registerComponent("TimeDivider",je);var ke=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.on(c,"durationchange",e.throttledUpdateContent),e.on(c,"ended",e.handleEnded),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-remaining-time"},b.prototype.formatTime_=function(b){return"-"+a.prototype.formatTime_.call(this,b)},b.prototype.updateContent=function(a){this.player_.duration()&&this.updateFormattedTime_(this.player_.remainingTimeDisplay())},b.prototype.handleEnded=function(a){this.player_.duration()&&this.updateFormattedTime_(0)},b}(ge);ke.prototype.controlText_="Remaining Time",vc.registerComponent("RemainingTimeDisplay",ke);var le=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.updateShowing(),e.on(e.player(),"durationchange",e.updateShowing),e}return Lb(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=p("div",{className:"vjs-live-display",innerHTML:'
'+this.localize("Stream Type")+"
"+this.localize("LIVE")},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateShowing=function(a){this.player().duration()===1/0?this.show():this.hide()},b}(vc);vc.registerComponent("LiveDisplay",le);var me=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.bar=e.getChild(e.options_.barName),e.vertical(!!e.options_.vertical),e.on("mousedown",e.handleMouseDown),e.on("touchstart",e.handleMouseDown),e.on("focus",e.handleFocus),e.on("blur",e.handleBlur),e.on("click",e.handleClick),e.on(c,"controlsvisible",e.update),e.playerEvent&&e.on(c,e.playerEvent,e.update),e}return Lb(b,a),b.prototype.createEl=function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return c.className=c.className+" vjs-slider",c=d({tabIndex:0},c),e=d({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},e),a.prototype.createEl.call(this,b,c,e)},b.prototype.handleMouseDown=function(a){var b=this.bar.el_.ownerDocument;a.preventDefault(),B(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(b,"mousemove",this.handleMouseMove),this.on(b,"mouseup",this.handleMouseUp),this.on(b,"touchmove",this.handleMouseMove),this.on(b,"touchend",this.handleMouseUp),this.handleMouseMove(a)},b.prototype.handleMouseMove=function(a){},b.prototype.handleMouseUp=function(){var a=this.bar.el_.ownerDocument;C(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(a,"mousemove",this.handleMouseMove),this.off(a,"mouseup",this.handleMouseUp),this.off(a,"touchmove",this.handleMouseMove),this.off(a,"touchend",this.handleMouseUp),this.update()},b.prototype.update=function(){if(this.el_){var a=this.getPercent(),b=this.bar;if(b){("number"!=typeof a||a!==a||a<0||a===1/0)&&(a=0);var c=(100*a).toFixed(2)+"%",d=b.el().style;return this.vertical()?d.height=c:d.width=c,a}}},b.prototype.calculateDistance=function(a){var b=F(this.el_,a);return this.vertical()?b.y:b.x},b.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},b.prototype.handleKeyPress=function(a){37===a.which||40===a.which?(a.preventDefault(),this.stepBack()):38!==a.which&&39!==a.which||(a.preventDefault(),this.stepForward())},b.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},b.prototype.handleClick=function(a){a.stopImmediatePropagation(),a.preventDefault()},b.prototype.vertical=function(a){return void 0===a?this.vertical_||!1:(this.vertical_=!!a,void(this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")))},b}(vc);vc.registerComponent("Slider",me);var ne=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.partEls_=[],e.on(c,"progress",e.update),e}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'
'+this.localize("Loaded")+"
: 0%
"})},b.prototype.update=function(a){var b=this.player_.buffered(),c=this.player_.duration(),d=this.player_.bufferedEnd(),e=this.partEls_,f=function(a,b){var c=a/b||0;return 100*(c>=1?1:c)+"%"};this.el_.style.width=f(d,c);for(var g=0;g
b.length;k--)this.el_.removeChild(e[k-1]);e.length=b.length},b}(vc);vc.registerComponent("LoadProgressBar",ne);var oe=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},b.prototype.update=function(a,b,c){var d=D(this.el_),e=D(this.player_.el()),f=a.width*b;if(e&&d){var g=a.left-e.left+f,h=a.width-f+(e.right-a.right),i=d.width/2;g
d.width&&(i=d.width),this.el_.style.right="-"+i+"px",q(this.el_,c)}},b}(vc);vc.registerComponent("TimeTooltip",oe);var pe=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'
'+this.localize("Progress")+"
: 0%
"})},b.prototype.update=function(a,b){var c=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var d=c.player_.scrubbing()?c.player_.getCache().currentTime:c.player_.currentTime(),e=Za(d,c.player_.duration()),f=c.getChild("timeTooltip");f&&f.update(a,b,e)})},b}(vc);pe.prototype.options_={children:[]},Db&&!(Db>8)||sb||ub||pe.prototype.options_.children.push("timeTooltip"),vc.registerComponent("PlayProgressBar",pe);var qe=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.update=kc(jc(e,e.update),25),e}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},b.prototype.update=function(a,b){var c=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var d=c.player_.duration(),e=Za(b*d,d);c.el_.style.left=a.width*b+"px",c.getChild("timeTooltip").update(a,b,e)})},b}(vc);qe.prototype.options_={children:["timeTooltip"]},vc.registerComponent("MouseTimeDisplay",qe);var re=5,se=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.update=kc(jc(e,e.update),50),e.on(c,["timeupdate","ended"],e.update),e}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},b.prototype.update=function(){var b=a.prototype.update.call(this),c=this.player_.duration(),d=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();return this.el_.setAttribute("aria-valuenow",(100*b).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Za(d,c),Za(c,c)],"{1} of {2}")),this.bar.update(D(this.el_),b),b},b.prototype.getPercent=function(){var a=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),b=a/this.player_.duration();return b>=1?1:b},b.prototype.handleMouseDown=function(b){this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),a.prototype.handleMouseDown.call(this,b)},b.prototype.handleMouseMove=function(a){var b=this.calculateDistance(a)*this.player_.duration();b===this.player_.duration()&&(b-=.1),this.player_.currentTime(b)},b.prototype.handleMouseUp=function(b){a.prototype.handleMouseUp.call(this,b),this.player_.scrubbing(!1),this.videoWasPlaying&&this.player_.play()},b.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+re)},b.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-re)},b.prototype.handleAction=function(a){this.player_.paused()?this.player_.play():this.player_.pause()},b.prototype.handleKeyPress=function(b){32===b.which||13===b.which?(b.preventDefault(),this.handleAction(b)):a.prototype.handleKeyPress&&a.prototype.handleKeyPress.call(this,b)},b}(me);se.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Db&&!(Db>8)||sb||ub||se.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),se.prototype.playerEvent="timeupdate",vc.registerComponent("SeekBar",se);var te=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.handleMouseMove=kc(jc(e,e.handleMouseMove),25),e.on(e.el_,"mousemove",e.handleMouseMove),e.throttledHandleMouseSeek=kc(jc(e,e.handleMouseSeek),25),e.on(["mousedown","touchstart"],e.handleMouseDown),e}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},b.prototype.handleMouseMove=function(a){var b=this.getChild("seekBar"),c=b.getChild("mouseTimeDisplay"),d=b.el(),e=D(d),f=F(d,a).x;f>1?f=1:f<0&&(f=0),c&&c.update(e,f)},b.prototype.handleMouseSeek=function(a){var b=this.getChild("seekBar");b.handleMouseMove(a)},b.prototype.handleMouseDown=function(a){var b=this.el_.ownerDocument;this.on(b,"mousemove",this.throttledHandleMouseSeek),this.on(b,"touchmove",this.throttledHandleMouseSeek),this.on(b,"mouseup",this.handleMouseUp),this.on(b,"touchend",this.handleMouseUp)},b.prototype.handleMouseUp=function(a){var b=this.el_.ownerDocument;this.off(b,"mousemove",this.throttledHandleMouseSeek),this.off(b,"touchmove",this.throttledHandleMouseSeek),this.off(b,"mouseup",this.handleMouseUp),this.off(b,"touchend",this.handleMouseUp)},b}(vc);te.prototype.options_={children:["seekBar"]},vc.registerComponent("ProgressControl",te);var ue=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.on(c,"fullscreenchange",e.handleFullscreenChange),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleFullscreenChange=function(a){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},b.prototype.handleClick=function(a){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},b}(ce);ue.prototype.controlText_="Fullscreen",vc.registerComponent("FullscreenToggle",ue);var ve=function(a,b){b.tech_&&!b.tech_.featuresVolumeControl&&a.addClass("vjs-hidden"),a.on(b,"loadstart",function(){b.tech_.featuresVolumeControl?a.removeClass("vjs-hidden"):a.addClass("vjs-hidden")})},we=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'
'})},b}(vc);vc.registerComponent("VolumeLevel",we);var xe=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.on("slideractive",e.updateLastVolume_),e.on(c,"volumechange",e.updateARIAAttributes),c.ready(function(){return e.updateARIAAttributes()}),e}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},b.prototype.handleMouseMove=function(a){this.checkMuted(),this.player_.volume(this.calculateDistance(a))},b.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},b.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},b.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},b.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},b.prototype.updateARIAAttributes=function(a){var b=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",b),this.el_.setAttribute("aria-valuetext",b+"%")},b.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},b.prototype.updateLastVolume_=function(){var a=this,b=this.player_.volume();this.one("sliderinactive",function(){0===a.player_.volume()&&a.player_.lastVolume_(b)})},b}(me);xe.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},xe.prototype.playerEvent="volumechange",vc.registerComponent("VolumeBar",xe);var ye=function(a){function b(c){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Kb(this,b),d.vertical=d.vertical||!1,("undefined"==typeof d.volumeBar||f(d.volumeBar))&&(d.volumeBar=d.volumeBar||{},d.volumeBar.vertical=d.vertical);var e=Mb(this,a.call(this,c,d));return ve(e,c),e.throttledHandleMouseMove=kc(jc(e,e.handleMouseMove),25),e.on("mousedown",e.handleMouseDown),e.on("touchstart",e.handleMouseDown),e.on(e.volumeBar,["focus","slideractive"],function(){e.volumeBar.addClass("vjs-slider-active"),e.addClass("vjs-slider-active"),e.trigger("slideractive")}),e.on(e.volumeBar,["blur","sliderinactive"],function(){e.volumeBar.removeClass("vjs-slider-active"),e.removeClass("vjs-slider-active"),e.trigger("sliderinactive")}),e}return Lb(b,a),b.prototype.createEl=function(){var b="vjs-volume-horizontal";return this.options_.vertical&&(b="vjs-volume-vertical"),a.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+b})},b.prototype.handleMouseDown=function(a){var b=this.el_.ownerDocument;this.on(b,"mousemove",this.throttledHandleMouseMove),this.on(b,"touchmove",this.throttledHandleMouseMove),this.on(b,"mouseup",this.handleMouseUp),this.on(b,"touchend",this.handleMouseUp)},b.prototype.handleMouseUp=function(a){var b=this.el_.ownerDocument;this.off(b,"mousemove",this.throttledHandleMouseMove),this.off(b,"touchmove",this.throttledHandleMouseMove),this.off(b,"mouseup",this.handleMouseUp),this.off(b,"touchend",this.handleMouseUp)},b.prototype.handleMouseMove=function(a){this.volumeBar.handleMouseMove(a)},b}(vc);ye.prototype.options_={children:["volumeBar"]},vc.registerComponent("VolumeControl",ye);var ze=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return ve(e,c),e.on(c,["loadstart","volumechange"],e.update),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-mute-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(a){var b=this.player_.volume(),c=this.player_.lastVolume_();if(0===b){var d=c<.1?.1:c;this.player_.volume(d),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},b.prototype.update=function(a){this.updateIcon_(),this.updateControlText_()},b.prototype.updateIcon_=function(){var a=this.player_.volume(),b=3;0===a||this.player_.muted()?b=0:a<.33?b=1:a<.67&&(b=2);for(var c=0;c<4;c++)u(this.el_,"vjs-vol-"+c);t(this.el_,"vjs-vol-"+b)},b.prototype.updateControlText_=function(){var a=this.player_.muted()||0===this.player_.volume(),b=a?"Unmute":"Mute";this.controlText()!==b&&this.controlText(b)},b}(ce);ze.prototype.controlText_="Mute",vc.registerComponent("MuteToggle",ze);var Ae=function(a){function b(c){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Kb(this,b),"undefined"!=typeof d.inline?d.inline=d.inline:d.inline=!0,("undefined"==typeof d.volumeControl||f(d.volumeControl))&&(d.volumeControl=d.volumeControl||{},d.volumeControl.vertical=!d.inline);var e=Mb(this,a.call(this,c,d));return ve(e,c),e.on(e.volumeControl,["slideractive"],e.sliderActive_),e.on(e.muteToggle,"focus",e.sliderActive_),e.on(e.volumeControl,["sliderinactive"],e.sliderInactive_),e.on(e.muteToggle,"blur",e.sliderInactive_),e}return Lb(b,a),b.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},b.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},b.prototype.createEl=function(){var b="vjs-volume-panel-horizontal";return this.options_.inline||(b="vjs-volume-panel-vertical"),a.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+b})},b}(vc);Ae.prototype.options_={children:["muteToggle","volumeControl"]},vc.registerComponent("VolumePanel",Ae);var Be=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return d&&(e.menuButton_=d.menuButton),e.focusedChild_=-1,e.on("keydown",e.handleKeyPress),e}return Lb(b,a),b.prototype.addItem=function(a){this.addChild(a),a.on("click",jc(this,function(b){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==a.name()&&this.menuButton_.focus())}))},b.prototype.createEl=function(){var b=this.options_.contentElType||"ul";this.contentEl_=p(b,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var c=a.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return c.appendChild(this.contentEl_),S(c,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),c},b.prototype.handleKeyPress=function(a){37===a.which||40===a.which?(a.preventDefault(),this.stepForward()):38!==a.which&&39!==a.which||(a.preventDefault(),this.stepBack())},b.prototype.stepForward=function(){var a=0;void 0!==this.focusedChild_&&(a=this.focusedChild_+1),this.focus(a)},b.prototype.stepBack=function(){var a=0;void 0!==this.focusedChild_&&(a=this.focusedChild_-1),this.focus(a)},b.prototype.focus=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,b=this.children().slice(),c=b.length&&b[0].className&&/vjs-menu-title/.test(b[0].className);c&&b.shift(),b.length>0&&(a<0?a=0:a>=b.length&&(a=b.length-1),this.focusedChild_=a,b[a].el_.focus())},b}(vc);vc.registerComponent("Menu",Be);var Ce=function(a){function b(c){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Kb(this,b);var e=Mb(this,a.call(this,c,d));e.menuButton_=new ce(c,d),e.menuButton_.controlText(e.controlText_),e.menuButton_.el_.setAttribute("aria-haspopup","true");var f=ce.prototype.buildCSSClass();return e.menuButton_.el_.className=e.buildCSSClass()+" "+f,e.menuButton_.removeClass("vjs-control"),e.addChild(e.menuButton_),e.update(),e.enabled_=!0,e.on(e.menuButton_,"tap",e.handleClick),e.on(e.menuButton_,"click",e.handleClick),e.on(e.menuButton_,"focus",e.handleFocus),e.on(e.menuButton_,"blur",e.handleBlur),e.on("keydown",e.handleSubmenuKeyPress),e}return Lb(b,a),b.prototype.update=function(){var a=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=a,this.addChild(a),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},b.prototype.createMenu=function(){var a=new Be(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var b=p("li",{className:"vjs-menu-title",innerHTML:Z(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,a.children_.unshift(b),r(b,a.contentEl())}if(this.items=this.createItems(),this.items)for(var c=0;c
1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(a,b)},b.prototype.handleClick=function(a){this.one(this.menu.contentEl(),"mouseleave",jc(this,function(a){this.unpressButton(),this.el_.blur()})),this.buttonPressed_?this.unpressButton():this.pressButton()},b.prototype.focus=function(){this.menuButton_.focus()},b.prototype.blur=function(){this.menuButton_.blur()},b.prototype.handleFocus=function(){S(lb,"keydown",jc(this,this.handleKeyPress))},b.prototype.handleBlur=function(){T(lb,"keydown",jc(this,this.handleKeyPress))},b.prototype.handleKeyPress=function(a){27===a.which||9===a.which?(this.buttonPressed_&&this.unpressButton(),9!==a.which&&(a.preventDefault(),this.menuButton_.el_.focus())):38!==a.which&&40!==a.which||this.buttonPressed_||(this.pressButton(),a.preventDefault())},b.prototype.handleSubmenuKeyPress=function(a){27!==a.which&&9!==a.which||(this.buttonPressed_&&this.unpressButton(),9!==a.which&&(a.preventDefault(),this.menuButton_.el_.focus()))},b.prototype.pressButton=function(){this.enabled_&&(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),sb||n()||this.menu.focus())},b.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},b.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},b.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},b}(vc);vc.registerComponent("MenuButton",Ce);var De=function(a){function b(c,d){Kb(this,b);var e=d.tracks,f=Mb(this,a.call(this,c,d));if(f.items.length<=1&&f.hide(),!e)return Mb(f);var g=jc(f,f.update);return e.addEventListener("removetrack",g),e.addEventListener("addtrack",g),f.player_.on("ready",g),f.player_.on("dispose",function(){e.removeEventListener("removetrack",g),e.removeEventListener("addtrack",g)}),f}return Lb(b,a),b}(Ce);vc.registerComponent("TrackButton",De);var Ee=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.selectable=d.selectable,e.selected(d.selected),e.selectable?e.el_.setAttribute("role","menuitemcheckbox"):e.el_.setAttribute("role","menuitem"),e}return Lb(b,a),b.prototype.createEl=function(b,c,e){return this.nonIconControl=!0,a.prototype.createEl.call(this,"li",d({className:"vjs-menu-item",innerHTML:'
'+this.localize(this.options_.label)+"
",tabIndex:-1},c),e)},b.prototype.handleClick=function(a){this.selected(!0)},b.prototype.selected=function(a){this.selectable&&(a?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(" ")))},b}(Xd);vc.registerComponent("MenuItem",Ee);var Fe=function(a){function b(c,d){Kb(this,b);var e=d.track,f=c.textTracks();d.label=e.label||e.language||"Unknown",d.selected="showing"===e.mode;var g=Mb(this,a.call(this,c,d));g.track=e;var h=jc(g,g.handleTracksChange),i=jc(g,g.handleSelectedLanguageChange);if(c.on(["loadstart","texttrackchange"],h),f.addEventListener("change",h),f.addEventListener("selectedlanguagechange",i),g.on("dispose",function(){f.removeEventListener("change",h),f.removeEventListener("selectedlanguagechange",i)}),void 0===f.onchange){var j=void 0;g.on(["tap","click"],function(){if("object"!==Jb(gb.Event))try{j=new gb.Event("change")}catch(a){}j||(j=lb.createEvent("Event"),j.initEvent("change",!0,!0)),f.dispatchEvent(j)})}return g}return Lb(b,a),b.prototype.handleClick=function(b){var c=this.track.kind,d=this.track.kinds,e=this.player_.textTracks();if(d||(d=[c]),a.prototype.handleClick.call(this,b),e)for(var f=0;f
-1?"showing"!==g.mode&&(g.mode="showing"):"disabled"!==g.mode&&(g.mode="disabled")}},b.prototype.handleTracksChange=function(a){this.selected("showing"===this.track.mode)},b.prototype.handleSelectedLanguageChange=function(a){if("showing"===this.track.mode){var b=this.player_.cache_.selectedLanguage;if(b&&b.enabled&&b.language===this.track.language&&b.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},b}(Ee);vc.registerComponent("TextTrackMenuItem",Fe);var Ge=function(a){function b(c,d){Kb(this,b),d.track={player:c,kind:d.kind,kinds:d.kinds,"default":!1,mode:"disabled"},d.kinds||(d.kinds=[d.kind]),d.label?d.track.label=d.label:d.track.label=d.kinds.join(" and ")+" off",d.selectable=!0;var e=Mb(this,a.call(this,c,d));return e.selected(!0),e}return Lb(b,a),b.prototype.handleTracksChange=function(a){for(var b=this.player().textTracks(),c=!0,d=0,e=b.length;d
-1&&"showing"===f.mode){c=!1;break}}this.selected(c)},b.prototype.handleSelectedLanguageChange=function(a){for(var b=this.player().textTracks(),c=!0,d=0,e=b.length;d
-1&&"showing"===f.mode){c=!1;break}}c&&(this.player_.cache_.selectedLanguage={enabled:!1})},b}(Fe);vc.registerComponent("OffTextTrackMenuItem",Ge);var He=function(a){function b(c){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Kb(this,b),d.tracks=c.textTracks(),Mb(this,a.call(this,c,d))}return Lb(b,a),b.prototype.createItems=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fe,c=void 0;this.label_&&(c=this.label_+" off"),a.push(new Ge(this.player_,{kinds:this.kinds_,kind:this.kind_,label:c})),this.hideThreshold_+=1;var d=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var e=0;e
-1){var g=new b(this.player_,{track:f,selectable:!0});g.addClass("vjs-"+f.kind+"-menu-item"),a.push(g)}}return a},b}(De);vc.registerComponent("TextTrackButton",He);var Ie=function(a){function b(c,d){Kb(this,b);var e=d.track,f=d.cue,g=c.currentTime();d.selectable=!0,d.label=f.text,d.selected=f.startTime<=g&&g
=0;b--){var c=a[b];if(c.kind===this.kind_)return c}},b.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Z(this.kind_))},b.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),a.prototype.createMenu.call(this)},b.prototype.createItems=function(){var a=[];if(!this.track_)return a;var b=this.track_.cues;if(!b)return a;for(var c=0,d=b.length;c
\n
'+this.localize("Captions")+"
\n "),f+="";var g=a.prototype.createEl.call(this,b,d({innerHTML:f},c),e);return g},b}(Fe);vc.registerComponent("SubsCapsMenuItem",Oe);var Pe=function(a){function b(c){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(e.player_.language_)>-1&&(e.label_="captions"),e.menuButton_.controlText(Z(e.label_)),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+a.prototype.buildCSSClass.call(this)},b.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+a.prototype.buildWrapperCSSClass.call(this)},b.prototype.createItems=function(){var b=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||(b.push(new Me(this.player_,{kind:this.label_})),this.hideThreshold_+=1),b=a.prototype.createItems.call(this,b,Oe)},b}(He);Pe.prototype.kinds_=["captions","subtitles"],Pe.prototype.controlText_="Subtitles",vc.registerComponent("SubsCapsButton",Pe);var Qe=function(a){function b(c,d){Kb(this,b);var e=d.track,f=c.audioTracks();d.label=e.label||e.language||"Unknown",d.selected=e.enabled;var g=Mb(this,a.call(this,c,d));g.track=e;var h=jc(g,g.handleTracksChange);return f.addEventListener("change",h),g.on("dispose",function(){f.removeEventListener("change",h)}),g}return Lb(b,a),b.prototype.handleClick=function(b){var c=this.player_.audioTracks();a.prototype.handleClick.call(this,b);for(var d=0;d
1&&void 0!==arguments[1]?arguments[1]:{};return Kb(this,b),d.tracks=c.audioTracks(),Mb(this,a.call(this,c,d))}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-audio-button "+a.prototype.buildCSSClass.call(this)},b.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+a.prototype.buildWrapperCSSClass.call(this)},b.prototype.createItems=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var b=this.player_.audioTracks(),c=0;c
=0;c--)a.addChild(new Se(this.player(),{rate:b[c]+"x"}));return a},b.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},b.prototype.handleClick=function(a){for(var b=this.player().playbackRate(),c=this.playbackRates(),d=c[0],e=0;e
b){d=c[e];break}this.player().playbackRate(d)},b.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},b.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},b.prototype.updateVisibility=function(a){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},b.prototype.updateLabel=function(a){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},b}(Ce);Te.prototype.controlText_="Playback Rate",vc.registerComponent("PlaybackRateMenuButton",Te);var Ue=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-spacer "+a.prototype.buildCSSClass.call(this)},b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},b}(vc);vc.registerComponent("Spacer",Ue);var Ve=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+a.prototype.buildCSSClass.call(this)},b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,{className:this.buildCSSClass()});return b.innerHTML=" ",b},b}(Ue);vc.registerComponent("CustomControlSpacer",Ve);var We=function(a){function b(){return Kb(this,b),Mb(this,a.apply(this,arguments))}return Lb(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},b}(vc);We.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},vc.registerComponent("ControlBar",We);var Xe=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d));return e.on(c,"error",e.open),e}return Lb(b,a),b.prototype.buildCSSClass=function(){return"vjs-error-display "+a.prototype.buildCSSClass.call(this)},b.prototype.content=function(){var a=this.player().error();return a?this.localize(a.message):""},b}(Kc);Xe.prototype.options_=_(Kc.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),vc.registerComponent("ErrorDisplay",Xe);var Ye="vjs-text-track-settings",Ze=["#000","Black"],$e=["#00F","Blue"],_e=["#0FF","Cyan"],af=["#0F0","Green"],bf=["#F0F","Magenta"],cf=["#F00","Red"],df=["#FFF","White"],ef=["#FF0","Yellow"],ff=["1","Opaque"],gf=["0.5","Semi-Transparent"],hf=["0","Transparent"],jf={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Ze,df,cf,af,$e,ef,bf,_e]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[ff,gf,hf]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[df,Ze,cf,af,$e,ef,bf,_e]},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(a){return"1.00"===a?null:Number(a)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[ff,gf]},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:[hf,gf,ff]}};jf.windowColor.options=jf.backgroundColor.options;var kf=function(a){function d(c,e){Kb(this,d),e.temporary=!1;var f=Mb(this,a.call(this,c,e));return f.updateDisplay=jc(f,f.updateDisplay),f.fill(),f.hasBeenOpened_=f.hasBeenFilled_=!0,f.endDialog=p("p",{className:"vjs-control-text",textContent:f.localize("End of dialog window.")}),f.el().appendChild(f.endDialog),f.setDefaults(),void 0===e.persistTextTrackSettings&&(f.options_.persistTextTrackSettings=f.options_.playerOptions.persistTextTrackSettings),f.on(f.$(".vjs-done-button"),"click",function(){f.saveSettings(),f.close()}),f.on(f.$(".vjs-default-button"),"click",function(){f.setDefaults(),f.updateDisplay()}),b(jf,function(a){f.on(f.$(a.selector),"change",f.updateDisplay)}),f.options_.persistTextTrackSettings&&f.restoreSettings(),f}return Lb(d,a),d.prototype.createElSelect_=function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"label",e=jf[a],f=e.id.replace("%s",this.id_);return["<"+d+' id="'+f+'" class="'+("label"===d?"vjs-label":"")+'">',this.localize(e.label),""+d+">",'
'].concat(e.options.map(function(a){var d=f+"-"+a[1];return['
',b.localize(a[1]),"
"].join("")})).concat("
").join("")},d.prototype.createElFgColor_=function(){var a="captions-text-legend-"+this.id_;return['
','
',this.localize("Text"),"
",this.createElSelect_("color",a),'
',this.createElSelect_("textOpacity",a),"
","
"].join("")},d.prototype.createElBgColor_=function(){var a="captions-background-"+this.id_;return['
','
',this.localize("Background"),"
",this.createElSelect_("backgroundColor",a),'
',this.createElSelect_("backgroundOpacity",a),"
","
"].join("")},d.prototype.createElWinColor_=function(){var a="captions-window-"+this.id_;return['
','
',this.localize("Window"),"
",this.createElSelect_("windowColor",a),'
',this.createElSelect_("windowOpacity",a),"
","
"].join("")},d.prototype.createElColors_=function(){return p("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},d.prototype.createElFont_=function(){return p("div",{className:'vjs-track-settings-font">',innerHTML:['
',this.createElSelect_("fontPercent","","legend"),"
",'
',this.createElSelect_("edgeStyle","","legend"),"
",'
',this.createElSelect_("fontFamily","","legend"),"
"].join("")})},d.prototype.createElControls_=function(){var a=this.localize("restore all settings to the default values");return p("div",{className:"vjs-track-settings-controls",innerHTML:['
',this.localize("Reset"),'
'+a+"
","
",'
'+this.localize("Done")+"
"].join("")})},d.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},d.prototype.label=function(){return this.localize("Caption Settings Dialog")},d.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},d.prototype.buildCSSClass=function(){return a.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},d.prototype.getValues=function(){var a=this;return c(jf,function(b,c,d){var e=_a(a.$(c.selector),c.parser);return void 0!==e&&(b[d]=e),b},{})},d.prototype.setValues=function(a){var c=this;b(jf,function(b,d){ab(c.$(b.selector),a[d],b.parser)})},d.prototype.setDefaults=function(){var a=this;b(jf,function(b){var c=b.hasOwnProperty("default")?b["default"]:0;a.$(b.selector).selectedIndex=c})},d.prototype.restoreSettings=function(){var a=void 0;try{a=JSON.parse(gb.localStorage.getItem(Ye))}catch(b){Ub.warn(b)}a&&this.setValues(a)},d.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var a=this.getValues();try{Object.keys(a).length?gb.localStorage.setItem(Ye,JSON.stringify(a)):gb.localStorage.removeItem(Ye)}catch(b){Ub.warn(b)}}},d.prototype.updateDisplay=function(){var a=this.player_.getChild("textTrackDisplay");a&&a.updateDisplay()},d.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(lb,"keydown",this.handleKeyDown);var a=this.player_.controlBar,b=a&&a.subsCapsButton,c=a&&a.captionsButton;b?b.focus():c&&c.focus()},d}(Kc);vc.registerComponent("TextTrackSettings",kf);var lf=Nb(["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."]),mf=function(a){function b(c,d){Kb(this,b);var e=Mb(this,a.call(this,c,d)),f=c.source,g=!1;if(f&&(e.el_.currentSrc!==f.src||c.tag&&3===c.tag.initNetworkState_)?e.setSource(f):e.handleLateInit_(e.el_),e.el_.hasChildNodes()){for(var h=e.el_.childNodes,i=h.length,j=[];i--;){var k=h[i],l=k.nodeName.toLowerCase();"track"===l&&(e.featuresNativeTextTracks?(e.remoteTextTrackEls().addTrackElement_(k),e.remoteTextTracks().addTrack(k.track),e.textTracks().addTrack(k.track),g||e.el_.hasAttribute("crossorigin")||!ad(k.src)||(g=!0)):j.push(k))}for(var m=0;m
=0;h--){var i=g[h],j=this.options_[i];"undefined"!=typeof j&&(j?z(a,i,i):A(a,i),a[i]=j)}return a},b.prototype.handleLateInit_=function(a){if(0!==a.networkState&&3!==a.networkState){if(0===a.readyState){var b=!1,c=function(){b=!0};this.on("loadstart",c);var d=function(){b||this.trigger("loadstart")};return this.on("loadedmetadata",d),void this.ready(function(){this.off("loadstart",c),this.off("loadedmetadata",d),b||this.trigger("loadstart")})}var e=["loadstart"];e.push("loadedmetadata"),a.readyState>=2&&e.push("loadeddata"),a.readyState>=3&&e.push("canplay"),a.readyState>=4&&e.push("canplaythrough"),this.ready(function(){e.forEach(function(a){this.trigger(a)},this)})}},b.prototype.setCurrentTime=function(a){try{this.el_.currentTime=a}catch(b){Ub(b,"Video is not ready. (Video.js)")}},b.prototype.duration=function(){var a=this;if(this.el_.duration===1/0&&ub&&Ab&&0===this.el_.currentTime){var b=function c(){a.el_.currentTime>0&&(a.el_.duration===1/0&&a.trigger("durationchange"),a.off("timeupdate",c))};return this.on("timeupdate",b),NaN}return this.el_.duration||NaN},b.prototype.width=function(){return this.el_.offsetWidth},b.prototype.height=function(){return this.el_.offsetHeight},b.prototype.proxyWebkitFullscreen_=function(){var a=this;if("webkitDisplayingFullscreen"in this.el_){var b=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},c=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",b),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",c),this.on("dispose",function(){a.off("webkitbeginfullscreen",c),a.off("webkitendfullscreen",b)})}},b.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var a=gb.navigator&&gb.navigator.userAgent||"";if(/Android/.test(a)||!/Chrome|Mac OS X 10.5/.test(a))return!0}return!1},b.prototype.enterFullScreen=function(){var a=this.el_;a.paused&&a.networkState<=a.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){a.pause(),a.webkitEnterFullScreen()},0)):a.webkitEnterFullScreen()},b.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},b.prototype.src=function(a){return void 0===a?this.el_.src:void this.setSrc(a)},b.prototype.reset=function(){b.resetMediaElement(this.el_)},b.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},b.prototype.setControls=function(a){this.el_.controls=!!a},b.prototype.addTextTrack=function(b,c,d){return this.featuresNativeTextTracks?this.el_.addTextTrack(b,c,d):a.prototype.addTextTrack.call(this,b,c,d)},b.prototype.createRemoteTextTrack=function(b){if(!this.featuresNativeTextTracks)return a.prototype.createRemoteTextTrack.call(this,b);var c=lb.createElement("track");return b.kind&&(c.kind=b.kind),b.label&&(c.label=b.label),(b.language||b.srclang)&&(c.srclang=b.language||b.srclang),b["default"]&&(c["default"]=b["default"]),b.id&&(c.id=b.id),b.src&&(c.src=b.src),c},b.prototype.addRemoteTextTrack=function(b,c){var d=a.prototype.addRemoteTextTrack.call(this,b,c);return this.featuresNativeTextTracks&&this.el().appendChild(d),d},b.prototype.removeRemoteTextTrack=function(b){if(a.prototype.removeRemoteTextTrack.call(this,b),this.featuresNativeTextTracks)for(var c=this.$$("track"),d=c.length;d--;)b!==c[d]&&b!==c[d].track||this.el().removeChild(c[d])},b.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var a={};return"undefined"!=typeof this.el().webkitDroppedFrameCount&&"undefined"!=typeof this.el().webkitDecodedFrameCount&&(a.droppedVideoFrames=this.el().webkitDroppedFrameCount,a.totalVideoFrames=this.el().webkitDecodedFrameCount),gb.performance&&"function"==typeof gb.performance.now?a.creationTime=gb.performance.now():gb.performance&&gb.performance.timing&&"number"==typeof gb.performance.timing.navigationStart&&(a.creationTime=gb.Date.now()-gb.performance.timing.navigationStart),a},b}(Rd);if(l()){mf.TEST_VID=lb.createElement("video");var nf=lb.createElement("track");nf.kind="captions",nf.srclang="en",nf.label="English",mf.TEST_VID.appendChild(nf)}mf.isSupported=function(){try{mf.TEST_VID.volume=.5}catch(a){return!1}return!(!mf.TEST_VID||!mf.TEST_VID.canPlayType)},mf.canPlayType=function(a){return mf.TEST_VID.canPlayType(a)},mf.canPlaySource=function(a,b){return mf.canPlayType(a.type)},mf.canControlVolume=function(){try{var a=mf.TEST_VID.volume;return mf.TEST_VID.volume=a/2+.1,a!==mf.TEST_VID.volume}catch(b){return!1}},mf.canControlPlaybackRate=function(){if(ub&&Ab&&Bb<58)return!1;try{var a=mf.TEST_VID.playbackRate;return mf.TEST_VID.playbackRate=a/2+.1,a!==mf.TEST_VID.playbackRate}catch(b){return!1}},mf.supportsNativeTextTracks=function(){return Fb},mf.supportsNativeVideoTracks=function(){return!(!mf.TEST_VID||!mf.TEST_VID.videoTracks)},mf.supportsNativeAudioTracks=function(){return!(!mf.TEST_VID||!mf.TEST_VID.audioTracks)},mf.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],mf.prototype.featuresVolumeControl=mf.canControlVolume(),mf.prototype.featuresPlaybackRate=mf.canControlPlaybackRate(),mf.prototype.movingMediaElementInDOM=!sb,mf.prototype.featuresFullscreenResize=!0,mf.prototype.featuresProgressEvents=!0,mf.prototype.featuresTimeupdateEvents=!0,mf.prototype.featuresNativeTextTracks=mf.supportsNativeTextTracks(),mf.prototype.featuresNativeVideoTracks=mf.supportsNativeVideoTracks(),mf.prototype.featuresNativeAudioTracks=mf.supportsNativeAudioTracks();var of=mf.TEST_VID&&mf.TEST_VID.constructor.prototype.canPlayType,pf=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,qf=/^video\/mp4/i;mf.patchCanPlayType=function(){vb>=4&&!yb?mf.TEST_VID.constructor.prototype.canPlayType=function(a){return a&&pf.test(a)?"maybe":of.call(this,a)}:wb&&(mf.TEST_VID.constructor.prototype.canPlayType=function(a){return a&&qf.test(a)?"maybe":of.call(this,a)})},mf.unpatchCanPlayType=function(){var a=mf.TEST_VID.constructor.prototype.canPlayType;return mf.TEST_VID.constructor.prototype.canPlayType=of,a},mf.patchCanPlayType(),mf.disposeMediaElement=function(a){if(a){for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src"),"function"==typeof a.load&&!function(){try{a.load()}catch(b){}}()}},mf.resetMediaElement=function(a){if(a){for(var b=a.querySelectorAll("source"),c=b.length;c--;)a.removeChild(b[c]);a.removeAttribute("src"),"function"==typeof a.load&&!function(){try{a.load()}catch(b){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(a){mf.prototype[a]=function(){return this.el_[a]||this.el_.hasAttribute(a)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(a){mf.prototype["set"+Z(a)]=function(b){this.el_[a]=b,b?this.el_.setAttribute(a,a):this.el_.removeAttribute(a)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(a){mf.prototype[a]=function(){return this.el_[a]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(a){mf.prototype["set"+Z(a)]=function(b){this.el_[a]=b}}),["pause","load","play"].forEach(function(a){mf.prototype[a]=function(){return this.el_[a]()}}),Rd.withSourceHandlers(mf),mf.nativeSourceHandler={},mf.nativeSourceHandler.canPlayType=function(a){try{return mf.TEST_VID.canPlayType(a)}catch(b){return""}},mf.nativeSourceHandler.canHandleSource=function(a,b){if(a.type)return mf.nativeSourceHandler.canPlayType(a.type);if(a.src){var c=_c(a.src);return mf.nativeSourceHandler.canPlayType("video/"+c)}return""},mf.nativeSourceHandler.handleSource=function(a,b,c){b.setSrc(a.src)},mf.nativeSourceHandler.dispose=function(){},mf.registerSourceHandler(mf.nativeSourceHandler),Rd.registerTech("Html5",mf);var rf=Nb(["\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 "]),sf=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","resize","volumechange","texttrackchange"],tf=function(a){function b(c,e,f){if(Kb(this,b),c.id=c.id||"vjs_video_"+L(),e=d(b.getTagSettings(c),e),e.initChildren=!1,e.createEl=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof c.closest){var g=c.closest("[lang]");g&&(e.language=g.getAttribute("lang"))}else for(var h=c;h&&1===h.nodeType;){if(x(h).hasOwnProperty("lang")){e.language=h.getAttribute("lang");break}h=h.parentNode}var i=Mb(this,a.call(this,null,e,f));if(i.isReady_=!1,!i.options_||!i.options_.techOrder||!i.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(i.tag=c,i.tagAttributes=c&&x(c),i.language(i.options_.language),e.languages){var j={};Object.getOwnPropertyNames(e.languages).forEach(function(a){j[a.toLowerCase()]=e.languages[a]}),i.languages_=j}else i.languages_=b.prototype.options_.languages;i.cache_={},i.poster_=e.poster||"",i.controls_=!!e.controls,i.cache_.lastVolume=1,c.controls=!1,i.scrubbing_=!1,i.el_=i.createEl(),X(i,{eventBusKey:"el_"});var k=_(i.options_);if(e.plugins){var l=e.plugins;Object.keys(l).forEach(function(a){if("function"!=typeof this[a])throw new Error('plugin "'+a+'" does not exist');this[a](l[a])},i)}i.options_.playerOptions=k,i.middleware_=[],i.initChildren(),i.isAudio("audio"===c.nodeName.toLowerCase()),i.controls()?i.addClass("vjs-controls-enabled"):i.addClass("vjs-controls-disabled"),i.el_.setAttribute("role","region"),i.isAudio()?i.el_.setAttribute("aria-label",i.localize("Audio Player")):i.el_.setAttribute("aria-label",i.localize("Video Player")),i.isAudio()&&i.addClass("vjs-audio"),i.flexNotSupported_()&&i.addClass("vjs-no-flex"),sb||i.addClass("vjs-workinghover"),b.players[i.id_]=i;var m=db.split(".")[0];return i.addClass("vjs-v"+m),i.userActive(!0),i.reportUserActivity(),i.listenForUserActivity_(),i.on("fullscreenchange",i.handleFullscreenChange_),i.on("stageclick",i.handleStageClick_),i.changingSrc_=!1,i}return Lb(b,a),b.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&this.styleEl_.parentNode.removeChild(this.styleEl_),b.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(),a.prototype.dispose.call(this)},b.prototype.createEl=function(){var b=this.tag,c=void 0,d=this.playerElIngest_=b.parentNode&&b.parentNode.hasAttribute&&b.parentNode.hasAttribute("data-vjs-player");c=d?this.el_=b.parentNode:this.el_=a.prototype.createEl.call(this,"div"),b.setAttribute("tabindex","-1"),b.removeAttribute("width"),b.removeAttribute("height");var e=x(b);if(Object.getOwnPropertyNames(e).forEach(function(a){"class"===a?c.className+=" "+e[a]:c.setAttribute(a,e[a])}),b.playerId=b.id,b.id+="_html5_api",b.className="vjs-tech",b.player=c.player=this,this.addClass("vjs-paused"),gb.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=hc("vjs-styles-dimensions");var f=Xb(".vjs-styles-defaults"),g=Xb("head");g.insertBefore(this.styleEl_,f?f.nextSibling:g.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var h=b.getElementsByTagName("a"),i=0;i
=0&&(c.width=a),b>=0&&(c.height=b)))}var d=void 0,e=void 0,f=void 0,g=void 0;f=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";var h=f.split(":"),i=h[1]/h[0];d=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,e=void 0!==this.height_?this.height_:d*i,g=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(g),ic(this.styleEl_,"\n ."+g+" {\n width: "+d+"px;\n height: "+e+"px;\n }\n\n ."+g+".vjs-fluid {\n padding-top: "+100*i+"%;\n }\n ")},b.prototype.loadTech_=function(a,b){var c=this;this.tech_&&this.unloadTech_();var e=Z(a),f=a.charAt(0).toLowerCase()+a.slice(1);"Html5"!==e&&this.tag&&(Rd.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=e,this.isReady_=!1;var g={source:b,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+e+"_api",autoplay:this.options_.autoplay,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"]};zd.names.forEach(function(a){var b=zd[a];g[b.getterName]=c[b.privateName]}),d(g,this.options_[e]),d(g,this.options_[f]),d(g,this.options_[a.toLowerCase()]),this.tag&&(g.tag=this.tag),b&&b.src===this.cache_.src&&this.cache_.currentTime>0&&(g.startTime=this.cache_.currentTime);var h=Rd.getTech(a);if(!h)throw new Error("No Tech named '"+e+"' exists! '"+e+"' should be registered using videojs.registerTech()'");this.tech_=new h(g),this.tech_.ready(jc(this,this.handleTechReady_),!0), Hc.jsonToTextTracks(this.textTracksJson_||[],this.tech_),sf.forEach(function(a){c.on(c.tech_,a,c["handleTech"+Z(a)+"_"])}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"canplay",this.handleTechCanPlay_),this.on(this.tech_,"canplaythrough",this.handleTechCanPlayThrough_),this.on(this.tech_,"playing",this.handleTechPlaying_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"seeked",this.handleTechSeeked_),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.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===e&&this.tag||r(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},b.prototype.unloadTech_=function(){var a=this;zd.names.forEach(function(b){var c=zd[b];a[c.privateName]=a[c.getterName]()}),this.textTracksJson_=Hc.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1},b.prototype.tech=function(a){return void 0===a&&Ub.warn(Vb(rf)),this.tech_},b.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),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_)},b.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_)},b.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused())try{delete this.tag.poster}catch(a){Ub("deleting tag.poster throws in some browsers",a)}},b.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"))},b.prototype.hasStarted=function(a){return void 0!==a?void(this.hasStarted_!==a&&(this.hasStarted_=a,a?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))):!!this.hasStarted_},b.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},b.prototype.handleTechWaiting_=function(){var a=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return a.removeClass("vjs-waiting")})},b.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},b.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},b.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},b.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},b.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},b.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(Ub.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")},b.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},b.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},b.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},b.prototype.handleTechClick_=function(a){0===a.button&&this.controls()&&(this.paused()?this.play():this.pause())},b.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},b.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},b.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},b.prototype.handleTechTouchEnd_=function(a){a.preventDefault()},b.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},b.prototype.handleStageClick_=function(){this.reportUserActivity()},b.prototype.handleTechFullscreenChange_=function(a,b){b&&this.isFullscreen(b.isFullscreen),this.trigger("fullscreenchange")},b.prototype.handleTechError_=function(){var a=this.tech_.error();this.error(a)},b.prototype.handleTechTextData_=function(){var a=null;arguments.length>1&&(a=arguments[1]),this.trigger("textdata",a)},b.prototype.getCache=function(){return this.cache_},b.prototype.techCall_=function(a,b){this.ready(function(){if(a in Ud)return Ua(this.middleware_,this.tech_,a,b);try{this.tech_&&this.tech_[a](b)}catch(c){throw Ub(c),c}},!0)},b.prototype.techGet_=function(a){if(this.tech_&&this.tech_.isReady_){if(a in Td)return Ta(this.middleware_,this.tech_,a);try{return this.tech_[a]()}catch(b){throw void 0===this.tech_[a]?Ub("Video.js: "+a+" method not defined for "+this.techName_+" playback technology.",b):"TypeError"===b.name?(Ub("Video.js: "+a+" unavailable on "+this.techName_+" playback technology element.",b),this.tech_.isReady_=!1):Ub(b),b}}},b.prototype.play=function(){if(this.changingSrc_)this.ready(function(){var a=this.techGet_("play");void 0!==a&&"function"==typeof a.then&&a.then(null,function(a){})});else{if(this.isReady_&&(this.src()||this.currentSrc()))return this.techGet_("play");this.ready(function(){this.tech_.one("loadstart",function(){var a=this.play();void 0!==a&&"function"==typeof a.then&&a.then(null,function(a){})})})}},b.prototype.pause=function(){this.techCall_("pause")},b.prototype.paused=function(){return this.techGet_("paused")!==!1},b.prototype.played=function(){return this.techGet_("played")||da(0,0)},b.prototype.scrubbing=function(a){return"undefined"==typeof a?this.scrubbing_:(this.scrubbing_=!!a,void(a?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")))},b.prototype.currentTime=function(a){return"undefined"!=typeof a?void this.techCall_("setCurrentTime",a):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},b.prototype.duration=function(a){return void 0===a?void 0!==this.cache_.duration?this.cache_.duration:NaN:(a=parseFloat(a),a<0&&(a=1/0),void(a!==this.cache_.duration&&(this.cache_.duration=a,a===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))))},b.prototype.remainingTime=function(){return this.duration()-this.currentTime()},b.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},b.prototype.buffered=function c(){var c=this.techGet_("buffered");return c&&c.length||(c=da(0,0)),c},b.prototype.bufferedPercent=function(){return ea(this.buffered(),this.duration())},b.prototype.bufferedEnd=function(){var a=this.buffered(),b=this.duration(),c=a.end(a.length-1);return c>b&&(c=b),c},b.prototype.volume=function(a){var b=void 0;return void 0!==a?(b=Math.max(0,Math.min(1,parseFloat(a))),this.cache_.volume=b,this.techCall_("setVolume",b),void(b>0&&this.lastVolume_(b))):(b=parseFloat(this.techGet_("volume")),isNaN(b)?1:b)},b.prototype.muted=function(a){return void 0!==a?void this.techCall_("setMuted",a):this.techGet_("muted")||!1},b.prototype.defaultMuted=function(a){return void 0!==a?this.techCall_("setDefaultMuted",a):this.techGet_("defaultMuted")||!1},b.prototype.lastVolume_=function(a){return void 0!==a&&0!==a?void(this.cache_.lastVolume=a):this.cache_.lastVolume},b.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},b.prototype.isFullscreen=function(a){return void 0!==a?void(this.isFullscreen_=!!a):!!this.isFullscreen_},b.prototype.requestFullscreen=function(){var a=wc;this.isFullscreen(!0),a.requestFullscreen?(S(lb,a.fullscreenchange,jc(this,function b(c){this.isFullscreen(lb[a.fullscreenElement]),this.isFullscreen()===!1&&T(lb,a.fullscreenchange,b),this.trigger("fullscreenchange")})),this.el_[a.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},b.prototype.exitFullscreen=function(){var a=wc;this.isFullscreen(!1),a.requestFullscreen?lb[a.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},b.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=lb.documentElement.style.overflow,S(lb,"keydown",jc(this,this.fullWindowOnEscKey)),lb.documentElement.style.overflow="hidden",t(lb.body,"vjs-full-window"),this.trigger("enterFullWindow")},b.prototype.fullWindowOnEscKey=function(a){27===a.keyCode&&(this.isFullscreen()===!0?this.exitFullscreen():this.exitFullWindow())},b.prototype.exitFullWindow=function(){this.isFullWindow=!1,T(lb,"keydown",this.fullWindowOnEscKey),lb.documentElement.style.overflow=this.docOrigOverflow,u(lb.body,"vjs-full-window"),this.trigger("exitFullWindow")},b.prototype.canPlayType=function(a){for(var b=void 0,c=0,d=this.options_.techOrder;c
1?b.src(c.slice(1)):(b.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void b.triggerReady()):(b.changingSrc_=!1,b.cache_.src=a.src,void Sa(d,b.tech_))})):void this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},b.prototype.src_=function(a){var b=this.selectSource([a]);return!b||($(b.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",a):this.techCall_("src",a.src),"auto"===this.options_.preload&&this.load()},!0),!1):(this.changingSrc_=!0,this.loadTech_(b.tech,b.source),!1))},b.prototype.load=function(){this.techCall_("load")},b.prototype.reset=function(){this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},b.prototype.currentSources=function(){var a=this.currentSource(),b=[];return 0!==Object.keys(a).length&&b.push(a),this.cache_.sources||b},b.prototype.currentSource=function(){return this.cache_.source||{}},b.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},b.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},b.prototype.preload=function(a){return void 0!==a?(this.techCall_("setPreload",a),void(this.options_.preload=a)):this.techGet_("preload")},b.prototype.autoplay=function(a){return void 0!==a?(this.techCall_("setAutoplay",a),void(this.options_.autoplay=a)):this.techGet_("autoplay",a)},b.prototype.playsinline=function(a){return void 0!==a?(this.techCall_("setPlaysinline",a),this.options_.playsinline=a,this):this.techGet_("playsinline")},b.prototype.loop=function(a){return void 0!==a?(this.techCall_("setLoop",a),void(this.options_.loop=a)):this.techGet_("loop")},b.prototype.poster=function(a){return void 0===a?this.poster_:(a||(a=""),this.poster_=a,this.techCall_("setPoster",a),void this.trigger("posterchange"))},b.prototype.handleTechPosterChange_=function(){!this.poster_&&this.tech_&&this.tech_.poster&&(this.poster_=this.tech_.poster()||"",this.trigger("posterchange"))},b.prototype.controls=function(a){return void 0!==a?(a=!!a,void(this.controls_!==a&&(this.controls_=a,this.usingNativeControls()&&this.techCall_("setControls",a),a?(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_())))):!!this.controls_},b.prototype.usingNativeControls=function(a){return void 0!==a?(a=!!a,void(this.usingNativeControls_!==a&&(this.usingNativeControls_=a,a?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))))):!!this.usingNativeControls_},b.prototype.error=function(a){return void 0===a?this.error_||null:null===a?(this.error_=a,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new fa(a),this.addClass("vjs-error"),Ub.error("(CODE:"+this.error_.code+" "+fa.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},b.prototype.reportUserActivity=function(a){this.userActivity_=!0},b.prototype.userActive=function(a){return void 0!==a?(a=!!a,void(a!==this.userActive_&&(this.userActive_=a,a?(this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.userActivity_=!1,this.tech_&&this.tech_.one("mousemove",function(a){a.stopPropagation(),a.preventDefault()}),this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive"))))):this.userActive_},b.prototype.listenForUserActivity_=function(){var a=void 0,b=void 0,c=void 0,d=jc(this,this.reportUserActivity),e=function(a){a.screenX===b&&a.screenY===c||(b=a.screenX,c=a.screenY,d())},f=function(){d(),this.clearInterval(a),a=this.setInterval(d,250)},g=function(b){d(),this.clearInterval(a)};this.on("mousedown",f),this.on("mousemove",e),this.on("mouseup",g),this.on("keydown",d),this.on("keyup",d);var h=void 0;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(h);var a=this.options_.inactivityTimeout;a>0&&(h=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},a))}},250)},b.prototype.playbackRate=function(a){return void 0!==a?void this.techCall_("setPlaybackRate",a):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("playbackRate"):1},b.prototype.defaultPlaybackRate=function(a){return void 0!==a?this.techCall_("setDefaultPlaybackRate",a):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},b.prototype.isAudio=function(a){return void 0!==a?void(this.isAudio_=!!a):!!this.isAudio_},b.prototype.addTextTrack=function(a,b,c){if(this.tech_)return this.tech_.addTextTrack(a,b,c)},b.prototype.addRemoteTextTrack=function(a,b){if(this.tech_)return this.tech_.addRemoteTextTrack(a,b)},b.prototype.removeRemoteTextTrack=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=a.track,c=void 0===b?arguments[0]:b;if(this.tech_)return this.tech_.removeRemoteTextTrack(c)},b.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},b.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},b.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},b.prototype.language=function(a){return void 0===a?this.language_:void(this.language_=String(a).toLowerCase())},b.prototype.languages=function(){return _(b.prototype.options_.languages,this.languages_)},b.prototype.toJSON=function(){var a=_(this.options_),b=a.tracks;a.tracks=[];for(var c=0;c
0&&void 0!==arguments[0]?arguments[0]:{};return a.name=this.name,a.plugin=this.constructor,a.instance=this,a},a.prototype.trigger=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return U(this.eventBusEl_,a,this.getEventHash(b))},a.prototype.handleStateChanged=function(a){},a.prototype.dispose=function(){var a=this.name,b=this.player;this.trigger("dispose"),this.off(),b.off("dispose",this.dispose),b[wf][a]=!1,this.player=this.state=null,b[a]=Df(a,xf[a])},a.isBasic=function(b){var c="string"==typeof b?zf(b):b;return"function"==typeof c&&!a.prototype.isPrototypeOf(c.prototype)},a.registerPlugin=function(b,c){if("string"!=typeof b)throw new Error('Illegal plugin name, "'+b+'", must be a string, was '+("undefined"==typeof b?"undefined":Jb(b))+".");if(yf(b))Ub.warn('A plugin named "'+b+'" already exists. You may want to avoid re-registering plugins!');else if(tf.prototype.hasOwnProperty(b))throw new Error('Illegal plugin name, "'+b+'", cannot share a name with an existing player method!');if("function"!=typeof c)throw new Error('Illegal plugin for "'+b+'", must be a function, was '+("undefined"==typeof c?"undefined":Jb(c))+".");return xf[b]=c,b!==vf&&(a.isBasic(c)?tf.prototype[b]=Cf(b,c):tf.prototype[b]=Df(b,c)),c},a.deregisterPlugin=function(a){if(a===vf)throw new Error("Cannot de-register base plugin.");yf(a)&&(delete xf[a],delete tf.prototype[a])},a.getPlugins=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.keys(xf),b=void 0;return a.forEach(function(a){var c=zf(a);c&&(b=b||{},b[a]=c)}),b},a.getPluginVersion=function(a){var b=zf(a);return b&&b.VERSION||""},a}();Ef.getPlugin=zf,Ef.BASE_PLUGIN_NAME=vf,Ef.registerPlugin(vf,Ef),tf.prototype.usingPlugin=function(a){return!!this[wf]&&this[wf][a]===!0},tf.prototype.hasPlugin=function(a){return!!yf(a)};var Ff=function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof b?"undefined":Jb(b)));a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(a.super_=b)},Gf=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=function(){a.apply(this,arguments)},d={};"object"===("undefined"==typeof b?"undefined":Jb(b))?(b.constructor!==Object.prototype.constructor&&(c=b.constructor),d=b):"function"==typeof b&&(c=b),Ff(c,a);for(var e in d)d.hasOwnProperty(e)&&(c.prototype[e]=d[e]);return c};if("undefined"==typeof HTMLVideoElement&&l()&&(lb.createElement("video"),lb.createElement("audio"),lb.createElement("track")),bb.hooks_={},bb.hooks=function(a,b){return bb.hooks_[a]=bb.hooks_[a]||[],b&&(bb.hooks_[a]=bb.hooks_[a].concat(b)),bb.hooks_[a]},bb.hook=function(a,b){bb.hooks(a,b)},bb.removeHook=function(a,b){var c=bb.hooks(a).indexOf(b);return!(c<=-1)&&(bb.hooks_[a]=bb.hooks_[a].slice(),bb.hooks_[a].splice(c,1),!0)},gb.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&l()){var Hf=Xb(".vjs-styles-defaults");if(!Hf){Hf=hc("vjs-styles-defaults");var If=Xb("head");If&&If.insertBefore(Hf,If.firstChild),ic(Hf,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}return W(1,bb),bb.VERSION=db,bb.options=tf.prototype.options_,bb.getPlayers=function(){return tf.players},bb.players=tf.players,bb.getComponent=vc.getComponent,bb.registerComponent=function(a,b){Rd.isTech(b)&&Ub.warn("The "+a+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),vc.registerComponent.call(vc,a,b)},bb.getTech=Rd.getTech,bb.registerTech=Rd.registerTech,bb.use=Qa,bb.browser=Ib,bb.TOUCH_ENABLED=Gb,bb.extend=Gf,bb.mergeOptions=_,bb.bind=jc,bb.registerPlugin=Ef.registerPlugin,bb.plugin=function(a,b){return Ub.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Ef.registerPlugin(a,b)},bb.getPlugins=Ef.getPlugins,bb.getPlugin=Ef.getPlugin,bb.getPluginVersion=Ef.getPluginVersion,bb.addLanguage=function(a,b){var c;return a=(""+a).toLowerCase(),bb.options.languages=_(bb.options.languages,(c={},c[a]=b,c)),bb.options.languages[a]},bb.log=Ub,bb.createTimeRange=bb.createTimeRanges=da,bb.formatTime=Za,bb.parseUrl=Zc,bb.isCrossOrigin=ad,bb.EventTarget=lc,bb.on=S,bb.one=V,bb.off=T,bb.trigger=U,bb.xhr=md,bb.TextTrack=pd,bb.AudioTrack=qd,bb.VideoTrack=rd,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(a){bb[a]=function(){return Ub.warn("videojs."+a+"() is deprecated; use videojs.dom."+a+"() instead"),Zb[a].apply(null,arguments)}}),bb.computedStyle=h,bb.dom=Zb,bb.url=bd,bb});