/** * @license * video.js 7.4.1 * copyright brightcove, inc. * available under apache license version 2.0 * * * includes vtt.js * available under apache license version 2.0 * */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("global/document"),require("global/window")):"function"==typeof define&&define.amd?define(["global/document","global/window"],t):e.videojs=t(e.document,e.window)}(this,function(d,v){d=d&&d.hasownproperty("default")?d.default:d,v=v&&v.hasownproperty("default")?v.default:v;var p="7.4.1";function f(e,t){e.prototype=object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function a(e,t){return(a=object.setprototypeof||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t,i){return(s=function(){if("undefined"==typeof reflect||!reflect.construct)return!1;if(reflect.construct.sham)return!1;if("function"==typeof proxy)return!0;try{return date.prototype.tostring.call(reflect.construct(date,[],function(){})),!0}catch(e){return!1}}()?reflect.construct:function(e,t,i){var n=[null];n.push.apply(n,t);var r=new(function.bind.apply(e,n));return i&&a(r,i.prototype),r}).apply(null,arguments)}function m(e){if(void 0===e)throw new referenceerror("this hasn't been initialised - super() hasn't been called");return e}function t(e,t){return t||(t=e.slice(0)),e.raw=t,e}var u=[],e=function(s,o){return function(e,t,i){var n=o.levels[t],r=new regexp("^("+n+")$");if("log"!==e&&i.unshift(e.touppercase()+":"),i.unshift(s+":"),u&&u.push([].concat(i)),v.console){var a=v.console[e];a||"debug"!==e||(a=v.console.info||v.console.log),a&&n&&r.test(e)&&a[array.isarray(i)?"apply":"call"](v.console,i)}}};var g=function t(i){var n,r="info",a=function(){for(var e=arguments.length,t=new array(e),i=0;i',i=n.firstchild,n.setattribute("style","display:none; position:absolute;"),d.body.appendchild(n));for(var a={},s=0;sx',e=t.firstchild.href}return e},gt=function(e){if("string"==typeof e){var t=/^(\/?)([\s\s]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)return t.pop().tolowercase()}return""},xt=function(e){var t=v.location,i=zt(e);return(":"===i.protocol?t.protocol:i.protocol)+i.host!==t.protocol+t.host},yt=object.freeze({parseurl:zt,getabsoluteurl:wt,getfileextension:gt,iscrossorigin:xt}),$t=function(e){var t=kt.call(e);return"[object function]"===t||"function"==typeof e&&"[object regexp]"!==t||"undefined"!=typeof window&&(e===window.settimeout||e===window.alert||e===window.confirm||e===window.prompt)},kt=object.prototype.tostring;"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function qt(e,t){return e(t={exports:{}},t.exports),t.exports}var jt=qt(function(e,t){(t=e.exports=function(e){return e.replace(/^\s*|\s*$/g,"")}).left=function(e){return e.replace(/^\s*/,"")},t.right=function(e){return e.replace(/\s*$/,"")}}),zt=(jt.left,jt.right,function.prototype.tostring),ei=/^\s*class\b/,ti=function(e){try{var t=zt.call(e);return ei.test(t)}catch(e){return!1}},ii=object.prototype.tostring,ni="function"==typeof symbol&&"symbol"==typeof symbol.tostringtag,ri=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(ni)return function(e){try{return!ti(e)&&(zt.call(e),!0)}catch(e){return!1}}(e);if(ti(e))return!1;var t=ii.call(e);return"[object function]"===t||"[object generatorfunction]"===t},ai=object.prototype.tostring,si=object.prototype.hasownproperty,oi=function(e,t,i){if(!ri(t))throw new typeerror("iterator must be a function");var n;3<=arguments.length&&(n=i),"[object array]"===ai.call(e)?function(e,t,i){for(var n=0,r=e.length;n=e?t.push(r):r.starttime===r.endtime&&r.starttime<=e&&r.starttime+.5>=e&&t.push(r)}if(o=!1,t.length!==this.activecues_.length)o=!0;else for(var a=0;a","‎":"‎","‏":"‏"," ":" "},pi={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},ui={v:"title",lang:"lang"},ii={rt:"ruby"};function xi(a,i){function e(){if(!i)return null;var e,t=i.match(/^([^<]*)(<[^>]*>?)?/);return e=t[1]?t[1]:t[2],i=i.substr(e.length),e}function t(e){return oi[e]}function n(e){for(;f=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(f[0],t);return e}function r(e,t){var i=pi[e];if(!i)return null;var n=a.document.createelement(i);n.localname=i;var r=ui[e];return r&&t&&(n[r]=t.trim()),n}for(var s,o,u,l=a.document.createelement("div"),c=l,h=[];null!==(s=e());)if("<"!==s[0])c.appendchild(a.document.createtextnode(n(s)));else{if("/"===s[1]){h.length&&h[h.length-1]===s.substr(2).replace(">","")&&(h.pop(),c=c.parentnode);continue}var d,p=ci(s.substr(1,s.length-2));if(p){d=a.document.createprocessinginstruction("timestamp",p),c.appendchild(d);continue}var f=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!f)continue;if(!(d=r(f[1],f[3])))continue;if(o=c,ii[(u=d).localname]&&ii[u.localname]!==o.localname)continue;f[2]&&(d.classname=f[2].substr(1).replace("."," ")),h.push(f[1]),c.appendchild(d),c=d}return l}var di=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function ri(e){for(var t=0;t=i[0]&&e<=i[1])return!0}return!1}function mi(){}function bi(e,t,i){mi.call(this),this.cue=t,this.cuediv=xi(e,t.text);var n={color:"rgba(255, 255, 255, 1)",backgroundcolor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingmode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodebidi:"plaintext"};this.applystyles(n,this.cuediv),this.div=e.document.createelement("div"),n={direction:function(e){var t=[],i="";if(!e||!e.childnodes)return"ltr";function r(e,t){for(var i=t.childnodes.length-1;0<=i;i--)e.push(t.childnodes[i])}function a(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textcontent||t.innertext;if(i){var n=i.match(/^.*(\n|\r)/);return n?n[e.length=0]:i}return"ruby"===t.tagname?a(e):t.childnodes?(r(e,t),a(e)):void 0}for(r(t,e);i=a(t);)for(var n=0;nh&&(c=c<0?-1:1,c*=math.ceil(h/l)*l),r<0&&(c+=""===n.vertical?o.height:o.width,a=a.reverse()),i.move(d,c)}else{var p=i.lineheight/o.height*100;switch(n.linealign){case"middle":r-=p/2;break;case"end":r-=p}switch(n.vertical){case"":t.applystyles({top:t.formatstyle(r,"%")});break;case"rl":t.applystyles({left:t.formatstyle(r,"%")});break;case"lr":t.applystyles({right:t.formatstyle(r,"%")})}a=["+y","-x","+x","-y"],i=new ni(t)}var f=function(e,t){for(var i,n=new ni(e),r=1,a=0;ae.left&&this.tope.top},ni.prototype.overlapsany=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},ni.prototype.overlapsoppositeaxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},ni.prototype.intersectpercentage=function(e){return math.max(0,math.min(this.right,e.right)-math.max(this.left,e.left))*math.max(0,math.min(this.bottom,e.bottom)-math.max(this.top,e.top))/(this.height*this.width)},ni.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}},ni.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;return{left:(e=e.div?e.div.getboundingclientrect():e.tagname?e.getboundingclientrect():e).left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||i}},fi.stringdecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new error("error - expected string data.");return decodeuricomponent(encodeuricomponent(e))}}},fi.convertcuetodomtree=function(e,t){return e&&t?xi(e,t):null};fi.processcues=function(n,r,e){if(!n||!r||!e)return null;for(;e.firstchild;)e.removechild(e.firstchild);var a=n.document.createelement("div");if(a.style.position="absolute",a.style.left="0",a.style.right="0",a.style.top="0",a.style.bottom="0",a.style.margin="1.5%",e.appendchild(a),function(e){for(var t=0;t