@theoplayer/extended 6.4.0 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/THEOplayer.esm.js CHANGED
@@ -34,7 +34,7 @@
34
34
  THEOplayer is based on patented technology developed by
35
35
  THEO Technologies (https://www.theoplayer.com).
36
36
 
37
- Version: 6.4.0
38
- Created: 2023-11-08T14:23:31.504Z
37
+ Version: 6.5.0
38
+ Created: 2023-11-27T14:22:19.055Z
39
39
  */
40
- var h,t,a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==s?s:"undefined"!=typeof global?global:this,s=a.window,u=a.document,c=(a.location,a.navigator,a.setTimeout),v=a.clearTimeout,m=(a.setInterval,a.clearInterval,a.Error),g=a.TypeError,b=a.SyntaxError,k=a.Object,w=a.Math,j=a.parseInt,S=a.parseFloat,_=a.isNaN,x=a.Uint8Array;a.Worker,a.WorkerGlobalScope,a.XMLHttpRequest;import{$ as T,A as C,Aa as P,B as A,Ba as M,C as I,Ca as E,D,Da as F,E as N,Ea as $,F as B,Fa as O,G as R,H as U,I as V,J as L,K as H,L as z,M as W,N as q,O as G,P as X,Q,R as J,S as Y,T as K,U as Z,V as tt,W as it,X as st,Y as et,Z as nt,_ as rt,a as ht,aa as ot,b as at,ba as ut,c as ct,ca as lt,d as ft,da as dt,e as vt,ea as pt,f as mt,fa as gt,g as yt,ga as bt,h as kt,ha as wt,i as jt,ia as St,j as _t,ja as xt,k as Tt,ka as Ct,l as Pt,la as At,m as Mt,ma as It,n as Et,na as Dt,o as Ft,oa as Nt,p as $t,pa as Bt,q as Ot,qa as Rt,r as Ut,ra as Vt,s as Lt,sa as Ht,t as zt,ta as Wt,u as qt,ua as Gt,v as Xt,va as Qt,w as Jt,wa as Yt,x as Kt,xa as Zt,y as ti,ya as ii,z as si,za as ei}from"./THEOplayer.common.esm.js";(t=h||(h={}))[t.t=0]="t";var ni={};function ri(t,i){(ni[i]||(ni[i]=[])).push(t)}var hi=[];var r=void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},l=void 0!==u?u:{createElement:function(){}};function oi(t,i){return i||(i=t.slice(0)),t.raw=i,t}var ai=1;function ui(){return ai++}var ci,li=k.prototype.toString,fi=function(t){return pi(t)?k.keys(t):[]};function di(t,i){fi(t).forEach((function(s){return i(t[s],s)}))}function vi(t){for(var i=arguments.length,s=new Array(i>1?i-1:0),e=1;e<i;e++)s[e-1]=arguments[e];return k.assign?k.assign.apply(k,[t].concat(s)):(s.forEach((function(i){i&&di(i,(function(i,s){t[s]=i}))})),t)}function pi(t){return!!t&&"object"==typeof t}function mi(t){return pi(t)&&"[object Object]"===li.call(t)&&t.constructor===k}var gi=function(t,i,s){void 0===s&&(s=!!ps&&ps<11),"log"!==t&&i.unshift(t.toUpperCase()+":"),ci.history.push(i),i.unshift("VIDEOJS:");var e=r.console&&r.console[t];e&&(s&&(i=i.map((function(t){if(pi(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(i){return String(t)}return String(t)})).join(" ")),e.apply?e[Array.isArray(i)?"apply":"call"](r.console,i):e(i))};(ci=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];gi("log",i)}).history=[],ci.error=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return gi("error",i)},ci.warn=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return gi("warn",i)};var yi=ci,bi="undefined"!=typeof globalThis?globalThis:void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ki(t){return t.replace(/\n\r?\s*/g,"")}var wi,ji=function(t){for(var i="",s=0;s<arguments.length;s++)i+=ki(t[s])+(arguments[s+1]||"");return i};function Si(t){return"string"==typeof t&&/\S/.test(t)}function _i(t){if(/\s/.test(t))throw new m("class has illegal whitespace characters")}function xi(){return l===r.document&&void 0!==l.createElement}function Ti(t){return pi(t)&&1===t.nodeType}function Ci(t){return function(i,s){if(!Si(i))return l[t](null);Si(s)&&(s=l.querySelector(s));var e=Ti(s)?s:l;return e[t]&&e[t](i)}}function Pi(t,i,s,e){void 0===t&&(t="div"),void 0===i&&(i={}),void 0===s&&(s={});var n=l.createElement(t);return k.getOwnPropertyNames(i).forEach((function(t){var s=i[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(yi.warn(ji(wi||(wi=oi(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."])),t,s)),n.setAttribute(t,s)):"textContent"===t?Ai(n,s):n[t]=s})),k.getOwnPropertyNames(s).forEach((function(t){n.setAttribute(t,s[t])})),e&&Xi(n,e),n}function Ai(t,i){return void 0===t.textContent?t.innerText=i:t.textContent=i,t}function Mi(t,i){i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t)}var Ii={},Ei="vdata"+(new Date).getTime();function Di(t){var i=t[Ei];return i||(i=t[Ei]=ui()),Ii[i]||(Ii[i]={}),Ii[i]}function Fi(t){var i=t[Ei];return!!i&&!!k.getOwnPropertyNames(Ii[i]).length}function Ni(t){var i=t[Ei];if(i){delete Ii[i];try{delete t[Ei]}catch(i){t.removeAttribute?t.removeAttribute(Ei):t[Ei]=null}}}function $i(t,i){return _i(i),t.classList?t.classList.contains(i):function(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}(i).test(t.className)}function Bi(t,i){return t.classList?t.classList.add(i):$i(t,i)||(t.className=(t.className+" "+i).trim()),t}function Oi(t,i){return t.classList?t.classList.remove(i):(_i(i),t.className=t.className.split(/\s+/).filter((function(t){return t!==i})).join(" ")),t}function Ri(t,i,s){var e=$i(t,i);if("function"==typeof s&&(s=s(t,i)),"boolean"!=typeof s&&(s=!e),s!==e)return s?Bi(t,i):Oi(t,i),t}function Ui(t,i){k.getOwnPropertyNames(i).forEach((function(s){var e=i[s];null==e||!1===e?t.removeAttribute(s):t.setAttribute(s,!0===e?"":e)}))}function Vi(t){var i={};if(t&&t.attributes&&t.attributes.length>0)for(var s=t.attributes,e=s.length-1;e>=0;e--){var n=s[e].name,r=s[e].value;"boolean"!=typeof t[n]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+n+",")||(r=null!==r),i[n]=r}return i}function Li(t,i,s){t.setAttribute(i,s)}function Hi(t,i){t.removeAttribute(i)}function zi(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var s=l.documentElement,e=l.body,n=s.clientLeft||e.clientLeft||0,h=r.pageXOffset||e.scrollLeft,o=i.left+h-n,a=s.clientTop||e.clientTop||0,u=r.pageYOffset||e.scrollTop,c=i.top+u-a;return{left:w.round(o),top:w.round(c)}}function Wi(t,i){var s={},e=zi(t),n=t.offsetWidth,r=t.offsetHeight,h=e.top,o=e.left,a=i.pageY,u=i.pageX;return i.changedTouches&&(u=i.changedTouches[0].pageX,a=i.changedTouches[0].pageY),s.y=w.max(0,w.min(1,(h-a+r)/r)),s.x=w.max(0,w.min(1,(u-o)/n)),s}function qi(t){return pi(t)&&3===t.nodeType}function Gi(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function Xi(t,i){return function(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map((function(t){return"function"==typeof t&&(t=t()),Ti(t)||qi(t)?t:"string"==typeof t&&/\S/.test(t)?l.createTextNode(t):void 0})).filter((function(t){return t}))}(i).forEach((function(i){return t.appendChild(i)})),t}function Qi(t,i){return Xi(Gi(t),i)}var Ji=Ci("querySelector"),Yi=Ci("querySelectorAll"),Ki=r.navigator&&r.navigator.userAgent||"",Zi=/AppleWebKit\/([\d.]+)/i.exec(Ki),ts=Zi?S(Zi.pop()):null,is=/iPad/i.test(Ki),ss=/iPhone/i.test(Ki)&&!is,es=/iPod/i.test(Ki),ns=ss||is||es,rs=function(){var t=Ki.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),hs=/Android/i.test(Ki),os=function(){var t=Ki.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&S(t[1]),s=t[2]&&S(t[2]);return i&&s?S(t[1]+"."+t[2]):i||null}(),as=hs&&/webkit/i.test(Ki)&&os<2.3,us=hs&&os<5&&ts<537,cs=/Firefox/i.test(Ki),ls=/Edge/i.test(Ki),fs=!ls&&/Chrome/i.test(Ki),ds=function(){var t=Ki.match(/Chrome\/(\d+)/);return t&&t[1]?S(t[1]):null}(),vs=/MSIE\s8\.0/.test(Ki),ps=function(){var t=/MSIE\s(\d+)\.\d/.exec(Ki),i=t&&S(t[1]);return!i&&/Trident\/7.0/i.test(Ki)&&/rv:11.0/.test(Ki)&&(i=11),i}(),ms=/Safari/i.test(Ki)&&!fs&&!hs&&!ls,gs=ms||ns,ys=xi()&&("ontouchstart"in r||r.DocumentTouch&&r.document instanceof r.DocumentTouch),bs=xi()&&"backgroundSize"in r.document.createElement("video").style,ks=k.freeze({__proto__:null,IS_IPAD:is,IS_IPHONE:ss,IS_IPOD:es,IS_IOS:ns,IOS_VERSION:rs,IS_ANDROID:hs,ANDROID_VERSION:os,IS_OLD_ANDROID:as,IS_NATIVE_ANDROID:us,IS_FIREFOX:cs,IS_EDGE:ls,IS_CHROME:fs,CHROME_VERSION:ds,IS_IE8:vs,IE_VERSION:ps,IS_SAFARI:ms,IS_ANY_SAFARI:gs,TOUCH_ENABLED:ys,BACKGROUND_SIZE_SUPPORTED:bs});function ws(t,i){var s=Di(t);0===s.handlers[i].length&&(delete s.handlers[i],t.removeEventListener?t.removeEventListener(i,s.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+i,s.dispatcher)),k.getOwnPropertyNames(s.handlers).length<=0&&(delete s.handlers,delete s.dispatcher,delete s.disabled),0===k.getOwnPropertyNames(s).length&&Ni(t)}function js(t,i,s,e){s.forEach((function(s){t(i,s,e)}))}function Ss(t){function i(){return!0}function s(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){var e=t||r.event;for(var n in t={},e)"layerX"!==n&&"layerY"!==n&&"keyLocation"!==n&&"webkitMovementX"!==n&&"webkitMovementY"!==n&&"path"!==n&&("returnValue"===n&&e.preventDefault||(t[n]=e[n]));if(t.target||(t.target=t.srcElement||l),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){e.preventDefault&&e.preventDefault(),t.returnValue=!1,e.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){e.stopPropagation&&e.stopPropagation(),t.cancelBubble=!0,e.cancelBubble=!0,t.isPropagationStopped=i},t.isPropagationStopped=s,t.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation(),t.isImmediatePropagationStopped=i,t.stopPropagation()},t.isImmediatePropagationStopped=s,null!==t.clientX&&void 0!==t.clientX){var h=l.documentElement,o=l.body;t.pageX=t.clientX+(h&&h.scrollLeft||o&&o.scrollLeft||0)-(h&&h.clientLeft||o&&o.clientLeft||0),t.pageY=t.clientY+(h&&h.scrollTop||o&&o.scrollTop||0)-(h&&h.clientTop||o&&o.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var _s=!1;!function(){try{var t=k.defineProperty({},"passive",{get:function(){_s=!0}});r.addEventListener("test",null,t)}catch(t){}}();var xs=["touchstart","touchmove"];function Ts(t,i,s){if(Array.isArray(i))return js(Ts,t,i,s);var e=Di(t);if(e.handlers||(e.handlers={}),e.handlers[i]||(e.handlers[i]=[]),s.guid||(s.guid=ui()),e.handlers[i].push(s),e.dispatcher||(e.disabled=!1,e.dispatcher=function(i,s){if(!e.disabled){i=Ss(i);var n=e.handlers[i.type];if(n)for(var r=n.slice(0),h=0,o=r.length;h<o&&!i.isImmediatePropagationStopped();h++)try{r[h].call(t,i,s)}catch(t){yi.error(t)}}}),1===e.handlers[i].length)if(t.addEventListener){var n=!1;_s&&xs.indexOf(i)>-1&&(n={passive:!0}),t.addEventListener(i,e.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+i,e.dispatcher)}function Cs(t,i,s){if(Fi(t)){var e=Di(t);if(e.handlers){if(Array.isArray(i))return js(Cs,t,i,s);var n=function(i){e.handlers[i]=[],ws(t,i)};if(i){var r=e.handlers[i];if(r)if(s){if(s.guid)for(var h=0;h<r.length;h++)r[h].guid===s.guid&&r.splice(h--,1);ws(t,i)}else n(i)}else for(var o in e.handlers)n(o)}}}function Ps(t,i,s){var e=Fi(t)?Di(t):{},n=t.parentNode||t.ownerDocument;if("string"==typeof i&&(i={type:i,target:t}),i=Ss(i),e.dispatcher&&e.dispatcher.call(t,i,s),n&&!i.isPropagationStopped()&&!0===i.bubbles)Ps.call(null,n,i,s);else if(!n&&!i.defaultPrevented){var r=Di(i.target);i.target[i.type]&&(r.disabled=!0,"function"==typeof i.target[i.type]&&i.target[i.type](),r.disabled=!1)}return!i.defaultPrevented}function As(t,i,s){if(Array.isArray(i))return js(As,t,i,s);var e=function e(){Cs(t,i,e),s.apply(this,arguments)};e.guid=s.guid=s.guid||ui(),Ts(t,i,e)}var Ms,Is=!1,Es=function(){if(xi()){var t=l.getElementsByTagName("video"),i=l.getElementsByTagName("audio"),s=[];if(t&&t.length>0)for(var e=0,n=t.length;e<n;e++)s.push(t[e]);if(i&&i.length>0)for(var r=0,h=i.length;r<h;r++)s.push(i[r]);if(s&&s.length>0)for(var o=0,a=s.length;o<a;o++){var u=s[o];if(!u||!u.getAttribute){Ds(1);break}void 0===u.player&&null!==u.getAttribute("data-setup")&&Ms(u)}else Is||Ds(1)}};function Ds(t,i){i&&(Ms=i),r.setTimeout(Es,t)}xi()&&"complete"===l.readyState?Is=!0:As(r,"load",(function(){Is=!0}));var Fs=function(t){var i=l.createElement("style");return i.className=t,i},Ns=function(t,i){t.styleSheet?t.styleSheet.cssText=i:t.textContent=i},$s=function(t,i,s){i.guid||(i.guid=ui());var e=function(){return i.apply(t,arguments)};return e.guid=s?s+"_"+i.guid:i.guid,e};function Bs(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function Os(){for(var t={},i=arguments.length,s=new Array(i),e=0;e<i;e++)s[e]=arguments[e];return s.forEach((function(i){i&&di(i,(function(i,s){mi(i)?(mi(t[s])||(t[s]={}),t[s]=Os(t[s],i)):t[s]=i}))})),t}var n=function(){function t(t,i,s){if(!t&&this.play?this.h=t=this:this.h=t,this.o=Os({},this.o),i=this.o=Os(this.o,i),this.u=i.id||i.el&&i.el.id,!this.u){var e=t&&t.id&&t.id()||"no_player";this.u=e+"l"+ui()}this.v=i.name||null,i.el?this.m=i.el:!1!==i.createEl&&(this.m=this.createEl()),this.k=[],this.j={},this.S={},!1!==i.initChildren&&this.initChildren(),this.ready(s),!1!==i.reportTouchActivity&&this.enableTouchActivity()}var i=t.prototype;return i.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.k)for(var t=this.k.length-1;t>=0;t--)this.k[t].dispose&&this.k[t].dispose();this.k=null,this.j=null,this.S=null,this.off(),this.m.parentNode&&this.m.parentNode.removeChild(this.m),Ni(this.m),this.m=null},i.player=function(){return this.h},i.options=function(t){return yi.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.o=Os(this.o,t),this.o):this.o},i.el=function(){return this.m},i.createEl=function(t,i,s){return Pi(t,i,s)},i.localize=function(t){var i=this.h.language&&this.h.language(),s=this.h.languages&&this.h.languages();if(!i||!s)return t;var e=s[i];if(e&&e[t])return e[t];var n=s[i.split("-")[0]];return n&&n[t]?n[t]:t},i.contentEl=function(){return this.T||this.m},i.id=function(){return this.u},i.name=function(){return this.v},i.children=function(){return this.k},i.getChildById=function(t){return this.j[t]},i.getChild=function(t){if(t)return t=Bs(t),this.S[t]},i.addChild=function(i,s,e){var n,r;if(void 0===s&&(s={}),void 0===e&&(e=this.k.length),"string"==typeof i){r=Bs(i),s||(s={}),!0===s&&(yi.warn("Initializing a child component with `true` is deprecated.Children should be defined in an array when possible, but if necessary use an object instead of `true`."),s={});var h=s.componentClass||r;s.name=r;var o=t.getComponent(h);if(!o)throw new m("Component "+h+" does not exist");if("function"!=typeof o)return null;n=new o(this.h||this,s)}else n=i;if(this.k.splice(e,0,n),"function"==typeof n.id&&(this.j[n.id()]=n),(r=r||n.name&&Bs(n.name()))&&(this.S[r]=n),"function"==typeof n.el&&n.el()){var a=this.contentEl().children[e]||null;this.contentEl().insertBefore(n.el(),a)}return n},i.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.k){for(var i=!1,s=this.k.length-1;s>=0;s--)if(this.k[s]===t){i=!0,this.k.splice(s,1);break}if(i){this.j[t.id()]=null,this.S[t.name()]=null;var e=t.el();e&&e.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},i.initChildren=function(){var i=this,s=this.o.children;if(s){var e,n=this.o,r=t.getComponent("Tech");(e=Array.isArray(s)?s:k.keys(s)).concat(k.keys(this.o).filter((function(t){return!e.some((function(i){return"string"==typeof i?t===i:t===i.name}))}))).map((function(t){var e,n;return"string"==typeof t?n=s[e=t]||i.o[e]||{}:(e=t.name,n=t),{name:e,opts:n}})).filter((function(i){var s=t.getComponent(i.opts.componentClass||Bs(i.name));return s&&!r.isTech(s)})).forEach((function(t){var s=t.name,e=t.opts;if(void 0!==n[s]&&(e=n[s]),!1!==e){!0===e&&(e={}),e.playerOptions=i.o.playerOptions;var r=i.addChild(s,e);r&&(i[s]=r)}}))}},i.buildCSSClass=function(){return""},i.on=function(t,i,s){var e=this;if("string"==typeof t||Array.isArray(t))Ts(this.m,t,$s(this,i));else{var n=t,r=i,h=$s(this,s),o=function(){return e.off(n,r,h)};o.guid=h.guid,this.on("dispose",o);var a=function(){return e.off("dispose",o)};a.guid=h.guid,t.nodeName?(Ts(n,r,h),Ts(n,"dispose",a)):"function"==typeof t.on&&(n.on(r,h),n.on("dispose",a))}return this},i.off=function(t,i,s){if(!t||"string"==typeof t||Array.isArray(t))Cs(this.m,t,i);else{var e=t,n=i,r=$s(this,s);this.off("dispose",r),t.nodeName?(Cs(e,n,r),Cs(e,"dispose",r)):(e.off(n,r),e.off("dispose",r))}return this},i.one=function(t,i,s){var e=arguments,n=this;if("string"==typeof t||Array.isArray(t))As(this.m,t,$s(this,i));else{var r=t,h=i,o=$s(this,s),a=function t(){n.off(r,h,t),o.apply(null,e)};a.guid=o.guid,this.on(r,h,a)}return this},i.trigger=function(t,i){return Ps(this.m,t,i),this},i.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.C?i?t.call(this):this.setTimeout(t,1):(this.P=this.P||[],this.P.push(t))),this},i.triggerReady=function(){this.C=!0,this.setTimeout((function(){var t=this.P;this.P=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},i.$=function(t,i){return Ji(t,i||this.contentEl())},i.$$=function(t,i){return Yi(t,i||this.contentEl())},i.hasClass=function(t){return $i(this.m,t)},i.addClass=function(t){return Bi(this.m,t),this},i.removeClass=function(t){return Oi(this.m,t),this},i.toggleClass=function(t,i){return Ri(this.m,t,i),this},i.show=function(){return this.removeClass("vjs-hidden"),this},i.hide=function(){return this.addClass("vjs-hidden"),this},i.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},i.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},i.getAttribute=function(t){return function(t,i){return t.getAttribute(i)}(this.m,t)},i.setAttribute=function(t,i){return Li(this.m,t,i),this},i.removeAttribute=function(t){return Hi(this.m,t),this},i.width=function(t,i){return this.dimension("width",t,i)},i.height=function(t,i){return this.dimension("height",t,i)},i.dimensions=function(t,i){return this.width(t,!0).height(i)},i.dimension=function(t,i,s){if(void 0!==i)return null!==i&&i==i||(i=0),-1!==(""+i).indexOf("%")||-1!==(""+i).indexOf("px")?this.m.style[t]=i:this.m.style[t]="auto"===i?"":i+"px",s||this.trigger("resize"),this;if(!this.m)return 0;var e=this.m.style[t],n=e.indexOf("px");return j(-1!==n?e.slice(0,n):this.m["offset"+Bs(t)],10)},i.currentDimension=function(t){var i=0;if("width"!==t&&"height"!==t)throw new m("currentDimension only accepts width or height value");if("function"==typeof r.getComputedStyle){var s=r.getComputedStyle(this.m);i=s.getPropertyValue(t)||s[t]}if(0===(i=S(i))){var e="offset"+Bs(t);i=this.m[e]}return i},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.m.focus()},i.blur=function(){this.m.blur()},i.emitTapEvents=function(){var t,i=0,s=null;this.on("touchstart",(function(e){1===e.touches.length&&(s={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},i=(new Date).getTime(),t=!0)})),this.on("touchmove",(function(i){if(i.touches.length>1)t=!1;else if(s){var e=i.touches[0].pageX-s.pageX,n=i.touches[0].pageY-s.pageY;w.sqrt(e*e+n*n)>10&&(t=!1)}}));var e=function(){t=!1};this.on("touchleave",e),this.on("touchcancel",e),this.on("touchend",(function(e){(s=null,!0===t)&&((new Date).getTime()-i<200&&(e.preventDefault(),this.trigger("tap")))}))},i.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,i=$s(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){i(),this.clearInterval(t),t=this.setInterval(i,250)}));var s=function(s){i(),this.clearInterval(t)};this.on("touchmove",i),this.on("touchend",s),this.on("touchcancel",s)}},i.setTimeout=function(t,i){t=$s(this,t);var s=r.setTimeout(t,i),e=function(){this.clearTimeout(s)};return e.guid="vjs-timeout-"+s,this.on("dispose",e),s},i.clearTimeout=function(t){r.clearTimeout(t);var i=function(){};return i.guid="vjs-timeout-"+t,this.off("dispose",i),t},i.setInterval=function(t,i){t=$s(this,t);var s=r.setInterval(t,i),e=function(){this.clearInterval(s)};return e.guid="vjs-interval-"+s,this.on("dispose",e),s},i.clearInterval=function(t){r.clearInterval(t);var i=function(){};return i.guid="vjs-interval-"+t,this.off("dispose",i),t},t.registerComponent=function(i,s){if(i){if(i=Bs(i),t.A||(t.A={}),"Player"===i&&t.A[i]){var e=t.A[i];if(e.players&&k.keys(e.players).length>0&&k.keys(e.players).map((function(t){return e.players[t]})).every(Boolean))throw new m("Can not register Player component after player has been created")}return t.A[i]=s,s}},t.getComponent=function(i){if(i)return i=Bs(i),t.A&&t.A[i]?t.A[i]:r&&r.videojs&&r.videojs[i]?(yi.warn("The "+i+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),r.videojs[i]):void 0},t.extend=function(i){i=i||{},yi.warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var s=i.init||i.init||this.prototype.init||this.prototype.init||function(){},e=function(){s.apply(this,arguments)};for(var n in(e.prototype=k.create(this.prototype)).constructor=e,e.extend=t.extend,i)i.hasOwnProperty(n)&&(e.prototype[n]=i[n]);return e},t}();n.registerComponent("Component",n);var Rs=function(){};function Us(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Vs(t,i){return(Vs=k.setPrototypeOf?k.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function Ls(t,i){t.prototype=k.create(i.prototype),t.prototype.constructor=t,Vs(t,i)}function Hs(t,i,s,e){return void 0===e&&(yi.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),e=0),function(t,i,s){if(i<0||i>s)throw new m("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+i+") is greater than or equal to the maximum bound ("+s+").")}(t,e,s.length-1),s[e][i]}function zs(t){return void 0===t||0===t.length?{length:0,start:function(){throw new m("This TimeRanges object is empty")},end:function(){throw new m("This TimeRanges object is empty")}}:{length:t.length,start:Hs.bind(null,"start",0,t),end:Hs.bind(null,"end",1,t)}}function Ws(t,i){return Array.isArray(t)?zs(t):void 0===t||void 0===i?zs():zs([[t,i]])}function qs(t,i){var s,e,n=0;if(!i)return 0;t&&t.length||(t=Ws(0,0));for(var r=0;r<t.length;r++)s=t.start(r),(e=t.end(r))>i&&(e=i),n+=e-s;return n/i}Rs.prototype.M={},Rs.prototype.on=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},Ts(this,t,i),this.addEventListener=s},Rs.prototype.addEventListener=Rs.prototype.on,Rs.prototype.off=function(t,i){Cs(this,t,i)},Rs.prototype.removeEventListener=Rs.prototype.off,Rs.prototype.one=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},As(this,t,i),this.addEventListener=s},Rs.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=Ss(t),this.M[i]&&this["on"+i]&&this["on"+i](t),Ps(this,t)},Rs.prototype.dispatchEvent=Rs.prototype.trigger;var Gs,Xs,Qs,Js,Ys={prefixed:!0},Ks=[["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"]],Zs=Ks[0];for(Xs=0;Xs<Ks.length;Xs++)if(Ks[Xs][1]in l){Gs=Ks[Xs];break}if(Gs){for(Qs=0;Qs<Gs.length;Qs++)Ys[Zs[Qs]]=Gs[Qs];Ys.prefixed=Gs[0]!==Zs[0]}function te(t){if(t instanceof te)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:pi(t)&&("number"==typeof t.code&&(this.code=t.code),vi(this,t)),this.message||(this.message=te.defaultMessages[this.code]||"")}for(te.prototype.code=0,te.prototype.message="",te.prototype.status=null,te.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],te.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."},Js=0;Js<te.errorTypes.length;Js++)te[te.errorTypes[Js]]=Js,te.prototype[te.errorTypes[Js]]=Js;var ie=function(t,i){var s,e=null;try{s=JSON.parse(t,i)}catch(t){e=t}return[e,s]};var se=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(i,s,e){return t[s]&&(i[s]=t[s]),i}),{cues:t.cues&&Array.prototype.map.call(t.cues,(function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}}))})},ee=function(t){var i=t.$$("track"),s=Array.prototype.map.call(i,(function(t){return t.track}));return Array.prototype.map.call(i,(function(t){var i=se(t.track);return t.src&&(i.src=t.src),i})).concat(Array.prototype.filter.call(t.textTracks(),(function(t){return-1===s.indexOf(t)})).map(se))},ne=function(t,i){return t.forEach((function(t){var s=i.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach((function(t){return s.addCue(t)}))})),i.textTracks()},re="vjs-modal-dialog",he=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).I=e.D=e.F=!1,e.closeable(!e.o.uncloseable),e.content(e.o.content),e.T=Pi("div",{className:re+"-content"},{role:"document"}),e.N=Pi("p",{className:re+"-description vjs-offscreen",id:e.el().getAttribute("aria-describedby")}),Ai(e.N,e.description()),e.m.appendChild(e.N),e.m.appendChild(e.T),e.on(i,"languagechange",e.handleLanguagechange),e}Ls(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"B","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},s.buildCSSClass=function(){return re+" vjs-hidden "+t.prototype.buildCSSClass.call(this)},s.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},s.label=function(){return this.o.label||this.localize("Modal Window")},s.description=function(){var t=this.o.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},s.open=function(){if(!this.I){var t=this.player();this.trigger("beforemodalopen"),this.I=!0,(this.o.fillAlways||!this.D&&!this.F)&&this.fill(),this.O=!t.paused(),this.o.pauseOnOpen&&this.O&&t.pause(),this.closeable()&&this.on(this.m.ownerDocument,"keydown",$s(this,this.handleKeyPress)),t.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.D=!0}return this},s.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.I},s.close=function(){if(this.I){var t=this.player();this.trigger("beforemodalclose"),this.I=!1,this.O&&this.o.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.m.ownerDocument,"keydown",$s(this,this.handleKeyPress)),t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.o.temporary&&this.dispose()}return this},s.closeable=function(t){if("boolean"==typeof t){var i=this.R=!!t,s=this.getChild("closeButton");if(i&&!s){var e=this.T;this.T=this.m,s=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.T=e,this.on(s,"close",this.close)}!i&&s&&(this.off(s,"close",this.close),this.removeChild(s),s.dispose())}return this.R},s.fill=function(){return this.fillWith(this.content())},s.fillWith=function(t){var i=this.contentEl(),s=i.parentNode,e=i.nextSibling;return this.trigger("beforemodalfill"),this.F=!0,s.removeChild(i),this.empty(),Qi(i,t),this.trigger("modalfill"),e?s.insertBefore(i,e):s.appendChild(i),this},s.empty=function(){return this.trigger("beforemodalempty"),Gi(this.contentEl()),this.trigger("modalempty"),this},s.content=function(t){return void 0!==t&&(this.U=t),this.U},s.handleLanguagechange=function(){this.m.setAttribute("aria-label",this.label()),Ai(this.N,this.description()),this.opened()?this.fill():(this.D||this.F)&&(this.D=!1,this.F=!1,this.empty())},i}(n);he.prototype.o={pauseOnOpen:!0,temporary:!0},n.registerComponent("ModalDialog",he);var oe=function(){function t(i){var s=this;if(vs)for(var e in s=l.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);if(t.prototype.V.call(s,i),k.defineProperty(s,"length",{get:function(){return this.L}}),vs)return s}var i=t.prototype;return i.V=function(t){var i=this.length||0,s=0,e=t.length;this.H=t,this.L=t.length;var n=function(t){""+t in this||k.defineProperty(this,""+t,{get:function(){return this.H[t]}})};if(i<e)for(s=i;s<e;s++)n.call(this,s)},i.getCueById=function(t){for(var i=null,s=0,e=this.length;s<e;s++){var n=this[s];if(n.id===t){i=n;break}}return i},t}(),ae={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},ue={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},ce={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},le={disabled:"disabled",hidden:"hidden",showing:"showing"},fe=function(t){function i(s){var e;void 0===s&&(s={});var n=Us(e=t.call(this)||this);if(vs)for(var r in n=l.createElement("custom"),i.prototype)"constructor"!==r&&(n[r]=i.prototype[r]);var h={id:s.id||["vjs_track",ui()].join("_"),kind:s.kind||"",label:s.label||"",language:s.language||""},o=function(t){k.defineProperty(n,t,{get:function(){return h[t]},set:function(){}})};for(var a in h)o(a);return n||Us(e)}return Ls(i,t),i}(Rs),de=function(t){var i=["protocol","hostname","port","pathname","search","hash","host"],s=l.createElement("a");s.href=t;var e,n=""===s.host&&"file:"!==s.protocol;n&&((e=l.createElement("div")).innerHTML='<a href="'+t+'"></a>',s=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),l.body.appendChild(e));for(var r={},h=0;h<i.length;h++)r[i[h]]=s[i[h]];return"http:"===r.protocol&&(r.host=r.host.replace(/:80$/,"")),"https:"===r.protocol&&(r.host=r.host.replace(/:443$/,"")),n&&l.body.removeChild(e),r},ve=function(t){var i=r.location,s=de(t);return(":"===s.protocol?i.protocol:s.protocol)+s.host!==i.protocol+i.host},pe={exports:{}};void 0!==s?pe.exports=s:void 0!==bi?pe.exports=bi:"undefined"!=typeof self?pe.exports=self:pe.exports={};var me=function(t){var i=ge.call(t);return"[object Function]"===i||"function"==typeof t&&"[object RegExp]"!==i||void 0!==s&&(t===s.setTimeout||t===s.alert||t===s.confirm||t===s.prompt)},ge=k.prototype.toString;var ye,be,ke,we,je,Se,_e,xe,Te,Ce,Pe,Ae,Me=Array.prototype.slice,Ie=k.prototype.toString,Ee=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==Ie.call(i))throw new g("Function.prototype.bind called on incompatible "+i);for(var s,e=Me.call(arguments,1),n=w.max(0,i.length-e.length),r=[],h=0;h<n;h++)r.push("$"+h);if(s=Function("binder","return function ("+r.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof s){var n=i.apply(this,e.concat(Me.call(arguments)));return k(n)===n?n:this}return i.apply(t,e.concat(Me.call(arguments)))})),i.prototype){var o=function(){};o.prototype=i.prototype,s.prototype=new o,o.prototype=null}return s},De=Function.prototype.bind||Ee,Fe=k.prototype.toString,Ne=function(t){var i=Fe.call(t),s="[object Arguments]"===i;return s||(s="[object Array]"!==i&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===Fe.call(t.callee)),s};k.keys||(be=k.prototype.hasOwnProperty,ke=k.prototype.toString,we=Ne,je=k.prototype.propertyIsEnumerable,Se=!je.call({toString:null},"toString"),_e=je.call((function(){}),"prototype"),xe=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Te=function(t){var i=t.constructor;return i&&i.prototype===t},Ce={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Pe=function(){if(void 0===s)return!1;for(var t in s)try{if(!Ce["$"+t]&&be.call(s,t)&&null!==s[t]&&"object"==typeof s[t])try{Te(s[t])}catch(t){return!0}}catch(t){return!0}return!1}(),Ae=function(t){if(void 0===s||!Pe)return Te(t);try{return Te(t)}catch(t){return!1}},ye=function(t){var i=null!==t&&"object"==typeof t,s="[object Function]"===ke.call(t),e=we(t),n=i&&"[object String]"===ke.call(t),r=[];if(!i&&!s&&!e)throw new g("Object.keys called on a non-object");var h=_e&&s;if(n&&t.length>0&&!be.call(t,0))for(var o=0;o<t.length;++o)r.push(String(o));if(e&&t.length>0)for(var a=0;a<t.length;++a)r.push(String(a));else for(var u in t)h&&"prototype"===u||!be.call(t,u)||r.push(String(u));if(Se)for(var c=Ae(t),l=0;l<xe.length;++l)c&&"constructor"===xe[l]||!be.call(t,xe[l])||r.push(xe[l]);return r});var $e=ye,Be=Array.prototype.slice,Oe=Ne,Re=k.keys,Ue=Re?function(t){return Re(t)}:$e,Ve=k.keys;Ue.shim=function(){if(k.keys){var t=function(){var t=k.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(k.keys=function(t){return Oe(t)?Ve(Be.call(t)):Ve(t)})}else k.keys=Ue;return k.keys||Ue};var Le=Ue,He="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),ze=k.prototype.toString,We=Array.prototype.concat,qe=k.defineProperty,Ge=qe&&function(){var t={};try{for(var i in qe(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),Xe=function(t,i,s,e){(!(i in t)||function(t){return"function"==typeof t&&"[object Function]"===ze.call(t)}(e)&&e())&&(Ge?qe(t,i,{configurable:!0,enumerable:!1,value:s,writable:!0}):t[i]=s)},Qe=function(t,i){var s=arguments.length>2?arguments[2]:{},e=Le(i);He&&(e=We.call(e,k.getOwnPropertySymbols(i)));for(var n=0;n<e.length;n+=1)Xe(t,e[n],i[e[n]],s[e[n]])};Qe.supportsDescriptors=!!Ge;var Je,Ye=Qe,Ke=k.getOwnPropertyDescriptor?function(){return k.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new g},Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,tn=k.getPrototypeOf||function(t){return t.__proto__},sn=void 0===x?Je:tn(x),en={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?Je:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?Je:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":Ze?tn([][Symbol.iterator]()):Je,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":Je,"$ %AsyncFunction%":undefined,"$ %AsyncFunctionPrototype%":Je,"$ %AsyncGenerator%":Je,"$ %AsyncGeneratorFunction%":undefined,"$ %AsyncGeneratorPrototype%":Je,"$ %AsyncIteratorPrototype%":Je,"$ %Atomics%":"undefined"==typeof Atomics?Je:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?Je:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?Je:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":m,"$ %ErrorPrototype%":m.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?Je:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?Je:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?Je:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?Je:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":Je,"$ %GeneratorFunction%":undefined,"$ %GeneratorPrototype%":Je,"$ %Int8Array%":"undefined"==typeof Int8Array?Je:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?Je:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?Je:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?Je:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?Je:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?Je:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":_,"$ %IteratorPrototype%":Ze?tn(tn([][Symbol.iterator]())):Je,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?Je:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&Ze?tn((new Map)[Symbol.iterator]()):Je,"$ %MapPrototype%":"undefined"==typeof Map?Je:Map.prototype,"$ %Math%":w,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":k,"$ %ObjectPrototype%":k.prototype,"$ %ObjProto_toString%":k.prototype.toString,"$ %ObjProto_valueOf%":k.prototype.valueOf,"$ %parseFloat%":S,"$ %parseInt%":j,"$ %Promise%":"undefined"==typeof Promise?Je:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?Je:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?Je:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?Je:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?Je:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?Je:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?Je:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?Je:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?Je:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&Ze?tn((new Set)[Symbol.iterator]()):Je,"$ %SetPrototype%":"undefined"==typeof Set?Je:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Je:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?Je:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":Ze?tn(""[Symbol.iterator]()):Je,"$ %StringPrototype%":String.prototype,"$ %Symbol%":Ze?Symbol:Je,"$ %SymbolPrototype%":Ze?Symbol.prototype:Je,"$ %SyntaxError%":b,"$ %SyntaxErrorPrototype%":b.prototype,"$ %ThrowTypeError%":Ke,"$ %TypedArray%":sn,"$ %TypedArrayPrototype%":sn?sn.prototype:Je,"$ %TypeError%":g,"$ %TypeErrorPrototype%":g.prototype,"$ %Uint8Array%":void 0===x?Je:x,"$ %Uint8ArrayPrototype%":void 0===x?Je:x.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Je:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?Je:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?Je:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?Je:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?Je:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?Je:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?Je:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?Je:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?Je:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?Je:WeakSet.prototype},nn=function(t,i){if(arguments.length>1&&"boolean"!=typeof i)throw new g('"allowMissing" argument must be a boolean');var s="$ "+t;if(!(s in en))throw new b("intrinsic "+t+" does not exist!");if(void 0===en[s]&&!i)throw new g("intrinsic "+t+" exists, but is not available. Please file an issue!");return en[s]},rn=De.call(Function.call,k.prototype.hasOwnProperty),hn=nn,on=hn("%TypeError%"),an=hn("%SyntaxError%"),un=rn,cn={"Property Descriptor":function(t,i){if("Object"!==t.Type(i))return!1;var s={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var e in i)if(un(i,e)&&!s[e])return!1;var n=un(i,"[[Value]]"),r=un(i,"[[Get]]")||un(i,"[[Set]]");if(n&&r)throw new on("Property Descriptors may not be both accessor and data descriptors");return!0}},ln=Number.isNaN||function(t){return t!=t},fn=Number.isNaN||function(t){return t!=t},dn=Number.isFinite||function(t){return"number"==typeof t&&!fn(t)&&t!==1/0&&t!==-1/0},vn=Function.prototype.toString,pn=/^\s*class\b/,mn=function(t){try{var i=vn.call(t);return pn.test(i)}catch(t){return!1}},gn=k.prototype.toString,yn="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,bn=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(yn)return function(t){try{return!mn(t)&&(vn.call(t),!0)}catch(t){return!1}}(t);if(mn(t))return!1;var i=gn.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},kn=k.prototype.toString,wn=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},jn=bn,Sn=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===kn.call(t)?String:Number)===String||i===Number){var s,e,n=i===String?["toString","valueOf"]:["valueOf","toString"];for(e=0;e<n.length;++e)if(jn(t[n[e]])&&(s=t[n[e]](),wn(s)))return s;throw new g("No default value")}throw new g("invalid [[DefaultValue]] hint supplied")},_n=nn,xn=_n("%Object%"),Tn=_n("%TypeError%"),Cn=_n("%String%"),Pn=function(t,i,s,e){var n=cn[i];if("function"!=typeof n)throw new an("unknown record type: "+i);if(!n(t,e))throw new on(s+" must be a "+i);console.log(n(t,e),e)},An=ln,Mn=dn,In=function(t){return t>=0?1:-1},En=function(t,i){var s=t%i;return w.floor(s>=0?s:s+i)},Dn=rn,Fn={ToPrimitive:function(t){return wn(t)?t:arguments.length>1?Sn(t,arguments[1]):Sn(t)},ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return An(i)?0:0!==i&&Mn(i)?In(i)*w.floor(w.abs(i)):i},ToInt32:function(t){return this.ToNumber(t)>>0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var i=this.ToNumber(t);if(An(i)||0===i||!Mn(i))return 0;var s=In(i)*w.floor(w.abs(i));return En(s,65536)},ToString:function(t){return Cn(t)},ToObject:function(t){return this.CheckObjectCoercible(t),xn(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new Tn(i||"Cannot call method on "+t);return t},IsCallable:bn,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:An(t)&&An(i)},Type:function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0},IsPropertyDescriptor:function(t){if("Object"!==this.Type(t))return!1;var i={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var s in t)if(Dn(t,s)&&!i[s])return!1;var e=Dn(t,"[[Value]]"),n=Dn(t,"[[Get]]")||Dn(t,"[[Set]]");if(e&&n)throw new Tn("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(Pn(this,"Property Descriptor","Desc",t),!(!Dn(t,"[[Get]]")&&!Dn(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(Pn(this,"Property Descriptor","Desc",t),!(!Dn(t,"[[Value]]")&&!Dn(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(Pn(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(Pn(this,"Property Descriptor","Desc",t),this.IsDataDescriptor(t))return{value:t["[[Value]]"],writable:!!t["[[Writable]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};if(this.IsAccessorDescriptor(t))return{get:t["[[Get]]"],set:t["[[Set]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};throw new Tn("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new Tn("ToPropertyDescriptor requires an object");var i={};if(Dn(t,"enumerable")&&(i["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),Dn(t,"configurable")&&(i["[[Configurable]]"]=this.ToBoolean(t.configurable)),Dn(t,"value")&&(i["[[Value]]"]=t.value),Dn(t,"writable")&&(i["[[Writable]]"]=this.ToBoolean(t.writable)),Dn(t,"get")){var s=t.get;if(void 0!==s&&!this.IsCallable(s))throw new g("getter must be a function");i["[[Get]]"]=s}if(Dn(t,"set")){var e=t.set;if(void 0!==e&&!this.IsCallable(e))throw new Tn("setter must be a function");i["[[Set]]"]=e}if((Dn(i,"[[Get]]")||Dn(i,"[[Set]]"))&&(Dn(i,"[[Value]]")||Dn(i,"[[Writable]]")))throw new Tn("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},Nn=De.call(Function.call,String.prototype.replace),$n=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,Bn=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,On=function(){var t=Fn.ToString(Fn.CheckObjectCoercible(this));return Nn(Nn(t,$n,""),Bn,"")},Rn=On,Un=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:Rn},Vn=Ye,Ln=Un,Hn=Ye,zn=On,Wn=Un,qn=function(){var t=Ln();return Vn(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},Gn=De.call(Function.call,Wn());Hn(Gn,{getPolyfill:Wn,implementation:zn,shim:qn});var Xn=Gn,Qn=bn,Jn=k.prototype.toString,Yn=k.prototype.hasOwnProperty,Kn=Xn,Zn=function(t,i,s){if(!Qn(i))throw new g("iterator must be a function");var e;arguments.length>=3&&(e=s),"[object Array]"===Jn.call(t)?function(t,i,s){for(var e=0,n=t.length;e<n;e++)Yn.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e):"string"==typeof t?function(t,i,s){for(var e=0,n=t.length;e<n;e++)null==s?i(t.charAt(e),e,t):i.call(s,t.charAt(e),e,t)}(t,i,e):function(t,i,s){for(var e in t)Yn.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e)},tr=function(){for(var t={},i=0;i<arguments.length;i++){var s=arguments[i];for(var e in s)ir.call(s,e)&&(t[e]=s[e])}return t},ir=k.prototype.hasOwnProperty;var sr=pe.exports,er=me,nr=function(t){if(!t)return{};var i={};return Zn(Kn(t).split("\n"),(function(t){var s=t.indexOf(":"),e=Kn(t.slice(0,s)).toLowerCase(),n=Kn(t.slice(s+1));void 0===i[e]?i[e]=n:!function(t){return"[object Array]"===k.prototype.toString.call(t)}(i[e])?i[e]=[i[e],n]:i[e].push(n)})),i},rr=tr,hr=ar;function or(t,i,s){var e=t;return er(i)?(s=i,"string"==typeof t&&(e={uri:t})):e=rr(i,{uri:t}),e.callback=s,e}function ar(t,i,s){return ur(i=or(t,i,s))}function ur(t){if(void 0===t.callback)throw new m("callback argument missing");var i=!1,s=function(s,e,n){i||(i=!0,t.callback(s,e,n))};function e(){var t=void 0;if(t=u.response?u.response:u.responseText||function(t){if("document"===t.responseType)return t.responseXML;var i=204===t.status&&t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!i)return t.responseXML;return null}(u),b)try{t=JSON.parse(t)}catch(t){}return t}var n={body:void 0,headers:{},statusCode:0,method:d,url:f,rawRequest:u};function r(t){return v(l),t instanceof m||(t=new m(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,n)}function h(){if(!a){var i;v(l),i=t.useXDR&&void 0===u.status?200:1223===u.status?204:u.status;var r=n,h=null;return 0!==i?(r={body:e(),statusCode:i,method:d,headers:{},url:f,rawRequest:u},u.getAllResponseHeaders&&(r.headers=nr(u.getAllResponseHeaders()))):h=new m("Internal XMLHttpRequest Error"),s(h,r,r.body)}}var o,a,u=t.xhr||null;u||(u=t.cors||t.useXDR?new ar.XDomainRequest:new ar.XMLHttpRequest);var l,f=u.url=t.uri||t.url,d=u.method=t.method||"GET",p=t.body||t.data||null,g=u.headers=t.headers||{},y=!!t.sync,b=!1;if("json"in t&&(b=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),p=JSON.stringify(t.json))),u.onreadystatechange=function(){4===u.readyState&&h()},u.onload=h,u.onerror=r,u.onprogress=function(){},u.ontimeout=r,u.open(d,f,!y,t.username,t.password),y||(u.withCredentials=!!t.withCredentials),!y&&t.timeout>0&&(l=c((function(){a=!0,u.abort("timeout");var t=new m("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}),t.timeout)),u.setRequestHeader)for(o in g)g.hasOwnProperty(o)&&u.setRequestHeader(o,g[o]);else if(t.headers&&!function(t){for(var i in t)if(t.hasOwnProperty(i))return!1;return!0}(t.headers))throw new m("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(u.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(u),u.send(p),u}ar.XMLHttpRequest=sr.XMLHttpRequest||function(){},ar.XDomainRequest="withCredentials"in new ar.XMLHttpRequest?ar.XMLHttpRequest:sr.XDomainRequest,function(t,i){for(var s=0;s<t.length;s++)i(t[s])}(["get","put","post","patch","head","delete"],(function(t){ar["delete"===t?"del":t]=function(i,s,e){return(s=or(i,s,e)).method=t.toUpperCase(),ur(s)}}));var cr=function(t,i){var s=new r.WebVTT.Parser(r,r.vttjs,r.WebVTT.StringDecoder()),e=[];s.oncue=function(t){i.addCue(t)},s.onparsingerror=function(t){e.push(t)},s.onflush=function(){i.trigger({type:"loadeddata",target:i})},s.parse(t),e.length>0&&(r.console&&r.console.groupCollapsed&&r.console.groupCollapsed("Text Track parsing errors for "+i.src),e.forEach((function(t){return yi.error(t)})),r.console&&r.console.groupEnd&&r.console.groupEnd()),s.flush()},lr=function(t){function i(s){var e;if(void 0===s&&(s={}),!s.tech)throw new m("A tech was not provided.");var n=Os(s,{kind:ce[s.kind]||"subtitles",language:s.language||s.srclang||""}),h=le[n.mode]||"disabled",o=n.default;"metadata"!==n.kind&&"chapters"!==n.kind||(h="hidden");var a=e=t.call(this,n)||this;if(a.W=n.tech,vs)for(var u in i.prototype)"constructor"!==u&&(a[u]=i.prototype[u]);a.H=[],a.q=[];var c=new oe(a.H),l=new oe(a.q),f=!1,d=$s(a,(function(){this.activeCues,f&&(this.trigger("cuechange"),f=!1)}));return"disabled"!==h&&a.W.ready((function(){a.W.on("timeupdate",d)}),!0),k.defineProperty(a,"default",{get:function(){return o},set:function(){}}),k.defineProperty(a,"mode",{get:function(){return h},set:function(t){var i=this;le[t]&&("showing"===(h=t)&&this.W.ready((function(){i.W.on("timeupdate",d)}),!0),this.trigger("modechange"))}}),k.defineProperty(a,"cues",{get:function(){return this.G?c:null},set:function(){}}),k.defineProperty(a,"activeCues",{get:function(){if(!this.G)return null;if(0===this.cues.length)return l;for(var t=this.W.currentTime(),i=[],s=0,e=this.cues.length;s<e;s++){var n=this.cues[s];(n.startTime<=t&&n.endTime>=t||n.startTime===n.endTime&&n.startTime<=t&&n.startTime+.5>=t)&&i.push(n)}if(f=!1,i.length!==this.q.length)f=!0;else for(var r=0;r<i.length;r++)-1===this.q.indexOf(i[r])&&(f=!0);return this.q=i,l.V(this.q),l},set:function(){}}),n.src?(a.src=n.src,function(t,i){var s={uri:t},e=ve(t);e&&(s.cors=e),hr(s,$s(this,(function(t,s,e){if(t)return yi.error(t,s);if(i.G=!0,"function"!=typeof r.WebVTT){if(i.W){var n=function(){return cr(e,i)};i.W.on("vttjsloaded",n),i.W.on("vttjserror",(function(){yi.error("vttjs failed to load, stopping trying to process "+i.src),i.W.off("vttjsloaded",n)}))}}else cr(e,i)})))}(n.src,a)):a.G=!0,a||Us(e)}Ls(i,t);var s=i.prototype;return s.addCue=function(t){var i=t;if(r.vttjs&&!(t instanceof r.vttjs.VTTCue)){for(var s in i=new r.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)s in i||(i[s]=t[s]);i.id=t.id,i.X=t}var e=this.W.textTracks();if(e)for(var n=0;n<e.length;n++)e[n]!==this&&e[n].removeCue(i);this.H.push(i),this.cues.V(this.H)},s.removeCue=function(t){for(var i=this.H.length;i--;){var s=this.H[i];if(s===t||s.X&&s.X===t){this.H.splice(i,1),this.cues.V(this.H);break}}},i}(fe);lr.prototype.M={cuechange:"cuechange"};var fr=function(t){function i(s){var e,n;void 0===s&&(s={});var r=Us(e=t.call(this)||this);if(vs)for(var h in r=l.createElement("custom"),i.prototype)"constructor"!==h&&(r[h]=i.prototype[h]);var o=new lr(s);return r.kind=o.kind,r.src=o.src,r.srclang=o.language,r.label=o.label,r.default=o.default,k.defineProperty(r,"readyState",{get:function(){return n}}),k.defineProperty(r,"track",{get:function(){return o}}),n=0,o.addEventListener("loadeddata",(function(){n=2,r.trigger({type:"load",target:r})})),vs?r||Us(e):e}return Ls(i,t),i}(Rs);fr.prototype.M={load:"load"},fr.NONE=0,fr.LOADING=1,fr.LOADED=2,fr.ERROR=3;var dr,vr=function(){function t(i){void 0===i&&(i=[]);var s=this;if(vs)for(var e in s=l.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);s.J=[],k.defineProperty(s,"length",{get:function(){return this.J.length}});for(var n=0,r=i.length;n<r;n++)s.Y(i[n]);if(vs)return s}var i=t.prototype;return i.Y=function(t){var i=this.J.length;""+i in this||k.defineProperty(this,i,{get:function(){return this.J[i]}}),-1===this.J.indexOf(t)&&this.J.push(t)},i.K=function(t){for(var i,s=0,e=this.J.length;s<e;s++)if(t===this.J[s].track){i=this.J[s];break}return i},i.Z=function(t){for(var i=0,s=this.J.length;i<s;i++)if(t===this.J[i]){this.J.splice(i,1);break}},t}(),pr=function(t){function i(s,e){var n;if(void 0===s&&(s=[]),void 0===e&&(e=null),n=t.call(this)||this,!e&&(e=Us(n),vs))for(var r in e=l.createElement("custom"),i.prototype)"constructor"!==r&&(e[r]=i.prototype[r]);e.tt=[],k.defineProperty(e,"length",{get:function(){return this.tt.length}});for(var h=0;h<s.length;h++)e.it(s[h]);return e||Us(n)}Ls(i,t);var s=i.prototype;return s.it=function(t){var i=this.tt.length;""+i in this||k.defineProperty(this,i,{get:function(){return this.tt[i]}}),-1===this.tt.indexOf(t)&&(this.tt.push(t),this.trigger({track:t,type:"addtrack"}))},s.st=function(t){for(var i,s=0,e=this.length;s<e;s++)if(this[s]===t){(i=this[s]).off&&i.off(),this.tt.splice(s,1);break}i&&this.trigger({track:i,type:"removetrack"})},s.getTrackById=function(t){for(var i=null,s=0,e=this.length;s<e;s++){var n=this[s];if(n.id===t){i=n;break}}return i},i}(Rs);for(dr in pr.prototype.M={change:"change",addtrack:"addtrack",removetrack:"removetrack"},pr.prototype.M)pr.prototype["on"+dr]=null;var mr=function(t){function i(s){var e,n;if(void 0===s&&(s=[]),vs){for(var r in n=l.createElement("custom"),pr.prototype)"constructor"!==r&&(n[r]=pr.prototype[r]);for(var h in i.prototype)"constructor"!==h&&(n[h]=i.prototype[h])}return(n=e=t.call(this,s,n)||this)||Us(e)}return Ls(i,t),i.prototype.it=function(i){t.prototype.it.call(this,i),i.addEventListener("modechange",$s(this,(function(){this.trigger("change")})))},i}(pr),gr=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].selected=!1)},yr=function(t){function i(s){var e,n;void 0===s&&(s=[]);for(var r=s.length-1;r>=0;r--)if(s[r].selected){gr(s,s[r]);break}if(vs){for(var h in n=l.createElement("custom"),pr.prototype)"constructor"!==h&&(n[h]=pr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).et=!1,k.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n||Us(e)}Ls(i,t);var s=i.prototype;return s.it=function(i){var s=this;i.selected&&gr(this,i),t.prototype.it.call(this,i),i.addEventListener&&i.addEventListener("selectedchange",(function(){s.et||(s.et=!0,gr(s,i),s.et=!1,s.trigger("change"))}))},s.addTrack=function(t){this.it(t)},s.removeTrack=function(i){t.prototype.st.call(this,i)},i}(pr),br=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].enabled=!1)},kr=function(t){function i(s){var e,n;void 0===s&&(s=[]);for(var r=s.length-1;r>=0;r--)if(s[r].enabled){br(s,s[r]);break}if(vs){for(var h in n=l.createElement("custom"),pr.prototype)"constructor"!==h&&(n[h]=pr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).et=!1,n||Us(e)}Ls(i,t);var s=i.prototype;return s.it=function(i){var s=this;i.enabled&&br(this,i),t.prototype.it.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",(function(){s.et||(s.et=!0,br(s,i),s.et=!1,s.trigger("change"))}))},s.addTrack=function(t){this.it(t)},s.removeTrack=function(i){t.prototype.st.call(this,i)},i}(pr),wr=void 0;var jr=function(t){function i(i,s){var e;return void 0===i&&(i={}),void 0===s&&(s=function(){}),i.reportTouchActivity=!1,(e=t.call(this,null,i,s)||this).nt=!1,e.on("playing",(function(){this.nt=!0})),e.on("loadstart",(function(){this.nt=!1})),e.rt=i.textTracks,e.ht=i.videoTracks,e.ot=i.audioTracks,e.featuresProgressEvents||e.manualProgressOn(),e.featuresTimeupdateEvents||e.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(t){!1===i["native"+t+"Tracks"]&&(e["featuresNative"+t+"Tracks"]=!1)})),!1===i.nativeCaptions&&(e.featuresNativeTextTracks=!1),e.featuresNativeTextTracks||e.emulateTextTracks(),e.ut=new mr,e.initTextTrackListeners(),e.initTrackListeners(),i.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.v=e.constructor.name||"Unknown Tech"),e}Ls(i,t);var s=i.prototype;return s.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},s.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},s.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval($s(this,(function(){var t=this.bufferedPercent();this.ct!==t&&this.trigger("progress"),this.ct=t,1===t&&this.stopTrackingProgress()})),500)},s.onDurationChange=function(t){this.lt=this.duration()},s.buffered=function(){return Ws(0,0)},s.bufferedPercent=function(){return qs(this.buffered(),this.lt)},s.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},s.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},s.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},s.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},s.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.dispose=function(){this.clearTracks(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},s.clearTracks=function(t){var i=this;(t=[].concat(t)).forEach((function(t){for(var s=i[t+"Tracks"]()||[],e=s.length;e--;){var n=s[e];"text"===t&&i.removeRemoteTextTrack(n),s.st(n)}}))},s.cleanupAutoTextTracks=function(){for(var t=this.ut||[],i=t.length;i--;){var s=t[i];this.removeRemoteTextTrack(s)}},s.reset=function(){},s.error=function(t){return void 0!==t&&(this.ft=new te(t),this.trigger("error")),this.ft},s.played=function(){return this.nt?Ws(0,0):Ws()},s.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.initTextTrackListeners=function(){var t=$s(this,(function(){this.trigger("texttrackchange")})),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",$s(this,(function(){i.removeEventListener("removetrack",t),i.removeEventListener("addtrack",t)}))))},s.initTrackListeners=function(){var t=this;["video","audio"].forEach((function(i){var s=function(){t.trigger(i+"trackchange")},e=t[i+"Tracks"]();e.addEventListener("removetrack",s),e.addEventListener("addtrack",s),t.on("dispose",(function(){e.removeEventListener("removetrack",s),e.removeEventListener("addtrack",s)}))}))},s.dt=function(){var t=this;if(!r.WebVTT)if(l.body.contains(this.el())){if(!this.o["vtt.js"]&&mi(wr)&&k.keys(wr).length>0)return void this.trigger("vttjsloaded");var i=l.createElement("script");i.src=this.o["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",i.onload=function(){t.trigger("vttjsloaded")},i.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){i.onload=null,i.onerror=null})),r.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.dt)},s.emulateTextTracks=function(){var t=this,i=this.textTracks();if(i){var s=this.remoteTextTracks(),e=function(t){return i.it(t.track)},n=function(t){return i.st(t.track)};s.on("addtrack",e),s.on("removetrack",n),this.dt();var r=function(){return t.trigger("texttrackchange")},h=function(){r();for(var t=0;t<i.length;t++){var s=i[t];s.removeEventListener("cuechange",r),"showing"===s.mode&&s.addEventListener("cuechange",r)}};h(),i.addEventListener("change",h),i.addEventListener("addtrack",h),i.addEventListener("removetrack",h),this.on("dispose",(function(){s.off("addtrack",e),s.off("removetrack",n),i.removeEventListener("change",h),i.removeEventListener("addtrack",h),i.removeEventListener("removetrack",h);for(var t=0;t<i.length;t++){i[t].removeEventListener("cuechange",r)}}))}},s.videoTracks=function(){return this.ht=this.ht||new yr,this.ht},s.audioTracks=function(){return this.ot=this.ot||new kr,this.ot},s.textTracks=function(){return this.rt=this.rt||new mr,this.rt},s.remoteTextTracks=function(){return this.vt=this.vt||new mr,this.vt},s.remoteTextTrackEls=function(){return this.gt=this.gt||new vr,this.gt},s.addTextTrack=function(t,i,s){if(!t)throw new m("TextTrack kind is required but was not provided");return function(t,i,s,e,n){void 0===n&&(n={});var r=t.textTracks();n.kind=i,s&&(n.label=s),e&&(n.language=e),n.tech=t;var h=new lr(n);return r.it(h),h}(this,t,i,s)},s.createRemoteTextTrack=function(t){var i=Os(t,{tech:this});return new fr(i)},s.addRemoteTextTrack=function(t,i){void 0===t&&(t={});var s=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(yi.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),i=!0),this.remoteTextTrackEls().Y(s),this.remoteTextTracks().it(s.track),!0!==i&&this.ut.it(s.track),s},s.removeRemoteTextTrack=function(t){var i=this.remoteTextTrackEls().K(t);this.remoteTextTrackEls().Z(i),this.remoteTextTracks().st(t),this.ut.st(t)},s.getVideoPlaybackQuality=function(){return{}},s.setPoster=function(){},s.playsinline=function(){},s.setPlaysinline=function(){},s.canPlayType=function(){return""},i.isTech=function(t){return t.prototype instanceof i||t instanceof i||t===i},i.registerTech=function(t,s){if(i.yt||(i.yt={}),!i.isTech(s))throw new m("Tech "+t+" must be a Tech");return i.yt[t]=s,s},i.getTech=function(t){return i.yt&&i.yt[t]?i.yt[t]:r&&r.videojs&&r.videojs[t]?(yi.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),r.videojs[t]):void 0},i}(n);jr.prototype.rt,jr.prototype.ot,jr.prototype.ht,jr.prototype.featuresVolumeControl=!0,jr.prototype.featuresFullscreenResize=!1,jr.prototype.featuresPlaybackRate=!1,jr.prototype.featuresProgressEvents=!1,jr.prototype.featuresTimeupdateEvents=!1,jr.prototype.featuresNativeTextTracks=!1,jr.withSourceHandlers=function(t){t.registerSourceHandler=function(i,s){var e=t.sourceHandlers;e||(e=t.sourceHandlers=[]),void 0===s&&(s=e.length),e.splice(s,0,i)},t.canPlayType=function(i){for(var s,e=t.sourceHandlers||[],n=0;n<e.length;n++)if(s=e[n].canPlayType(i))return s;return""},t.selectSourceHandler=function(i,s){for(var e=t.sourceHandlers||[],n=0;n<e.length;n++)if(e[n].canHandleSource(i,s))return e[n];return null},t.canPlaySource=function(i,s){var e=t.selectSourceHandler(i,s);return e?e.canHandleSource(i,s):""};["seekable","duration"].forEach((function(t){var i=this[t];"function"==typeof i&&(this[t]=function(){return this.bt&&this.bt[t]?this.bt[t].apply(this.bt,arguments):i.apply(this,arguments)})}),t.prototype),t.prototype.setSource=function(i){var s=t.selectSourceHandler(i,this.o);return s||(t.nativeSourceHandler?s=t.nativeSourceHandler:yi.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),s!==t.nativeSourceHandler&&(this.kt=i,this.off(this.m,"loadstart",t.prototype.wt),this.off(this.m,"loadstart",t.prototype.jt),this.one(this.m,"loadstart",t.prototype.wt)),this.bt=s.handleSource(i,this,this.o),this.on("dispose",this.disposeSourceHandler),this},t.prototype.wt=function(){this.one(this.m,"loadstart",t.prototype.jt)},t.prototype.jt=function(){this.disposeSourceHandler(),this.one(this.m,"loadstart",t.prototype.jt)},t.prototype.disposeSourceHandler=function(){this.kt&&(this.clearTracks(["audio","video"]),this.kt=null),this.cleanupAutoTextTracks(),this.bt&&(this.off(this.m,"loadstart",t.prototype.wt),this.off(this.m,"loadstart",t.prototype.jt),this.bt.dispose&&this.bt.dispose(),this.bt=null)}},n.registerComponent("Tech",jr),n.registerComponent("MediaTechController",jr),jr.registerTech("Tech",jr);var Sr=function(t){function i(i,s,e){var r;if(r=t.call(this,i,s,e)||this,s.playerOptions.sources&&0!==s.playerOptions.sources.length)i.src(s.playerOptions.sources);else for(var h=0,o=s.playerOptions.techOrder;h<o.length;h++){var a=Bs(o[h]),u=jr.getTech(a);if(a||(u=n.getComponent(a)),u&&u.isSupported()){i.St(a);break}}return r}return Ls(i,t),i}(n);n.registerComponent("MediaLoader",Sr);var _r=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).emitTapEvents(),e.on(i,"languagechange",e.handleLanguagechange),e.enable(),e}Ls(i,t);var s=i.prototype;return s.createEl=function(i,s,e){void 0===i&&(i="div"),void 0===s&&(s={}),void 0===e&&(e={}),s=vi({className:this.buildCSSClass(),tabIndex:0},s),"button"===i&&yi.error("Creating a ClickableComponent with an HTML element of "+i+" is not supported; use a Button instead."),e=vi({role:"button","aria-live":"polite"},e),this._t=s.tabIndex;var n=t.prototype.createEl.call(this,i,s,e);return this.createControlTextEl(n),n},s.createControlTextEl=function(t){return this.xt=Pi("span",{className:"vjs-control-text"}),t&&t.appendChild(this.xt),this.controlText(this.Tt,t),this.xt},s.controlText=function(t,i){if(void 0===i&&(i=this.el()),void 0===t)return this.Tt||"Need Text";var s=this.localize(t);return this.Tt=t,this.xt.innerHTML=s,this.nonIconControl||i.setAttribute("title",s),this},s.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},s.enable=function(){return this.removeClass("vjs-disabled"),this.m.setAttribute("aria-disabled","false"),void 0!==this._t&&this.m.setAttribute("tabIndex",this._t),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this},s.disable=function(){return this.addClass("vjs-disabled"),this.m.setAttribute("aria-disabled","true"),void 0!==this._t&&this.m.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this},s.handleLanguagechange=function(){this.controlText(this.Tt)},s.handleClick=function(t){},s.handleFocus=function(t){Ts(l,"keydown",$s(this,this.handleKeyPress))},s.handleKeyPress=function(i){32===i.which||13===i.which?(i.preventDefault(),this.handleClick(i)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,i)},s.handleBlur=function(t){Cs(l,"keydown",$s(this,this.handleKeyPress))},i}(n);n.registerComponent("ClickableComponent",_r);var xr=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).update(),i.on("posterchange",$s(Us(e),e.update)),e}Ls(i,t);var s=i.prototype;return s.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},s.createEl=function(){var t=Pi("div",{className:"vjs-poster",tabIndex:-1});return bs||(this.Ct=Pi("img"),t.appendChild(this.Ct)),t},s.update=function(t){var i=this.player().poster();this.setSrc(i),i?this.show():this.hide()},s.setSrc=function(t){if(this.Ct)this.Ct.src=t;else{var i="";t&&(i='url("'+t+'")'),this.m.style.backgroundImage=i}},s.handleClick=function(t){this.h.controls()&&(this.h.paused()?this.h.play():this.h.pause())},i}(_r);n.registerComponent("PosterImage",xr);var Tr="#222",Cr={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Pr(t,i){return"rgba("+j(t[1]+t[1],16)+","+j(t[2]+t[2],16)+","+j(t[3]+t[3],16)+","+i+")"}function Ar(t,i,s){try{t.style[i]=s}catch(t){return}}var Mr=function(t){function i(i,s,e){var n;return n=t.call(this,i,s,e)||this,i.on("loadstart",$s(Us(n),n.toggleDisplay)),i.on("texttrackchange",$s(Us(n),n.updateDisplay)),i.ready($s(Us(n),(function(){if(i.W&&i.W.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",$s(this,this.updateDisplay));for(var t=this.o.playerOptions.tracks||[],s=0;s<t.length;s++)this.h.addRemoteTextTrack(t[s],!0);var e,n,r={captions:1,subtitles:1},h=this.h.textTracks();if(h){for(var o=0;o<h.length;o++){var a=h[o];a.default&&("descriptions"!==a.kind||e?a.kind in r&&!n&&(n=a):e=a)}n?n.mode="showing":e&&(e.mode="showing")}}}))),n}Ls(i,t);var s=i.prototype;return s.toggleDisplay=function(){this.h.W&&this.h.W.featuresNativeTextTracks?this.hide():this.show()},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},s.clearDisplay=function(){"function"==typeof r.WebVTT&&r.WebVTT.processCues(r,[],this.m)},s.updateDisplay=function(){var t=this.h.textTracks();if(this.clearDisplay(),t){for(var i=null,s=null,e=t.length;e--;){var n=t[e];"showing"===n.mode&&("descriptions"===n.kind?i=n:s=n)}s?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):i&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(i))}},s.updateForTrack=function(t){if("function"==typeof r.WebVTT&&t.activeCues){for(var i=this.h.textTrackSettings.getValues(),s=[],e=0;e<t.activeCues.length;e++)s.push(t.activeCues[e]);r.WebVTT.processCues(r,s,this.m);for(var n=s.length;n--;){var h=s[n];if(h){var o=h.displayState;if(i.color&&(o.firstChild.style.color=i.color),i.textOpacity&&Ar(o.firstChild,"color",Pr(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(o.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&Ar(o.firstChild,"backgroundColor",Pr(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?Ar(o,"backgroundColor",Pr(i.windowColor,i.windowOpacity)):o.style.backgroundColor=i.windowColor),i.edgeStyle&&("dropshadow"===i.edgeStyle?o.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+Tr:"raised"===i.edgeStyle?o.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+Tr:"depressed"===i.edgeStyle?o.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+Tr:"uniform"===i.edgeStyle&&(o.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+Tr)),i.fontPercent&&1!==i.fontPercent){var a=r.parseFloat(o.style.fontSize);o.style.fontSize=a*i.fontPercent+"px",o.style.height="auto",o.style.top="auto",o.style.bottom="2px"}i.fontFamily&&"default"!==i.fontFamily&&("small-caps"===i.fontFamily?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=Cr[i.fontFamily])}}}},i}(n);n.registerComponent("TextTrackDisplay",Mr);var Ir=function(t){function i(){return t.apply(this,arguments)||this}return Ls(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},i}(n);n.registerComponent("LoadingSpinner",Ir);var Er=function(t){function i(){return t.apply(this,arguments)||this}Ls(i,t);var s=i.prototype;return s.createEl=function(t,i,s){void 0===t&&(t="button"),void 0===i&&(i={}),void 0===s&&(s={}),i=vi({className:this.buildCSSClass()},i),"button"!==t&&(yi.warn("Creating a Button with an HTML element of "+t+" is deprecated; use ClickableComponent instead."),i=vi({tabIndex:0},i),s=vi({role:"button"},s)),s=vi({type:"button","aria-live":"polite"},s);var e=n.prototype.createEl.call(this,t,i,s);return this.createControlTextEl(e),e},s.addChild=function(t,i){void 0===i&&(i={});var s=this.constructor.name;return yi.warn("Adding an actionable (user controllable) child to a Button ("+s+") is not supported; use a ClickableComponent instead."),n.prototype.addChild.call(this,t,i)},s.enable=function(){t.prototype.enable.call(this),this.m.removeAttribute("disabled")},s.disable=function(){t.prototype.disable.call(this),this.m.setAttribute("disabled","disabled")},s.handleKeyPress=function(i){32!==i.which&&13!==i.which&&t.prototype.handleKeyPress.call(this,i)},i}(_r);n.registerComponent("Button",Er);var Dr=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Pt=!1,e.on("mousedown",e.handleMouseDown),e}Ls(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-big-play-button"},s.handleClick=function(t){var i=this.h.play();if(!(this.Pt&&t.clientX&&t.clientY)){var s=this.h.getChild("controlBar"),e=s&&s.getChild("playToggle");if(e){var n=function(){return e.focus()};if(i&&i.then){i.then(n,(function(){}))}else this.setTimeout(n,1)}else this.h.focus()}},s.handleKeyPress=function(i){this.Pt=!1,t.prototype.handleKeyPress.call(this,i)},s.handleMouseDown=function(t){this.Pt=!0},i}(Er);Dr.prototype.Tt="Play Video",n.registerComponent("BigPlayButton",Dr);var Fr=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).controlText(s&&s.controlText||"Close"),e}Ls(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},i}(Er);n.registerComponent("CloseButton",Fr);var Nr=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"play",e.handlePlay),e.on(i,"pause",e.handlePause),e}Ls(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.h.paused()?this.h.play():this.h.pause()},s.handlePlay=function(t){this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},s.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},i}(Er);function $r(t,i){void 0===i&&(i=t),t=t<0?0:t;var s=w.floor(t%60),e=w.floor(t/60%60),n=w.floor(t/3600),r=w.floor(i/60%60),h=w.floor(i/3600);return(_(t)||t===1/0)&&(n=e=s="-"),(n=n>0||h>0?n+":":"")+(e=((n||r>=10)&&e<10?"0"+e:e)+":")+(s=s<10?"0"+s:s)}Nr.prototype.Tt="Play",n.registerComponent("PlayToggle",Nr);var Br=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"languagechange",e.updateContent),e}Ls(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-control vjs-control"});return this.T=Pi("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00'},{"aria-live":"off"}),i.appendChild(this.T),i},s.updateContent=function(t){var i=this.h.scrubbing()?this.h.getCache().currentTime:this.h.currentTime(),s=this.localize("Current Time"),e=$r(i,this.h.duration());e!==this.At&&(this.At=e,this.T.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e)},i}(n);n.registerComponent("CurrentTimeDisplay",Br);var Or=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"durationchange",e.updateContent),e.on(i,"timeupdate",e.updateContent),e.on(i,"loadedmetadata",e.updateContent),e.on(i,"languagechange",e.updateContent),e}Ls(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.T=Pi("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Duration Time")+"</span> 0:00"},{"aria-live":"off"}),i.appendChild(this.T),i},s.updateContent=function(t){var i=this.h.duration();if(i&&this.lt!==i){this.lt=i;var s=this.localize("Duration Time"),e=$r(i);this.T.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e}},i}(n);n.registerComponent("DurationDisplay",Or);var Rr=function(t){function i(){return t.apply(this,arguments)||this}return Ls(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},i}(n);n.registerComponent("TimeDivider",Rr);var Ur=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"durationchange",e.updateContent),e.on(i,"languagechange",e.updateContent),e}Ls(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.T=Pi("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Remaining Time")+"</span> -0:00"},{"aria-live":"off"}),i.appendChild(this.T),i},s.updateContent=function(t){if(this.h.duration()){var i=this.localize("Remaining Time"),s=$r(this.h.remainingTime());s!==this.At&&(this.At=s,this.T.innerHTML='<span class="vjs-control-text">'+i+"</span> -"+s)}},i}(n);n.registerComponent("RemainingTimeDisplay",Ur);var Vr=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateShowing(),e.on(e.player(),"durationchange",e.updateShowing),e.on(e.player(),"languagechange",e.handleLanguagechange),e}Ls(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.T=Pi("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.xt=Pi("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.Mt=l.createTextNode(this.localize("LIVE")),this.T.appendChild(this.xt),this.T.appendChild(this.Mt),i.appendChild(this.T),i},s.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},s.handleLanguagechange=function(){this.xt.innerHTML=this.localize("Stream Type"),this.Mt.innerHTML=this.localize("LIVE")},i}(n);n.registerComponent("LiveDisplay",Vr);var Lr=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).bar=e.getChild(e.o.barName),e.vertical(!!e.o.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(i,"controlsvisible",e.update),e.on(i,e.playerEvent,e.update),e}Ls(i,t);var s=i.prototype;return s.createEl=function(i,s,e){return void 0===s&&(s={}),void 0===e&&(e={}),s.className=s.className+" vjs-slider",s=vi({tabIndex:0},s),e=vi({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},e),t.prototype.createEl.call(this,i,s,e)},s.handleMouseDown=function(t){var i=this.bar.m.ownerDocument;t.preventDefault(),l.body.focus(),l.onselectstart=function(){return!1},this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove),this.on(i,"mouseup",this.handleMouseUp),this.on(i,"touchmove",this.handleMouseMove),this.on(i,"touchend",this.handleMouseUp),this.handleMouseMove(t)},s.handleMouseMove=function(t){},s.handleMouseUp=function(){var t=this.bar.m.ownerDocument;l.onselectstart=function(){return!0},this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},s.update=function(){if(this.m){var t=this.getPercent(),i=this.bar;if(i){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var s=(100*t).toFixed(2)+"%";this.vertical()?i.el().style.height=s:i.el().style.width=s}}},s.calculateDistance=function(t){var i=Wi(this.m,t);return this.vertical()?i.y:i.x},s.handleFocus=function(){this.on(this.bar.m.ownerDocument,"keydown",this.handleKeyPress)},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},s.handleBlur=function(){this.off(this.bar.m.ownerDocument,"keydown",this.handleKeyPress)},s.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},s.vertical=function(t){return void 0===t?this.It||!1:(this.It=!!t,this.It?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(n);function Hr(t,i){if(!t||!i)return"";if("function"==typeof r.getComputedStyle){var s=r.getComputedStyle(t);return s?s[i]:""}return t.currentStyle[i]||""}n.registerComponent("Slider",Lr);var zr=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Et=[],e.on(i,"progress",e.update),e.on(i,"languagechange",e.handleLanguagechange),e}Ls(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});return this.Dt=Pi("span",{innerHTML:this.localize("Loaded")}),this.Ft=l.createTextNode(": 0%"),this.xt=Pi("span",{className:"vjs-control-text"}),this.xt.appendChild(this.Dt),this.xt.appendChild(this.Ft),i.appendChild(this.xt),i},s.update=function(t){var i=this.h.buffered(),s=this.h.duration(),e=this.h.bufferedEnd(),n=this.Et,r=function(t,i){var s=t/i||0;return 100*(s>=1?1:s)+"%"};this.m.style.width=r(e,s);for(var h=0;h<i.length;h++){var o=i.start(h),a=i.end(h),u=n[h];u||(u=this.m.appendChild(Pi()),n[h]=u),u.style.left=r(o,e),u.style.width=r(a-o,e)}for(var c=n.length;c>i.length;c--)this.m.removeChild(n[c-1]);n.length=i.length},s.handleLanguagechange=function(){this.Dt.innerHTML=this.localize("Loaded")},i}(n);n.registerComponent("LoadProgressBar",zr);var Wr=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready($s(Us(e),e.updateDataAttr)),s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&e.addClass("vjs-keep-tooltips-inside"),e}Ls(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"});return this.Nt=Pi("span",{innerHTML:this.localize("Progress")}),this.$t=l.createTextNode(": 0%"),this.xt=Pi("span",{className:"vjs-control-text"}),this.xt.appendChild(this.Nt),this.xt.appendChild(this.$t),i.appendChild(this.xt),i},s.updateDataAttr=function(t){var i=this.h.scrubbing()?this.h.getCache().currentTime:this.h.currentTime();this.m.setAttribute("data-current-time",$r(i,this.h.duration()))},s.handleLanguagechange=function(){this.Nt.innerHTML=this.localize("Progress")},i}(n);n.registerComponent("PlayProgressBar",Wr);var qr=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready($s(Us(e),e.updateDataAttr)),e}Ls(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar"});return this.tooltip=Pi("div",{className:"vjs-time-tooltip"}),this.Nt=Pi("span",{innerHTML:this.localize("Progress")}),this.$t=l.createTextNode(": 0%"),this.xt=Pi("span",{className:"vjs-control-text"}),this.xt.appendChild(this.Nt),this.xt.appendChild(this.$t),i.appendChild(this.tooltip),i.appendChild(this.xt),i},s.updateDataAttr=function(t){var i=$r(this.h.scrubbing()?this.h.getCache().currentTime:this.h.currentTime(),this.h.duration());this.m.setAttribute("data-current-time",i),this.tooltip.innerHTML=i},s.handleLanguagechange=function(){this.Nt.innerHTML=this.localize("Progress")},i}(n);n.registerComponent("TooltipProgressBar",qr);var Gr=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateProgress),e.on(i,"ended",e.updateProgress),i.ready($s(Us(e),e.updateProgress)),s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltipProgressBar=e.addChild("TooltipProgressBar")),e}Ls(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},s.updateProgress=function(t){if(this.updateAriaAttributes(this.m),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.m),this.tooltipProgressBar.m.style.width=this.bar.m.style.width;var i=S(Hr(this.player().el(),"width")),s=S(Hr(this.tooltipProgressBar.tooltip,"width")),e=this.tooltipProgressBar.el().style;e.maxWidth=w.floor(i-s/2)+"px",e.minWidth=w.ceil(s/2)+"px",e.right="-"+s/2+"px"}},s.updateAriaAttributes=function(t){var i=this.h.scrubbing()?this.h.getCache().currentTime:this.h.currentTime();t.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),t.setAttribute("aria-valuetext",$r(i,this.h.duration()))},s.getPercent=function(){var t=this.h.currentTime()/this.h.duration();return t>=1?1:t},s.handleMouseDown=function(i){this.h.scrubbing(!0),this.videoWasPlaying=!this.h.paused(),this.h.pause(),t.prototype.handleMouseDown.call(this,i)},s.handleMouseMove=function(t){var i=this.calculateDistance(t)*this.h.duration();i===this.h.duration()&&(i-=.1),this.h.currentTime(i)},s.handleMouseUp=function(i){t.prototype.handleMouseUp.call(this,i),this.h.scrubbing(!1),this.videoWasPlaying&&this.h.play()},s.stepForward=function(){this.h.currentTime(this.h.currentTime()+5)},s.stepBack=function(){this.h.currentTime(this.h.currentTime()-5)},i}(Lr);Gr.prototype.o={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},Gr.prototype.playerEvent="timeupdate",n.registerComponent("SeekBar",Gr);var Xr=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltip=Pi("div",{className:"vjs-time-tooltip"}),e.el().appendChild(e.tooltip),e.addClass("vjs-keep-tooltips-inside")),e.update(0,0),i.on("ready",(function(){e.on(i.controlBar.progressControl.el(),"mousemove",function(t,i){var s=Date.now();return function(){var e=Date.now();e-s>=i&&(t.apply(void 0,arguments),s=e)}}($s(Us(e),e.handleMouseMove),25))})),e}Ls(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},s.handleMouseMove=function(t){var i=this.h.duration(),s=this.calculateDistance(t)*i,e=t.pageX-zi(this.el().parentNode).left;this.update(s,e)},s.update=function(t,i){var s=$r(t,this.h.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",s),this.keepTooltipsInside){var e=i-this.Bt(i)+1,n=S(Hr(this.tooltip,"width"))/2;this.tooltip.innerHTML=s,this.tooltip.style.right="-"+(n-e)+"px"}},s.calculateDistance=function(t){return Wi(this.el().parentNode,t).x},s.Bt=function(t){if(!this.keepTooltipsInside)return t;var i=S(Hr(this.player().el(),"width")),s=S(Hr(this.tooltip,"width"))/2,e=t;return t<s?e=w.ceil(s):t>i-s&&(e=w.floor(i-s)),e},i}(n);n.registerComponent("MouseTimeDisplay",Xr);var Qr=function(t){function i(){return t.apply(this,arguments)||this}return Ls(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(n);Qr.prototype.o={children:["seekBar"]},n.registerComponent("ProgressControl",Qr);var Jr=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"fullscreenchange",e.handleFullscreenChange),e}Ls(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},s.handleFullscreenChange=function(t){this.h.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},s.handleClick=function(t){this.h.isFullscreen()?this.h.exitFullscreen():this.h.requestFullscreen()},i}(Er);Jr.prototype.Tt="Fullscreen",n.registerComponent("FullscreenToggle",Jr);var Yr=function(t){function i(){return t.apply(this,arguments)||this}return Ls(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},i}(n);n.registerComponent("VolumeLevel",Yr);var Kr=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.updateARIAAttributes),i.ready($s(Us(e),e.updateARIAAttributes)),e}Ls(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":"volume level"})},s.handleMouseMove=function(t){this.checkMuted(),this.h.volume(this.calculateDistance(t))},s.checkMuted=function(){this.h.muted()&&this.h.muted(!1)},s.getPercent=function(){return this.h.muted()?0:this.h.volume()},s.stepForward=function(){this.checkMuted(),this.h.volume(this.h.volume()+.1)},s.stepBack=function(){this.checkMuted(),this.h.volume(this.h.volume()-.1)},s.updateARIAAttributes=function(t){var i=(100*this.h.volume()).toFixed(2);this.m.setAttribute("aria-valuenow",i),this.m.setAttribute("aria-valuetext",i+"%")},i}(Lr);Kr.prototype.o={children:["volumeLevel"],barName:"volumeLevel"},Kr.prototype.playerEvent="volumechange",n.registerComponent("VolumeBar",Kr);var Zr=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,i.W&&!1===i.W.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",(function(){!1===i.W.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),e}return Ls(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(n);Zr.prototype.o={children:["volumeBar"]},n.registerComponent("VolumeControl",Zr);var th=function(t){function i(){return t.apply(this,arguments)||this}Ls(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",$s(this,(function(){this.unlockShowing()})))},s.createEl=function(){var i=this.o.contentElType||"ul";this.T=Pi(i,{className:"vjs-menu-content"});var s=t.prototype.createEl.call(this,"div",{append:this.T,className:"vjs-menu"});return s.appendChild(this.T),Ts(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},i}(n);n.registerComponent("Popup",th);var ih=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e}Ls(i,t);var s=i.prototype;return s.update=function(){var t=this.createPopup();this.popup&&this.removeChild(this.popup),this.popup=t,this.addChild(t),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},s.createPopup=function(){},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},s.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.o.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},i}(_r);n.registerComponent("PopupButton",ih);var sh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.update),i.W&&!1===i.W.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",(function(){this.update(),!1===i.W.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),e}Ls(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.h.muted(!this.h.muted())},s.update=function(t){var i=this.h.volume(),s=3;this.h.muted()?s=0:i<.33?s=1:i<.67&&(s=2);var e=this.h.muted()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e);for(var n=0;n<4;n++)Oi(this.m,"vjs-vol-"+n);Bi(this.m,"vjs-vol-"+s)},i}(Er);sh.prototype.Tt="Mute",n.registerComponent("MuteToggle",sh);var eh=function(t){function i(i,s){var e;function n(){i.W&&!1===i.W.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}return void 0===s&&(s={}),void 0===s.inline&&(s.inline=!0),void 0===s.vertical&&(s.inline?s.vertical=!1:s.vertical=!0),s.volumeBar=s.volumeBar||{},s.volumeBar.vertical=!!s.vertical,(e=t.call(this,i,s)||this).on(i,"volumechange",e.volumeUpdate),e.on(i,"loadstart",e.volumeUpdate),n.call(Us(e)),e.on(i,"loadstart",n),e.on(e.volumeBar,["slideractive","focus"],(function(){this.addClass("vjs-slider-active")})),e.on(e.volumeBar,["sliderinactive","blur"],(function(){this.removeClass("vjs-slider-active")})),e.on(e.volumeBar,["focus"],(function(){this.addClass("vjs-lock-showing")})),e.on(e.volumeBar,["blur"],(function(){this.removeClass("vjs-lock-showing")})),e}Ls(i,t);var s=i.prototype;return s.buildCSSClass=function(){var i="";return i=this.o.vertical?"vjs-volume-menu-button-vertical":"vjs-volume-menu-button-horizontal","vjs-volume-menu-button "+t.prototype.buildCSSClass.call(this)+" "+i},s.createPopup=function(){var t=new th(this.h,{contentElType:"div"}),i=new Kr(this.h,this.o.volumeBar);return t.addChild(i),this.menuContent=t,this.volumeBar=i,this.attachVolumeBarEvents(),t},s.handleClick=function(i){sh.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},s.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],$s(this,this.handleMouseDown))},s.handleMouseDown=function(t){this.on(["mousemove","touchmove"],$s(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.m.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},s.handleMouseUp=function(t){this.off(["mousemove","touchmove"],$s(this.volumeBar,this.volumeBar.handleMouseMove))},i}(ih);eh.prototype.volumeUpdate=sh.prototype.update,eh.prototype.Tt="Mute",n.registerComponent("VolumeMenuButton",eh);var nh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Ot=-1,e.on("keydown",e.handleKeyPress),e}Ls(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",$s(this,(function(t){this.unlockShowing()})))},s.createEl=function(){var i=this.o.contentElType||"ul";this.T=Pi(i,{className:"vjs-menu-content"}),this.T.setAttribute("role","menu");var s=t.prototype.createEl.call(this,"div",{append:this.T,className:"vjs-menu"});return s.setAttribute("role","presentation"),s.appendChild(this.T),Ts(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},s.stepForward=function(){var t=0;void 0!==this.Ot&&(t=this.Ot+1),this.focus(t)},s.stepBack=function(){var t=0;void 0!==this.Ot&&(t=this.Ot-1),this.focus(t)},s.focus=function(t){void 0===t&&(t=0);var i=this.children().slice();i.length&&i[0].className&&/vjs-menu-title/.test(i[0].className)&&i.shift(),i.length>0&&(t<0?t=0:t>=i.length&&(t=i.length-1),this.Ot=t,i[t].m.focus())},i}(n);n.registerComponent("Menu",nh);var rh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e.Rt=!0,e.m.setAttribute("aria-haspopup","true"),e.m.setAttribute("role","menuitem"),e.on("keydown",e.handleSubmenuKeyPress),e}Ls(i,t);var s=i.prototype;return s.update=function(){var t=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=t,this.addChild(t),this.Ut=!1,this.m.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.Vt?this.hide():this.show()},s.createMenu=function(){var t=new nh(this.h);if(this.Vt=0,this.o.title){var i=Pi("li",{className:"vjs-menu-title",innerHTML:Bs(this.o.title),tabIndex:-1});this.Vt+=1,t.k.unshift(i),Mi(i,t.contentEl())}if(this.items=this.createItems(),this.items)for(var s=0;s<this.items.length;s++)t.addItem(this.items[s]);return t},s.createItems=function(){},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},s.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.o.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",$s(this,(function(t){this.unpressButton(),this.m.blur()}))),this.Ut?this.unpressButton():this.pressButton()},s.handleKeyPress=function(i){27===i.which||9===i.which?(this.Ut&&this.unpressButton(),9!==i.which&&i.preventDefault()):38===i.which||40===i.which?this.Ut||(this.pressButton(),i.preventDefault()):t.prototype.handleKeyPress.call(this,i)},s.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.Ut&&this.unpressButton(),9!==t.which&&t.preventDefault())},s.pressButton=function(){this.Rt&&(this.Ut=!0,this.menu.lockShowing(),this.m.setAttribute("aria-expanded","true"),this.menu.focus())},s.unpressButton=function(){this.Rt&&(this.Ut=!1,this.menu.unlockShowing(),this.m.setAttribute("aria-expanded","false"),this.m.focus())},s.disable=function(){return this.Ut=!1,this.menu.unlockShowing(),this.m.setAttribute("aria-expanded","false"),this.Rt=!1,t.prototype.disable.call(this)},s.enable=function(){return this.Rt=!0,t.prototype.enable.call(this)},i}(_r);n.registerComponent("MenuButton",rh);var hh=function(t){function i(i,s){var e,n=s.tracks;if((e=t.call(this,i,s)||this).items.length<=1&&e.hide(),!n)return Us(e);var r=$s(Us(e),e.update);return n.addEventListener("removetrack",r),n.addEventListener("addtrack",r),e.h.on("dispose",(function(){n.removeEventListener("removetrack",r),n.removeEventListener("addtrack",r)})),e}return Ls(i,t),i}(rh);n.registerComponent("TrackButton",hh);var oh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).selectable=s.selectable,e.selected(s.selected),e.selectable?e.m.setAttribute("role","menuitemcheckbox"):e.m.setAttribute("role","menuitem"),e}Ls(i,t);var s=i.prototype;return s.createEl=function(i,s,e){this.nonIconControl=!0;var n=t.prototype.createEl.call(this,"li",vi({className:"vjs-menu-item",tabIndex:-1},s),e);return this.Lt=l.createTextNode(this.localize(this.o.label)),n.appendChild(this.Lt),n},s.handleClick=function(t){this.selected(!0)},s.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.m.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.m.setAttribute("aria-checked","false"),this.controlText("")))},s.handleLanguagechange=function(){t.prototype.handleLanguagechange.call(this),this.Lt.innerHTML=this.localize(this.o.label)},i}(_r);n.registerComponent("MenuItem",oh);var ah=function(t){function i(i,s){var e,n,h=s.track,o=i.textTracks();if(s.label=h.label||h.language||"Unknown",s.selected=h.default||"showing"===h.mode,(e=t.call(this,i,s)||this).track=h,o){var a=$s(Us(e),e.handleTracksChange);i.on(["loadstart","texttrackchange"],a),o.addEventListener("change",a),e.on("dispose",(function(){o.removeEventListener("change",a)}))}o&&void 0===o.onchange&&e.on(["tap","click"],(function(){if("object"!=typeof r.Event)try{n=new r.Event("change")}catch(t){}n||(n=l.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(n)}));return e}Ls(i,t);var s=i.prototype;return s.handleClick=function(i){var s=this.track.kind,e=this.h.textTracks();if(t.prototype.handleClick.call(this,i),e)for(var n=0;n<e.length;n++){var r=e[n];r.kind===s&&(r===this.track?"showing"!==r.mode&&(r.mode="showing"):"disabled"!==r.mode&&(r.mode="disabled"))}},s.handleTracksChange=function(t){this.selected("showing"===this.track.mode)},i}(oh);n.registerComponent("TextTrackMenuItem",ah);var uh=function(t){function i(i,s){var e;return s.track={player:i,kind:s.kind,label:s.kind+" off",default:!1,mode:"disabled"},s.selectable=!0,(e=t.call(this,i,s)||this).selected(!0),e}return Ls(i,t),i.prototype.handleTracksChange=function(t){for(var i=this.player().textTracks(),s=!0,e=0,n=i.length;e<n;e++){var r=i[e];if(r.kind===this.track.kind&&"showing"===r.mode){s=!1;break}}this.selected(s)},i}(ah);n.registerComponent("OffTextTrackMenuItem",uh);var ch=function(t){function i(i,s){return void 0===s&&(s={}),s.tracks=i.textTracks(),t.call(this,i,s)||this}return Ls(i,t),i.prototype.createItems=function(t){void 0===t&&(t=[]),t.push(new uh(this.h,{kind:this.Ht})),this.Vt+=1;var i=this.h.textTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];e.kind===this.Ht&&t.push(new ah(this.h,{track:e,selectable:!0}))}return t},i}(hh);n.registerComponent("TextTrackButton",ch);var lh=function(t){function i(i,s){var e,n=s.track,r=s.cue,h=i.currentTime();return s.selectable=!0,s.label=r.text,s.selected=r.startTime<=h&&h<r.endTime,(e=t.call(this,i,s)||this).track=n,e.cue=r,n.addEventListener("cuechange",$s(Us(e),e.update)),e}Ls(i,t);var s=i.prototype;return s.handleClick=function(i){t.prototype.handleClick.call(this),this.h.currentTime(this.cue.startTime),this.update(this.cue.startTime)},s.update=function(t){var i=this.cue,s=this.h.currentTime();this.selected(i.startTime<=s&&s<i.endTime)},i}(oh);n.registerComponent("ChaptersTrackMenuItem",lh);var fh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).m.setAttribute("aria-label","Chapters Menu"),n}Ls(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},s.update=function(i){this.zt&&(!i||"addtrack"!==i.type&&"removetrack"!==i.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},s.setTrack=function(t){if(this.zt!==t){if(this.Wt||(this.Wt=this.update.bind(this)),this.zt){var i=this.h.remoteTextTrackEls().K(this.zt);i&&i.removeEventListener("load",this.Wt),this.zt=null}if(this.zt=t,this.zt){this.zt.mode="hidden";var s=this.h.remoteTextTrackEls().K(this.zt);s&&s.addEventListener("load",this.Wt)}}},s.findChaptersTrack=function(){for(var t=this.h.textTracks()||[],i=t.length-1;i>=0;i--){var s=t[i];if(s.kind===this.Ht)return s}},s.getMenuCaption=function(){return this.zt&&this.zt.label?this.zt.label:this.localize(Bs(this.Ht))},s.createMenu=function(){return this.o.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},s.createItems=function(){var t=[];if(!this.zt)return t;var i=this.zt.cues;if(!i)return t;for(var s=0,e=i.length;s<e;s++){var n=i[s],r=new lh(this.h,{track:this.zt,cue:n});t.push(r)}return t},i}(ch);fh.prototype.Ht="chapters",fh.prototype.Tt="Chapters",n.registerComponent("ChaptersButton",fh);var dh=function(t){function i(i,s,e){var n;(n=t.call(this,i,s,e)||this).m.setAttribute("aria-label","Descriptions Menu");var r=i.textTracks();if(r){var h=$s(Us(n),n.handleTracksChange);r.addEventListener("change",h),n.on("dispose",(function(){r.removeEventListener("change",h)}))}return n}Ls(i,t);var s=i.prototype;return s.handleTracksChange=function(t){for(var i=this.player().textTracks(),s=!1,e=0,n=i.length;e<n;e++){var r=i[e];if(r.kind!==this.Ht&&"showing"===r.mode){s=!0;break}}s?this.disable():this.enable()},s.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},i}(ch);dh.prototype.Ht="descriptions",dh.prototype.Tt="Descriptions",n.registerComponent("DescriptionsButton",dh);var vh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).m.setAttribute("aria-label","Subtitles Menu"),n}return Ls(i,t),i.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},i}(ch);vh.prototype.Ht="subtitles",vh.prototype.Tt="Subtitles",n.registerComponent("SubtitlesButton",vh);var ph=function(t){function i(i,s){var e;return s.track={player:i,kind:s.kind,label:s.kind+" settings",selectable:!1,default:!1,mode:"disabled"},s.selectable=!1,(e=t.call(this,i,s)||this).addClass("vjs-texttrack-settings"),e.controlText(", opens "+s.kind+" settings dialog"),e}return Ls(i,t),i.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").m.focus()},i}(ah);n.registerComponent("CaptionSettingsMenuItem",ph);var mh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).m.setAttribute("aria-label","Captions Menu"),n}Ls(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-captions-button "+t.prototype.buildCSSClass.call(this)},s.createItems=function(){var i=[];return this.player().W&&this.player().W.featuresNativeTextTracks||(i.push(new ph(this.h,{kind:this.Ht})),this.Vt+=1),t.prototype.createItems.call(this,i)},i}(ch);mh.prototype.Ht="captions",mh.prototype.Tt="Captions",n.registerComponent("CaptionsButton",mh);var gh=function(t){function i(i,s){var e,n=s.track,r=i.audioTracks();if(s.label=n.label||n.language||"Unknown",s.selected=n.enabled,(e=t.call(this,i,s)||this).track=n,r){var h=$s(Us(e),e.handleTracksChange);r.addEventListener("change",h),e.on("dispose",(function(){r.removeEventListener("change",h)}))}return e}Ls(i,t);var s=i.prototype;return s.handleClick=function(i){var s=this.h.audioTracks();if(t.prototype.handleClick.call(this,i),s)for(var e=0;e<s.length;e++){var n=s[e];n.enabled=n===this.track}},s.handleTracksChange=function(t){this.selected(this.track.enabled)},i}(oh);n.registerComponent("AudioTrackMenuItem",gh);var yh=function(t){function i(i,s){var e;return void 0===s&&(s={}),s.tracks=i.audioTracks&&i.audioTracks(),(e=t.call(this,i,s)||this).m.setAttribute("aria-label","Audio Menu"),e}Ls(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-audio-button "+t.prototype.buildCSSClass.call(this)},s.createItems=function(t){void 0===t&&(t=[]),this.Vt=1;var i=this.h.audioTracks&&this.h.audioTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];t.push(new gh(this.h,{track:e,selectable:!0}))}return t},i}(hh);yh.prototype.Tt="Audio Track",n.registerComponent("AudioTrackButton",yh);var bh=function(t){function i(i,s){var e,n=s.rate,r=S(n,10);return s.label=n,s.selected=1===r,s.selectable=!0,(e=t.call(this,i,s)||this).label=n,e.rate=r,e.on(i,"ratechange",e.update),e}Ls(i,t);var s=i.prototype;return s.handleClick=function(i){t.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},s.update=function(t){this.selected(this.player().playbackRate()===this.rate)},i}(oh);bh.prototype.contentElType="button",n.registerComponent("PlaybackRateMenuItem",bh);var kh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateVisibility(),e.updateLabel(),e.on(i,"loadstart",e.updateVisibility),e.on(i,"ratechange",e.updateLabel),e}Ls(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this);return this.Lt=Pi("div",{className:"vjs-playback-rate-value",innerHTML:1}),i.appendChild(this.Lt),i},s.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},s.createMenu=function(){var t=new nh(this.player()),i=this.playbackRates();if(i)for(var s=i.length-1;s>=0;s--)t.addChild(new bh(this.player(),{rate:i[s]+"x"}));return t},s.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},s.handleClick=function(t){for(var i=this.player().playbackRate(),s=this.playbackRates(),e=s[0],n=0;n<s.length;n++)if(s[n]>i){e=s[n];break}this.player().playbackRate(e)},s.playbackRates=function(){return this.o.playbackRates||this.o.playerOptions&&this.o.playerOptions.playbackRates},s.playbackRateSupported=function(){return this.player().W&&this.player().W.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},s.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},s.updateLabel=function(t){this.playbackRateSupported()&&(this.Lt.innerHTML=this.player().playbackRate()+"x")},i}(rh);kh.prototype.Tt="Playback Rate",n.registerComponent("PlaybackRateMenuButton",kh);var wh=function(t){function i(){return t.apply(this,arguments)||this}Ls(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},i}(n);n.registerComponent("Spacer",wh);var jh=function(t){function i(){return t.apply(this,arguments)||this}Ls(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},s.createEl=function(){var i=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return i.innerHTML="&nbsp;",i},i}(wh);n.registerComponent("CustomControlSpacer",jh);var Sh=function(t){function i(){return t.apply(this,arguments)||this}return Ls(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(n);Sh.prototype.o={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},n.registerComponent("ControlBar",Sh);var _h=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"error",e.open),e}Ls(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},s.content=function(){var t=this.player().error();return t?this.localize(t.message):""},i}(he);_h.prototype.o=Os(he.prototype.o,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),n.registerComponent("ErrorDisplay",_h);var xh="vjs-text-track-settings",Th=["#000","Black"],Ch=["#00F","Blue"],Ph=["#0FF","Cyan"],Ah=["#0F0","Green"],Mh=["#F0F","Magenta"],Ih=["#F00","Red"],Eh=["#FFF","White"],Dh=["#FF0","Yellow"],Fh=["1","Opaque"],Nh=["0.5","Semi-Transparent"],$h=["0","Transparent"],Bh={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Th,Eh,Ih,Ah,Ch,Dh,Mh,Ph]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Fh,Nh,$h]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Eh,Th,Ih,Ah,Ch,Dh,Mh,Ph]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Fh,Nh]},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:[$h,Nh,Fh]}};function Oh(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}Bh.windowColor.options=Bh.backgroundColor.options;var Rh,Uh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).setDefaults(),e.hide(),e.updateDisplay=$s(Us(e),e.updateDisplay),void 0===s.persistTextTrackSettings&&(e.o.persistTextTrackSettings=e.o.playerOptions.persistTextTrackSettings),e.on(e.$(".vjs-done-button"),"click",(function(){e.saveSettings(),e.hide()})),e.on(e.$(".vjs-default-button"),"click",(function(){e.setDefaults(),e.updateDisplay()})),di(Bh,(function(t){e.on(e.$(t.selector),"change",e.updateDisplay)})),e.o.persistTextTrackSettings&&e.restoreSettings(),e}Ls(i,t);var s=i.prototype;return s.qt=function(t){var i=this,s=Bh[t],e=s.id.replace("%s",this.u);return[Pi("label",{className:"vjs-label",textContent:s.label},{for:e}),Pi("select",{id:e},void 0,s.options.map((function(t){return Pi("option",{textContent:i.localize(t[1]),value:t[0]})})))]},s.Gt=function(){var t=Pi("legend",{textContent:this.localize("Text")}),i=this.qt("color"),s=Pi("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.qt("textOpacity"));return Pi("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Xt=function(){var t=Pi("legend",{textContent:this.localize("Background")}),i=this.qt("backgroundColor"),s=Pi("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.qt("backgroundOpacity"));return Pi("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Qt=function(){var t=Pi("legend",{textContent:this.localize("Window")}),i=this.qt("windowColor"),s=Pi("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.qt("windowOpacity"));return Pi("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Jt=function(){return Pi("div",{className:"vjs-tracksettings-colors"},void 0,[this.Gt(),this.Xt(),this.Qt()])},s.Yt=function(){var t=Pi("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.qt("fontPercent")),i=Pi("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.qt("edgeStyle")),s=Pi("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.qt("fontFamily"));return Pi("div",{className:"vjs-tracksettings-font"},void 0,[t,i,s])},s.Kt=function(){var t=Pi("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=Pi("button",{className:"vjs-done-button",textContent:"Done"});return Pi("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},s.createEl=function(){var t=Pi("div",{className:"vjs-tracksettings"},void 0,[this.Jt(),this.Yt(),this.Kt()]),i=Pi("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.u,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),s=Pi("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.u,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),e=Pi("div",void 0,{role:"document"},[i,s,t]);return Pi("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":i.id,"aria-describedby":s.id},e)},s.getValues=function(){var t=this;return function(t,i,s){return void 0===s&&(s=0),fi(t).reduce((function(s,e){return i(s,t[e],e)}),s)}(Bh,(function(i,s,e){var n=function(t,i){return Oh(t.options[t.options.selectedIndex].value,i)}(t.$(s.selector),s.parser);return void 0!==n&&(i[e]=n),i}),{})},s.setValues=function(t){var i=this;di(Bh,(function(s,e){!function(t,i,s){if(i)for(var e=0;e<t.options.length;e++)if(Oh(t.options[e].value,s)===i){t.selectedIndex=e;break}}(i.$(s.selector),t[e],s.parser)}))},s.setDefaults=function(){var t=this;di(Bh,(function(i){var s=i.hasOwnProperty("default")?i.default:0;t.$(i.selector).selectedIndex=s}))},s.restoreSettings=function(){var t;try{t=JSON.parse(r.localStorage.getItem(xh))}catch(t){yi.warn(t)}t&&this.setValues(t)},s.saveSettings=function(){if(this.o.persistTextTrackSettings){var t=this.getValues();try{k.keys(t).length?r.localStorage.setItem(xh,JSON.stringify(t)):r.localStorage.removeItem(xh)}catch(t){yi.warn(t)}}},s.updateDisplay=function(){var t=this.h.getChild("textTrackDisplay");t&&t.updateDisplay()},i}(n);n.registerComponent("TextTrackSettings",Uh);var Vh,Lh=function(t){function i(i,s){var e;e=t.call(this,i,s)||this;var n=i.source,r=!1;if(n&&(e.m.currentSrc!==n.src||i.tag&&3===i.tag.Zt)?e.setSource(n):e.ti(e.m),e.m.hasChildNodes()){for(var h=e.m.childNodes,o=h.length,a=[];o--;){var u=h[o];"track"===u.nodeName.toLowerCase()&&(e.featuresNativeTextTracks?(e.remoteTextTrackEls().Y(u),e.remoteTextTracks().it(u.track),r||e.m.hasAttribute("crossorigin")||!ve(u.src)||(r=!0)):a.push(u))}for(var c=0;c<a.length;c++)e.m.removeChild(a[c])}return["audio","video"].forEach((function(t){var i=e.el()[t+"Tracks"],s=e[t+"Tracks"](),n=Bs(t);e["featuresNative"+n+"Tracks"]&&i&&i.addEventListener&&(e["handle"+n+"ii"]=function(t){s.trigger({type:"change",target:s,currentTarget:s,srcElement:s})},e["handle"+n+"si"]=function(t){return s.addTrack(t.track)},e["handle"+n+"ei"]=function(t){return s.removeTrack(t.track)},i.addEventListener("change",e["handle"+n+"ii"]),i.addEventListener("addtrack",e["handle"+n+"si"]),i.addEventListener("removetrack",e["handle"+n+"ei"]),e["removeOld"+n+"ni"]=function(t){return e.ri(s,i)},e.on("loadstart",e["removeOld"+n+"ni"]))})),e.featuresNativeTextTracks&&(r&&yi.warn(ji(Rh||(Rh=oi(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."])))),e.hi=$s(Us(e),e.handleTextTrackChange),e.oi=$s(Us(e),e.handleTextTrackAdd),e.ai=$s(Us(e),e.handleTextTrackRemove),e.ci()),e.fi(),(ys||ss||us)&&!0===i.nativeControlsForTouch&&e.setControls(!0),e.di(),e.triggerReady(),e}Ls(i,t);var s=i.prototype;return s.dispose=function(){var s=this;["audio","video","text"].forEach((function(t){var i=Bs(t),e=s.m[t+"Tracks"];e&&e.removeEventListener&&(e.removeEventListener("change",s["handle"+i+"ii"]),e.removeEventListener("addtrack",s["handle"+i+"si"]),e.removeEventListener("removetrack",s["handle"+i+"ei"])),e&&s.off("loadstart",s["removeOld"+i+"ni"])})),i.disposeMediaElement(this.m),t.prototype.dispose.call(this)},s.fi=function(){var t,i=this.textTracks(),s=function(){t=[];for(var s=0;s<i.length;s++){var e=i[s];"metadata"===e.kind&&t.push({track:e,storedMode:e.mode})}};s(),i.addEventListener("change",s);var e=function s(){for(var e=0;e<t.length;e++){var n=t[e];"disabled"===n.track.mode&&n.track.mode!==n.storedMode&&(n.track.mode=n.storedMode)}i.removeEventListener("change",s)};this.on("webkitbeginfullscreen",(function(){i.removeEventListener("change",s),i.removeEventListener("change",e),i.addEventListener("change",e)})),this.on("webkitendfullscreen",(function(){i.removeEventListener("change",s),i.addEventListener("change",s),i.removeEventListener("change",e)}))},s.createEl=function(){var t=this.o.tag;if(!t||!this.o.playerElIngest&&!this.movingMediaElementInDOM){if(t){var s=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(s,t),i.disposeMediaElement(t),t=s}else{t=l.createElement("video");var e=Os({},this.o.tag&&Vi(this.o.tag));ys&&!0===this.o.nativeControlsForTouch||delete e.controls,Ui(t,vi(e,{id:this.o.techId,class:"vjs-tech"}))}t.playerId=this.o.playerId}void 0!==this.o.preload&&Li(t,"preload",this.o.preload);for(var n=["loop","muted","playsinline","autoplay"],r=n.length-1;r>=0;r--){var h=n[r],o=this.o[h];void 0!==o&&(o?Li(t,h,h):Hi(t,h),t[h]=o)}return t},s.ti=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var i=!1,s=function(){i=!0};this.on("loadstart",s);var e=function(){i||this.trigger("loadstart")};return this.on("loadedmetadata",e),void this.ready((function(){this.off("loadstart",s),this.off("loadedmetadata",e),i||this.trigger("loadstart")}))}var n=["loadstart"];n.push("loadedmetadata"),t.readyState>=2&&n.push("loadeddata"),t.readyState>=3&&n.push("canplay"),t.readyState>=4&&n.push("canplaythrough"),this.ready((function(){n.forEach((function(t){this.trigger(t)}),this)}))}},s.ci=function(){var t=this.el().textTracks;if(t){for(var i=0;i<t.length;i++)this.textTracks().it(t[i]);t.addEventListener&&(t.addEventListener("change",this.hi),t.addEventListener("addtrack",this.oi),t.addEventListener("removetrack",this.ai)),this.on("loadstart",this.vi)}},s.handleTextTrackChange=function(t){var i=this.textTracks();this.textTracks().trigger({type:"change",target:i,currentTarget:i,srcElement:i})},s.handleTextTrackAdd=function(t){this.textTracks().it(t.track)},s.handleTextTrackRemove=function(t){this.textTracks().st(t.track)},s.ri=function(t,i){var s=[];if(i){for(var e=0;e<t.length;e++){for(var n=t[e],r=!1,h=0;h<i.length;h++)if(i[h]===n){r=!0;break}r||s.push(n)}for(var o=0;o<s.length;o++){var a=s[o];t.st(a)}}},s.vi=function(t){var i=this.textTracks(),s=this.el().textTracks;this.ri(i,s)},s.play=function(){var t=this.m.play();void 0!==t&&"function"==typeof t.then&&t.then(null,(function(t){}))},s.setCurrentTime=function(t){try{this.m.currentTime=t}catch(t){yi(t,"Video is not ready. (Video.js)")}},s.duration=function(){var t=this;if(this.m.duration===1/0&&hs&&fs&&0===this.m.currentTime){return this.on("timeupdate",(function i(){t.m.currentTime>0&&(t.m.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",i))})),NaN}return this.m.duration||NaN},s.width=function(){return this.m.offsetWidth},s.height=function(){return this.m.offsetHeight},s.di=function(){var t=this;if("webkitDisplayingFullscreen"in this.m){var i=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},s=function(){"webkitPresentationMode"in this.m&&"picture-in-picture"!==this.m.webkitPresentationMode&&(this.one("webkitendfullscreen",i),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",s),this.on("dispose",(function(){t.off("webkitbeginfullscreen",s),t.off("webkitendfullscreen",i)}))}},s.supportsFullScreen=function(){if("function"==typeof this.m.webkitEnterFullScreen){var t=r.navigator&&r.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},s.enterFullScreen=function(){var t=this.m;t.paused&&t.networkState<=t.HAVE_METADATA?(this.m.play(),this.setTimeout((function(){t.pause(),t.webkitEnterFullScreen()}),0)):t.webkitEnterFullScreen()},s.exitFullScreen=function(){this.m.webkitExitFullScreen()},s.src=function(t){if(void 0===t)return this.m.src;this.setSrc(t)},s.reset=function(){i.resetMediaElement(this.m)},s.currentSrc=function(){return this.kt?this.kt.src:this.m.currentSrc},s.setControls=function(t){this.m.controls=!!t},s.addTextTrack=function(i,s,e){return this.featuresNativeTextTracks?this.m.addTextTrack(i,s,e):t.prototype.addTextTrack.call(this,i,s,e)},s.createRemoteTextTrack=function(i){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,i);var s=l.createElement("track");return i.kind&&(s.kind=i.kind),i.label&&(s.label=i.label),(i.language||i.srclang)&&(s.srclang=i.language||i.srclang),i.default&&(s.default=i.default),i.id&&(s.id=i.id),i.src&&(s.src=i.src),s},s.addRemoteTextTrack=function(i,s){var e=t.prototype.addRemoteTextTrack.call(this,i,s);return this.featuresNativeTextTracks&&this.el().appendChild(e),e},s.removeRemoteTextTrack=function(i){if(t.prototype.removeRemoteTextTrack.call(this,i),this.featuresNativeTextTracks)for(var s=this.$$("track"),e=s.length;e--;)i!==s[e]&&i!==s[e].track||this.el().removeChild(s[e])},s.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),r.performance&&"function"==typeof r.performance.now?t.creationTime=r.performance.now():r.performance&&r.performance.timing&&"number"==typeof r.performance.timing.navigationStart&&(t.creationTime=r.Date.now()-r.performance.timing.navigationStart),t},i}(jr);xi()&&(Lh.TEST_VID=l.createElement("video"),(Vh=l.createElement("track")).kind="captions",Vh.srclang="en",Vh.label="English",Lh.TEST_VID.appendChild(Vh)),Lh.isSupported=function(){try{Lh.TEST_VID.volume=.5}catch(t){return!1}return!(!Lh.TEST_VID||!Lh.TEST_VID.canPlayType)},Lh.canControlVolume=function(){try{var t=Lh.TEST_VID.volume;return Lh.TEST_VID.volume=t/2+.1,t!==Lh.TEST_VID.volume}catch(t){return!1}},Lh.canControlPlaybackRate=function(){if(hs&&fs&&ds<58)return!1;try{var t=Lh.TEST_VID.playbackRate;return Lh.TEST_VID.playbackRate=t/2+.1,t!==Lh.TEST_VID.playbackRate}catch(t){return!1}},Lh.supportsNativeTextTracks=function(){return gs},Lh.supportsNativeVideoTracks=function(){return!(!Lh.TEST_VID||!Lh.TEST_VID.videoTracks)},Lh.supportsNativeAudioTracks=function(){return!(!Lh.TEST_VID||!Lh.TEST_VID.audioTracks)},Lh.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],Lh.prototype.featuresVolumeControl=Lh.canControlVolume(),Lh.prototype.featuresPlaybackRate=Lh.canControlPlaybackRate(),Lh.prototype.movingMediaElementInDOM=!ns,Lh.prototype.featuresFullscreenResize=!0,Lh.prototype.featuresProgressEvents=!0,Lh.prototype.featuresTimeupdateEvents=!0,Lh.prototype.featuresNativeTextTracks=Lh.supportsNativeTextTracks(),Lh.prototype.featuresNativeVideoTracks=Lh.supportsNativeVideoTracks(),Lh.prototype.featuresNativeAudioTracks=Lh.supportsNativeAudioTracks();var Hh=Lh.TEST_VID&&Lh.TEST_VID.constructor.prototype.canPlayType,zh=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,Wh=/^video\/mp4/i;Lh.patchCanPlayType=function(){os>=4&&!cs?Lh.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&zh.test(t)?"maybe":Hh.call(this,t)}:as&&(Lh.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Wh.test(t)?"maybe":Hh.call(this,t)})},Lh.unpatchCanPlayType=function(){var t=Lh.TEST_VID.constructor.prototype.canPlayType;return Lh.TEST_VID.constructor.prototype.canPlayType=Hh,t},Lh.patchCanPlayType(),Lh.disposeMediaElement=function(t){if(t){var i=t.nodeName.toLowerCase();if("video"===i||"audio"===i){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}}},Lh.resetMediaElement=function(t){if(t){for(var i=t.querySelectorAll("source"),s=i.length;s--;)t.removeChild(i[s]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(t){Lh.prototype[t]=function(){return this.m[t]||this.m.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){Lh.prototype["set"+Bs(t)]=function(i){this.m[t]=i,i?this.m.setAttribute(t,t):this.m.removeAttribute(t)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(t){Lh.prototype[t]=function(){return this.m[t]}})),["volume","src","poster","preload","playbackRate"].forEach((function(t){Lh.prototype["set"+Bs(t)]=function(i){this.m[t]=i}})),["pause","load"].forEach((function(t){Lh.prototype[t]=function(){return this.m[t]()}})),jr.withSourceHandlers(Lh),Lh.nativeSourceHandler={},Lh.nativeSourceHandler.canPlayType=function(t){try{return Lh.TEST_VID.canPlayType(t)}catch(t){return""}},Lh.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return Lh.nativeSourceHandler.canPlayType(t.type);if(t.src){var s=function(t){if("string"==typeof t){var i=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(t);if(i)return i.pop().toLowerCase()}return""}(t.src);return Lh.nativeSourceHandler.canPlayType("video/"+s)}return""},Lh.nativeSourceHandler.handleSource=function(t,i,s){i.setSrc(t.src)},Lh.nativeSourceHandler.dispose=function(){},Lh.registerSourceHandler(Lh.nativeSourceHandler),n.registerComponent("Html5",Lh),jr.registerTech("Html5",Lh);var qh=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],Gh=function(t){function i(s,e,n){var r;if(s.id=s.id||["vjs_video",ui()].join("_"),(e=vi(i.getTagSettings(s),e)).initChildren=!1,e.createEl=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof s.closest){var h=s.closest("[lang]");h&&(e.language=h.getAttribute("lang"))}else for(var o=s;o&&1===o.nodeType;){if(Vi(o).hasOwnProperty("lang")){e.language=o.getAttribute("lang");break}o=o.parentNode}if(!(r=t.call(this,null,e,n)||this).o||!r.o.techOrder||!r.o.techOrder.length)throw new m("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(r.tag=s,r.tagAttributes=s&&Vi(s),r.language(r.o.language),e.languages){var a={};k.getOwnPropertyNames(e.languages).forEach((function(t){a[t.toLowerCase()]=e.languages[t]})),r.pi=a}else r.pi=i.prototype.o.languages;r.mi={},r.gi=e.poster||"",r.yi=!!e.controls,s.controls=!1,r.bi=!1,r.m=r.createEl();var u=Os(r.o);if(e.plugins){var c=e.plugins;k.getOwnPropertyNames(c).forEach((function(t){"function"==typeof this[t]?this[t](c[t]):yi.error("Unable to find plugin:",t)}),Us(r))}r.o.playerOptions=u,r.initChildren(),r.isAudio("audio"===s.nodeName.toLowerCase()),r.controls()?r.addClass("vjs-controls-enabled"):r.addClass("vjs-controls-disabled"),r.m.setAttribute("role","region"),r.isAudio()?r.m.setAttribute("aria-label","audio player"):r.m.setAttribute("aria-label","video player"),r.isAudio()&&r.addClass("vjs-audio"),r.ki()&&r.addClass("vjs-no-flex"),ns||r.addClass("vjs-workinghover"),i.players[r.u]=Us(r);var l="5.20.6-opentelly.12".split(".")[0];return r.addClass("vjs-v"+l),r.userActive(!0),r.reportUserActivity(),r.wi(),r.on("fullscreenchange",r.ji),r.on("stageclick",r.Si),r}Ls(i,t);var s=i.prototype;return s.dispose=function(){this.trigger("dispose"),this.off("dispose"),this._i&&this._i.parentNode&&this._i.parentNode.removeChild(this._i),i.players[this.u]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.m&&this.m.player&&(this.m.player=null),this.W&&this.W.dispose(),t.prototype.dispose.call(this)},s.createEl=function(){var i,s=this.tag,e=this.xi=s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player");i=this.m=e?s.parentNode:t.prototype.createEl.call(this,"div"),s.setAttribute("tabindex","-1"),s.removeAttribute("width"),s.removeAttribute("height");var n=Vi(s);if(k.getOwnPropertyNames(n).forEach((function(t){"class"===t?i.className+=" "+n[t]:i.setAttribute(t,n[t])})),s.playerId=s.id,s.id+="Ti",s.className="vjs-tech",s.player=i.player=this,this.addClass("vjs-paused"),!0!==r.VIDEOJS_NO_DYNAMIC_STYLE){this._i=Fs("vjs-styles-dimensions");var h=Ji(".vjs-styles-defaults"),o=Ji("head");o.insertBefore(this._i,h?h.nextSibling:o.firstChild)}this.width(this.o.width),this.height(this.o.height),this.fluid(this.o.fluid),this.aspectRatio(this.o.aspectRatio);for(var a=s.getElementsByTagName("a"),u=0;u<a.length;u++){var c=a.item(u);Bi(c,"vjs-hidden"),c.setAttribute("hidden","hidden")}return s.Zt=s.networkState,s.parentNode&&!e&&s.parentNode.insertBefore(i,s),Mi(s,i),this.k.unshift(s),this.m=i,i},s.width=function(t){return this.dimension("width",t)},s.height=function(t){return this.dimension("height",t)},s.dimension=function(t,i){var s="width"===t?"Ci":"Pi";if(void 0===i)return this[s]||0;if(""===i)this[s]=void 0;else{var e=S(i);if(_(e))return yi.error('Improper value "'+i+'" supplied for for '+t),this;this[s]=e}return this.Ai(),this},s.fluid=function(t){if(void 0===t)return!!this.Mi;this.Mi=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.Ai()},s.aspectRatio=function(t){if(void 0===t)return this.Ii;if(!/^\d+\:\d+$/.test(t))throw new m("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.Ii=t,this.fluid(!0),this.Ai()},s.Ai=function(){if(!0!==r.VIDEOJS_NO_DYNAMIC_STYLE){var t,i,s,e=(void 0!==this.Ii&&"auto"!==this.Ii?this.Ii:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),n=e[1]/e[0];t=void 0!==this.Ci?this.Ci:void 0!==this.Pi?this.Pi/n:this.videoWidth()||300,i=void 0!==this.Pi?this.Pi:t*n,s=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(s),Ns(this._i,"\n ."+s+" {\n width: "+t+"px;\n height: "+i+"px;\n }\n\n ."+s+".vjs-fluid {\n padding-top: "+100*n+"%;\n }\n ")}else{var h="number"==typeof this.Ci?this.Ci:this.o.width,o="number"==typeof this.Pi?this.Pi:this.o.height,a=this.W&&this.W.el();a&&(h>=0&&(a.width=h),o>=0&&(a.height=o))}},s.St=function(t,i){var s=this;this.W&&this.Ei(),"Html5"!==t&&this.tag&&(jr.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Di=t,this.C=!1;var e=vi({source:i,nativeControlsForTouch:this.o.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Fi",videoTracks:this.ht,textTracks:this.rt,audioTracks:this.ot,autoplay:this.o.autoplay,playsinline:this.o.playsinline,preload:this.o.preload,loop:this.o.loop,muted:this.o.muted,poster:this.poster(),language:this.language(),playerElIngest:this.xi||!1,"vtt.js":this.o["vtt.js"]},this.o[t.toLowerCase()]);this.tag&&(e.tag=this.tag),i&&(this.Ni=i.type,i.src===this.mi.src&&this.mi.currentTime>0&&(e.startTime=this.mi.currentTime),this.mi.sources=null,this.mi.source=i,this.mi.src=i.src);var r=jr.getTech(t);r||(r=n.getComponent(t)),this.W=new r(e),this.W.ready($s(this,this.$i),!0),ne(this.Bi||[],this.W),qh.forEach((function(t){s.on(s.W,t,s["handleTech"+Bs(t)+"_"])})),this.on(this.W,"loadstart",this.Oi),this.on(this.W,"waiting",this.Ri),this.on(this.W,"canplay",this.Ui),this.on(this.W,"canplaythrough",this.Vi),this.on(this.W,"playing",this.Li),this.on(this.W,"ended",this.Hi),this.on(this.W,"seeking",this.zi),this.on(this.W,"seeked",this.Wi),this.on(this.W,"play",this.qi),this.on(this.W,"firstplay",this.Gi),this.on(this.W,"pause",this.Xi),this.on(this.W,"durationchange",this.Qi),this.on(this.W,"fullscreenchange",this.Ji),this.on(this.W,"error",this.Yi),this.on(this.W,"loadedmetadata",this.Ai),this.on(this.W,"resize",this.Ai),this.on(this.W,"posterchange",this.Ki),this.on(this.W,"textdata",this.Zi),this.usingNativeControls(this.ts("controls")),this.controls()&&!this.usingNativeControls()&&this.ss(),this.W.el().parentNode===this.contentEl()||"Html5"===t&&this.tag||Mi(this.W.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},s.Ei=function(){this.ht=this.videoTracks(),this.rt=this.textTracks(),this.ot=this.audioTracks(),this.Bi=ee(this.W),this.C=!1,this.W.dispose(),this.W=!1},s.tech=function(t){if(t&&t.IWillNotUseThisInPlugins)return this.W;var i="\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n ";throw r.alert(i),new m(i)},s.ss=function(){this.es(),this.on(this.W,"mousedown",this.ns),this.on(this.W,"touchstart",this.rs),this.on(this.W,"touchmove",this.hs),this.on(this.W,"touchend",this.os),this.on(this.W,"tap",this.us)},s.es=function(){this.off(this.W,"tap",this.us),this.off(this.W,"touchstart",this.rs),this.off(this.W,"touchmove",this.hs),this.off(this.W,"touchend",this.os),this.off(this.W,"mousedown",this.ns)},s.$i=function(){if(this.triggerReady(),this.mi.volume&&this.cs("setVolume",this.mi.volume),this.Ki(),this.Qi(),(this.src()||this.currentSrc())&&this.tag&&this.o.autoplay&&this.paused()){try{delete this.tag.poster}catch(t){yi("deleting tag.poster throws in some browsers",t)}this.play()}},s.Oi=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"))},s.hasStarted=function(t){return void 0!==t?(this.nt!==t&&(this.nt=t,t?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.nt},s.qi=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},s.Ri=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return t.removeClass("vjs-waiting")}))},s.Ui=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},s.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},s.Li=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},s.zi=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},s.Wi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},s.Gi=function(){this.o.starttime&&(yi.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.o.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},s.Xi=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},s.Hi=function(){this.addClass("vjs-ended"),this.o.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},s.Qi=function(){this.duration(this.ts("duration"))},s.ns=function(t){0===t.button&&this.controls()&&(void 0!==this.o&&void 0!==this.o.userActions&&void 0!==this.o.userActions.click&&!1===this.o.userActions.click||(void 0!==this.o&&void 0!==this.o.userActions&&"function"==typeof this.o.userActions.click?this.o.userActions.click.call(this,t):this.paused()?this.play():this.pause()))},s.us=function(){this.userActive(!this.userActive())},s.rs=function(){this.userWasActive=this.userActive()},s.hs=function(){this.userWasActive&&this.reportUserActivity()},s.os=function(t){t.cancelable&&t.preventDefault()},s.ji=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},s.Si=function(){this.reportUserActivity()},s.Ji=function(t,i){i&&(this.toggleClass("vjs-ios-native-fs",!(!i.nativeIOSFullscreen||!i.isFullscreen)),this.isFullscreen(i.isFullscreen)),this.trigger("fullscreenchange")},s.Yi=function(){var t=this.W.error();this.error(t)},s.Zi=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},s.getCache=function(){return this.mi},s.cs=function(t,i){if(this.W&&!this.W.C)this.W.ready((function(){this[t](i)}),!0);else try{this.W&&this.W[t](i)}catch(t){throw yi(t),t}},s.ts=function(t){if(this.W&&this.W.C)try{return this.W[t]()}catch(i){throw void 0===this.W[t]?yi("Video.js: "+t+" method not defined for "+this.Di+" playback technology.",i):"TypeError"===i.name?(yi("Video.js: "+t+" unavailable on "+this.Di+" playback technology element.",i),this.W.C=!1):yi(i),i}},s.play=function(){return this.src()||this.currentSrc()?this.cs("play"):this.W.one("loadstart",(function(){this.play()})),this},s.pause=function(){return this.cs("pause"),this},s.paused=function(){return!1!==this.ts("paused")},s.scrubbing=function(t){return void 0!==t?(this.bi=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.bi},s.currentTime=function(t){return void 0!==t?(this.cs("setCurrentTime",t),this):(this.mi.currentTime=this.ts("currentTime")||0,this.mi.currentTime)},s.duration=function(t){return void 0===t?void 0!==this.mi.duration?this.mi.duration:NaN:((t=S(t))<0&&(t=1/0),t!==this.mi.duration&&(this.mi.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},s.remainingTime=function(){return this.duration()-this.currentTime()},s.buffered=function(){var t=this.ts("buffered");return t&&t.length||(t=Ws(0,0)),t},s.bufferedPercent=function(){return qs(this.buffered(),this.duration())},s.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),s=t.end(t.length-1);return s>i&&(s=i),s},s.volume=function(t){var i;return void 0!==t?(i=w.max(0,w.min(1,S(t))),this.mi.volume=i,this.cs("setVolume",i),this):(i=S(this.ts("volume")),_(i)?1:i)},s.muted=function(t){return void 0!==t?(this.cs("setMuted",t),this):this.ts("muted")||!1},s.supportsFullScreen=function(){return this.ts("supportsFullScreen")||!1},s.isFullscreen=function(t){return void 0!==t?(this.ls=!!t,this):!!this.ls},s.requestFullscreen=function(t){var i,s=Ys;return this.isFullscreen(!0),s.requestFullscreen?(Ts(l,s.fullscreenchange,$s(this,(function t(i){this.isFullscreen(l[s.fullscreenElement]),!1===this.isFullscreen()&&Cs(l,s.fullscreenchange,t),this.trigger("fullscreenchange")}))),s.prefixed||(i=this.o.fullscreenOptions,void 0!==t&&(i=t)),this.m[s.requestFullscreen](i)):this.W.supportsFullScreen()?this.cs("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},s.exitFullscreen=function(){var t=Ys;return this.isFullscreen(!1),t.requestFullscreen?l[t.exitFullscreen]():this.W.supportsFullScreen()?this.cs("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},s.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=l.documentElement.style.overflow,Ts(l,"keydown",$s(this,this.fullWindowOnEscKey)),l.documentElement.style.overflow="hidden",Bi(l.body,"vjs-full-window"),this.trigger("enterFullWindow")},s.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},s.exitFullWindow=function(){this.isFullWindow=!1,Cs(l,"keydown",this.fullWindowOnEscKey),l.documentElement.style.overflow=this.docOrigOverflow,Oi(l.body,"vjs-full-window"),this.trigger("exitFullWindow")},s.canPlayType=function(t){for(var i,s=0,e=this.o.techOrder;s<e.length;s++){var r=Bs(e[s]),h=jr.getTech(r);if(h||(h=n.getComponent(r)),h){if(h.isSupported()&&(i=h.canPlayType(t)))return i}else yi.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},s.selectSource=function(t){var i,s=this,e=this.o.techOrder.map(Bs).map((function(t){return[t,jr.getTech(t)||n.getComponent(t)]})).filter((function(t){var i=t[0],s=t[1];return s?s.isSupported():(yi.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),r=function(t,i,s){var e;return t.some((function(t){return i.some((function(i){if(e=s(t,i))return!0}))})),e},h=function(t,i){var e=t[0];if(t[1].canPlaySource(i,s.o[e.toLowerCase()]))return{source:i,tech:e}};return(this.o.sourceOrder?r(t,e,(i=h,function(t,s){return i(s,t)})):r(e,t,h))||!1},s.src=function(t){if(void 0===t)return this.ts("src");var i=jr.getTech(this.Di);return i||(i=n.getComponent(this.Di)),Array.isArray(t)?this.fs(t):"string"==typeof t?this.src({src:t}):t instanceof k&&(t.type&&!i.canPlaySource(t,this.o[this.Di.toLowerCase()])?this.fs([t]):(this.mi.sources=null,this.mi.source=t,this.mi.src=t.src,this.Ni=t.type||"",this.ready((function(){i.prototype.hasOwnProperty("setSource")?this.cs("setSource",t):this.cs("src",t.src),"auto"===this.o.preload&&this.load(),this.o.autoplay&&this.play()}),!0))),this},s.fs=function(t){var i=this.selectSource(t);i?(i.tech===this.Di?this.src(i.source):this.St(i.tech,i.source),this.mi.sources=t):(this.setTimeout((function(){this.error({code:4,message:this.localize(this.o.notSupportedMessage)})}),0),this.triggerReady())},s.load=function(){return this.cs("load"),this},s.reset=function(){return this.St(Bs(this.o.techOrder[0]),null),this.cs("reset"),this},s.currentSources=function(){var t=this.currentSource(),i=[];return 0!==k.keys(t).length&&i.push(t),this.mi.sources||i},s.currentSource=function(){var t={},i=this.currentSrc();return i&&(t.src=i),this.mi.source||t},s.currentSrc=function(){return this.ts("currentSrc")||this.mi.src||""},s.currentType=function(){return this.Ni||""},s.preload=function(t){return void 0!==t?(this.cs("setPreload",t),this.o.preload=t,this):this.ts("preload")},s.autoplay=function(t){return void 0!==t?(this.cs("setAutoplay",t),this.o.autoplay=t,this):this.ts("autoplay",t)},s.playsinline=function(t){return void 0!==t?(this.cs("setPlaysinline",t),this.o.playsinline=t,this):this.ts("playsinline")},s.loop=function(t){return void 0!==t?(this.cs("setLoop",t),this.o.loop=t,this):this.ts("loop")},s.poster=function(t){return void 0===t?this.gi:(t||(t=""),this.gi=t,this.cs("setPoster",t),this.trigger("posterchange"),this)},s.Ki=function(){!this.gi&&this.W&&this.W.poster&&(this.gi=this.W.poster()||"",this.trigger("posterchange"))},s.controls=function(t){return void 0!==t?(t=!!t,this.yi!==t&&(this.yi=t,this.usingNativeControls()&&this.cs("setControls",t),t?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.ss()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.es())),this):!!this.yi},s.usingNativeControls=function(t){return void 0!==t?(t=!!t,this.ds!==t&&(this.ds=t,t?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):!!this.ds},s.error=function(t){return void 0===t?this.ft||null:null===t?(this.ft=t,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close(),this):(this.ft=new te(t),this.addClass("vjs-error"),yi.error("(CODE:"+this.ft.code+" "+te.errorTypes[this.ft.code]+")",this.ft.message,this.ft),this.trigger("error"),this)},s.reportUserActivity=function(t){this.vs=!0},s.userActive=function(t){return void 0!==t?((t=!!t)!==this.ps&&(this.ps=t,t?(this.vs=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.vs=!1,this.W&&this.W.one("mousemove",(function(t){t.stopPropagation(),t.preventDefault()})),this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive"))),this):this.ps},s.wi=function(){var t,i,s,e,n=$s(this,this.reportUserActivity);this.on("mousedown",(function(){n(),this.clearInterval(t),t=this.setInterval(n,250)})),this.on("mousemove",(function(t){t.screenX===i&&t.screenY===s||(i=t.screenX,s=t.screenY,n())})),this.on("mouseup",(function(i){n(),this.clearInterval(t)})),this.on("keydown",n),this.on("keyup",n),this.setInterval((function(){if(this.vs){this.vs=!1,this.userActive(!0),this.clearTimeout(e);var t=this.o.inactivityTimeout;t>0&&(e=this.setTimeout((function(){this.vs||this.userActive(!1)}),t))}}),250)},s.playbackRate=function(t){return void 0!==t?(this.cs("setPlaybackRate",t),this):this.W&&this.W.featuresPlaybackRate?this.ts("playbackRate"):1},s.isAudio=function(t){return void 0!==t?(this.gs=!!t,this):!!this.gs},s.videoTracks=function(){return this.W?this.W.videoTracks():(this.ht=this.ht||new yr,this.ht)},s.audioTracks=function(){return this.W?this.W.audioTracks():(this.ot=this.ot||new kr,this.ot)},s.textTracks=function(){if(this.W)return this.W.textTracks()},s.remoteTextTracks=function(){if(this.W)return this.W.remoteTextTracks()},s.remoteTextTrackEls=function(){if(this.W)return this.W.remoteTextTrackEls()},s.addTextTrack=function(t,i,s){if(this.W)return this.W.addTextTrack(t,i,s)},s.addRemoteTextTrack=function(t,i){if(this.W)return this.W.addRemoteTextTrack(t,i)},s.removeRemoteTextTrack=function(t){var i=(void 0===t?{}:t).track,s=void 0===i?arguments[0]:i;if(this.W)return this.W.removeRemoteTextTrack(s)},s.getVideoPlaybackQuality=function(){return this.ts("getVideoPlaybackQuality")},s.videoWidth=function(){return this.W&&this.W.videoWidth&&this.W.videoWidth()||0},s.videoHeight=function(){return this.W&&this.W.videoHeight&&this.W.videoHeight()||0},s.language=function(t){return void 0===t?this.ys:(this.ys!==String(t).toLowerCase()&&(this.ys=String(t).toLowerCase(),void 0!==this.m&&this.trigger("languagechange")),this)},s.languages=function(){return Os(i.prototype.o.languages,this.pi)},s.toJSON=function(){var t=Os(this.o),i=t.tracks;t.tracks=[];for(var s=0;s<i.length;s++){var e=i[s];(e=Os(e)).player=void 0,t.tracks[s]=e}return t},s.createModal=function(t,i){var s=this;(i=i||{}).content=t||"";var e=new he(this,i);return this.addChild(e),e.on("dispose",(function(){s.removeChild(e)})),e.open()},i.getTagSettings=function(t){var i={sources:[],tracks:[]},s=Vi(t),e=s["data-setup"];if($i(t,"vjs-fluid")&&(s.fluid=!0),null!==e){var n=ie(e||"{}"),r=n[0],h=n[1];r&&yi.error(r),vi(s,h)}if(vi(i,s),t.hasChildNodes())for(var o=t.childNodes,a=0,u=o.length;a<u;a++){var c=o[a],l=c.nodeName.toLowerCase();"source"===l?i.sources.push(Vi(c)):"track"===l&&i.tracks.push(Vi(c))}return i},s.ki=function(){var t=l.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},i}(n);Gh.players={};var Xh=r.navigator;Gh.prototype.o={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:Xh&&(Xh.languages&&Xh.languages[0]||Xh.userLanguage||Xh.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreenOptions:{navigationUI:"hide"}},["ended","seeking","seekable","networkState","readyState"].forEach((function(t){Gh.prototype[t]=function(){return this.ts(t)}})),qh.forEach((function(t){Gh.prototype["handleTech"+Bs(t)+"_"]=function(){return this.trigger(t)}})),n.registerComponent("Player",Gh);var Qh,Jh,Yh=function(t){function i(s){var e;void 0===s&&(s={});var n=Os(s,{kind:ue[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(vs)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return k.defineProperty(r,"enabled",{get:function(){return h},set:function(t){"boolean"==typeof t&&t!==h&&(h=t,this.trigger("enabledchange"))}}),n.enabled&&(r.enabled=n.enabled),r.G=!0,r||Us(e)}return Ls(i,t),i}(fe),Kh=function(t){function i(s){var e;void 0===s&&(s={});var n=Os(s,{kind:ae[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(vs)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return k.defineProperty(r,"selected",{get:function(){return h},set:function(t){"boolean"==typeof t&&t!==h&&(h=t,this.trigger("selectedchange"))}}),n.selected&&(r.selected=n.selected),r||Us(e)}return Ls(i,t),i}(fe);function Zh(t,i,s){var e;if("string"==typeof t){if(0===t.indexOf("#")&&(t=t.slice(1)),Zh.getPlayers()[t])return i&&yi.warn('Player "'+t+'" is already initialised. Options will not be applied.'),s&&Zh.getPlayers()[t].ready(s),Zh.getPlayers()[t];e=function(t){return 0===t.indexOf("#")&&(t=t.slice(1)),l.getElementById(t)}(t)}else e=t;if(!e||!e.nodeName)throw new g("The element or ID supplied is not valid. (videojs)");if(e.player||Gh.players[e.playerId])return e.player||Gh.players[e.playerId];i=i||{},Zh.hooks("beforesetup").forEach((function(t){var s=t(e,Os(i));pi(s)&&!Array.isArray(s)?i=Os(i,s):yi.error("please return an object in beforesetup hooks")}));var r=new(n.getComponent("Player"))(e,i,s);return Zh.hooks("setup").forEach((function(t){return t(r)})),r}"undefined"==typeof HTMLVideoElement&&xi()&&(l.createElement("video"),l.createElement("audio"),l.createElement("track")),Zh.bs={},Zh.hooks=function(t,i){return Zh.bs[t]=Zh.bs[t]||[],i&&(Zh.bs[t]=Zh.bs[t].concat(i)),Zh.bs[t]},Zh.hook=function(t,i){Zh.hooks(t,i)},Zh.removeHook=function(t,i){var s=Zh.hooks(t).indexOf(i);return!(s<=-1)&&(Zh.bs[t]=Zh.bs[t].slice(),Zh.bs[t].splice(s,1),!0)},!0!==r.VIDEOJS_NO_DYNAMIC_STYLE&&xi()&&((Qh=Ji(".vjs-styles-defaults"))||(Qh=Fs("vjs-styles-defaults"),(Jh=Ji("head"))&&Jh.insertBefore(Qh,Jh.firstChild),Ns(Qh,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n "))),Ds(1,Zh),Zh.VERSION="5.20.6-opentelly.12",Zh.options=Gh.prototype.o,Zh.getPlayers=function(){return Gh.players},Zh.players=Gh.players,Zh.getComponent=n.getComponent,Zh.registerComponent=function(t,i){jr.isTech(i)&&yi.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),n.registerComponent.call(n,t,i)},Zh.getTech=jr.getTech,Zh.registerTech=jr.registerTech,Zh.browser=ks,Zh.TOUCH_ENABLED=ys,Zh.extend=function(t,i){void 0===i&&(i={});var s=function(){t.apply(this,arguments)},e={};for(var n in pi(i)?("function"==typeof i.init&&(yi.warn("Constructor logic via init() is deprecated; please use constructor() instead."),i.constructor=i.init),i.constructor!==k.prototype.constructor&&(s=i.constructor),e=i):"function"==typeof i&&(s=i),function(t,i){if("function"!=typeof i&&null!==i)throw new g("Super expression must either be null or a function, not "+typeof i);t.prototype=k.create(i&&i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i&&(t.ks=i)}(s,t),e)e.hasOwnProperty(n)&&(s.prototype[n]=e[n]);return s},Zh.mergeOptions=Os,Zh.bind=$s,Zh.plugin=function(t,i){Gh.prototype[t]=i},Zh.addLanguage=function(t,i){var s;return t=(""+t).toLowerCase(),Zh.options.languages=Os(Zh.options.languages,((s={})[t]=i,s)),Zh.options.languages[t]},Zh.log=yi,Zh.createTimeRange=Zh.createTimeRanges=Ws,Zh.formatTime=$r,Zh.parseUrl=de,Zh.isCrossOrigin=ve,Zh.EventTarget=Rs,Zh.on=Ts,Zh.one=As,Zh.off=Cs,Zh.trigger=Ps,Zh.xhr=hr,Zh.TextTrack=lr,Zh.AudioTrack=Yh,Zh.VideoTrack=Kh,Zh.isEl=Ti,Zh.isTextNode=qi,Zh.createEl=Pi,Zh.hasClass=$i,Zh.addClass=Bi,Zh.removeClass=Oi,Zh.toggleClass=Ri,Zh.setAttributes=Ui,Zh.getAttributes=Vi,Zh.emptyEl=Gi,Zh.appendContent=Xi,Zh.insertContent=Qi,Zh.computedStyle=Hr;var to=10,io=60;function so(t){return t.duration()===1/0}function eo(t){return t.scrubbing()?t.getCache().currentTime:t.currentTime()}function no(t){let i=oo(t);return so(t)?i.end(i.length-1):i.start(0)}function ro(t){return oo(t).start(0)}function ho(t){let i=oo(t);return i.end(i.length-1)-i.start(0)}function oo(t){let i=t.seekable();if(i&&i.length)return i;let s=t.duration();return s=isFinite(s)?s:0,new tt([0,s]).ws()}function ao(t,i){void 0===i&&(i=t);let s=t<0?"-":"";t=w.abs(t);let e=w.floor(t%60),n=w.floor(t/60%60),r=w.floor(t/3600);const h=w.floor(i/60%60),o=w.floor(i/3600);return(_(t)||t===1/0)&&(r=n=e="-"),r=r>0||o>0?r+":":"",n=((r||h>=10)&&n<10?"0"+n:n)+":",e=e<10?"0"+e:e,s+r+n+e}function uo(){let t=this,i=eo(t);t.toggleClass("theo-at-live",function(t,i){if(so(t)){let s=oo(t);return s.end(s.length-1)-i<to}return!1}(t,i)),t.toggleClass("theo-dvr",function(t){return so(t)&&ho(t)>=io}(t))}var co="theo-ad-playing",lo="theo-dai-ad-playing";function fo(t,i,s){t.toggleClass(co,i),t.toggleClass(lo,i&&s)}function vo(){this.userActive(!1)}var po,mo,go=class{constructor(t,i){this.type=t.type,this.target=i,this.playerEvent=t}};!function(t){t.js="unavailable",t.Ss="available",t._s="presenting"}(po||(po={})),function(t){t.LOADED="DAILoaded",t.AD_BREAK_STARTED="DAIAdBreakStarted",t.AD_BREAK_ENDED="DAIAdBreakEnded",t.AD_PERIOD_STARTED="DAIAdPeriodStarted",t.AD_PERIOD_ENDED="DAIAdPeriodEnded",t.AD_PROGRESS="DAIAdProgress",t.CUEPOINTS_CHANGED="DAICuePointsChanged",t.CLICK="DAIClick",t.ERROR="DAIError",t.STARTED="DAIStarted",t.FIRST_QUARTILE="DAIFirstQuartile",t.MIDPOINT="DAIMidpoint",t.STREAM_INITIALIZED="DAIStreamInitialized",t.THIRD_QUARTILE="DAIThirdQuartile",t.COMPLETE="DAIComplete"}(mo||(mo={}));var yo=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],bo=Zh.getTech("Tech"),ko=Zh.getTech("Html5"),wo=class extends bo{xs(){var t;for(const t of yo)this.Ts.addEventListener(t,this.Cs);this.Ts.addEventListener("error",this.Ps),this.Ts.addEventListener("contentprotectionerror",this.Ps),this.Ts.addEventListener("sourcechange",this.As),this.Ts.addEventListener("loadstart",this.Ms),null==(t=this.Ts.presentation)||t.addEventListener("presentationmodechange",this.Is),this.Ts.textTracks.addEventListener("addtrack",this.Es),this.Ts.textTracks.addEventListener("removetrack",this.Ds),this.Ts.textTracks.addEventListener("change",this.Fs),this.Ts.audioTracks.addEventListener("addtrack",this.Ns),this.Ts.audioTracks.addEventListener("removetrack",this.$s),this.Ts.audioTracks.addEventListener("change",this.Bs)}Os(){var t;for(const t of yo)this.Ts.removeEventListener(t,this.Cs);this.Ts.removeEventListener("error",this.Ps),this.Ts.removeEventListener("contentprotectionerror",this.Ps),this.Ts.removeEventListener("sourcechange",this.As),this.Ts.removeEventListener("loadstart",this.Ms),null==(t=this.Ts.presentation)||t.removeEventListener("presentationmodechange",this.Is),this.Ts.textTracks.removeEventListener("addtrack",this.Es),this.Ts.textTracks.removeEventListener("removetrack",this.Ds),this.Ts.textTracks.removeEventListener("change",this.Fs),this.Ts.audioTracks.removeEventListener("addtrack",this.Ns),this.Ts.audioTracks.removeEventListener("removetrack",this.$s),this.Ts.audioTracks.removeEventListener("change",this.Bs)}Rs(t){this.trigger(new go(t,this))}createEl(){let t=this.o,i=t.player;if(!i)throw new m(this.localize('Missing required tech option "player"'));let s=i.element;return Zh.setAttributes(s,{id:t.techId}),s}theoplayer(){return this.Ts}addTextTrack(t,i,s){return super.addTextTrack(t,i,s)}buffered(){return this.Ts.buffered}played(){return this.Ts.played}reset(){this.Ts.stop()}play(){this.Ts.play()}pause(){this.Ts.pause()}paused(){return this.Ts.paused}currentTime(){return this.Ts.currentTime}setCurrentTime(t){this.Ts.currentTime=t}duration(){return this.Ts.duration}volume(){return this.Ts.volume}setVolume(t){this.Ts.volume=t}muted(){return this.Ts.muted}setMuted(t){this.Ts.muted=t}src(t){if(void 0!==t)this.setSrc(t);else{if(this.Ts.src)return this.Ts.src;if(this.Ts.source){if(!T(this.Ts.source.ads))return this.Ts.source.ads[0].sources;if(function(t){if(t.sources)if(ft(t.sources)){for(const i of t.sources)if(!mt(i)&&"verizon-media"===i.integration)return!0}else if(!mt(t.sources))return"verizon-media"===t.sources.integration;return!1}(this.Ts.source))return"This source is managed by the Verizon Media integration extension.";if(function(t){if(t.sources)if(ft(t.sources)){for(const i of t.sources)if(Y(i))return!0}else if(vt(t.sources))return Y(t.sources);return!1}(this.Ts.source))return"This source is managed by the DAI integration extension."}}}setSrc(t){return this.setSource({src:t})}setSource(t){this.ft=null,this.trigger("error")}currentSrc(){return this.Ts.src}load(){this.setPreload("auto")}preload(){return this.Ts.preload}setPreload(t){this.Ts.preload=t}autoplay(){return this.Ts.autoplay}setAutoplay(t){this.Ts.autoplay=!!t}seeking(){return this.Ts.seeking}seekable(){return this.Ts.seekable}ended(){return this.Ts.ended}playbackRate(){return this.Ts.playbackRate}setPlaybackRate(t){this.Ts.playbackRate=t}readyState(){return this.Ts.readyState}networkState(){return 0}controls(){return!1}videoHeight(){return this.Ts.videoHeight}videoWidth(){return this.Ts.videoWidth}supportsFullScreen(){return this.Ts.presentation.supportsMode(et.FULLSCREEN)}enterFullScreen(){this.Ts.presentation.requestMode(et.FULLSCREEN)}exitFullScreen(){this.Ts.presentation.requestMode(et.INLINE)}Us(){let t=this.Ts.ads;if(t&&t.playing)return!0;let i=this.Ts.vr;return!(!i||i.state===po.js)}initTextTrackListeners(){return this.on("touchend",(t=>{this.Us()&&(t.preventDefault=()=>{})})),super.initTextTrackListeners()}ti(){if(!this.src())return;const t=this.readyState();if(0===t){let t=!1,i=()=>{t=!0};this.on("loadstart",i);let s=()=>{t||this.trigger("loadstart")};return this.on("loadedmetadata",s),void this.ready((()=>{this.off("loadstart",i),this.off("loadedmetadata",s),t||this.trigger("loadstart")}))}let i=["loadstart"];i.push("loadedmetadata"),t>=2&&i.push("loadeddata"),t>=3&&i.push("canplay"),t>=4&&i.push("canplaythrough"),this.ready((()=>{for(const t of i)this.trigger(t)}))}dispose(){this.Os(),this.Ts=null,super.dispose()}static isSupported(){return!0}static canPlayType(){return"maybe"}static canPlaySource(t){return"maybe"}get featuresVolumeControl(){return Ot}constructor(t={},i){super(t,i),this.Cs=t=>this.Rs(t),this.Vs=!1,this.As=()=>{this.Rs(new K(this.Ts.currentTime,this.Ts.readyState)),this.Rs(new St)},this.Ms=()=>{this.Rs(new Q(this.Ts.currentTime))},this.Es=t=>{this.textTracks().it(t.track)},this.Ns=t=>{this.audioTracks().it(t.track)},this.Ds=t=>{this.textTracks().st(t.track)},this.$s=t=>{this.audioTracks().st(t.track)},this.Fs=()=>{let t=this.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Bs=()=>{let t=this.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Is=()=>{if(!this.supportsFullScreen())return;let t=this.Vs,i=this.Ts.presentation.currentMode===et.FULLSCREEN;t!==i&&(this.Vs=i,this.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))},this.Ps=()=>{const t=this.Ts.errorObject,i=t&&L(t.code)||-1,s=t&&t.message||"An unknown error occurred.";this.error({code:i,message:this.localize(s)})},this.Ts=this.o.player,this.xs();const s=!this.paused();s&&this.pause(),t.preload&&this.setPreload(t.preload),t.autoplay&&this.setAutoplay(t.autoplay),t.muted&&this.setMuted(t.muted),t.source?this.setSrc(t.source):this.ti(),s&&this.ready((()=>this.play())),this.triggerReady()}};function jo(t){return class extends t{get Ts(){return this.Ls||(this.Ls=this.player().tech({IWillNotUseThisInPlugins:!0}).theoplayer()),this.Ls}dispose(){this.Ls=void 0,super.dispose()}constructor(...t){super(...t),this.Ls=void 0}}}wo.prototype.featuresFullscreenResize=ko.prototype.featuresFullscreenResize,wo.prototype.featuresPlaybackRate=ko.prototype.featuresPlaybackRate,wo.prototype.featuresProgressEvents=!0,wo.prototype.featuresTimeupdateEvents=!0,wo.prototype.featuresNativeTextTracks=!0,Zh.registerTech("THEOplayer",wo);var So=class{constructor(t){this.Hs=t=>{Tt(this.zs,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.Ws=t=>{Pt(this.zs,"theo-mobile-button-hover")},this.qs=t=>{this.zs.blur()},this.zs=t,t.addEventListener("touchstart",this.Hs),t.addEventListener("touchend",this.Ws),t.addEventListener("focusin",this.qs)}},_o=Zh.getComponent("Menu"),xo=class extends(jo(_o)){get Gs(){return this.player().el()}Xs(){Tt(this.Gs,"theo-menu-opened")}Qs(){Pt(this.Gs,"theo-menu-opened")}constructor(t,i){super(t,i)}},To=Zh.getComponent("MenuItem"),Co=class extends(jo(To)){get parentMenu(){return this.Js}buildCSSClass(){return"theo-menu-item vjs-menu-item"}createEl(){let t=super.createEl("li",{className:this.buildCSSClass(),tabIndex:0},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){this.Ys||(this.parentMenu.Ks(this),"tap"!==t.type&&"keydown"!==t.type||(this.Ys=!0,this.trigger("click"),this.Ys=!1))}dispose(){ht.te.Zs&&(this.el().removeEventListener("touchstart",this.Hs),this.el().removeEventListener("touchend",this.Ws)),super.dispose()}constructor(t,i,s){super(t,Ut({selectable:!0},i)),this.Ys=!1,this.Hs=t=>{Tt(this.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},this.Ws=t=>{Pt(this.el(),"theo-mobile-menu-item-hover")},this.Js=s,ht.te.Zs&&(this.el().addEventListener("touchstart",this.Hs),this.el().addEventListener("touchend",this.Ws))}},Po=Zh.getComponent("ClickableComponent"),Ao=class extends Po{get parentMenu(){return this.Js}get ie(){return this.se}set ie(t){this.se=t,this.el().setAttribute("tabindex",this.ie?"0":"-1"),this.ee()}buildCSSClass(){return"theo-primary-background theo-menu-header"}createEl(){let t=super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){!this.Ys&&this.ie&&(this.Js.ne(),"tap"===t.type&&(this.Ys=!0,this.trigger("click"),this.Ys=!1))}ee(){this.ie?this.el().setAttribute("aria-label",this.localize("Go back to the previous menu")):this.el().setAttribute("aria-label","")}constructor(t,i,s){super(t,i),this.Ys=!1,this.se=!1,this.Js=s,this.on(t,"languagechange",this.ee)}},Mo=class extends xo{get menuHeader(){return this.re}get menuItems(){return this.children()}addMenuItem(t){t=Ut({playerOptions:this.o.playerOptions},t);let i=new Co(this.player(),t,this);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}addSubMenuItem(t){t=Ut({playerOptions:this.o.playerOptions},t);let i=this.he(this.player(),t);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}removeMenuItem(t){this.removeChild(t),this.trigger("menuchange")}buildCSSClass(){return"theo-menu vjs-menu"}Xs(){super.Xs(),s.removeEventListener("resize",this.oe),s.addEventListener("resize",this.oe),this.show()}ae(){let t=this.ue();if(!t)return;let i=t.getClientRects();ht.te.Zs?this.ce(t,i):this.le(t,i)}ue(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0}le(t,i){}ce(t,i){}Qs(){s.removeEventListener("resize",this.oe),super.Qs(),this.hide(),ht.te.Zs&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=this.contentEl();Tt(i,"theo-menu-content");let s=new Ao(this.player(),this.o,this);return i.parentNode.insertBefore(s.el(),i),this.re=s,t}Ks(t){}show(){return this.ae(),super.show()}dispose(){this.re&&this.re.dispose(),super.dispose()}constructor(t,i){super(t,i),this.oe=()=>this.ae(),this.fe=this.player().el(),this.hide(),this.on("menuchange",this.ae)}},Io=class extends Mo{get de(){return this.ve}set de(t){this.ve&&this.ve.pe(this),this.ve=t,t&&t.me(this)}ge(t){this.de.ye(t,"replace")}be(t){t.de.ye(this,"restore")}ke(){Pt(this.we,"vjs-hidden"),this.we.style.opacity="1",super.show()}je(){Tt(this.we,"vjs-hidden")}Xs(){this.de&&this.de.Xs(),super.Xs()}Qs(){this.de&&this.de.Qs(),super.Qs(),Tt(this.we,"vjs-hidden")}ue(){if(this.de&&this.de.Se)return this.de.Se.we}le(t,i){if(i.length>0){let t=i[0].height,s=i[0].width;this.ve._e.style.height=t+"px",this.ve._e.style.width=s+"px"}super.le(t,i)}constructor(t,i){super(t,i)}},Eo=class{get _e(){return this.zs}get Se(){return this.xe}me(t){t.je(),this.zs.appendChild(t.we)}pe(t){this.zs.removeChild(t.we)}ye(t,i){if(t==this.xe)return;let s=this.xe;if(this.xe=t,this.xe.ke(),this.Se.focus(),ht.te.Zs)s.je();else{const t="translateX(100%)",e="translateX(-100%)",n=dt("transform");s.we.style.opacity="0",s.we.style[n]="replace"===i?e:t,this.xe.we.style.opacity="1",this.xe.we.style[n]="",c((()=>{s.je(),s.we.style[n]=""}),300)}}Xs(){this.Te(),this.xe.ke(),this.Ce()}Qs(){this.Te(),this.xe.je(),this.Pe.je(),this.xe=this.Pe,this.Ce()}Ce(){ut((()=>{Pt(this.zs,"theo-no-transition"),Pt(this.xe.we,"theo-no-transition")}))}Te(){Tt(this.zs,"theo-no-transition"),Tt(this.xe.we,"theo-no-transition")}constructor(t){this.Pe=this.xe=t,this.zs=u.createElement("div"),this.zs.className="theo-tertiary-background theo-menu-animation-container",this.zs.appendChild(this.Pe.we),this.fe=this.xe.player().el()}},Do=class extends Io{get we(){return this.el()}get parentMenu(){return this.Ae}he(t,i){let s=new Fo(t,i,this);return s.subMenu.de=this.de,s}ne(){this.Me()}Ks(t){super.Ks(t),this.Me()}Me(){this.parentMenu.be(this)}buildCSSClass(){return"theo-submenu "+(this.Ie?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+super.buildCSSClass()}addSubMenuItem(t){this.Ie=!0;let i=super.addSubMenuItem(t);return this.removeClass("theo-leaf-submenu"),i}constructor(t,i,s){super(t,i),this.Ie=!1,this.Ae=s,this.menuHeader.ie=!0}},Fo=class extends Co{get subMenu(){return this.Ee}handleClick(t){this.parentMenu.ge(this.subMenu)}constructor(t,i,s){super(t,Ut({selectable:!1},i),s),this.Ee=new Do(t,i,s)}},No=class extends Io{get menuButton(){return this.De}createEl(){let t=Zh.createEl("div",{className:this.buildCSSClass()});return this.Fe=super.createEl(),this.Fe.className=super.buildCSSClass(),Tt(this.Fe,"theo-menu-content-animatable"),t.appendChild(this.Fe),this.de=new Eo(this),t.appendChild(this.de._e),t}buildCSSClass(){return"theo-menu-animatable "+super.buildCSSClass()}he(t,i){let s=new Fo(t,i,this);return s.subMenu.de=this.de,s}le(t,i){super.le(t,i);let s=this.fe.getClientRects(),e=s.length>0?s[0]:void 0,n=S(getComputedStyle(this.el()).fontSize);Rt(this.el(),this.De.el(),e,n)}get we(){return this.Fe}ne(){this.De.closeMenu()}dispose(){this.Ne||(this.Ne=!0,super.dispose())}constructor(t,i,s){super(t,i),this.Ne=!1,this.De=s}},$o=class{set $e(t){this.Be.innerHTML=this.Oe.localize(t),this.Re(),this.Ue(),Et(this.Oe.el())}get $e(){return this.Be.textContent||""}Ve(){this.Oe.off("mouseover",this.Ue),this.Oe.off("mouseout",this.Re),this.Oe.off("dispose",this.Le),jt(this.Be)}constructor(t,i){this.Ue=()=>{Pt(this.Be,"vjs-hidden");let t=this.Oe.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,s=S(getComputedStyle(this.Be).fontSize);Rt(this.Be,this.Oe.el(),i,s)},this.Re=()=>{Tt(this.Be,"vjs-hidden")},this.Le=()=>this.Ve(),this.Oe=t,Et(t.el()),Ft(t.el()),this.Be=u.createElement("span"),this.Be.innerHTML=this.Oe.localize(i),this.Be.className="theo-button-tooltip vjs-hidden",this.Be.setAttribute("aria-hidden","true"),this.Oe.el().appendChild(this.Be),this.Oe.on("mouseover",this.Ue),this.Oe.on("mouseout",this.Re),this.Oe.on("dispose",this.Le)}},Bo=Zh.getComponent("Button"),Oo=class extends(jo(Bo)){get He(){const t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}get menu(){return this.ze}isMenuOpen(){return this.We}openMenu(){this.qe&&!this.We&&(this.ze.Xs(),this.el().setAttribute("aria-expanded","true"),this.We=!0,this.ze.focus())}closeMenu(){this.qe&&this.We&&(this.ze.Qs(),this.el().setAttribute("aria-expanded","false"),this.We=!1)}set minimumMenuItems(t){this.Ge=t,this.Xe()}buildCSSClass(){return"theo-controlbar-button vjs-menu-button vjs-menu-button-popup "+super.buildCSSClass()}createEl(t,i,s){return super.createEl("button",{},{"aria-live":"off"})}handleClick(){this.We?this.closeMenu():this.openMenu()}enable(){return this.qe=!0,super.enable()}disable(){return this.closeMenu(),this.qe=!1,super.disable()}ee(){this.Be.$e=this.controlText()}dispose(){this.player().removeChild(this.ze),this.ze.dispose(),this.Be.Ve(),this.Ts.removeEventListener("seeking",this.Qe),super.dispose()}constructor(t,i){super(t,i),this.We=!1,this.Ge=1,this.qe=!0,this.Je=t=>{let i=this.el().contains(t.target),s=this.ze.el().contains(t.target),e=!1;var n;ht.te.Zs&&this.He&&(e=(null==(n=this.el().parentElement)?void 0:n.querySelector(".theo-mobile-menu-background"))===t.target);i||s||!this.We||(e&&t.preventDefault(),this.closeMenu())},this.Ye=t=>{27===t.which&&(this.closeMenu(),this.focus())},this.Qe=()=>{this.We&&this.closeMenu()},this.Xe=()=>{this.ze.menuItems.length>=this.Ge?this.show():(this.closeMenu(),this.hide())},this.ze=new No(t,i,this),this.player().getChild("controlBarMenuContainer").addChild(this.ze),this.Be=new $o(this,this.controlText()),this.el().setAttribute("aria-haspopup","true"),ht.te.Ke?(this.on(u,"touchend",this.Je),new So(this.el())):(this.on(u,"click",this.Je),this.on(u,"keydown",this.Ye),bt&&this.on(u,bt.Ze,this.closeMenu)),this.Ts.addEventListener("seeking",this.Qe),this.on(this.ze,"menuchange",this.Xe),this.on(t,"languagechange",this.ee),this.Xe()}},Ro=Zh.getComponent("Component"),Uo=class extends(Zh.getComponent("ControlBar")){addMenuButton(t){t=Ut({playerOptions:this.o.playerOptions},t);let i=new Oo(this.player(),t);return this.addChild(i),i}removeMenuButton(t){this.removeChild(t)}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-secondary-color vjs-control-bar "+super.buildCSSClass()}constructor(t,i){super(t,i),this.addChild("THEOControlBarShadow",void 0,0)}};Zh.registerComponent("THEOControlBarShadow",class extends Ro{createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-tertiary-color theo-control-bar-shadow"}});var Vo=Zh.getComponent("VolumeBar"),Lo=class extends Vo{handleFocus(t){super.handleFocus(t),this.tn.addClass("focus-within")}handleBlur(t){super.handleBlur(t),this.tn.removeClass("focus-within")}constructor(t,i){super(t,i),this.tn=i.sn}},Ho=Zh.getComponent("VolumeControl"),zo=class extends Ho{constructor(t,i){super(t,i),this.nn=new Lo(t,{sn:this}),this.addChild(this.nn)}};zo.prototype.o=Ut({},Ho.prototype.o,{children:[]}),Zh.registerComponent("VolumeControl",zo);var Wo=class extends(jo(Uo)){rn(){return this.el().getBoundingClientRect().height}dispose(){this.el().removeEventListener("transitionstart",this.hn),this.el().removeEventListener("transitionend",this.an),this.cn.un(ot.ln,this.fn),this.cn.dn(),super.dispose()}constructor(t,i){super(t,i),this.hn=t=>{if("opacity"===t.propertyName){const t=this.rn();this.Ts.textTrackStyle.marginBottom!==t&&(this.Ts.textTrackStyle.marginBottom=t)}},this.an=t=>{"opacity"===t.propertyName&&"0"===s.getComputedStyle(this.el()).opacity&&(this.Ts.textTrackStyle.marginBottom=void 0)},this.fn=()=>{void 0!==this.Ts.textTrackStyle.marginBottom&&(this.Ts.textTrackStyle.marginBottom=this.rn())},this.el().addEventListener("transitionstart",this.hn),this.el().addEventListener("transitionend",this.an),this.cn=new pt(this.el()),this.cn.vn(ot.ln,this.fn),this.cn.pn(!0)}};Wo.prototype.o=Ut({},Uo.prototype.o,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),Zh.registerComponent("ControlBar",Wo);var qo=class extends Uo{buildCSSClass(){return"theo-top-controlbar "+super.buildCSSClass()}constructor(t,i){super(t,i),t.topControlBar=this}};qo.prototype.o=Ut({},Uo.prototype.o,{children:[]}),Zh.registerComponent("TopControlBar",qo);var Go=Zh.getComponent("CurrentTimeDisplay");Zh.registerComponent("CurrentTimeDisplay",class extends Go{updateContent(){let t=this.player(),i=eo(t),s=ro(t),e=this.localize("Current Time"),n=ao(w.max(0,i-s),ho(t));n!==this.At&&(this.At=n,this.contentEl().innerHTML='<span class="vjs-control-text">'+e+"</span> "+n)}constructor(t,i){super(t,i),this.on(t,"timeupdate",this.updateContent),this.on(t,"emptied",this.updateContent)}});var Xo=Zh.getComponent("DurationDisplay"),Qo=class extends(jo(Xo)){updateContent(){const t=_(this.Ts.duration)?NaN:ho(this.player()),i=this.Ts.clip.endTime-this.Ts.clip.startTime,s=w.min(t,i)||0;if(this.lt!==s){this.lt=s;const t=this.localize("Duration Time"),i=ao(s);this.T.innerHTML='<span class="vjs-control-text">'+t+"</span> "+i}}constructor(t,i){super(t,i),this.mn=()=>this.updateContent(),this.off(t,"durationchange",this.updateContent),this.on(t,"durationchange",this.updateContent),this.off(t,"timeupdate",this.updateContent),this.on(t,"timeupdate",this.updateContent),this.off(t,"emptied",this.updateContent),this.on(t,"emptied",this.updateContent),this.Ts&&this.Ts.clip.addEventListener("change",this.mn)}};Zh.registerComponent("DurationDisplay",Qo);var Jo=Zh.getComponent("Button"),Yo=class extends(jo(Jo)){buildCSSClass(){return"theo-live-control "+super.buildCSSClass()}createEl(){let t=super.createEl("button",{},{"aria-live":"off"});return this.gn=Zh.createEl("span",{className:"theo-live-control-indicator"}),t.insertBefore(this.gn,t.firstChild),t}createControlTextEl(t){let i=super.createControlTextEl(t);return Zh.removeClass(i,"vjs-control-text"),Zh.addClass(i,"theo-live-control-text"),i}handleClick(){var t;const i=this.Ts;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{const t=this.player();t.currentTime(no(t)),t.play()}}yn(){so(this.player())?this.show():this.hide()}constructor(t,i){super(t,i),this.controlText("Live"),this.yn(),this.on(this.player(),"durationchange",this.yn),ht.te.Ke&&new So(this.el())}};Zh.registerComponent("LiveDisplay",Yo);var Ko=Zh.getComponent("LoadingSpinner");Zh.registerComponent("LoadingSpinner",class extends Ko{buildCSSClass(){return"theo-secondary-color vjs-loading-spinner "+super.buildCSSClass()}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=Zh.createEl("div",{className:"theo-loading-spinner-rotator"}),s=Zh.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=Zh.createEl("div",{className:"theo-loading-spinner-circle-right"});return i.appendChild(s),i.appendChild(e),t.appendChild(i),t}constructor(t,i){super(t,i)}});var Zo=Zh.getComponent("LoadProgressBar");function ta(t,i){let s=t/i||0;return 100*(s>=1?1:s)+"%"}Zh.registerComponent("LoadProgressBar",class extends Zo{update(){let t=this.player(),i=tt.bn(oo(t)),s=i.kn(0),e=tt.bn(t.buffered()).wn(i),n=i.jn(0)-s,r=e.L&&e.jn(e.L-1)||0;r=w.max(0,r-s);let h=this.el(),o=this.Sn;h.style.width=ta(r,n);for(let t=0;t<e.L;t++){let i=e.kn(t),n=e.jn(t),a=o[t];a||(a=u.createElement("div"),o.push(a),h.appendChild(a)),a.style.left=ta(i-s,r),a.style.width=ta(n-i,r)}for(let t=o.length;t>e.L;t--)h.removeChild(o[t-1]);o.length=e.L}constructor(t,i){super(t,i),this.Sn=[],this.on(t,"emptied",this.update)}});var ia=Zh.getComponent("MouseTimeDisplay"),sa=class extends(jo(ia)){handleMouseMove(t){let i=this.player(),s=ro(i)+this.calculateDistance(t)*ho(i),e=t.pageX-Bt(this.el().parentNode).left;this.update(s,e+"px")}handleTouchMove(t){let i=this.player(),s=ro(i)+this.calculateDistance(t)*ho(i),e=t.touches[0].pageX-Bt(this.el().parentNode).left;this.update(s,e+"px")}createEl(){let t=super.createEl();return this._n=Zh.createEl("span",{className:"theo-time-tooltip-text"}),t}update(t,i){let s=this.xn(t);if(this.el().style.left=i,this.el().setAttribute("data-current-time",s),this.keepTooltipsInside&&(Vt(this._n,s),this.tooltip.offsetParent)){let t=this.player().contentEl(),i=t.getClientRects(),s=i.length>0?i[0]:void 0,e=S(getComputedStyle(t).fontSize);Rt(this.tooltip,this.el(),s,e)}}xn(t){let i=this.player();const s=t-no(i);return ao(so(i)?w.min(s,0):s,ho(i))}constructor(t,i){var s;(super(t,i),this.Tn=()=>{let t=this.player(),i=t.scrubbing()?t.getCache().currentTime:t.currentTime(),s=(i-ro(t))/ho(t)||0;s=kt(s,0,1),this.update(i,100*s+"%")},this.keepTooltipsInside&&(Zh.addClass(this.tooltip,"theo-secondary-color"),this.tooltip.appendChild(this._n)),at.Zs)&&(this.on(t,"firstplay",this.Tn),this.on(t,"play",this.Tn),this.on(t,"seeking",this.Tn),this.on(t,"seeked",this.Tn),this.on(t,"timeupdate",this.Tn),this.Ts.addEventListener("dimensionchange",this.Tn),null==(s=this.Ts.presentation)||s.addEventListener("presentationmodechange",this.Tn),t.on("ready",(()=>{this.on(t.controlBar.progressControl,"touchmove",yt((t=>this.handleTouchMove(t)),25)),this.Tn()})))}};Zh.registerComponent("MouseTimeDisplay",sa);var ea=Zh.getComponent("PlayProgressBar");Zh.registerComponent("PlayProgressBar",class extends ea{updateDataAttr(){let t=eo(this.player());this.el().setAttribute("data-current-time",this.xn(t))}xn(t){let i=this.player();return ao(t-no(i),ho(i))}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-play-progress vjs-slider-bar "+super.buildCSSClass()}constructor(t,i){super(t,i)}});var na=Zh.getComponent("RemainingTimeDisplay");Zh.registerComponent("RemainingTimeDisplay",class extends na{updateContent(){const t=this.player(),i=ho(t);if(i){const s=oo(t).end(0),e=this.localize("Remaining Time"),n=ao(w.max(0,s-t.currentTime()),i);n!==this.At&&(this.At=n,this.contentEl().innerHTML='<span class="vjs-control-text">'+e+"</span> -"+n)}}constructor(t,i){super(t,i),this.on(t,"timeupdate",this.updateContent),this.on(t,"emptied",this.updateContent)}});var ra=class{get Ts(){return this.Ls||(this.Ls=this.Cn.tech({IWillNotUseThisInPlugins:!0}).theoplayer()),this.Ls}Pn(t){if(t.kind!==W.An)return;if(0===this.Ts.seekable.length)return;this.Mn=t;const i=t.cues.slice();this.En.In(i);for(let t=0;t<i.length;t++){let s=i[t],e=i[t+1],n=!e||s.endTime!==e.startTime,r=new ha(s,this.Ts,n);this.Dn.push(r),this.Fn.appendChild(r._e)}}Nn(){this.Ts.addEventListener("loadedmetadata",this.$n),this.Ts.addEventListener("loadeddata",this.$n),this.Ts.addEventListener("sourcechange",this.$n),this.Ts.textTracks.addEventListener("addtrack",this.Bn),this.Ts.textTracks.addEventListener("removetrack",this.On),this.Ts.textTracks.addEventListener("change",this.$n)}Rn(){this.Ts.removeEventListener("loadedmetadata",this.$n),this.Ts.removeEventListener("loadeddata",this.$n),this.Ts.removeEventListener("sourcechange",this.$n),this.Ts.textTracks.removeEventListener("addtrack",this.Bn),this.Ts.textTracks.removeEventListener("removetrack",this.On),this.Ts.textTracks.removeEventListener("change",this.$n)}Un(){if(!(this.Ts.readyState<X.Vn))for(let t of this.Ts.textTracks)if(t.kind===W.An&&t.mode===z.Ln&&t.cues.length>0&&t.readyState!==H.ERROR)return t}Hn(t){this.En.zn(t)}Wn(){this.En.ke()}qn(){this.En.je()}Gn(){for(let t of this.Dn)t.Ve();this.En.Gn(),this.Dn=[],this.Mn=void 0}Ve(){this.Rn(),this.Xn.removeEventListener("mousemove",this.Qn),this.Xn.removeEventListener("mouseenter",this.Jn),this.Xn.removeEventListener("mouseleave",this.Yn),this.Gn(),this.En.Ve(),this.Ls=void 0}constructor(t,i){this.Cn=i,this.Dn=[],this.Ls=void 0,this.Bn=t=>{let i=t.track;i.kind===W.An&&(i.addEventListener("addcue",this.$n),i.addEventListener("removecue",this.$n),i.addEventListener("readystatechange",this.$n)),this.$n()},this.On=t=>{let i=t.track;i.kind===W.An&&(i.removeEventListener("addcue",this.$n),i.removeEventListener("removecue",this.$n),i.removeEventListener("readystatechange",this.$n)),this.$n()},this.Qn=t=>{let i=this.Cn,s=function(t,i){let s,e,n=Bt(t),r=t.offsetWidth,h=t.offsetHeight,o=n.top,a=n.left;!function(t){return void 0!==t.changedTouches}(i)?(e=i.pageX,s=i.pageY):(e=i.changedTouches[0].pageX,s=i.changedTouches[0].pageY);let u=kt((o-s+h)/h,0,1),c=kt((e-a)/r,0,1);return{x:c,y:u}}(this.Fn,t),e=ro(i)+s.x*ho(i);e===i.duration()&&(e-=.1),this.Hn(e)},this.Yn=()=>{this.En.je()},this.Jn=()=>{this.En.ke()},this.$n=()=>{let t=this.Un();t!==this.Mn&&(this.Gn(),t&&this.Pn(t))},this.Xn=t,this.En=new oa,this.Cn.contentEl().appendChild(this.En._e),this.Fn=u.createElement("div"),Tt(this.Fn,"theoplayer-chapterbar"),this.Xn.appendChild(this.Fn),this.Xn.addEventListener("mousemove",this.Qn),this.Xn.addEventListener("mouseenter",this.Jn),this.Xn.addEventListener("mouseleave",this.Yn),this.Nn()}},ha=class{get _e(){return this.zs}Kn(){aa(this.Zn,this.h.currentTime)&&this.tr(),this.Zn.addEventListener("enter",this.tr),this.Zn.addEventListener("exit",this.ir)}sr(){let t=this.h.seekable.start(0),i=this.h.seekable.end(this.h.seekable.length-1)-t,s=this.Zn.startTime,e=this.Zn.endTime-s,n=u.createElement("div");Tt(n,"theoplayer-chapter-indicator");let r=u.createElement("div");Tt(r,"theoplayer-chapter-indicator-highlight"),n.appendChild(r),this.er&&Tt(n,"theoplayer-chapter-indicator-discontinuous");let h=w.min(s/i*100,100),o=100-h,a=w.min(e/i*100,o);return n.style.width=a+"%",n.style.left=h+"%",n}Ve(){this.Zn.removeEventListener("enter",this.tr),this.Zn.removeEventListener("exit",this.ir),jt(this.zs)}constructor(t,i,s){this.Zn=t,this.h=i,this.er=s,this.tr=()=>{Tt(this._e,"theoplayer-chapter-indicator-active")},this.ir=()=>{Pt(this._e,"theoplayer-chapter-indicator-active")},this.zs=this.sr(),this.Kn()}},oa=class{je(){this.nr--,0===this.nr&&Pt(this._e,"theoplayer-chapter-hovering")}In(t){this.rr=t||[],this.rr.length>0&&(this._e.style.display="")}hr(t){Vt(this.ar,t.content)}Gn(){this.rr=[],Vt(this.ar,""),this._e.style.display="none"}ke(){this.nr++,this.nr>0&&Tt(this._e,"theoplayer-chapter-hovering")}zn(t){for(let i of this.rr)if(aa(i,t)){this.hr(i);break}}Ve(){jt(this._e)}constructor(){this.rr=[],this.nr=0,this._e=u.createElement("div"),Tt(this._e,"theoplayer-chaptertitle"),this._e.style.display="none",this.ar=u.createElement("p"),this._e.appendChild(this.ar)}};function aa(t,i){return new tt([t.startTime,t.endTime]).ur(i)}var ua=Zh.getComponent("SeekBar"),ca=class extends(jo(ua)){updateAriaAttributes(t){let i=this.player(),s=eo(i);t.setAttribute("aria-valuenow",(100*this.cr(s)).toFixed(2)),t.setAttribute("aria-valuetext",ao(s-no(i),ho(i)))}getPercent(){return this.cr(this.player().currentTime())}handleMouseMove(t){if(this.Ts&&this.Ts.ads&&this.Ts.ads.playing)return;let i=this.player(),s=ro(i)+this.calculateDistance(t)*ho(i);s>=i.duration()&&(s=i.duration()-.1),this.Fn.Hn(s),i.currentTime(s)}handleMouseDown(t){this.playingStates.push(!this.player().paused()),this.Fn.Wn(),super.handleMouseDown(t)}handleMouseUp(t){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.Fn.qn(),super.handleMouseUp(t)}cr(t){let i=this.player(),s=(t-ro(i))/ho(i);return kt(s,0,1)}dispose(){this.Fn.Ve(),ti(this.playingStates)}constructor(t,i){super(t,i),this.playingStates=[],this.on(t,"emptied",this.update),this.on(t,"seeking",this.update),this.Fn=new ra(this.el(),t)}};Zh.registerComponent("SeekBar",ca);var la=Zh.getComponent("ProgressControl");ht.te.Zs&&Zh.registerComponent("ProgressControl",class extends la{createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(t){this.seekBar.handleMouseMove(t)}handleMouseDown(t){this.seekBar.handleMouseDown(t)}constructor(t,i){super(t,i),this.on(this,"touchmove",this.handleMouseMove),this.on("touchstart",this.handleMouseDown),this.seekBar.off(["touchmove","touchstart"])}});var fa=Zh.getComponent("TooltipProgressBar");function da(t){for(const i of t)if(i.enabled)return i}function va(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:pa(t),description:ma(t),hd:!!t.height&&t.height>=720}}function pa(t){return t.height?t.height+"p":t.bandwidth?ma(t):""}function ma(t){return t.bandwidth?t.bandwidth>1e7?(t.bandwidth/1e6).toFixed(0)+"Mbps":t.bandwidth>1e6?(t.bandwidth/1e6).toFixed(1)+"Mbps":(t.bandwidth/1e3).toFixed(0)+"kbps":""}Zh.registerComponent("TooltipProgressBar",class extends fa{updateDataAttr(){let t=eo(this.player()),i=this.xn(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i}xn(t){let i=this.player();return ao(t-no(i),ho(i))}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-tooltip-progress-bar vjs-slider-bar "+super.buildCSSClass()}constructor(t,i){super(t,i)}});var ga=class{get lr(){return this.dr}set lr(t){let i=this.dr;for(let s=i.length-1;s>=0;s--){let e=i[s];Kt(t,e)||this.pr(e)}for(let i of t)this.mr(i);this.gr.ae()}get yr(){return this.gr.menuItems}br(t){let i=this.yr;if(i)for(let s of i)if(s.kr===t)return s}wr(t){let i=this.gr.addMenuItem();return i.kr=t,i.on("click",(()=>this.jr(i))),i.el().setAttribute("role","menuitemradio"),i}Sr(t){t.dispose()}_r(t){return!0}mr(t){if(this._r(t)){Kt(this.dr,t)||this.dr.push(t);let i=this.br(t)||this.wr(t);return this.Tr(i),i}this.pr(t)}pr(t){let i=this.br(t);i&&(this.gr.removeMenuItem(i),this.Sr(i)),Jt(this.dr,t)}Ve(){const t=[];for(let i of this.dr)t.push(i);for(let i of t)this.pr(i);ti(t)}constructor(t){this.dr=[],this.gr=t}},ya=class extends ga{Cr(){return this.Pr=u.createElement("span"),this.Pr.className="theo-settings-control-menu-item-title",Vt(this.Pr,this.Ar.localize("Quality")),this.Pr}Mr(){return this.Ir=u.createElement("span"),this.Ir.className="theo-settings-control-menu-quality-automatic",Vt(this.Ir,this.Ar.localize("Automatic")),this.Ir}Er(){return this.Dr=u.createElement("span"),Vt(this.Dr,this.Ar.localize("Automatic")),this.Dr}Fr(){return this.Nr=u.createElement("span"),this.Nr.className="theo-primary-color theo-settings-control-menu-item-hd-label",Vt(this.Nr,this.Ar.localize("HD")),this.Nr}$r(){let t=u.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.Ir),t.appendChild(u.createTextNode(" ")),t.appendChild(this.Dr),t.appendChild(u.createTextNode(" ")),t.appendChild(this.Nr),this.Br.el().appendChild(this.Pr),this.Br.el().appendChild(t),this.Br.el().setAttribute("aria-label",this.Ar.localize("Open the video quality settings menu"))}Or(){let t=this.Rr,i=t&&xa(t.targetQuality),s=t&&t.activeQuality,e=va(this.Ur(i||s))||{name:this.Ar.localize("Automatic")};Vt(this.Dr,e.name),Mt(this.Ir,"vjs-hidden",!!i),Mt(this.Nr,"vjs-hidden",!e.hd)}Tr(t){let i=va(t.kr)||{name:this.Ar.localize("Automatic")},s=i.name;i.hd&&(s+='<span class="theo-primary-color theo-settings-control-menu-item-hd-label">'+this.Ar.localize("HD")+"</span>"),i.description&&(s+='<span class="theo-settings-control-submenu-item-alternate-value">'+i.description+"</span>"),t.el().innerHTML=s,t.el().setAttribute("aria-label",this.Ar.localize("Set video quality to ")+i.name),t.kr?t.selected(t.kr===this.Vr):t.selected(!this.Vr)}jr(t){this.Rr&&(this.Rr.targetQuality=t.kr&&t.kr.videoQualities)}Ur(t,i){const s=i||this.lr;for(let i of s)if(t&&i&&-1!==i.videoQualities.indexOf(t))return i}Ve(){this.Ls.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.Lr),this.Ar.off("languagechange",this.ee),this.Rr&&(this.Rr.removeEventListener("activequalitychanged",this.Hr),this.Rr.removeEventListener("targetqualitychanged",this.zr),this.Rr.removeEventListener("update",this.Wr)),super.Ve()}constructor(t,i,s){super(t.subMenu),this.Rr=void 0,this.Vr=void 0,this.Lr=()=>{let t=da(this.Ls.videoTracks);if(t===this.Rr)return;let i=[];if(this.Rr&&(this.Rr.removeEventListener("activequalitychanged",this.Hr),this.Rr.removeEventListener("targetqualitychanged",this.zr),this.Rr.removeEventListener("update",this.Wr)),this.Rr=t,t){t.addEventListener("activequalitychanged",this.Hr),t.addEventListener("targetqualitychanged",this.zr),t.addEventListener("update",this.Wr);const s=ka(Sa(t.qualities.filter((t=>t.available))));i=s.length>1?[void 0,...s]:[void 0]}this.lr=i,this.zr(),this.Hr()},this.Wr=t=>{const i=t.track;if(i!==this.Rr)return;const s=ka(Sa(i.qualities.filter((t=>t.available)))),e=i&&xa(i.targetQuality);let n;this.Vr=this.Ur(e,s),n=s.length>1?[void 0,...s]:[void 0],this.lr=n,this.Or()},this.Hr=()=>{this.mr(void 0),this.Or()},this.zr=()=>{let t=da(this.Ls.videoTracks),i=t&&xa(t.targetQuality),s=this.Ur(i),e=this.Vr;s!==e&&(this.Vr=s,s&&e||this.mr(void 0),e&&Kt(this.lr,e)&&this.mr(e),i&&this.mr(s),this.Or())},this.ee=()=>{Vt(this.gr.menuHeader.el(),this.Ar.localize("Quality")),Vt(this.Pr,this.Ar.localize("Quality")),Vt(this.Ir,this.Ar.localize("Automatic")),Vt(this.Dr,this.Ar.localize("Automatic")),Vt(this.Nr,this.Ar.localize("HD")),this.Br.el().setAttribute("aria-label",this.Ar.localize("Open the video quality settings menu"));for(const t of this.yr)this.Tr(t);this.Or()},this.Br=t,this.Ls=i,this.Ar=s,this.Pr=this.Cr(),this.Ir=this.Mr(),this.Dr=this.Er(),this.Nr=this.Fr(),this.$r(),Vt(this.gr.menuHeader.el(),this.Ar.localize("Quality")),this.lr=[void 0],this.Ls.videoTracks.addEventListener(["addtrack","removetrack","change"],this.Lr),this.Ar.on("languagechange",this.ee),this.Lr()}},ba=class{get height(){return this.qr[0].height}get bandwidth(){return this.qr[0].bandwidth}get videoQualities(){return this.qr}get label(){return this.qr[0].label}add(t){this.qr.push(t)}constructor(t){this.qr=t}};function ka(t){let i=[];for(let s of t){let t=s,e=!1;for(let s of i)if(_a(s,t)){s.add(t),e=!0;break}e||i.push(new ba([t]))}return i}function wa(t,i){return t&&i?qt(t,i):zt.Gr}function ja(t,i){return t===i?zt.Gr:wa(t.height,i.height)||wa(t.width,i.width)||wa(t.bandwidth,i.bandwidth)}function Sa(t){return Lt(t,ja).reverse()}function _a(t,i){return t.label&&i.label&&t.label===i.label||R(va(t),va(i))}function xa(t){return ft(t)?1===t.length?t[0]:void 0:t}function Ta(t){return 1===t?"Normal":""+w.round(100*t)/100}var Ca=class extends ga{Cr(){return this.Pr=u.createElement("span"),this.Pr.className="theo-settings-control-menu-item-title",Vt(this.Pr,this.Ar.localize("Speed")),this.Pr}$r(){const t=u.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Br.el().appendChild(this.Pr),this.Br.el().appendChild(t),this.Br.el().setAttribute("aria-label",this.Ar.localize("Open the video speed settings menu")),t}wr(t){let i=super.wr(t);return this.Tr(i),i}Tr(t){const i=t.kr,s=this.Ar.localize(Ta(i));Vt(t.el(),s),t.el().setAttribute("aria-label",this.Ar.localize("Set video speed to "+s)),t.selected(t.kr===this.Ls.playbackRate)}jr(t){this.Ls.playbackRate=t.kr}Ve(){this.Ls.removeEventListener("ratechange",this.Xr),this.Ar.off("languagechange",this.ee),super.Ve()}constructor(t,i,s,e){super(t.subMenu),this.Qr=void 0,this.Xr=()=>{this.Qr&&this.mr(this.Qr);let t=this.Ls.playbackRate;this.Qr=t,Vt(this.Jr,this.Ar.localize(Ta(t))),t&&this.mr(t)},this.ee=()=>{Vt(this.gr.menuHeader.el(),this.Ar.localize("Speed")),Vt(this.Pr,this.Ar.localize("Speed")),this.Br.el().setAttribute("aria-label",this.Ar.localize("Open the video speed settings menu"));for(const t of this.yr)this.Tr(t);this.Xr()},this.Br=t,this.Ls=i,this.Ar=s,this.Pr=this.Cr(),this.Jr=this.$r(),Vt(this.gr.menuHeader.el(),this.Ar.localize("Speed")),this.lr=e,this.Ls.addEventListener("ratechange",this.Xr),this.Ar.on("languagechange",this.ee),this.Xr()}};Zh.registerComponent("SettingsButton",class extends Oo{createEl(){let t=super.createEl();return this.Yr=Zh.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),Vt(this.Yr,this.localize("HD")),t.appendChild(this.Yr),t}buildCSSClass(){return"vjs-icon-cog theo-settings-control-button "+super.buildCSSClass()}ee(){super.ee(),Vt(this.Yr,this.localize("HD")),Vt(this.menu.menuHeader.el(),this.localize("Settings"))}dispose(){this.Rr&&(this.Rr.removeEventListener("activequalitychanged",this.Hr),this.Rr=void 0),this.Ts.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.Kr),this.Zr.Ve(),this.th.Ve(),super.dispose()}constructor(t,i){var s,e;super(t,i),this.Rr=void 0,this.Kr=()=>{let t=da(this.Ts.videoTracks);t!==this.Rr&&(this.Rr&&this.Rr.removeEventListener("activequalitychanged",this.Hr),this.Rr=t,t&&t.addEventListener("activequalitychanged",this.Hr),this.Hr())},this.Hr=()=>{var t;const i=null==(t=this.Rr)?void 0:t.activeQuality,s=!!(i&&i.height>=720);this.player().toggleClass("theo-hd",s)},Tt(this.menu.el(),"theo-settings-control-menu"),Vt(this.menu.menuHeader.el(),t.localize("Settings")),this.controlText("Settings"),this.Be.$e=this.controlText(),this.ih=this.menu.addSubMenuItem({name:"QualityMenuItem"}),this.Zr=new ya(this.ih,this.Ts,t);let n=null!=(e=null==i||null==(s=i.playerOptions)?void 0:s.playbackRates)?e:[];this.sh=this.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),this.th=new Ca(this.sh,this.Ts,t,n),this.Ts.videoTracks.addEventListener(["addtrack","removetrack","change"],this.Kr),this.Kr()}});var Pa=class extends ga{eh(t){let i=t.label;if(i)return i;let s=t.language;if(s){let t=E(s);if(t)return t.nh}return s||""}rh(){this.lr=this.hh}Ve(){this.hh.removeEventListener("addtrack",this.oh),this.hh.removeEventListener("removetrack",this.ah),this.hh.removeEventListener("change",this.uh),super.Ve()}constructor(t,i){super(t),this.oh=t=>{const i=t.track;this.mr(i),i.addEventListener("update",this.lh)},this.ah=t=>{const i=t.track;this.pr(i),i.removeEventListener("update",this.lh)},this.uh=t=>this.rh(),this.lh=()=>{for(const t of this.lr)this.mr(t)},this.hh=i,this.hh.addEventListener("addtrack",this.oh),this.hh.addEventListener("removetrack",this.ah),this.hh.addEventListener("change",this.uh),this.rh()}},Aa=class extends Pa{Tr(t){let i=t.kr,s=this.eh(i);Vt(t.el(),this.eh(i)),t.el().setAttribute("aria-label",this.Ar.localize("Set the audio language to")+" "+s),t.selected(i.enabled)}jr(t){let i=t.kr;for(let t of this.Ts.audioTracks)t!==i&&(t.enabled=!1);i.enabled=!0}Ve(){this.Ar.off("languagechange",this.ee),super.Ve()}constructor(t,i,s){super(t,i.audioTracks),this.ee=()=>{Vt(this.gr.menuHeader.el(),this.Ar.localize("Language"));for(const t of this.yr)this.Tr(t)},this.Ts=i,this.Ar=s,Vt(this.gr.menuHeader.el(),this.Ar.localize("Language")),this.Ar.on("languagechange",this.ee)}};Zh.registerComponent("audioTrackButton",class extends Oo{buildCSSClass(){return"vjs-icon-audio theo-audio-track-control-button "+super.buildCSSClass()}dispose(){this.fh.Ve(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=2,this.fh=new Aa(this.menu,this.Ts,t),this.controlText("Language"),this.Be.$e=this.controlText()}});var Ma=class extends Pa{_r(t){return!!super._r(t)&&(!t.forced&&G(t.kind))}wr(t){let i=super.wr(t);Tt(i.el(),"theo-text-track-menu-item");let s=u.createElement("span");i.dh=s;let e=u.createElement("div");e.className="theo-text-track-menu-item-toggle",i.ph=e;let n=t=>this.mh(t,i);i.gh=n,e.addEventListener("click",n);let r=u.createElement("div");return r.className="theo-text-track-menu-item-toggle-slider",e.appendChild(r),i.el().appendChild(s),i.el().appendChild(e),i}Tr(t){let i=t,s=i.kr,e=this.eh(s);Vt(i.dh,e),i.el().setAttribute("aria-label",this.Ar.localize("Set the subtitle language to")+" "+e),i.el().setAttribute("role","menuitemcheckbox"),i.selected(s.mode===z.Ln)}Sr(t){let i=t;i.ph.removeEventListener("click",i.gh),super.Sr(t)}jr(t){let i=t.kr;for(let t of this.Ts.textTracks)t!==i&&q(t.kind,i.kind)&&(t.mode=z.yh);i.mode!==z.Ln?i.mode=z.Ln:i.mode=z.yh}mh(t,i){t.stopImmediatePropagation(),this.jr(i)}Ve(){this.Ar.off("languagechange",this.ee),super.Ve()}constructor(t,i,s){super(t,i.textTracks),this.ee=()=>{Vt(this.gr.menuHeader.el(),this.Ar.localize("Subtitles"));for(const t of this.yr)this.Tr(t)},this.Ts=i,this.Ar=s,Vt(this.gr.menuHeader.el(),s.localize("Subtitles")),this.Ar.on("languagechange",this.ee)}};Zh.registerComponent("subtitlesButton",class extends Oo{buildCSSClass(){return"vjs-icon-subtitles theo-text-track-control-button "+super.buildCSSClass()}dispose(){this.fh.Ve(),super.dispose()}constructor(t,i){super(t,i),this.fh=new Ma(this.menu,this.Ts,t),this.controlText("Subtitles"),this.Be.$e=this.controlText()}});var Ia,Ea=Zh.getComponent("playToggle");!function(t){t.bh="Pause",t.kh="Play",t.wh="Replay"}(Ia||(Ia={}));var Da=class extends(jo(Ea)){handleClick(t){this.Ts.muted||this.Ts.prepareWithUserAction(),super.handleClick(t)}handlePlay(t){super.handlePlay(t),this.controlText("Pause"),this.Be.$e=this.controlText()}handlePause(t){this.Ts.ended||(super.handlePause(t),this.controlText("Play"),this.Be.$e=this.controlText())}ee(){this.Be.$e=this.controlText()}dispose(){this.Be.Ve(),this.Ts.removeEventListener("ended",this.jh),super.dispose()}constructor(t,i){super(t,i),this.jh=()=>{this.controlText("Replay"),this.Be.$e=this.controlText()},this.controlText("Play"),this.Be=new $o(this,this.controlText()),this.Ts.addEventListener("ended",this.jh),this.on(t,"languagechange",this.ee),ht.te.Ke&&new So(this.el())}};Zh.registerComponent("playToggle",Da);var Fa,Na=Zh.getComponent("fullscreenToggle");!function(t){t.Sh="Exit fullscreen",t._h="Fullscreen"}(Fa||(Fa={}));var $a=class extends(jo(Na)){handleClick(t){this.Ts.prepareWithUserAction(),super.handleClick(t)}handleFullscreenChange(t){super.handleFullscreenChange(t),this.updateContent()}updateContent(){const t=this.player().isFullscreen()?"Exit fullscreen":"Fullscreen";this.controlText(t),this.Be.$e=this.controlText()}dispose(){this.Be.Ve(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Fullscreen"),this.Be=new $o(this,this.controlText()),ht.te.Ke&&new So(this.el()),this.on(t,"languagechange",this.updateContent)}};Zh.registerComponent("fullscreenToggle",$a);var Ba,Oa=Zh.getComponent("muteToggle");!function(t){t.xh="Unmute",t.Th="Mute"}(Ba||(Ba={}));var Ra=class extends(jo(Oa)){handleClick(t){this.Ts.muted&&!this.Ts.paused&&this.Ts.prepareWithUserAction(),super.handleClick(t)}update(t){super.update(t),this.ee()}ee(){const t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.Be.$e=this.controlText()}dispose(){this.Be.Ve(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Mute"),this.Be=new $o(this,this.controlText()),ht.te.Ke&&new So(this.el()),this.on(t,"languagechange",this.ee),$t&&(this.removeClass("vjs-hidden"),this.on(t,"loadstart",(()=>{this.removeClass("vjs-hidden")})))}};Zh.registerComponent("muteToggle",Ra);var Ua=Zh.getComponent("BigPlayButton"),Va=class extends(jo(Ua)){createEl(){let t=super.createEl(),i=Zh.createEl("div",{className:"theo-big-play-button-svg-container"});return i.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150" fill="currentColor">\n <circle cx="75" cy="75" r="73" fill="#000" fill-opacity="0.2"></circle>\n <circle cx="75" cy="75" r="73" class="theo-play-svg-circle" stroke-width="4" stroke="currentColor" fill="none" transform="rotate(-90,75,75)"></circle>\n <g transform="translate(85,75) scale(0.5625) translate(-75,-75)">\n <path d="m 123.89639,85.432 c -12.865,9.167 -29.482997,19.402 -49.848997,30.7 -19.634,11.035 -36.851,19.7 -51.65,26 l -16.3990002,6.099 c -1.033,-4.433 -2,-11.002 -2.9,-19.7 -2.033,-17.333 -3.04999998,-36.466 -3.04999998,-57.399 0,-19.167 1.38199998,-37.081 4.14799998,-53.75 l 4.0019995,-19.1499994 17.3990007,5.849 c 15.068,5.9999994 31.401,14.5169994 49,25.5509994 18.631,11.666 34.616997,22.766 47.948997,33.3 6.663,5.3 11.463,9.383 14.396,12.25 l -13.046,10.25"></path>\n </g>\n</svg>',t.appendChild(i),t}buildCSSClass(){return"theo-primary-color "+super.buildCSSClass()}handleClick(t){this.Ts.muted||this.Ts.prepareWithUserAction(),super.handleClick(t),void 0!==this.Ts.vr&&"unavailable"!==this.Ts.vr.state&&(this.Ts.vr.useDeviceMotionControls=!0)}};Zh.registerComponent("BigPlayButton",Va);var La=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;Zh.registerComponent("MouseTimeDisplay",class extends sa{Ch(t){const i=t.track;"removetrack"===t.type&&i===this.Ph?(this.Ph=void 0,this.Ah=void 0,this.Mh(),this.Ih=void 0):"addtrack"===t.type&&"metadata"===i.kind&&"thumbnails"===i.label&&(this.Ph=i,this.Ah=i.src?ht.Eh(i.src).href:void 0)}createEl(){const t=super.createEl();return this.Dh=Zh.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.Fh=Zh.createEl("canvas",{className:"theo-time-tooltip-thumbnail"}),t}update(t,i){if(super.update(t,i),!this.keepTooltipsInside)return;let s;if(this.Ph&&this.Ph.cues){let i=function(t,i){let s=t[0];for(let e of t)if(e.startTime<=i)s=e;else if(i>=e.endTime)return s;return s}(this.Ph.cues,t);s=i&&i.content}if(s===this.Ih)return;if(this.Ih=s,Zh.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",!!s),!s)return void this.Mh();const e=s.match(La);if(e){let[,t,i,s,n,r]=e;t=this.Nh(t);const h={$h:+i,Bh:+s,Ci:+n,Pi:+r};this.Oh(t,h)}else{const t=this.Nh(s);this.Oh(t)}}Nh(t){return this.Ph&&this.Ah?ht.Eh(t,this.Ah).href:t}Oh(t,i){this.Dh&&(this.Dh.src!==t?(this.Dh.onload=()=>{this.Rh(i)},this.Dh.src="",this.Dh.src=t):this.Rh(i))}Rh(t){if(!this.Fh||!this.Dh)return;const i=this.Fh.getContext("2d");i&&(t=t||{$h:0,Bh:0,Ci:this.Dh.naturalWidth,Pi:this.Dh.naturalHeight},this.Fh.width=t.Ci,this.Fh.height=t.Pi,i.drawImage(this.Dh,t.$h,t.Bh,t.Ci,t.Pi,0,0,t.Ci,t.Pi),this.Uh(this.Fh))}Uh(t){this.Vh||(this.tooltip.firstChild?this.tooltip.insertBefore(t,this.tooltip.firstChild):this.tooltip.appendChild(t),this.Vh=t)}Mh(){this.Vh&&this.tooltip.removeChild(this.Vh),at.Zs&&(this.off(this.player(),"seeking",this.showThumbnails),this.off(this.player(),"seeked",this.hideThumbnails)),this.Vh=void 0}constructor(t,i){super(t,i),this.Vh=void 0,this.Ph=void 0,this.Ah=void 0,this.Lh=t=>this.Ch(t),this.showThumbnails=()=>{this.Vh&&(this.Vh.hidden=!1)},this.hideThumbnails=()=>{this.Vh&&!this.player().scrubbing()&&(this.Vh.hidden=!0)},this.player().textTracks().on("addtrack",this.Lh),this.player().textTracks().on("removetrack",this.Lh),at.Zs&&(this.on(t,"seeking",this.showThumbnails),this.on(t,"seeked",this.hideThumbnails))}});var Ha=Zh.getComponent("VolumeLevel");Zh.registerComponent("VolumeLevel",class extends Ha{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-volume-level "+super.buildCSSClass()}});var za=Zh.getComponent("Component"),Wa=class extends za{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-menu-container "+super.buildCSSClass()}};Wa.prototype.o=Ut({},Wa.prototype.o,{children:[]}),Zh.registerComponent("controlBarMenuContainer",Wa);var qa=Zh.getComponent("Player"),Ga=class extends qa{dispose(){const t=this.el(),i=this.contentEl(),s=t.parentNode,e=t.nextSibling;super.dispose(),jt(i),this.xi&&s&&(e?s.insertBefore(t,e):s.appendChild(t)),u.body.removeEventListener("keydown",this.handleKeyPress),u.body.removeEventListener("click",this.handleClick)}constructor(t,i,s){super(t,i,s),this.handleKeyPress=t=>{9===t.which&&this.addClass("theo-probably-keyboard-focus")},this.handleClick=t=>{0===t.x&&0===t.y||this.removeClass("theo-probably-keyboard-focus")},u.body.addEventListener("keydown",this.handleKeyPress),u.body.addEventListener("click",this.handleClick)}};Ga.prototype.o=Ut({},qa.prototype.o,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),Zh.registerComponent("Player",Ga);var Xa=Zh.getComponent("Player"),Qa=Xa.prototype.ns;Xa.prototype.ns=function(t){if(!(this.W&&this.W.Us&&this.W.Us()))return Qa.call(this,t)};var Ja,Ya=Xa.prototype.createEl;function Ka(t,i,e,n){let r=Ut({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},e);r.controlBar=Ut({progressControl:{keepTooltipsInside:!0}},r.controlBar);let h=r.techOrder||(r.techOrder=[]);-1===h.indexOf("THEOplayer")&&h.unshift("THEOplayer"),(r.theoplayer||(r.theoplayer={})).player=t,e&&vt(e.language)&&(r.languages=Ut({},r.languages,{[M]:e.language}),r.language=M),i.setAttribute("data-vjs-player","");let o=i.getAttribute("style"),a=Zh(t.element,r,n);return a.ready((()=>{!function(t){t.on("timeupdate",uo),t.on("durationchange",uo)}(a),function(t,i){if(i){if(i.ads){const s=i=>{const s="adbreakbegin"===i.type,e=i.adBreak.integration===$.Hh;fo(t,s,e)};i.ads.addEventListener("adbreakbegin",s),i.ads.addEventListener("adbreakend",s)}if(i.verizonMedia){const s=i=>{const s="adbreakbegin"===i.type;fo(t,s,!1)};i.verizonMedia.ads.adBreaks.addEventListener("addadbreak",(t=>{t.adBreak.addEventListener("adbreakbegin",s),t.adBreak.addEventListener("adbreakend",s)}))}i.addEventListener("sourcechange",(()=>{fo(t,!1,!1)}))}}(a,t),function(t){t.on("mouseleave",vo)}(a)})),i.removeAttribute("data-vjs-player"),o?i.setAttribute("style",o):i.removeAttribute("style"),ht.te.Zs&&(Tt(i,"theo-mobile"),function(t){let i=s.outerHeight,e=s.outerWidth,n=i>e;n?(Pt(t,"theo-mobile-landscape"),Tt(t,"theo-mobile-portrait")):(Pt(t,"theo-mobile-portrait"),Tt(t,"theo-mobile-landscape"))}(i)),function(t){t.on("seeking",(()=>{_t(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()}))}(a),a}function Za(t){return class extends t{zh(){return function(t,i){let s=k.create(t);const e=i.Wh;return B(s,{get controls(){return e.controls()},set controls(t){e.controls(U(t))},get ui(){return e}})}(this.qh,this)}dn(){super.dn(),this.Wh.dispose()}Gh(t){this.Wh.src(""),super.Gh(t)}constructor(t,i,s){super(i,s),this.Xh=t,this.qh=super.zh(),k.defineProperty(this.qh,"constructor",{value:Gt}),this.Wh=Ka(this.qh,this.Xh,s.ui)}}}function tu(t){return(t=t||{}).position=function(t){switch(t){case"top-left":case"top-right":case"bottom-left":case"bottom-right":return t;default:return}}(t.position),t.visibility=function(t){if(ct(t)&&!_(t))return kt(t,0,1)}(t.visibility),t.retainPresentationModeOnSourceChange=U(t.retainPresentationModeOnSourceChange),t}function iu(){return Ja||(Ja=function(t,i){let s=t;if(ni[i])for(const t of ni[i])s=t(s);return s}(Ja=Za(Wt()),h.t)),Ja}function su(t,i){const s=function(t){const i=Z(t);return i.ui=i.ui||{},void 0!==(null==t?void 0:t.width)&&void 0===i.ui.width&&(i.ui.width=t.width),void 0!==(null==t?void 0:t.height)&&void 0===i.ui.height&&(i.ui.height=t.height),void 0!==(null==t?void 0:t.fluid)&&void 0===i.ui.fluid&&(i.ui.fluid=t.fluid),i.pip=tu(i.pip),i}(i),e=u.createElement("div");e.style.position="absolute",t.appendChild(e);const n=new(iu())(t,e,s);let r=n.Qh;return n.Jh(),n.Yh(Ht),k.defineProperty(r,"constructor",{value:su}),r=N(r),J(n),function(t){for(const i of hi)i(t)}(n),r}function eu(t){return{get ratio(){return t.Kh},get thresholds(){return t.Zh.slice()}}}function nu(t){const i=[],s=w.floor(1/t);if(_(s))return[];for(let e=0;e<=s;e++){const s=kt(e*t,0,1);i.push(s)}return i}Xa.prototype.createEl=function(){let t=Ya.call(this),i=Zh.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.T=i,t};var ru=class{get Kh(){return this.io}get Zh(){return this.so}eo(t){return i=>{const s=i[i.length-1];this.io=s.intersectionRatio,t(s.intersectionRatio)}}get Qh(){return this.no||(this.no=eu(this)),this.no}ro(){this.ho.disconnect()}constructor(t,i,e){this.io=1,this.no=void 0,this.so=nu(i);const n=this.eo(e);this.ho=new s.IntersectionObserver(n,{root:null,threshold:this.so}),this.ho.observe(t)}},hu=class{get Kh(){return this.io}get Zh(){return this.so}get Qh(){return this.no||(this.no=eu(this)),this.no}oo(t){this.io=t;const i=this.so;let s=0;if(t>0)for(;s<i.length&&i[s]<=t;)++s;this.ao!==s&&(this.ao=s,this.uo(t))}constructor(t,i){this.io=1,this.ao=-1,this.no=void 0,this.so=nu(t),this.uo=i}},ou=class extends hu{co(){const t=this.lo.getBoundingClientRect(),i=w.max(0,w.min(s.innerWidth,t.right)-w.max(0,t.left)),e=w.max(0,w.min(s.innerHeight,t.bottom)-w.max(0,t.top)),n=t.width*t.height;return kt(i*e/n,0,1)}ro(){s.removeEventListener("scroll",this.fo)}constructor(t,i,e){super(i,e),this.fo=yt((()=>this.oo(this.co())),50),this.lo=t,s.addEventListener("scroll",this.fo,!!lt&&{passive:!0}),si((()=>this.oo(this.co())))}},au=class{get do(){return this.vo}get po(){return this.mo}set po(t){if(_(t)||t<0||t>1)throw new RangeError("The threshold must be a value between 0 and 1");this.mo=t}get Qh(){return this.no||(this.no=function(t){return{get ratio(){return t.do},get visible(){return t.do>t.po},get visibleThreshold(){return t.po},set visibleThreshold(i){i=V(i),t.po=i},addObserver:(i,s)=>(i=V(i),t.yo(i,s).Qh),removeObserver(i){let s=t.bo(i);s&&t.ko(s)}}}(this)),this.no}wo(t){return i=>{this.vo=i,null==t||t(this.vo)}}yo(t,i){if(_(t))throw new g("step is not of the right type");if(t>1||t<=0)throw new RangeError("The step must be a number greater than 0 and smaller than or equal to 1");let e;return e="function"==typeof s.IntersectionObserver?new ru(this.lo,t,this.wo(i)):new ou(this.lo,t,this.wo(i)),this.jo.push(e),e}ko(t){t.ro(),Jt(this.jo,t)}bo(t){for(const i of this.jo)if(i.Qh===t)return i}dn(){for(const t of this.jo)t.ro();ti(this.jo)}constructor(t){this.vo=1,this.mo=0,this.jo=[],this.no=void 0,this.lo=t,this.yo(.1,this.wo())}};ri((function(t){return class extends t{zh(){const t=this.So;return B(super.zh(),{get visibility(){return t.Qh}})}dn(){this.So&&(this.So.dn(),this.So=void 0),super.dn()}constructor(t,i,s){super(t,i,s),this.So=new au(t)}}}),h.t);var uu=Zh.getComponent("Button");var cu="THEOPiPCloseButton";Zh.registerComponent(cu,class extends uu{buildCSSClass(){return"theo-close-button theo-pip-close"}handleClick(){this.xo._o()}constructor(t,i){if(super(t,i),this.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.xo)}(i))throw new m("Invalid Picture-in-picture options.");this.xo=i.xo}});var lu=class extends C{get To(){return this.Co}get Po(){return this.h.ls()}Ao(){this.h.vn(D.kh,this.Mo),this.Io||this.h.vn(D.Eo,this.Do),this.h.Wh.on("languagechange",this.ee)}Fo(){let t=this.No;if(t)return"theo-pip-"+t}$o(t){let i=this.lo;if(i&&!this.Po){this.Bo||this.Oo(),this.Ro(),Tt(i,"theo-pip");let s=this.Fo();s&&Tt(i,s),this.Co=!0,this.Uo=t,this.Vo=!1,this.Lo(new st(et.PICTURE_IN_PICTURE))}}Ho(t){let i=this.lo;if(i){this.zo(),Pt(i,"theo-pip");let s=this.Fo();s&&Pt(i,s),this.Co=!1,this.Vo=t,this.Wo=this.Uo,this.Uo=!1,this.Lo(new st(et.INLINE))}}Oo(){if(!this.Bo){let t=this.h.Wh;t.addChild(cu,{xo:this});let i=u.createElement("div");i.className="theo-pip-overlay",this.qo=u.createElement("div"),this.qo.className="theo-pip-overlay-text",Vt(this.qo,t.localize("Video playing in Picture-in-Picture mode")),i.appendChild(this.qo),t.el().appendChild(i),this.Go=i,this.Bo=!0}}Xo(){this.Qo&&!this.Jo&&this.h.So&&(this.Yo=this.h.So.yo(.1,this.Ko),this.Jo=!0)}Zo(){this.Yo&&this.h.So&&(this.h.So.ko(this.Yo),this.Jo=!1)}Ro(){let t=this.h.Wh.contentEl(),i=t.getBoundingClientRect(),s=u.documentElement.clientWidth,e=u.documentElement.clientHeight;t.style.top=i.top+"px",t.style.bottom=e-i.bottom+"px",t.style.right=s-i.right+"px",t.style.left=i.left+"px",t.style.width=i.width+"px",t.style.height=i.height+"px",t.style.position="fixed"}zo(){let t=this.h.Wh.contentEl();t.style.top="",t.style.bottom="",t.style.right="",t.style.left="",t.style.width="",t.style.height="",t.style.position=""}ta(){Pt(this.lo,"theo-pip"),this.To&&this.No&&Pt(this.lo,"theo-pip-"+this.No),this.Go&&(jt(this.Go),this.Go=void 0)}dn(){this.ta(),this.Zo(),this.ia(),this.h.un(D.kh,this.Mo),this.h.un(D.Eo,this.Do),this.h.Wh.off("languagechange",this.ee),this.h=void 0}constructor(t,i,s){super(),this.sa=!1,this.Co=!1,this.Vo=!1,this.Uo=!1,this.Bo=!1,this.Jo=!1,this.Wo=!1,this.Mo=()=>{this.sa=!0,this.Qo&&!this.To&&this.Yo&&this.po&&this.Yo.Kh<=this.po&&this.$o(!1)},this.Do=()=>{this.Io||(this.sa=!1,this.Ho(!1))},this.ee=()=>{if(this.qo){const t=this.h.Wh;Vt(this.qo,t.localize("Video playing in Picture-in-Picture mode"))}},this.Ko=t=>{!this.Uo&&this.Qo&&(_(t)||(this.po&&t<=this.po||this.Wo?this.Co||this.Vo||this.$o(!1):this.Co?this.Ho(!1):this.Vo=!1))},this.po=i.visibility,this.No=i.position,this.Io=i.retainPresentationModeOnSourceChange,this.Qo=void 0!==this.po,this.h=t,this.lo=t.Xh,this._o=s,this.Ao()}},fu=class extends nt{ea(){let t=super.ea();return t===et.INLINE&&this.na&&this.na.To?et.PICTURE_IN_PICTURE:t}ra(t){return t===et.PICTURE_IN_PICTURE||super.ra(t)}ha(t,i){t===et.FULLSCREEN&&this.na.Zo(),super.ha(t,i),t!==et.FULLSCREEN&&this.na.Xo()}oa(t,i){t!==i&&(t===et.FULLSCREEN&&this.na.Ho(!1),t===et.INLINE&&i===et.PICTURE_IN_PICTURE&&this.na.Ho(!0),super.oa(t,i),t===et.PICTURE_IN_PICTURE&&(i===et.INLINE?this.na.$o(!0):this.na.$o(!1)))}dn(){super.dn(),this.na.dn(),this.aa.un(D.kh,this.ua),this.aa=void 0}constructor(t,i,s){super(i),this.ca=()=>this.Wr(),this._o=()=>this.la(et.INLINE),this.ua=()=>{this.ea()!==et.FULLSCREEN&&this.na.Xo(),this.aa.un(D.kh,this.ua)},this.aa=t,this.na=new lu(t,s.pip,this._o),this.na.vn("presentationmodechange",this.ca),this.aa.vn(D.kh,this.ua),this.Wr()}},du=class extends C{get fa(){return wt.da(this.Wh.el())||this.Wh.supportsFullScreen()}get ls(){return this.Wh.isFullscreen()||this.va}$o(){this.Wh.requestFullscreen()}Ho(){this.Wh.exitFullscreen(),this.pa.Ho()}dn(){this.ia(),this.Wh.off("fullscreenchange",this.ma),this.pa.un(it.ga,this.ma),this.pa.un(it.ya,this.Rs),this.Wh.isFullWindow&&this.Wh.exitFullscreen()}constructor(t,i){super(),this.Vs=!1,this.va=!1,this.ba=!1,this.ma=()=>{if(this.ba)return;let t=this.Vs,i=this.ls;t!==i&&(this.Vs=i,this.Lo(new gt))},this.ka=()=>{this.va=this.pa.ls,this.ma()},this.wa=()=>{this.ba||(this.Wh.isFullWindow&&this.Wh.supportsFullScreen()||this.va&&!this.Wh.supportsFullScreen())&&(this.ba=!0,this.Wh.exitFullscreen(),this.Wh.requestFullscreen(),this.ba=!1,this.ma())},this.Wh=t,this.pa=i,this.Wh.on("fullscreenchange",this.ma),this.pa.vn(it.ga,this.ka),this.pa.vn(it.ja,this.wa),this.pa.vn(it.ya,this.Rs),this.ma()}};ri((function(t){return class extends t{ls(){return"fullscreen"===this.Sa.ea()}zh(){let t=this.Sa;return B(super.zh(),{get presentation(){return t.Qh},get presentationMode(){return t.Qh.currentMode},set presentationMode(i){t.Qh.requestMode(i)}})}dn(){this.Sa.dn(),this._a.dn(),super.dn()}constructor(t,i,s){super(t,i,s),this._a=new du(this.Wh,this.xa),this.Sa=new fu(this,this._a,s),this.Sa.vn("presentationmodechange",this.Rs)}}}),h.t);var vu="theo-cast-",pu=Zh.getComponent("Button"),mu=class extends(jo(pu)){get Ta(){throw new m("Ca")}get Pa(){return this.o.Pa}get Aa(){return this.o.Aa}buildCSSClass(){return vu+"button theo-"+this.Aa+"-button theo-controlbar-button "+super.buildCSSClass()}createEl(t,i,s){let e=super.createEl(),n=u.createElement("div");n.className="theo-button-icon-blur";let r=u.createElement("div");return r.className=vu+"svg-container",r.innerHTML=this.Pa,e.appendChild(n),e.appendChild(r),e}handleClick(t){var i;if(super.handleClick(t),this.Ma===rt.AVAILABLE)null==(i=this.Ta)||i.start();else if(this.Ma===rt.CONNECTED||this.Ma===rt.CONNECTING){var s;null==(s=this.Ta)||s.stop()}}Ia(t){Pt(this.lo,"theo-"+this.Aa+"-"+this.Ma),this.Ma=t,Tt(this.lo,"theo-"+this.Aa+"-"+this.Ma),this.ee()}ee(){this.Ea(this.Ma),this.Be.$e=this.controlText()}Ea(t){t===rt.CONNECTED?this.controlText("Stop Casting"):t===rt.AVAILABLE?this.controlText("Start Casting"):t===rt.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")}constructor(t,i){var s;super(t,i),this.lo=t.el(),this.Ma=rt.UNAVAILABLE,this.controlText("Unavailable"),this.Be=new $o(this,this.controlText()),null==(s=this.Ta)||s.addEventListener("statechange",(t=>{const i=t;this.Ia(i.state)})),ht.te.Ke&&new So(this.el()),this.Ia(this.Ta?this.Ta.state:rt.UNAVAILABLE),this.on(t,"languagechange",this.ee)}},gu=0;function yu(){const t='\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" fill="currentColor">\n <defs>\n <clipPath id="theo-chromecast-rings-mask-'+gu+'">\n <path d="M0-36h44V0H0z"/>\n </clipPath>\n </defs>\n\t <path class="theo-chromecast-outer" d="M2 10a4 4 0 0 1 4-4h36a4 4 0 0 1 4 4v28a4 4 0 0 1-4 4H28v-4h14V10H6v6H2z"/>\n\t <path class="theo-chromecast-inner" d="M10 14h28v20H26.74A26 26 0 0 0 10 17.26z"/>\n <g class="theo-chromecast-rings" fill="none" stroke="currentColor" stroke-width="4" transform="translate(2 42)" clip-path="url(#theo-chromecast-rings-mask-'+gu+')">\n <circle stroke="none" cx="0" cy="0" r="30" />\n <circle class="theo-chromecast-ring theo-chromecast-ring1" stroke-width="6" cx="0" cy="0" r="3" />\n <circle class="theo-chromecast-ring theo-chromecast-ring2" cx="0" cy="0" r="12" />\n <circle class="theo-chromecast-ring theo-chromecast-ring3" cx="0" cy="0" r="20"/>\n <path class="theo-chromecast-ring theo-chromecast-ring4" stroke-linecap="round" d="M0-20A20 20 0 0 1 20 0" />\n </g>\n </svg>';return gu++,t}Zh.registerComponent("chromecastButton",class extends mu{get Ta(){var t;return null==(t=this.Ts.cast)?void 0:t.chromecast}constructor(t,i){super(t,Ut({},i,{Aa:"chromecast",Pa:yu()}))}});var bu="theo-chromecast-",ku=Zh.getComponent("Component"),wu=class t extends(jo(ku)){buildCSSClass(){return bu+"overlay "+super.buildCSSClass()}createEl(){let i=super.createEl();Tt(i,bu+"overlay");let s=Zh.createEl("div",{className:bu+"status-icon",innerHTML:t.ICON_SVG}),e=Zh.createEl("div",{className:bu+"status-info"});Vt(e,"Playing on");let n=Zh.createEl("div",{className:bu+"status-title"}),r=Zh.createEl("div",{className:bu+"status"});return this.ar=n,r.appendChild(s),r.appendChild(e),r.appendChild(n),i.appendChild(r),i}dispose(){var t;null==(t=this.Da)||t.removeEventListener("statechange",this.update),this.Da=void 0,this.Ts.removeEventListener("play",this.update),super.dispose()}constructor(t,i){var s,e;super(t,i),this.update=()=>{this.Da?(this.ar&&Vt(this.ar,this.Da.receiverName||""),this.Da.state===rt.CONNECTED?this.show():this.hide()):this.hide()},this.Da=null==(s=this.Ts.cast)?void 0:s.chromecast,null==(e=this.Da)||e.addEventListener("statechange",this.update),this.Ts.addEventListener("play",this.update),this.update()}};wu.ICON_SVG='\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" fill="currentColor">\n <path d="M7 24v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm18-7H11v1.63c3.96 1.28 7.09 4.41 8.37 8.37H25V13zM7 16v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11zm20-7H9c-1.1 0-2 .9-2 2v3h2v-3h18v14h-7v2h7c1.1 0 2-.9 2-2V11c0-1.1-.9-2-2-2z"/>\n</svg>',Zh.registerComponent("chromecastOverlay",wu);Zh.registerComponent("airplayButton",class extends mu{dispose(){var t,i;null==(t=this.Ts.ads)||t.removeEventListener("adbreakbegin",this.Fa),null==(i=this.Ts.ads)||i.removeEventListener("adbreakend",this.Na),this.Ts.removeEventListener("currentsourcechange",this.Na),super.dispose()}get Ta(){var t;return null==(t=this.Ts.cast)?void 0:t.airplay}constructor(t,i){var s,e;super(t,Ut({},i,{Aa:"airplay",Pa:'\n<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24">\n <path class="theo-cast-inner" d="M5 7h14v8H5z"/>\n <path d="M6 22h12l-6-6zM21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V5h18v12h-4v2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/>\n</svg>'})),this.Na=()=>{this.enable()},this.Fa=()=>{this.disable()},null==(s=this.Ts.ads)||s.addEventListener("adbreakbegin",this.Fa),null==(e=this.Ts.ads)||e.addEventListener("adbreakend",this.Na),this.Ts.addEventListener("currentsourcechange",this.Na)}});var ju={Default:"","Monospaced Serif":xt.$a,"Proportional Serif":xt.Ba,"Monospaced Sans-Serif":xt.Oa,"Proportional Sans-Serif":xt.Ra},Su={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},_u=[50,75,100,150,200];function xu(t){return{label:t+"%",value:t}}function Tu(t){return k.keys(t).map((i=>({label:i,value:t[i]})))}_u.map((function(t){return{label:t+"%",value:t/100+"em"}}));var Cu=_u.map((function(t){return{label:t+"%",value:t+"%"}})),Pu=[25,50,75,100].map(xu),Au=[0,25,50,75,100].map(xu),Mu=Tu(Su),Iu=Tu(ju),Eu=Tu({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),Du=100,Fu="#000000",Nu="#FFFFFF",$u="#000000",Bu=class extends ga{Ua(){let t=this.Ar.localize(this.Va);Vt(this.La.subMenu.menuHeader.el(),t),this.Pr=u.createElement("span"),this.Pr.className="theo-settings-control-menu-item-title",Vt(this.Pr,t);let i=u.createElement("span");return i.className="theo-primary-color theo-settings-control-menu-item-value",Tt(this.La.el(),"theo-subtitle-options-menu-item"),this.La.el().appendChild(this.Pr),this.La.el().appendChild(i),i}Ha(t){const i=this.br(t);i&&this.za(i)}Wa(){return this.lr}jr(t){this.qa(t.kr)}za(t){for(let t of this.gr.menuItems)t.selected(!1);t?(t.selected(!0),this.Ga(t.kr.label)):this.Ga("Custom")}Ga(t){this.Xa=t,Vt(this.Qa,this.Ar.localize(t)),this.La.parentMenu.ae()}wr(t){let i=super.wr(t);return Tt(i.el(),"theo-subtitle-options-menu-item"),this.Tr(i),i}Tr(t){const i=this.Ar.localize(t.kr.label);Vt(t.el(),i);const s=this.Ar.localize("Set "+this.gr.menuHeader.el().textContent+" to "+t.kr.label);t.el().setAttribute("aria-label",s)}Ve(){this.Ar.off("languagechange",this.ee),super.Ve()}constructor(t,i,s,e){super(t.subMenu),this.La=t,this.Ar=e,this.Xa="",this.ee=()=>{let t=this.Ar.localize(this.Va);Vt(this.La.subMenu.menuHeader.el(),t),Vt(this.Pr,t),this.Ga(this.Xa);for(const t of this.yr)this.Tr(t)},this.Va=i,this.qa=s.ca,this.Qa=this.Ua(),this.lr=s.Ja,this.Ar.on("languagechange",this.ee)}},Ou=class t{static Ya(t,i,s,e){if(void 0===t&&void 0===i)return;return Nt(void 0===t?s:t,void 0===i?e:i)}constructor(i){this.Ka=i,this.Za=t=>{this.Ka.fontFamily=t.value},this.tu=t=>{this.Ka.fontSize=t.value},this.iu=i=>{this.su=i.value,this.Ka.fontColor=t.Ya(this.eu,this.su,Nu,Du)},this.nu=i=>{this.eu=i.value,this.Ka.fontColor=t.Ya(this.eu,this.su,Nu,Du)},this.ru=i=>{this.hu=i.value,this.Ka.backgroundColor=t.Ya(this.hu,this.ou,Fu,Du)},this.au=i=>{this.ou=i.value,this.Ka.backgroundColor=t.Ya(this.hu,this.ou,Fu,Du)},this.uu=i=>{this.cu=i.value,this.Ka.windowColor=t.Ya(this.cu,this.lu,$u,Du)},this.fu=i=>{this.lu=i.value,this.Ka.windowColor=t.Ya(this.cu,this.lu,$u,Du)},this.du=t=>{this.Ka.edgeStyle=t.value}}},Ru=class{vu(t,i){const s=this.pu(t,i.Wa());s&&i.Ha(s)}pu(t,i){return Xt(i,(i=>i.value===t))}mu(t,i,s){let e,n;if(void 0===t)e=this.pu(void 0,i.Wa()),n=this.pu(void 0,s.Wa());else if(t){let r=function(t){let i=Dt(t);i||(i=Dt(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=Ct(At(t),1));if(!i){let s=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=Ct(At(Su[s]),1)}return i}(t);if(r){let t=It(r),h=100*r.gu;e=this.pu(t,i.Wa()),n=this.pu(h,s.Wa())}}e&&i.Ha(e),n&&s.Ha(n)}constructor(t,i){this.Ka=t,this.yu=i,this.bu=()=>{let t=this.Ka.fontFamily;this.vu(t,this.yu["Font family"]);let i=this.Ka.fontColor;this.mu(i,this.yu["Font color"],this.yu["Font opacity"]);let s=this.Ka.fontSize;this.vu(s,this.yu["Font size"]);let e=this.Ka.backgroundColor;this.mu(e,this.yu["Background color"],this.yu["Background opacity"]);let n=this.Ka.windowColor;this.mu(n,this.yu["Window color"],this.yu["Window opacity"]);let r=this.Ka.edgeStyle;this.vu(r,this.yu["Character edge style"])},this.Ka.addEventListener("change",this.bu),this.bu()}};var Uu=class extends ga{ku(){return{"Font family":{Ja:Vu(Iu),ca:this.wu.Za},"Font color":{Ja:Vu(Mu),ca:this.wu.nu},"Font opacity":{Ja:Vu(Pu),ca:this.wu.iu},"Font size":{Ja:Vu(Cu),ca:this.wu.tu},"Background color":{Ja:Vu(Mu),ca:this.wu.ru},"Background opacity":{Ja:Vu(Au),ca:this.wu.au},"Window color":{Ja:Vu(Mu),ca:this.wu.uu},"Window opacity":{Ja:Vu(Au),ca:this.wu.fu},"Character edge style":{Ja:Vu(Eu),ca:this.wu.du}}}ju(){Vt(this.gr.menuHeader.el(),this.Ar.localize("Subtitle Options")),this.Pr=u.createElement("span"),this.Pr.className="theo-settings-control-menu-item-title",Vt(this.Pr,this.Ar.localize("Subtitle")),this.Su=u.createElement("span"),this.Su.className="theo-primary-color theo-settings-control-menu-item-value",Vt(this.Su,this.Ar.localize("Options")),this.Br.el().appendChild(this.Pr),this.Br.el().appendChild(this.Su),this.Br.el().setAttribute("aria-label",this.Ar.localize("Open the subtitle options menu")),this._u.addEventListener(["addtrack","removetrack"],this.xu),this.xu()}wr(t){let i=this.gr.addSubMenuItem();return i.kr=t,this.yu[t]=new Bu(i,t,this.Tu[t],this.Ar),i}Tr(t){}jr(t){}Ve(){this.Ar.off("languagechange",this.ee),super.Ve()}constructor(t,i,s,e){super(t.subMenu),this.Br=t,this._u=i,this.Ar=e,this.yu={},this.xu=()=>{this._u.some((t=>G(t.kind)))?this.Br.show():this.Br.hide()},this.ee=()=>{Vt(this.gr.menuHeader.el(),this.Ar.localize("Subtitle Options")),Vt(this.Pr,this.Ar.localize("Subtitle")),Vt(this.Su,this.Ar.localize("Options")),this.Br.el().setAttribute("aria-label",this.Ar.localize("Open the subtitle options menu"))},this.wu=new Ou(s),this.Tu=this.ku(),this.lr=k.keys(this.Tu),this.ju(),this.Cu=new Ru(s,this.yu),this.Ar.on("languagechange",this.ee)}};function Vu(t){let i=[{label:"Default",value:void 0}];for(let s of t)"Default"!==s.label&&i.push(s);return i}ri((function(t){return class extends t{dn(){this.Pu.removeMenuItem(this.Au),super.dn()}constructor(t,i,s){super(t,i,s),this.Pu=this.Wh.controlBar.getChild("SettingsButton").menu,this.Au=this.Pu.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),new Uu(this.Au,this.rt.Qh,this.Mu.Qh,this.Wh)}}}),h.t);export{Gt as ChromelessPlayer,I as ErrorCategory,A as ErrorCode,su as Player,O as cache,F as cast,Yt as features,ii as playerSuiteVersion,ei as players,P as registerContentProtectionIntegration,Qt as utils,Zt as version,Zh as videojs};
40
+ var h,u,s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==a?a:"undefined"!=typeof global?global:this,a=s.window,c=s.document,v=(s.location,s.navigator,s.setTimeout),p=s.clearTimeout,m=(s.setInterval,s.clearInterval,s.Error),g=s.TypeError,w=s.SyntaxError,k=s.Object,_=s.Math,j=s.parseInt,x=s.parseFloat,S=s.isNaN,T=s.Uint8Array;s.Worker,s.WorkerGlobalScope,s.XMLHttpRequest;import{$ as C,$a as P,A,Aa as M,B as I,Ba as E,C as D,Ca as F,D as N,Da as $,E as B,Ea as R,F as O,Fa as V,G as L,Ga as U,H,Ha as z,I as W,Ia as q,J as G,Ja as X,K as J,Ka as Q,L as Y,La as K,M as Z,Ma as tt,N as it,Na as st,O as et,Oa as nt,P as rt,Pa as ht,Q as ot,Qa as at,R as ut,Ra as ct,S as lt,Sa as ft,T as dt,Ta as vt,U as pt,Ua as mt,V as gt,Va as yt,W as bt,Wa as wt,X as kt,Xa as _t,Y as jt,Ya as xt,Z as St,Za as Tt,_ as Ct,_a as Pt,a as At,aa as Mt,ab as It,b as Et,ba as Dt,bb as Ft,c as Nt,ca as $t,cb as Bt,d as Rt,da as Ot,db as Vt,e as Lt,ea as Ut,eb as Ht,f as zt,fa as Wt,fb as qt,g as Gt,ga as Xt,gb as Jt,h as Qt,ha as Yt,hb as Kt,i as Zt,ia as ti,ib as ii,j as si,ja as ei,jb as ni,k as ri,ka as hi,kb as oi,l as ai,la as ui,lb as ci,m as li,ma as fi,mb as di,n as vi,na as pi,nb as mi,o as gi,oa as yi,ob as bi,p as wi,pa as ki,pb as _i,q as ji,qa as xi,qb as Si,r as Ti,ra as Ci,rb as Pi,s as Ai,sa as Mi,sb as Ii,t as Ei,ta as Di,u as Fi,ua as Ni,v as $i,va as Bi,w as Ri,wa as Oi,x as Vi,xa as Li,y as Ui,ya as Hi,z as zi,za as Wi}from"./THEOplayer.common.esm.js";(u=h||(h={}))[u.t=0]="t";var qi={};function Gi(t,i){(qi[i]||(qi[i]=[])).push(t)}var Xi=[];var o=void 0!==a?a:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Ji=void 0!==c?c:{createElement:function(){}};function Qi(t,i){return i||(i=t.slice(0)),t.raw=i,t}var Yi=1;function Ki(){return Yi++}var Zi,ts=k.prototype.toString,is=function(t){return ns(t)?k.keys(t):[]};function ss(t,i){is(t).forEach((function(s){return i(t[s],s)}))}function es(t){for(var i=arguments.length,s=new Array(i>1?i-1:0),e=1;e<i;e++)s[e-1]=arguments[e];return k.assign?k.assign.apply(k,[t].concat(s)):(s.forEach((function(i){i&&ss(i,(function(i,s){t[s]=i}))})),t)}function ns(t){return!!t&&"object"==typeof t}function rs(t){return ns(t)&&"[object Object]"===ts.call(t)&&t.constructor===k}var hs=function(t,i,s){void 0===s&&(s=!!ee&&ee<11),"log"!==t&&i.unshift(t.toUpperCase()+":"),Zi.history.push(i),i.unshift("VIDEOJS:");var e=o.console&&o.console[t];e&&(s&&(i=i.map((function(t){if(ns(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(i){return String(t)}return String(t)})).join(" ")),e.apply?e[Array.isArray(i)?"apply":"call"](o.console,i):e(i))};(Zi=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];hs("log",i)}).history=[],Zi.error=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return hs("error",i)},Zi.warn=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return hs("warn",i)};var n=Zi,os="undefined"!=typeof globalThis?globalThis:void 0!==a?a:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function as(t){return t.replace(/\n\r?\s*/g,"")}var us,cs=function(t){for(var i="",s=0;s<arguments.length;s++)i+=as(t[s])+(arguments[s+1]||"");return i};function ls(t){return"string"==typeof t&&/\S/.test(t)}function fs(t){if(/\s/.test(t))throw new m("class has illegal whitespace characters")}function ds(){return Ji===o.document&&void 0!==Ji.createElement}function vs(t){return ns(t)&&1===t.nodeType}function ps(t){return function(i,s){if(!ls(i))return Ji[t](null);ls(s)&&(s=Ji.querySelector(s));var e=vs(s)?s:Ji;return e[t]&&e[t](i)}}function ms(t,i,s,e){void 0===t&&(t="div"),void 0===i&&(i={}),void 0===s&&(s={});var r=Ji.createElement(t);return k.getOwnPropertyNames(i).forEach((function(t){var s=i[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(n.warn(cs(us||(us=Qi(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."])),t,s)),r.setAttribute(t,s)):"textContent"===t?gs(r,s):r[t]=s})),k.getOwnPropertyNames(s).forEach((function(t){r.setAttribute(t,s[t])})),e&&$s(r,e),r}function gs(t,i){return void 0===t.textContent?t.innerText=i:t.textContent=i,t}function ys(t,i){i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t)}var bs={},ws="vdata"+(new Date).getTime();function ks(t){var i=t[ws];return i||(i=t[ws]=Ki()),bs[i]||(bs[i]={}),bs[i]}function _s(t){var i=t[ws];return!!i&&!!k.getOwnPropertyNames(bs[i]).length}function js(t){var i=t[ws];if(i){delete bs[i];try{delete t[ws]}catch(i){t.removeAttribute?t.removeAttribute(ws):t[ws]=null}}}function xs(t,i){return fs(i),t.classList?t.classList.contains(i):function(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}(i).test(t.className)}function Ss(t,i){return t.classList?t.classList.add(i):xs(t,i)||(t.className=(t.className+" "+i).trim()),t}function Ts(t,i){return t.classList?t.classList.remove(i):(fs(i),t.className=t.className.split(/\s+/).filter((function(t){return t!==i})).join(" ")),t}function Cs(t,i,s){var e=xs(t,i);if("function"==typeof s&&(s=s(t,i)),"boolean"!=typeof s&&(s=!e),s!==e)return s?Ss(t,i):Ts(t,i),t}function Ps(t,i){k.getOwnPropertyNames(i).forEach((function(s){var e=i[s];null==e||!1===e?t.removeAttribute(s):t.setAttribute(s,!0===e?"":e)}))}function As(t){var i={};if(t&&t.attributes&&t.attributes.length>0)for(var s=t.attributes,e=s.length-1;e>=0;e--){var n=s[e].name,r=s[e].value;"boolean"!=typeof t[n]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+n+",")||(r=null!==r),i[n]=r}return i}function Ms(t,i,s){t.setAttribute(i,s)}function Is(t,i){t.removeAttribute(i)}function Es(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var s=Ji.documentElement,e=Ji.body,n=s.clientLeft||e.clientLeft||0,r=o.pageXOffset||e.scrollLeft,h=i.left+r-n,a=s.clientTop||e.clientTop||0,u=o.pageYOffset||e.scrollTop,c=i.top+u-a;return{left:_.round(h),top:_.round(c)}}function Ds(t,i){var s={},e=Es(t),n=t.offsetWidth,r=t.offsetHeight,h=e.top,o=e.left,a=i.pageY,u=i.pageX;return i.changedTouches&&(u=i.changedTouches[0].pageX,a=i.changedTouches[0].pageY),s.y=_.max(0,_.min(1,(h-a+r)/r)),s.x=_.max(0,_.min(1,(u-o)/n)),s}function Fs(t){return ns(t)&&3===t.nodeType}function Ns(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function $s(t,i){return function(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map((function(t){return"function"==typeof t&&(t=t()),vs(t)||Fs(t)?t:"string"==typeof t&&/\S/.test(t)?Ji.createTextNode(t):void 0})).filter((function(t){return t}))}(i).forEach((function(i){return t.appendChild(i)})),t}function Bs(t,i){return $s(Ns(t),i)}var Rs=ps("querySelector"),Os=ps("querySelectorAll"),Vs=o.navigator&&o.navigator.userAgent||"",Ls=/AppleWebKit\/([\d.]+)/i.exec(Vs),Us=Ls?x(Ls.pop()):null,Hs=/iPad/i.test(Vs),zs=/iPhone/i.test(Vs)&&!Hs,Ws=/iPod/i.test(Vs),qs=zs||Hs||Ws,Gs=function(){var t=Vs.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),Xs=/Android/i.test(Vs),Js=function(){var t=Vs.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&x(t[1]),s=t[2]&&x(t[2]);return i&&s?x(t[1]+"."+t[2]):i||null}(),Qs=Xs&&/webkit/i.test(Vs)&&Js<2.3,Ys=Xs&&Js<5&&Us<537,Ks=/Firefox/i.test(Vs),Zs=/Edge/i.test(Vs),te=!Zs&&/Chrome/i.test(Vs),ie=function(){var t=Vs.match(/Chrome\/(\d+)/);return t&&t[1]?x(t[1]):null}(),se=/MSIE\s8\.0/.test(Vs),ee=function(){var t=/MSIE\s(\d+)\.\d/.exec(Vs),i=t&&x(t[1]);return!i&&/Trident\/7.0/i.test(Vs)&&/rv:11.0/.test(Vs)&&(i=11),i}(),ne=/Safari/i.test(Vs)&&!te&&!Xs&&!Zs,re=ne||qs,he=ds()&&("ontouchstart"in o||o.DocumentTouch&&o.document instanceof o.DocumentTouch),oe=ds()&&"backgroundSize"in o.document.createElement("video").style,ae=k.freeze({__proto__:null,IS_IPAD:Hs,IS_IPHONE:zs,IS_IPOD:Ws,IS_IOS:qs,IOS_VERSION:Gs,IS_ANDROID:Xs,ANDROID_VERSION:Js,IS_OLD_ANDROID:Qs,IS_NATIVE_ANDROID:Ys,IS_FIREFOX:Ks,IS_EDGE:Zs,IS_CHROME:te,CHROME_VERSION:ie,IS_IE8:se,IE_VERSION:ee,IS_SAFARI:ne,IS_ANY_SAFARI:re,TOUCH_ENABLED:he,BACKGROUND_SIZE_SUPPORTED:oe});function ue(t,i){var s=ks(t);0===s.handlers[i].length&&(delete s.handlers[i],t.removeEventListener?t.removeEventListener(i,s.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+i,s.dispatcher)),k.getOwnPropertyNames(s.handlers).length<=0&&(delete s.handlers,delete s.dispatcher,delete s.disabled),0===k.getOwnPropertyNames(s).length&&js(t)}function ce(t,i,s,e){s.forEach((function(s){t(i,s,e)}))}function le(t){function i(){return!0}function s(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){var e=t||o.event;for(var n in t={},e)"layerX"!==n&&"layerY"!==n&&"keyLocation"!==n&&"webkitMovementX"!==n&&"webkitMovementY"!==n&&"path"!==n&&("returnValue"===n&&e.preventDefault||(t[n]=e[n]));if(t.target||(t.target=t.srcElement||Ji),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){e.preventDefault&&e.preventDefault(),t.returnValue=!1,e.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){e.stopPropagation&&e.stopPropagation(),t.cancelBubble=!0,e.cancelBubble=!0,t.isPropagationStopped=i},t.isPropagationStopped=s,t.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation(),t.isImmediatePropagationStopped=i,t.stopPropagation()},t.isImmediatePropagationStopped=s,null!==t.clientX&&void 0!==t.clientX){var r=Ji.documentElement,h=Ji.body;t.pageX=t.clientX+(r&&r.scrollLeft||h&&h.scrollLeft||0)-(r&&r.clientLeft||h&&h.clientLeft||0),t.pageY=t.clientY+(r&&r.scrollTop||h&&h.scrollTop||0)-(r&&r.clientTop||h&&h.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var fe=!1;!function(){try{var t=k.defineProperty({},"passive",{get:function(){fe=!0}});o.addEventListener("test",null,t)}catch(t){}}();var de=["touchstart","touchmove"];function ve(t,i,s){if(Array.isArray(i))return ce(ve,t,i,s);var e=ks(t);if(e.handlers||(e.handlers={}),e.handlers[i]||(e.handlers[i]=[]),s.guid||(s.guid=Ki()),e.handlers[i].push(s),e.dispatcher||(e.disabled=!1,e.dispatcher=function(i,s){if(!e.disabled){i=le(i);var r=e.handlers[i.type];if(r)for(var h=r.slice(0),o=0,a=h.length;o<a&&!i.isImmediatePropagationStopped();o++)try{h[o].call(t,i,s)}catch(t){n.error(t)}}}),1===e.handlers[i].length)if(t.addEventListener){var r=!1;fe&&de.indexOf(i)>-1&&(r={passive:!0}),t.addEventListener(i,e.dispatcher,r)}else t.attachEvent&&t.attachEvent("on"+i,e.dispatcher)}function pe(t,i,s){if(_s(t)){var e=ks(t);if(e.handlers){if(Array.isArray(i))return ce(pe,t,i,s);var n=function(i){e.handlers[i]=[],ue(t,i)};if(i){var r=e.handlers[i];if(r)if(s){if(s.guid)for(var h=0;h<r.length;h++)r[h].guid===s.guid&&r.splice(h--,1);ue(t,i)}else n(i)}else for(var o in e.handlers)n(o)}}}function me(t,i,s){var e=_s(t)?ks(t):{},n=t.parentNode||t.ownerDocument;if("string"==typeof i&&(i={type:i,target:t}),i=le(i),e.dispatcher&&e.dispatcher.call(t,i,s),n&&!i.isPropagationStopped()&&!0===i.bubbles)me.call(null,n,i,s);else if(!n&&!i.defaultPrevented){var r=ks(i.target);i.target[i.type]&&(r.disabled=!0,"function"==typeof i.target[i.type]&&i.target[i.type](),r.disabled=!1)}return!i.defaultPrevented}function ge(t,i,s){if(Array.isArray(i))return ce(ge,t,i,s);var e=function e(){pe(t,i,e),s.apply(this,arguments)};e.guid=s.guid=s.guid||Ki(),ve(t,i,e)}var ye,be=!1,we=function(){if(ds()){var t=Ji.getElementsByTagName("video"),i=Ji.getElementsByTagName("audio"),s=[];if(t&&t.length>0)for(var e=0,n=t.length;e<n;e++)s.push(t[e]);if(i&&i.length>0)for(var r=0,h=i.length;r<h;r++)s.push(i[r]);if(s&&s.length>0)for(var o=0,a=s.length;o<a;o++){var u=s[o];if(!u||!u.getAttribute){ke(1);break}void 0===u.player&&null!==u.getAttribute("data-setup")&&ye(u)}else be||ke(1)}};function ke(t,i){i&&(ye=i),o.setTimeout(we,t)}ds()&&"complete"===Ji.readyState?be=!0:ge(o,"load",(function(){be=!0}));var _e=function(t){var i=Ji.createElement("style");return i.className=t,i},je=function(t,i){t.styleSheet?t.styleSheet.cssText=i:t.textContent=i},xe=function(t,i,s){i.guid||(i.guid=Ki());var e=function(){return i.apply(t,arguments)};return e.guid=s?s+"_"+i.guid:i.guid,e};function Se(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function Te(){for(var t={},i=arguments.length,s=new Array(i),e=0;e<i;e++)s[e]=arguments[e];return s.forEach((function(i){i&&ss(i,(function(i,s){rs(i)?(rs(t[s])||(t[s]={}),t[s]=Te(t[s],i)):t[s]=i}))})),t}var Ce=function(){function t(t,i,s){if(!t&&this.play?this.h=t=this:this.h=t,this.o=Te({},this.o),i=this.o=Te(this.o,i),this.u=i.id||i.el&&i.el.id,!this.u){var e=t&&t.id&&t.id()||"no_player";this.u=e+"l"+Ki()}this.v=i.name||null,i.el?this.m=i.el:!1!==i.createEl&&(this.m=this.createEl()),this.k=[],this.j={},this.S={},!1!==i.initChildren&&this.initChildren(),this.ready(s),!1!==i.reportTouchActivity&&this.enableTouchActivity()}var i=t.prototype;return i.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.k)for(var t=this.k.length-1;t>=0;t--)this.k[t].dispose&&this.k[t].dispose();this.k=null,this.j=null,this.S=null,this.off(),this.m.parentNode&&this.m.parentNode.removeChild(this.m),js(this.m),this.m=null},i.player=function(){return this.h},i.options=function(t){return n.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.o=Te(this.o,t),this.o):this.o},i.el=function(){return this.m},i.createEl=function(t,i,s){return ms(t,i,s)},i.localize=function(t){var i=this.h.language&&this.h.language(),s=this.h.languages&&this.h.languages();if(!i||!s)return t;var e=s[i];if(e&&e[t])return e[t];var n=s[i.split("-")[0]];return n&&n[t]?n[t]:t},i.contentEl=function(){return this.T||this.m},i.id=function(){return this.u},i.name=function(){return this.v},i.children=function(){return this.k},i.getChildById=function(t){return this.j[t]},i.getChild=function(t){if(t)return t=Se(t),this.S[t]},i.addChild=function(i,s,e){var r,h;if(void 0===s&&(s={}),void 0===e&&(e=this.k.length),"string"==typeof i){h=Se(i),s||(s={}),!0===s&&(n.warn("Initializing a child component with `true` is deprecated.Children should be defined in an array when possible, but if necessary use an object instead of `true`."),s={});var o=s.componentClass||h;s.name=h;var a=t.getComponent(o);if(!a)throw new m("Component "+o+" does not exist");if("function"!=typeof a)return null;r=new a(this.h||this,s)}else r=i;if(this.k.splice(e,0,r),"function"==typeof r.id&&(this.j[r.id()]=r),(h=h||r.name&&Se(r.name()))&&(this.S[h]=r),"function"==typeof r.el&&r.el()){var u=this.contentEl().children[e]||null;this.contentEl().insertBefore(r.el(),u)}return r},i.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.k){for(var i=!1,s=this.k.length-1;s>=0;s--)if(this.k[s]===t){i=!0,this.k.splice(s,1);break}if(i){this.j[t.id()]=null,this.S[t.name()]=null;var e=t.el();e&&e.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},i.initChildren=function(){var i=this,s=this.o.children;if(s){var e,n=this.o,r=t.getComponent("Tech");(e=Array.isArray(s)?s:k.keys(s)).concat(k.keys(this.o).filter((function(t){return!e.some((function(i){return"string"==typeof i?t===i:t===i.name}))}))).map((function(t){var e,n;return"string"==typeof t?n=s[e=t]||i.o[e]||{}:(e=t.name,n=t),{name:e,opts:n}})).filter((function(i){var s=t.getComponent(i.opts.componentClass||Se(i.name));return s&&!r.isTech(s)})).forEach((function(t){var s=t.name,e=t.opts;if(void 0!==n[s]&&(e=n[s]),!1!==e){!0===e&&(e={}),e.playerOptions=i.o.playerOptions;var r=i.addChild(s,e);r&&(i[s]=r)}}))}},i.buildCSSClass=function(){return""},i.on=function(t,i,s){var e=this;if("string"==typeof t||Array.isArray(t))ve(this.m,t,xe(this,i));else{var n=t,r=i,h=xe(this,s),o=function(){return e.off(n,r,h)};o.guid=h.guid,this.on("dispose",o);var a=function(){return e.off("dispose",o)};a.guid=h.guid,t.nodeName?(ve(n,r,h),ve(n,"dispose",a)):"function"==typeof t.on&&(n.on(r,h),n.on("dispose",a))}return this},i.off=function(t,i,s){if(!t||"string"==typeof t||Array.isArray(t))pe(this.m,t,i);else{var e=t,n=i,r=xe(this,s);this.off("dispose",r),t.nodeName?(pe(e,n,r),pe(e,"dispose",r)):(e.off(n,r),e.off("dispose",r))}return this},i.one=function(t,i,s){var e=arguments,n=this;if("string"==typeof t||Array.isArray(t))ge(this.m,t,xe(this,i));else{var r=t,h=i,o=xe(this,s),a=function t(){n.off(r,h,t),o.apply(null,e)};a.guid=o.guid,this.on(r,h,a)}return this},i.trigger=function(t,i){return me(this.m,t,i),this},i.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.C?i?t.call(this):this.setTimeout(t,1):(this.P=this.P||[],this.P.push(t))),this},i.triggerReady=function(){this.C=!0,this.setTimeout((function(){var t=this.P;this.P=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},i.$=function(t,i){return Rs(t,i||this.contentEl())},i.$$=function(t,i){return Os(t,i||this.contentEl())},i.hasClass=function(t){return xs(this.m,t)},i.addClass=function(t){return Ss(this.m,t),this},i.removeClass=function(t){return Ts(this.m,t),this},i.toggleClass=function(t,i){return Cs(this.m,t,i),this},i.show=function(){return this.removeClass("vjs-hidden"),this},i.hide=function(){return this.addClass("vjs-hidden"),this},i.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},i.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},i.getAttribute=function(t){return function(t,i){return t.getAttribute(i)}(this.m,t)},i.setAttribute=function(t,i){return Ms(this.m,t,i),this},i.removeAttribute=function(t){return Is(this.m,t),this},i.width=function(t,i){return this.dimension("width",t,i)},i.height=function(t,i){return this.dimension("height",t,i)},i.dimensions=function(t,i){return this.width(t,!0).height(i)},i.dimension=function(t,i,s){if(void 0!==i)return null!==i&&i==i||(i=0),-1!==(""+i).indexOf("%")||-1!==(""+i).indexOf("px")?this.m.style[t]=i:this.m.style[t]="auto"===i?"":i+"px",s||this.trigger("resize"),this;if(!this.m)return 0;var e=this.m.style[t],n=e.indexOf("px");return j(-1!==n?e.slice(0,n):this.m["offset"+Se(t)],10)},i.currentDimension=function(t){var i=0;if("width"!==t&&"height"!==t)throw new m("currentDimension only accepts width or height value");if("function"==typeof o.getComputedStyle){var s=o.getComputedStyle(this.m);i=s.getPropertyValue(t)||s[t]}if(0===(i=x(i))){var e="offset"+Se(t);i=this.m[e]}return i},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.m.focus()},i.blur=function(){this.m.blur()},i.emitTapEvents=function(){var t,i=0,s=null;this.on("touchstart",(function(e){1===e.touches.length&&(s={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},i=(new Date).getTime(),t=!0)})),this.on("touchmove",(function(i){if(i.touches.length>1)t=!1;else if(s){var e=i.touches[0].pageX-s.pageX,n=i.touches[0].pageY-s.pageY;_.sqrt(e*e+n*n)>10&&(t=!1)}}));var e=function(){t=!1};this.on("touchleave",e),this.on("touchcancel",e),this.on("touchend",(function(e){(s=null,!0===t)&&((new Date).getTime()-i<200&&(e.preventDefault(),this.trigger("tap")))}))},i.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,i=xe(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){i(),this.clearInterval(t),t=this.setInterval(i,250)}));var s=function(s){i(),this.clearInterval(t)};this.on("touchmove",i),this.on("touchend",s),this.on("touchcancel",s)}},i.setTimeout=function(t,i){t=xe(this,t);var s=o.setTimeout(t,i),e=function(){this.clearTimeout(s)};return e.guid="vjs-timeout-"+s,this.on("dispose",e),s},i.clearTimeout=function(t){o.clearTimeout(t);var i=function(){};return i.guid="vjs-timeout-"+t,this.off("dispose",i),t},i.setInterval=function(t,i){t=xe(this,t);var s=o.setInterval(t,i),e=function(){this.clearInterval(s)};return e.guid="vjs-interval-"+s,this.on("dispose",e),s},i.clearInterval=function(t){o.clearInterval(t);var i=function(){};return i.guid="vjs-interval-"+t,this.off("dispose",i),t},t.registerComponent=function(i,s){if(i){if(i=Se(i),t.A||(t.A={}),"Player"===i&&t.A[i]){var e=t.A[i];if(e.players&&k.keys(e.players).length>0&&k.keys(e.players).map((function(t){return e.players[t]})).every(Boolean))throw new m("Can not register Player component after player has been created")}return t.A[i]=s,s}},t.getComponent=function(i){if(i)return i=Se(i),t.A&&t.A[i]?t.A[i]:o&&o.videojs&&o.videojs[i]?(n.warn("The "+i+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),o.videojs[i]):void 0},t.extend=function(i){i=i||{},n.warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var s=i.init||i.init||this.prototype.init||this.prototype.init||function(){},e=function(){s.apply(this,arguments)};for(var r in(e.prototype=k.create(this.prototype)).constructor=e,e.extend=t.extend,i)i.hasOwnProperty(r)&&(e.prototype[r]=i[r]);return e},t}();Ce.registerComponent("Component",Ce);var Pe=function(){};function Ae(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Me(t,i){return(Me=k.setPrototypeOf?k.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function Ie(t,i){t.prototype=k.create(i.prototype),t.prototype.constructor=t,Me(t,i)}function Ee(t,i,s,e){return void 0===e&&(n.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),e=0),function(t,i,s){if(i<0||i>s)throw new m("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+i+") is greater than or equal to the maximum bound ("+s+").")}(t,e,s.length-1),s[e][i]}function De(t){return void 0===t||0===t.length?{length:0,start:function(){throw new m("This TimeRanges object is empty")},end:function(){throw new m("This TimeRanges object is empty")}}:{length:t.length,start:Ee.bind(null,"start",0,t),end:Ee.bind(null,"end",1,t)}}function Fe(t,i){return Array.isArray(t)?De(t):void 0===t||void 0===i?De():De([[t,i]])}function Ne(t,i){var s,e,n=0;if(!i)return 0;t&&t.length||(t=Fe(0,0));for(var r=0;r<t.length;r++)s=t.start(r),(e=t.end(r))>i&&(e=i),n+=e-s;return n/i}Pe.prototype.M={},Pe.prototype.on=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},ve(this,t,i),this.addEventListener=s},Pe.prototype.addEventListener=Pe.prototype.on,Pe.prototype.off=function(t,i){pe(this,t,i)},Pe.prototype.removeEventListener=Pe.prototype.off,Pe.prototype.one=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},ge(this,t,i),this.addEventListener=s},Pe.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=le(t),this.M[i]&&this["on"+i]&&this["on"+i](t),me(this,t)},Pe.prototype.dispatchEvent=Pe.prototype.trigger;var $e,Be,Re,Oe,Ve={prefixed:!0},Le=[["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"]],Ue=Le[0];for(Be=0;Be<Le.length;Be++)if(Le[Be][1]in Ji){$e=Le[Be];break}if($e){for(Re=0;Re<$e.length;Re++)Ve[Ue[Re]]=$e[Re];Ve.prefixed=$e[0]!==Ue[0]}function He(t){if(t instanceof He)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:ns(t)&&("number"==typeof t.code&&(this.code=t.code),es(this,t)),this.message||(this.message=He.defaultMessages[this.code]||"")}for(He.prototype.code=0,He.prototype.message="",He.prototype.status=null,He.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],He.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."},Oe=0;Oe<He.errorTypes.length;Oe++)He[He.errorTypes[Oe]]=Oe,He.prototype[He.errorTypes[Oe]]=Oe;var ze=function(t,i){var s,e=null;try{s=JSON.parse(t,i)}catch(t){e=t}return[e,s]};var We=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(i,s,e){return t[s]&&(i[s]=t[s]),i}),{cues:t.cues&&Array.prototype.map.call(t.cues,(function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}}))})},qe=function(t){var i=t.$$("track"),s=Array.prototype.map.call(i,(function(t){return t.track}));return Array.prototype.map.call(i,(function(t){var i=We(t.track);return t.src&&(i.src=t.src),i})).concat(Array.prototype.filter.call(t.textTracks(),(function(t){return-1===s.indexOf(t)})).map(We))},Ge=function(t,i){return t.forEach((function(t){var s=i.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach((function(t){return s.addCue(t)}))})),i.textTracks()},Xe="vjs-modal-dialog",Je=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).I=e.D=e.F=!1,e.closeable(!e.o.uncloseable),e.content(e.o.content),e.T=ms("div",{className:Xe+"-content"},{role:"document"}),e.N=ms("p",{className:Xe+"-description vjs-offscreen",id:e.el().getAttribute("aria-describedby")}),gs(e.N,e.description()),e.m.appendChild(e.N),e.m.appendChild(e.T),e.on(i,"languagechange",e.handleLanguagechange),e}Ie(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"B","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},s.buildCSSClass=function(){return Xe+" vjs-hidden "+t.prototype.buildCSSClass.call(this)},s.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},s.label=function(){return this.o.label||this.localize("Modal Window")},s.description=function(){var t=this.o.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},s.open=function(){if(!this.I){var t=this.player();this.trigger("beforemodalopen"),this.I=!0,(this.o.fillAlways||!this.D&&!this.F)&&this.fill(),this.R=!t.paused(),this.o.pauseOnOpen&&this.R&&t.pause(),this.closeable()&&this.on(this.m.ownerDocument,"keydown",xe(this,this.handleKeyPress)),t.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.D=!0}return this},s.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.I},s.close=function(){if(this.I){var t=this.player();this.trigger("beforemodalclose"),this.I=!1,this.R&&this.o.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.m.ownerDocument,"keydown",xe(this,this.handleKeyPress)),t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.o.temporary&&this.dispose()}return this},s.closeable=function(t){if("boolean"==typeof t){var i=this.O=!!t,s=this.getChild("closeButton");if(i&&!s){var e=this.T;this.T=this.m,s=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.T=e,this.on(s,"close",this.close)}!i&&s&&(this.off(s,"close",this.close),this.removeChild(s),s.dispose())}return this.O},s.fill=function(){return this.fillWith(this.content())},s.fillWith=function(t){var i=this.contentEl(),s=i.parentNode,e=i.nextSibling;return this.trigger("beforemodalfill"),this.F=!0,s.removeChild(i),this.empty(),Bs(i,t),this.trigger("modalfill"),e?s.insertBefore(i,e):s.appendChild(i),this},s.empty=function(){return this.trigger("beforemodalempty"),Ns(this.contentEl()),this.trigger("modalempty"),this},s.content=function(t){return void 0!==t&&(this.V=t),this.V},s.handleLanguagechange=function(){this.m.setAttribute("aria-label",this.label()),gs(this.N,this.description()),this.opened()?this.fill():(this.D||this.F)&&(this.D=!1,this.F=!1,this.empty())},i}(Ce);Je.prototype.o={pauseOnOpen:!0,temporary:!0},Ce.registerComponent("ModalDialog",Je);var Qe=function(){function t(i){var s=this;if(se)for(var e in s=Ji.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);if(t.prototype.L.call(s,i),k.defineProperty(s,"length",{get:function(){return this.U}}),se)return s}var i=t.prototype;return i.L=function(t){var i=this.length||0,s=0,e=t.length;this.H=t,this.U=t.length;var n=function(t){""+t in this||k.defineProperty(this,""+t,{get:function(){return this.H[t]}})};if(i<e)for(s=i;s<e;s++)n.call(this,s)},i.getCueById=function(t){for(var i=null,s=0,e=this.length;s<e;s++){var n=this[s];if(n.id===t){i=n;break}}return i},t}(),Ye={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Ke={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Ze={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},tn={disabled:"disabled",hidden:"hidden",showing:"showing"},sn=function(t){function i(s){var e;void 0===s&&(s={});var n=Ae(e=t.call(this)||this);if(se)for(var r in n=Ji.createElement("custom"),i.prototype)"constructor"!==r&&(n[r]=i.prototype[r]);var h={id:s.id||["vjs_track",Ki()].join("_"),kind:s.kind||"",label:s.label||"",language:s.language||""},o=function(t){k.defineProperty(n,t,{get:function(){return h[t]},set:function(){}})};for(var a in h)o(a);return n||Ae(e)}return Ie(i,t),i}(Pe),en=function(t){var i=["protocol","hostname","port","pathname","search","hash","host"],s=Ji.createElement("a");s.href=t;var e,n=""===s.host&&"file:"!==s.protocol;n&&((e=Ji.createElement("div")).innerHTML='<a href="'+t+'"></a>',s=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),Ji.body.appendChild(e));for(var r={},h=0;h<i.length;h++)r[i[h]]=s[i[h]];return"http:"===r.protocol&&(r.host=r.host.replace(/:80$/,"")),"https:"===r.protocol&&(r.host=r.host.replace(/:443$/,"")),n&&Ji.body.removeChild(e),r},nn=function(t){var i=o.location,s=en(t);return(":"===s.protocol?i.protocol:s.protocol)+s.host!==i.protocol+i.host},rn={exports:{}};void 0!==a?rn.exports=a:void 0!==os?rn.exports=os:"undefined"!=typeof self?rn.exports=self:rn.exports={};var hn=function(t){var i=on.call(t);return"[object Function]"===i||"function"==typeof t&&"[object RegExp]"!==i||void 0!==a&&(t===a.setTimeout||t===a.alert||t===a.confirm||t===a.prompt)},on=k.prototype.toString;var an,un,cn,ln,fn,dn,vn,pn,mn,gn,yn,bn,wn=Array.prototype.slice,kn=k.prototype.toString,_n=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==kn.call(i))throw new g("Function.prototype.bind called on incompatible "+i);for(var s,e=wn.call(arguments,1),n=_.max(0,i.length-e.length),r=[],h=0;h<n;h++)r.push("$"+h);if(s=Function("binder","return function ("+r.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof s){var n=i.apply(this,e.concat(wn.call(arguments)));return k(n)===n?n:this}return i.apply(t,e.concat(wn.call(arguments)))})),i.prototype){var o=function(){};o.prototype=i.prototype,s.prototype=new o,o.prototype=null}return s},jn=Function.prototype.bind||_n,xn=k.prototype.toString,Sn=function(t){var i=xn.call(t),s="[object Arguments]"===i;return s||(s="[object Array]"!==i&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===xn.call(t.callee)),s};k.keys||(un=k.prototype.hasOwnProperty,cn=k.prototype.toString,ln=Sn,fn=k.prototype.propertyIsEnumerable,dn=!fn.call({toString:null},"toString"),vn=fn.call((function(){}),"prototype"),pn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],mn=function(t){var i=t.constructor;return i&&i.prototype===t},gn={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},yn=function(){if(void 0===a)return!1;for(var t in a)try{if(!gn["$"+t]&&un.call(a,t)&&null!==a[t]&&"object"==typeof a[t])try{mn(a[t])}catch(t){return!0}}catch(t){return!0}return!1}(),bn=function(t){if(void 0===a||!yn)return mn(t);try{return mn(t)}catch(t){return!1}},an=function(t){var i=null!==t&&"object"==typeof t,s="[object Function]"===cn.call(t),e=ln(t),n=i&&"[object String]"===cn.call(t),r=[];if(!i&&!s&&!e)throw new g("Object.keys called on a non-object");var h=vn&&s;if(n&&t.length>0&&!un.call(t,0))for(var o=0;o<t.length;++o)r.push(String(o));if(e&&t.length>0)for(var a=0;a<t.length;++a)r.push(String(a));else for(var u in t)h&&"prototype"===u||!un.call(t,u)||r.push(String(u));if(dn)for(var c=bn(t),l=0;l<pn.length;++l)c&&"constructor"===pn[l]||!un.call(t,pn[l])||r.push(pn[l]);return r});var Tn=an,Cn=Array.prototype.slice,Pn=Sn,An=k.keys,Mn=An?function(t){return An(t)}:Tn,In=k.keys;Mn.shim=function(){if(k.keys){var t=function(){var t=k.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(k.keys=function(t){return Pn(t)?In(Cn.call(t)):In(t)})}else k.keys=Mn;return k.keys||Mn};var En=Mn,Dn="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),Fn=k.prototype.toString,Nn=Array.prototype.concat,$n=k.defineProperty,Bn=$n&&function(){var t={};try{for(var i in $n(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),Rn=function(t,i,s,e){(!(i in t)||function(t){return"function"==typeof t&&"[object Function]"===Fn.call(t)}(e)&&e())&&(Bn?$n(t,i,{configurable:!0,enumerable:!1,value:s,writable:!0}):t[i]=s)},On=function(t,i){var s=arguments.length>2?arguments[2]:{},e=En(i);Dn&&(e=Nn.call(e,k.getOwnPropertySymbols(i)));for(var n=0;n<e.length;n+=1)Rn(t,e[n],i[e[n]],s[e[n]])};On.supportsDescriptors=!!Bn;var Vn,Ln=On,Un=k.getOwnPropertyDescriptor?function(){return k.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new g},Hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,zn=k.getPrototypeOf||function(t){return t.__proto__},Wn=void 0===T?Vn:zn(T),qn={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?Vn:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?Vn:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":Hn?zn([][Symbol.iterator]()):Vn,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":Vn,"$ %AsyncFunction%":undefined,"$ %AsyncFunctionPrototype%":Vn,"$ %AsyncGenerator%":Vn,"$ %AsyncGeneratorFunction%":undefined,"$ %AsyncGeneratorPrototype%":Vn,"$ %AsyncIteratorPrototype%":Vn,"$ %Atomics%":"undefined"==typeof Atomics?Vn:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?Vn:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?Vn:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":m,"$ %ErrorPrototype%":m.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?Vn:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?Vn:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?Vn:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?Vn:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":Vn,"$ %GeneratorFunction%":undefined,"$ %GeneratorPrototype%":Vn,"$ %Int8Array%":"undefined"==typeof Int8Array?Vn:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?Vn:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?Vn:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?Vn:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?Vn:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?Vn:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":S,"$ %IteratorPrototype%":Hn?zn(zn([][Symbol.iterator]())):Vn,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?Vn:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&Hn?zn((new Map)[Symbol.iterator]()):Vn,"$ %MapPrototype%":"undefined"==typeof Map?Vn:Map.prototype,"$ %Math%":_,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":k,"$ %ObjectPrototype%":k.prototype,"$ %ObjProto_toString%":k.prototype.toString,"$ %ObjProto_valueOf%":k.prototype.valueOf,"$ %parseFloat%":x,"$ %parseInt%":j,"$ %Promise%":"undefined"==typeof Promise?Vn:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?Vn:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?Vn:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?Vn:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?Vn:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?Vn:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?Vn:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?Vn:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?Vn:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&Hn?zn((new Set)[Symbol.iterator]()):Vn,"$ %SetPrototype%":"undefined"==typeof Set?Vn:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Vn:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?Vn:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":Hn?zn(""[Symbol.iterator]()):Vn,"$ %StringPrototype%":String.prototype,"$ %Symbol%":Hn?Symbol:Vn,"$ %SymbolPrototype%":Hn?Symbol.prototype:Vn,"$ %SyntaxError%":w,"$ %SyntaxErrorPrototype%":w.prototype,"$ %ThrowTypeError%":Un,"$ %TypedArray%":Wn,"$ %TypedArrayPrototype%":Wn?Wn.prototype:Vn,"$ %TypeError%":g,"$ %TypeErrorPrototype%":g.prototype,"$ %Uint8Array%":void 0===T?Vn:T,"$ %Uint8ArrayPrototype%":void 0===T?Vn:T.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Vn:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?Vn:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?Vn:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?Vn:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?Vn:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?Vn:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?Vn:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?Vn:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?Vn:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?Vn:WeakSet.prototype},Gn=function(t,i){if(arguments.length>1&&"boolean"!=typeof i)throw new g('"allowMissing" argument must be a boolean');var s="$ "+t;if(!(s in qn))throw new w("intrinsic "+t+" does not exist!");if(void 0===qn[s]&&!i)throw new g("intrinsic "+t+" exists, but is not available. Please file an issue!");return qn[s]},Xn=jn.call(Function.call,k.prototype.hasOwnProperty),Jn=Gn,Qn=Jn("%TypeError%"),Yn=Jn("%SyntaxError%"),Kn=Xn,Zn={"Property Descriptor":function(t,i){if("Object"!==t.Type(i))return!1;var s={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var e in i)if(Kn(i,e)&&!s[e])return!1;var n=Kn(i,"[[Value]]"),r=Kn(i,"[[Get]]")||Kn(i,"[[Set]]");if(n&&r)throw new Qn("Property Descriptors may not be both accessor and data descriptors");return!0}},tr=Number.isNaN||function(t){return t!=t},ir=Number.isNaN||function(t){return t!=t},sr=Number.isFinite||function(t){return"number"==typeof t&&!ir(t)&&t!==1/0&&t!==-1/0},er=Function.prototype.toString,nr=/^\s*class\b/,rr=function(t){try{var i=er.call(t);return nr.test(i)}catch(t){return!1}},hr=k.prototype.toString,or="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,ar=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(or)return function(t){try{return!rr(t)&&(er.call(t),!0)}catch(t){return!1}}(t);if(rr(t))return!1;var i=hr.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},ur=k.prototype.toString,cr=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},lr=ar,fr=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===ur.call(t)?String:Number)===String||i===Number){var s,e,n=i===String?["toString","valueOf"]:["valueOf","toString"];for(e=0;e<n.length;++e)if(lr(t[n[e]])&&(s=t[n[e]](),cr(s)))return s;throw new g("No default value")}throw new g("invalid [[DefaultValue]] hint supplied")},dr=Gn,vr=dr("%Object%"),pr=dr("%TypeError%"),mr=dr("%String%"),gr=function(t,i,s,e){var n=Zn[i];if("function"!=typeof n)throw new Yn("unknown record type: "+i);if(!n(t,e))throw new Qn(s+" must be a "+i);console.log(n(t,e),e)},yr=tr,br=sr,wr=function(t){return t>=0?1:-1},kr=function(t,i){var s=t%i;return _.floor(s>=0?s:s+i)},_r=Xn,jr={ToPrimitive:function(t){return cr(t)?t:arguments.length>1?fr(t,arguments[1]):fr(t)},ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return yr(i)?0:0!==i&&br(i)?wr(i)*_.floor(_.abs(i)):i},ToInt32:function(t){return this.ToNumber(t)>>0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var i=this.ToNumber(t);if(yr(i)||0===i||!br(i))return 0;var s=wr(i)*_.floor(_.abs(i));return kr(s,65536)},ToString:function(t){return mr(t)},ToObject:function(t){return this.CheckObjectCoercible(t),vr(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new pr(i||"Cannot call method on "+t);return t},IsCallable:ar,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:yr(t)&&yr(i)},Type:function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0},IsPropertyDescriptor:function(t){if("Object"!==this.Type(t))return!1;var i={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var s in t)if(_r(t,s)&&!i[s])return!1;var e=_r(t,"[[Value]]"),n=_r(t,"[[Get]]")||_r(t,"[[Set]]");if(e&&n)throw new pr("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(gr(this,"Property Descriptor","Desc",t),!(!_r(t,"[[Get]]")&&!_r(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(gr(this,"Property Descriptor","Desc",t),!(!_r(t,"[[Value]]")&&!_r(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(gr(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(gr(this,"Property Descriptor","Desc",t),this.IsDataDescriptor(t))return{value:t["[[Value]]"],writable:!!t["[[Writable]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};if(this.IsAccessorDescriptor(t))return{get:t["[[Get]]"],set:t["[[Set]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};throw new pr("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new pr("ToPropertyDescriptor requires an object");var i={};if(_r(t,"enumerable")&&(i["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),_r(t,"configurable")&&(i["[[Configurable]]"]=this.ToBoolean(t.configurable)),_r(t,"value")&&(i["[[Value]]"]=t.value),_r(t,"writable")&&(i["[[Writable]]"]=this.ToBoolean(t.writable)),_r(t,"get")){var s=t.get;if(void 0!==s&&!this.IsCallable(s))throw new g("getter must be a function");i["[[Get]]"]=s}if(_r(t,"set")){var e=t.set;if(void 0!==e&&!this.IsCallable(e))throw new pr("setter must be a function");i["[[Set]]"]=e}if((_r(i,"[[Get]]")||_r(i,"[[Set]]"))&&(_r(i,"[[Value]]")||_r(i,"[[Writable]]")))throw new pr("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},xr=jn.call(Function.call,String.prototype.replace),Sr=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,Tr=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,Cr=function(){var t=jr.ToString(jr.CheckObjectCoercible(this));return xr(xr(t,Sr,""),Tr,"")},Pr=Cr,Ar=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:Pr},Mr=Ln,Ir=Ar,Er=Ln,Dr=Cr,Fr=Ar,Nr=function(){var t=Ir();return Mr(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},$r=jn.call(Function.call,Fr());Er($r,{getPolyfill:Fr,implementation:Dr,shim:Nr});var Br=$r,Rr=ar,Or=k.prototype.toString,Vr=k.prototype.hasOwnProperty,Lr=Br,Ur=function(t,i,s){if(!Rr(i))throw new g("iterator must be a function");var e;arguments.length>=3&&(e=s),"[object Array]"===Or.call(t)?function(t,i,s){for(var e=0,n=t.length;e<n;e++)Vr.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e):"string"==typeof t?function(t,i,s){for(var e=0,n=t.length;e<n;e++)null==s?i(t.charAt(e),e,t):i.call(s,t.charAt(e),e,t)}(t,i,e):function(t,i,s){for(var e in t)Vr.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e)},Hr=function(){for(var t={},i=0;i<arguments.length;i++){var s=arguments[i];for(var e in s)zr.call(s,e)&&(t[e]=s[e])}return t},zr=k.prototype.hasOwnProperty;var Wr=rn.exports,qr=hn,Gr=function(t){if(!t)return{};var i={};return Ur(Lr(t).split("\n"),(function(t){var s=t.indexOf(":"),e=Lr(t.slice(0,s)).toLowerCase(),n=Lr(t.slice(s+1));void 0===i[e]?i[e]=n:!function(t){return"[object Array]"===k.prototype.toString.call(t)}(i[e])?i[e]=[i[e],n]:i[e].push(n)})),i},Xr=Hr,Jr=Yr;function Qr(t,i,s){var e=t;return qr(i)?(s=i,"string"==typeof t&&(e={uri:t})):e=Xr(i,{uri:t}),e.callback=s,e}function Yr(t,i,s){return Kr(i=Qr(t,i,s))}function Kr(t){if(void 0===t.callback)throw new m("callback argument missing");var i=!1,s=function(s,e,n){i||(i=!0,t.callback(s,e,n))};function e(){var t=void 0;if(t=u.response?u.response:u.responseText||function(t){if("document"===t.responseType)return t.responseXML;var i=204===t.status&&t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!i)return t.responseXML;return null}(u),b)try{t=JSON.parse(t)}catch(t){}return t}var n={body:void 0,headers:{},statusCode:0,method:f,url:l,rawRequest:u};function r(t){return p(c),t instanceof m||(t=new m(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,n)}function h(){if(!a){var i;p(c),i=t.useXDR&&void 0===u.status?200:1223===u.status?204:u.status;var r=n,h=null;return 0!==i?(r={body:e(),statusCode:i,method:f,headers:{},url:l,rawRequest:u},u.getAllResponseHeaders&&(r.headers=Gr(u.getAllResponseHeaders()))):h=new m("Internal XMLHttpRequest Error"),s(h,r,r.body)}}var o,a,u=t.xhr||null;u||(u=t.cors||t.useXDR?new Yr.XDomainRequest:new Yr.XMLHttpRequest);var c,l=u.url=t.uri||t.url,f=u.method=t.method||"GET",d=t.body||t.data||null,g=u.headers=t.headers||{},y=!!t.sync,b=!1;if("json"in t&&(b=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==f&&"HEAD"!==f&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),d=JSON.stringify(t.json))),u.onreadystatechange=function(){4===u.readyState&&h()},u.onload=h,u.onerror=r,u.onprogress=function(){},u.ontimeout=r,u.open(f,l,!y,t.username,t.password),y||(u.withCredentials=!!t.withCredentials),!y&&t.timeout>0&&(c=v((function(){a=!0,u.abort("timeout");var t=new m("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}),t.timeout)),u.setRequestHeader)for(o in g)g.hasOwnProperty(o)&&u.setRequestHeader(o,g[o]);else if(t.headers&&!function(t){for(var i in t)if(t.hasOwnProperty(i))return!1;return!0}(t.headers))throw new m("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(u.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(u),u.send(d),u}Yr.XMLHttpRequest=Wr.XMLHttpRequest||function(){},Yr.XDomainRequest="withCredentials"in new Yr.XMLHttpRequest?Yr.XMLHttpRequest:Wr.XDomainRequest,function(t,i){for(var s=0;s<t.length;s++)i(t[s])}(["get","put","post","patch","head","delete"],(function(t){Yr["delete"===t?"del":t]=function(i,s,e){return(s=Qr(i,s,e)).method=t.toUpperCase(),Kr(s)}}));var Zr=function(t,i){var s=new o.WebVTT.Parser(o,o.vttjs,o.WebVTT.StringDecoder()),e=[];s.oncue=function(t){i.addCue(t)},s.onparsingerror=function(t){e.push(t)},s.onflush=function(){i.trigger({type:"loadeddata",target:i})},s.parse(t),e.length>0&&(o.console&&o.console.groupCollapsed&&o.console.groupCollapsed("Text Track parsing errors for "+i.src),e.forEach((function(t){return n.error(t)})),o.console&&o.console.groupEnd&&o.console.groupEnd()),s.flush()},th=function(t){function i(s){var e;if(void 0===s&&(s={}),!s.tech)throw new m("A tech was not provided.");var r=Te(s,{kind:Ze[s.kind]||"subtitles",language:s.language||s.srclang||""}),h=tn[r.mode]||"disabled",a=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(h="hidden");var u=e=t.call(this,r)||this;if(u.W=r.tech,se)for(var c in i.prototype)"constructor"!==c&&(u[c]=i.prototype[c]);u.H=[],u.q=[];var l=new Qe(u.H),f=new Qe(u.q),d=!1,v=xe(u,(function(){this.activeCues,d&&(this.trigger("cuechange"),d=!1)}));return"disabled"!==h&&u.W.ready((function(){u.W.on("timeupdate",v)}),!0),k.defineProperty(u,"default",{get:function(){return a},set:function(){}}),k.defineProperty(u,"mode",{get:function(){return h},set:function(t){var i=this;tn[t]&&("showing"===(h=t)&&this.W.ready((function(){i.W.on("timeupdate",v)}),!0),this.trigger("modechange"))}}),k.defineProperty(u,"cues",{get:function(){return this.G?l:null},set:function(){}}),k.defineProperty(u,"activeCues",{get:function(){if(!this.G)return null;if(0===this.cues.length)return f;for(var t=this.W.currentTime(),i=[],s=0,e=this.cues.length;s<e;s++){var n=this.cues[s];(n.startTime<=t&&n.endTime>=t||n.startTime===n.endTime&&n.startTime<=t&&n.startTime+.5>=t)&&i.push(n)}if(d=!1,i.length!==this.q.length)d=!0;else for(var r=0;r<i.length;r++)-1===this.q.indexOf(i[r])&&(d=!0);return this.q=i,f.L(this.q),f},set:function(){}}),r.src?(u.src=r.src,function(t,i){var s={uri:t},e=nn(t);e&&(s.cors=e),Jr(s,xe(this,(function(t,s,e){if(t)return n.error(t,s);if(i.G=!0,"function"!=typeof o.WebVTT){if(i.W){var r=function(){return Zr(e,i)};i.W.on("vttjsloaded",r),i.W.on("vttjserror",(function(){n.error("vttjs failed to load, stopping trying to process "+i.src),i.W.off("vttjsloaded",r)}))}}else Zr(e,i)})))}(r.src,u)):u.G=!0,u||Ae(e)}Ie(i,t);var s=i.prototype;return s.addCue=function(t){var i=t;if(o.vttjs&&!(t instanceof o.vttjs.VTTCue)){for(var s in i=new o.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)s in i||(i[s]=t[s]);i.id=t.id,i.X=t}var e=this.W.textTracks();if(e)for(var n=0;n<e.length;n++)e[n]!==this&&e[n].removeCue(i);this.H.push(i),this.cues.L(this.H)},s.removeCue=function(t){for(var i=this.H.length;i--;){var s=this.H[i];if(s===t||s.X&&s.X===t){this.H.splice(i,1),this.cues.L(this.H);break}}},i}(sn);th.prototype.M={cuechange:"cuechange"};var ih=function(t){function i(s){var e,n;void 0===s&&(s={});var r=Ae(e=t.call(this)||this);if(se)for(var h in r=Ji.createElement("custom"),i.prototype)"constructor"!==h&&(r[h]=i.prototype[h]);var o=new th(s);return r.kind=o.kind,r.src=o.src,r.srclang=o.language,r.label=o.label,r.default=o.default,k.defineProperty(r,"readyState",{get:function(){return n}}),k.defineProperty(r,"track",{get:function(){return o}}),n=0,o.addEventListener("loadeddata",(function(){n=2,r.trigger({type:"load",target:r})})),se?r||Ae(e):e}return Ie(i,t),i}(Pe);ih.prototype.M={load:"load"},ih.NONE=0,ih.LOADING=1,ih.LOADED=2,ih.ERROR=3;var sh,eh=function(){function t(i){void 0===i&&(i=[]);var s=this;if(se)for(var e in s=Ji.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);s.J=[],k.defineProperty(s,"length",{get:function(){return this.J.length}});for(var n=0,r=i.length;n<r;n++)s.Y(i[n]);if(se)return s}var i=t.prototype;return i.Y=function(t){var i=this.J.length;""+i in this||k.defineProperty(this,i,{get:function(){return this.J[i]}}),-1===this.J.indexOf(t)&&this.J.push(t)},i.K=function(t){for(var i,s=0,e=this.J.length;s<e;s++)if(t===this.J[s].track){i=this.J[s];break}return i},i.Z=function(t){for(var i=0,s=this.J.length;i<s;i++)if(t===this.J[i]){this.J.splice(i,1);break}},t}(),nh=function(t){function i(s,e){var n;if(void 0===s&&(s=[]),void 0===e&&(e=null),n=t.call(this)||this,!e&&(e=Ae(n),se))for(var r in e=Ji.createElement("custom"),i.prototype)"constructor"!==r&&(e[r]=i.prototype[r]);e.tt=[],k.defineProperty(e,"length",{get:function(){return this.tt.length}});for(var h=0;h<s.length;h++)e.it(s[h]);return e||Ae(n)}Ie(i,t);var s=i.prototype;return s.it=function(t){var i=this.tt.length;""+i in this||k.defineProperty(this,i,{get:function(){return this.tt[i]}}),-1===this.tt.indexOf(t)&&(this.tt.push(t),this.trigger({track:t,type:"addtrack"}))},s.st=function(t){for(var i,s=0,e=this.length;s<e;s++)if(this[s]===t){(i=this[s]).off&&i.off(),this.tt.splice(s,1);break}i&&this.trigger({track:i,type:"removetrack"})},s.getTrackById=function(t){for(var i=null,s=0,e=this.length;s<e;s++){var n=this[s];if(n.id===t){i=n;break}}return i},i}(Pe);for(sh in nh.prototype.M={change:"change",addtrack:"addtrack",removetrack:"removetrack"},nh.prototype.M)nh.prototype["on"+sh]=null;var rh=function(t){function i(s){var e,n;if(void 0===s&&(s=[]),se){for(var r in n=Ji.createElement("custom"),nh.prototype)"constructor"!==r&&(n[r]=nh.prototype[r]);for(var h in i.prototype)"constructor"!==h&&(n[h]=i.prototype[h])}return(n=e=t.call(this,s,n)||this)||Ae(e)}return Ie(i,t),i.prototype.it=function(i){t.prototype.it.call(this,i),i.addEventListener("modechange",xe(this,(function(){this.trigger("change")})))},i}(nh),hh=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].selected=!1)},oh=function(t){function i(s){var e,n;void 0===s&&(s=[]);for(var r=s.length-1;r>=0;r--)if(s[r].selected){hh(s,s[r]);break}if(se){for(var h in n=Ji.createElement("custom"),nh.prototype)"constructor"!==h&&(n[h]=nh.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).et=!1,k.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n||Ae(e)}Ie(i,t);var s=i.prototype;return s.it=function(i){var s=this;i.selected&&hh(this,i),t.prototype.it.call(this,i),i.addEventListener&&i.addEventListener("selectedchange",(function(){s.et||(s.et=!0,hh(s,i),s.et=!1,s.trigger("change"))}))},s.addTrack=function(t){this.it(t)},s.removeTrack=function(i){t.prototype.st.call(this,i)},i}(nh),ah=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].enabled=!1)},uh=function(t){function i(s){var e,n;void 0===s&&(s=[]);for(var r=s.length-1;r>=0;r--)if(s[r].enabled){ah(s,s[r]);break}if(se){for(var h in n=Ji.createElement("custom"),nh.prototype)"constructor"!==h&&(n[h]=nh.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).et=!1,n||Ae(e)}Ie(i,t);var s=i.prototype;return s.it=function(i){var s=this;i.enabled&&ah(this,i),t.prototype.it.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",(function(){s.et||(s.et=!0,ah(s,i),s.et=!1,s.trigger("change"))}))},s.addTrack=function(t){this.it(t)},s.removeTrack=function(i){t.prototype.st.call(this,i)},i}(nh),ch=void 0;var lh=function(t){function i(i,s){var e;return void 0===i&&(i={}),void 0===s&&(s=function(){}),i.reportTouchActivity=!1,(e=t.call(this,null,i,s)||this).nt=!1,e.on("playing",(function(){this.nt=!0})),e.on("loadstart",(function(){this.nt=!1})),e.rt=i.textTracks,e.ht=i.videoTracks,e.ot=i.audioTracks,e.featuresProgressEvents||e.manualProgressOn(),e.featuresTimeupdateEvents||e.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(t){!1===i["native"+t+"Tracks"]&&(e["featuresNative"+t+"Tracks"]=!1)})),!1===i.nativeCaptions&&(e.featuresNativeTextTracks=!1),e.featuresNativeTextTracks||e.emulateTextTracks(),e.ut=new rh,e.initTextTrackListeners(),e.initTrackListeners(),i.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.v=e.constructor.name||"Unknown Tech"),e}Ie(i,t);var s=i.prototype;return s.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},s.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},s.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(xe(this,(function(){var t=this.bufferedPercent();this.ct!==t&&this.trigger("progress"),this.ct=t,1===t&&this.stopTrackingProgress()})),500)},s.onDurationChange=function(t){this.lt=this.duration()},s.buffered=function(){return Fe(0,0)},s.bufferedPercent=function(){return Ne(this.buffered(),this.lt)},s.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},s.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},s.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},s.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},s.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.dispose=function(){this.clearTracks(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},s.clearTracks=function(t){var i=this;(t=[].concat(t)).forEach((function(t){for(var s=i[t+"Tracks"]()||[],e=s.length;e--;){var n=s[e];"text"===t&&i.removeRemoteTextTrack(n),s.st(n)}}))},s.cleanupAutoTextTracks=function(){for(var t=this.ut||[],i=t.length;i--;){var s=t[i];this.removeRemoteTextTrack(s)}},s.reset=function(){},s.error=function(t){return void 0!==t&&(this.ft=new He(t),this.trigger("error")),this.ft},s.played=function(){return this.nt?Fe(0,0):Fe()},s.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.initTextTrackListeners=function(){var t=xe(this,(function(){this.trigger("texttrackchange")})),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",xe(this,(function(){i.removeEventListener("removetrack",t),i.removeEventListener("addtrack",t)}))))},s.initTrackListeners=function(){var t=this;["video","audio"].forEach((function(i){var s=function(){t.trigger(i+"trackchange")},e=t[i+"Tracks"]();e.addEventListener("removetrack",s),e.addEventListener("addtrack",s),t.on("dispose",(function(){e.removeEventListener("removetrack",s),e.removeEventListener("addtrack",s)}))}))},s.dt=function(){var t=this;if(!o.WebVTT)if(Ji.body.contains(this.el())){if(!this.o["vtt.js"]&&rs(ch)&&k.keys(ch).length>0)return void this.trigger("vttjsloaded");var i=Ji.createElement("script");i.src=this.o["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",i.onload=function(){t.trigger("vttjsloaded")},i.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){i.onload=null,i.onerror=null})),o.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.dt)},s.emulateTextTracks=function(){var t=this,i=this.textTracks();if(i){var s=this.remoteTextTracks(),e=function(t){return i.it(t.track)},n=function(t){return i.st(t.track)};s.on("addtrack",e),s.on("removetrack",n),this.dt();var r=function(){return t.trigger("texttrackchange")},h=function(){r();for(var t=0;t<i.length;t++){var s=i[t];s.removeEventListener("cuechange",r),"showing"===s.mode&&s.addEventListener("cuechange",r)}};h(),i.addEventListener("change",h),i.addEventListener("addtrack",h),i.addEventListener("removetrack",h),this.on("dispose",(function(){s.off("addtrack",e),s.off("removetrack",n),i.removeEventListener("change",h),i.removeEventListener("addtrack",h),i.removeEventListener("removetrack",h);for(var t=0;t<i.length;t++){i[t].removeEventListener("cuechange",r)}}))}},s.videoTracks=function(){return this.ht=this.ht||new oh,this.ht},s.audioTracks=function(){return this.ot=this.ot||new uh,this.ot},s.textTracks=function(){return this.rt=this.rt||new rh,this.rt},s.remoteTextTracks=function(){return this.vt=this.vt||new rh,this.vt},s.remoteTextTrackEls=function(){return this.gt=this.gt||new eh,this.gt},s.addTextTrack=function(t,i,s){if(!t)throw new m("TextTrack kind is required but was not provided");return function(t,i,s,e,n){void 0===n&&(n={});var r=t.textTracks();n.kind=i,s&&(n.label=s),e&&(n.language=e),n.tech=t;var h=new th(n);return r.it(h),h}(this,t,i,s)},s.createRemoteTextTrack=function(t){var i=Te(t,{tech:this});return new ih(i)},s.addRemoteTextTrack=function(t,i){void 0===t&&(t={});var s=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(n.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),i=!0),this.remoteTextTrackEls().Y(s),this.remoteTextTracks().it(s.track),!0!==i&&this.ut.it(s.track),s},s.removeRemoteTextTrack=function(t){var i=this.remoteTextTrackEls().K(t);this.remoteTextTrackEls().Z(i),this.remoteTextTracks().st(t),this.ut.st(t)},s.getVideoPlaybackQuality=function(){return{}},s.setPoster=function(){},s.playsinline=function(){},s.setPlaysinline=function(){},s.canPlayType=function(){return""},i.isTech=function(t){return t.prototype instanceof i||t instanceof i||t===i},i.registerTech=function(t,s){if(i.yt||(i.yt={}),!i.isTech(s))throw new m("Tech "+t+" must be a Tech");return i.yt[t]=s,s},i.getTech=function(t){return i.yt&&i.yt[t]?i.yt[t]:o&&o.videojs&&o.videojs[t]?(n.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),o.videojs[t]):void 0},i}(Ce);lh.prototype.rt,lh.prototype.ot,lh.prototype.ht,lh.prototype.featuresVolumeControl=!0,lh.prototype.featuresFullscreenResize=!1,lh.prototype.featuresPlaybackRate=!1,lh.prototype.featuresProgressEvents=!1,lh.prototype.featuresTimeupdateEvents=!1,lh.prototype.featuresNativeTextTracks=!1,lh.withSourceHandlers=function(t){t.registerSourceHandler=function(i,s){var e=t.sourceHandlers;e||(e=t.sourceHandlers=[]),void 0===s&&(s=e.length),e.splice(s,0,i)},t.canPlayType=function(i){for(var s,e=t.sourceHandlers||[],n=0;n<e.length;n++)if(s=e[n].canPlayType(i))return s;return""},t.selectSourceHandler=function(i,s){for(var e=t.sourceHandlers||[],n=0;n<e.length;n++)if(e[n].canHandleSource(i,s))return e[n];return null},t.canPlaySource=function(i,s){var e=t.selectSourceHandler(i,s);return e?e.canHandleSource(i,s):""};["seekable","duration"].forEach((function(t){var i=this[t];"function"==typeof i&&(this[t]=function(){return this.bt&&this.bt[t]?this.bt[t].apply(this.bt,arguments):i.apply(this,arguments)})}),t.prototype),t.prototype.setSource=function(i){var s=t.selectSourceHandler(i,this.o);return s||(t.nativeSourceHandler?s=t.nativeSourceHandler:n.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),s!==t.nativeSourceHandler&&(this.wt=i,this.off(this.m,"loadstart",t.prototype.kt),this.off(this.m,"loadstart",t.prototype._t),this.one(this.m,"loadstart",t.prototype.kt)),this.bt=s.handleSource(i,this,this.o),this.on("dispose",this.disposeSourceHandler),this},t.prototype.kt=function(){this.one(this.m,"loadstart",t.prototype._t)},t.prototype._t=function(){this.disposeSourceHandler(),this.one(this.m,"loadstart",t.prototype._t)},t.prototype.disposeSourceHandler=function(){this.wt&&(this.clearTracks(["audio","video"]),this.wt=null),this.cleanupAutoTextTracks(),this.bt&&(this.off(this.m,"loadstart",t.prototype.kt),this.off(this.m,"loadstart",t.prototype._t),this.bt.dispose&&this.bt.dispose(),this.bt=null)}},Ce.registerComponent("Tech",lh),Ce.registerComponent("MediaTechController",lh),lh.registerTech("Tech",lh);var fh=function(t){function i(i,s,e){var n;if(n=t.call(this,i,s,e)||this,s.playerOptions.sources&&0!==s.playerOptions.sources.length)i.src(s.playerOptions.sources);else for(var r=0,h=s.playerOptions.techOrder;r<h.length;r++){var o=Se(h[r]),a=lh.getTech(o);if(o||(a=Ce.getComponent(o)),a&&a.isSupported()){i.jt(o);break}}return n}return Ie(i,t),i}(Ce);Ce.registerComponent("MediaLoader",fh);var dh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).emitTapEvents(),e.on(i,"languagechange",e.handleLanguagechange),e.enable(),e}Ie(i,t);var s=i.prototype;return s.createEl=function(i,s,e){void 0===i&&(i="div"),void 0===s&&(s={}),void 0===e&&(e={}),s=es({className:this.buildCSSClass(),tabIndex:0},s),"button"===i&&n.error("Creating a ClickableComponent with an HTML element of "+i+" is not supported; use a Button instead."),e=es({role:"button","aria-live":"polite"},e),this.xt=s.tabIndex;var r=t.prototype.createEl.call(this,i,s,e);return this.createControlTextEl(r),r},s.createControlTextEl=function(t){return this.St=ms("span",{className:"vjs-control-text"}),t&&t.appendChild(this.St),this.controlText(this.Tt,t),this.St},s.controlText=function(t,i){if(void 0===i&&(i=this.el()),void 0===t)return this.Tt||"Need Text";var s=this.localize(t);return this.Tt=t,this.St.innerHTML=s,this.nonIconControl||i.setAttribute("title",s),this},s.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},s.enable=function(){return this.removeClass("vjs-disabled"),this.m.setAttribute("aria-disabled","false"),void 0!==this.xt&&this.m.setAttribute("tabIndex",this.xt),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this},s.disable=function(){return this.addClass("vjs-disabled"),this.m.setAttribute("aria-disabled","true"),void 0!==this.xt&&this.m.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this},s.handleLanguagechange=function(){this.controlText(this.Tt)},s.handleClick=function(t){},s.handleFocus=function(t){ve(Ji,"keydown",xe(this,this.handleKeyPress))},s.handleKeyPress=function(i){32===i.which||13===i.which?(i.preventDefault(),this.handleClick(i)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,i)},s.handleBlur=function(t){pe(Ji,"keydown",xe(this,this.handleKeyPress))},i}(Ce);Ce.registerComponent("ClickableComponent",dh);var vh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).update(),i.on("posterchange",xe(Ae(e),e.update)),e}Ie(i,t);var s=i.prototype;return s.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},s.createEl=function(){var t=ms("div",{className:"vjs-poster",tabIndex:-1});return oe||(this.Ct=ms("img"),t.appendChild(this.Ct)),t},s.update=function(t){var i=this.player().poster();this.setSrc(i),i?this.show():this.hide()},s.setSrc=function(t){if(this.Ct)this.Ct.src=t;else{var i="";t&&(i='url("'+t+'")'),this.m.style.backgroundImage=i}},s.handleClick=function(t){this.h.controls()&&(this.h.paused()?this.h.play():this.h.pause())},i}(dh);Ce.registerComponent("PosterImage",vh);var ph="#222",mh={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function gh(t,i){return"rgba("+j(t[1]+t[1],16)+","+j(t[2]+t[2],16)+","+j(t[3]+t[3],16)+","+i+")"}function yh(t,i,s){try{t.style[i]=s}catch(t){return}}var bh=function(t){function i(i,s,e){var n;return n=t.call(this,i,s,e)||this,i.on("loadstart",xe(Ae(n),n.toggleDisplay)),i.on("texttrackchange",xe(Ae(n),n.updateDisplay)),i.ready(xe(Ae(n),(function(){if(i.W&&i.W.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",xe(this,this.updateDisplay));for(var t=this.o.playerOptions.tracks||[],s=0;s<t.length;s++)this.h.addRemoteTextTrack(t[s],!0);var e,n,r={captions:1,subtitles:1},h=this.h.textTracks();if(h){for(var o=0;o<h.length;o++){var a=h[o];a.default&&("descriptions"!==a.kind||e?a.kind in r&&!n&&(n=a):e=a)}n?n.mode="showing":e&&(e.mode="showing")}}}))),n}Ie(i,t);var s=i.prototype;return s.toggleDisplay=function(){this.h.W&&this.h.W.featuresNativeTextTracks?this.hide():this.show()},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},s.clearDisplay=function(){"function"==typeof o.WebVTT&&o.WebVTT.processCues(o,[],this.m)},s.updateDisplay=function(){var t=this.h.textTracks();if(this.clearDisplay(),t){for(var i=null,s=null,e=t.length;e--;){var n=t[e];"showing"===n.mode&&("descriptions"===n.kind?i=n:s=n)}s?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):i&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(i))}},s.updateForTrack=function(t){if("function"==typeof o.WebVTT&&t.activeCues){for(var i=this.h.textTrackSettings.getValues(),s=[],e=0;e<t.activeCues.length;e++)s.push(t.activeCues[e]);o.WebVTT.processCues(o,s,this.m);for(var n=s.length;n--;){var r=s[n];if(r){var h=r.displayState;if(i.color&&(h.firstChild.style.color=i.color),i.textOpacity&&yh(h.firstChild,"color",gh(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(h.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&yh(h.firstChild,"backgroundColor",gh(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?yh(h,"backgroundColor",gh(i.windowColor,i.windowOpacity)):h.style.backgroundColor=i.windowColor),i.edgeStyle&&("dropshadow"===i.edgeStyle?h.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+ph:"raised"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+ph:"depressed"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+ph:"uniform"===i.edgeStyle&&(h.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+ph)),i.fontPercent&&1!==i.fontPercent){var a=o.parseFloat(h.style.fontSize);h.style.fontSize=a*i.fontPercent+"px",h.style.height="auto",h.style.top="auto",h.style.bottom="2px"}i.fontFamily&&"default"!==i.fontFamily&&("small-caps"===i.fontFamily?h.firstChild.style.fontVariant="small-caps":h.firstChild.style.fontFamily=mh[i.fontFamily])}}}},i}(Ce);Ce.registerComponent("TextTrackDisplay",bh);var wh=function(t){function i(){return t.apply(this,arguments)||this}return Ie(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},i}(Ce);Ce.registerComponent("LoadingSpinner",wh);var kh=function(t){function i(){return t.apply(this,arguments)||this}Ie(i,t);var s=i.prototype;return s.createEl=function(t,i,s){void 0===t&&(t="button"),void 0===i&&(i={}),void 0===s&&(s={}),i=es({className:this.buildCSSClass()},i),"button"!==t&&(n.warn("Creating a Button with an HTML element of "+t+" is deprecated; use ClickableComponent instead."),i=es({tabIndex:0},i),s=es({role:"button"},s)),s=es({type:"button","aria-live":"polite"},s);var e=Ce.prototype.createEl.call(this,t,i,s);return this.createControlTextEl(e),e},s.addChild=function(t,i){void 0===i&&(i={});var s=this.constructor.name;return n.warn("Adding an actionable (user controllable) child to a Button ("+s+") is not supported; use a ClickableComponent instead."),Ce.prototype.addChild.call(this,t,i)},s.enable=function(){t.prototype.enable.call(this),this.m.removeAttribute("disabled")},s.disable=function(){t.prototype.disable.call(this),this.m.setAttribute("disabled","disabled")},s.handleKeyPress=function(i){32!==i.which&&13!==i.which&&t.prototype.handleKeyPress.call(this,i)},i}(dh);Ce.registerComponent("Button",kh);var _h=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Pt=!1,e.on("mousedown",e.handleMouseDown),e}Ie(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-big-play-button"},s.handleClick=function(t){var i=this.h.play();if(!(this.Pt&&t.clientX&&t.clientY)){var s=this.h.getChild("controlBar"),e=s&&s.getChild("playToggle");if(e){var n=function(){return e.focus()};if(i&&i.then){i.then(n,(function(){}))}else this.setTimeout(n,1)}else this.h.focus()}},s.handleKeyPress=function(i){this.Pt=!1,t.prototype.handleKeyPress.call(this,i)},s.handleMouseDown=function(t){this.Pt=!0},i}(kh);_h.prototype.Tt="Play Video",Ce.registerComponent("BigPlayButton",_h);var jh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).controlText(s&&s.controlText||"Close"),e}Ie(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},i}(kh);Ce.registerComponent("CloseButton",jh);var xh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"play",e.handlePlay),e.on(i,"pause",e.handlePause),e}Ie(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.h.paused()?this.h.play():this.h.pause()},s.handlePlay=function(t){this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},s.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},i}(kh);function Sh(t,i){void 0===i&&(i=t),t=t<0?0:t;var s=_.floor(t%60),e=_.floor(t/60%60),n=_.floor(t/3600),r=_.floor(i/60%60),h=_.floor(i/3600);return(S(t)||t===1/0)&&(n=e=s="-"),(n=n>0||h>0?n+":":"")+(e=((n||r>=10)&&e<10?"0"+e:e)+":")+(s=s<10?"0"+s:s)}xh.prototype.Tt="Play",Ce.registerComponent("PlayToggle",xh);var Th=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"languagechange",e.updateContent),e}Ie(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-control vjs-control"});return this.T=ms("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00'},{"aria-live":"off"}),i.appendChild(this.T),i},s.updateContent=function(t){var i=this.h.scrubbing()?this.h.getCache().currentTime:this.h.currentTime(),s=this.localize("Current Time"),e=Sh(i,this.h.duration());e!==this.At&&(this.At=e,this.T.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e)},i}(Ce);Ce.registerComponent("CurrentTimeDisplay",Th);var Ch=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"durationchange",e.updateContent),e.on(i,"timeupdate",e.updateContent),e.on(i,"loadedmetadata",e.updateContent),e.on(i,"languagechange",e.updateContent),e}Ie(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.T=ms("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Duration Time")+"</span> 0:00"},{"aria-live":"off"}),i.appendChild(this.T),i},s.updateContent=function(t){var i=this.h.duration();if(i&&this.lt!==i){this.lt=i;var s=this.localize("Duration Time"),e=Sh(i);this.T.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e}},i}(Ce);Ce.registerComponent("DurationDisplay",Ch);var Ph=function(t){function i(){return t.apply(this,arguments)||this}return Ie(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},i}(Ce);Ce.registerComponent("TimeDivider",Ph);var Ah=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"durationchange",e.updateContent),e.on(i,"languagechange",e.updateContent),e}Ie(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.T=ms("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Remaining Time")+"</span> -0:00"},{"aria-live":"off"}),i.appendChild(this.T),i},s.updateContent=function(t){if(this.h.duration()){var i=this.localize("Remaining Time"),s=Sh(this.h.remainingTime());s!==this.At&&(this.At=s,this.T.innerHTML='<span class="vjs-control-text">'+i+"</span> -"+s)}},i}(Ce);Ce.registerComponent("RemainingTimeDisplay",Ah);var Mh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateShowing(),e.on(e.player(),"durationchange",e.updateShowing),e.on(e.player(),"languagechange",e.handleLanguagechange),e}Ie(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.T=ms("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.St=ms("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.Mt=Ji.createTextNode(this.localize("LIVE")),this.T.appendChild(this.St),this.T.appendChild(this.Mt),i.appendChild(this.T),i},s.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},s.handleLanguagechange=function(){this.St.innerHTML=this.localize("Stream Type"),this.Mt.innerHTML=this.localize("LIVE")},i}(Ce);Ce.registerComponent("LiveDisplay",Mh);var Ih=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).bar=e.getChild(e.o.barName),e.vertical(!!e.o.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(i,"controlsvisible",e.update),e.on(i,e.playerEvent,e.update),e}Ie(i,t);var s=i.prototype;return s.createEl=function(i,s,e){return void 0===s&&(s={}),void 0===e&&(e={}),s.className=s.className+" vjs-slider",s=es({tabIndex:0},s),e=es({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},e),t.prototype.createEl.call(this,i,s,e)},s.handleMouseDown=function(t){var i=this.bar.m.ownerDocument;t.preventDefault(),Ji.body.focus(),Ji.onselectstart=function(){return!1},this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove),this.on(i,"mouseup",this.handleMouseUp),this.on(i,"touchmove",this.handleMouseMove),this.on(i,"touchend",this.handleMouseUp),this.handleMouseMove(t)},s.handleMouseMove=function(t){},s.handleMouseUp=function(){var t=this.bar.m.ownerDocument;Ji.onselectstart=function(){return!0},this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},s.update=function(){if(this.m){var t=this.getPercent(),i=this.bar;if(i){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var s=(100*t).toFixed(2)+"%";this.vertical()?i.el().style.height=s:i.el().style.width=s}}},s.calculateDistance=function(t){var i=Ds(this.m,t);return this.vertical()?i.y:i.x},s.handleFocus=function(){this.on(this.bar.m.ownerDocument,"keydown",this.handleKeyPress)},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},s.handleBlur=function(){this.off(this.bar.m.ownerDocument,"keydown",this.handleKeyPress)},s.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},s.vertical=function(t){return void 0===t?this.It||!1:(this.It=!!t,this.It?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(Ce);function Eh(t,i){if(!t||!i)return"";if("function"==typeof o.getComputedStyle){var s=o.getComputedStyle(t);return s?s[i]:""}return t.currentStyle[i]||""}Ce.registerComponent("Slider",Ih);var Dh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Et=[],e.on(i,"progress",e.update),e.on(i,"languagechange",e.handleLanguagechange),e}Ie(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});return this.Dt=ms("span",{innerHTML:this.localize("Loaded")}),this.Ft=Ji.createTextNode(": 0%"),this.St=ms("span",{className:"vjs-control-text"}),this.St.appendChild(this.Dt),this.St.appendChild(this.Ft),i.appendChild(this.St),i},s.update=function(t){var i=this.h.buffered(),s=this.h.duration(),e=this.h.bufferedEnd(),n=this.Et,r=function(t,i){var s=t/i||0;return 100*(s>=1?1:s)+"%"};this.m.style.width=r(e,s);for(var h=0;h<i.length;h++){var o=i.start(h),a=i.end(h),u=n[h];u||(u=this.m.appendChild(ms()),n[h]=u),u.style.left=r(o,e),u.style.width=r(a-o,e)}for(var c=n.length;c>i.length;c--)this.m.removeChild(n[c-1]);n.length=i.length},s.handleLanguagechange=function(){this.Dt.innerHTML=this.localize("Loaded")},i}(Ce);Ce.registerComponent("LoadProgressBar",Dh);var Fh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(xe(Ae(e),e.updateDataAttr)),s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&e.addClass("vjs-keep-tooltips-inside"),e}Ie(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"});return this.Nt=ms("span",{innerHTML:this.localize("Progress")}),this.$t=Ji.createTextNode(": 0%"),this.St=ms("span",{className:"vjs-control-text"}),this.St.appendChild(this.Nt),this.St.appendChild(this.$t),i.appendChild(this.St),i},s.updateDataAttr=function(t){var i=this.h.scrubbing()?this.h.getCache().currentTime:this.h.currentTime();this.m.setAttribute("data-current-time",Sh(i,this.h.duration()))},s.handleLanguagechange=function(){this.Nt.innerHTML=this.localize("Progress")},i}(Ce);Ce.registerComponent("PlayProgressBar",Fh);var Nh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(xe(Ae(e),e.updateDataAttr)),e}Ie(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar"});return this.tooltip=ms("div",{className:"vjs-time-tooltip"}),this.Nt=ms("span",{innerHTML:this.localize("Progress")}),this.$t=Ji.createTextNode(": 0%"),this.St=ms("span",{className:"vjs-control-text"}),this.St.appendChild(this.Nt),this.St.appendChild(this.$t),i.appendChild(this.tooltip),i.appendChild(this.St),i},s.updateDataAttr=function(t){var i=Sh(this.h.scrubbing()?this.h.getCache().currentTime:this.h.currentTime(),this.h.duration());this.m.setAttribute("data-current-time",i),this.tooltip.innerHTML=i},s.handleLanguagechange=function(){this.Nt.innerHTML=this.localize("Progress")},i}(Ce);Ce.registerComponent("TooltipProgressBar",Nh);var $h=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateProgress),e.on(i,"ended",e.updateProgress),i.ready(xe(Ae(e),e.updateProgress)),s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltipProgressBar=e.addChild("TooltipProgressBar")),e}Ie(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},s.updateProgress=function(t){if(this.updateAriaAttributes(this.m),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.m),this.tooltipProgressBar.m.style.width=this.bar.m.style.width;var i=x(Eh(this.player().el(),"width")),s=x(Eh(this.tooltipProgressBar.tooltip,"width")),e=this.tooltipProgressBar.el().style;e.maxWidth=_.floor(i-s/2)+"px",e.minWidth=_.ceil(s/2)+"px",e.right="-"+s/2+"px"}},s.updateAriaAttributes=function(t){var i=this.h.scrubbing()?this.h.getCache().currentTime:this.h.currentTime();t.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),t.setAttribute("aria-valuetext",Sh(i,this.h.duration()))},s.getPercent=function(){var t=this.h.currentTime()/this.h.duration();return t>=1?1:t},s.handleMouseDown=function(i){this.h.scrubbing(!0),this.videoWasPlaying=!this.h.paused(),this.h.pause(),t.prototype.handleMouseDown.call(this,i)},s.handleMouseMove=function(t){var i=this.calculateDistance(t)*this.h.duration();i===this.h.duration()&&(i-=.1),this.h.currentTime(i)},s.handleMouseUp=function(i){t.prototype.handleMouseUp.call(this,i),this.h.scrubbing(!1),this.videoWasPlaying&&this.h.play()},s.stepForward=function(){this.h.currentTime(this.h.currentTime()+5)},s.stepBack=function(){this.h.currentTime(this.h.currentTime()-5)},i}(Ih);$h.prototype.o={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},$h.prototype.playerEvent="timeupdate",Ce.registerComponent("SeekBar",$h);var Bh=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltip=ms("div",{className:"vjs-time-tooltip"}),e.el().appendChild(e.tooltip),e.addClass("vjs-keep-tooltips-inside")),e.update(0,0),i.on("ready",(function(){e.on(i.controlBar.progressControl.el(),"mousemove",function(t,i){var s=Date.now();return function(){var e=Date.now();e-s>=i&&(t.apply(void 0,arguments),s=e)}}(xe(Ae(e),e.handleMouseMove),25))})),e}Ie(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},s.handleMouseMove=function(t){var i=this.h.duration(),s=this.calculateDistance(t)*i,e=t.pageX-Es(this.el().parentNode).left;this.update(s,e)},s.update=function(t,i){var s=Sh(t,this.h.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",s),this.keepTooltipsInside){var e=i-this.Bt(i)+1,n=x(Eh(this.tooltip,"width"))/2;this.tooltip.innerHTML=s,this.tooltip.style.right="-"+(n-e)+"px"}},s.calculateDistance=function(t){return Ds(this.el().parentNode,t).x},s.Bt=function(t){if(!this.keepTooltipsInside)return t;var i=x(Eh(this.player().el(),"width")),s=x(Eh(this.tooltip,"width"))/2,e=t;return t<s?e=_.ceil(s):t>i-s&&(e=_.floor(i-s)),e},i}(Ce);Ce.registerComponent("MouseTimeDisplay",Bh);var Rh=function(t){function i(){return t.apply(this,arguments)||this}return Ie(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(Ce);Rh.prototype.o={children:["seekBar"]},Ce.registerComponent("ProgressControl",Rh);var Oh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"fullscreenchange",e.handleFullscreenChange),e}Ie(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},s.handleFullscreenChange=function(t){this.h.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},s.handleClick=function(t){this.h.isFullscreen()?this.h.exitFullscreen():this.h.requestFullscreen()},i}(kh);Oh.prototype.Tt="Fullscreen",Ce.registerComponent("FullscreenToggle",Oh);var Vh=function(t){function i(){return t.apply(this,arguments)||this}return Ie(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},i}(Ce);Ce.registerComponent("VolumeLevel",Vh);var Lh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.updateARIAAttributes),i.ready(xe(Ae(e),e.updateARIAAttributes)),e}Ie(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":"volume level"})},s.handleMouseMove=function(t){this.checkMuted(),this.h.volume(this.calculateDistance(t))},s.checkMuted=function(){this.h.muted()&&this.h.muted(!1)},s.getPercent=function(){return this.h.muted()?0:this.h.volume()},s.stepForward=function(){this.checkMuted(),this.h.volume(this.h.volume()+.1)},s.stepBack=function(){this.checkMuted(),this.h.volume(this.h.volume()-.1)},s.updateARIAAttributes=function(t){var i=(100*this.h.volume()).toFixed(2);this.m.setAttribute("aria-valuenow",i),this.m.setAttribute("aria-valuetext",i+"%")},i}(Ih);Lh.prototype.o={children:["volumeLevel"],barName:"volumeLevel"},Lh.prototype.playerEvent="volumechange",Ce.registerComponent("VolumeBar",Lh);var Uh=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,i.W&&!1===i.W.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",(function(){!1===i.W.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),e}return Ie(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(Ce);Uh.prototype.o={children:["volumeBar"]},Ce.registerComponent("VolumeControl",Uh);var Hh=function(t){function i(){return t.apply(this,arguments)||this}Ie(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",xe(this,(function(){this.unlockShowing()})))},s.createEl=function(){var i=this.o.contentElType||"ul";this.T=ms(i,{className:"vjs-menu-content"});var s=t.prototype.createEl.call(this,"div",{append:this.T,className:"vjs-menu"});return s.appendChild(this.T),ve(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},i}(Ce);Ce.registerComponent("Popup",Hh);var zh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e}Ie(i,t);var s=i.prototype;return s.update=function(){var t=this.createPopup();this.popup&&this.removeChild(this.popup),this.popup=t,this.addChild(t),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},s.createPopup=function(){},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},s.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.o.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},i}(dh);Ce.registerComponent("PopupButton",zh);var Wh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.update),i.W&&!1===i.W.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",(function(){this.update(),!1===i.W.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),e}Ie(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.h.muted(!this.h.muted())},s.update=function(t){var i=this.h.volume(),s=3;this.h.muted()?s=0:i<.33?s=1:i<.67&&(s=2);var e=this.h.muted()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e);for(var n=0;n<4;n++)Ts(this.m,"vjs-vol-"+n);Ss(this.m,"vjs-vol-"+s)},i}(kh);Wh.prototype.Tt="Mute",Ce.registerComponent("MuteToggle",Wh);var qh=function(t){function i(i,s){var e;function n(){i.W&&!1===i.W.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}return void 0===s&&(s={}),void 0===s.inline&&(s.inline=!0),void 0===s.vertical&&(s.inline?s.vertical=!1:s.vertical=!0),s.volumeBar=s.volumeBar||{},s.volumeBar.vertical=!!s.vertical,(e=t.call(this,i,s)||this).on(i,"volumechange",e.volumeUpdate),e.on(i,"loadstart",e.volumeUpdate),n.call(Ae(e)),e.on(i,"loadstart",n),e.on(e.volumeBar,["slideractive","focus"],(function(){this.addClass("vjs-slider-active")})),e.on(e.volumeBar,["sliderinactive","blur"],(function(){this.removeClass("vjs-slider-active")})),e.on(e.volumeBar,["focus"],(function(){this.addClass("vjs-lock-showing")})),e.on(e.volumeBar,["blur"],(function(){this.removeClass("vjs-lock-showing")})),e}Ie(i,t);var s=i.prototype;return s.buildCSSClass=function(){var i="";return i=this.o.vertical?"vjs-volume-menu-button-vertical":"vjs-volume-menu-button-horizontal","vjs-volume-menu-button "+t.prototype.buildCSSClass.call(this)+" "+i},s.createPopup=function(){var t=new Hh(this.h,{contentElType:"div"}),i=new Lh(this.h,this.o.volumeBar);return t.addChild(i),this.menuContent=t,this.volumeBar=i,this.attachVolumeBarEvents(),t},s.handleClick=function(i){Wh.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},s.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],xe(this,this.handleMouseDown))},s.handleMouseDown=function(t){this.on(["mousemove","touchmove"],xe(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.m.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},s.handleMouseUp=function(t){this.off(["mousemove","touchmove"],xe(this.volumeBar,this.volumeBar.handleMouseMove))},i}(zh);qh.prototype.volumeUpdate=Wh.prototype.update,qh.prototype.Tt="Mute",Ce.registerComponent("VolumeMenuButton",qh);var Gh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Rt=-1,e.on("keydown",e.handleKeyPress),e}Ie(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",xe(this,(function(t){this.unlockShowing()})))},s.createEl=function(){var i=this.o.contentElType||"ul";this.T=ms(i,{className:"vjs-menu-content"}),this.T.setAttribute("role","menu");var s=t.prototype.createEl.call(this,"div",{append:this.T,className:"vjs-menu"});return s.setAttribute("role","presentation"),s.appendChild(this.T),ve(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},s.stepForward=function(){var t=0;void 0!==this.Rt&&(t=this.Rt+1),this.focus(t)},s.stepBack=function(){var t=0;void 0!==this.Rt&&(t=this.Rt-1),this.focus(t)},s.focus=function(t){void 0===t&&(t=0);var i=this.children().slice();i.length&&i[0].className&&/vjs-menu-title/.test(i[0].className)&&i.shift(),i.length>0&&(t<0?t=0:t>=i.length&&(t=i.length-1),this.Rt=t,i[t].m.focus())},i}(Ce);Ce.registerComponent("Menu",Gh);var Xh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e.Ot=!0,e.m.setAttribute("aria-haspopup","true"),e.m.setAttribute("role","menuitem"),e.on("keydown",e.handleSubmenuKeyPress),e}Ie(i,t);var s=i.prototype;return s.update=function(){var t=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=t,this.addChild(t),this.Vt=!1,this.m.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.Lt?this.hide():this.show()},s.createMenu=function(){var t=new Gh(this.h);if(this.Lt=0,this.o.title){var i=ms("li",{className:"vjs-menu-title",innerHTML:Se(this.o.title),tabIndex:-1});this.Lt+=1,t.k.unshift(i),ys(i,t.contentEl())}if(this.items=this.createItems(),this.items)for(var s=0;s<this.items.length;s++)t.addItem(this.items[s]);return t},s.createItems=function(){},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},s.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.o.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",xe(this,(function(t){this.unpressButton(),this.m.blur()}))),this.Vt?this.unpressButton():this.pressButton()},s.handleKeyPress=function(i){27===i.which||9===i.which?(this.Vt&&this.unpressButton(),9!==i.which&&i.preventDefault()):38===i.which||40===i.which?this.Vt||(this.pressButton(),i.preventDefault()):t.prototype.handleKeyPress.call(this,i)},s.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.Vt&&this.unpressButton(),9!==t.which&&t.preventDefault())},s.pressButton=function(){this.Ot&&(this.Vt=!0,this.menu.lockShowing(),this.m.setAttribute("aria-expanded","true"),this.menu.focus())},s.unpressButton=function(){this.Ot&&(this.Vt=!1,this.menu.unlockShowing(),this.m.setAttribute("aria-expanded","false"),this.m.focus())},s.disable=function(){return this.Vt=!1,this.menu.unlockShowing(),this.m.setAttribute("aria-expanded","false"),this.Ot=!1,t.prototype.disable.call(this)},s.enable=function(){return this.Ot=!0,t.prototype.enable.call(this)},i}(dh);Ce.registerComponent("MenuButton",Xh);var Jh=function(t){function i(i,s){var e,n=s.tracks;if((e=t.call(this,i,s)||this).items.length<=1&&e.hide(),!n)return Ae(e);var r=xe(Ae(e),e.update);return n.addEventListener("removetrack",r),n.addEventListener("addtrack",r),e.h.on("dispose",(function(){n.removeEventListener("removetrack",r),n.removeEventListener("addtrack",r)})),e}return Ie(i,t),i}(Xh);Ce.registerComponent("TrackButton",Jh);var Qh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).selectable=s.selectable,e.selected(s.selected),e.selectable?e.m.setAttribute("role","menuitemcheckbox"):e.m.setAttribute("role","menuitem"),e}Ie(i,t);var s=i.prototype;return s.createEl=function(i,s,e){this.nonIconControl=!0;var n=t.prototype.createEl.call(this,"li",es({className:"vjs-menu-item",tabIndex:-1},s),e);return this.Ut=Ji.createTextNode(this.localize(this.o.label)),n.appendChild(this.Ut),n},s.handleClick=function(t){this.selected(!0)},s.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.m.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.m.setAttribute("aria-checked","false"),this.controlText("")))},s.handleLanguagechange=function(){t.prototype.handleLanguagechange.call(this),this.Ut.innerHTML=this.localize(this.o.label)},i}(dh);Ce.registerComponent("MenuItem",Qh);var Yh=function(t){function i(i,s){var e,n,r=s.track,h=i.textTracks();if(s.label=r.label||r.language||"Unknown",s.selected=r.default||"showing"===r.mode,(e=t.call(this,i,s)||this).track=r,h){var a=xe(Ae(e),e.handleTracksChange);i.on(["loadstart","texttrackchange"],a),h.addEventListener("change",a),e.on("dispose",(function(){h.removeEventListener("change",a)}))}h&&void 0===h.onchange&&e.on(["tap","click"],(function(){if("object"!=typeof o.Event)try{n=new o.Event("change")}catch(t){}n||(n=Ji.createEvent("Event")).initEvent("change",!0,!0),h.dispatchEvent(n)}));return e}Ie(i,t);var s=i.prototype;return s.handleClick=function(i){var s=this.track.kind,e=this.h.textTracks();if(t.prototype.handleClick.call(this,i),e)for(var n=0;n<e.length;n++){var r=e[n];r.kind===s&&(r===this.track?"showing"!==r.mode&&(r.mode="showing"):"disabled"!==r.mode&&(r.mode="disabled"))}},s.handleTracksChange=function(t){this.selected("showing"===this.track.mode)},i}(Qh);Ce.registerComponent("TextTrackMenuItem",Yh);var Kh=function(t){function i(i,s){var e;return s.track={player:i,kind:s.kind,label:s.kind+" off",default:!1,mode:"disabled"},s.selectable=!0,(e=t.call(this,i,s)||this).selected(!0),e}return Ie(i,t),i.prototype.handleTracksChange=function(t){for(var i=this.player().textTracks(),s=!0,e=0,n=i.length;e<n;e++){var r=i[e];if(r.kind===this.track.kind&&"showing"===r.mode){s=!1;break}}this.selected(s)},i}(Yh);Ce.registerComponent("OffTextTrackMenuItem",Kh);var Zh=function(t){function i(i,s){return void 0===s&&(s={}),s.tracks=i.textTracks(),t.call(this,i,s)||this}return Ie(i,t),i.prototype.createItems=function(t){void 0===t&&(t=[]),t.push(new Kh(this.h,{kind:this.Ht})),this.Lt+=1;var i=this.h.textTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];e.kind===this.Ht&&t.push(new Yh(this.h,{track:e,selectable:!0}))}return t},i}(Jh);Ce.registerComponent("TextTrackButton",Zh);var to=function(t){function i(i,s){var e,n=s.track,r=s.cue,h=i.currentTime();return s.selectable=!0,s.label=r.text,s.selected=r.startTime<=h&&h<r.endTime,(e=t.call(this,i,s)||this).track=n,e.cue=r,n.addEventListener("cuechange",xe(Ae(e),e.update)),e}Ie(i,t);var s=i.prototype;return s.handleClick=function(i){t.prototype.handleClick.call(this),this.h.currentTime(this.cue.startTime),this.update(this.cue.startTime)},s.update=function(t){var i=this.cue,s=this.h.currentTime();this.selected(i.startTime<=s&&s<i.endTime)},i}(Qh);Ce.registerComponent("ChaptersTrackMenuItem",to);var io=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).m.setAttribute("aria-label","Chapters Menu"),n}Ie(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},s.update=function(i){this.zt&&(!i||"addtrack"!==i.type&&"removetrack"!==i.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},s.setTrack=function(t){if(this.zt!==t){if(this.Wt||(this.Wt=this.update.bind(this)),this.zt){var i=this.h.remoteTextTrackEls().K(this.zt);i&&i.removeEventListener("load",this.Wt),this.zt=null}if(this.zt=t,this.zt){this.zt.mode="hidden";var s=this.h.remoteTextTrackEls().K(this.zt);s&&s.addEventListener("load",this.Wt)}}},s.findChaptersTrack=function(){for(var t=this.h.textTracks()||[],i=t.length-1;i>=0;i--){var s=t[i];if(s.kind===this.Ht)return s}},s.getMenuCaption=function(){return this.zt&&this.zt.label?this.zt.label:this.localize(Se(this.Ht))},s.createMenu=function(){return this.o.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},s.createItems=function(){var t=[];if(!this.zt)return t;var i=this.zt.cues;if(!i)return t;for(var s=0,e=i.length;s<e;s++){var n=i[s],r=new to(this.h,{track:this.zt,cue:n});t.push(r)}return t},i}(Zh);io.prototype.Ht="chapters",io.prototype.Tt="Chapters",Ce.registerComponent("ChaptersButton",io);var so=function(t){function i(i,s,e){var n;(n=t.call(this,i,s,e)||this).m.setAttribute("aria-label","Descriptions Menu");var r=i.textTracks();if(r){var h=xe(Ae(n),n.handleTracksChange);r.addEventListener("change",h),n.on("dispose",(function(){r.removeEventListener("change",h)}))}return n}Ie(i,t);var s=i.prototype;return s.handleTracksChange=function(t){for(var i=this.player().textTracks(),s=!1,e=0,n=i.length;e<n;e++){var r=i[e];if(r.kind!==this.Ht&&"showing"===r.mode){s=!0;break}}s?this.disable():this.enable()},s.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},i}(Zh);so.prototype.Ht="descriptions",so.prototype.Tt="Descriptions",Ce.registerComponent("DescriptionsButton",so);var eo=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).m.setAttribute("aria-label","Subtitles Menu"),n}return Ie(i,t),i.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},i}(Zh);eo.prototype.Ht="subtitles",eo.prototype.Tt="Subtitles",Ce.registerComponent("SubtitlesButton",eo);var no=function(t){function i(i,s){var e;return s.track={player:i,kind:s.kind,label:s.kind+" settings",selectable:!1,default:!1,mode:"disabled"},s.selectable=!1,(e=t.call(this,i,s)||this).addClass("vjs-texttrack-settings"),e.controlText(", opens "+s.kind+" settings dialog"),e}return Ie(i,t),i.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").m.focus()},i}(Yh);Ce.registerComponent("CaptionSettingsMenuItem",no);var ro=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).m.setAttribute("aria-label","Captions Menu"),n}Ie(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-captions-button "+t.prototype.buildCSSClass.call(this)},s.createItems=function(){var i=[];return this.player().W&&this.player().W.featuresNativeTextTracks||(i.push(new no(this.h,{kind:this.Ht})),this.Lt+=1),t.prototype.createItems.call(this,i)},i}(Zh);ro.prototype.Ht="captions",ro.prototype.Tt="Captions",Ce.registerComponent("CaptionsButton",ro);var ho=function(t){function i(i,s){var e,n=s.track,r=i.audioTracks();if(s.label=n.label||n.language||"Unknown",s.selected=n.enabled,(e=t.call(this,i,s)||this).track=n,r){var h=xe(Ae(e),e.handleTracksChange);r.addEventListener("change",h),e.on("dispose",(function(){r.removeEventListener("change",h)}))}return e}Ie(i,t);var s=i.prototype;return s.handleClick=function(i){var s=this.h.audioTracks();if(t.prototype.handleClick.call(this,i),s)for(var e=0;e<s.length;e++){var n=s[e];n.enabled=n===this.track}},s.handleTracksChange=function(t){this.selected(this.track.enabled)},i}(Qh);Ce.registerComponent("AudioTrackMenuItem",ho);var oo=function(t){function i(i,s){var e;return void 0===s&&(s={}),s.tracks=i.audioTracks&&i.audioTracks(),(e=t.call(this,i,s)||this).m.setAttribute("aria-label","Audio Menu"),e}Ie(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-audio-button "+t.prototype.buildCSSClass.call(this)},s.createItems=function(t){void 0===t&&(t=[]),this.Lt=1;var i=this.h.audioTracks&&this.h.audioTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];t.push(new ho(this.h,{track:e,selectable:!0}))}return t},i}(Jh);oo.prototype.Tt="Audio Track",Ce.registerComponent("AudioTrackButton",oo);var ao=function(t){function i(i,s){var e,n=s.rate,r=x(n,10);return s.label=n,s.selected=1===r,s.selectable=!0,(e=t.call(this,i,s)||this).label=n,e.rate=r,e.on(i,"ratechange",e.update),e}Ie(i,t);var s=i.prototype;return s.handleClick=function(i){t.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},s.update=function(t){this.selected(this.player().playbackRate()===this.rate)},i}(Qh);ao.prototype.contentElType="button",Ce.registerComponent("PlaybackRateMenuItem",ao);var uo=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateVisibility(),e.updateLabel(),e.on(i,"loadstart",e.updateVisibility),e.on(i,"ratechange",e.updateLabel),e}Ie(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this);return this.Ut=ms("div",{className:"vjs-playback-rate-value",innerHTML:1}),i.appendChild(this.Ut),i},s.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},s.createMenu=function(){var t=new Gh(this.player()),i=this.playbackRates();if(i)for(var s=i.length-1;s>=0;s--)t.addChild(new ao(this.player(),{rate:i[s]+"x"}));return t},s.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},s.handleClick=function(t){for(var i=this.player().playbackRate(),s=this.playbackRates(),e=s[0],n=0;n<s.length;n++)if(s[n]>i){e=s[n];break}this.player().playbackRate(e)},s.playbackRates=function(){return this.o.playbackRates||this.o.playerOptions&&this.o.playerOptions.playbackRates},s.playbackRateSupported=function(){return this.player().W&&this.player().W.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},s.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},s.updateLabel=function(t){this.playbackRateSupported()&&(this.Ut.innerHTML=this.player().playbackRate()+"x")},i}(Xh);uo.prototype.Tt="Playback Rate",Ce.registerComponent("PlaybackRateMenuButton",uo);var co=function(t){function i(){return t.apply(this,arguments)||this}Ie(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},i}(Ce);Ce.registerComponent("Spacer",co);var lo=function(t){function i(){return t.apply(this,arguments)||this}Ie(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},s.createEl=function(){var i=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return i.innerHTML="&nbsp;",i},i}(co);Ce.registerComponent("CustomControlSpacer",lo);var fo=function(t){function i(){return t.apply(this,arguments)||this}return Ie(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(Ce);fo.prototype.o={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},Ce.registerComponent("ControlBar",fo);var vo=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"error",e.open),e}Ie(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},s.content=function(){var t=this.player().error();return t?this.localize(t.message):""},i}(Je);vo.prototype.o=Te(Je.prototype.o,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Ce.registerComponent("ErrorDisplay",vo);var po="vjs-text-track-settings",mo=["#000","Black"],go=["#00F","Blue"],yo=["#0FF","Cyan"],bo=["#0F0","Green"],wo=["#F0F","Magenta"],ko=["#F00","Red"],_o=["#FFF","White"],jo=["#FF0","Yellow"],xo=["1","Opaque"],So=["0.5","Semi-Transparent"],To=["0","Transparent"],Co={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[mo,_o,ko,bo,go,jo,wo,yo]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[xo,So,To]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[_o,mo,ko,bo,go,jo,wo,yo]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[xo,So]},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:[To,So,xo]}};function Po(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}Co.windowColor.options=Co.backgroundColor.options;var Ao,Mo=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).setDefaults(),e.hide(),e.updateDisplay=xe(Ae(e),e.updateDisplay),void 0===s.persistTextTrackSettings&&(e.o.persistTextTrackSettings=e.o.playerOptions.persistTextTrackSettings),e.on(e.$(".vjs-done-button"),"click",(function(){e.saveSettings(),e.hide()})),e.on(e.$(".vjs-default-button"),"click",(function(){e.setDefaults(),e.updateDisplay()})),ss(Co,(function(t){e.on(e.$(t.selector),"change",e.updateDisplay)})),e.o.persistTextTrackSettings&&e.restoreSettings(),e}Ie(i,t);var s=i.prototype;return s.qt=function(t){var i=this,s=Co[t],e=s.id.replace("%s",this.u);return[ms("label",{className:"vjs-label",textContent:s.label},{for:e}),ms("select",{id:e},void 0,s.options.map((function(t){return ms("option",{textContent:i.localize(t[1]),value:t[0]})})))]},s.Gt=function(){var t=ms("legend",{textContent:this.localize("Text")}),i=this.qt("color"),s=ms("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.qt("textOpacity"));return ms("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Xt=function(){var t=ms("legend",{textContent:this.localize("Background")}),i=this.qt("backgroundColor"),s=ms("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.qt("backgroundOpacity"));return ms("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Jt=function(){var t=ms("legend",{textContent:this.localize("Window")}),i=this.qt("windowColor"),s=ms("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.qt("windowOpacity"));return ms("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Qt=function(){return ms("div",{className:"vjs-tracksettings-colors"},void 0,[this.Gt(),this.Xt(),this.Jt()])},s.Yt=function(){var t=ms("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.qt("fontPercent")),i=ms("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.qt("edgeStyle")),s=ms("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.qt("fontFamily"));return ms("div",{className:"vjs-tracksettings-font"},void 0,[t,i,s])},s.Kt=function(){var t=ms("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=ms("button",{className:"vjs-done-button",textContent:"Done"});return ms("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},s.createEl=function(){var t=ms("div",{className:"vjs-tracksettings"},void 0,[this.Qt(),this.Yt(),this.Kt()]),i=ms("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.u,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),s=ms("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.u,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),e=ms("div",void 0,{role:"document"},[i,s,t]);return ms("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":i.id,"aria-describedby":s.id},e)},s.getValues=function(){var t=this;return function(t,i,s){return void 0===s&&(s=0),is(t).reduce((function(s,e){return i(s,t[e],e)}),s)}(Co,(function(i,s,e){var n=function(t,i){return Po(t.options[t.options.selectedIndex].value,i)}(t.$(s.selector),s.parser);return void 0!==n&&(i[e]=n),i}),{})},s.setValues=function(t){var i=this;ss(Co,(function(s,e){!function(t,i,s){if(i)for(var e=0;e<t.options.length;e++)if(Po(t.options[e].value,s)===i){t.selectedIndex=e;break}}(i.$(s.selector),t[e],s.parser)}))},s.setDefaults=function(){var t=this;ss(Co,(function(i){var s=i.hasOwnProperty("default")?i.default:0;t.$(i.selector).selectedIndex=s}))},s.restoreSettings=function(){var t;try{t=JSON.parse(o.localStorage.getItem(po))}catch(t){n.warn(t)}t&&this.setValues(t)},s.saveSettings=function(){if(this.o.persistTextTrackSettings){var t=this.getValues();try{k.keys(t).length?o.localStorage.setItem(po,JSON.stringify(t)):o.localStorage.removeItem(po)}catch(t){n.warn(t)}}},s.updateDisplay=function(){var t=this.h.getChild("textTrackDisplay");t&&t.updateDisplay()},i}(Ce);Ce.registerComponent("TextTrackSettings",Mo);var Io,Eo=function(t){function i(i,s){var e;e=t.call(this,i,s)||this;var r=i.source,h=!1;if(r&&(e.m.currentSrc!==r.src||i.tag&&3===i.tag.Zt)?e.setSource(r):e.ti(e.m),e.m.hasChildNodes()){for(var o=e.m.childNodes,a=o.length,u=[];a--;){var c=o[a];"track"===c.nodeName.toLowerCase()&&(e.featuresNativeTextTracks?(e.remoteTextTrackEls().Y(c),e.remoteTextTracks().it(c.track),h||e.m.hasAttribute("crossorigin")||!nn(c.src)||(h=!0)):u.push(c))}for(var l=0;l<u.length;l++)e.m.removeChild(u[l])}return["audio","video"].forEach((function(t){var i=e.el()[t+"Tracks"],s=e[t+"Tracks"](),n=Se(t);e["featuresNative"+n+"Tracks"]&&i&&i.addEventListener&&(e["handle"+n+"ii"]=function(t){s.trigger({type:"change",target:s,currentTarget:s,srcElement:s})},e["handle"+n+"si"]=function(t){return s.addTrack(t.track)},e["handle"+n+"ei"]=function(t){return s.removeTrack(t.track)},i.addEventListener("change",e["handle"+n+"ii"]),i.addEventListener("addtrack",e["handle"+n+"si"]),i.addEventListener("removetrack",e["handle"+n+"ei"]),e["removeOld"+n+"ni"]=function(t){return e.ri(s,i)},e.on("loadstart",e["removeOld"+n+"ni"]))})),e.featuresNativeTextTracks&&(h&&n.warn(cs(Ao||(Ao=Qi(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."])))),e.hi=xe(Ae(e),e.handleTextTrackChange),e.oi=xe(Ae(e),e.handleTextTrackAdd),e.ai=xe(Ae(e),e.handleTextTrackRemove),e.ci()),e.fi(),(he||zs||Ys)&&!0===i.nativeControlsForTouch&&e.setControls(!0),e.di(),e.triggerReady(),e}Ie(i,t);var s=i.prototype;return s.dispose=function(){var s=this;["audio","video","text"].forEach((function(t){var i=Se(t),e=s.m[t+"Tracks"];e&&e.removeEventListener&&(e.removeEventListener("change",s["handle"+i+"ii"]),e.removeEventListener("addtrack",s["handle"+i+"si"]),e.removeEventListener("removetrack",s["handle"+i+"ei"])),e&&s.off("loadstart",s["removeOld"+i+"ni"])})),i.disposeMediaElement(this.m),t.prototype.dispose.call(this)},s.fi=function(){var t,i=this.textTracks(),s=function(){t=[];for(var s=0;s<i.length;s++){var e=i[s];"metadata"===e.kind&&t.push({track:e,storedMode:e.mode})}};s(),i.addEventListener("change",s);var e=function s(){for(var e=0;e<t.length;e++){var n=t[e];"disabled"===n.track.mode&&n.track.mode!==n.storedMode&&(n.track.mode=n.storedMode)}i.removeEventListener("change",s)};this.on("webkitbeginfullscreen",(function(){i.removeEventListener("change",s),i.removeEventListener("change",e),i.addEventListener("change",e)})),this.on("webkitendfullscreen",(function(){i.removeEventListener("change",s),i.addEventListener("change",s),i.removeEventListener("change",e)}))},s.createEl=function(){var t=this.o.tag;if(!t||!this.o.playerElIngest&&!this.movingMediaElementInDOM){if(t){var s=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(s,t),i.disposeMediaElement(t),t=s}else{t=Ji.createElement("video");var e=Te({},this.o.tag&&As(this.o.tag));he&&!0===this.o.nativeControlsForTouch||delete e.controls,Ps(t,es(e,{id:this.o.techId,class:"vjs-tech"}))}t.playerId=this.o.playerId}void 0!==this.o.preload&&Ms(t,"preload",this.o.preload);for(var n=["loop","muted","playsinline","autoplay"],r=n.length-1;r>=0;r--){var h=n[r],o=this.o[h];void 0!==o&&(o?Ms(t,h,h):Is(t,h),t[h]=o)}return t},s.ti=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var i=!1,s=function(){i=!0};this.on("loadstart",s);var e=function(){i||this.trigger("loadstart")};return this.on("loadedmetadata",e),void this.ready((function(){this.off("loadstart",s),this.off("loadedmetadata",e),i||this.trigger("loadstart")}))}var n=["loadstart"];n.push("loadedmetadata"),t.readyState>=2&&n.push("loadeddata"),t.readyState>=3&&n.push("canplay"),t.readyState>=4&&n.push("canplaythrough"),this.ready((function(){n.forEach((function(t){this.trigger(t)}),this)}))}},s.ci=function(){var t=this.el().textTracks;if(t){for(var i=0;i<t.length;i++)this.textTracks().it(t[i]);t.addEventListener&&(t.addEventListener("change",this.hi),t.addEventListener("addtrack",this.oi),t.addEventListener("removetrack",this.ai)),this.on("loadstart",this.vi)}},s.handleTextTrackChange=function(t){var i=this.textTracks();this.textTracks().trigger({type:"change",target:i,currentTarget:i,srcElement:i})},s.handleTextTrackAdd=function(t){this.textTracks().it(t.track)},s.handleTextTrackRemove=function(t){this.textTracks().st(t.track)},s.ri=function(t,i){var s=[];if(i){for(var e=0;e<t.length;e++){for(var n=t[e],r=!1,h=0;h<i.length;h++)if(i[h]===n){r=!0;break}r||s.push(n)}for(var o=0;o<s.length;o++){var a=s[o];t.st(a)}}},s.vi=function(t){var i=this.textTracks(),s=this.el().textTracks;this.ri(i,s)},s.play=function(){var t=this.m.play();void 0!==t&&"function"==typeof t.then&&t.then(null,(function(t){}))},s.setCurrentTime=function(t){try{this.m.currentTime=t}catch(t){n(t,"Video is not ready. (Video.js)")}},s.duration=function(){var t=this;if(this.m.duration===1/0&&Xs&&te&&0===this.m.currentTime){return this.on("timeupdate",(function i(){t.m.currentTime>0&&(t.m.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",i))})),NaN}return this.m.duration||NaN},s.width=function(){return this.m.offsetWidth},s.height=function(){return this.m.offsetHeight},s.di=function(){var t=this;if("webkitDisplayingFullscreen"in this.m){var i=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},s=function(){"webkitPresentationMode"in this.m&&"picture-in-picture"!==this.m.webkitPresentationMode&&(this.one("webkitendfullscreen",i),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",s),this.on("dispose",(function(){t.off("webkitbeginfullscreen",s),t.off("webkitendfullscreen",i)}))}},s.supportsFullScreen=function(){if("function"==typeof this.m.webkitEnterFullScreen){var t=o.navigator&&o.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},s.enterFullScreen=function(){var t=this.m;t.paused&&t.networkState<=t.HAVE_METADATA?(this.m.play(),this.setTimeout((function(){t.pause(),t.webkitEnterFullScreen()}),0)):t.webkitEnterFullScreen()},s.exitFullScreen=function(){this.m.webkitExitFullScreen()},s.src=function(t){if(void 0===t)return this.m.src;this.setSrc(t)},s.reset=function(){i.resetMediaElement(this.m)},s.currentSrc=function(){return this.wt?this.wt.src:this.m.currentSrc},s.setControls=function(t){this.m.controls=!!t},s.addTextTrack=function(i,s,e){return this.featuresNativeTextTracks?this.m.addTextTrack(i,s,e):t.prototype.addTextTrack.call(this,i,s,e)},s.createRemoteTextTrack=function(i){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,i);var s=Ji.createElement("track");return i.kind&&(s.kind=i.kind),i.label&&(s.label=i.label),(i.language||i.srclang)&&(s.srclang=i.language||i.srclang),i.default&&(s.default=i.default),i.id&&(s.id=i.id),i.src&&(s.src=i.src),s},s.addRemoteTextTrack=function(i,s){var e=t.prototype.addRemoteTextTrack.call(this,i,s);return this.featuresNativeTextTracks&&this.el().appendChild(e),e},s.removeRemoteTextTrack=function(i){if(t.prototype.removeRemoteTextTrack.call(this,i),this.featuresNativeTextTracks)for(var s=this.$$("track"),e=s.length;e--;)i!==s[e]&&i!==s[e].track||this.el().removeChild(s[e])},s.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),o.performance&&"function"==typeof o.performance.now?t.creationTime=o.performance.now():o.performance&&o.performance.timing&&"number"==typeof o.performance.timing.navigationStart&&(t.creationTime=o.Date.now()-o.performance.timing.navigationStart),t},i}(lh);ds()&&(Eo.TEST_VID=Ji.createElement("video"),(Io=Ji.createElement("track")).kind="captions",Io.srclang="en",Io.label="English",Eo.TEST_VID.appendChild(Io)),Eo.isSupported=function(){try{Eo.TEST_VID.volume=.5}catch(t){return!1}return!(!Eo.TEST_VID||!Eo.TEST_VID.canPlayType)},Eo.canControlVolume=function(){try{var t=Eo.TEST_VID.volume;return Eo.TEST_VID.volume=t/2+.1,t!==Eo.TEST_VID.volume}catch(t){return!1}},Eo.canControlPlaybackRate=function(){if(Xs&&te&&ie<58)return!1;try{var t=Eo.TEST_VID.playbackRate;return Eo.TEST_VID.playbackRate=t/2+.1,t!==Eo.TEST_VID.playbackRate}catch(t){return!1}},Eo.supportsNativeTextTracks=function(){return re},Eo.supportsNativeVideoTracks=function(){return!(!Eo.TEST_VID||!Eo.TEST_VID.videoTracks)},Eo.supportsNativeAudioTracks=function(){return!(!Eo.TEST_VID||!Eo.TEST_VID.audioTracks)},Eo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],Eo.prototype.featuresVolumeControl=Eo.canControlVolume(),Eo.prototype.featuresPlaybackRate=Eo.canControlPlaybackRate(),Eo.prototype.movingMediaElementInDOM=!qs,Eo.prototype.featuresFullscreenResize=!0,Eo.prototype.featuresProgressEvents=!0,Eo.prototype.featuresTimeupdateEvents=!0,Eo.prototype.featuresNativeTextTracks=Eo.supportsNativeTextTracks(),Eo.prototype.featuresNativeVideoTracks=Eo.supportsNativeVideoTracks(),Eo.prototype.featuresNativeAudioTracks=Eo.supportsNativeAudioTracks();var Do=Eo.TEST_VID&&Eo.TEST_VID.constructor.prototype.canPlayType,Fo=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,No=/^video\/mp4/i;Eo.patchCanPlayType=function(){Js>=4&&!Ks?Eo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Fo.test(t)?"maybe":Do.call(this,t)}:Qs&&(Eo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&No.test(t)?"maybe":Do.call(this,t)})},Eo.unpatchCanPlayType=function(){var t=Eo.TEST_VID.constructor.prototype.canPlayType;return Eo.TEST_VID.constructor.prototype.canPlayType=Do,t},Eo.patchCanPlayType(),Eo.disposeMediaElement=function(t){if(t){var i=t.nodeName.toLowerCase();if("video"===i||"audio"===i){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}}},Eo.resetMediaElement=function(t){if(t){for(var i=t.querySelectorAll("source"),s=i.length;s--;)t.removeChild(i[s]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(t){Eo.prototype[t]=function(){return this.m[t]||this.m.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){Eo.prototype["set"+Se(t)]=function(i){this.m[t]=i,i?this.m.setAttribute(t,t):this.m.removeAttribute(t)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(t){Eo.prototype[t]=function(){return this.m[t]}})),["volume","src","poster","preload","playbackRate"].forEach((function(t){Eo.prototype["set"+Se(t)]=function(i){this.m[t]=i}})),["pause","load"].forEach((function(t){Eo.prototype[t]=function(){return this.m[t]()}})),lh.withSourceHandlers(Eo),Eo.nativeSourceHandler={},Eo.nativeSourceHandler.canPlayType=function(t){try{return Eo.TEST_VID.canPlayType(t)}catch(t){return""}},Eo.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return Eo.nativeSourceHandler.canPlayType(t.type);if(t.src){var s=function(t){if("string"==typeof t){var i=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(t);if(i)return i.pop().toLowerCase()}return""}(t.src);return Eo.nativeSourceHandler.canPlayType("video/"+s)}return""},Eo.nativeSourceHandler.handleSource=function(t,i,s){i.setSrc(t.src)},Eo.nativeSourceHandler.dispose=function(){},Eo.registerSourceHandler(Eo.nativeSourceHandler),Ce.registerComponent("Html5",Eo),lh.registerTech("Html5",Eo);var $o=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],Bo=function(t){function i(s,e,r){var h;if(s.id=s.id||["vjs_video",Ki()].join("_"),(e=es(i.getTagSettings(s),e)).initChildren=!1,e.createEl=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof s.closest){var o=s.closest("[lang]");o&&(e.language=o.getAttribute("lang"))}else for(var a=s;a&&1===a.nodeType;){if(As(a).hasOwnProperty("lang")){e.language=a.getAttribute("lang");break}a=a.parentNode}if(!(h=t.call(this,null,e,r)||this).o||!h.o.techOrder||!h.o.techOrder.length)throw new m("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(h.tag=s,h.tagAttributes=s&&As(s),h.language(h.o.language),e.languages){var u={};k.getOwnPropertyNames(e.languages).forEach((function(t){u[t.toLowerCase()]=e.languages[t]})),h.pi=u}else h.pi=i.prototype.o.languages;h.mi={},h.gi=e.poster||"",h.yi=!!e.controls,s.controls=!1,h.bi=!1,h.m=h.createEl();var c=Te(h.o);if(e.plugins){var l=e.plugins;k.getOwnPropertyNames(l).forEach((function(t){"function"==typeof this[t]?this[t](l[t]):n.error("Unable to find plugin:",t)}),Ae(h))}h.o.playerOptions=c,h.initChildren(),h.isAudio("audio"===s.nodeName.toLowerCase()),h.controls()?h.addClass("vjs-controls-enabled"):h.addClass("vjs-controls-disabled"),h.m.setAttribute("role","region"),h.isAudio()?h.m.setAttribute("aria-label","audio player"):h.m.setAttribute("aria-label","video player"),h.isAudio()&&h.addClass("vjs-audio"),h.wi()&&h.addClass("vjs-no-flex"),qs||h.addClass("vjs-workinghover"),i.players[h.u]=Ae(h);var f="5.20.6-opentelly.12".split(".")[0];return h.addClass("vjs-v"+f),h.userActive(!0),h.reportUserActivity(),h.ki(),h.on("fullscreenchange",h._i),h.on("stageclick",h.ji),h}Ie(i,t);var s=i.prototype;return s.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.xi&&this.xi.parentNode&&this.xi.parentNode.removeChild(this.xi),i.players[this.u]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.m&&this.m.player&&(this.m.player=null),this.W&&this.W.dispose(),t.prototype.dispose.call(this)},s.createEl=function(){var i,s=this.tag,e=this.Si=s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player");i=this.m=e?s.parentNode:t.prototype.createEl.call(this,"div"),s.setAttribute("tabindex","-1"),s.removeAttribute("width"),s.removeAttribute("height");var n=As(s);if(k.getOwnPropertyNames(n).forEach((function(t){"class"===t?i.className+=" "+n[t]:i.setAttribute(t,n[t])})),s.playerId=s.id,s.id+="Ti",s.className="vjs-tech",s.player=i.player=this,this.addClass("vjs-paused"),!0!==o.VIDEOJS_NO_DYNAMIC_STYLE){this.xi=_e("vjs-styles-dimensions");var r=Rs(".vjs-styles-defaults"),h=Rs("head");h.insertBefore(this.xi,r?r.nextSibling:h.firstChild)}this.width(this.o.width),this.height(this.o.height),this.fluid(this.o.fluid),this.aspectRatio(this.o.aspectRatio);for(var a=s.getElementsByTagName("a"),u=0;u<a.length;u++){var c=a.item(u);Ss(c,"vjs-hidden"),c.setAttribute("hidden","hidden")}return s.Zt=s.networkState,s.parentNode&&!e&&s.parentNode.insertBefore(i,s),ys(s,i),this.k.unshift(s),this.m=i,i},s.width=function(t){return this.dimension("width",t)},s.height=function(t){return this.dimension("height",t)},s.dimension=function(t,i){var s="width"===t?"Ci":"Pi";if(void 0===i)return this[s]||0;if(""===i)this[s]=void 0;else{var e=x(i);if(S(e))return n.error('Improper value "'+i+'" supplied for for '+t),this;this[s]=e}return this.Ai(),this},s.fluid=function(t){if(void 0===t)return!!this.Mi;this.Mi=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.Ai()},s.aspectRatio=function(t){if(void 0===t)return this.Ii;if(!/^\d+\:\d+$/.test(t))throw new m("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.Ii=t,this.fluid(!0),this.Ai()},s.Ai=function(){if(!0!==o.VIDEOJS_NO_DYNAMIC_STYLE){var t,i,s,e=(void 0!==this.Ii&&"auto"!==this.Ii?this.Ii:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),n=e[1]/e[0];t=void 0!==this.Ci?this.Ci:void 0!==this.Pi?this.Pi/n:this.videoWidth()||300,i=void 0!==this.Pi?this.Pi:t*n,s=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(s),je(this.xi,"\n ."+s+" {\n width: "+t+"px;\n height: "+i+"px;\n }\n\n ."+s+".vjs-fluid {\n padding-top: "+100*n+"%;\n }\n ")}else{var r="number"==typeof this.Ci?this.Ci:this.o.width,h="number"==typeof this.Pi?this.Pi:this.o.height,a=this.W&&this.W.el();a&&(r>=0&&(a.width=r),h>=0&&(a.height=h))}},s.jt=function(t,i){var s=this;this.W&&this.Ei(),"Html5"!==t&&this.tag&&(lh.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Di=t,this.C=!1;var e=es({source:i,nativeControlsForTouch:this.o.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Fi",videoTracks:this.ht,textTracks:this.rt,audioTracks:this.ot,autoplay:this.o.autoplay,playsinline:this.o.playsinline,preload:this.o.preload,loop:this.o.loop,muted:this.o.muted,poster:this.poster(),language:this.language(),playerElIngest:this.Si||!1,"vtt.js":this.o["vtt.js"]},this.o[t.toLowerCase()]);this.tag&&(e.tag=this.tag),i&&(this.Ni=i.type,i.src===this.mi.src&&this.mi.currentTime>0&&(e.startTime=this.mi.currentTime),this.mi.sources=null,this.mi.source=i,this.mi.src=i.src);var n=lh.getTech(t);n||(n=Ce.getComponent(t)),this.W=new n(e),this.W.ready(xe(this,this.$i),!0),Ge(this.Bi||[],this.W),$o.forEach((function(t){s.on(s.W,t,s["handleTech"+Se(t)+"_"])})),this.on(this.W,"loadstart",this.Ri),this.on(this.W,"waiting",this.Oi),this.on(this.W,"canplay",this.Vi),this.on(this.W,"canplaythrough",this.Li),this.on(this.W,"playing",this.Ui),this.on(this.W,"ended",this.Hi),this.on(this.W,"seeking",this.zi),this.on(this.W,"seeked",this.Wi),this.on(this.W,"play",this.qi),this.on(this.W,"firstplay",this.Gi),this.on(this.W,"pause",this.Xi),this.on(this.W,"durationchange",this.Ji),this.on(this.W,"fullscreenchange",this.Qi),this.on(this.W,"error",this.Yi),this.on(this.W,"loadedmetadata",this.Ai),this.on(this.W,"resize",this.Ai),this.on(this.W,"posterchange",this.Ki),this.on(this.W,"textdata",this.Zi),this.usingNativeControls(this.ts("controls")),this.controls()&&!this.usingNativeControls()&&this.ss(),this.W.el().parentNode===this.contentEl()||"Html5"===t&&this.tag||ys(this.W.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},s.Ei=function(){this.ht=this.videoTracks(),this.rt=this.textTracks(),this.ot=this.audioTracks(),this.Bi=qe(this.W),this.C=!1,this.W.dispose(),this.W=!1},s.tech=function(t){if(t&&t.IWillNotUseThisInPlugins)return this.W;var i="\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n ";throw o.alert(i),new m(i)},s.ss=function(){this.es(),this.on(this.W,"mousedown",this.ns),this.on(this.W,"touchstart",this.rs),this.on(this.W,"touchmove",this.hs),this.on(this.W,"touchend",this.os),this.on(this.W,"tap",this.us)},s.es=function(){this.off(this.W,"tap",this.us),this.off(this.W,"touchstart",this.rs),this.off(this.W,"touchmove",this.hs),this.off(this.W,"touchend",this.os),this.off(this.W,"mousedown",this.ns)},s.$i=function(){if(this.triggerReady(),this.mi.volume&&this.cs("setVolume",this.mi.volume),this.Ki(),this.Ji(),(this.src()||this.currentSrc())&&this.tag&&this.o.autoplay&&this.paused()){try{delete this.tag.poster}catch(t){n("deleting tag.poster throws in some browsers",t)}this.play()}},s.Ri=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"))},s.hasStarted=function(t){return void 0!==t?(this.nt!==t&&(this.nt=t,t?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.nt},s.qi=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},s.Oi=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return t.removeClass("vjs-waiting")}))},s.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},s.Li=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},s.Ui=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},s.zi=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},s.Wi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},s.Gi=function(){this.o.starttime&&(n.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.o.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},s.Xi=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},s.Hi=function(){this.addClass("vjs-ended"),this.o.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},s.Ji=function(){this.duration(this.ts("duration"))},s.ns=function(t){0===t.button&&this.controls()&&(void 0!==this.o&&void 0!==this.o.userActions&&void 0!==this.o.userActions.click&&!1===this.o.userActions.click||(void 0!==this.o&&void 0!==this.o.userActions&&"function"==typeof this.o.userActions.click?this.o.userActions.click.call(this,t):this.paused()?this.play():this.pause()))},s.us=function(){this.userActive(!this.userActive())},s.rs=function(){this.userWasActive=this.userActive()},s.hs=function(){this.userWasActive&&this.reportUserActivity()},s.os=function(t){t.cancelable&&t.preventDefault()},s._i=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},s.ji=function(){this.reportUserActivity()},s.Qi=function(t,i){i&&(this.toggleClass("vjs-ios-native-fs",!(!i.nativeIOSFullscreen||!i.isFullscreen)),this.isFullscreen(i.isFullscreen)),this.trigger("fullscreenchange")},s.Yi=function(){var t=this.W.error();this.error(t)},s.Zi=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},s.getCache=function(){return this.mi},s.cs=function(t,i){if(this.W&&!this.W.C)this.W.ready((function(){this[t](i)}),!0);else try{this.W&&this.W[t](i)}catch(t){throw n(t),t}},s.ts=function(t){if(this.W&&this.W.C)try{return this.W[t]()}catch(i){throw void 0===this.W[t]?n("Video.js: "+t+" method not defined for "+this.Di+" playback technology.",i):"TypeError"===i.name?(n("Video.js: "+t+" unavailable on "+this.Di+" playback technology element.",i),this.W.C=!1):n(i),i}},s.play=function(){return this.src()||this.currentSrc()?this.cs("play"):this.W.one("loadstart",(function(){this.play()})),this},s.pause=function(){return this.cs("pause"),this},s.paused=function(){return!1!==this.ts("paused")},s.scrubbing=function(t){return void 0!==t?(this.bi=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.bi},s.currentTime=function(t){return void 0!==t?(this.cs("setCurrentTime",t),this):(this.mi.currentTime=this.ts("currentTime")||0,this.mi.currentTime)},s.duration=function(t){return void 0===t?void 0!==this.mi.duration?this.mi.duration:NaN:((t=x(t))<0&&(t=1/0),t!==this.mi.duration&&(this.mi.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},s.remainingTime=function(){return this.duration()-this.currentTime()},s.buffered=function(){var t=this.ts("buffered");return t&&t.length||(t=Fe(0,0)),t},s.bufferedPercent=function(){return Ne(this.buffered(),this.duration())},s.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),s=t.end(t.length-1);return s>i&&(s=i),s},s.volume=function(t){var i;return void 0!==t?(i=_.max(0,_.min(1,x(t))),this.mi.volume=i,this.cs("setVolume",i),this):(i=x(this.ts("volume")),S(i)?1:i)},s.muted=function(t){return void 0!==t?(this.cs("setMuted",t),this):this.ts("muted")||!1},s.supportsFullScreen=function(){return this.ts("supportsFullScreen")||!1},s.isFullscreen=function(t){return void 0!==t?(this.ls=!!t,this):!!this.ls},s.requestFullscreen=function(t){var i,s=Ve;return this.isFullscreen(!0),s.requestFullscreen?(ve(Ji,s.fullscreenchange,xe(this,(function t(i){this.isFullscreen(Ji[s.fullscreenElement]),!1===this.isFullscreen()&&pe(Ji,s.fullscreenchange,t),this.trigger("fullscreenchange")}))),s.prefixed||(i=this.o.fullscreenOptions,void 0!==t&&(i=t)),this.m[s.requestFullscreen](i)):this.W.supportsFullScreen()?this.cs("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},s.exitFullscreen=function(){var t=Ve;return this.isFullscreen(!1),t.requestFullscreen?Ji[t.exitFullscreen]():this.W.supportsFullScreen()?this.cs("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},s.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=Ji.documentElement.style.overflow,ve(Ji,"keydown",xe(this,this.fullWindowOnEscKey)),Ji.documentElement.style.overflow="hidden",Ss(Ji.body,"vjs-full-window"),this.trigger("enterFullWindow")},s.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},s.exitFullWindow=function(){this.isFullWindow=!1,pe(Ji,"keydown",this.fullWindowOnEscKey),Ji.documentElement.style.overflow=this.docOrigOverflow,Ts(Ji.body,"vjs-full-window"),this.trigger("exitFullWindow")},s.canPlayType=function(t){for(var i,s=0,e=this.o.techOrder;s<e.length;s++){var r=Se(e[s]),h=lh.getTech(r);if(h||(h=Ce.getComponent(r)),h){if(h.isSupported()&&(i=h.canPlayType(t)))return i}else n.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},s.selectSource=function(t){var i,s=this,e=this.o.techOrder.map(Se).map((function(t){return[t,lh.getTech(t)||Ce.getComponent(t)]})).filter((function(t){var i=t[0],s=t[1];return s?s.isSupported():(n.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),r=function(t,i,s){var e;return t.some((function(t){return i.some((function(i){if(e=s(t,i))return!0}))})),e},h=function(t,i){var e=t[0];if(t[1].canPlaySource(i,s.o[e.toLowerCase()]))return{source:i,tech:e}};return(this.o.sourceOrder?r(t,e,(i=h,function(t,s){return i(s,t)})):r(e,t,h))||!1},s.src=function(t){if(void 0===t)return this.ts("src");var i=lh.getTech(this.Di);return i||(i=Ce.getComponent(this.Di)),Array.isArray(t)?this.fs(t):"string"==typeof t?this.src({src:t}):t instanceof k&&(t.type&&!i.canPlaySource(t,this.o[this.Di.toLowerCase()])?this.fs([t]):(this.mi.sources=null,this.mi.source=t,this.mi.src=t.src,this.Ni=t.type||"",this.ready((function(){i.prototype.hasOwnProperty("setSource")?this.cs("setSource",t):this.cs("src",t.src),"auto"===this.o.preload&&this.load(),this.o.autoplay&&this.play()}),!0))),this},s.fs=function(t){var i=this.selectSource(t);i?(i.tech===this.Di?this.src(i.source):this.jt(i.tech,i.source),this.mi.sources=t):(this.setTimeout((function(){this.error({code:4,message:this.localize(this.o.notSupportedMessage)})}),0),this.triggerReady())},s.load=function(){return this.cs("load"),this},s.reset=function(){return this.jt(Se(this.o.techOrder[0]),null),this.cs("reset"),this},s.currentSources=function(){var t=this.currentSource(),i=[];return 0!==k.keys(t).length&&i.push(t),this.mi.sources||i},s.currentSource=function(){var t={},i=this.currentSrc();return i&&(t.src=i),this.mi.source||t},s.currentSrc=function(){return this.ts("currentSrc")||this.mi.src||""},s.currentType=function(){return this.Ni||""},s.preload=function(t){return void 0!==t?(this.cs("setPreload",t),this.o.preload=t,this):this.ts("preload")},s.autoplay=function(t){return void 0!==t?(this.cs("setAutoplay",t),this.o.autoplay=t,this):this.ts("autoplay",t)},s.playsinline=function(t){return void 0!==t?(this.cs("setPlaysinline",t),this.o.playsinline=t,this):this.ts("playsinline")},s.loop=function(t){return void 0!==t?(this.cs("setLoop",t),this.o.loop=t,this):this.ts("loop")},s.poster=function(t){return void 0===t?this.gi:(t||(t=""),this.gi=t,this.cs("setPoster",t),this.trigger("posterchange"),this)},s.Ki=function(){!this.gi&&this.W&&this.W.poster&&(this.gi=this.W.poster()||"",this.trigger("posterchange"))},s.controls=function(t){return void 0!==t?(t=!!t,this.yi!==t&&(this.yi=t,this.usingNativeControls()&&this.cs("setControls",t),t?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.ss()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.es())),this):!!this.yi},s.usingNativeControls=function(t){return void 0!==t?(t=!!t,this.ds!==t&&(this.ds=t,t?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):!!this.ds},s.error=function(t){return void 0===t?this.ft||null:null===t?(this.ft=t,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close(),this):(this.ft=new He(t),this.addClass("vjs-error"),n.error("(CODE:"+this.ft.code+" "+He.errorTypes[this.ft.code]+")",this.ft.message,this.ft),this.trigger("error"),this)},s.reportUserActivity=function(t){this.vs=!0},s.userActive=function(t){return void 0!==t?((t=!!t)!==this.ps&&(this.ps=t,t?(this.vs=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.vs=!1,this.W&&this.W.one("mousemove",(function(t){t.stopPropagation(),t.preventDefault()})),this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive"))),this):this.ps},s.ki=function(){var t,i,s,e,n=xe(this,this.reportUserActivity);this.on("mousedown",(function(){n(),this.clearInterval(t),t=this.setInterval(n,250)})),this.on("mousemove",(function(t){t.screenX===i&&t.screenY===s||(i=t.screenX,s=t.screenY,n())})),this.on("mouseup",(function(i){n(),this.clearInterval(t)})),this.on("keydown",n),this.on("keyup",n),this.setInterval((function(){if(this.vs){this.vs=!1,this.userActive(!0),this.clearTimeout(e);var t=this.o.inactivityTimeout;t>0&&(e=this.setTimeout((function(){this.vs||this.userActive(!1)}),t))}}),250)},s.playbackRate=function(t){return void 0!==t?(this.cs("setPlaybackRate",t),this):this.W&&this.W.featuresPlaybackRate?this.ts("playbackRate"):1},s.isAudio=function(t){return void 0!==t?(this.gs=!!t,this):!!this.gs},s.videoTracks=function(){return this.W?this.W.videoTracks():(this.ht=this.ht||new oh,this.ht)},s.audioTracks=function(){return this.W?this.W.audioTracks():(this.ot=this.ot||new uh,this.ot)},s.textTracks=function(){if(this.W)return this.W.textTracks()},s.remoteTextTracks=function(){if(this.W)return this.W.remoteTextTracks()},s.remoteTextTrackEls=function(){if(this.W)return this.W.remoteTextTrackEls()},s.addTextTrack=function(t,i,s){if(this.W)return this.W.addTextTrack(t,i,s)},s.addRemoteTextTrack=function(t,i){if(this.W)return this.W.addRemoteTextTrack(t,i)},s.removeRemoteTextTrack=function(t){var i=(void 0===t?{}:t).track,s=void 0===i?arguments[0]:i;if(this.W)return this.W.removeRemoteTextTrack(s)},s.getVideoPlaybackQuality=function(){return this.ts("getVideoPlaybackQuality")},s.videoWidth=function(){return this.W&&this.W.videoWidth&&this.W.videoWidth()||0},s.videoHeight=function(){return this.W&&this.W.videoHeight&&this.W.videoHeight()||0},s.language=function(t){return void 0===t?this.ys:(this.ys!==String(t).toLowerCase()&&(this.ys=String(t).toLowerCase(),void 0!==this.m&&this.trigger("languagechange")),this)},s.languages=function(){return Te(i.prototype.o.languages,this.pi)},s.toJSON=function(){var t=Te(this.o),i=t.tracks;t.tracks=[];for(var s=0;s<i.length;s++){var e=i[s];(e=Te(e)).player=void 0,t.tracks[s]=e}return t},s.createModal=function(t,i){var s=this;(i=i||{}).content=t||"";var e=new Je(this,i);return this.addChild(e),e.on("dispose",(function(){s.removeChild(e)})),e.open()},i.getTagSettings=function(t){var i={sources:[],tracks:[]},s=As(t),e=s["data-setup"];if(xs(t,"vjs-fluid")&&(s.fluid=!0),null!==e){var r=ze(e||"{}"),h=r[0],o=r[1];h&&n.error(h),es(s,o)}if(es(i,s),t.hasChildNodes())for(var a=t.childNodes,u=0,c=a.length;u<c;u++){var l=a[u],f=l.nodeName.toLowerCase();"source"===f?i.sources.push(As(l)):"track"===f&&i.tracks.push(As(l))}return i},s.wi=function(){var t=Ji.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},i}(Ce);Bo.players={};var Ro=o.navigator;Bo.prototype.o={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:Ro&&(Ro.languages&&Ro.languages[0]||Ro.userLanguage||Ro.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreenOptions:{navigationUI:"hide"}},["ended","seeking","seekable","networkState","readyState"].forEach((function(t){Bo.prototype[t]=function(){return this.ts(t)}})),$o.forEach((function(t){Bo.prototype["handleTech"+Se(t)+"_"]=function(){return this.trigger(t)}})),Ce.registerComponent("Player",Bo);var Oo,Vo,Lo=function(t){function i(s){var e;void 0===s&&(s={});var n=Te(s,{kind:Ke[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(se)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return k.defineProperty(r,"enabled",{get:function(){return h},set:function(t){"boolean"==typeof t&&t!==h&&(h=t,this.trigger("enabledchange"))}}),n.enabled&&(r.enabled=n.enabled),r.G=!0,r||Ae(e)}return Ie(i,t),i}(sn),Uo=function(t){function i(s){var e;void 0===s&&(s={});var n=Te(s,{kind:Ye[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(se)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return k.defineProperty(r,"selected",{get:function(){return h},set:function(t){"boolean"==typeof t&&t!==h&&(h=t,this.trigger("selectedchange"))}}),n.selected&&(r.selected=n.selected),r||Ae(e)}return Ie(i,t),i}(sn);function Ho(t,i,s){var e;if("string"==typeof t){if(0===t.indexOf("#")&&(t=t.slice(1)),Ho.getPlayers()[t])return i&&n.warn('Player "'+t+'" is already initialised. Options will not be applied.'),s&&Ho.getPlayers()[t].ready(s),Ho.getPlayers()[t];e=function(t){return 0===t.indexOf("#")&&(t=t.slice(1)),Ji.getElementById(t)}(t)}else e=t;if(!e||!e.nodeName)throw new g("The element or ID supplied is not valid. (videojs)");if(e.player||Bo.players[e.playerId])return e.player||Bo.players[e.playerId];i=i||{},Ho.hooks("beforesetup").forEach((function(t){var s=t(e,Te(i));ns(s)&&!Array.isArray(s)?i=Te(i,s):n.error("please return an object in beforesetup hooks")}));var r=new(Ce.getComponent("Player"))(e,i,s);return Ho.hooks("setup").forEach((function(t){return t(r)})),r}"undefined"==typeof HTMLVideoElement&&ds()&&(Ji.createElement("video"),Ji.createElement("audio"),Ji.createElement("track")),Ho.bs={},Ho.hooks=function(t,i){return Ho.bs[t]=Ho.bs[t]||[],i&&(Ho.bs[t]=Ho.bs[t].concat(i)),Ho.bs[t]},Ho.hook=function(t,i){Ho.hooks(t,i)},Ho.removeHook=function(t,i){var s=Ho.hooks(t).indexOf(i);return!(s<=-1)&&(Ho.bs[t]=Ho.bs[t].slice(),Ho.bs[t].splice(s,1),!0)},!0!==o.VIDEOJS_NO_DYNAMIC_STYLE&&ds()&&((Oo=Rs(".vjs-styles-defaults"))||(Oo=_e("vjs-styles-defaults"),(Vo=Rs("head"))&&Vo.insertBefore(Oo,Vo.firstChild),je(Oo,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n "))),ke(1,Ho),Ho.VERSION="5.20.6-opentelly.12",Ho.options=Bo.prototype.o,Ho.getPlayers=function(){return Bo.players},Ho.players=Bo.players,Ho.getComponent=Ce.getComponent,Ho.registerComponent=function(t,i){lh.isTech(i)&&n.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Ce.registerComponent.call(Ce,t,i)},Ho.getTech=lh.getTech,Ho.registerTech=lh.registerTech,Ho.browser=ae,Ho.TOUCH_ENABLED=he,Ho.extend=function(t,i){void 0===i&&(i={});var s=function(){t.apply(this,arguments)},e={};for(var r in ns(i)?("function"==typeof i.init&&(n.warn("Constructor logic via init() is deprecated; please use constructor() instead."),i.constructor=i.init),i.constructor!==k.prototype.constructor&&(s=i.constructor),e=i):"function"==typeof i&&(s=i),function(t,i){if("function"!=typeof i&&null!==i)throw new g("Super expression must either be null or a function, not "+typeof i);t.prototype=k.create(i&&i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i&&(t.ws=i)}(s,t),e)e.hasOwnProperty(r)&&(s.prototype[r]=e[r]);return s},Ho.mergeOptions=Te,Ho.bind=xe,Ho.plugin=function(t,i){Bo.prototype[t]=i},Ho.addLanguage=function(t,i){var s;return t=(""+t).toLowerCase(),Ho.options.languages=Te(Ho.options.languages,((s={})[t]=i,s)),Ho.options.languages[t]},Ho.log=n,Ho.createTimeRange=Ho.createTimeRanges=Fe,Ho.formatTime=Sh,Ho.parseUrl=en,Ho.isCrossOrigin=nn,Ho.EventTarget=Pe,Ho.on=ve,Ho.one=ge,Ho.off=pe,Ho.trigger=me,Ho.xhr=Jr,Ho.TextTrack=th,Ho.AudioTrack=Lo,Ho.VideoTrack=Uo,Ho.isEl=vs,Ho.isTextNode=Fs,Ho.createEl=ms,Ho.hasClass=xs,Ho.addClass=Ss,Ho.removeClass=Ts,Ho.toggleClass=Cs,Ho.setAttributes=Ps,Ho.getAttributes=As,Ho.emptyEl=Ns,Ho.appendContent=$s,Ho.insertContent=Bs,Ho.computedStyle=Eh;var zo=10,Wo=60;function qo(t){return t.duration()===1/0}function Go(t){return t.scrubbing()?t.getCache().currentTime:t.currentTime()}function Xo(t){let i=Yo(t);return qo(t)?i.end(i.length-1):i.start(0)}function Jo(t){return Yo(t).start(0)}function Qo(t){let i=Yo(t);return i.end(i.length-1)-i.start(0)}function Yo(t){let i=t.seekable();if(i&&i.length)return i;let s=t.duration();return s=isFinite(s)?s:0,new Bi([0,s]).ks()}function Ko(t,i){void 0===i&&(i=t);let s=t<0?"-":"";t=_.abs(t);let e=_.floor(t%60),n=_.floor(t/60%60),r=_.floor(t/3600);const h=_.floor(i/60%60),o=_.floor(i/3600);return(S(t)||t===1/0)&&(r=n=e="-"),r=+r>0||o>0?r+":":"",n=((r||h>=10)&&+n<10?"0"+n:n)+":",e=+e<10?"0"+e:e,s+r+n+e}function Zo(){let t=this,i=Go(t);t.toggleClass("theo-at-live",function(t,i){if(qo(t)){let s=Yo(t);return s.end(s.length-1)-i<zo}return!1}(t,i)),t.toggleClass("theo-dvr",function(t){return qo(t)&&Qo(t)>=Wo}(t))}var ta="theo-ad-playing",ia="theo-dai-ad-playing";function sa(t,i,s){t.toggleClass(ta,i),t.toggleClass(ia,i&&s)}function ea(){this.userActive(!1)}var na,ra,ha=class{constructor(t,i){this.type=t.type,this.target=i,this.playerEvent=t}};!function(t){t._s="unavailable",t.js="available",t.xs="presenting"}(na||(na={})),function(t){t.LOADED="DAILoaded",t.AD_BREAK_STARTED="DAIAdBreakStarted",t.AD_BREAK_ENDED="DAIAdBreakEnded",t.AD_PERIOD_STARTED="DAIAdPeriodStarted",t.AD_PERIOD_ENDED="DAIAdPeriodEnded",t.AD_PROGRESS="DAIAdProgress",t.CUEPOINTS_CHANGED="DAICuePointsChanged",t.CLICK="DAIClick",t.ERROR="DAIError",t.STARTED="DAIStarted",t.FIRST_QUARTILE="DAIFirstQuartile",t.MIDPOINT="DAIMidpoint",t.STREAM_INITIALIZED="DAIStreamInitialized",t.THIRD_QUARTILE="DAIThirdQuartile",t.COMPLETE="DAIComplete"}(ra||(ra={}));var oa=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],aa=Ho.getTech("Tech"),ua=Ho.getTech("Html5"),ca=class extends aa{Ss(){var t;for(const t of oa)this.Ts.addEventListener(t,this.Cs);this.Ts.addEventListener("error",this.Ps),this.Ts.addEventListener("contentprotectionerror",this.Ps),this.Ts.addEventListener("sourcechange",this.As),this.Ts.addEventListener("loadstart",this.Ms),null==(t=this.Ts.presentation)||t.addEventListener("presentationmodechange",this.Is),this.Ts.textTracks.addEventListener("addtrack",this.Es),this.Ts.textTracks.addEventListener("removetrack",this.Ds),this.Ts.textTracks.addEventListener("change",this.Fs),this.Ts.audioTracks.addEventListener("addtrack",this.Ns),this.Ts.audioTracks.addEventListener("removetrack",this.$s),this.Ts.audioTracks.addEventListener("change",this.Bs)}Rs(){var t;for(const t of oa)this.Ts.removeEventListener(t,this.Cs);this.Ts.removeEventListener("error",this.Ps),this.Ts.removeEventListener("contentprotectionerror",this.Ps),this.Ts.removeEventListener("sourcechange",this.As),this.Ts.removeEventListener("loadstart",this.Ms),null==(t=this.Ts.presentation)||t.removeEventListener("presentationmodechange",this.Is),this.Ts.textTracks.removeEventListener("addtrack",this.Es),this.Ts.textTracks.removeEventListener("removetrack",this.Ds),this.Ts.textTracks.removeEventListener("change",this.Fs),this.Ts.audioTracks.removeEventListener("addtrack",this.Ns),this.Ts.audioTracks.removeEventListener("removetrack",this.$s),this.Ts.audioTracks.removeEventListener("change",this.Bs)}Os(t){this.trigger(new ha(t,this))}createEl(){let t=this.o,i=t.player;if(!i)throw new m(this.localize('Missing required tech option "player"'));let s=i.element;return Ho.setAttributes(s,{id:t.techId}),s}theoplayer(){return this.Ts}addTextTrack(t,i,s){return super.addTextTrack(t,i,s)}buffered(){return this.Ts.buffered}played(){return this.Ts.played}reset(){this.Ts.stop()}play(){this.Ts.play()}pause(){this.Ts.pause()}paused(){return this.Ts.paused}currentTime(){return this.Ts.currentTime}setCurrentTime(t){this.Ts.currentTime=t}duration(){return this.Ts.duration}volume(){return this.Ts.volume}setVolume(t){this.Ts.volume=t}muted(){return this.Ts.muted}setMuted(t){this.Ts.muted=t}src(t){if(void 0!==t)this.setSrc(t);else{if(this.Ts.src)return this.Ts.src;if(this.Ts.source){if(!E(this.Ts.source.ads))return this.Ts.source.ads[0].sources;if(function(t){if(t.sources)if(Rt(t.sources)){for(const i of t.sources)if(!zt(i)&&"verizon-media"===i.integration)return!0}else if(!zt(t.sources))return"verizon-media"===t.sources.integration;return!1}(this.Ts.source))return"This source is managed by the Verizon Media integration extension.";if(function(t){if(t.sources)if(Rt(t.sources)){for(const i of t.sources)if(ei(i))return!0}else if(Lt(t.sources))return ei(t.sources);return!1}(this.Ts.source))return"This source is managed by the DAI integration extension."}}}setSrc(t){return this.setSource({src:t})}setSource(t){this.ft=null,this.trigger("error")}currentSrc(){return this.Ts.src}load(){this.setPreload("auto")}preload(){return this.Ts.preload}setPreload(t){this.Ts.preload=t}autoplay(){return this.Ts.autoplay}setAutoplay(t){this.Ts.autoplay=!!t}seeking(){return this.Ts.seeking}seekable(){return this.Ts.seekable}ended(){return this.Ts.ended}playbackRate(){return this.Ts.playbackRate}setPlaybackRate(t){this.Ts.playbackRate=t}readyState(){return this.Ts.readyState}networkState(){return 0}controls(){return!1}videoHeight(){return this.Ts.videoHeight}videoWidth(){return this.Ts.videoWidth}supportsFullScreen(){return this.Ts.presentation.supportsMode(Hi.FULLSCREEN)}enterFullScreen(){this.Ts.presentation.requestMode(Hi.FULLSCREEN)}exitFullScreen(){this.Ts.presentation.requestMode(Hi.INLINE)}Vs(){let t=this.Ts.ads;if(t&&t.playing)return!0;let i=this.Ts.vr;return!(!i||i.state===na._s)}initTextTrackListeners(){return this.on("touchend",(t=>{this.Vs()&&(t.preventDefault=()=>{})})),super.initTextTrackListeners()}ti(){if(!this.src())return;const t=this.readyState();if(0===t){let t=!1,i=()=>{t=!0};this.on("loadstart",i);let s=()=>{t||this.trigger("loadstart")};return this.on("loadedmetadata",s),void this.ready((()=>{this.off("loadstart",i),this.off("loadedmetadata",s),t||this.trigger("loadstart")}))}let i=["loadstart"];i.push("loadedmetadata"),t>=2&&i.push("loadeddata"),t>=3&&i.push("canplay"),t>=4&&i.push("canplaythrough"),this.ready((()=>{for(const t of i)this.trigger(t)}))}dispose(){this.Rs(),this.Ts=null,super.dispose()}static isSupported(){return!0}static canPlayType(){return"maybe"}static canPlaySource(t){return"maybe"}get featuresVolumeControl(){return Ei}constructor(t={},i){super(t,i),this.Cs=t=>this.Os(t),this.Ls=!1,this.As=()=>{this.Os(new hi(this.Ts.currentTime,this.Ts.readyState)),this.Os(new ft)},this.Ms=()=>{this.Os(new Mt(this.Ts.currentTime))},this.Es=t=>{this.textTracks().it(t.track)},this.Ns=t=>{this.audioTracks().it(t.track)},this.Ds=t=>{this.textTracks().st(t.track)},this.$s=t=>{this.audioTracks().st(t.track)},this.Fs=()=>{let t=this.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Bs=()=>{let t=this.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Is=()=>{if(!this.supportsFullScreen())return;let t=this.Ls,i=this.Ts.presentation.currentMode===Hi.FULLSCREEN;t!==i&&(this.Ls=i,this.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))},this.Ps=()=>{const t=this.Ts.errorObject,i=t&&ot(t.code)||-1,s=t&&t.message||"An unknown error occurred.";this.error({code:i,message:this.localize(s)})},this.Ts=this.o.player,this.Ss();const s=!this.paused();s&&this.pause(),t.preload&&this.setPreload(t.preload),t.autoplay&&this.setAutoplay(t.autoplay),t.muted&&this.setMuted(t.muted),t.source?this.setSrc(t.source):this.ti(),s&&this.ready((()=>this.play())),this.triggerReady()}};function la(t){return class extends t{get Ts(){return this.Us||(this.Us=this.player().tech({IWillNotUseThisInPlugins:!0}).theoplayer()),this.Us}dispose(){this.Us=void 0,super.dispose()}constructor(...t){super(...t),this.Us=void 0}}}ca.prototype.featuresFullscreenResize=ua.prototype.featuresFullscreenResize,ca.prototype.featuresPlaybackRate=ua.prototype.featuresPlaybackRate,ca.prototype.featuresProgressEvents=!0,ca.prototype.featuresTimeupdateEvents=!0,ca.prototype.featuresNativeTextTracks=!0,Ho.registerTech("THEOplayer",ca);var fa=class{constructor(t){this.Hs=t=>{vi(this.zs,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.Ws=t=>{gi(this.zs,"theo-mobile-button-hover")},this.qs=t=>{this.zs.blur()},this.zs=t,t.addEventListener("touchstart",this.Hs),t.addEventListener("touchend",this.Ws),t.addEventListener("focusin",this.qs)}},da=Ho.getComponent("Menu"),va=class extends(la(da)){get Gs(){return this.player().el()}Xs(){vi(this.Gs,"theo-menu-opened")}Js(){gi(this.Gs,"theo-menu-opened")}constructor(t,i){super(t,i)}},pa=Ho.getComponent("MenuItem"),ma=class extends(la(pa)){get parentMenu(){return this.Qs}buildCSSClass(){return"theo-menu-item vjs-menu-item"}createEl(){let t=super.createEl("li",{className:this.buildCSSClass(),tabIndex:0},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){this.Ys||(this.parentMenu.Ks(this),"tap"!==t.type&&"keydown"!==t.type||(this.Ys=!0,this.trigger("click"),this.Ys=!1))}dispose(){At.te.Zs&&(this.el().removeEventListener("touchstart",this.Hs),this.el().removeEventListener("touchend",this.Ws)),super.dispose()}constructor(t,i,s){super(t,Fi({selectable:!0},i)),this.Ys=!1,this.Hs=t=>{vi(this.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},this.Ws=t=>{gi(this.el(),"theo-mobile-menu-item-hover")},this.Qs=s,At.te.Zs&&(this.el().addEventListener("touchstart",this.Hs),this.el().addEventListener("touchend",this.Ws))}},ga=Ho.getComponent("ClickableComponent"),ya=class extends ga{get parentMenu(){return this.Qs}get ie(){return this.se}set ie(t){this.se=t,this.el().setAttribute("tabindex",this.ie?"0":"-1"),this.ee()}buildCSSClass(){return"theo-primary-background theo-menu-header"}createEl(){let t=super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){!this.Ys&&this.ie&&(this.Qs.ne(),"tap"===t.type&&(this.Ys=!0,this.trigger("click"),this.Ys=!1))}ee(){this.ie?this.el().setAttribute("aria-label",this.localize("Go back to the previous menu")):this.el().setAttribute("aria-label","")}constructor(t,i,s){super(t,i),this.Ys=!1,this.se=!1,this.Qs=s,this.on(t,"languagechange",this.ee)}},ba=class extends va{get menuHeader(){return this.re}get menuItems(){return this.children()}addMenuItem(t){t=Fi({playerOptions:this.o.playerOptions},t);let i=new ma(this.player(),t,this);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}addSubMenuItem(t){t=Fi({playerOptions:this.o.playerOptions},t);let i=this.he(this.player(),t);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}removeMenuItem(t){this.removeChild(t),this.trigger("menuchange")}buildCSSClass(){return"theo-menu vjs-menu"}Xs(){super.Xs(),a.removeEventListener("resize",this.oe),a.addEventListener("resize",this.oe),this.show()}ae(){let t=this.ue();if(!t)return;let i=t.getClientRects();At.te.Zs?this.ce(t,i):this.le(t,i)}ue(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0}le(t,i){}ce(t,i){}Js(){a.removeEventListener("resize",this.oe),super.Js(),this.hide(),At.te.Zs&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=this.contentEl();vi(i,"theo-menu-content");let s=new ya(this.player(),this.o,this);return i.parentNode.insertBefore(s.el(),i),this.re=s,t}Ks(t){}show(){return this.ae(),super.show()}dispose(){this.re&&this.re.dispose(),super.dispose()}constructor(t,i){super(t,i),this.oe=()=>this.ae(),this.fe=this.player().el(),this.hide(),this.on("menuchange",this.ae)}},wa=class extends ba{get de(){return this.ve}set de(t){this.ve&&this.ve.pe(this),this.ve=t,t&&t.me(this)}ge(t){this.de.ye(t,"replace")}be(t){t.de.ye(this,"restore")}we(){gi(this.ke,"vjs-hidden"),this.ke.style.opacity="1",super.show()}_e(){vi(this.ke,"vjs-hidden")}Xs(){this.de&&this.de.Xs(),super.Xs()}Js(){this.de&&this.de.Js(),super.Js(),vi(this.ke,"vjs-hidden")}ue(){if(this.de&&this.de.je)return this.de.je.ke}le(t,i){if(i.length>0){let t=i[0].height,s=i[0].width;this.ve.xe.style.height=t+"px",this.ve.xe.style.width=s+"px"}super.le(t,i)}constructor(t,i){super(t,i)}},ka=class{get xe(){return this.zs}get je(){return this.Se}me(t){t._e(),this.zs.appendChild(t.ke)}pe(t){this.zs.removeChild(t.ke)}ye(t,i){if(t==this.Se)return;let s=this.Se;if(this.Se=t,this.Se.we(),this.je.focus(),At.te.Zs)s._e();else{const t="translateX(100%)",e="translateX(-100%)",n=q("transform");s.ke.style.opacity="0",s.ke.style[n]="replace"===i?e:t,this.Se.ke.style.opacity="1",this.Se.ke.style[n]="",v((()=>{s._e(),s.ke.style[n]=""}),300)}}Xs(){this.Te(),this.Se.we(),this.Ce()}Js(){this.Te(),this.Se._e(),this.Pe._e(),this.Se=this.Pe,this.Ce()}Ce(){U((()=>{gi(this.zs,"theo-no-transition"),gi(this.Se.ke,"theo-no-transition")}))}Te(){vi(this.zs,"theo-no-transition"),vi(this.Se.ke,"theo-no-transition")}constructor(t){this.Pe=this.Se=t,this.zs=c.createElement("div"),this.zs.className="theo-tertiary-background theo-menu-animation-container",this.zs.appendChild(this.Pe.ke),this.fe=this.Se.player().el()}},_a=class extends wa{get ke(){return this.el()}get parentMenu(){return this.Ae}he(t,i){let s=new ja(t,i,this);return s.subMenu.de=this.de,s}ne(){this.Me()}Ks(t){super.Ks(t),this.Me()}Me(){this.parentMenu.be(this)}buildCSSClass(){return"theo-submenu "+(this.Ie?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+super.buildCSSClass()}addSubMenuItem(t){this.Ie=!0;let i=super.addSubMenuItem(t);return this.removeClass("theo-leaf-submenu"),i}constructor(t,i,s){super(t,i),this.Ie=!1,this.Ae=s,this.menuHeader.ie=!0}},ja=class extends ma{get subMenu(){return this.Ee}handleClick(t){this.parentMenu.ge(this.subMenu)}constructor(t,i,s){super(t,Fi({selectable:!1},i),s),this.Ee=new _a(t,i,s)}},xa=class extends wa{get menuButton(){return this.De}createEl(){let t=Ho.createEl("div",{className:this.buildCSSClass()});return this.Fe=super.createEl(),this.Fe.className=super.buildCSSClass(),vi(this.Fe,"theo-menu-content-animatable"),t.appendChild(this.Fe),this.de=new ka(this),t.appendChild(this.de.xe),t}buildCSSClass(){return"theo-menu-animatable "+super.buildCSSClass()}he(t,i){let s=new ja(t,i,this);return s.subMenu.de=this.de,s}le(t,i){super.le(t,i);let s=this.fe.getClientRects(),e=s.length>0?s[0]:void 0,n=x(getComputedStyle(this.el()).fontSize);P(this.el(),this.De.el(),e,n)}get ke(){return this.Fe}ne(){this.De.closeMenu()}dispose(){this.Ne||(this.Ne=!0,super.dispose())}constructor(t,i,s){super(t,i),this.Ne=!1,this.De=s}},Sa=class{set $e(t){this.Be.innerHTML=this.Re.localize(t),this.Oe(),this.Ve(),ji(this.Re.el())}get $e(){return this.Be.textContent||""}Le(){this.Re.off("mouseover",this.Ve),this.Re.off("mouseout",this.Oe),this.Re.off("dispose",this.Ue),ai(this.Be)}constructor(t,i){this.Ve=()=>{gi(this.Be,"vjs-hidden");let t=this.Re.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,s=x(getComputedStyle(this.Be).fontSize);P(this.Be,this.Re.el(),i,s)},this.Oe=()=>{vi(this.Be,"vjs-hidden")},this.Ue=()=>this.Le(),this.Re=t,ji(t.el()),Ti(t.el()),this.Be=c.createElement("span"),this.Be.innerHTML=this.Re.localize(i),this.Be.className="theo-button-tooltip vjs-hidden",this.Be.setAttribute("aria-hidden","true"),this.Re.el().appendChild(this.Be),this.Re.on("mouseover",this.Ve),this.Re.on("mouseout",this.Oe),this.Re.on("dispose",this.Ue)}},Ta=Ho.getComponent("Button"),Ca=class extends(la(Ta)){get He(){const t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}get menu(){return this.ze}isMenuOpen(){return this.We}openMenu(){this.qe&&!this.We&&(this.ze.Xs(),this.el().setAttribute("aria-expanded","true"),this.We=!0,this.ze.focus())}closeMenu(){this.qe&&this.We&&(this.ze.Js(),this.el().setAttribute("aria-expanded","false"),this.We=!1)}set minimumMenuItems(t){this.Ge=t,this.Xe()}buildCSSClass(){return"theo-controlbar-button vjs-menu-button vjs-menu-button-popup "+super.buildCSSClass()}createEl(t,i,s){return super.createEl("button",{},{"aria-live":"off"})}handleClick(){this.We?this.closeMenu():this.openMenu()}enable(){return this.qe=!0,super.enable()}disable(){return this.closeMenu(),this.qe=!1,super.disable()}ee(){this.Be.$e=this.controlText()}dispose(){this.player().removeChild(this.ze),this.ze.dispose(),this.Be.Le(),this.Ts.removeEventListener("seeking",this.Je),super.dispose()}constructor(t,i){super(t,i),this.We=!1,this.Ge=1,this.qe=!0,this.Qe=t=>{let i=this.el().contains(t.target),s=this.ze.el().contains(t.target),e=!1;var n;At.te.Zs&&this.He&&(e=(null==(n=this.el().parentElement)?void 0:n.querySelector(".theo-mobile-menu-background"))===t.target);i||s||!this.We||(e&&t.preventDefault(),this.closeMenu())},this.Ye=t=>{27===t.which&&(this.closeMenu(),this.focus())},this.Je=()=>{this.We&&this.closeMenu()},this.Xe=()=>{this.ze.menuItems.length>=this.Ge?this.show():(this.closeMenu(),this.hide())},this.ze=new xa(t,i,this),this.player().getChild("controlBarMenuContainer").addChild(this.ze),this.Be=new Sa(this,this.controlText()),this.el().setAttribute("aria-haspopup","true"),At.te.Ke?(this.on(c,"touchend",this.Qe),new fa(this.el())):(this.on(c,"click",this.Qe),this.on(c,"keydown",this.Ye),K&&this.on(c,K.Ze,this.closeMenu)),this.Ts.addEventListener("seeking",this.Je),this.on(this.ze,"menuchange",this.Xe),this.on(t,"languagechange",this.ee),this.Xe()}},Pa=Ho.getComponent("Component"),Aa=class extends(Ho.getComponent("ControlBar")){addMenuButton(t){t=Fi({playerOptions:this.o.playerOptions},t);let i=new Ca(this.player(),t);return this.addChild(i),i}removeMenuButton(t){this.removeChild(t)}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-secondary-color vjs-control-bar "+super.buildCSSClass()}constructor(t,i){super(t,i),this.addChild("THEOControlBarShadow",void 0,0)}};Ho.registerComponent("THEOControlBarShadow",class extends Pa{createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-tertiary-color theo-control-bar-shadow"}});var Ma=Ho.getComponent("VolumeBar"),Ia=class extends Ma{handleFocus(t){super.handleFocus(t),this.tn.addClass("focus-within")}handleBlur(t){super.handleBlur(t),this.tn.removeClass("focus-within")}constructor(t,i){super(t,i),this.tn=i.sn}},Ea=Ho.getComponent("VolumeControl"),Da=class extends Ea{constructor(t,i){super(t,i),this.nn=new Ia(t,{sn:this}),this.addChild(this.nn)}};Da.prototype.o=Fi({},Ea.prototype.o,{children:[]}),Ho.registerComponent("VolumeControl",Da);var Fa=class extends(la(Aa)){rn(){return this.el().getBoundingClientRect().height}dispose(){this.el().removeEventListener("transitionstart",this.hn),this.el().removeEventListener("transitionend",this.an),this.cn.un(z.ln,this.fn),this.cn.dn(),super.dispose()}constructor(t,i){super(t,i),this.hn=t=>{if("opacity"===t.propertyName){const t=this.rn();this.Ts.textTrackStyle.marginBottom!==t&&(this.Ts.textTrackStyle.marginBottom=t)}},this.an=t=>{"opacity"===t.propertyName&&"0"===a.getComputedStyle(this.el()).opacity&&(this.Ts.textTrackStyle.marginBottom=void 0)},this.fn=()=>{void 0!==this.Ts.textTrackStyle.marginBottom&&(this.Ts.textTrackStyle.marginBottom=this.rn())},this.el().addEventListener("transitionstart",this.hn),this.el().addEventListener("transitionend",this.an),this.cn=new X(this.el()),this.cn.vn(z.ln,this.fn),this.cn.pn(!0)}};Fa.prototype.o=Fi({},Aa.prototype.o,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),Ho.registerComponent("ControlBar",Fa);var Na=class extends Aa{buildCSSClass(){return"theo-top-controlbar "+super.buildCSSClass()}constructor(t,i){super(t,i),t.topControlBar=this}};Na.prototype.o=Fi({},Aa.prototype.o,{children:[]}),Ho.registerComponent("TopControlBar",Na);var $a=Ho.getComponent("CurrentTimeDisplay");Ho.registerComponent("CurrentTimeDisplay",class extends $a{updateContent(){let t=this.player(),i=Go(t),s=Jo(t),e=this.localize("Current Time"),n=Ko(_.max(0,i-s),Qo(t));n!==this.At&&(this.At=n,this.contentEl().innerHTML='<span class="vjs-control-text">'+e+"</span> "+n)}constructor(t,i){super(t,i),this.on(t,"timeupdate",this.updateContent),this.on(t,"emptied",this.updateContent)}});var Ba=Ho.getComponent("DurationDisplay"),Ra=class extends(la(Ba)){updateContent(){const t=S(this.Ts.duration)?NaN:Qo(this.player()),i=this.Ts.clip.endTime-this.Ts.clip.startTime,s=_.min(t,i)||0;if(this.lt!==s){this.lt=s;const t=this.localize("Duration Time"),i=Ko(s);this.T.innerHTML='<span class="vjs-control-text">'+t+"</span> "+i}}constructor(t,i){super(t,i),this.mn=()=>this.updateContent(),this.off(t,"durationchange",this.updateContent),this.on(t,"durationchange",this.updateContent),this.off(t,"timeupdate",this.updateContent),this.on(t,"timeupdate",this.updateContent),this.off(t,"emptied",this.updateContent),this.on(t,"emptied",this.updateContent),this.Ts&&this.Ts.clip.addEventListener("change",this.mn)}};Ho.registerComponent("DurationDisplay",Ra);var Oa=Ho.getComponent("Button"),Va=class extends(la(Oa)){buildCSSClass(){return"theo-live-control "+super.buildCSSClass()}createEl(){let t=super.createEl("button",{},{"aria-live":"off"});return this.gn=Ho.createEl("span",{className:"theo-live-control-indicator"}),t.insertBefore(this.gn,t.firstChild),t}createControlTextEl(t){let i=super.createControlTextEl(t);return Ho.removeClass(i,"vjs-control-text"),Ho.addClass(i,"theo-live-control-text"),i}handleClick(){var t;const i=this.Ts;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{const t=this.player();t.currentTime(Xo(t)),t.play()}}yn(){qo(this.player())?this.show():this.hide()}constructor(t,i){super(t,i),this.controlText("Live"),this.yn(),this.on(this.player(),"durationchange",this.yn),At.te.Ke&&new fa(this.el())}};Ho.registerComponent("LiveDisplay",Va);var La=Ho.getComponent("LoadingSpinner");Ho.registerComponent("LoadingSpinner",class extends La{buildCSSClass(){return"theo-secondary-color vjs-loading-spinner "+super.buildCSSClass()}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=Ho.createEl("div",{className:"theo-loading-spinner-rotator"}),s=Ho.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=Ho.createEl("div",{className:"theo-loading-spinner-circle-right"});return i.appendChild(s),i.appendChild(e),t.appendChild(i),t}constructor(t,i){super(t,i)}});var Ua=Ho.getComponent("LoadProgressBar");function Ha(t,i){let s=t/i||0;return 100*(s>=1?1:s)+"%"}Ho.registerComponent("LoadProgressBar",class extends Ua{update(){let t=this.player(),i=Bi.bn(Yo(t)),s=i.wn(0),e=Bi.bn(t.buffered()).kn(i),n=i._n(0)-s,r=e.U&&e._n(e.U-1)||0;r=_.max(0,r-s);let h=this.el(),o=this.jn;h.style.width=Ha(r,n);for(let t=0;t<e.U;t++){let i=e.wn(t),n=e._n(t),a=o[t];a||(a=c.createElement("div"),o.push(a),h.appendChild(a)),a.style.left=Ha(i-s,r),a.style.width=Ha(n-i,r)}for(let t=o.length;t>e.U;t--)h.removeChild(o[t-1]);o.length=e.U}constructor(t,i){super(t,i),this.jn=[],this.on(t,"emptied",this.update)}});var za=Ho.getComponent("MouseTimeDisplay"),Wa=class extends(la(za)){handleMouseMove(t){let i=t,s=this.player(),e=Jo(s)+this.calculateDistance(i)*Qo(s),n=i.pageX-Pt(this.el().parentNode).left;this.update(e,n+"px")}handleTouchMove(t){let i=t,s=this.player(),e=Jo(s)+this.calculateDistance(i)*Qo(s),n=i.touches[0].pageX-Pt(this.el().parentNode).left;this.update(e,n+"px")}createEl(){let t=super.createEl();return this.xn=Ho.createEl("span",{className:"theo-time-tooltip-text"}),t}update(t,i){this.Sn=t;let s=this.Tn(t);this.el().style.left=i,this.el().setAttribute("data-current-time",s),this.keepTooltipsInside&&(It(this.xn,s),this.Cn())}Cn(){if(this.keepTooltipsInside&&this.tooltip.offsetParent){let t=this.player().contentEl(),i=t.getClientRects(),s=i.length>0?i[0]:void 0,e=x(getComputedStyle(t).fontSize);P(this.tooltip,this.el(),s,e)}}Tn(t){let i=this.player();const s=t-Xo(i);return Ko(qo(i)?_.min(s,0):s,Qo(i))}dispose(){var t;this.Ts.removeEventListener("dimensionchange",this.Pn),null==(t=this.Ts.presentation)||t.removeEventListener("presentationmodechange",this.Pn),super.dispose()}constructor(t,i){var s;(super(t,i),this.Sn=NaN,this.Pn=()=>{let t=this.player(),i=t.scrubbing()?t.getCache().currentTime:t.currentTime(),s=(i-Jo(t))/Qo(t)||0;s=Zt(s,0,1),this.update(i,100*s+"%")},this.keepTooltipsInside&&(Ho.addClass(this.tooltip,"theo-secondary-color"),this.tooltip.appendChild(this.xn)),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"mouseenter",this.handleMouseMove)})),Et.Zs)&&(this.on(t,"firstplay",this.Pn),this.on(t,"play",this.Pn),this.on(t,"seeking",this.Pn),this.on(t,"seeked",this.Pn),this.on(t,"timeupdate",this.Pn),this.Ts.addEventListener("dimensionchange",this.Pn),null==(s=this.Ts.presentation)||s.addEventListener("presentationmodechange",this.Pn),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"touchstart",this.handleTouchMove),this.on(t.controlBar.progressControl,"touchmove",Qt((t=>this.handleTouchMove(t)),25)),this.Pn()})))}};Ho.registerComponent("MouseTimeDisplay",Wa);var qa=Ho.getComponent("PlayProgressBar");Ho.registerComponent("PlayProgressBar",class extends qa{updateDataAttr(){let t=Go(this.player());this.el().setAttribute("data-current-time",this.Tn(t))}Tn(t){let i=this.player();return Ko(t-Xo(i),Qo(i))}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-play-progress vjs-slider-bar "+super.buildCSSClass()}constructor(t,i){super(t,i)}});var Ga=Ho.getComponent("RemainingTimeDisplay");Ho.registerComponent("RemainingTimeDisplay",class extends Ga{updateContent(){const t=this.player(),i=Qo(t);if(i){const s=Yo(t).end(0),e=this.localize("Remaining Time"),n=Ko(_.max(0,s-t.currentTime()),i);n!==this.At&&(this.At=n,this.contentEl().innerHTML='<span class="vjs-control-text">'+e+"</span> -"+n)}}constructor(t,i){super(t,i),this.on(t,"timeupdate",this.updateContent),this.on(t,"emptied",this.updateContent)}});var Xa=class{get Ts(){return this.Us||(this.Us=this.An.tech({IWillNotUseThisInPlugins:!0}).theoplayer()),this.Us}Mn(t){if(t.kind!==pt.In)return;if(0===this.Ts.seekable.length)return;this.En=t;const i=t.cues.slice();this.Fn.Dn(i);for(let t=0;t<i.length;t++){let s=i[t],e=i[t+1],n=!e||s.endTime!==e.startTime,r=new Ja(s,this.Ts,n);this.Nn.push(r),this.$n.appendChild(r.xe)}}Bn(){this.Ts.addEventListener("loadedmetadata",this.Rn),this.Ts.addEventListener("loadeddata",this.Rn),this.Ts.addEventListener("sourcechange",this.Rn),this.Ts.textTracks.addEventListener("addtrack",this.On),this.Ts.textTracks.addEventListener("removetrack",this.Vn),this.Ts.textTracks.addEventListener("change",this.Rn)}Ln(){this.Ts.removeEventListener("loadedmetadata",this.Rn),this.Ts.removeEventListener("loadeddata",this.Rn),this.Ts.removeEventListener("sourcechange",this.Rn),this.Ts.textTracks.removeEventListener("addtrack",this.On),this.Ts.textTracks.removeEventListener("removetrack",this.Vn),this.Ts.textTracks.removeEventListener("change",this.Rn)}Un(){if(!(this.Ts.readyState<St.Hn))for(let t of this.Ts.textTracks)if(t.kind===pt.In&&t.mode===lt.zn&&t.cues.length>0&&t.readyState!==ut.ERROR)return t}Wn(t){this.Fn.qn(t)}Gn(){this.Fn.we()}Xn(){this.Fn._e()}Jn(){for(let t of this.Nn)t.Le();this.Fn.Jn(),this.Nn=[],this.En=void 0}Le(){this.Ln(),this.Qn.removeEventListener("mousemove",this.Yn),this.Qn.removeEventListener("mouseenter",this.Kn),this.Qn.removeEventListener("mouseleave",this.Zn),this.Jn(),this.Fn.Le(),this.Us=void 0}constructor(t,i){this.An=i,this.Nn=[],this.Us=void 0,this.On=t=>{let i=t.track;i.kind===pt.In&&(i.addEventListener("addcue",this.Rn),i.addEventListener("removecue",this.Rn),i.addEventListener("readystatechange",this.Rn)),this.Rn()},this.Vn=t=>{let i=t.track;i.kind===pt.In&&(i.removeEventListener("addcue",this.Rn),i.removeEventListener("removecue",this.Rn),i.removeEventListener("readystatechange",this.Rn)),this.Rn()},this.Yn=t=>{let i=this.An,s=function(t,i){let s,e,n=Pt(t),r=t.offsetWidth,h=t.offsetHeight,o=n.top,a=n.left;!function(t){return void 0!==t.changedTouches}(i)?(e=i.pageX,s=i.pageY):(e=i.changedTouches[0].pageX,s=i.changedTouches[0].pageY);let u=Zt((o-s+h)/h,0,1),c=Zt((e-a)/r,0,1);return{x:c,y:u}}(this.$n,t),e=Jo(i)+s.x*Qo(i);e===i.duration()&&(e-=.1),this.Wn(e)},this.Zn=()=>{this.Fn._e()},this.Kn=()=>{this.Fn.we()},this.Rn=()=>{let t=this.Un();t!==this.En&&(this.Jn(),t&&this.Mn(t))},this.Qn=t,this.Fn=new Qa,this.An.contentEl().appendChild(this.Fn.xe),this.$n=c.createElement("div"),vi(this.$n,"theoplayer-chapterbar"),this.Qn.appendChild(this.$n),this.Qn.addEventListener("mousemove",this.Yn),this.Qn.addEventListener("mouseenter",this.Kn),this.Qn.addEventListener("mouseleave",this.Zn),this.Bn()}},Ja=class{get xe(){return this.zs}tr(){Ya(this.ir,this.h.currentTime)&&this.sr(),this.ir.addEventListener("enter",this.sr),this.ir.addEventListener("exit",this.er)}nr(){let t=this.h.seekable.start(0),i=this.h.seekable.end(this.h.seekable.length-1)-t,s=this.ir.startTime,e=this.ir.endTime-s,n=c.createElement("div");vi(n,"theoplayer-chapter-indicator");let r=c.createElement("div");vi(r,"theoplayer-chapter-indicator-highlight"),n.appendChild(r),this.rr&&vi(n,"theoplayer-chapter-indicator-discontinuous");let h=_.min(s/i*100,100),o=100-h,a=_.min(e/i*100,o);return n.style.width=a+"%",n.style.left=h+"%",n}Le(){this.ir.removeEventListener("enter",this.sr),this.ir.removeEventListener("exit",this.er),ai(this.zs)}constructor(t,i,s){this.ir=t,this.h=i,this.rr=s,this.sr=()=>{vi(this.xe,"theoplayer-chapter-indicator-active")},this.er=()=>{gi(this.xe,"theoplayer-chapter-indicator-active")},this.zs=this.nr(),this.tr()}},Qa=class{_e(){this.hr--,0===this.hr&&gi(this.xe,"theoplayer-chapter-hovering")}Dn(t){this.ar=t||[],this.ar.length>0&&(this.xe.style.display="")}ur(t){It(this.cr,t.content)}Jn(){this.ar=[],It(this.cr,""),this.xe.style.display="none"}we(){this.hr++,this.hr>0&&vi(this.xe,"theoplayer-chapter-hovering")}qn(t){for(let i of this.ar)if(Ya(i,t)){this.ur(i);break}}Le(){ai(this.xe)}constructor(){this.ar=[],this.hr=0,this.xe=c.createElement("div"),vi(this.xe,"theoplayer-chaptertitle"),this.xe.style.display="none",this.cr=c.createElement("p"),this.xe.appendChild(this.cr)}};function Ya(t,i){return new Bi([t.startTime,t.endTime]).lr(i)}var Ka=Ho.getComponent("SeekBar"),Za=class extends(la(Ka)){updateAriaAttributes(t){let i=this.player(),s=Go(i);t.setAttribute("aria-valuenow",(100*this.dr(s)).toFixed(2)),t.setAttribute("aria-valuetext",Ko(s-Xo(i),Qo(i)))}getPercent(){return this.dr(this.player().currentTime())}handleMouseMove(t){if(this.Ts&&this.Ts.ads&&this.Ts.ads.playing)return;let i=this.player(),s=Jo(i)+this.calculateDistance(t)*Qo(i);s>=i.duration()&&(s=i.duration()-.1),this.$n.Wn(s),i.currentTime(s)}handleMouseDown(t){this.playingStates.push(!this.player().paused()),this.$n.Gn(),super.handleMouseDown(t)}handleMouseUp(t){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.$n.Xn(),super.handleMouseUp(t)}dr(t){let i=this.player(),s=(t-Jo(i))/Qo(i);return Zt(s,0,1)}dispose(){this.$n.Le(),I(this.playingStates)}constructor(t,i){super(t,i),this.playingStates=[],this.on(t,"emptied",this.update),this.on(t,"seeking",this.update),this.$n=new Xa(this.el(),t)}};Ho.registerComponent("SeekBar",Za);var tu=Ho.getComponent("ProgressControl");At.te.Zs&&Ho.registerComponent("ProgressControl",class extends tu{createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(t){this.seekBar.handleMouseMove(t)}handleMouseDown(t){this.seekBar.handleMouseDown(t)}constructor(t,i){super(t,i),this.on(this,"touchmove",this.handleMouseMove),this.on("touchstart",this.handleMouseDown),this.seekBar.off(["touchmove","touchstart"])}});var iu=Ho.getComponent("TooltipProgressBar");function su(t){for(const i of t)if(i.enabled)return i}function eu(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:nu(t),description:ru(t),hd:!!t.height&&t.height>=720}}function nu(t){return t.height?t.height+"p":t.bandwidth?ru(t):""}function ru(t){return t.bandwidth?t.bandwidth>1e7?(t.bandwidth/1e6).toFixed(0)+"Mbps":t.bandwidth>1e6?(t.bandwidth/1e6).toFixed(1)+"Mbps":(t.bandwidth/1e3).toFixed(0)+"kbps":""}Ho.registerComponent("TooltipProgressBar",class extends iu{updateDataAttr(){let t=Go(this.player()),i=this.Tn(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i}Tn(t){let i=this.player();return Ko(t-Xo(i),Qo(i))}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-tooltip-progress-bar vjs-slider-bar "+super.buildCSSClass()}constructor(t,i){super(t,i)}});var hu=class{get pr(){return this.mr}set pr(t){let i=this.mr;for(let s=i.length-1;s>=0;s--){let e=i[s];A(t,e)||this.gr(e)}for(let i of t)this.yr(i);this.br.ae()}get wr(){return this.br.menuItems}kr(t){let i=this.wr;if(i)for(let s of i)if(s._r===t)return s}jr(t){let i=this.br.addMenuItem();return i._r=t,i.on("click",(()=>this.Sr(i))),i.el().setAttribute("role","menuitemradio"),i}Tr(t){t.dispose()}Cr(t){return!0}yr(t){if(this.Cr(t)){A(this.mr,t)||this.mr.push(t);let i=this.kr(t)||this.jr(t);return this.Pr(i),i}this.gr(t)}gr(t){let i=this.kr(t);i&&(this.br.removeMenuItem(i),this.Tr(i)),zi(this.mr,t)}Le(){const t=[];for(let i of this.mr)t.push(i);for(let i of t)this.gr(i);I(t)}constructor(t){this.mr=[],this.br=t}},ou=class extends hu{Ar(){return this.Mr=c.createElement("span"),this.Mr.className="theo-settings-control-menu-item-title",It(this.Mr,this.Ir.localize("Quality")),this.Mr}Er(){return this.Dr=c.createElement("span"),this.Dr.className="theo-settings-control-menu-quality-automatic",It(this.Dr,this.Ir.localize("Automatic")),this.Dr}Fr(){return this.Nr=c.createElement("span"),It(this.Nr,this.Ir.localize("Automatic")),this.Nr}$r(){return this.Br=c.createElement("span"),this.Br.className="theo-primary-color theo-settings-control-menu-item-hd-label",It(this.Br,this.Ir.localize("HD")),this.Br}Rr(){let t=c.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.Dr),t.appendChild(c.createTextNode(" ")),t.appendChild(this.Nr),t.appendChild(c.createTextNode(" ")),t.appendChild(this.Br),this.Or.el().appendChild(this.Mr),this.Or.el().appendChild(t),this.Or.el().setAttribute("aria-label",this.Ir.localize("Open the video quality settings menu"))}Vr(){let t=this.Lr,i=t&&vu(t.targetQuality),s=t&&t.activeQuality,e=eu(this.Ur(i||s))||{name:this.Ir.localize("Automatic")};It(this.Nr,e.name),wi(this.Dr,"vjs-hidden",!!i),wi(this.Br,"vjs-hidden",!e.hd)}Pr(t){let i=eu(t._r)||{name:this.Ir.localize("Automatic")},s=i.name;i.hd&&(s+='<span class="theo-primary-color theo-settings-control-menu-item-hd-label">'+this.Ir.localize("HD")+"</span>"),i.description&&(s+='<span class="theo-settings-control-submenu-item-alternate-value">'+i.description+"</span>"),t.el().innerHTML=s,t.el().setAttribute("aria-label",this.Ir.localize("Set video quality to ")+i.name),t._r?t.selected(t._r===this.Hr):t.selected(!this.Hr)}Sr(t){this.Lr&&(this.Lr.targetQuality=t._r&&t._r.videoQualities)}Ur(t,i){const s=i||this.pr;for(let i of s)if(t&&i&&-1!==i.videoQualities.indexOf(t))return i}Le(){this.Us.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.zr),this.Ir.off("languagechange",this.ee),this.Lr&&(this.Lr.removeEventListener("activequalitychanged",this.Wr),this.Lr.removeEventListener("targetqualitychanged",this.qr),this.Lr.removeEventListener("update",this.Gr)),super.Le()}constructor(t,i,s){super(t.subMenu),this.Lr=void 0,this.Hr=void 0,this.zr=()=>{let t=su(this.Us.videoTracks);if(t===this.Lr)return;let i=[];if(this.Lr&&(this.Lr.removeEventListener("activequalitychanged",this.Wr),this.Lr.removeEventListener("targetqualitychanged",this.qr),this.Lr.removeEventListener("update",this.Gr)),this.Lr=t,t){t.addEventListener("activequalitychanged",this.Wr),t.addEventListener("targetqualitychanged",this.qr),t.addEventListener("update",this.Gr);const s=uu(fu(t.qualities.filter((t=>t.available))));i=s.length>1?[void 0,...s]:[void 0]}this.pr=i,this.qr(),this.Wr()},this.Gr=t=>{const i=t.track;if(i!==this.Lr)return;const s=uu(fu(i.qualities.filter((t=>t.available)))),e=i&&vu(i.targetQuality);let n;this.Hr=this.Ur(e,s),n=s.length>1?[void 0,...s]:[void 0],this.pr=n,this.Vr()},this.Wr=()=>{this.yr(void 0),this.Vr()},this.qr=()=>{let t=su(this.Us.videoTracks),i=t&&vu(t.targetQuality),s=this.Ur(i),e=this.Hr;s!==e&&(this.Hr=s,s&&e||this.yr(void 0),e&&A(this.pr,e)&&this.yr(e),i&&this.yr(s),this.Vr())},this.ee=()=>{It(this.br.menuHeader.el(),this.Ir.localize("Quality")),It(this.Mr,this.Ir.localize("Quality")),It(this.Dr,this.Ir.localize("Automatic")),It(this.Nr,this.Ir.localize("Automatic")),It(this.Br,this.Ir.localize("HD")),this.Or.el().setAttribute("aria-label",this.Ir.localize("Open the video quality settings menu"));for(const t of this.wr)this.Pr(t);this.Vr()},this.Or=t,this.Us=i,this.Ir=s,this.Mr=this.Ar(),this.Dr=this.Er(),this.Nr=this.Fr(),this.Br=this.$r(),this.Rr(),It(this.br.menuHeader.el(),this.Ir.localize("Quality")),this.pr=[void 0],this.Us.videoTracks.addEventListener(["addtrack","removetrack","change"],this.zr),this.Ir.on("languagechange",this.ee),this.zr()}},au=class{get height(){return this.Xr[0].height}get bandwidth(){return this.Xr[0].bandwidth}get videoQualities(){return this.Xr}get label(){return this.Xr[0].label}add(t){this.Xr.push(t)}constructor(t){this.Xr=t}};function uu(t){let i=[];for(let s of t){let t=s,e=!1;for(let s of i)if(du(s,t)){s.add(t),e=!0;break}e||i.push(new au([t]))}return i}function cu(t,i){return t&&i?Vi(t,i):Ri.Jr}function lu(t,i){return t===i?Ri.Jr:cu(t.height,i.height)||cu(t.width,i.width)||cu(t.bandwidth,i.bandwidth)}function fu(t){return $i(t,lu).reverse()}function du(t,i){return t.label&&i.label&&t.label===i.label||it(eu(t),eu(i))}function vu(t){return Rt(t)?1===t.length?t[0]:void 0:t}function pu(t){return 1===t?"Normal":""+_.round(100*t)/100}var mu=class extends hu{Ar(){return this.Mr=c.createElement("span"),this.Mr.className="theo-settings-control-menu-item-title",It(this.Mr,this.Ir.localize("Speed")),this.Mr}Rr(){const t=c.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Or.el().appendChild(this.Mr),this.Or.el().appendChild(t),this.Or.el().setAttribute("aria-label",this.Ir.localize("Open the video speed settings menu")),t}jr(t){let i=super.jr(t);return this.Pr(i),i}Pr(t){const i=t._r,s=this.Ir.localize(pu(i));It(t.el(),s),t.el().setAttribute("aria-label",this.Ir.localize("Set video speed to ")+s),t.selected(t._r===this.Us.playbackRate)}Sr(t){this.Us.playbackRate=t._r}Le(){this.Us.removeEventListener("ratechange",this.Qr),this.Ir.off("languagechange",this.ee),super.Le()}constructor(t,i,s,e){super(t.subMenu),this.Yr=void 0,this.Qr=()=>{this.Yr&&this.yr(this.Yr);let t=this.Us.playbackRate;this.Yr=t,It(this.Kr,this.Ir.localize(pu(t))),t&&this.yr(t)},this.ee=()=>{It(this.br.menuHeader.el(),this.Ir.localize("Speed")),It(this.Mr,this.Ir.localize("Speed")),this.Or.el().setAttribute("aria-label",this.Ir.localize("Open the video speed settings menu"));for(const t of this.wr)this.Pr(t);this.Qr()},this.Or=t,this.Us=i,this.Ir=s,this.Mr=this.Ar(),this.Kr=this.Rr(),It(this.br.menuHeader.el(),this.Ir.localize("Speed")),this.pr=e,this.Us.addEventListener("ratechange",this.Qr),this.Ir.on("languagechange",this.ee),this.Qr()}};Ho.registerComponent("SettingsButton",class extends Ca{createEl(){let t=super.createEl();return this.Zr=Ho.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),It(this.Zr,this.localize("HD")),t.appendChild(this.Zr),t}buildCSSClass(){return"vjs-icon-cog theo-settings-control-button "+super.buildCSSClass()}ee(){super.ee(),It(this.Zr,this.localize("HD")),It(this.menu.menuHeader.el(),this.localize("Settings"))}dispose(){this.Lr&&(this.Lr.removeEventListener("activequalitychanged",this.Wr),this.Lr=void 0),this.Ts.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.th),this.ih.Le(),this.sh.Le(),super.dispose()}constructor(t,i){var s,e;super(t,i),this.Lr=void 0,this.th=()=>{let t=su(this.Ts.videoTracks);t!==this.Lr&&(this.Lr&&this.Lr.removeEventListener("activequalitychanged",this.Wr),this.Lr=t,t&&t.addEventListener("activequalitychanged",this.Wr),this.Wr())},this.Wr=()=>{var t;const i=null==(t=this.Lr)?void 0:t.activeQuality,s=!!(i&&i.height>=720);this.player().toggleClass("theo-hd",s)},vi(this.menu.el(),"theo-settings-control-menu"),It(this.menu.menuHeader.el(),t.localize("Settings")),this.controlText("Settings"),this.Be.$e=this.controlText(),this.eh=this.menu.addSubMenuItem({name:"QualityMenuItem"}),this.ih=new ou(this.eh,this.Ts,t);let n=null!=(e=null==i||null==(s=i.playerOptions)?void 0:s.playbackRates)?e:[];this.nh=this.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),this.sh=new mu(this.nh,this.Ts,t,n),this.Ts.videoTracks.addEventListener(["addtrack","removetrack","change"],this.th),this.th()}});var gu=class extends hu{rh(t){let i=t.label;if(i)return i;let s=t.language;if(s){let t=bi(s);if(t)return t.hh}return s||""}oh(){this.pr=this.ah}Le(){this.ah.removeEventListener("addtrack",this.uh),this.ah.removeEventListener("removetrack",this.lh),this.ah.removeEventListener("change",this.fh),super.Le()}constructor(t,i){super(t),this.uh=t=>{const i=t.track;this.yr(i),i.addEventListener("update",this.dh)},this.lh=t=>{const i=t.track;this.gr(i),i.removeEventListener("update",this.dh)},this.fh=t=>this.oh(),this.dh=()=>{for(const t of this.pr)this.yr(t)},this.ah=i,this.ah.addEventListener("addtrack",this.uh),this.ah.addEventListener("removetrack",this.lh),this.ah.addEventListener("change",this.fh),this.oh()}},yu=class extends gu{Pr(t){let i=t._r,s=this.Ir.localize(this.rh(i));It(t.el(),s),t.el().setAttribute("aria-label",this.Ir.localize("Set the audio language to")+" "+s),t.selected(i.enabled)}Sr(t){let i=t._r;for(let t of this.Ts.audioTracks)t!==i&&(t.enabled=!1);i.enabled=!0}Le(){this.Ir.off("languagechange",this.ee),super.Le()}constructor(t,i,s){super(t,i.audioTracks),this.ee=()=>{It(this.br.menuHeader.el(),this.Ir.localize("Language"));for(const t of this.wr)this.Pr(t)},this.Ts=i,this.Ir=s,It(this.br.menuHeader.el(),this.Ir.localize("Language")),this.Ir.on("languagechange",this.ee)}};Ho.registerComponent("audioTrackButton",class extends Ca{buildCSSClass(){return"vjs-icon-audio theo-audio-track-control-button "+super.buildCSSClass()}dispose(){this.ph.Le(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=2,this.ph=new yu(this.menu,this.Ts,t),this.controlText("Language"),this.Be.$e=this.controlText()}});var bu=class extends gu{Cr(t){return!!super.Cr(t)&&(!t.forced&&bt(t.kind))}jr(t){let i=super.jr(t);vi(i.el(),"theo-text-track-menu-item");let s=c.createElement("span");i.mh=s;let e=c.createElement("div");e.className="theo-text-track-menu-item-toggle",i.gh=e;let n=t=>this.yh(t,i);i.bh=n,e.addEventListener("click",n);let r=c.createElement("div");return r.className="theo-text-track-menu-item-toggle-slider",e.appendChild(r),i.el().appendChild(s),i.el().appendChild(e),i}Pr(t){let i=t,s=i._r,e=this.Ir.localize(this.rh(s));It(i.mh,e),i.el().setAttribute("aria-label",this.Ir.localize("Set the subtitle language to")+" "+e),i.el().setAttribute("role","menuitemcheckbox"),i.selected(s.mode===lt.zn)}Tr(t){let i=t;i.gh.removeEventListener("click",i.bh),super.Tr(t)}Sr(t){let i=t._r;for(let t of this.Ts.textTracks)t!==i&&gt(t.kind,i.kind)&&(t.mode=lt.wh);i.mode!==lt.zn?i.mode=lt.zn:i.mode=lt.wh}yh(t,i){t.stopImmediatePropagation(),this.Sr(i)}Le(){this.Ir.off("languagechange",this.ee),super.Le()}constructor(t,i,s){super(t,i.textTracks),this.ee=()=>{It(this.br.menuHeader.el(),this.Ir.localize("Subtitles"));for(const t of this.wr)this.Pr(t)},this.Ts=i,this.Ir=s,It(this.br.menuHeader.el(),s.localize("Subtitles")),this.Ir.on("languagechange",this.ee)}};Ho.registerComponent("subtitlesButton",class extends Ca{buildCSSClass(){return"vjs-icon-subtitles theo-text-track-control-button "+super.buildCSSClass()}dispose(){this.ph.Le(),super.dispose()}constructor(t,i){super(t,i),this.ph=new bu(this.menu,this.Ts,t),this.controlText("Subtitles"),this.Be.$e=this.controlText()}});var wu,ku=Ho.getComponent("playToggle");!function(t){t.kh="Pause",t._h="Play",t.jh="Replay"}(wu||(wu={}));var _u=class extends(la(ku)){handleClick(t){this.Ts.muted||this.Ts.prepareWithUserAction(),super.handleClick(t)}handlePlay(t){super.handlePlay(t),this.controlText("Pause"),this.Be.$e=this.controlText()}handlePause(t){this.Ts.ended||(super.handlePause(t),this.controlText("Play"),this.Be.$e=this.controlText())}ee(){this.Be.$e=this.controlText()}dispose(){this.Be.Le(),this.Ts.removeEventListener("ended",this.xh),super.dispose()}constructor(t,i){super(t,i),this.xh=()=>{this.controlText("Replay"),this.Be.$e=this.controlText()},this.controlText("Play"),this.Be=new Sa(this,this.controlText()),this.Ts.addEventListener("ended",this.xh),this.on(t,"languagechange",this.ee),At.te.Ke&&new fa(this.el())}};Ho.registerComponent("playToggle",_u);var ju,xu=Ho.getComponent("fullscreenToggle");!function(t){t.Sh="Exit fullscreen",t.Th="Fullscreen"}(ju||(ju={}));var Su=class extends(la(xu)){handleClick(t){this.Ts.prepareWithUserAction(),super.handleClick(t)}handleFullscreenChange(t){super.handleFullscreenChange(t),this.updateContent()}updateContent(){const t=this.player().isFullscreen()?"Exit fullscreen":"Fullscreen";this.controlText(t),this.Be.$e=this.controlText()}dispose(){this.Be.Le(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Fullscreen"),this.Be=new Sa(this,this.controlText()),At.te.Ke&&new fa(this.el()),this.on(t,"languagechange",this.updateContent)}};Ho.registerComponent("fullscreenToggle",Su);var Tu,Cu=Ho.getComponent("muteToggle");!function(t){t.Ch="Unmute",t.Ph="Mute"}(Tu||(Tu={}));var Pu=class extends(la(Cu)){handleClick(t){this.Ts.muted&&!this.Ts.paused&&this.Ts.prepareWithUserAction(),super.handleClick(t)}update(t){super.update(t),this.ee()}ee(){const t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.Be.$e=this.controlText()}dispose(){this.Be.Le(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Mute"),this.Be=new Sa(this,this.controlText()),At.te.Ke&&new fa(this.el()),this.on(t,"languagechange",this.ee),Ai&&(this.removeClass("vjs-hidden"),this.on(t,"loadstart",(()=>{this.removeClass("vjs-hidden")})))}};Ho.registerComponent("muteToggle",Pu);var Au=Ho.getComponent("BigPlayButton"),Mu=class extends(la(Au)){createEl(){let t=super.createEl(),i=Ho.createEl("div",{className:"theo-big-play-button-svg-container"});return i.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150" fill="currentColor">\n <circle cx="75" cy="75" r="73" fill="#000" fill-opacity="0.2"></circle>\n <circle cx="75" cy="75" r="73" class="theo-play-svg-circle" stroke-width="4" stroke="currentColor" fill="none" transform="rotate(-90,75,75)"></circle>\n <g transform="translate(85,75) scale(0.5625) translate(-75,-75)">\n <path d="m 123.89639,85.432 c -12.865,9.167 -29.482997,19.402 -49.848997,30.7 -19.634,11.035 -36.851,19.7 -51.65,26 l -16.3990002,6.099 c -1.033,-4.433 -2,-11.002 -2.9,-19.7 -2.033,-17.333 -3.04999998,-36.466 -3.04999998,-57.399 0,-19.167 1.38199998,-37.081 4.14799998,-53.75 l 4.0019995,-19.1499994 17.3990007,5.849 c 15.068,5.9999994 31.401,14.5169994 49,25.5509994 18.631,11.666 34.616997,22.766 47.948997,33.3 6.663,5.3 11.463,9.383 14.396,12.25 l -13.046,10.25"></path>\n </g>\n</svg>',t.appendChild(i),t}buildCSSClass(){return"theo-primary-color "+super.buildCSSClass()}handleClick(t){this.Ts.muted||this.Ts.prepareWithUserAction(),super.handleClick(t),void 0!==this.Ts.vr&&"unavailable"!==this.Ts.vr.state&&(this.Ts.vr.useDeviceMotionControls=!0)}};Ho.registerComponent("BigPlayButton",Mu);var Iu=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;Ho.registerComponent("MouseTimeDisplay",class extends Wa{Ah(t){const i=t.track;"metadata"===i.kind&&"thumbnails"===i.label&&void 0===this.Mh&&(this.Mh=i,this.Ih=i.src?At.Eh(i.src).href:void 0,this.Mh.addEventListener(["addcue","removecue"],this.Dh),this.Fh())}Nh(t){t.track===this.Mh&&this.$h()}createEl(){const t=super.createEl();return this.Bh=Ho.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.Rh=Ho.createEl("canvas",{className:"theo-time-tooltip-thumbnail"}),t}update(t,i){super.update(t,i),this.keepTooltipsInside&&this.Oh(t)}Oh(t){let i;if(this.Mh&&this.Mh.cues){let s=function(t,i){let s=t[0];for(let e of t)if(e.startTime<=i)s=e;else if(i>=e.endTime)return s;return s}(this.Mh.cues,t);i=s&&s.content}if(i===this.Vh)return;if(this.Vh=i,Ho.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",!!i),!i)return void this.Lh();const s=i.match(Iu);if(s){let[,t,i,e,n,r]=s;t=this.Uh(t);const h={Hh:+i,zh:+e,Ci:+n,Pi:+r};this.Wh(t,h)}else{const t=this.Uh(i);this.Wh(t)}}Fh(){S(this.Sn)||this.Oh(this.Sn)}Uh(t){return this.Mh&&this.Ih?At.Eh(t,this.Ih).href:t}Wh(t,i){this.Bh&&(this.Bh.src!==t?(this.Bh.onload=()=>{this.qh(i)},this.Bh.src="",this.Bh.src=t):this.qh(i))}qh(t){if(!this.Rh||!this.Bh)return;const i=this.Rh.getContext("2d");i&&(null!=t||(t={Hh:0,zh:0,Ci:this.Bh.naturalWidth,Pi:this.Bh.naturalHeight}),this.Rh.width=t.Ci,this.Rh.height=t.Pi,i.drawImage(this.Bh,t.Hh,t.zh,t.Ci,t.Pi,0,0,t.Ci,t.Pi),this.Gh(this.Rh))}Gh(t){this.Xh||(this.tooltip.firstChild?this.tooltip.insertBefore(t,this.tooltip.firstChild):this.tooltip.appendChild(t),this.Xh=t),this.Cn()}Lh(){this.Xh&&(this.tooltip.removeChild(this.Xh),this.Xh=void 0,this.Cn())}$h(){void 0!==this.Mh&&(this.Mh.removeEventListener(["addcue","removecue"],this.Dh),this.Mh=void 0),this.Ih=void 0,this.Lh(),this.Vh=void 0}dispose(){this.$h(),super.dispose()}constructor(t,i){super(t,i),this.Xh=void 0,this.Mh=void 0,this.Ih=void 0,this.Jh=t=>this.Ah(t),this.Qh=t=>this.Nh(t),this.Dh=t=>this.Fh(),this.showThumbnails=()=>{this.Xh&&this.Xh.hidden&&(this.Xh.hidden=!1,this.Cn())},this.hideThumbnails=()=>{!this.Xh||this.Xh.hidden||this.player().scrubbing()||(this.Xh.hidden=!0,this.Cn())},this.on(this.player().textTracks(),"addtrack",this.Jh),this.on(this.player().textTracks(),"removetrack",this.Qh),Et.Zs&&(this.on(t,"seeking",this.showThumbnails),this.on(t,"seeked",this.hideThumbnails))}});var Eu=Ho.getComponent("VolumeLevel");Ho.registerComponent("VolumeLevel",class extends Eu{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-volume-level "+super.buildCSSClass()}});var Du=Ho.getComponent("Component"),Fu=class extends Du{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-menu-container "+super.buildCSSClass()}};Fu.prototype.o=Fi({},Fu.prototype.o,{children:[]}),Ho.registerComponent("controlBarMenuContainer",Fu);var Nu=Ho.getComponent("Player"),$u=class extends Nu{dispose(){const t=this.el(),i=this.contentEl(),s=t.parentNode,e=t.nextSibling;super.dispose(),ai(i),this.Si&&s&&(e?s.insertBefore(t,e):s.appendChild(t)),c.body.removeEventListener("keydown",this.handleKeyPress),c.body.removeEventListener("click",this.handleClick)}constructor(t,i,s){super(t,i,s),this.handleKeyPress=t=>{9===t.which&&this.addClass("theo-probably-keyboard-focus")},this.handleClick=t=>{0===t.x&&0===t.y||this.removeClass("theo-probably-keyboard-focus")},c.body.addEventListener("keydown",this.handleKeyPress),c.body.addEventListener("click",this.handleClick)}};$u.prototype.o=Fi({},Nu.prototype.o,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),Ho.registerComponent("Player",$u);var Bu=Ho.getComponent("Player"),Ru=Bu.prototype.ns;Bu.prototype.ns=function(t){if(!(this.W&&this.W.Vs&&this.W.Vs()))return Ru.call(this,t)};var Ou,Vu=Bu.prototype.createEl;function Lu(t,i,s,e){let n=Fi({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},s);n.controlBar=Fi({progressControl:{keepTooltipsInside:!0}},n.controlBar);let r=n.techOrder||(n.techOrder=[]);-1===r.indexOf("THEOplayer")&&r.unshift("THEOplayer"),(n.theoplayer||(n.theoplayer={})).player=t,s&&Lt(s.language)&&(n.languages=Fi({},n.languages,{[mi]:s.language}),n.language=mi),i.setAttribute("data-vjs-player","");let h=i.getAttribute("style"),o=Ho(t.element,n,e);return o.ready((()=>{!function(t){t.on("timeupdate",Zo),t.on("durationchange",Zo)}(o),function(t,i){if(i){if(i.ads){const s=i=>{const s="adbreakbegin"===i.type,e=i.adBreak.integration===Pi.Yh;sa(t,s,e)};i.ads.addEventListener("adbreakbegin",s),i.ads.addEventListener("adbreakend",s)}if(i.verizonMedia){const s=i=>{const s="adbreakbegin"===i.type;sa(t,s,!1)};i.verizonMedia.ads.adBreaks.addEventListener("addadbreak",(t=>{t.adBreak.addEventListener("adbreakbegin",s),t.adBreak.addEventListener("adbreakend",s)}))}i.addEventListener("sourcechange",(()=>{sa(t,!1,!1)}))}}(o,t),function(t){t.on("mouseleave",ea)}(o)})),i.removeAttribute("data-vjs-player"),h?i.setAttribute("style",h):i.removeAttribute("style"),At.te.Zs&&(vi(i,"theo-mobile"),Uu(i)),function(t){t.on("seeking",(()=>{li(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()}))}(o),o}function Uu(t){a.outerHeight>a.outerWidth?(gi(t,"theo-mobile-landscape"),vi(t,"theo-mobile-portrait")):(gi(t,"theo-mobile-portrait"),vi(t,"theo-mobile-landscape"))}function Hu(t){return class extends t{Kh(){return function(t,i){let s=k.create(t);const e=i.Zh;return Z(s,{get controls(){return e.controls()},set controls(t){e.controls(et(t))},get ui(){return e}})}(this.io,this)}dn(){super.dn(),this.Zh.dispose()}so(t){this.Zh.src(""),super.so(t)}constructor(t,i,s){super(i,s),this.eo=t,this.io=super.Kh(),k.defineProperty(this.io,"constructor",{value:Jt}),this.Zh=Lu(this.io,this.eo,s.ui)}}}function zu(t){return(t=t||{}).position=function(t){switch(t){case"top-left":case"top-right":case"bottom-left":case"bottom-right":return t;default:return}}(t.position),t.visibility=function(t){if(Nt(t)&&!S(t))return Zt(t,0,1)}(t.visibility),t.retainPresentationModeOnSourceChange=et(t.retainPresentationModeOnSourceChange),t}function Wu(t){const i=Ni(t);return i.ui=i.ui||{},void 0!==(null==t?void 0:t.width)&&void 0===i.ui.width&&(i.ui.width=t.width),void 0!==(null==t?void 0:t.height)&&void 0===i.ui.height&&(i.ui.height=t.height),void 0!==(null==t?void 0:t.fluid)&&void 0===i.ui.fluid&&(i.ui.fluid=t.fluid),i.pip=zu(i.pip),i}function qu(){return Ou||(Ou=function(t,i){let s=t;if(qi[i])for(const t of qi[i])s=t(s);return s}(Ou=Hu(qt()),h.t)),Ou}function Gu(t,i){const s=Wu(i),e=c.createElement("div");e.style.position="absolute",t.appendChild(e);const n=new(qu())(t,e,s);let r=n.no;return n.ro(),n.ho(Vt),k.defineProperty(r,"constructor",{value:Gu}),r=Y(r),Xt(n),function(t){for(const i of Xi)i(t)}(n),r}Bu.prototype.createEl=function(){let t=Vu.call(this),i=Ho.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.T=i,t},Gi((function(t){return class extends t{Kh(){const t=this.oo;return Z(super.Kh(),{get visibility(){return t.no}})}dn(){this.oo.dn(),super.dn()}constructor(t,i,s){super(t,i,s),this.oo=new Bt(t)}}}),h.t);var Xu=Ho.getComponent("Button");var Ju="THEOPiPCloseButton";Ho.registerComponent(Ju,class extends Xu{buildCSSClass(){return"theo-close-button theo-pip-close"}handleClick(){this.uo.ao()}constructor(t,i){if(super(t,i),this.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.uo)}(i))throw new m("Invalid Picture-in-picture options.");this.uo=i.uo}});var Qu=class extends B{get co(){return this.lo}get fo(){return this.h.ls()}do(){this.h.vn(G._h,this.vo),this.po||this.h.vn(G.mo,this.yo),this.h.Zh.on("languagechange",this.ee)}bo(){let t=this.wo;if(t)return"theo-pip-"+t}ko(t){let i=this._o;if(i&&!this.fo){this.jo||this.xo(),this.So(),vi(i,"theo-pip");let s=this.bo();s&&vi(i,s),this.lo=!0,this.To=t,this.Co=!1,this.Po(new Li(Hi.PICTURE_IN_PICTURE))}}Ao(t){let i=this._o;if(i){this.Mo(),gi(i,"theo-pip");let s=this.bo();s&&gi(i,s),this.lo=!1,this.Co=t,this.Io=this.To,this.To=!1,this.Po(new Li(Hi.INLINE))}}xo(){if(!this.jo){let t=this.h.Zh;t.addChild(Ju,{uo:this});let i=c.createElement("div");i.className="theo-pip-overlay",this.Eo=c.createElement("div"),this.Eo.className="theo-pip-overlay-text",It(this.Eo,t.localize("Video playing in Picture-in-Picture mode")),i.appendChild(this.Eo),t.el().appendChild(i),this.Do=i,this.jo=!0}}Fo(){this.No&&!this.$o&&this.h.oo&&(this.Bo=this.h.oo.Ro(Ft,this.Oo),this.$o=!0)}Vo(){this.Bo&&this.h.oo&&(this.h.oo.Lo(this.Bo),this.$o=!1)}So(){let t=this.h.Zh.contentEl(),i=t.getBoundingClientRect(),s=c.documentElement.clientWidth,e=c.documentElement.clientHeight;t.style.top=i.top+"px",t.style.bottom=e-i.bottom+"px",t.style.right=s-i.right+"px",t.style.left=i.left+"px",t.style.width=i.width+"px",t.style.height=i.height+"px",t.style.position="fixed"}Mo(){let t=this.h.Zh.contentEl();t.style.top="",t.style.bottom="",t.style.right="",t.style.left="",t.style.width="",t.style.height="",t.style.position=""}Uo(){gi(this._o,"theo-pip"),this.co&&this.wo&&gi(this._o,"theo-pip-"+this.wo),this.Do&&(ai(this.Do),this.Do=void 0)}dn(){this.Uo(),this.Vo(),this.Ho(),this.h.un(G._h,this.vo),this.h.un(G.mo,this.yo),this.h.Zh.off("languagechange",this.ee),this.h=void 0}constructor(t,i,s){super(),this.zo=!1,this.lo=!1,this.Co=!1,this.To=!1,this.jo=!1,this.$o=!1,this.Io=!1,this.vo=()=>{this.zo=!0,this.No&&!this.co&&this.Bo&&this.Wo&&this.Bo.qo<=this.Wo&&this.ko(!1)},this.yo=()=>{this.po||(this.zo=!1,this.Ao(!1))},this.ee=()=>{if(this.Eo){const t=this.h.Zh;It(this.Eo,t.localize("Video playing in Picture-in-Picture mode"))}},this.Oo=t=>{!this.To&&this.No&&(S(t)||(this.Wo&&t<=this.Wo||this.Io?this.lo||this.Co||this.ko(!1):this.lo?this.Ao(!1):this.Co=!1))},this.Wo=i.visibility,this.wo=i.position,this.po=i.retainPresentationModeOnSourceChange,this.No=void 0!==this.Wo,this.h=t,this._o=t.eo,this.ao=s,this.do()}},Yu=class extends Wi{Go(){let t=super.Go();return t===Hi.INLINE&&this.Xo&&this.Xo.co?Hi.PICTURE_IN_PICTURE:t}Jo(t){return t===Hi.PICTURE_IN_PICTURE||super.Jo(t)}Qo(t,i){t===Hi.FULLSCREEN&&this.Xo.Vo(),super.Qo(t,i),t!==Hi.FULLSCREEN&&this.Xo.Fo()}Yo(t,i){t!==i&&(t===Hi.FULLSCREEN&&this.Xo.Ao(!1),t===Hi.INLINE&&i===Hi.PICTURE_IN_PICTURE&&this.Xo.Ao(!0),super.Yo(t,i),t===Hi.PICTURE_IN_PICTURE&&(i===Hi.INLINE?this.Xo.ko(!0):this.Xo.ko(!1)))}dn(){super.dn(),this.Xo.dn(),this.Ko.un(G._h,this.Zo),this.Ko=void 0}constructor(t,i,s){super(i),this.ta=()=>this.Gr(),this.ao=()=>this.ia(Hi.INLINE),this.Zo=()=>{this.Go()!==Hi.FULLSCREEN&&this.Xo.Fo(),this.Ko.un(G._h,this.Zo)},this.Ko=t,this.Xo=new Qu(t,s.pip,this.ao),this.Xo.vn("presentationmodechange",this.ta),this.Ko.vn(G._h,this.Zo),this.Gr()}},Ku=class extends B{get sa(){return tt.ea(this.Zh.el())||this.Zh.supportsFullScreen()}get ls(){return this.Zh.isFullscreen()||this.na}ko(){this.Zh.requestFullscreen()}Ao(){this.Zh.exitFullscreen(),this.ra.Ao()}dn(){this.Ho(),this.Zh.off("fullscreenchange",this.ha),this.ra.un(Oi.oa,this.ha),this.ra.un(Oi.aa,this.Os),this.Zh.isFullWindow&&this.Zh.exitFullscreen()}constructor(t,i){super(),this.Ls=!1,this.na=!1,this.ua=!1,this.ha=()=>{if(this.ua)return;let t=this.Ls,i=this.ls;t!==i&&(this.Ls=i,this.Po(new Q))},this.ca=()=>{this.na=this.ra.ls,this.ha()},this.la=()=>{this.ua||(this.Zh.isFullWindow&&this.Zh.supportsFullScreen()||this.na&&!this.Zh.supportsFullScreen())&&(this.ua=!0,this.Zh.exitFullscreen(),this.Zh.requestFullscreen(),this.ua=!1,this.ha())},this.Zh=t,this.ra=i,this.Zh.on("fullscreenchange",this.ha),this.ra.vn(Oi.oa,this.ca),this.ra.vn(Oi.fa,this.la),this.ra.vn(Oi.aa,this.Os),this.ha()}};Gi((function(t){return class extends t{ls(){return"fullscreen"===this.da.Go()}Kh(){let t=this.da;return Z(super.Kh(),{get presentation(){return t.no},get presentationMode(){return t.no.currentMode},set presentationMode(i){t.no.requestMode(i)}})}dn(){this.da.dn(),this.va.dn(),super.dn()}constructor(t,i,s){super(t,i,s),this.va=new Ku(this.Zh,this.pa),this.da=new Yu(this,this.va,s),this.da.vn("presentationmodechange",this.Os)}}}),h.t);var Zu="theo-cast-",tc=Ho.getComponent("Button"),ic=class extends(la(tc)){get ma(){throw new m("ga")}get ya(){return this.o.ya}get ba(){return this.o.ba}buildCSSClass(){return Zu+"button theo-"+this.ba+"-button theo-controlbar-button "+super.buildCSSClass()}createEl(t,i,s){let e=super.createEl(),n=c.createElement("div");n.className="theo-button-icon-blur";let r=c.createElement("div");return r.className=Zu+"svg-container",r.innerHTML=this.ya,e.appendChild(n),e.appendChild(r),e}handleClick(t){var i;if(super.handleClick(t),this.wa===M.AVAILABLE)null==(i=this.ma)||i.start();else if(this.wa===M.CONNECTED||this.wa===M.CONNECTING){var s;null==(s=this.ma)||s.stop()}}ka(t){gi(this._o,"theo-"+this.ba+"-"+this.wa),this.wa=t,vi(this._o,"theo-"+this.ba+"-"+this.wa),this.ee()}ee(){this._a(this.wa),this.Be.$e=this.controlText()}_a(t){t===M.CONNECTED?this.controlText("Stop Casting"):t===M.AVAILABLE?this.controlText("Start Casting"):t===M.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")}constructor(t,i){var s;super(t,i),this._o=t.el(),this.wa=M.UNAVAILABLE,this.controlText("Unavailable"),this.Be=new Sa(this,this.controlText()),null==(s=this.ma)||s.addEventListener("statechange",(t=>{const i=t;this.ka(i.state)})),At.te.Ke&&new fa(this.el()),this.ka(this.ma?this.ma.state:M.UNAVAILABLE),this.on(t,"languagechange",this.ee)}},sc=0;function ec(){const t='\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" fill="currentColor">\n <defs>\n <clipPath id="theo-chromecast-rings-mask-'+sc+'">\n <path d="M0-36h44V0H0z"/>\n </clipPath>\n </defs>\n\t <path class="theo-chromecast-outer" d="M2 10a4 4 0 0 1 4-4h36a4 4 0 0 1 4 4v28a4 4 0 0 1-4 4H28v-4h14V10H6v6H2z"/>\n\t <path class="theo-chromecast-inner" d="M10 14h28v20H26.74A26 26 0 0 0 10 17.26z"/>\n <g class="theo-chromecast-rings" fill="none" stroke="currentColor" stroke-width="4" transform="translate(2 42)" clip-path="url(#theo-chromecast-rings-mask-'+sc+')">\n <circle stroke="none" cx="0" cy="0" r="30" />\n <circle class="theo-chromecast-ring theo-chromecast-ring1" stroke-width="6" cx="0" cy="0" r="3" />\n <circle class="theo-chromecast-ring theo-chromecast-ring2" cx="0" cy="0" r="12" />\n <circle class="theo-chromecast-ring theo-chromecast-ring3" cx="0" cy="0" r="20"/>\n <path class="theo-chromecast-ring theo-chromecast-ring4" stroke-linecap="round" d="M0-20A20 20 0 0 1 20 0" />\n </g>\n </svg>';return sc++,t}Ho.registerComponent("chromecastButton",class extends ic{get ma(){var t;return null==(t=this.Ts.cast)?void 0:t.chromecast}constructor(t,i){super(t,Fi({},i,{ba:"chromecast",ya:ec()}))}});var nc="theo-chromecast-",rc=Ho.getComponent("Component"),hc=class t extends(la(rc)){buildCSSClass(){return nc+"overlay "+super.buildCSSClass()}createEl(){let i=super.createEl();vi(i,nc+"overlay");let s=Ho.createEl("div",{className:nc+"status-icon",innerHTML:t.ICON_SVG}),e=Ho.createEl("div",{className:nc+"status-info"});It(e,"Playing on");let n=Ho.createEl("div",{className:nc+"status-title"}),r=Ho.createEl("div",{className:nc+"status"});return this.cr=n,r.appendChild(s),r.appendChild(e),r.appendChild(n),i.appendChild(r),i}dispose(){var t;null==(t=this.ja)||t.removeEventListener("statechange",this.update),this.ja=void 0,this.Ts.removeEventListener("play",this.update),super.dispose()}constructor(t,i){var s,e;super(t,i),this.update=()=>{this.ja?(this.cr&&It(this.cr,this.ja.receiverName||""),this.ja.state===M.CONNECTED?this.show():this.hide()):this.hide()},this.ja=null==(s=this.Ts.cast)?void 0:s.chromecast,null==(e=this.ja)||e.addEventListener("statechange",this.update),this.Ts.addEventListener("play",this.update),this.update()}};hc.ICON_SVG='\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" fill="currentColor">\n <path d="M7 24v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm18-7H11v1.63c3.96 1.28 7.09 4.41 8.37 8.37H25V13zM7 16v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11zm20-7H9c-1.1 0-2 .9-2 2v3h2v-3h18v14h-7v2h7c1.1 0 2-.9 2-2V11c0-1.1-.9-2-2-2z"/>\n</svg>',Ho.registerComponent("chromecastOverlay",hc);Ho.registerComponent("airplayButton",class extends ic{dispose(){var t,i;null==(t=this.Ts.ads)||t.removeEventListener("adbreakbegin",this.xa),null==(i=this.Ts.ads)||i.removeEventListener("adbreakend",this.Sa),this.Ts.removeEventListener("currentsourcechange",this.Sa),super.dispose()}get ma(){var t;return null==(t=this.Ts.cast)?void 0:t.airplay}constructor(t,i){var s,e;super(t,Fi({},i,{ba:"airplay",ya:'\n<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24">\n <path class="theo-cast-inner" d="M5 7h14v8H5z"/>\n <path d="M6 22h12l-6-6zM21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V5h18v12h-4v2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/>\n</svg>'})),this.Sa=()=>{this.enable()},this.xa=()=>{this.disable()},null==(s=this.Ts.ads)||s.addEventListener("adbreakbegin",this.xa),null==(e=this.Ts.ads)||e.addEventListener("adbreakend",this.Sa),this.Ts.addEventListener("currentsourcechange",this.Sa)}});var oc={Default:"","Monospaced Serif":mt.Ta,"Proportional Serif":mt.Ca,"Monospaced Sans-Serif":mt.Pa,"Proportional Sans-Serif":mt.Aa},ac={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},uc=[50,75,100,150,200];function cc(t){return{label:t+"%",value:t}}function lc(t){return k.keys(t).map((i=>({label:i,value:t[i]})))}uc.map((function(t){return{label:t+"%",value:t/100+"em"}}));var fc=uc.map((function(t){return{label:t+"%",value:t+"%"}})),dc=[25,50,75,100].map(cc),vc=[0,25,50,75,100].map(cc),pc=lc(ac),mc=lc(oc),gc=lc({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),yc=100,bc="#000000",wc="#FFFFFF",kc="#000000",_c=class extends hu{Ma(){let t=this.Ir.localize(this.Ia);It(this.Ea.subMenu.menuHeader.el(),t),this.Mr=c.createElement("span"),this.Mr.className="theo-settings-control-menu-item-title",It(this.Mr,t);let i=c.createElement("span");return i.className="theo-primary-color theo-settings-control-menu-item-value",vi(this.Ea.el(),"theo-subtitle-options-menu-item"),this.Ea.el().appendChild(this.Mr),this.Ea.el().appendChild(i),i}Da(t){const i=this.kr(t);i&&this.Fa(i)}Na(){return this.pr}Sr(t){this.$a(t._r)}Fa(t){for(let t of this.br.menuItems)t.selected(!1);t?(t.selected(!0),this.Ba(t._r.label)):this.Ba("Custom")}Ba(t){this.Ra=t,It(this.Oa,this.Ir.localize(t)),this.Ea.parentMenu.ae()}jr(t){let i=super.jr(t);return vi(i.el(),"theo-subtitle-options-menu-item"),this.Pr(i),i}Pr(t){const i=this.Ir.localize(t._r.label);It(t.el(),i);const s=this.Ir.localize("Set "+this.Ia+" to ")+i;t.el().setAttribute("aria-label",s)}Le(){this.Ir.off("languagechange",this.ee),super.Le()}constructor(t,i,s,e){super(t.subMenu),this.Ea=t,this.Ir=e,this.Ra="",this.ee=()=>{let t=this.Ir.localize(this.Ia);It(this.Ea.subMenu.menuHeader.el(),t),It(this.Mr,t),this.Ba(this.Ra);for(const t of this.wr)this.Pr(t)},this.Ia=i,this.$a=s.ta,this.Oa=this.Ma(),this.pr=s.Va,this.Ir.on("languagechange",this.ee)}},jc=class t{static La(t,i,s,e){if(void 0===t&&void 0===i)return;return Tt(void 0===t?s:t,void 0===i?e:i)}constructor(i){this.Ua=i,this.Ha=t=>{this.Ua.fontFamily=t.value},this.za=t=>{this.Ua.fontSize=t.value},this.Wa=i=>{this.qa=i.value,this.Ua.fontColor=t.La(this.Ga,this.qa,wc,yc)},this.Xa=i=>{this.Ga=i.value,this.Ua.fontColor=t.La(this.Ga,this.qa,wc,yc)},this.Ja=i=>{this.Qa=i.value,this.Ua.backgroundColor=t.La(this.Qa,this.Ya,bc,yc)},this.Ka=i=>{this.Ya=i.value,this.Ua.backgroundColor=t.La(this.Qa,this.Ya,bc,yc)},this.Za=i=>{this.tu=i.value,this.Ua.windowColor=t.La(this.tu,this.iu,kc,yc)},this.su=i=>{this.iu=i.value,this.Ua.windowColor=t.La(this.tu,this.iu,kc,yc)},this.eu=t=>{this.Ua.edgeStyle=t.value}}},xc=class{nu(t,i){const s=this.ru(t,i.Na());s&&i.Da(s)}ru(t,i){return Ui(i,(i=>i.value===t))}hu(t,i,s){let e,n;if(void 0===t)e=this.ru(void 0,i.Na()),n=this.ru(void 0,s.Na());else if(t){let r=function(t){let i=xt(t);i||(i=xt(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=yt(wt(t),1));if(!i){let s=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=yt(wt(ac[s]),1)}return i}(t);if(r){let t=_t(r),h=100*r.ou;e=this.ru(t,i.Na()),n=this.ru(h,s.Na())}}e&&i.Da(e),n&&s.Da(n)}constructor(t,i){this.Ua=t,this.au=i,this.uu=()=>{let t=this.Ua.fontFamily;this.nu(t,this.au["Font family"]);let i=this.Ua.fontColor;this.hu(i,this.au["Font color"],this.au["Font opacity"]);let s=this.Ua.fontSize;this.nu(s,this.au["Font size"]);let e=this.Ua.backgroundColor;this.hu(e,this.au["Background color"],this.au["Background opacity"]);let n=this.Ua.windowColor;this.hu(n,this.au["Window color"],this.au["Window opacity"]);let r=this.Ua.edgeStyle;this.nu(r,this.au["Character edge style"])},this.Ua.addEventListener("change",this.uu),this.uu()}};var Sc,Tc=class extends hu{cu(){return{"Font family":{Va:Cc(mc),ta:this.lu.Ha},"Font color":{Va:Cc(pc),ta:this.lu.Xa},"Font opacity":{Va:Cc(dc),ta:this.lu.Wa},"Font size":{Va:Cc(fc),ta:this.lu.za},"Background color":{Va:Cc(pc),ta:this.lu.Ja},"Background opacity":{Va:Cc(vc),ta:this.lu.Ka},"Window color":{Va:Cc(pc),ta:this.lu.Za},"Window opacity":{Va:Cc(vc),ta:this.lu.su},"Character edge style":{Va:Cc(gc),ta:this.lu.eu}}}fu(){It(this.br.menuHeader.el(),this.Ir.localize("Subtitle Options")),this.Mr=c.createElement("span"),this.Mr.className="theo-settings-control-menu-item-title",It(this.Mr,this.Ir.localize("Subtitle")),this.du=c.createElement("span"),this.du.className="theo-primary-color theo-settings-control-menu-item-value",It(this.du,this.Ir.localize("Options")),this.Or.el().appendChild(this.Mr),this.Or.el().appendChild(this.du),this.Or.el().setAttribute("aria-label",this.Ir.localize("Open the subtitle options menu")),this.vu.addEventListener(["addtrack","removetrack"],this.pu),this.pu()}jr(t){let i=this.br.addSubMenuItem();return i._r=t,this.au[t]=new _c(i,t,this.mu[t],this.Ir),i}Pr(t){}Sr(t){}Le(){this.Ir.off("languagechange",this.ee),super.Le()}constructor(t,i,s,e){super(t.subMenu),this.Or=t,this.vu=i,this.Ir=e,this.au={},this.pu=()=>{this.vu.some((t=>bt(t.kind)))?this.Or.show():this.Or.hide()},this.ee=()=>{It(this.br.menuHeader.el(),this.Ir.localize("Subtitle Options")),It(this.Mr,this.Ir.localize("Subtitle")),It(this.du,this.Ir.localize("Options")),this.Or.el().setAttribute("aria-label",this.Ir.localize("Open the subtitle options menu"))},this.lu=new jc(s),this.mu=this.cu(),this.pr=k.keys(this.mu),this.fu(),this.gu=new xc(s,this.au),this.Ir.on("languagechange",this.ee)}};function Cc(t){let i=[{label:"Default",value:void 0}];for(let s of t)"Default"!==s.label&&i.push(s);return i}Gi((function(t){return class extends t{dn(){this.yu.removeMenuItem(this.bu),super.dn()}constructor(t,i,s){super(t,i,s),this.yu=this.Zh.controlBar.getChild("SettingsButton").menu,this.bu=this.yu.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),new Tc(this.bu,this.rt.no,this.wu.no,this.Zh)}}}),h.t),function(t){t.GALLERY="gallery",t.OVERLAY="overlay",t.SPOTLIGHT="spotlight"}(Sc||(Sc={}));var Pc=.02,Ac=class{ku(t){const i=t-this.ju._u-20,s=t-this.ju._u+20;if(0===this.ju.wo)return;const e=this.ju.h.currentProgramDateTime.valueOf();e>s?this.xu(this.Su):e<i?this.xu(this.Tu):this.xu(this.Cu)}Pu(t){const i=t-this.ju._u/1e3-Pc,s=t-this.ju._u/1e3+Pc;if(0===this.ju.wo)return;const e=this.ju.h.currentTime;e>s?this.xu(this.Su):e<i?this.xu(this.Tu):this.xu(this.Cu)}Au(){this.Cu=this.Ko.Mu,this.Su=this.Ko.Mu-.05,this.Tu=this.Ko.Mu+.05}xu(t){const i=this.ju.h;if(i.playbackRate!==t&&0!==i.playbackRate){t>=.2&&t<=2.05?i.playbackRate=t:this.Ko.Iu(this.ju)}}Eu(){this.Ko.un(G.Du,this.Fu),this.Ko.un(G.Nu,this.$u)}constructor(t,i){this.Cu=1,this.Su=1.05,this.Tu=.95,this.Fu=()=>{this.Au()},this.$u=()=>{if(!this.Ko.Bu)return;const t=this.Ko.Bu._u,i=this.Ko.Ru,s=this.Ko.Ou;null!==s?this.ku(s.valueOf()+t):this.Pu(i+t/1e3)},this.ju=t,this.Ko=i,this.Ko.vn(G.Du,this.Fu),this.Ko.vn(G.Nu,this.$u)}},Mc=class{get h(){return this.Ko}get no(){var t;return null!=(t=this.Vu)?t:this.Vu=function(t){return{get label(){return t.mh},get position(){return t.wo},set position(i){t.wo=i},get muted(){return t.Lu},set muted(i){t.Lu=i},get canResize(){return t.Uu},get x(){return t.Hh},set x(i){t.Hh=i},get y(){return t.zh},set y(i){t.zh=i},get width(){return t.Ci},set width(i){t.Ci=i},get height(){return t.Pi},set height(i){t.Pi=i},get enabled(){return t.Ot},set enabled(i){t.Ot=i},get offset(){return t._u},set offset(i){t._u=i},remove(){t.Hu()}}}(this)}get mh(){return this.zu}get wo(){return this.qu.Wu.indexOf(this)}set wo(t){this.qu.Gu(this,t)}get Lu(){return this.Ko.muted}set Lu(t){this.Ot&&(this.qu.Xu=this,this.Ju(t))}get Uu(){return 0!==this.wo&&this.qu.Qu===Sc.OVERLAY}get Hh(){return this.Yu}set Hh(t){this.Uu&&(this.Ku||(this.Ku=!0),this.Yu=t>1-this.Ci?1-this.Ci:_.max(t,0),this.h.element.style.setProperty("left",100*this.Yu+"%"))}get zh(){return this.Zu}set zh(t){this.Uu&&(this.Ku||(this.Ku=!0),this.Zu=t>1-this.Pi?1-this.Pi:_.max(t,0),this.h.element.style.setProperty("top",100*this.Zu+"%"))}get Ci(){return this.tc}set Ci(t){this.Uu&&this.ic(t)}get Pi(){return this.sc}set Pi(t){this.Uu&&this.ic(t)}get Ot(){return this.qe}set Ot(t){t!==this.qe&&0!==this.wo&&(t?(N(this.qu.Iu(this)),this.qu.ec(this),this.h.element.style.setProperty("display","block")):(this.h.pause(),this.h.element.style.setProperty("display","none")),this.qe=t,this.qu.nc(this))}get rc(){return this.Ku}set rc(t){this.Ku=t}get hc(){return this.oc}set hc(t){this.oc=t}get _u(){return this.ac}set _u(t){this.ac=t,this.uc(this.qu.Ru,this.qu.Ou)}cc(t,i,s,e,n){!this.Ku&&n&&(this.Ku=!0),this.Yu=t,this.Zu=i,this.tc=s,this.sc=e}Ju(t){this.Ko.muted=t}Hu(){0!==this.wo&&this.qu.lc(this)}fc(){this.h.element.style.setProperty("top",100*this.Zu+"%"),this.h.element.style.setProperty("left",100*this.Yu+"%"),this.h.element.style.setProperty("width",100*this.tc+"%")}ic(t){const i=this.Yu+this.tc,s=_.min(t,i),e=.9-this.Zu,n=_.min(t,e),r=_.max(_.min(s,n),.1),h=this.tc-r;this.tc=r,this.sc=r,this.Hh+=h,this.h.element.style.setProperty("width",100*r+"%")}uc(t,i){if(null!==i){const t=i.valueOf()-this._u;this.Ko.currentProgramDateTime=new Date(t)}else this.Ko.currentTime=t-this._u/1e3}dc(t){const i=this.h.element.getElementsByClassName(Lc)[0],s=t?Hc:Uc;gi(i,t?Uc:Hc),vi(i,s)}Eu(){this.vc.Eu(),this.Ko.element.remove(),this.Ko.destroy()}constructor(t,i,s,e){this.qe=!0,this.Ku=!1,this.oc=0,this.zu=t,this.Ko=i,this.qu=s,this.vc=new Ac(this,s),this.ac=null!=e?e:0,this.tc=.2,this.sc=.2,this.Yu=.76,this.Zu=0}};var Ic,Ec=class{get multiViewPlayer(){return this.qu}get abr(){}get audioTracks(){return this.mc}get autoplay(){return this.qu.autoplay}set autoplay(t){this.qu.autoplay=t}get buffered(){return this.qu.buffered}get canvas(){}get clip(){return this.gc.no}get currentProgramDateTime(){return null}get currentTime(){return this.qu.currentTime}set currentTime(t){this.qu.currentTime=t}get duration(){return this.qu.duration}get element(){return this.zs}get ended(){return this.qu.ended}get error(){}get errorObject(){return this.qu.errorObject}get latency(){}get loop(){return!1}get metrics(){}get muted(){return this.qu.muted}set muted(t){this.qu.muted=t}get network(){}get paused(){return this.qu.paused}get playbackRate(){return this.qu.playbackRate}set playbackRate(t){this.qu.playbackRate=t}get played(){return this.qu.played}get poster(){return""}get preload(){return""}get presentation(){}get readyState(){return this.qu.readyState}get seekable(){return this.qu.seekable}get seeking(){return this.qu.seeking}get source(){}get src(){return"dummySource"}get textTrackStyle(){return this.yc}get textTracks(){return this.bc}get uid(){return 0}get videoHeight(){return 0}get videoTracks(){return this.mc}get videoWidth(){return 0}get volume(){return this.qu.volume}set volume(t){this.qu.volume=t}get views(){return this.qu.views}get layout(){return this.qu.layout}set layout(t){this.qu.layout=t}play(){this.qu.play()}pause(){this.qu.pause()}stop(){this.qu.stop()}destroy(){this.qu.destroy()}prepareWithUserAction(){this.qu.prepareWithUserAction()}addEventListener(t,i){this.wc.vn(t,i)}removeEventListener(t,i){this.wc.un(t,i)}setSource(t){}constructor(t,i){this.wc=new B,this.qu=t,this.zs=i,this.gc=new st,this.mc=(new Yt).no,this.bc=(new ti).no,this.yc=(new at).no,this.qu.addEventListener(["play","pause","seeking","seeked","timeupdate","ended","playing","waiting","sourcechange","readystatechange","loadedmetadata","loadeddata","canplay","canplaythrough","loadstart","progress","durationchange","volumechange","ratechange","error"],this.wc.Os)}},Dc=class extends O{constructor(t){super(Ic.kc),this.view=t}},Fc=class extends O{constructor(t,i){super(Ic.VIEW_POSITION_CHANGE),this.oldPosition=t,this.newPosition=i}},Nc=class extends O{constructor(t){super(Ic._c),this.view=t}},$c=class extends O{constructor(t){super(Ic.VIEW_CHANGE),this.view=t}},Bc=class extends O{constructor(t){super(Ic.jc),this.layout=t}},Rc=class extends B{get Ru(){return this.Ko.Ru}get xc(){return this.Ko.xc}get ft(){return this.Ko.Sc}get Tc(){return this.Ko.Tc}get Cc(){return this.Ko.Cc}get Pc(){return this.Ko.Pc}get Ac(){return!1}Eu(){this.Ho()}constructor(t){super(),this.Mc=t=>{this.Os(new Ht(t.source))},this.Ic=t=>{this.Os(new fi(t.currentTime))},this.Ec=t=>{this.Os(new ui(t.currentTime))},this.Dc=t=>{this.Os(new xi(t.currentTime))},this.Fc=t=>{this.Os(new Ci(t.currentTime))},this.Nc=t=>{this.Os(new J(t.currentTime,t.currentProgramDateTime))},this.$c=t=>{this.Os(new ki(t.currentTime))},this.Bc=t=>{this.Os(new Ot(t.currentTime))},this.Rc=t=>{this.Os(new Mt(t.currentTime))},this.Oc=t=>{this.Os(new jt(t.currentTime,t.readyState))},this.Vc=t=>{this.Os(new Ct(t.currentTime,this.Cc))},this.Lc=t=>{this.Os(new C(t.currentTime,this.Cc))},this.Uc=t=>{this.Os(new Dt(t.currentTime,this.Cc))},this.Hc=t=>{this.Os(new $t(t.currentTime,this.Cc))},this.zc=()=>{this.Os(new ft)},this.Wc=t=>{this.Os(new ct(t.currentTime))},this.qc=t=>{this.Os(new pi(t.duration))},this.Gc=t=>{this.Os(new Mi(this.Ru,t.volume))},this.Xc=t=>{this.Os(new yi(this.Ru,t.playbackRate))},this.Jc=t=>{this.Os(new _i(t.errorObject))},this.Qc=()=>{this.Os(new Q)},this.Ko=t,this.Ko.vn("sourcechange",this.Mc),this.Ko.vn("play",this.Ic),this.Ko.vn("pause",this.Ec),this.Ko.vn("seeking",this.Dc),this.Ko.vn("seeked",this.Fc),this.Ko.vn("timeupdate",this.Nc),this.Ko.vn("ended",this.$c),this.Ko.vn("playing",this.Bc),this.Ko.vn("waiting",this.Rc),this.Ko.vn("readystatechange",this.Oc),this.Ko.vn("loadedmetadata",this.Vc),this.Ko.vn("loadeddata",this.Lc),this.Ko.vn("canplay",this.Uc),this.Ko.vn("canplaythrough",this.Hc),this.Ko.vn("loadstart",this.zc),this.Ko.vn("progress",this.Wc),this.Ko.vn("durationchange",this.qc),this.Ko.vn("volumechange",this.Gc),this.Ko.vn("ratechange",this.Xc),this.Ko.vn("error",this.Jc),this.Ko.vn("fullscreenchange",this.Qc)}},Oc=class{async Yc(){const t=this.Ko;if(!t.Kc||!t.Tc)return;const i=this.Zc.mutedAutoplay;switch(await this.il.tl(t.Lu)){case"all":t.Lu||t.sl(),t.nl();break;case"muted":(t.Lu||i===Di.ALL)&&(t.Lu=!0,t.nl())}}dn(){this.il.dn(),this.cn.dn()}constructor(t,i,s){this.Ko=t,this.Zc=s,this.yc=new at,this.cn=new X(i);const e=new si(this.cn,this.yc,1,[rt.rl]);this.il=new ri(e)}},Vc=[kt.hl,kt.ol,kt.al,kt.cl],Lc="theo-switch-audio-button",Uc="vjs-icon-volume-mute",Hc="vjs-icon-volume-high",zc="theo-main-view",Wc="theo-layout-";!function(t){t.kc="addview",t._c="removeview",t.VIEW_CHANGE="viewchange",t.VIEW_POSITION_CHANGE="viewpositionchange",t.jc="layoutchange"}(Ic||(Ic={}));var qc=class extends B{get no(){var t;return null!=(t=this.Vu)?t:this.Vu=function(t){return{load:(i,s,e,n)=>t.Dn(i,s,e,n),get views(){return t.Wu.map((t=>t.no))},get mainVideoView(){var i;return null==(i=t.Bu)?void 0:i.no},get mainAudioView(){var i;return null==(i=t.Xu)?void 0:i.no},get layout(){return t.Qu},set layout(i){t.Qu=i},get buffered(){return t.ll},get currentTime(){return t.Ru},set currentTime(i){t.Ru=i},get autoplay(){return t.Kc},set autoplay(i){t.Kc=i},get duration(){return t.lt},get ended(){return t.xc},get errorObject(){return t.Sc},get muted(){return t.Lu},set muted(i){t.Lu=i},get paused(){return t.Tc},get playbackRate(){return t.Mu},set playbackRate(i){t.Mu=i},get played(){return t.fl},get readyState(){return t.Cc},get seekable(){return t.dl},get seeking(){return t.Pc},get volume(){return t.vl},set volume(i){t.vl=i},play(){t.nl()},pause(){t.pl()},stop(){t.ml()},destroy(){t.Eu(),t=null},requestFullscreen(i){t.gl(i)},exitFullscreen(){t.yl()},prepareWithUserAction(){t.sl()},addEventListener(i,s){t.vn(i,s)},removeEventListener(i,s){t.un(i,s)}}}(this)}get Zh(){return this.bl}get Wu(){return this.wl}get Bu(){return this.kl}get Xu(){var t;return null!=(t=this._l)?t:this.kl}set Xu(t){if(this._l===t)return;const i=this.Xu,s=null!=t?t:this.Bu;i.h.removeEventListener(G.jl,this.xl),i.dc(!1),i.Lu||(i.Ju(!0),s.Ju(!1)),s.h.addEventListener(G.jl,this.xl),s.dc(!0),this._l=t}get Qu(){return this.Sl}set Qu(t){if(t!==this.Sl){if(this.Qu===Sc.OVERLAY)for(const t of this.Wu)t.h.element.style.setProperty("left","auto"),t.h.element.style.setProperty("top","auto"),t.h.element.style.removeProperty("z-index");gi(this.zs,Wc+this.Sl),this.Sl=t,vi(this.zs,Wc+this.Sl),this.fc(),this.Po(new Bc(t))}}get ll(){if(0===this.Wu.length)return Bi.Tl().ks();return this.Cl().reduce(((t,i)=>t.kn(Bi.bn(i.h.buffered))),new Bi([0,1/0])).ks()}get Ru(){return this.kl&&this.Pl?this.kl.h.currentTime+this.kl._u/1e3:0}set Ru(t){this.Al();const i=this.Cl();let s=null;if(null!==this.Ou){s=this.Ou;const i=t-this.Ru;s.setSeconds(s.getSeconds()+i)}for(const e of i)e.uc(t,s)}get Ou(){if(!this.kl)return null;return this.Wu.every((t=>null!==t.h.currentProgramDateTime))?new Date(this.kl.h.currentProgramDateTime.valueOf()+this.kl._u):null}get Kc(){return this.Ml}set Kc(t){this.Ml=t,this.Il.Yc()}get lt(){if(0===this.Wu.length)return NaN;let t=1/0;for(const i of this.Cl())t=_.min(i.h.duration,t);return t}get xc(){return this.Wu.some((t=>t.h.ended))}get ft(){return this.Sc}get Sc(){if(this.El)return this.El;for(const t of this.Wu){const i=t.h.errorObject;if(void 0!==i)return i}}get Lu(){var t,i;return null!=(i=null==(t=this.Xu)?void 0:t.Lu)&&i}set Lu(t){this.Xu&&this.Xu.Ju(t),this.xl()}get Tc(){if(!this.Wu.length)return!0;return this.Cl().some((t=>t.h.paused))}get Mu(){var t,i,s;return null!=(s=null!=(i=this.Dl)?i:null==(t=this.kl)?void 0:t.h.playbackRate)?s:1}set Mu(t){if(void 0!==this.Dl)this.Dl=t;else for(const i of this.Wu)i.h.playbackRate=t;this.Fl()}get fl(){return this.Wu.reduce(((t,i)=>t.Nl(Bi.bn(i.h.played))),Bi.Tl()).ks()}get Cc(){if(0===this.Wu.length)return St.$l;let t=St.Bl;for(const i of this.Cl())i.h.readyState<t&&(t=i.h.readyState);return t}get dl(){if(0===this.Wu.length)return Bi.Tl().ks();return this.Cl().reduce(((t,i)=>t.kn(Bi.bn(i.h.seekable))),new Bi([0,1/0])).ks()}get Pc(){return this.Wu.some((t=>t.h.seeking))}get vl(){var t,i;return null!=(i=null==(t=this.Xu)?void 0:t.h.volume)?i:1}set vl(t){for(const i of this.Wu)i.h.volume=t;this.xl()}Dn(t,i,s,e){if(this.Rl)throw this.El;const n=this.Wu.filter((i=>i.mh===t))[0];return n?n.no:this.Ol(t,i,s,e)}nl(){if(!this.kl||!this.Tc)return;this.Al();const t=this.Cl();for(const i of t)i.h.play()}pl(){const t=this.Cl();for(const i of t)i.h.pause()}ml(){for(let t=this.Wu.length-1;t>=0;t--)this.lc(this.Wu[t]);this.kl=void 0,this._l=void 0,this.El=void 0,this.Vl&&(this.Vl.Ll(),this.Vl=void 0),this.Ul=!0,this.Hl=!1,this.zl=!1,this.Wl=-1,this.ql=St.$l,this.Gl=!1,this.Dl=void 0,this.Xl=!1,this.Jl=-1,this.Ql=!1,this.Yl=-1,this.Pl=!1,this.Kl.Jn(),this.Po(new Ht(void 0))}Eu(){for(let t=this.Wu.length-1;t>=0;t--)this.lc(this.Wu[t]);this.Ho(),this.Kl.dn(),this.Zl.Eu(),this.tf.Eu(),this.Il.dn(),this.Zh.dispose()}gl(t){this.Po(new Q),this.zs.requestFullscreen(t).catch(Gt)}yl(){this.Po(new Q),c.exitFullscreen().catch(Gt)}sl(){for(const t of this.Wu)t.h.prepareWithUserAction()}Ol(t,i,s,e){const n=c.createElement("div");vi(n,"theo-view"),this.zs.appendChild(n);const r=new(qt())(n,this.Zc).no;r.source=i;const h=new Mc(t,r,this,e);if(s){const t=c.createElement("div");t.className="theo-view-description";const i=c.createElement("span");i.textContent=s,t.appendChild(i),n.appendChild(t),h.h.addEventListener("dimensionchange",(()=>{this.if(t)}))}return this.sf(h),this.Wu.push(h),1===this.Wu.length?(this.kl=h,this.ef(this.kl),vi(this.kl.h.element,zc)):(this.nf(r),0!==this.Ru&&N(this.Iu(h,!0))),this.fc(),this.Po(new Dc(h.no)),h.no}Cl(){return this.Wu.filter((t=>t.Ot))}rf(){return this.Wu.filter((t=>t.Ot&&t!==this.kl))}nf(t){t.volume=this.kl.h.volume,t.muted=!0,t.playbackRate=this.kl.h.playbackRate}sf(t){t.hc=this.Wu.length;const i=t.h.element;i.addEventListener("dblclick",(()=>{this.hf(t)})),i.addEventListener("touchend",(i=>{this.af>=i.timeStamp?(i.preventDefault(),this.hf(t),this.af=0):this.af=i.timeStamp+500}));const s=c.createElement("div"),e=0===this.Wu.length?Hc:Uc;s.className="theo-primary-color "+Lc+" "+e,s.addEventListener("click",(()=>{this.Xu=t})),s.addEventListener("touchend",(()=>{this.Xu=t})),i.appendChild(s);const n=c.createElement("div");n.className="theo-primary-color theo-disable-button vjs-icon-close",n.addEventListener("click",(()=>{t.Ot=!1})),n.addEventListener("touchend",(()=>{t.Ot=!1})),i.appendChild(n),this.uf(t,i),this.cf(t),this.lf(t)}uf(t,i){const s=c.createElement("div");let e=0;const n=i=>{if(this.ff=!0,this.ec(t),i.preventDefault(),"touchstart"===i.type){e=i.changedTouches[0].clientX,c.addEventListener("touchmove",r),c.addEventListener("touchend",h),c.addEventListener("touchcancel",h)}else{e=i.x,c.addEventListener("mousemove",r),c.addEventListener("mouseup",h)}},r=i=>{let s;if("touchmove"===i.type){s=i.changedTouches[0].clientX}else{s=i.x}const n=e-s,r=t.h.element.parentElement.clientWidth,h=(t.h.element.clientWidth+n)/r;t.Ci=h,t.Pi=h,e=s},h=t=>{this.ff=!1,"mouseup"===t.type?(c.removeEventListener("mousemove",r),c.removeEventListener("mouseup",h)):(c.removeEventListener("touchmove",r),c.removeEventListener("touchend",h),c.removeEventListener("touchcancel",h))};s.addEventListener("mousedown",n),s.addEventListener("touchstart",n),s.className="theo-resize-button theo-primary-color vjs-icon-resize-handle-sw",i.appendChild(s)}if(t){const i=t.parentElement.clientWidth/100,s=_.min(40,5.23*i);t.style.fontSize=s+"px"}cf(t){const i=t.h.element,s=i.parentElement;let e={x:0,y:0};const n=i=>{if(!this.ff&&t.Uu)if(this.ec(t),i.preventDefault(),"touchstart"===i.type){const t=i;e.x=t.changedTouches[0].clientX,e.y=t.changedTouches[0].clientY,c.addEventListener("touchmove",r),c.addEventListener("touchend",h),c.addEventListener("touchcancel",h)}else{const t=i;e.x=t.x,e.y=t.y,c.addEventListener("mousemove",r),c.addEventListener("mouseup",h)}},r=n=>{let r;if("touchmove"===n.type){const t=n;r={x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}}else{const t=n;r={x:t.x,y:t.y}}const h=r.x-e.x,o=r.y-e.y,a=i.offsetLeft,u=s.clientWidth;t.Hh=(a+h)/u;const c=s.offsetHeight,l=i.offsetTop;t.zh=(l+o)/c,e=r},h=t=>{"mouseup"===t.type?(c.removeEventListener("mouseup",h),c.removeEventListener("mousemove",r)):(c.removeEventListener("touchmove",r),c.removeEventListener("touchend",h),c.removeEventListener("touchcancel",h))};i.addEventListener("mousedown",n),i.addEventListener("touchstart",n)}ec(t){for(const i of this.Wu)i.hc>t.hc&&(i.hc-=1,i.h.element.style.setProperty("z-index",""+i.hc));t.hc=this.Wu.length,t.h.element.style.setProperty("z-index",""+t.hc)}Al(){if(void 0!==this.Dl)return;this.Dl=this.Mu;const t=this.Cl();for(const i of t)i.h.playbackRate=0}df(){if(void 0===this.Dl)return;if(this.Pc||this.Cc<St.vf){if(this.kl&&!this.Pl){this.Pl=!0;for(const t of this.rf())this.kl._u!==t._u&&t.uc(this.Ru,this.Ou)}return}const t=this.Cl();for(const i of t)i.h.playbackRate=this.Dl;this.Dl=void 0,this.Pl=!0}nc(t){t.Ot||t!==this._l||(this.Xu=void 0),this.Po(new $c(t.no)),this.fc()}async Iu(t,i){void 0===i&&(i=!1),this.Al();const s=t.h;i&&(this.Vl=new L,s.addEventListener(G.mo,this.As),await this.Vl.pf,s.removeEventListener(G.mo,this.As)),s.readyState===St.$l&&(this.Xl=!0,s.play()),this.Tc?s.pause():s.play(),t.uc(this.Ru,this.Ou)}fc(){const t=this.Cl();if(!t.length)return;let i=0;switch(this.Qu){case Sc.SPOTLIGHT:{t.length>1?this.zs.style.gridTemplateColumns="80% 20%":this.zs.style.gridTemplateColumns="100%";let s=1/0;for(const e of t)if(i>=s+1)e.Ot=!1;else if(e.h.element.style.setProperty("width","100%"),i++,2===i){const i=e.h.element.clientHeight,n=e.h.element.parentElement.clientHeight,r=_.floor(n/i);s=_.min(t.length-1,r),this.zs.style.gridTemplateRows="repeat("+s+", 1fr)"}break}case Sc.OVERLAY:{let s=0;for(i=1;i<t.length;i++){const e=t[i];if(i>=5)e.Ot=!1;else{if(!e.rc){const t=.04+.24*s;e.cc(e.Hh,t,e.Ci,e.Pi,!1),this.ec(e),s++}e.h.element.style.setProperty("z-index",""+e.hc),e.fc()}}break}case Sc.GALLERY:{const s=t.length,e=_.ceil(_.sqrt(s));for(const s of t)i>=9?s.Ot=!1:(s.h.element.style.setProperty("width",100/e+"%"),i++);break}}}Gu(t,i){const s=i>=0?_.min(_.floor(i),this.Wu.length-1):0,e=t.wo,n=_.min(e,s),r=_.max(e,s),h=0===n;if(!(!this.Wu[n].Ot||!this.Wu[r].Ot)||!h){if(this.Qu===Sc.OVERLAY){const t=this.Wu[r],i=this.Wu[n],s=t.Hh,e=t.zh,h=t.Ci,o=t.Pi,a=i.rc||t.rc;t.cc(i.Hh,i.zh,i.Ci,i.Pi,a),[this.Wu[n],this.Wu[r]]=[this.Wu[r],this.Wu[n]],i.cc(s,e,h,o,a)}else[this.Wu[n],this.Wu[r]]=[this.Wu[r],this.Wu[n]];h&&this.mf(this.Wu[0]),this.Po(new Fc(e,s))}}lc(t){t===this._l&&(this.Xu=void 0),t.Eu(),zi(this.Wu,t),this.fc(),this.Po(new Nc(t.no))}hf(t){this.xc||0===this.fl.length||this.kl===t||this.Sl===Sc.GALLERY||this.Gu(t,0)}mf(t,i){void 0===i&&(i=!1);let s=!1;const e=this.kl;this.kl=t,t.rc=!1,this.gf(e),gi(e.h.element,zc),this._l||(s=e.Lu,e.Ju(!0),e.dc(!1),t.dc(!0),i&&!s?this.Po(new Mi(this.Ru,0)):t.Ju(s)),this.ec(e),vi(this.kl.h.element,zc),this.ef(this.kl),this.Qu===Sc.OVERLAY&&this.fc()}lf(t){t.h.addEventListener(G.yf,this.bf),t.h.addEventListener(G.wf,this.xh),t.h.addEventListener(G._h,this.kf),t.h.addEventListener(G.kh,this._f),t.h.addEventListener(G.jf,this.Je),t.h.addEventListener(G.xf,this.Sf),t.h.addEventListener(G.Tf,this.Cf),t.h.addEventListener(kt.Pf,this.Af),t.h.addEventListener(dt.aa,this.Ps)}ef(t){t.h.addEventListener(G.Mf,this.Os),t.h.addEventListener(G.Du,this.Fl),t.h.addEventListener(G.Nu,this.If),this._l||t.h.addEventListener(G.jl,this.xl)}gf(t){t.h.removeEventListener(G.Mf,this.Os),t.h.removeEventListener(G.Du,this.Fl),t.h.removeEventListener(G.Nu,this.If),this._l||t.h.removeEventListener(G.jl,this.xl)}constructor(t,i){super(),this.wl=[],this.Sl=Sc.GALLERY,this.ff=!1,this.Rl=!1,this.Ul=!0,this.Hl=!1,this.zl=!1,this.Wl=-1,this.ql=St.$l,this.Gl=!1,this.af=0,this.Dl=void 0,this.Xl=!1,this.Ml=!1,this.Jl=-1,this.Ql=!1,this.Yl=-1,this.Pl=!1,this.Ef=t=>{this.df(),D((()=>this.Os(t)))},this.Df=t=>{this.Al(),this.Os(t)},this.As=()=>{var t;null==(t=this.Vl)||t.Ff(),this.Vl=void 0},this.Fl=()=>{const t=this.Mu;this.Yl!==t&&(this.Yl=t,this.Os(new yi(this.Ru,t)))},this.xl=()=>{const t=this.vl,i=this.Lu;this.Jl===t&&this.Ql===i||(this.Jl=t,this.Ql=i,this.Os(new Mi(this.Ru,t)))},this.If=t=>{(this.Cc>St.Nf||this.Pc)&&this.Os(t)},this.bf=t=>{this.df(),this.Pc||(this.Hl=!1,this.Os(t))},this.Cf=t=>{const i=this.lt;this.Wl!==i&&(this.Wl=i,this.Os(t))},this.Ps=t=>{this.Os(t)},this.kf=t=>{if(this.Ul){if(this.Xl)return void(this.Xl=!1);this.Ul=!1,this.zl=!1,this.Os(t)}},this.Je=t=>{this.Hl||(this.Hl=!0,this.Os(t))},this._f=t=>{!this.Ul&&this.Tc&&(this.Ul=!0,this.Os(t))},this.xh=t=>{this.zl||(this.zl=!0,this.Os(t))},this.Sf=t=>{this.Gl||(this.Gl=!0,this.Os(t))},this.Af=t=>{const i=this.Cc;this.ql!==i&&(this.ql=i,this.Os(t))},this.$f=async()=>{try{await this.Rf.Bf([F.MULTIVIEW])}catch(t){this.El=t,this.ml(),this.Rl=!0,this.Po(new Wt(t))}},this.zs=t,this.Zc=i;const s=At.Of,e=new ht,n=new V("6.5.0",s,e),r=new R(i.isEmbeddable,"6.5.0",$());if(this.Rf=new nt(s,r,n,e,i,$()),this.Rf.Vf().then(this.$f),this.Lf=new Ec(this.no,t),this.bl=Lu(this.Lf,this.zs,i.ui),vi(this.zs,Wc+this.Sl),At.te.Zs){const t=this.bl.el();vi(t,"theo-mobile"),Uu(t)}this.tf=new Rc(this),this.Zl=new vt(this.tf),this.Zl.vn(kt.Uf,this.Ef),this.Kl=new Ut(this,!0),this.Kl.vn(Vc,this.Os),this.Kl.vn(kt.Hf,this.Df),this.Il=new Oc(this,t,i)}};function Gc(t,i){var s;const e=Wu(Fi({},i||{},{allowNativeFullscreen:!1,ui:Fi({},(null==i?void 0:i.ui)||{},{userActions:Fi({},(null==i||null==(s=i.ui)?void 0:s.userActions)||{},{click:!1})}),abr:Fi({},(null==i?void 0:i.abr)||{},{restrictToPlayerSize:!0})}));let n=new qc(t,e).no;return k.defineProperty(n,"constructor",{value:Gc}),n=Y(n),n}var Xc="vjs-selected",Jc=class extends hu{Pr(t){const i=t._r,s=this.Ir.localize(i.label);It(t.mh,s),t.el().setAttribute("aria-label",this.Ir.localize("Enable/disable")+" "+s),t.el().setAttribute("role","menuitemcheckbox"),t.selected(i.enabled)}jr(t){const i=super.jr(t);vi(i.el(),"theo-multi-view-menu-item"),2===this.wr.length&&vi(i.el(),"theo-multi-view-menu-item-position-zero");const s=c.createElement("span");i.mh=s;const e=c.createElement("div");e.className="theo-multi-view-menu-item-toggle",i.gh=e;const n=t=>this.yh(t,i);i.bh=n,e.addEventListener("click",n);const r=c.createElement("div");return r.className="theo-multi-view-menu-item-toggle-slider",e.appendChild(r),i.el().appendChild(s),i.el().appendChild(e),this.zf.before(i.el()),i}Wf(){const t=this.br.addMenuItem().el();vi(t,"theo-multi-view-menu-item"),vi(t,"theo-multi-view-menu-layout-select");const i=c.createElement("button");i.className="vjs-icon-view-grid",i.addEventListener("click",(()=>{this.Us.layout=Sc.GALLERY})),t.appendChild(i),this.qf=i;const s=c.createElement("button");s.className="vjs-icon-view-spotlight",s.addEventListener("click",(()=>{this.Us.layout=Sc.SPOTLIGHT})),t.appendChild(s),this.Gf=s;const e=c.createElement("button");return e.className="vjs-icon-multi-view",e.addEventListener("click",(()=>{this.Us.layout=Sc.OVERLAY})),t.appendChild(e),this.Xf=e,t}yh(t,i){t.stopImmediatePropagation(),this.Sr(i)}Sr(t){const i=t._r;for(const t of this.Us.views)t===i&&(t.enabled=!t.enabled);this.Pr(t)}Tr(t){t.gh.removeEventListener("click",t.bh),super.Tr(t)}constructor(t,i,s){super(t),this.Jf=t=>{this.yr(t.view)},this.Qf=t=>{this.gr(t.view)},this.Yf=t=>{const i=t.oldPosition,s=t.newPosition,e=_.max(i,s),n=_.min(i,s),r=c.getElementsByClassName("theo-multi-view-menu-item");r[e].before(r[n]),r[n].before(r[e]),0===n&&(gi(r[e],"theo-multi-view-menu-item-position-zero"),vi(r[n],"theo-multi-view-menu-item-position-zero"))},this.Kf=()=>{const t=this.Us.layout;wi(this.qf,Xc,t===Sc.GALLERY),wi(this.Gf,Xc,t===Sc.SPOTLIGHT),wi(this.Xf,Xc,t===Sc.OVERLAY)},i.views&&(this.Us=i,this.Ir=s,this.Us.multiViewPlayer.addEventListener(Ic.kc,this.Jf),this.Us.multiViewPlayer.addEventListener(Ic._c,this.Qf),this.Us.multiViewPlayer.addEventListener(Ic.VIEW_CHANGE,this.Jf),this.Us.multiViewPlayer.addEventListener(Ic.VIEW_POSITION_CHANGE,this.Yf),this.Us.multiViewPlayer.addEventListener(Ic.jc,this.Kf),It(this.br.menuHeader.el(),this.Ir.localize("MultiView")),this.zf=this.Wf(),this.Kf())}};Ho.registerComponent("multiViewButton",class extends Ca{buildCSSClass(){return"vjs-icon-view-grid "+super.buildCSSClass()}dispose(){this.ph.Le(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=3,this.ph=new Jc(this.menu,this.Ts,t),this.controlText(t.localize("Views")),this.Be.$e=this.controlText()}});export{Jt as ChromelessPlayer,W as ErrorCategory,H as ErrorCode,Gc as MultiViewPlayer,Gu as Player,Ii as cache,Si as cast,ii as features,oi as playerSuiteVersion,ci as players,di as registerContentProtectionIntegration,Kt as utils,ni as version,Ho as videojs};