!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("global/window"),require("global/document")):"function"==typeof define&&define.amd?define(["global/window","global/document"],t):(e=e||self,e.videojs=t(e.window,e.document))}(this,function(e,t){"use strict";function i(e){var t,n="info",r=function(){for(var e=arguments.length,i=new Array(e),r=0;e>r;r++)i[r]=arguments[r];t("log",n,i)};return t=bn(e,r),r.createLogger=function(t){return i(e+": "+t)},r.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},r.level=function(e){if("string"==typeof e){if(!r.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');n=e}return n},r.history=function(){return _n?[].concat(_n):[]},r.history.filter=function(e){return(_n||[]).filter(function(t){return new RegExp(".*"+e+".*").test(t[0])})},r.history.clear=function(){_n&&(_n.length=0)},r.history.disable=function(){null!==_n&&(_n.length=0,_n=null)},r.history.enable=function(){null===_n&&(_n=[])},r.error=function(){for(var e=arguments.length,i=new Array(e),r=0;e>r;r++)i[r]=arguments[r];return t("error",n,i)},r.warn=function(){for(var e=arguments.length,i=new Array(e),r=0;e>r;r++)i[r]=arguments[r];return t("warn",n,i)},r.debug=function(){for(var e=arguments.length,i=new Array(e),r=0;e>r;r++)i[r]=arguments[r];return t("debug",n,i)},r}function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}function r(e,t){return t={exports:{}},e(t,t.exports),t.exports}function a(e,t){En(e).forEach(function(i){return t(e[i],i)})}function s(e,t,i){return void 0===i&&(i=0),En(e).reduce(function(i,n){return t(i,e[n],n)},i)}function o(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;t>n;n++)i[n-1]=arguments[n];return Object.assign?wn.apply(void 0,[e].concat(i)):(i.forEach(function(t){t&&a(t,function(t,i){e[i]=t})}),e)}function u(e){return!!e&&"object"==typeof e}function l(e){return u(e)&&"[object Object]"===Cn.call(e)&&e.constructor===Object}function d(t,i){if(!t||!i)return"";if("function"==typeof e.getComputedStyle){var n=e.getComputedStyle(t);return n?n.getPropertyValue(i)||n[i]:""}return""}function c(e){return"string"==typeof e&&Boolean(e.trim())}function h(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function p(e){return new RegExp("(^|\\s)"+e+"($|\\s)")}function f(){return t===e.document}function m(e){return u(e)&&1===e.nodeType}function g(){try{return e.parent!==e.self}catch(t){return!0}}function v(e){return function(i,n){if(!c(i))return t[e](null);c(n)&&(n=t.querySelector(n));var r=m(n)?n:t;return r[e]&&r[e](i)}}function y(e,i,n,r){void 0===e&&(e="div"),void 0===i&&(i={}),void 0===n&&(n={});var a=t.createElement(e);return Object.getOwnPropertyNames(i).forEach(function(e){var t=i[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(Tn.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\n"+("createEl(type, properties, attributes). Attempting to set "+e+" to "+t+".")),a.setAttribute(e,t)):"textContent"===e?_(a,t):a[e]!==t&&(a[e]=t)}),Object.getOwnPropertyNames(n).forEach(function(e){a.setAttribute(e,n[e])}),r&&B(a,r),a}function _(e,t){return"undefined"==typeof e.textContent?e.innerText=t:e.textContent=t,e}function b(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function T(e,t){return h(t),e.classList?e.classList.contains(t):p(t).test(e.className)}function S(e,t){return e.classList?e.classList.add(t):T(e,t)||(e.className=(e.className+" "+t).trim()),e}function w(e,t){return e.classList?e.classList.remove(t):(h(t),e.className=e.className.split(/\s+/).filter(function(e){return e!==t}).join(" ")),e}function C(e,t,i){var n=T(e,t);return"function"==typeof i&&(i=i(e,t)),"boolean"!=typeof i&&(i=!n),i!==n?(i?S(e,t):w(e,t),e):void 0}function E(e,t){Object.getOwnPropertyNames(t).forEach(function(i){var n=t[i];null===n||"undefined"==typeof n||n===!1?e.removeAttribute(i):e.setAttribute(i,n===!0?"":n)})}function k(e){var t={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var n=e.attributes,r=n.length-1;r>=0;r--){var a=n[r].name,s=n[r].value;("boolean"==typeof e[a]||-1!==i.indexOf(","+a+","))&&(s=null!==s?!0:!1),t[a]=s}return t}function I(e,t){return e.getAttribute(t)}function A(e,t,i){e.setAttribute(t,i)}function L(e,t){e.removeAttribute(t)}function P(){t.body.focus(),t.onselectstart=function(){return!1}}function O(){t.onselectstart=function(){return!0}}function x(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(function(e){void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(d(e,"height"))),i.width||(i.width=parseFloat(d(e,"width"))),i}}function D(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};var t=e.offsetWidth,i=e.offsetHeight,n=0,r=0;do n+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;while(e);return{left:n,top:r,width:t,height:i}}function U(e,t){var i={},n=D(t.target),r=D(e),a=r.width,s=r.height,o=t.offsetY-(r.top-n.top),u=t.offsetX-(r.left-n.left);return t.changedTouches&&(u=t.changedTouches[0].pageX-r.left,o=t.changedTouches[0].pageY+r.top),i.y=1-Math.max(0,Math.min(1,o/s)),i.x=Math.max(0,Math.min(1,u/a)),i}function R(e){return u(e)&&3===e.nodeType}function M(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function N(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(function(e){return"function"==typeof e&&(e=e()),m(e)||R(e)?e:"string"==typeof e&&/\S/.test(e)?t.createTextNode(e):void 0}).filter(function(e){return e})}function B(e,t){return N(t).forEach(function(t){return e.appendChild(t)}),e}function F(e,t){return B(M(e),t)}function j(e){return void 0===e.button&&void 0===e.buttons?!0:0===e.button&&void 0===e.buttons?!0:"mouseup"===e.type&&0===e.button&&0===e.buttons?!0:0!==e.button||1!==e.buttons?!1:!0}function q(t,i){i&&(vn=i),e.setTimeout(Pn,t)}function V(){Ln=!0,e.removeEventListener("load",V)}function H(){return Rn++}function W(e,t){if(Nn.has(e)){var i=Nn.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Nn["delete"](e)}}function G(e,t,i,n){i.forEach(function(i){e(t,i,n)})}function z(i){function n(){return!0}function r(){return!1}if(i.fixed_)return i;if(!i||!i.isPropagationStopped){var a=i||e.event;i={};for(var s in a)"layerX"!==s&&"layerY"!==s&&"keyLocation"!==s&&"webkitMovementX"!==s&&"webkitMovementY"!==s&&("returnValue"===s&&a.preventDefault||(i[s]=a[s]));if(i.target||(i.target=i.srcElement||t),i.relatedTarget||(i.relatedTarget=i.fromElement===i.target?i.toElement:i.fromElement),i.preventDefault=function(){a.preventDefault&&a.preventDefault(),i.returnValue=!1,a.returnValue=!1,i.defaultPrevented=!0},i.defaultPrevented=!1,i.stopPropagation=function(){a.stopPropagation&&a.stopPropagation(),i.cancelBubble=!0,a.cancelBubble=!0,i.isPropagationStopped=n},i.isPropagationStopped=r,i.stopImmediatePropagation=function(){a.stopImmediatePropagation&&a.stopImmediatePropagation(),i.isImmediatePropagationStopped=n,i.stopPropagation()},i.isImmediatePropagationStopped=r,null!==i.clientX&&void 0!==i.clientX){var o=t.documentElement,u=t.body;i.pageX=i.clientX+(o&&o.scrollLeft||u&&u.scrollLeft||0)-(o&&o.clientLeft||u&&u.clientLeft||0),i.pageY=i.clientY+(o&&o.scrollTop||u&&u.scrollTop||0)-(o&&o.clientTop||u&&u.clientTop||0)}i.which=i.charCode||i.keyCode,null!==i.button&&void 0!==i.button&&(i.button=1&i.button?0:4&i.button?1:2&i.button?2:0)}return i.fixed_=!0,i}function X(e,t,i){if(Array.isArray(t))return G(X,e,t,i);Nn.has(e)||Nn.set(e,{});var n=Nn.get(e);if(n.handlers||(n.handlers={}),n.handlers[t]||(n.handlers[t]=[]),i.guid||(i.guid=H()),n.handlers[t].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(t,i){if(!n.disabled){t=z(t);var r=n.handlers[t.type];if(r)for(var a=r.slice(0),s=0,o=a.length;o>s&&!t.isImmediatePropagationStopped();s++)try{a[s].call(e,t,i)}catch(u){Tn.error(u)}}}),1===n.handlers[t].length)if(e.addEventListener){var r=!1;Bn()&&Fn.indexOf(t)>-1&&(r={passive:!0}),e.addEventListener(t,n.dispatcher,r)}else e.attachEvent&&e.attachEvent("on"+t,n.dispatcher)}function K(e,t,i){if(Nn.has(e)){var n=Nn.get(e);if(n.handlers){if(Array.isArray(t))return G(K,e,t,i);var r=function(e,t){n.handlers[t]=[],W(e,t)};if(void 0!==t){var a=n.handlers[t];if(a){if(!i)return void r(e,t);if(i.guid)for(var s=0;sn;n++)i[n]=arguments[n];return i.forEach(function(t){t&&a(t,function(t,i){return l(t)?(l(e[i])||(e[i]={}),void(e[i]=et(e[i],t))):void(e[i]=t)})}),e}function tt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function it(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function nt(e,t,i){if("number"!=typeof t||0>t||t>i)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+i+").")}function rt(e,t,i,n){return nt(e,n,i.length-1),i[n][t]}function at(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:rt.bind(null,"start",0,e),end:rt.bind(null,"end",1,e)}}function st(e,t){return Array.isArray(e)?at(e):void 0===e||void 0===t?at():at([[e,t]])}function ot(e,t){var i,n,r=0;if(!t)return 0;e&&e.length||(e=st(0,0));for(var a=0;at&&(n=t),r+=n-i;return r/t}function ut(e){return e instanceof ut?e:("number"==typeof e?this.code=e:"string"==typeof e?this.message=e:u(e)&&("number"==typeof e.code&&(this.code=e.code),o(this,e)),void(this.message||(this.message=ut.defaultMessages[this.code]||"")))}function lt(e,t){var i,n=null;try{i=JSON.parse(e,t)}catch(r){n=r}return[n,i]}function dt(e){return void 0!==e&&null!==e&&"function"==typeof e.then}function ct(e){dt(e)&&e.then(null,function(){})}function ht(e){var t=ma.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}function pt(e,t){for(var i=0;i0&&(d=setTimeout(function(){if(!l){l=!0,o.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",n(e)}},e.timeout)),o.setRequestHeader)for(u in f)f.hasOwnProperty(u)&&o.setRequestHeader(u,f[u]);else if(e.headers&&!ft(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(o.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(o),o.send(p||null),o}function yt(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(i){}return null}function _t(){}function bt(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function Tt(e){function t(e,t,i,n){return 3600*(0|e)+60*(0|t)+(0|i)+(0|n)/1e3}var i=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function St(){this.values=xa(null)}function wt(e,t,i,n){var r=n?e.split(n):[e];for(var a in r)if("string"==typeof r[a]){var s=r[a].split(i);if(2===s.length){var o=s[0],u=s[1];t(o,u)}}}function Ct(e,t,i){function n(){var t=Tt(e);if(null===t)throw new bt(bt.Errors.BadTimeStamp,"Malformed timestamp: "+s);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function r(e,t){var n=new St;wt(e,function(e,t){switch(e){case"region":for(var r=i.length-1;r>=0;r--)if(i[r].id===t){n.set(e,i[r].region);break}break;case"vertical":n.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),s=a[0];n.integer(e,s),n.percent(e,s)?n.set("snapToLines",!1):null,n.alt(e,s,["auto"]),2===a.length&&n.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=t.split(","),n.percent(e,a[0]),2===a.length&&n.alt("positionAlign",a[1],["start","center","end"]);break;case"size":n.percent(e,t);break;case"align":n.alt(e,t,["start","center","end","left","right"])}},/:/,/\s/),t.region=n.get("region",null),t.vertical=n.get("vertical","");try{t.line=n.get("line","auto")}catch(r){}t.lineAlign=n.get("lineAlign","start"),t.snapToLines=n.get("snapToLines",!0),t.size=n.get("size",100);try{t.align=n.get("align","center")}catch(r){t.align=n.get("align","middle")}try{t.position=n.get("position","auto")}catch(r){t.position=n.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=n.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}function a(){e=e.replace(/^\s+/,"")}var s=e;if(a(),t.startTime=n(),a(),"-->"!==e.substr(0,3))throw new bt(bt.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+s);e=e.substr(3),a(),t.endTime=n(),a(),r(e,t)}function Et(e,t){function i(){function e(e){return t=t.substr(e.length),e}if(!t)return null;var i=t.match(/^([^<]*)(<[^>]*>?)?/);return e(i[1]?i[1]:i[2])}function n(e){return Da.innerHTML=e,e=Da.textContent,Da.textContent="",e}function r(e,t){return!Na[t.localName]||Na[t.localName]===e.localName}function a(t,i){var n=Ua[t];if(!n)return null;var r=e.document.createElement(n),a=Ma[t];return a&&i&&(r[a]=i.trim()),r}for(var s,o=e.document.createElement("div"),u=o,l=[];null!==(s=i());)if("<"!==s[0])u.appendChild(e.document.createTextNode(n(s)));else{if("/"===s[1]){l.length&&l[l.length-1]===s.substr(2).replace(">","")&&(l.pop(),u=u.parentNode);continue}var d,c=Tt(s.substr(1,s.length-2));if(c){d=e.document.createProcessingInstruction("timestamp",c),u.appendChild(d);continue}var h=s.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!h)continue;if(d=a(h[1],h[3]),!d)continue;if(!r(u,d))continue;if(h[2]){var p=h[2].split(".");p.forEach(function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(Ra.hasOwnProperty(i)){var n=t?"background-color":"color",r=Ra[i];d.style[n]=r}}),d.className=p.join(" ")}l.push(h[1]),u.appendChild(d),u=d}return o}function kt(e){for(var t=0;t=i[0]&&e<=i[1])return!0}return!1}function It(e){function t(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function i(e){if(!e||!e.length)return null;var n=e.pop(),r=n.textContent||n.innerText;if(r){var a=r.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):r}return"ruby"===n.tagName?i(e):n.childNodes?(t(e,n),i(e)):void 0}var n,r=[],a="";if(!e||!e.childNodes)return"ltr";for(t(r,e);a=i(r);)for(var s=0;s=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,n=0,r=0;ru&&(r=new Ot(e),s=u),e=new Ot(a)}return r||a}var a=new Ot(t),s=t.cue,o=At(s),u=[];if(s.snapToLines){var l;switch(s.vertical){case"":u=["+y","-y"],l="height";break;case"rl":u=["+x","-x"],l="width";break;case"lr":u=["-x","+x"],l="width"}var d=a.lineHeight,c=d*Math.round(o),h=i[l]+d,p=u[0];Math.abs(c)>h&&(c=0>c?-1:1,c*=Math.ceil(h/d)*d),0>o&&(c+=""===s.vertical?i.height:i.width,u=u.reverse()),a.move(p,c)}else{var f=a.lineHeight/i.height*100;switch(s.lineAlign){case"center":o-=f/2;break;case"end":o-=f}switch(s.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")})}u=["+y","-x","+x","-y"],a=new Ot(t)}var m=r(a,u);t.move(m.toCSSCompatValues(i))}function Dt(){}function Ut(e){if("string"!=typeof e)return!1;var t=Wa[e.toLowerCase()];return t?e.toLowerCase():!1}function Rt(e){if("string"!=typeof e)return!1;var t=Ga[e.toLowerCase()];return t?e.toLowerCase():!1}function Mt(e,t,i){this.hasBeenReset=!1;var n="",r=!1,a=e,s=t,o=i,u=null,l="",d=!0,c="auto",h="start",p="auto",f="auto",m=100,g="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return n},set:function(e){n=""+e}},pauseOnExit:{enumerable:!0,get:function(){return r},set:function(e){r=!!e}},startTime:{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");a=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");s=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return u},set:function(e){u=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return l},set:function(e){var t=Ut(e);if(t===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");l=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e&&e!==Ha)throw new SyntaxError("Line: an invalid number or illegal string was specified.");c=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=Rt(e);t?(h=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(0>e||e>100)throw new Error("Position must be between 0 and 100.");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=Rt(e);t?(f=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return m},set:function(e){if(0>e||e>100)throw new Error("Size must be between 0 and 100.");m=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return g},set:function(e){var t=Rt(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");g=t,this.hasBeenReset=!0}}}),this.displayState=void 0}function Nt(e){if("string"!=typeof e)return!1;var t=Xa[e.toLowerCase()];return t?e.toLowerCase():!1}function Bt(e){return"number"==typeof e&&e>=0&&100>=e}function Ft(){var e=100,t=3,i=0,n=100,r=0,a=100,s="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Bt(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return n},set:function(e){if(!Bt(e))throw new Error("RegionAnchorX must be between 0 and 100.");n=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Bt(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!Bt(e))throw new Error("ViewportAnchorY must be between 0 and 100.");a=e}},viewportAnchorX:{enumerable:!0,get:function(){return r},set:function(e){if(!Bt(e))throw new Error("ViewportAnchorX must be between 0 and 100.");r=e}},scroll:{enumerable:!0,get:function(){return s},set:function(e){var t=Nt(e);t===!1?console.warn("Scroll: an invalid or illegal string was specified."):s=t}}})}function jt(e,t,i,n,r){void 0===r&&(r={});var a=e.textTracks();r.kind=t,i&&(r.label=i),n&&(r.language=n),r.tech=e;var s=new Oa.text.TrackClass(r);return a.addTrack(s),s}function qt(e,t){$a[e]=$a[e]||[],$a[e].push(t)}function Vt(e,t,i){e.setTimeout(function(){return $t(t,$a[t.type],i,e)},1)}function Ht(e,t){e.forEach(function(e){return e.setTech&&e.setTech(t)})}function Wt(e,t,i){return e.reduceRight(Xt(i),t[i]())}function Gt(e,t,i,n){return t[i](e.reduce(Xt(i),n))}function zt(e,t,i,n){void 0===n&&(n=null);var r="call"+rr(i),a=e.reduce(Xt(r),n),s=a===Za,o=s?null:t[i](a);return Kt(e,i,o,s),o}function Xt(e){return function(t,i){return t===Za?Za:i[e]?i[e](t):t}}function Kt(e,t,i,n){for(var r=e.length-1;r>=0;r--){var a=e[r];a[t]&&a[t](n,i)}}function Yt(e){Ja[e.id()]=null}function Qt(e,t){var i=Ja[e.id()],n=null;if(void 0===i||null===i)return n=t(e),Ja[e.id()]=[[t,n]],n;for(var r=0;r65535){e-=65536;var t=55296+(e>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function s(e){var t=e.slice(1,-1);return t in i?i[t]:"#"===t.charAt(0)?a(parseInt(t.substr(1).replace("x","0x"))):(r.error("entity not found:"+e),e)}function o(t){if(t>m){var i=e.substring(m,t).replace(/&#?\w+;/g,s);h&&u(m),n.characters(i,0,t-m),m=t}}function u(t,i){for(;t>=d&&(i=c.exec(e));)l=i.index,d=l+i[0].length,h.lineNumber++;h.columnNumber=t-l+1}for(var l=0,d=0,c=/.*(?:\r\n?|\n)|.*$/g,h=n.locator,p=[{currentNSMap:t}],f={},m=0;;){try{var g=e.indexOf("<",m);if(0>g){if(!e.substr(m).match(/^\s*$/)){var v=n.doc,y=v.createTextNode(e.substr(m));v.appendChild(y),n.currentElement=y}return}switch(g>m&&o(g),e.charAt(g+1)){case"/":var _=e.indexOf(">",g+3),b=e.substring(g+2,_),T=p.pop();0>_?(b=e.substring(g+2).replace(/[\s<].*/,""),r.error("end tag name: "+b+" is not complete:"+T.tagName),_=g+1+b.length):b.match(/\sP;P++){var O=k[P];u(O.offset),O.locator=mi(h,{})}n.locator=L,vi(k,n,I)&&p.push(k),n.locator=h}else vi(k,n,I)&&p.push(k);"http://www.w3.org/1999/xhtml"!==k.uri||k.closed?_++:_=yi(e,_,k.tagName,s,n)}}catch(x){r.error("element parse error: "+x),_=-1}_>m?m=_:o(Math.max(g,m)+1)}}function mi(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function gi(e,t,i,n,r,a){for(var s,o,u=++t,l=Bu;;){var d=e.charAt(u);switch(d){case"=":if(l===Fu)s=e.slice(t,u),l=qu;else{if(l!==ju)throw new Error("attribute equal must after attrName");l=qu}break;case"'":case'"':if(l===qu||l===Fu){if(l===Fu&&(a.warning('attribute value must after "="'),s=e.slice(t,u)),t=u+1,u=e.indexOf(d,t),!(u>0))throw new Error("attribute value no end '"+d+"' match");o=e.slice(t,u).replace(/&#?\w+;/g,r),i.add(s,o,t-1),l=Hu}else{if(l!=Vu)throw new Error('attribute value must after "="');o=e.slice(t,u).replace(/&#?\w+;/g,r),i.add(s,o,t),a.warning('attribute "'+s+'" missed start quot('+d+")!!"),t=u+1,l=Hu}break;case"/":switch(l){case Bu:i.setTagName(e.slice(t,u));case Hu:case Wu:case Gu:l=Gu,i.closed=!0;case Vu:case Fu:case ju:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),l==Bu&&i.setTagName(e.slice(t,u)),u;case">":switch(l){case Bu:i.setTagName(e.slice(t,u));case Hu:case Wu:case Gu:break;case Vu:case Fu:o=e.slice(t,u),"/"===o.slice(-1)&&(i.closed=!0,o=o.slice(0,-1));case ju:l===ju&&(o=s),l==Vu?(a.warning('attribute "'+o+'" missed quot(")!!'),i.add(s,o.replace(/&#?\w+;/g,r),t)):("http://www.w3.org/1999/xhtml"===n[""]&&o.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+o+'" missed value!! "'+o+'" instead!!'),i.add(o,o,t));break;case qu:throw new Error("attribute value missed!!")}return u;case"\x80":d=" ";default:if(" ">=d)switch(l){case Bu:i.setTagName(e.slice(t,u)),l=Wu;break;case Fu:s=e.slice(t,u),l=ju;break;case Vu:var o=e.slice(t,u).replace(/&#?\w+;/g,r);a.warning('attribute "'+o+'" missed quot(")!!'),i.add(s,o,t);case Hu:l=Wu}else switch(l){case ju:{i.tagName}"http://www.w3.org/1999/xhtml"===n[""]&&s.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+s+'" missed value!! "'+s+'" instead2!!'),i.add(s,s,t),t=u,l=Fu;break;case Hu:a.warning('attribute space is required"'+s+'"!!');case Wu:l=Fu,t=u;break;case qu:l=Vu,t=u;break;case Gu:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function vi(e,t,i){for(var n=e.tagName,r=null,a=e.length;a--;){var s=e[a],o=s.qName,u=s.value,l=o.indexOf(":"); if(l>0)var d=s.prefix=o.slice(0,l),c=o.slice(l+1),h="xmlns"===d&&c;else c=o,d=null,h="xmlns"===o&&"";s.localName=c,h!==!1&&(null==r&&(r={},bi(i,i={})),i[h]=r[h]=u,s.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(h,u))}for(var a=e.length;a--;){s=e[a];var d=s.prefix;d&&("xml"===d&&(s.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==d&&(s.uri=i[d||""]))}var l=n.indexOf(":");l>0?(d=e.prefix=n.slice(0,l),c=e.localName=n.slice(l+1)):(d=null,c=e.localName=n);var p=e.uri=i[d||""];if(t.startElement(p,c,n,e),!e.closed)return e.currentNSMap=i,e.localNSMap=r,!0;if(t.endElement(p,c,n),r)for(d in r)t.endPrefixMapping(d)}function yi(e,t,i,n,r){if(/^(?:script|textarea)$/i.test(i)){var a=e.indexOf("",t),s=e.substring(t+1,a);if(/[&<]/.test(s))return/^script$/i.test(i)?(r.characters(s,0,s.length),a):(s=s.replace(/&#?\w+;/g,n),r.characters(s,0,s.length),a)}return t+1}function _i(e,t,i,n){var r=n[i];return null==r&&(r=e.lastIndexOf(""),t>r&&(r=e.lastIndexOf("r}function bi(e,t){for(var i in e)t[i]=e[i]}function Ti(e,t,i,n){var r=e.charAt(t+2);switch(r){case"-":if("-"===e.charAt(t+3)){var a=e.indexOf("-->",t+4);return a>t?(i.comment(e,t+4,a-t-4),a+3):(n.error("Unclosed comment"),-1)}return-1;default:if("CDATA["==e.substr(t+3,6)){var a=e.indexOf("]]>",t+9);return i.startCDATA(),i.characters(e,t+9,a-t-9),i.endCDATA(),a+3}var s=Ei(e,t),o=s.length;if(o>1&&/!doctype/i.test(s[0][0])){var u=s[1][0],l=o>3&&/^public$/i.test(s[2][0])&&s[3][0],d=o>4&&s[4][0],c=s[o-1];return i.startDTD(u,l&&l.replace(/^(['"])(.*?)\1$/,"$2"),d&&d.replace(/^(['"])(.*?)\1$/,"$2")),i.endDTD(),c.index+c[0].length}}return-1}function Si(e,t,i){var n=e.indexOf("?>",t);if(n){var r=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(r){{r[0].length}return i.processingInstruction(r[1],r[2]),n+2}return-1}return-1}function wi(){}function Ci(e,t){return e.__proto__=t,e}function Ei(e,t){var i,n=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(r.lastIndex=t,r.exec(e);i=r.exec(e);)if(n.push(i),i[1])return n}function ki(e,t){for(var i in e)t[i]=e[i]}function Ii(e,t){var i=e.prototype;if(Object.create){var n=Object.create(t.prototype);i.__proto__=n}if(!(i instanceof t)){var r=function(){};r.prototype=t.prototype,r=new r,ki(i,r),e.prototype=i=r}i.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),i.constructor=e)}function Ai(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,ll[e]),this.message=ll[e],Error.captureStackTrace&&Error.captureStackTrace(this,Ai);return i.code=e,t&&(this.message=this.message+": "+t),i}function Li(){}function Pi(e,t){this._node=e,this._refresh=t,Oi(this)}function Oi(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var i=e._refresh(e._node);hn(e,"length",i.length),ki(i,e),e._inc=t}}function xi(){}function Di(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function Ui(e,t,i,n){if(n?t[Di(t,n)]=i:t[t.length++]=i,e){i.ownerElement=e;var r=e.ownerDocument;r&&(n&&Vi(r,e,n),qi(r,e,i))}}function Ri(e,t,i){var n=Di(t,i);if(!(n>=0))throw Ai(cl,new Error(e.tagName+"@"+i));for(var r=t.length-1;r>n;)t[n]=t[++n];if(t.length=r,e){var a=e.ownerDocument;a&&(Vi(a,e,i),i.ownerElement=null)}}function Mi(e){if(this._features={},e)for(var t in e)this._features=e[t]}function Ni(){}function Bi(e){return"<"==e&&"<"||">"==e&&">"||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function Fi(e,t){if(t(e))return!0;if(e=e.firstChild)do if(Fi(e,t))return!0;while(e=e.nextSibling)}function ji(){}function qi(e,t,i){e&&e._inc++;var n=i.namespaceURI;"http://www.w3.org/2000/xmlns/"==n&&(t._nsMap[i.prefix?i.localName:""]=i.value)}function Vi(e,t,i){e&&e._inc++;var n=i.namespaceURI;"http://www.w3.org/2000/xmlns/"==n&&delete t._nsMap[i.prefix?i.localName:""]}function Hi(e,t,i){if(e&&e._inc){e._inc++;var n=t.childNodes;if(i)n[n.length++]=i;else{for(var r=t.firstChild,a=0;r;)n[a++]=r,r=r.nextSibling;n.length=a}}}function Wi(e,t){var i=t.previousSibling,n=t.nextSibling;return i?i.nextSibling=n:e.firstChild=n,n?n.previousSibling=i:e.lastChild=i,Hi(e.ownerDocument,e),t}function Gi(e,t,i){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===sl){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var s=i?i.previousSibling:e.lastChild;r.previousSibling=s,a.nextSibling=i,s?s.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do r.parentNode=e;while(r!==a&&(r=r.nextSibling));return Hi(e.ownerDocument||e,e),t.nodeType==sl&&(t.firstChild=t.lastChild=null),t}function zi(e,t){var i=t.parentNode;if(i){var n=e.lastChild;i.removeChild(t);var n=e.lastChild}var n=e.lastChild;return t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,Hi(e.ownerDocument,e,t),t}function Xi(){this._nsMap={}}function Ki(){}function Yi(){}function Qi(){}function $i(){}function Ji(){}function Zi(){}function en(){}function tn(){}function nn(){}function rn(){}function an(){}function sn(){}function on(e,t){var i=[],n=9==this.nodeType?this.documentElement:this,r=n.prefix,a=n.namespaceURI;if(a&&null==r){var r=n.lookupPrefix(a);if(null==r)var s=[{namespace:a,prefix:null}]}return ln(this,i,e,t,s),i.join("")}function un(e,t,i){var n=e.prefix||"",r=e.namespaceURI;if(!n&&!r)return!1;if("xml"===n&&"http://www.w3.org/XML/1998/namespace"===r||"http://www.w3.org/2000/xmlns/"==r)return!1;for(var a=i.length;a--;){var s=i[a];if(s.prefix==n)return s.namespace!=r}return!0}function ln(e,t,i,n,r){if(n){if(e=n(e),!e)return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case Qu:r||(r=[]);var a=(r.length,e.attributes),s=a.length,o=e.firstChild,u=e.tagName;i=Ku===e.namespaceURI||i,t.push("<",u);for(var l=0;s>l;l++){var d=a.item(l);"xmlns"==d.prefix?r.push({prefix:d.localName,namespace:d.value}):"xmlns"==d.nodeName&&r.push({prefix:"",namespace:d.value})}for(var l=0;s>l;l++){var d=a.item(l);if(un(d,i,r)){var c=d.prefix||"",h=d.namespaceURI,p=c?" xmlns:"+c:" xmlns";t.push(p,'="',h,'"'),r.push({prefix:c,namespace:h})}ln(d,t,i,n,r)}if(un(e,i,r)){var c=e.prefix||"",h=e.namespaceURI,p=c?" xmlns:"+c:" xmlns";t.push(p,'="',h,'"'),r.push({prefix:c,namespace:h})}if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(t.push(">"),i&&/^script$/i.test(u))for(;o;)o.data?t.push(o.data):ln(o,t,i,n,r),o=o.nextSibling;else for(;o;)ln(o,t,i,n,r),o=o.nextSibling;t.push("")}else t.push("/>");return;case rl:case sl:for(var o=e.firstChild;o;)ln(o,t,i,n,r),o=o.nextSibling;return;case $u:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,Bi),'"');case Ju:return t.push(e.data.replace(/[<&]/g,Bi));case Zu:return t.push("");case nl:return t.push("");case al:var f=e.publicId,m=e.systemId;if(t.push("');else if(m&&"."!=m)t.push(' SYSTEM "',m,'">');else{var g=e.internalSubset;g&&t.push(" [",g,"]"),t.push(">")}return;case il:return t.push("");case el:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function dn(e,t,i){var n;switch(t.nodeType){case Qu:n=t.cloneNode(!1),n.ownerDocument=e;case sl:break;case $u:i=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,i)for(var r=t.firstChild;r;)n.appendChild(dn(e,r,i)),r=r.nextSibling;return n}function cn(e,t,i){var n=new t.constructor;for(var r in t){var a=t[r];"object"!=typeof a&&a!=n[r]&&(n[r]=a)}switch(t.childNodes&&(n.childNodes=new Li),n.ownerDocument=e,n.nodeType){case Qu:var s=t.attributes,o=n.attributes=new xi,u=s.length;o._ownerElement=n;for(var l=0;u>l;l++)n.setAttributeNode(cn(e,s.item(l),!0));break;case $u:i=!0}if(i)for(var d=t.firstChild;d;)n.appendChild(cn(e,d,i)),d=d.nextSibling;return n}function hn(e,t,i){e[t]=i}function pn(e,t){return function(i){var n=this;if(!t)return new Af(e);if(Af&&!i){var r=t.toString().replace(/^function.+?{/,"").slice(0,-1),a=fn(r);return this[Cf]=new Af(a),mn(this[Cf],a),this[Cf]}var s={postMessage:function(e){n.onmessage&&setTimeout(function(){n.onmessage({data:e,target:s})})}};t.call(s),this.postMessage=function(e){setTimeout(function(){s.onmessage({data:e,target:n})})},this.isThisThread=!0}}function fn(e){try{return If.createObjectURL(new Blob([e],{type:Ef}))}catch(t){var i=new kf;return i.append(e),If.createObjectURL(i.getBlob(type))}}function mn(e,t){if(e&&t){var i=e.terminate;e.objURL=t,e.terminate=function(){e.objURL&&If.revokeObjectURL(e.objURL),i.call(e)}}}function gn(){}e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e,t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t["default"]:t;var vn,yn="7.10.2",_n=[],bn=function(t,i){return function(n,r,a){var s=i.levels[r],o=new RegExp("^("+s+")$");if("log"!==n&&a.unshift(n.toUpperCase()+":"),a.unshift(t+":"),_n){_n.push([].concat(a));var u=_n.length-1e3;_n.splice(0,u>0?u:0)}if(e.console){var l=e.console[n];l||"debug"!==n||(l=e.console.info||e.console.log),l&&s&&o.test(n)&&l[Array.isArray(a)?"apply":"call"](e.console,a)}}},Tn=i("VIDEOJS"),Sn=Tn.createLogger,wn=r(function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t0)for(var a=0,s=r.length;s>a;a++){var o=r[a];if(!o||!o.getAttribute){q(1);break}if(void 0===o.player){var u=o.getAttribute("data-setup");null!==u&&vn(o)}}else Ln||q(1)}};f()&&("complete"===t.readyState?V():e.addEventListener("load",V));var On,xn=function(e){var i=t.createElement("style");return i.className=e,i},Dn=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},Un=3,Rn=Un;e.WeakMap||(On=function(){function t(){this.vdata="vdata"+Math.floor(e.performance&&e.performance.now()||Date.now()),this.data={}}var i=t.prototype;return i.set=function(e,t){var i=e[this.vdata]||H();return e[this.vdata]||(e[this.vdata]=i),this.data[i]=t,this},i.get=function(e){var t=e[this.vdata];return t?this.data[t]:void Tn("We have no data for this element",e)},i.has=function(e){var t=e[this.vdata];return t in this.data},i["delete"]=function(e){var t=e[this.vdata];t&&(delete this.data[t],delete e[this.vdata])},t}());var Mn,Nn=e.WeakMap?new WeakMap:new On,Bn=function(){if("boolean"!=typeof Mn){Mn=!1;try{var t=Object.defineProperty({},"passive",{get:function(){Mn=!0}});e.addEventListener("test",null,t),e.removeEventListener("test",null,t)}catch(i){}}return Mn},Fn=["touchstart","touchmove"],jn=Object.freeze({__proto__:null,fixEvent:z,on:X,off:K,trigger:Y,one:Q,any:$}),qn=30,Vn=function(e,t,i){t.guid||(t.guid=H());var n=t.bind(e);return n.guid=i?i+"_"+t.guid:t.guid,n},Hn=function(t,i){var n=e.performance.now(),r=function(){var r=e.performance.now();r-n>=i&&(t.apply(void 0,arguments),n=r)};return r},Wn=function(t,i,n,r){void 0===r&&(r=e);var a,s=function(){r.clearTimeout(a),a=null},o=function(){var e=this,s=arguments,o=function(){a=null,o=null,n||t.apply(e,s)};!a&&n&&t.apply(e,s),r.clearTimeout(a),a=r.setTimeout(o,i)};return o.cancel=s,o},Gn=function(){};Gn.prototype.allowedEvents_={},Gn.prototype.on=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},X(this,e,t),this.addEventListener=i},Gn.prototype.addEventListener=Gn.prototype.on,Gn.prototype.off=function(e,t){K(this,e,t)},Gn.prototype.removeEventListener=Gn.prototype.off,Gn.prototype.one=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},Q(this,e,t),this.addEventListener=i},Gn.prototype.any=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},$(this,e,t),this.addEventListener=i},Gn.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=z(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),Y(this,e)},Gn.prototype.dispatchEvent=Gn.prototype.trigger;var zn;Gn.prototype.queueTrigger=function(t){var i=this;zn||(zn=new Map);var n=t.type||t,r=zn.get(this);r||(r=new Map,zn.set(this,r));var a=r.get(n);r["delete"](n),e.clearTimeout(a);var s=e.setTimeout(function(){0===r.size&&(r=null,zn["delete"](i)),i.trigger(t)},0);r.set(n,s)};var Xn=function(e){return e instanceof Gn||!!e.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"==typeof e[t]})},Kn=function(e,t){Xn(e)?t():(e.eventedCallbacks||(e.eventedCallbacks=[]),e.eventedCallbacks.push(t))},Yn=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},Qn=function(e){if(!e.nodeName&&!Xn(e))throw new Error("Invalid target; must be a DOM node or evented object.")},$n=function(e){if(!Yn(e))throw new Error("Invalid event type; must be a non-empty string or array.")},Jn=function(e){if("function"!=typeof e)throw new Error("Invalid listener; must be a function.")},Zn=function(e,t){var i,n,r,a=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return a?(i=e.eventBusEl_,t.length>=3&&t.shift(),n=t[0],r=t[1]):(i=t[0],n=t[1],r=t[2]),Qn(i),$n(n),Jn(r),r=Vn(e,r),{isTargetingSelf:a,target:i,type:n,listener:r}},er=function(e,t,i,n){Qn(e),e.nodeName?jn[t](e,i,n):e[t](i,n)},tr={on:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;t>n;n++)i[n]=arguments[n];var r=Zn(this,i),a=r.isTargetingSelf,s=r.target,o=r.type,u=r.listener;if(er(s,"on",o,u),!a){var l=function(){return e.off(s,o,u)};l.guid=u.guid;var d=function(){return e.off("dispose",l)};d.guid=u.guid,er(this,"on","dispose",l),er(s,"on","dispose",d)}},one:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;t>n;n++)i[n]=arguments[n];var r=Zn(this,i),a=r.isTargetingSelf,s=r.target,o=r.type,u=r.listener;if(a)er(s,"one",o,u);else{var l=function d(){e.off(s,o,d);for(var t=arguments.length,i=new Array(t),n=0;t>n;n++)i[n]=arguments[n];u.apply(null,i)};l.guid=u.guid,er(s,"one",o,l)}},any:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;t>n;n++)i[n]=arguments[n];var r=Zn(this,i),a=r.isTargetingSelf,s=r.target,o=r.type,u=r.listener;if(a)er(s,"any",o,u);else{var l=function d(){e.off(s,o,d);for(var t=arguments.length,i=new Array(t),n=0;t>n;n++)i[n]=arguments[n];u.apply(null,i)};l.guid=u.guid,er(s,"any",o,l)}},off:function(e,t,i){if(!e||Yn(e))K(this.eventBusEl_,e,t);else{var n=e,r=t;Qn(n),$n(r),Jn(i),i=Vn(this,i),this.off("dispose",i),n.nodeName?(K(n,r,i),K(n,"dispose",i)):Xn(n)&&(n.off(r,i),n.off("dispose",i))}},trigger:function(e,t){return Y(this.eventBusEl_,e,t)}},ir={state:{},setState:function(e){var t=this;"function"==typeof e&&(e=e());var i;return a(e,function(e,n){t.state[n]!==e&&(i=i||{},i[n]={from:t.state[n],to:e}),t.state[n]=e}),i&&Xn(this)&&this.trigger({changes:i,type:"statechanged"}),i}},nr=function(e){return"string"!=typeof e?e:e.replace(/./,function(e){return e.toLowerCase()})},rr=function(e){return"string"!=typeof e?e:e.replace(/./,function(e){return e.toUpperCase()})},ar=function(e,t){return rr(e)===rr(t)},sr=function(){function e(){this.map_={}}var t=e.prototype;return t.has=function(e){return e in this.map_},t["delete"]=function(e){var t=this.has(e);return delete this.map_[e],t},t.set=function(e,t){return this.set_[e]=t,this},t.forEach=function(e,t){for(var i in this.map_)e.call(t,this.map_[i],i,this)},e}(),or=e.Map?e.Map:sr,ur=function(){function e(){this.set_={}}var t=e.prototype;return t.has=function(e){return e in this.set_},t["delete"]=function(e){var t=this.has(e);return delete this.set_[e],t},t.add=function(e){return this.set_[e]=1,this},t.forEach=function(e,t){for(var i in this.set_)e.call(t,i,i,this)},e}(),lr=e.Set?e.Set:ur,dr=function(){function t(e,t,i){if(this.player_=!e&&this.play?e=this:e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=et({},this.options_),t=this.options_=et(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var n=e&&e.id&&e.id()||"no_player";this.id_=n+"_component_"+H()}this.name_=t.name||null,t.el?this.el_=t.el:t.createEl!==!1&&(this.el_=this.createEl()),t.evented!==!1&&J(this,{eventBusKey:this.el_?"el_":null}),Z(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new lr,this.setIntervalIds_=new lr,this.rafIds_=new lr,this.namedRafs_=new or,this.clearingTimersOnDispose_=!1,t.initChildren!==!1&&this.initChildren(),this.ready(i),t.reportTouchActivity!==!1&&this.enableTouchActivity()}var i=t.prototype;return i.dispose=function(){if(!this.isDisposed_){if(this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Nn.has(this.el_)&&Nn["delete"](this.el_),this.el_=null),this.player_=null}},i.isDisposed=function(){return Boolean(this.isDisposed_)},i.player=function(){return this.player_},i.options=function(e){return e?(this.options_=et(this.options_,e),this.options_):this.options_},i.el=function(){return this.el_},i.createEl=function(e,t,i){return y(e,t,i)},i.localize=function(e,t,i){void 0===i&&(i=e);var n=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),a=r&&r[n],s=n&&n.split("-")[0],o=r&&r[s],u=i;return a&&a[e]?u=a[e]:o&&o[e]&&(u=o[e]),t&&(u=u.replace(/\{(\d+)\}/g,function(e,i){var n=t[i-1],r=n;return"undefined"==typeof n&&(r=e),r})),u},i.contentEl=function(){return this.contentEl_||this.el_},i.id=function(){return this.id_},i.name=function(){return this.name_},i.children=function(){return this.children_},i.getChildById=function(e){return this.childIndex_[e]},i.getChild=function(e){return e?this.childNameIndex_[e]:void 0},i.getDescendant=function(){for(var e=arguments.length,t=new Array(e),i=0;e>i;i++)t[i]=arguments[i];t=t.reduce(function(e,t){return e.concat(t)},[]);for(var n=this,r=0;r=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[rr(e.name())]=null,this.childNameIndex_[nr(e.name())]=null;var n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},i.initChildren=function(){var e=this,i=this.options_.children;if(i){var n,r=this.options_,a=function(t){var i=t.name,n=t.opts;if(void 0!==r[i]&&(n=r[i]),n!==!1){n===!0&&(n={}),n.playerOptions=e.options_.playerOptions;var a=e.addChild(i,n);a&&(e[i]=a)}},s=t.getComponent("Tech");n=Array.isArray(i)?i:Object.keys(i),n.concat(Object.keys(this.options_).filter(function(e){return!n.some(function(t){return"string"==typeof t?e===t:e===t.name})})).map(function(t){var n,r;return"string"==typeof t?(n=t,r=i[n]||e.options_[n]||{}):(n=t.name,r=t),{name:n,opts:r}}).filter(function(e){var i=t.getComponent(e.opts.componentClass||rr(e.name));return i&&!s.isTech(i)}).forEach(a)}},i.buildCSSClass=function(){return""},i.ready=function(e,t){return void 0===t&&(t=!1),e?this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e)):void 0},i.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)},i.$=function(e,t){return kn(e,t||this.contentEl())},i.$$=function(e,t){return In(e,t||this.contentEl())},i.hasClass=function(e){return T(this.el_,e)},i.addClass=function(e){S(this.el_,e)},i.removeClass=function(e){w(this.el_,e)},i.toggleClass=function(e,t){C(this.el_,e,t)},i.show=function(){this.removeClass("vjs-hidden")},i.hide=function(){this.addClass("vjs-hidden")},i.lockShowing=function(){this.addClass("vjs-lock-showing")},i.unlockShowing=function(){this.removeClass("vjs-lock-showing")},i.getAttribute=function(e){return I(this.el_,e)},i.setAttribute=function(e,t){A(this.el_,e,t)},i.removeAttribute=function(e){L(this.el_,e)},i.width=function(e,t){return this.dimension("width",e,t)},i.height=function(e,t){return this.dimension("height",e,t)},i.dimensions=function(e,t){this.width(e,!0),this.height(t)},i.dimension=function(e,t,i){if(void 0!==t)return(null===t||t!==t)&&(t=0),this.el_.style[e]=-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?t:"auto"===t?"":t+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var n=this.el_.style[e],r=n.indexOf("px");return-1!==r?parseInt(n.slice(0,r),10):parseInt(this.el_["offset"+rr(e)],10)},i.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=d(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){var i="offset"+rr(e);t=this.el_[i]}return t},i.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},i.currentWidth=function(){return this.currentDimension("width")},i.currentHeight=function(){return this.currentDimension("height")},i.focus=function(){this.el_.focus()},i.blur=function(){this.el_.blur()},i.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},i.handleKeyPress=function(e){this.handleKeyDown(e)},i.emitTapEvents=function(){var t,i=0,n=null,r=10,a=200;this.on("touchstart",function(r){1===r.touches.length&&(n={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},i=e.performance.now(),t=!0)}),this.on("touchmove",function(e){if(e.touches.length>1)t=!1;else if(n){var i=e.touches[0].pageX-n.pageX,a=e.touches[0].pageY-n.pageY,s=Math.sqrt(i*i+a*a);s>r&&(t=!1)}});var s=function(){t=!1};this.on("touchleave",s),this.on("touchcancel",s),this.on("touchend",function(r){if(n=null,t===!0){var s=e.performance.now()-i;a>s&&(r.preventDefault(),this.trigger("tap"))}})},i.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=Vn(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){t(),this.clearInterval(e),e=this.setInterval(t,250)});var i=function(){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",i),this.on("touchcancel",i)}},i.setTimeout=function(t,i){var n,r=this;return t=Vn(this,t),this.clearTimersOnDispose_(),n=e.setTimeout(function(){r.setTimeoutIds_.has(n)&&r.setTimeoutIds_["delete"](n),t()},i),this.setTimeoutIds_.add(n),n},i.clearTimeout=function(t){return this.setTimeoutIds_.has(t)&&(this.setTimeoutIds_["delete"](t),e.clearTimeout(t)),t},i.setInterval=function(t,i){t=Vn(this,t),this.clearTimersOnDispose_();var n=e.setInterval(t,i);return this.setIntervalIds_.add(n),n},i.clearInterval=function(t){return this.setIntervalIds_.has(t)&&(this.setIntervalIds_["delete"](t),e.clearInterval(t)),t},i.requestAnimationFrame=function(t){var i=this;if(!this.supportsRaf_)return this.setTimeout(t,1e3/60);this.clearTimersOnDispose_();var n;return t=Vn(this,t),n=e.requestAnimationFrame(function(){i.rafIds_.has(n)&&i.rafIds_["delete"](n),t()}),this.rafIds_.add(n),n},i.requestNamedAnimationFrame=function(e,t){var i=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=Vn(this,t);var n=this.requestAnimationFrame(function(){t(),i.namedRafs_.has(e)&&i.namedRafs_["delete"](e)});return this.namedRafs_.set(e,n),e}},i.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_["delete"](e))},i.cancelAnimationFrame=function(t){return this.supportsRaf_?(this.rafIds_.has(t)&&(this.rafIds_["delete"](t),e.cancelAnimationFrame(t)),t):this.clearTimeout(t)},i.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(function(t){var i=t[0],n=t[1];e[i].forEach(function(t,i){return e[n](i)})}),e.clearingTimersOnDispose_=!1}))},t.registerComponent=function(e,i){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var n=t.getComponent("Tech"),r=n&&n.isTech(i),a=t===i||t.prototype.isPrototypeOf(i.prototype);if(r||!a){var s;throw s=r?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+s+".")}e=rr(e),t.components_||(t.components_={});var o=t.getComponent("Player");if("Player"===e&&o&&o.players){var u=o.players,l=Object.keys(u);if(u&&l.length>0&&l.map(function(e){return u[e]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=i,t.components_[nr(e)]=i,i},t.getComponent=function(e){return e&&t.components_?t.components_[e]:void 0},t}();dr.prototype.supportsRaf_="function"==typeof e.requestAnimationFrame&&"function"==typeof e.cancelAnimationFrame,dr.registerComponent("Component",dr);for(var cr,hr=tt,pr=(r(function(e){function t(i){"@babel/helpers - typeof";return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(i)}e.exports=t}),r(function(e){function t(i){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(i)}e.exports=t}),it),fr=e.navigator&&e.navigator.userAgent||"",mr=/AppleWebKit\/([\d.]+)/i.exec(fr),gr=mr?parseFloat(mr.pop()):null,vr=/iPod/i.test(fr),yr=function(){var e=fr.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),_r=/Android/i.test(fr),br=function(){var e=fr.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+"."+e[2]):t?t:null}(),Tr=_r&&5>br&&537>gr,Sr=/Firefox/i.test(fr),wr=/Edg/i.test(fr),Cr=!wr&&(/Chrome/i.test(fr)||/CriOS/i.test(fr)),Er=function(){var e=fr.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),kr=function(){var e=/MSIE\s(\d+)\.\d/.exec(fr),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(fr)&&/rv:11.0/.test(fr)&&(t=11),t}(),Ir=/Safari/i.test(fr)&&!Cr&&!_r&&!wr,Ar=/Windows/i.test(fr),Lr=(f()&&("ontouchstart"in e||e.navigator.maxTouchPoints||e.DocumentTouch&&e.document instanceof e.DocumentTouch)),Pr=/iPad/i.test(fr)||Ir&&Lr&&!/iPhone/i.test(fr),Or=/iPhone/i.test(fr)&&!Pr,xr=Or||Pr||vr,Dr=(Ir||xr)&&!Cr,Ur=Object.freeze({__proto__:null,IS_IPOD:vr,IOS_VERSION:yr,IS_ANDROID:_r,ANDROID_VERSION:br,IS_NATIVE_ANDROID:Tr,IS_FIREFOX:Sr,IS_EDGE:wr,IS_CHROME:Cr,CHROME_VERSION:Er,IE_VERSION:kr,IS_SAFARI:Ir,IS_WINDOWS:Ar,TOUCH_ENABLED:Lr,IS_IPAD:Pr,IS_IPHONE:Or,IS_IOS:xr,IS_ANY_SAFARI:Dr}),Rr={prefixed:!0},Mr=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],Nr=Mr[0],Br=0;Bra;a++)n[String.fromCharCode(a)]=a-32;for(var a=48;58>a;a++)n[a-48]=a;for(a=1;13>a;a++)n["f"+a]=a+111;for(a=0;10>a;a++)n["numpad "+a]=a+96;var s=t.names=t.title={};for(a in n)s[n[a]]=a;for(var o in r)n[o]=r[o]}),Xr=(zr.code,zr.codes,zr.aliases,zr.names,zr.title,"vjs-modal-dialog"),Kr=function(i){function n(e,t){var n;return n=i.call(this,e,t)||this,n.opened_=n.hasBeenOpened_=n.hasBeenFilled_=!1,n.closeable(!n.options_.uncloseable),n.content(n.options_.content),n.contentEl_=y("div",{className:Xr+"-content"},{role:"document"}),n.descEl_=y("p",{className:Xr+"-description vjs-control-text",id:n.el().getAttribute("aria-describedby")}),_(n.descEl_,n.description()),n.el_.appendChild(n.descEl_),n.el_.appendChild(n.contentEl_),n}pr(n,i);var r=n.prototype;return r.createEl=function(){return i.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"}) },r.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,i.prototype.dispose.call(this)},r.buildCSSClass=function(){return Xr+" vjs-hidden "+i.prototype.buildCSSClass.call(this)},r.label=function(){return this.localize(this.options_.label||"Modal Window")},r.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},r.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},r.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},r.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},r.closeable=function a(e){if("boolean"==typeof e){var a=this.closeable_=!!e,t=this.getChild("closeButton");if(a&&!t){var i=this.contentEl_;this.contentEl_=this.el_,t=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=i,this.on(t,"close",this.close)}!a&&t&&(this.off(t,"close",this.close),this.removeChild(t),t.dispose())}return this.closeable_},r.fill=function(){this.fillWith(this.content())},r.fillWith=function(e){var t=this.contentEl(),i=t.parentNode,n=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),F(t,e),this.trigger("modalfill"),n?i.insertBefore(t,n):i.appendChild(t);var r=this.getChild("closeButton");r&&i.appendChild(r.el_)},r.empty=function(){this.trigger("beforemodalempty"),M(this.contentEl()),this.trigger("modalempty")},r.content=function(e){return"undefined"!=typeof e&&(this.content_=e),this.content_},r.conditionalFocus_=function(){var e=t.activeElement,i=this.player_.el_;this.previouslyActiveEl_=null,(i.contains(e)||i===e)&&(this.previouslyActiveEl_=e,this.focus())},r.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},r.handleKeyDown=function(e){if(e.stopPropagation(),zr.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(zr.isEventKey(e,"Tab")){for(var i,n=this.focusableEls_(),r=this.el_.querySelector(":focus"),a=0;ai;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},i.getTrackById=function(e){for(var t=null,i=0,n=this.length;n>i;i++){var r=this[i];if(r.id===e){t=r;break}}return t},t}(Gn);Yr.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var Qr in Yr.prototype.allowedEvents_)Yr.prototype["on"+Qr]=null;var $r=function(e,t){for(var i=0;i=0;n--)if(t[n].enabled){$r(t,t[n]);break}return i=e.call(this,t)||this,i.changing_=!1,i}pr(t,e);var i=t.prototype;return i.addTrack=function(t){var i=this;t.enabled&&$r(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){i.changing_||(i.changing_=!0,$r(i,t),i.changing_=!1,i.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},i.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(Yr),Zr=function(e,t){for(var i=0;i=0;n--)if(t[n].selected){Zr(t,t[n]);break}return i=e.call(this,t)||this,i.changing_=!1,Object.defineProperty(hr(i),"selectedIndex",{get:function(){for(var e=0;et;t++)this.addTrackElement_(e[t])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,i=0,n=this.trackElements_.length;n>i;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t},t.removeTrackElement_=function(e){for(var t=0,i=this.trackElements_.length;i>t;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),na=function(){function e(t){e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=e.prototype;return t.setCues_=function(e){var t=this.length||0,i=0,n=e.length;this.cues_=e,this.length_=e.length;var r=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(n>t)for(i=t;n>i;i++)r.call(this,i)},t.getCueById=function(e){for(var t=null,i=0,n=this.length;n>i;i++){var r=this[i];if(r.id===e){t=r;break}}return t},e}(),ra={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},aa={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},sa={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},oa={disabled:"disabled",hidden:"hidden",showing:"showing"},ua=function(e){function t(t){var i;void 0===t&&(t={}),i=e.call(this)||this;var n={id:t.id||"vjs_track_"+H(),kind:t.kind||"",label:t.label||"",language:t.language||""},r=function(e){Object.defineProperty(hr(i),e,{get:function(){return n[e]},set:function(){}})};for(var a in n)r(a);return i}return pr(t,e),t}(Gn),la=function(i){var n=["protocol","hostname","port","pathname","search","hash","host"],r=t.createElement("a");r.href=i;var a,s=""===r.host&&"file:"!==r.protocol;s&&(a=t.createElement("div"),a.innerHTML='',r=a.firstChild,a.setAttribute("style","display:none; position:absolute;"),t.body.appendChild(a));for(var o={},u=0;ux',e=i.firstChild.href}return e},ca=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/,i=t.exec(e);if(i)return i.pop().toLowerCase()}return""},ha=function(t,i){void 0===i&&(i=e.location);var n=la(t),r=":"===n.protocol?i.protocol:n.protocol,a=r+n.host!==i.protocol+i.host;return a},pa=Object.freeze({__proto__:null,parseUrl:la,getAbsoluteURL:da,getFileExtension:ca,isCrossOrigin:ha}),fa=ht,ma=Object.prototype.toString,ga=function(e){var t={};return e?(e.trim().split("\n").forEach(function(e){var i=e.indexOf(":"),n=e.slice(0,i).trim().toLowerCase(),r=e.slice(i+1).trim();"undefined"==typeof t[n]?t[n]=r:Array.isArray(t[n])?t[n].push(r):t[n]=[t[n],r]}),t):t},va=gt,ya=gt;gt.XMLHttpRequest=e.XMLHttpRequest||_t,gt.XDomainRequest="withCredentials"in new gt.XMLHttpRequest?gt.XMLHttpRequest:e.XDomainRequest,pt(["get","put","post","patch","head","delete"],function(e){gt["delete"===e?"del":e]=function(t,i,n){return i=mt(t,i,n),i.method=e.toUpperCase(),vt(i)}}),va["default"]=ya;var _a=function(t,i){var n=new e.WebVTT.Parser(e,e.vttjs,e.WebVTT.StringDecoder()),r=[];n.oncue=function(e){i.addCue(e)},n.onparsingerror=function(e){r.push(e)},n.onflush=function(){i.trigger({type:"loadeddata",target:i})},n.parse(t),r.length>0&&(e.console&&e.console.groupCollapsed&&e.console.groupCollapsed("Text Track parsing errors for "+i.src),r.forEach(function(e){return Tn.error(e)}),e.console&&e.console.groupEnd&&e.console.groupEnd()),n.flush()},ba=function(t,i){var n={uri:t},r=ha(t);r&&(n.cors=r);var a="use-credentials"===i.tech_.crossOrigin();a&&(n.withCredentials=a),va(n,Vn(this,function(t,n,r){return t?Tn.error(t,n):(i.loaded_=!0,void("function"!=typeof e.WebVTT?i.tech_&&i.tech_.any(["vttjsloaded","vttjserror"],function(e){return"vttjserror"===e.type?void Tn.error("vttjs failed to load, stopping trying to process "+i.src):_a(r,i)}):_a(r,i)))}))},Ta=function(t){function i(e){var i;if(void 0===e&&(e={}),!e.tech)throw new Error("A tech was not provided.");var n=et(e,{kind:sa[e.kind]||"subtitles",language:e.language||e.srclang||""}),r=oa[n.mode]||"disabled",a=n["default"];("metadata"===n.kind||"chapters"===n.kind)&&(r="hidden"),i=t.call(this,n)||this,i.tech_=n.tech,i.cues_=[],i.activeCues_=[],i.preload_=i.tech_.preloadTextTracks!==!1;var s=new na(i.cues_),o=new na(i.activeCues_),u=!1,l=Vn(hr(i),function(){this.activeCues=this.activeCues,u&&(this.trigger("cuechange"),u=!1)});return"disabled"!==r&&i.tech_.ready(function(){i.tech_.on("timeupdate",l)},!0),Object.defineProperties(hr(i),{"default":{get:function(){return a},set:function(){}},mode:{get:function(){return r},set:function(e){var t=this;oa[e]&&(r=e,this.preload_||"disabled"===r||0!==this.cues.length||ba(this.src,this),"disabled"!==r?this.tech_.ready(function(){t.tech_.on("timeupdate",l)},!0):this.tech_.off("timeupdate",l),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?s:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return o;for(var e=this.tech_.currentTime(),t=[],i=0,n=this.cues.length;n>i;i++){var r=this.cues[i];r.startTime<=e&&r.endTime>=e?t.push(r):r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e&&t.push(r)}if(u=!1,t.length!==this.activeCues_.length)u=!0;else for(var a=0;a=0&&100>=t)?(this.set(e,t),!0):!1}};var Da=t.createElement("textarea"),Ua={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Ra={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},Ma={v:"title",lang:"lang"},Na={rt:"ruby"},Ba=[[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]];Lt.prototype.applyStyles=function(e,t){t=t||this.div;for(var i in e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},Lt.prototype.formatStyle=function(e,t){return 0===e?0:e+t},Pt.prototype=xa(Lt.prototype),Pt.prototype.constructor=Pt,Ot.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},Ot.prototype.overlaps=function(e){return this.lefte.left&&this.tope.top},Ot.prototype.overlapsAny=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Ot.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},Ot.prototype.intersectPercentage=function(e){var t=Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left)),i=Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top)),n=t*i;return n/(this.height*this.width)},Ot.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Ot.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e;var r={left:e.left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||i};return r},Dt.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},Dt.convertCueToDOMTree=function(e,t){return e&&t?Et(e,t):null};var Fa=.05,ja="sans-serif",qa="1.5%";Dt.processCues=function(e,t,i){function n(e){for(var t=0;t")){a.cue.id=s;continue}case"CUE":try{Ct(s,a.cue,a.regionList)}catch(l){a.reportOrThrowError(l),a.cue=null,a.state="BADCUE";continue}a.state="CUETEXT";continue;case"CUETEXT":var d=-1!==s.indexOf("-->");if(!s||d&&(u=!0)){a.oncue&&a.oncue(a.cue),a.cue=null,a.state="ID";continue}a.cue.text&&(a.cue.text+="\n"),a.cue.text+=s.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":s||(a.state="ID");continue}}}catch(l){a.reportOrThrowError(l),"CUETEXT"===a.state&&a.cue&&a.oncue&&a.oncue(a.cue),a.cue=null,a.state="INITIAL"===a.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new bt(bt.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var Va=Dt,Ha="auto",Wa={"":1,lr:1,rl:1},Ga={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};Mt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var za=Mt,Xa={"":!0,up:!0},Ka=Ft,Ya=r(function(t){var i=t.exports={WebVTT:Va,VTTCue:za,VTTRegion:Ka};e.vttjs=i,e.WebVTT=i.WebVTT;var n=i.VTTCue,r=i.VTTRegion,a=e.VTTCue,s=e.VTTRegion;i.shim=function(){e.VTTCue=n,e.VTTRegion=r},i.restore=function(){e.VTTCue=a,e.VTTRegion=s},e.VTTCue||i.shim()}),Qa=(Ya.WebVTT,Ya.VTTCue,Ya.VTTRegion,function(i){function n(e,t){var n;return void 0===e&&(e={}),void 0===t&&(t=function(){}),e.reportTouchActivity=!1,n=i.call(this,null,e,t)||this,n.hasStarted_=!1,n.on("playing",function(){this.hasStarted_=!0}),n.on("loadstart",function(){this.hasStarted_=!1}),Oa.names.forEach(function(t){var i=Oa[t];e&&e[i.getterName]&&(n[i.privateName]=e[i.getterName])}),n.featuresProgressEvents||n.manualProgressOn(),n.featuresTimeupdateEvents||n.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){e["native"+t+"Tracks"]===!1&&(n["featuresNative"+t+"Tracks"]=!1)}),e.nativeCaptions===!1||e.nativeTextTracks===!1?n.featuresNativeTextTracks=!1:(e.nativeCaptions===!0||e.nativeTextTracks===!0)&&(n.featuresNativeTextTracks=!0),n.featuresNativeTextTracks||n.emulateTextTracks(),n.preloadTextTracks=e.preloadTextTracks!==!1,n.autoRemoteTextTracks_=new Oa.text.ListClass,n.initTrackListeners(),e.nativeControlsForTouch||n.emitTapEvents(),n.constructor&&(n.name_=n.constructor.name||"Unknown Tech"),n}pr(n,i);var r=n.prototype;return r.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",function(){return t.setTimeout(function(){return t.triggerSourceset(e)},1)}),this.trigger({src:e,type:"sourceset"})},r.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},r.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},r.trackProgress=function(){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Vn(this,function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()}),500)},r.onDurationChange=function(){this.duration_=this.duration()},r.buffered=function(){return st(0,0)},r.bufferedPercent=function(){return ot(this.buffered(),this.duration_)},r.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},r.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},r.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},r.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},r.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},r.dispose=function(){this.clearTracks(La.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),i.prototype.dispose.call(this)},r.clearTracks=function(e){var t=this;e=[].concat(e),e.forEach(function(e){for(var i=t[e+"Tracks"]()||[],n=i.length;n--;){var r=i[n];"text"===e&&t.removeRemoteTextTrack(r),i.removeTrack(r)}})},r.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var i=e[t];this.removeRemoteTextTrack(i)}},r.reset=function(){},r.crossOrigin=function(){},r.setCrossOrigin=function(){},r.error=function(e){return void 0!==e&&(this.error_=new ut(e),this.trigger("error")),this.error_},r.played=function(){return this.hasStarted_?st(0,0):st()},r.setScrubbing=function(){},r.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},r.initTrackListeners=function(){var e=this;La.names.forEach(function(t){var i=La[t],n=function(){e.trigger(t+"trackchange")},r=e[i.getterName]();r.addEventListener("removetrack",n),r.addEventListener("addtrack",n),e.on("dispose",function(){r.removeEventListener("removetrack",n),r.removeEventListener("addtrack",n)})})},r.addWebVttScript_=function(){var i=this;if(!e.WebVTT)if(t.body.contains(this.el())){if(!this.options_["vtt.js"]&&l(Ya)&&Object.keys(Ya).length>0)return void this.trigger("vttjsloaded");var n=t.createElement("script");n.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",n.onload=function(){i.trigger("vttjsloaded")},n.onerror=function(){i.trigger("vttjserror")},this.on("dispose",function(){n.onload=null,n.onerror=null}),e.WebVTT=!0,this.el().parentNode.appendChild(n)}else this.ready(this.addWebVttScript_)},r.emulateTextTracks=function(){var e=this,t=this.textTracks(),i=this.remoteTextTracks(),n=function(e){return t.addTrack(e.track)},r=function(e){return t.removeTrack(e.track)};i.on("addtrack",n),i.on("removetrack",r),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},s=function(){a();for(var e=0;e