@theoplayer/theoads 8.4.0 → 8.4.2

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: 8.4.0
38
- Created: 2024-11-06T10:52:35.705Z
37
+ Version: 8.4.2
38
+ Created: 2024-11-15T10:40:09.150Z
39
39
  */
40
- var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==s?s:"undefined"!=typeof global?global:this,s=a.window,h=a.document,u=(a.location,a.navigator,a.setTimeout),c=a.clearTimeout,v=a.setInterval,m=a.clearInterval,g=a.Error,b=a.TypeError,k=a.SyntaxError,w=a.Object,_=a.Math,x=a.parseInt,C=a.parseFloat,S=a.isNaN,j=a.Uint8Array;a.Worker,a.WorkerGlobalScope,a.XMLHttpRequest;import{$ as T,$a as M,A,Aa as P,B as E,Ba as N,C as B,Ca as I,D as F,Da as D,E as $,Ea as R,F as O,Fa as l,G as V,Ga as U,H as z,Ha as L,I as H,Ia as q,J as W,Ja as G,K as X,Ka as J,L as Q,La as Y,M as K,Ma as Z,N as tt,Na as it,O as st,Oa as et,P as nt,Pa as rt,Q as ht,Qa as ot,R as at,Ra as ut,S as ct,Sa as lt,T as dt,Ta as ft,U as vt,Ua as pt,V as mt,Va as gt,W as yt,Wa as bt,X as kt,Xa as wt,Y as _t,Ya as xt,Z as Ct,Za as St,_ as jt,_a as Tt,a as Mt,aa as At,b as Pt,ba as Et,c as Nt,ca as Bt,d as It,da as Ft,e as Dt,ea as $t,f as Rt,fa as Ot,g as Vt,ga as Ut,h as zt,ha as Lt,i as Ht,ia as qt,j as Wt,ja as Gt,k as Xt,ka as Jt,l as Qt,la as Yt,m as Kt,ma as Zt,n as ti,na as ii,o as si,oa as ei,p as ni,pa as ri,q as hi,qa as oi,r as ai,ra as ui,s as ci,sa as li,t as di,ta as fi,u as vi,ua as pi,v as mi,va as gi,w as yi,wa as bi,x as ki,xa as wi,y as _i,ya as xi,z as Ci,za as Si}from"./THEOplayer.common.esm.js";var ji=[];function Ti(t){ji.push(t)}var Mi=[];function Ai(t){Mi.push(t)}var t=void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Pi=void 0!==h?h:{createElement:function(){}};function Ei(t,i){return i||(i=t.slice(0)),t.raw=i,t}var Ni=1;function Bi(){return Ni++}var Ii,Fi=w.prototype.toString,Di=function(t){return Oi(t)?w.keys(t):[]};function $i(t,i){Di(t).forEach((function(s){return i(t[s],s)}))}function Ri(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 w.assign?w.assign.apply(w,[t].concat(s)):(s.forEach((function(i){i&&$i(i,(function(i,s){t[s]=i}))})),t)}function Oi(t){return!!t&&"object"==typeof t}function Vi(t){return Oi(t)&&"[object Object]"===Fi.call(t)&&t.constructor===w}var Ui=function(i,s,e){void 0===e&&(e=!!Vs&&Vs<11),"log"!==i&&s.unshift(i.toUpperCase()+":"),Ii.history.push(s),s.unshift("VIDEOJS:");var n=t.console&&t.console[i];n&&(e&&(s=s.map((function(t){if(Oi(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(i){return String(t)}return String(t)})).join(" ")),n.apply?n[Array.isArray(s)?"apply":"call"](t.console,s):n(s))};(Ii=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];Ui("log",i)}).history=[],Ii.error=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ui("error",i)},Ii.warn=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ui("warn",i)};var zi=Ii,Li="undefined"!=typeof globalThis?globalThis:void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Hi(t){return t.replace(/\n\r?\s*/g,"")}var qi,Wi=function(t){for(var i="",s=0;s<arguments.length;s++)i+=Hi(t[s])+(arguments[s+1]||"");return i};function Gi(t){return"string"==typeof t&&/\S/.test(t)}function Xi(t){if(/\s/.test(t))throw new g("class has illegal whitespace characters")}function Ji(){return Pi===t.document&&void 0!==Pi.createElement}function Qi(t){return Oi(t)&&1===t.nodeType}function Yi(t){return function(i,s){if(!Gi(i))return Pi[t](null);Gi(s)&&(s=Pi.querySelector(s));var e=Qi(s)?s:Pi;return e[t]&&e[t](i)}}function Ki(t,i,s,e){void 0===t&&(t="div"),void 0===i&&(i={}),void 0===s&&(s={});var n=Pi.createElement(t);return w.getOwnPropertyNames(i).forEach((function(t){var s=i[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(zi.warn(Wi(qi||(qi=Ei(["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?Zi(n,s):n[t]=s})),w.getOwnPropertyNames(s).forEach((function(t){n.setAttribute(t,s[t])})),e&&ys(n,e),n}function Zi(t,i){return void 0===t.textContent?t.innerText=i:t.textContent=i,t}function ts(t,i){i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t)}var is={},ss="vdata"+(new Date).getTime();function es(t){var i=t[ss];return i||(i=t[ss]=Bi()),is[i]||(is[i]={}),is[i]}function ns(t){var i=t[ss];return!!i&&!!w.getOwnPropertyNames(is[i]).length}function rs(t){var i=t[ss];if(i){delete is[i];try{delete t[ss]}catch(i){t.removeAttribute?t.removeAttribute(ss):t[ss]=null}}}function hs(t,i){return Xi(i),t.classList?t.classList.contains(i):function(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}(i).test(t.className)}function os(t,i){return t.classList?t.classList.add(i):hs(t,i)||(t.className=(t.className+" "+i).trim()),t}function as(t,i){return t.classList?t.classList.remove(i):(Xi(i),t.className=t.className.split(/\s+/).filter((function(t){return t!==i})).join(" ")),t}function us(t,i,s){var e=hs(t,i);if("function"==typeof s&&(s=s(t,i)),"boolean"!=typeof s&&(s=!e),s!==e)return s?os(t,i):as(t,i),t}function cs(t,i){w.getOwnPropertyNames(i).forEach((function(s){var e=i[s];null==e||!1===e?t.removeAttribute(s):t.setAttribute(s,!0===e?"":e)}))}function ls(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 ds(t,i,s){t.setAttribute(i,s)}function fs(t,i){t.removeAttribute(i)}function vs(i){var s;if(i.getBoundingClientRect&&i.parentNode&&(s=i.getBoundingClientRect()),!s)return{left:0,top:0};var e=Pi.documentElement,n=Pi.body,r=e.clientLeft||n.clientLeft||0,h=t.pageXOffset||n.scrollLeft,o=s.left+h-r,a=e.clientTop||n.clientTop||0,u=t.pageYOffset||n.scrollTop,c=s.top+u-a;return{left:_.round(o),top:_.round(c)}}function ps(t,i){var s={},e=vs(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 ms(t){return Oi(t)&&3===t.nodeType}function gs(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function ys(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()),Qi(t)||ms(t)?t:"string"==typeof t&&/\S/.test(t)?Pi.createTextNode(t):void 0})).filter((function(t){return t}))}(i).forEach((function(i){return t.appendChild(i)})),t}function bs(t,i){return ys(gs(t),i)}var ks,ws=Yi("querySelector"),_s=Yi("querySelectorAll"),xs=t.navigator&&t.navigator.userAgent||"",Cs=/AppleWebKit\/([\d.]+)/i.exec(xs),Ss=Cs?C(Cs.pop()):null,js=/iPad/i.test(xs),Ts=/iPhone/i.test(xs)&&!js,Ms=/iPod/i.test(xs),As=Ts||js||Ms,Ps=(ks=xs.match(/OS (\d+)_/i))&&ks[1]?ks[1]:null,Es=/Android/i.test(xs),Ns=function(){var t=xs.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&C(t[1]),s=t[2]&&C(t[2]);return i&&s?C(t[1]+"."+t[2]):i||null}(),Bs=Es&&/webkit/i.test(xs)&&Ns<2.3,Is=Es&&Ns<5&&Ss<537,Fs=/Firefox/i.test(xs),Ds=/Edge/i.test(xs),$s=!Ds&&/Chrome/i.test(xs),Rs=function(){var t=xs.match(/Chrome\/(\d+)/);return t&&t[1]?C(t[1]):null}(),Os=/MSIE\s8\.0/.test(xs),Vs=function(){var t=/MSIE\s(\d+)\.\d/.exec(xs),i=t&&C(t[1]);return!i&&/Trident\/7.0/i.test(xs)&&/rv:11.0/.test(xs)&&(i=11),i}(),Us=/Safari/i.test(xs)&&!$s&&!Es&&!Ds,zs=Us||As,Ls=Ji()&&("ontouchstart"in t||t.DocumentTouch&&t.document instanceof t.DocumentTouch),Hs=Ji()&&"backgroundSize"in t.document.createElement("video").style,qs=w.freeze({__proto__:null,IS_IPAD:js,IS_IPHONE:Ts,IS_IPOD:Ms,IS_IOS:As,IOS_VERSION:Ps,IS_ANDROID:Es,ANDROID_VERSION:Ns,IS_OLD_ANDROID:Bs,IS_NATIVE_ANDROID:Is,IS_FIREFOX:Fs,IS_EDGE:Ds,IS_CHROME:$s,CHROME_VERSION:Rs,IS_IE8:Os,IE_VERSION:Vs,IS_SAFARI:Us,IS_ANY_SAFARI:zs,TOUCH_ENABLED:Ls,BACKGROUND_SIZE_SUPPORTED:Hs});function Ws(t,i){var s=es(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)),w.getOwnPropertyNames(s.handlers).length<=0&&(delete s.handlers,delete s.dispatcher,delete s.disabled),0===w.getOwnPropertyNames(s).length&&rs(t)}function Gs(t,i,s,e){s.forEach((function(s){t(i,s,e)}))}function Xs(i){function s(){return!0}function e(){return!1}if(!i||!i.isPropagationStopped||!i.isImmediatePropagationStopped){var n=i||t.event;for(var r in i={},n)"layerX"!==r&&"layerY"!==r&&"keyLocation"!==r&&"webkitMovementX"!==r&&"webkitMovementY"!==r&&"path"!==r&&("returnValue"===r&&n.preventDefault||(i[r]=n[r]));if(i.target||(i.target=i.srcElement||Pi),i.relatedTarget||(i.relatedTarget=i.fromElement===i.target?i.toElement:i.fromElement),i.preventDefault=function(){n.preventDefault&&n.preventDefault(),i.returnValue=!1,n.returnValue=!1,i.defaultPrevented=!0},i.defaultPrevented=!1,i.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),i.cancelBubble=!0,n.cancelBubble=!0,i.isPropagationStopped=s},i.isPropagationStopped=e,i.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),i.isImmediatePropagationStopped=s,i.stopPropagation()},i.isImmediatePropagationStopped=e,null!==i.clientX&&void 0!==i.clientX){var h=Pi.documentElement,o=Pi.body;i.pageX=i.clientX+(h&&h.scrollLeft||o&&o.scrollLeft||0)-(h&&h.clientLeft||o&&o.clientLeft||0),i.pageY=i.clientY+(h&&h.scrollTop||o&&o.scrollTop||0)-(h&&h.clientTop||o&&o.clientTop||0)}i.which=i.charCode||i.keyCode,null!==i.button&&void 0!==i.button&&(i.button=1&i.button?0:4&i.button?1:2&i.button?2:0)}return i}var Js=!1;!function(){try{var i=w.defineProperty({},"passive",{get:function(){Js=!0}});t.addEventListener("test",null,i)}catch(t){}}();var Qs=["touchstart","touchmove"];function Ys(t,i,s){if(Array.isArray(i))return Gs(Ys,t,i,s);var e=es(t);if(e.handlers||(e.handlers={}),e.handlers[i]||(e.handlers[i]=[]),s.guid||(s.guid=Bi()),e.handlers[i].push(s),e.dispatcher||(e.disabled=!1,e.dispatcher=function(i,s){if(!e.disabled){i=Xs(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){zi.error(t)}}}),1===e.handlers[i].length)if(t.addEventListener){var n=!1;Js&&Qs.indexOf(i)>-1&&(n={passive:!0}),t.addEventListener(i,e.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+i,e.dispatcher)}function Ks(t,i,s){if(ns(t)){var e=es(t);if(e.handlers){if(Array.isArray(i))return Gs(Ks,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 Zs(t,i,s){var e=ns(t)?es(t):{},n=t.parentNode||t.ownerDocument;if("string"==typeof i&&(i={type:i,target:t}),i=Xs(i),e.dispatcher&&e.dispatcher.call(t,i,s),n&&!i.isPropagationStopped()&&!0===i.bubbles)Zs.call(null,n,i,s);else if(!n&&!i.defaultPrevented){var r=es(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 te(t,i,s){if(Array.isArray(i))return Gs(te,t,i,s);var e=function e(){Ks(t,i,e),s.apply(this,arguments)};e.guid=s.guid=s.guid||Bi(),Ys(t,i,e)}var ie,se=!1,ee=function(){if(Ji()){var t=Pi.getElementsByTagName("video"),i=Pi.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){ne(1);break}void 0===u.player&&null!==u.getAttribute("data-setup")&&ie(u)}else se||ne(1)}};function ne(i,s){s&&(ie=s),t.setTimeout(ee,i)}Ji()&&"complete"===Pi.readyState?se=!0:te(t,"load",(function(){se=!0}));var re=function(t){var i=Pi.createElement("style");return i.className=t,i},he=function(t,i){t.styleSheet?t.styleSheet.cssText=i:t.textContent=i},oe=function(t,i,s){i.guid||(i.guid=Bi());var e=function(){return i.apply(t,arguments)};return e.guid=s?s+"_"+i.guid:i.guid,e};function ae(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function ue(){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&&$i(i,(function(i,s){Vi(i)?(Vi(t[s])||(t[s]={}),t[s]=ue(t[s],i)):t[s]=i}))})),t}var i=function(){function i(t,i,s){if(!t&&this.play?this.t=t=this:this.t=t,this.h=ue({},this.h),i=this.h=ue(this.h,i),this.o=i.id||i.el&&i.el.id,!this.o){var e=t&&t.id&&t.id()||"no_player";this.o=e+"u"+Bi()}this.l=i.name||null,i.el?this.v=i.el:!1!==i.createEl&&(this.v=this.createEl()),this.m=[],this.k={},this.C={},!1!==i.initChildren&&this.initChildren(),this.ready(s),!1!==i.reportTouchActivity&&this.enableTouchActivity()}var s=i.prototype;return s.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.m)for(var t=this.m.length-1;t>=0;t--)this.m[t].dispose&&this.m[t].dispose();this.m=null,this.k=null,this.C=null,this.off(),this.v.parentNode&&this.v.parentNode.removeChild(this.v),rs(this.v),this.v=null},s.player=function(){return this.t},s.options=function(t){return zi.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.h=ue(this.h,t),this.h):this.h},s.el=function(){return this.v},s.createEl=function(t,i,s){return Ki(t,i,s)},s.localize=function(t){var i=this.t.language&&this.t.language(),s=this.t.languages&&this.t.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},s.contentEl=function(){return this.S||this.v},s.id=function(){return this.o},s.name=function(){return this.l},s.children=function(){return this.m},s.getChildById=function(t){return this.k[t]},s.getChild=function(t){if(t)return t=ae(t),this.C[t]},s.addChild=function(t,s,e){var n,r;if(void 0===s&&(s={}),void 0===e&&(e=this.m.length),"string"==typeof t){r=ae(t),s||(s={}),!0===s&&(zi.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=i.getComponent(h);if(!o)throw new g("Component "+h+" does not exist");if("function"!=typeof o)return null;n=new o(this.t||this,s)}else n=t;if(this.m.splice(e,0,n),"function"==typeof n.id&&(this.k[n.id()]=n),(r=r||n.name&&ae(n.name()))&&(this.C[r]=n),"function"==typeof n.el&&n.el()){var a=this.contentEl().children[e]||null;this.contentEl().insertBefore(n.el(),a)}return n},s.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.m){for(var i=!1,s=this.m.length-1;s>=0;s--)if(this.m[s]===t){i=!0,this.m.splice(s,1);break}if(i){this.k[t.id()]=null,this.C[t.name()]=null;var e=t.el();e&&e.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},s.initChildren=function(){var t=this,s=this.h.children;if(s){var e,n=this.h,r=i.getComponent("Tech");(e=Array.isArray(s)?s:w.keys(s)).concat(w.keys(this.h).filter((function(t){return!e.some((function(i){return"string"==typeof i?t===i:t===i.name}))}))).map((function(i){var e,n;return"string"==typeof i?n=s[e=i]||t.h[e]||{}:(e=i.name,n=i),{name:e,opts:n}})).filter((function(t){var s=i.getComponent(t.opts.componentClass||ae(t.name));return s&&!r.isTech(s)})).forEach((function(i){var s=i.name,e=i.opts;if(void 0!==n[s]&&(e=n[s]),!1!==e){!0===e&&(e={}),e.playerOptions=t.h.playerOptions;var r=t.addChild(s,e);r&&(t[s]=r)}}))}},s.buildCSSClass=function(){return""},s.on=function(t,i,s){var e=this;if("string"==typeof t||Array.isArray(t))Ys(this.v,t,oe(this,i));else{var n=t,r=i,h=oe(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?(Ys(n,r,h),Ys(n,"dispose",a)):"function"==typeof t.on&&(n.on(r,h),n.on("dispose",a))}return this},s.off=function(t,i,s){if(!t||"string"==typeof t||Array.isArray(t))Ks(this.v,t,i);else{var e=t,n=i,r=oe(this,s);this.off("dispose",r),t.nodeName?(Ks(e,n,r),Ks(e,"dispose",r)):(e.off(n,r),e.off("dispose",r))}return this},s.one=function(t,i,s){var e=arguments,n=this;if("string"==typeof t||Array.isArray(t))te(this.v,t,oe(this,i));else{var r=t,h=i,o=oe(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},s.trigger=function(t,i){return Zs(this.v,t,i),this},s.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.j?i?t.call(this):this.setTimeout(t,1):(this.T=this.T||[],this.T.push(t))),this},s.triggerReady=function(){this.j=!0,this.setTimeout((function(){var t=this.T;this.T=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},s.$=function(t,i){return ws(t,i||this.contentEl())},s.$$=function(t,i){return _s(t,i||this.contentEl())},s.hasClass=function(t){return hs(this.v,t)},s.addClass=function(t){return os(this.v,t),this},s.removeClass=function(t){return as(this.v,t),this},s.toggleClass=function(t,i){return us(this.v,t,i),this},s.show=function(){return this.removeClass("vjs-hidden"),this},s.hide=function(){return this.addClass("vjs-hidden"),this},s.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},s.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},s.getAttribute=function(t){return function(t,i){return t.getAttribute(i)}(this.v,t)},s.setAttribute=function(t,i){return ds(this.v,t,i),this},s.removeAttribute=function(t){return fs(this.v,t),this},s.width=function(t,i){return this.dimension("width",t,i)},s.height=function(t,i){return this.dimension("height",t,i)},s.dimensions=function(t,i){return this.width(t,!0).height(i)},s.dimension=function(t,i,s){if(void 0!==i)return null!==i&&i==i||(i=0),-1!==(""+i).indexOf("%")||-1!==(""+i).indexOf("px")?this.v.style[t]=i:this.v.style[t]="auto"===i?"":i+"px",s||this.trigger("resize"),this;if(!this.v)return 0;var e=this.v.style[t],n=e.indexOf("px");return x(-1!==n?e.slice(0,n):this.v["offset"+ae(t)],10)},s.currentDimension=function(i){var s=0;if("width"!==i&&"height"!==i)throw new g("currentDimension only accepts width or height value");if("function"==typeof t.getComputedStyle){var e=t.getComputedStyle(this.v);s=e.getPropertyValue(i)||e[i]}if(0===(s=C(s))){var n="offset"+ae(i);s=this.v[n]}return s},s.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},s.currentWidth=function(){return this.currentDimension("width")},s.currentHeight=function(){return this.currentDimension("height")},s.focus=function(){this.v.focus()},s.blur=function(){this.v.blur()},s.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")))}))},s.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,i=oe(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)}},s.setTimeout=function(i,s){i=oe(this,i);var e=t.setTimeout(i,s),n=function(){this.clearTimeout(e)};return n.guid="vjs-timeout-"+e,this.on("dispose",n),e},s.clearTimeout=function(i){t.clearTimeout(i);var s=function(){};return s.guid="vjs-timeout-"+i,this.off("dispose",s),i},s.setInterval=function(i,s){i=oe(this,i);var e=t.setInterval(i,s),n=function(){this.clearInterval(e)};return n.guid="vjs-interval-"+e,this.on("dispose",n),e},s.clearInterval=function(i){t.clearInterval(i);var s=function(){};return s.guid="vjs-interval-"+i,this.off("dispose",s),i},i.registerComponent=function(t,s){if(t){if(t=ae(t),i.M||(i.M={}),"Player"===t&&i.M[t]){var e=i.M[t];if(e.players&&w.keys(e.players).length>0&&w.keys(e.players).map((function(t){return e.players[t]})).every(Boolean))throw new g("Can not register Player component after player has been created")}return i.M[t]=s,s}},i.getComponent=function(s){if(s)return s=ae(s),i.M&&i.M[s]?i.M[s]:t&&t.videojs&&t.videojs[s]?(zi.warn("The "+s+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),t.videojs[s]):void 0},i.extend=function(t){t=t||{},zi.warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var s=t.init||t.init||this.prototype.init||this.prototype.init||function(){},e=function(){s.apply(this,arguments)};for(var n in(e.prototype=w.create(this.prototype)).constructor=e,e.extend=i.extend,t)t.hasOwnProperty(n)&&(e.prototype[n]=t[n]);return e},i}();i.registerComponent("Component",i);var ce=function(){};function le(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function de(t,i){return(de=w.setPrototypeOf?w.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function fe(t,i){t.prototype=w.create(i.prototype),t.prototype.constructor=t,de(t,i)}function ve(t,i,s,e){return void 0===e&&(zi.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),e=0),function(t,i,s){if(i<0||i>s)throw new g("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 pe(t){return void 0===t||0===t.length?{length:0,start:function(){throw new g("This TimeRanges object is empty")},end:function(){throw new g("This TimeRanges object is empty")}}:{length:t.length,start:ve.bind(null,"start",0,t),end:ve.bind(null,"end",1,t)}}function me(t,i){return Array.isArray(t)?pe(t):void 0===t||void 0===i?pe():pe([[t,i]])}function ge(t,i){var s,e,n=0;if(!i)return 0;t&&t.length||(t=me(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}ce.prototype.A={},ce.prototype.on=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},Ys(this,t,i),this.addEventListener=s},ce.prototype.addEventListener=ce.prototype.on,ce.prototype.off=function(t,i){Ks(this,t,i)},ce.prototype.removeEventListener=ce.prototype.off,ce.prototype.one=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},te(this,t,i),this.addEventListener=s},ce.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=Xs(t),this.A[i]&&this["on"+i]&&this["on"+i](t),Zs(this,t)},ce.prototype.dispatchEvent=ce.prototype.trigger;var ye,be,ke,we,_e={prefixed:!0},xe=[["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"]],Ce=xe[0];for(be=0;be<xe.length;be++)if(xe[be][1]in Pi){ye=xe[be];break}if(ye){for(ke=0;ke<ye.length;ke++)_e[Ce[ke]]=ye[ke];_e.prefixed=ye[0]!==Ce[0]}function Se(t){if(t instanceof Se)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:Oi(t)&&("number"==typeof t.code&&(this.code=t.code),Ri(this,t)),this.message||(this.message=Se.defaultMessages[this.code]||"")}for(Se.prototype.code=0,Se.prototype.message="",Se.prototype.status=null,Se.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Se.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."},we=0;we<Se.errorTypes.length;we++)Se[Se.errorTypes[we]]=we,Se.prototype[Se.errorTypes[we]]=we;var je=function(t,i){var s,e=null;try{s=JSON.parse(t,i)}catch(t){e=t}return[e,s]};var Te=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}}))})},Me=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=Te(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(Te))},Ae=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()},Pe="vjs-modal-dialog",Ee=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).P=e.N=e.B=!1,e.closeable(!e.h.uncloseable),e.content(e.h.content),e.S=Ki("div",{className:Pe+"-content"},{role:"document"}),e.I=Ki("p",{className:Pe+"-description vjs-offscreen",id:e.el().getAttribute("aria-describedby")}),Zi(e.I,e.description()),e.v.appendChild(e.I),e.v.appendChild(e.S),e.on(i,"languagechange",e.handleLanguagechange),e}fe(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()+"F","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},s.buildCSSClass=function(){return Pe+" vjs-hidden "+t.prototype.buildCSSClass.call(this)},s.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},s.label=function(){return this.h.label||this.localize("Modal Window")},s.description=function(){var t=this.h.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.P){var t=this.player();this.trigger("beforemodalopen"),this.P=!0,(this.h.fillAlways||!this.N&&!this.B)&&this.fill(),this.D=!t.paused(),this.h.pauseOnOpen&&this.D&&t.pause(),this.closeable()&&this.on(this.v.ownerDocument,"keydown",oe(this,this.handleKeyPress)),t.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.N=!0}return this},s.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.P},s.close=function(){if(this.P){var t=this.player();this.trigger("beforemodalclose"),this.P=!1,this.D&&this.h.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.v.ownerDocument,"keydown",oe(this,this.handleKeyPress)),t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.h.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.S;this.S=this.v,s=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.S=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.B=!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"),gs(this.contentEl()),this.trigger("modalempty"),this},s.content=function(t){return void 0!==t&&(this.O=t),this.O},s.handleLanguagechange=function(){this.v.setAttribute("aria-label",this.label()),Zi(this.I,this.description()),this.opened()?this.fill():(this.N||this.B)&&(this.N=!1,this.B=!1,this.empty())},i}(i);Ee.prototype.h={pauseOnOpen:!0,temporary:!0},i.registerComponent("ModalDialog",Ee);var Ne=function(){function t(i){var s=this;if(Os)for(var e in s=Pi.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);if(t.prototype.V.call(s,i),w.defineProperty(s,"length",{get:function(){return this.U}}),Os)return s}var i=t.prototype;return i.V=function(t){var i=this.length||0,s=0,e=t.length;this.L=t,this.U=t.length;var n=function(t){""+t in this||w.defineProperty(this,""+t,{get:function(){return this.L[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}(),Be={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Ie={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Fe={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},De={disabled:"disabled",hidden:"hidden",showing:"showing"},$e=function(t){function i(s){var e;void 0===s&&(s={});var n=le(e=t.call(this)||this);if(Os)for(var r in n=Pi.createElement("custom"),i.prototype)"constructor"!==r&&(n[r]=i.prototype[r]);var h={id:s.id||["vjs_track",Bi()].join("_"),kind:s.kind||"",label:s.label||"",language:s.language||""},o=function(t){w.defineProperty(n,t,{get:function(){return h[t]},set:function(){}})};for(var a in h)o(a);return n||le(e)}return fe(i,t),i}(ce),Re=function(t){var i=["protocol","hostname","port","pathname","search","hash","host"],s=Pi.createElement("a");s.href=t;var e,n=""===s.host&&"file:"!==s.protocol;n&&((e=Pi.createElement("div")).innerHTML='<a href="'+t+'"></a>',s=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),Pi.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&&Pi.body.removeChild(e),r},Oe=function(i){var s=t.location,e=Re(i);return(":"===e.protocol?s.protocol:e.protocol)+e.host!==s.protocol+s.host},Ve={exports:{}};void 0!==s?Ve.exports=s:void 0!==Li?Ve.exports=Li:"undefined"!=typeof self?Ve.exports=self:Ve.exports={};var Ue=function(t){var i=ze.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)},ze=w.prototype.toString;var Le,He,qe,We,Ge,Xe,Je,Qe,Ye,Ke,Ze,tn,sn=Array.prototype.slice,en=w.prototype.toString,nn=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==en.call(i))throw new b("Function.prototype.bind called on incompatible "+i);for(var s,e=sn.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(sn.call(arguments)));return w(n)===n?n:this}return i.apply(t,e.concat(sn.call(arguments)))})),i.prototype){var o=function(){};o.prototype=i.prototype,s.prototype=new o,o.prototype=null}return s},rn=Function.prototype.bind||nn,hn=w.prototype.toString,on=function(t){var i=hn.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]"===hn.call(t.callee)),s};w.keys||(He=w.prototype.hasOwnProperty,qe=w.prototype.toString,We=on,Ge=w.prototype.propertyIsEnumerable,Xe=!Ge.call({toString:null},"toString"),Je=Ge.call((function(){}),"prototype"),Qe=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Ye=function(t){var i=t.constructor;return i&&i.prototype===t},Ke={$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},Ze=function(){if(void 0===s)return!1;for(var t in s)try{if(!Ke["$"+t]&&He.call(s,t)&&null!==s[t]&&"object"==typeof s[t])try{Ye(s[t])}catch(t){return!0}}catch(t){return!0}return!1}(),tn=function(t){if(void 0===s||!Ze)return Ye(t);try{return Ye(t)}catch(t){return!1}},Le=function(t){var i=null!==t&&"object"==typeof t,s="[object Function]"===qe.call(t),e=We(t),n=i&&"[object String]"===qe.call(t),r=[];if(!i&&!s&&!e)throw new b("Object.keys called on a non-object");var h=Je&&s;if(n&&t.length>0&&!He.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||!He.call(t,u)||r.push(String(u));if(Xe)for(var c=tn(t),l=0;l<Qe.length;++l)c&&"constructor"===Qe[l]||!He.call(t,Qe[l])||r.push(Qe[l]);return r});var an=Le,un=Array.prototype.slice,cn=on,ln=w.keys,dn=ln?function(t){return ln(t)}:an,fn=w.keys;dn.shim=function(){if(w.keys){var t=function(){var t=w.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(w.keys=function(t){return cn(t)?fn(un.call(t)):fn(t)})}else w.keys=dn;return w.keys||dn};var vn=dn,pn="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),mn=w.prototype.toString,gn=Array.prototype.concat,yn=w.defineProperty,bn=yn&&function(){var t={};try{for(var i in yn(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),kn=function(t,i,s,e){(!(i in t)||function(t){return"function"==typeof t&&"[object Function]"===mn.call(t)}(e)&&e())&&(bn?yn(t,i,{configurable:!0,enumerable:!1,value:s,writable:!0}):t[i]=s)},wn=function(t,i){var s=arguments.length>2?arguments[2]:{},e=vn(i);pn&&(e=gn.call(e,w.getOwnPropertySymbols(i)));for(var n=0;n<e.length;n+=1)kn(t,e[n],i[e[n]],s[e[n]])};wn.supportsDescriptors=!!bn;var _n,xn=wn,Cn=w.getOwnPropertyDescriptor?function(){return w.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new b},Sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,jn=w.getPrototypeOf||function(t){return t.__proto__},Tn=void 0===j?_n:jn(j),Mn={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?_n:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?_n:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":Sn?jn([][Symbol.iterator]()):_n,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":_n,"$ %AsyncFunction%":undefined,"$ %AsyncFunctionPrototype%":_n,"$ %AsyncGenerator%":_n,"$ %AsyncGeneratorFunction%":undefined,"$ %AsyncGeneratorPrototype%":_n,"$ %AsyncIteratorPrototype%":_n,"$ %Atomics%":"undefined"==typeof Atomics?_n:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?_n:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?_n:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":g,"$ %ErrorPrototype%":g.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?_n:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?_n:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?_n:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?_n:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":_n,"$ %GeneratorFunction%":undefined,"$ %GeneratorPrototype%":_n,"$ %Int8Array%":"undefined"==typeof Int8Array?_n:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?_n:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?_n:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?_n:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?_n:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?_n:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":S,"$ %IteratorPrototype%":Sn?jn(jn([][Symbol.iterator]())):_n,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?_n:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&Sn?jn((new Map)[Symbol.iterator]()):_n,"$ %MapPrototype%":"undefined"==typeof Map?_n:Map.prototype,"$ %Math%":_,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":w,"$ %ObjectPrototype%":w.prototype,"$ %ObjProto_toString%":w.prototype.toString,"$ %ObjProto_valueOf%":w.prototype.valueOf,"$ %parseFloat%":C,"$ %parseInt%":x,"$ %Promise%":"undefined"==typeof Promise?_n:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?_n:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?_n:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?_n:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?_n:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?_n:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?_n:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?_n:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?_n:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&Sn?jn((new Set)[Symbol.iterator]()):_n,"$ %SetPrototype%":"undefined"==typeof Set?_n:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?_n:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?_n:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":Sn?jn(""[Symbol.iterator]()):_n,"$ %StringPrototype%":String.prototype,"$ %Symbol%":Sn?Symbol:_n,"$ %SymbolPrototype%":Sn?Symbol.prototype:_n,"$ %SyntaxError%":k,"$ %SyntaxErrorPrototype%":k.prototype,"$ %ThrowTypeError%":Cn,"$ %TypedArray%":Tn,"$ %TypedArrayPrototype%":Tn?Tn.prototype:_n,"$ %TypeError%":b,"$ %TypeErrorPrototype%":b.prototype,"$ %Uint8Array%":void 0===j?_n:j,"$ %Uint8ArrayPrototype%":void 0===j?_n:j.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?_n:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?_n:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?_n:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?_n:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?_n:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?_n:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?_n:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?_n:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?_n:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?_n:WeakSet.prototype},An=function(t,i){if(arguments.length>1&&"boolean"!=typeof i)throw new b('"allowMissing" argument must be a boolean');var s="$ "+t;if(!(s in Mn))throw new k("intrinsic "+t+" does not exist!");if(void 0===Mn[s]&&!i)throw new b("intrinsic "+t+" exists, but is not available. Please file an issue!");return Mn[s]},Pn=rn.call(Function.call,w.prototype.hasOwnProperty),En=An,Nn=En("%TypeError%"),Bn=En("%SyntaxError%"),In=Pn,Fn={"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(In(i,e)&&!s[e])return!1;var n=In(i,"[[Value]]"),r=In(i,"[[Get]]")||In(i,"[[Set]]");if(n&&r)throw new Nn("Property Descriptors may not be both accessor and data descriptors");return!0}},Dn=Number.isNaN||function(t){return t!=t},$n=Number.isNaN||function(t){return t!=t},Rn=Number.isFinite||function(t){return"number"==typeof t&&!$n(t)&&t!==1/0&&t!==-1/0},On=Function.prototype.toString,Vn=/^\s*class\b/,Un=function(t){try{var i=On.call(t);return Vn.test(i)}catch(t){return!1}},zn=w.prototype.toString,Ln="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,Hn=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(Ln)return function(t){try{return!Un(t)&&(On.call(t),!0)}catch(t){return!1}}(t);if(Un(t))return!1;var i=zn.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},qn=w.prototype.toString,Wn=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},Gn=Hn,Xn=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===qn.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(Gn(t[n[e]])&&(s=t[n[e]](),Wn(s)))return s;throw new b("No default value")}throw new b("invalid [[DefaultValue]] hint supplied")},Jn=An,Qn=Jn("%Object%"),Yn=Jn("%TypeError%"),Kn=Jn("%String%"),Zn=function(t,i,s,e){var n=Fn[i];if("function"!=typeof n)throw new Bn("unknown record type: "+i);if(!n(t,e))throw new Nn(s+" must be a "+i);console.log(n(t,e),e)},tr=Dn,ir=Rn,sr=function(t){return t>=0?1:-1},er=function(t,i){var s=t%i;return _.floor(s>=0?s:s+i)},nr=Pn,rr={ToPrimitive:function(t){return Wn(t)?t:arguments.length>1?Xn(t,arguments[1]):Xn(t)},ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return tr(i)?0:0!==i&&ir(i)?sr(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(tr(i)||0===i||!ir(i))return 0;var s=sr(i)*_.floor(_.abs(i));return er(s,65536)},ToString:function(t){return Kn(t)},ToObject:function(t){return this.CheckObjectCoercible(t),Qn(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new Yn(i||"Cannot call method on "+t);return t},IsCallable:Hn,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:tr(t)&&tr(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(nr(t,s)&&!i[s])return!1;var e=nr(t,"[[Value]]"),n=nr(t,"[[Get]]")||nr(t,"[[Set]]");if(e&&n)throw new Yn("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(Zn(this,"Property Descriptor","Desc",t),!(!nr(t,"[[Get]]")&&!nr(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(Zn(this,"Property Descriptor","Desc",t),!(!nr(t,"[[Value]]")&&!nr(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(Zn(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(Zn(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 Yn("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new Yn("ToPropertyDescriptor requires an object");var i={};if(nr(t,"enumerable")&&(i["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),nr(t,"configurable")&&(i["[[Configurable]]"]=this.ToBoolean(t.configurable)),nr(t,"value")&&(i["[[Value]]"]=t.value),nr(t,"writable")&&(i["[[Writable]]"]=this.ToBoolean(t.writable)),nr(t,"get")){var s=t.get;if(void 0!==s&&!this.IsCallable(s))throw new b("getter must be a function");i["[[Get]]"]=s}if(nr(t,"set")){var e=t.set;if(void 0!==e&&!this.IsCallable(e))throw new Yn("setter must be a function");i["[[Set]]"]=e}if((nr(i,"[[Get]]")||nr(i,"[[Set]]"))&&(nr(i,"[[Value]]")||nr(i,"[[Writable]]")))throw new Yn("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},hr=rn.call(Function.call,String.prototype.replace),or=/^[\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]+/,ar=/[\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]+$/,ur=function(){var t=rr.ToString(rr.CheckObjectCoercible(this));return hr(hr(t,or,""),ar,"")},cr=ur,lr=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:cr},dr=xn,fr=lr,vr=xn,pr=ur,mr=lr,gr=function(){var t=fr();return dr(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},yr=rn.call(Function.call,mr());vr(yr,{getPolyfill:mr,implementation:pr,shim:gr});var br=yr,kr=Hn,wr=w.prototype.toString,_r=w.prototype.hasOwnProperty,xr=br,Cr=function(t,i,s){if(!kr(i))throw new b("iterator must be a function");var e;arguments.length>=3&&(e=s),"[object Array]"===wr.call(t)?function(t,i,s){for(var e=0,n=t.length;e<n;e++)_r.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)_r.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e)},Sr=function(){for(var t={},i=0;i<arguments.length;i++){var s=arguments[i];for(var e in s)jr.call(s,e)&&(t[e]=s[e])}return t},jr=w.prototype.hasOwnProperty;var Tr=Ve.exports,Mr=Ue,Ar=function(t){if(!t)return{};var i={};return Cr(xr(t).split("\n"),(function(t){var s=t.indexOf(":"),e=xr(t.slice(0,s)).toLowerCase(),n=xr(t.slice(s+1));void 0===i[e]?i[e]=n:!function(t){return"[object Array]"===w.prototype.toString.call(t)}(i[e])?i[e]=[i[e],n]:i[e].push(n)})),i},Pr=Sr,Er=Br;function Nr(t,i,s){var e=t;return Mr(i)?(s=i,"string"==typeof t&&(e={uri:t})):e=Pr(i,{uri:t}),e.callback=s,e}function Br(t,i,s){return Ir(i=Nr(t,i,s))}function Ir(t){if(void 0===t.callback)throw new g("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=l.response?l.response:l.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}(l),b)try{t=JSON.parse(t)}catch(t){}return t}var n={body:void 0,headers:{},statusCode:0,method:v,url:f,rawRequest:l};function r(t){return c(d),t instanceof g||(t=new g(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,n)}function h(){if(!a){var i;c(d),i=t.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var r=n,h=null;return 0!==i?(r={body:e(),statusCode:i,method:v,headers:{},url:f,rawRequest:l},l.getAllResponseHeaders&&(r.headers=Ar(l.getAllResponseHeaders()))):h=new g("Internal XMLHttpRequest Error"),s(h,r,r.body)}}var o,a,l=t.xhr||null;l||(l=t.cors||t.useXDR?new Br.XDomainRequest:new Br.XMLHttpRequest);var d,f=l.url=t.uri||t.url,v=l.method=t.method||"GET",p=t.body||t.data||null,m=l.headers=t.headers||{},y=!!t.sync,b=!1;if("json"in t&&(b=!0,m.accept||m.Accept||(m.Accept="application/json"),"GET"!==v&&"HEAD"!==v&&(m["content-type"]||m["Content-Type"]||(m["Content-Type"]="application/json"),p=JSON.stringify(t.json))),l.onreadystatechange=function(){4===l.readyState&&h()},l.onload=h,l.onerror=r,l.onprogress=function(){},l.ontimeout=r,l.open(v,f,!y,t.username,t.password),y||(l.withCredentials=!!t.withCredentials),!y&&t.timeout>0&&(d=u((function(){a=!0,l.abort("timeout");var t=new g("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}),t.timeout)),l.setRequestHeader)for(o in m)m.hasOwnProperty(o)&&l.setRequestHeader(o,m[o]);else if(t.headers&&!function(t){for(var i in t)if(t.hasOwnProperty(i))return!1;return!0}(t.headers))throw new g("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(l.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(l),l.send(p),l}Br.XMLHttpRequest=Tr.XMLHttpRequest||function(){},Br.XDomainRequest="withCredentials"in new Br.XMLHttpRequest?Br.XMLHttpRequest:Tr.XDomainRequest,function(t,i){for(var s=0;s<t.length;s++)i(t[s])}(["get","put","post","patch","head","delete"],(function(t){Br["delete"===t?"del":t]=function(i,s,e){return(s=Nr(i,s,e)).method=t.toUpperCase(),Ir(s)}}));var Fr=function(i,s){var e=new t.WebVTT.Parser(t,t.vttjs,t.WebVTT.StringDecoder()),n=[];e.oncue=function(t){s.addCue(t)},e.onparsingerror=function(t){n.push(t)},e.onflush=function(){s.trigger({type:"loadeddata",target:s})},e.parse(i),n.length>0&&(t.console&&t.console.groupCollapsed&&t.console.groupCollapsed("Text Track parsing errors for "+s.src),n.forEach((function(t){return zi.error(t)})),t.console&&t.console.groupEnd&&t.console.groupEnd()),e.flush()},Dr=function(i){function s(e){var n;if(void 0===e&&(e={}),!e.tech)throw new g("A tech was not provided.");var r=ue(e,{kind:Fe[e.kind]||"subtitles",language:e.language||e.srclang||""}),h=De[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(h="hidden");var a=n=i.call(this,r)||this;if(a.H=r.tech,Os)for(var u in s.prototype)"constructor"!==u&&(a[u]=s.prototype[u]);a.L=[],a.q=[];var c=new Ne(a.L),l=new Ne(a.q),d=!1,f=oe(a,(function(){this.activeCues,d&&(this.trigger("cuechange"),d=!1)}));return"disabled"!==h&&a.H.ready((function(){a.H.on("timeupdate",f)}),!0),w.defineProperty(a,"default",{get:function(){return o},set:function(){}}),w.defineProperty(a,"mode",{get:function(){return h},set:function(t){var i=this;De[t]&&("showing"===(h=t)&&this.H.ready((function(){i.H.on("timeupdate",f)}),!0),this.trigger("modechange"))}}),w.defineProperty(a,"cues",{get:function(){return this.W?c:null},set:function(){}}),w.defineProperty(a,"activeCues",{get:function(){if(!this.W)return null;if(0===this.cues.length)return l;for(var t=this.H.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,l.V(this.q),l},set:function(){}}),r.src?(a.src=r.src,function(i,s){var e={uri:i},n=Oe(i);n&&(e.cors=n),Er(e,oe(this,(function(i,e,n){if(i)return zi.error(i,e);if(s.W=!0,"function"!=typeof t.WebVTT){if(s.H){var r=function(){return Fr(n,s)};s.H.on("vttjsloaded",r),s.H.on("vttjserror",(function(){zi.error("vttjs failed to load, stopping trying to process "+s.src),s.H.off("vttjsloaded",r)}))}}else Fr(n,s)})))}(r.src,a)):a.W=!0,a||le(n)}fe(s,i);var e=s.prototype;return e.addCue=function(i){var s=i;if(t.vttjs&&!(i instanceof t.vttjs.VTTCue)){for(var e in s=new t.vttjs.VTTCue(i.startTime,i.endTime,i.text),i)e in s||(s[e]=i[e]);s.id=i.id,s.G=i}var n=this.H.textTracks();if(n)for(var r=0;r<n.length;r++)n[r]!==this&&n[r].removeCue(s);this.L.push(s),this.cues.V(this.L)},e.removeCue=function(t){for(var i=this.L.length;i--;){var s=this.L[i];if(s===t||s.G&&s.G===t){this.L.splice(i,1),this.cues.V(this.L);break}}},s}($e);Dr.prototype.A={cuechange:"cuechange"};var $r=function(t){function i(s){var e,n;void 0===s&&(s={});var r=le(e=t.call(this)||this);if(Os)for(var h in r=Pi.createElement("custom"),i.prototype)"constructor"!==h&&(r[h]=i.prototype[h]);var o=new Dr(s);return r.kind=o.kind,r.src=o.src,r.srclang=o.language,r.label=o.label,r.default=o.default,w.defineProperty(r,"readyState",{get:function(){return n}}),w.defineProperty(r,"track",{get:function(){return o}}),n=0,o.addEventListener("loadeddata",(function(){n=2,r.trigger({type:"load",target:r})})),Os?r||le(e):e}return fe(i,t),i}(ce);$r.prototype.A={load:"load"},$r.NONE=0,$r.LOADING=1,$r.LOADED=2,$r.ERROR=3;var Rr,Or=function(){function t(i){void 0===i&&(i=[]);var s=this;if(Os)for(var e in s=Pi.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);s.X=[],w.defineProperty(s,"length",{get:function(){return this.X.length}});for(var n=0,r=i.length;n<r;n++)s.J(i[n]);if(Os)return s}var i=t.prototype;return i.J=function(t){var i=this.X.length;""+i in this||w.defineProperty(this,i,{get:function(){return this.X[i]}}),-1===this.X.indexOf(t)&&this.X.push(t)},i.Y=function(t){for(var i,s=0,e=this.X.length;s<e;s++)if(t===this.X[s].track){i=this.X[s];break}return i},i.K=function(t){for(var i=0,s=this.X.length;i<s;i++)if(t===this.X[i]){this.X.splice(i,1);break}},t}(),Vr=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=le(n),Os))for(var r in e=Pi.createElement("custom"),i.prototype)"constructor"!==r&&(e[r]=i.prototype[r]);e.Z=[],w.defineProperty(e,"length",{get:function(){return this.Z.length}});for(var h=0;h<s.length;h++)e.tt(s[h]);return e||le(n)}fe(i,t);var s=i.prototype;return s.tt=function(t){var i=this.Z.length;""+i in this||w.defineProperty(this,i,{get:function(){return this.Z[i]}}),-1===this.Z.indexOf(t)&&(this.Z.push(t),this.trigger({track:t,type:"addtrack"}))},s.it=function(t){for(var i,s=0,e=this.length;s<e;s++)if(this[s]===t){(i=this[s]).off&&i.off(),this.Z.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}(ce);for(Rr in Vr.prototype.A={change:"change",addtrack:"addtrack",removetrack:"removetrack"},Vr.prototype.A)Vr.prototype["on"+Rr]=null;var Ur=function(t){function i(s){var e,n;if(void 0===s&&(s=[]),Os){for(var r in n=Pi.createElement("custom"),Vr.prototype)"constructor"!==r&&(n[r]=Vr.prototype[r]);for(var h in i.prototype)"constructor"!==h&&(n[h]=i.prototype[h])}return(n=e=t.call(this,s,n)||this)||le(e)}return fe(i,t),i.prototype.tt=function(i){t.prototype.tt.call(this,i),i.addEventListener("modechange",oe(this,(function(){this.trigger("change")})))},i}(Vr),zr=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].selected=!1)},Lr=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){zr(s,s[r]);break}if(Os){for(var h in n=Pi.createElement("custom"),Vr.prototype)"constructor"!==h&&(n[h]=Vr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,w.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n||le(e)}fe(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.selected&&zr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("selectedchange",(function(){s.st||(s.st=!0,zr(s,i),s.st=!1,s.trigger("change"))}))},s.addTrack=function(t){this.tt(t)},s.removeTrack=function(i){t.prototype.it.call(this,i)},i}(Vr),Hr=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].enabled=!1)},qr=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){Hr(s,s[r]);break}if(Os){for(var h in n=Pi.createElement("custom"),Vr.prototype)"constructor"!==h&&(n[h]=Vr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,n||le(e)}fe(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.enabled&&Hr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",(function(){s.st||(s.st=!0,Hr(s,i),s.st=!1,s.trigger("change"))}))},s.addTrack=function(t){this.tt(t)},s.removeTrack=function(i){t.prototype.it.call(this,i)},i}(Vr),Wr=void 0;var Gr=function(i){function s(t,s){var e;return void 0===t&&(t={}),void 0===s&&(s=function(){}),t.reportTouchActivity=!1,(e=i.call(this,null,t,s)||this).et=!1,e.on("playing",(function(){this.et=!0})),e.on("loadstart",(function(){this.et=!1})),e.nt=t.textTracks,e.rt=t.videoTracks,e.ht=t.audioTracks,e.featuresProgressEvents||e.manualProgressOn(),e.featuresTimeupdateEvents||e.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(i){!1===t["native"+i+"Tracks"]&&(e["featuresNative"+i+"Tracks"]=!1)})),!1===t.nativeCaptions&&(e.featuresNativeTextTracks=!1),e.featuresNativeTextTracks||e.emulateTextTracks(),e.ot=new Ur,e.initTextTrackListeners(),e.initTrackListeners(),t.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.l=e.constructor.name||"Unknown Tech"),e}fe(s,i);var e=s.prototype;return e.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},e.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},e.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(oe(this,(function(){var t=this.bufferedPercent();this.ut!==t&&this.trigger("progress"),this.ut=t,1===t&&this.stopTrackingProgress()})),500)},e.onDurationChange=function(t){this.ct=this.duration()},e.buffered=function(){return me(0,0)},e.bufferedPercent=function(){return ge(this.buffered(),this.ct)},e.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},e.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},e.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},e.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},e.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.dispose=function(){this.clearTracks(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),i.prototype.dispose.call(this)},e.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.it(n)}}))},e.cleanupAutoTextTracks=function(){for(var t=this.ot||[],i=t.length;i--;){var s=t[i];this.removeRemoteTextTrack(s)}},e.reset=function(){},e.error=function(t){return void 0!==t&&(this.lt=new Se(t),this.trigger("error")),this.lt},e.played=function(){return this.et?me(0,0):me()},e.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.initTextTrackListeners=function(){var t=oe(this,(function(){this.trigger("texttrackchange")})),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",oe(this,(function(){i.removeEventListener("removetrack",t),i.removeEventListener("addtrack",t)}))))},e.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)}))}))},e.dt=function(){var i=this;if(!t.WebVTT)if(Pi.body.contains(this.el())){if(!this.h["vtt.js"]&&Vi(Wr)&&w.keys(Wr).length>0)return void this.trigger("vttjsloaded");var s=Pi.createElement("script");s.src=this.h["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",s.onload=function(){i.trigger("vttjsloaded")},s.onerror=function(){i.trigger("vttjserror")},this.on("dispose",(function(){s.onload=null,s.onerror=null})),t.WebVTT=!0,this.el().parentNode.appendChild(s)}else this.ready(this.dt)},e.emulateTextTracks=function(){var t=this,i=this.textTracks();if(i){var s=this.remoteTextTracks(),e=function(t){return i.tt(t.track)},n=function(t){return i.it(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)}}))}},e.videoTracks=function(){return this.rt=this.rt||new Lr,this.rt},e.audioTracks=function(){return this.ht=this.ht||new qr,this.ht},e.textTracks=function(){return this.nt=this.nt||new Ur,this.nt},e.remoteTextTracks=function(){return this.ft=this.ft||new Ur,this.ft},e.remoteTextTrackEls=function(){return this.vt=this.vt||new Or,this.vt},e.addTextTrack=function(t,i,s){if(!t)throw new g("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 Dr(n);return r.tt(h),h}(this,t,i,s)},e.createRemoteTextTrack=function(t){var i=ue(t,{tech:this});return new $r(i)},e.addRemoteTextTrack=function(t,i){void 0===t&&(t={});var s=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(zi.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().J(s),this.remoteTextTracks().tt(s.track),!0!==i&&this.ot.tt(s.track),s},e.removeRemoteTextTrack=function(t){var i=this.remoteTextTrackEls().Y(t);this.remoteTextTrackEls().K(i),this.remoteTextTracks().it(t),this.ot.it(t)},e.getVideoPlaybackQuality=function(){return{}},e.setPoster=function(){},e.playsinline=function(){},e.setPlaysinline=function(){},e.canPlayType=function(){return""},s.isTech=function(t){return t.prototype instanceof s||t instanceof s||t===s},s.registerTech=function(t,i){if(s.gt||(s.gt={}),!s.isTech(i))throw new g("Tech "+t+" must be a Tech");return s.gt[t]=i,i},s.getTech=function(i){return s.gt&&s.gt[i]?s.gt[i]:t&&t.videojs&&t.videojs[i]?(zi.warn("The "+i+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),t.videojs[i]):void 0},s}(i);Gr.prototype.nt,Gr.prototype.ht,Gr.prototype.rt,Gr.prototype.featuresVolumeControl=!0,Gr.prototype.featuresFullscreenResize=!1,Gr.prototype.featuresPlaybackRate=!1,Gr.prototype.featuresProgressEvents=!1,Gr.prototype.featuresTimeupdateEvents=!1,Gr.prototype.featuresNativeTextTracks=!1,Gr.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.yt&&this.yt[t]?this.yt[t].apply(this.yt,arguments):i.apply(this,arguments)})}),t.prototype),t.prototype.setSource=function(i){var s=t.selectSourceHandler(i,this.h);return s||(t.nativeSourceHandler?s=t.nativeSourceHandler:zi.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),s!==t.nativeSourceHandler&&(this.bt=i,this.off(this.v,"loadstart",t.prototype.kt),this.off(this.v,"loadstart",t.prototype.wt),this.one(this.v,"loadstart",t.prototype.kt)),this.yt=s.handleSource(i,this,this.h),this.on("dispose",this.disposeSourceHandler),this},t.prototype.kt=function(){this.one(this.v,"loadstart",t.prototype.wt)},t.prototype.wt=function(){this.disposeSourceHandler(),this.one(this.v,"loadstart",t.prototype.wt)},t.prototype.disposeSourceHandler=function(){this.bt&&(this.clearTracks(["audio","video"]),this.bt=null),this.cleanupAutoTextTracks(),this.yt&&(this.off(this.v,"loadstart",t.prototype.kt),this.off(this.v,"loadstart",t.prototype.wt),this.yt.dispose&&this.yt.dispose(),this.yt=null)}},i.registerComponent("Tech",Gr),i.registerComponent("MediaTechController",Gr),Gr.registerTech("Tech",Gr);var Xr=function(t){function s(s,e,n){var r;if(r=t.call(this,s,e,n)||this,e.playerOptions.sources&&0!==e.playerOptions.sources.length)s.src(e.playerOptions.sources);else for(var h=0,o=e.playerOptions.techOrder;h<o.length;h++){var a=ae(o[h]),u=Gr.getTech(a);if(a||(u=i.getComponent(a)),u&&u.isSupported()){s._t(a);break}}return r}return fe(s,t),s}(i);i.registerComponent("MediaLoader",Xr);var Jr=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}fe(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=Ri({className:this.buildCSSClass(),tabIndex:0},s),"button"===i&&zi.error("Creating a ClickableComponent with an HTML element of "+i+" is not supported; use a Button instead."),e=Ri({role:"button","aria-live":"polite"},e),this.xt=s.tabIndex;var n=t.prototype.createEl.call(this,i,s,e);return this.createControlTextEl(n),n},s.createControlTextEl=function(t){return this.Ct=Ki("span",{className:"vjs-control-text"}),t&&t.appendChild(this.Ct),this.controlText(this.St,t),this.Ct},s.controlText=function(t,i){if(void 0===i&&(i=this.el()),void 0===t)return this.St||"Need Text";var s=this.localize(t);return this.St=t,this.Ct.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.v.setAttribute("aria-disabled","false"),void 0!==this.xt&&this.v.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.v.setAttribute("aria-disabled","true"),void 0!==this.xt&&this.v.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.St)},s.handleClick=function(t){},s.handleFocus=function(t){Ys(Pi,"keydown",oe(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){Ks(Pi,"keydown",oe(this,this.handleKeyPress))},i}(i);i.registerComponent("ClickableComponent",Jr);var Qr=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).update(),i.on("posterchange",oe(le(e),e.update)),e}fe(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=Ki("div",{className:"vjs-poster",tabIndex:-1});return Hs||(this.jt=Ki("img"),t.appendChild(this.jt)),t},s.update=function(t){var i=this.player().poster();this.setSrc(i),i?this.show():this.hide()},s.setSrc=function(t){if(this.jt)this.jt.src=t;else{var i="";t&&(i='url("'+t+'")'),this.v.style.backgroundImage=i}},s.handleClick=function(t){this.t.controls()&&(this.t.paused()?this.t.play():this.t.pause())},i}(Jr);i.registerComponent("PosterImage",Qr);var Yr="#222",Kr={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 Zr(t,i){return"rgba("+x(t[1]+t[1],16)+","+x(t[2]+t[2],16)+","+x(t[3]+t[3],16)+","+i+")"}function th(t,i,s){try{t.style[i]=s}catch(t){return}}var ih=function(i){function s(t,s,e){var n;return n=i.call(this,t,s,e)||this,t.on("loadstart",oe(le(n),n.toggleDisplay)),t.on("texttrackchange",oe(le(n),n.updateDisplay)),t.ready(oe(le(n),(function(){if(t.H&&t.H.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",oe(this,this.updateDisplay));for(var i=this.h.playerOptions.tracks||[],s=0;s<i.length;s++)this.t.addRemoteTextTrack(i[s],!0);var e,n,r={captions:1,subtitles:1},h=this.t.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}fe(s,i);var e=s.prototype;return e.toggleDisplay=function(){this.t.H&&this.t.H.featuresNativeTextTracks?this.hide():this.show()},e.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},e.clearDisplay=function(){"function"==typeof t.WebVTT&&t.WebVTT.processCues(t,[],this.v)},e.updateDisplay=function(){var t=this.t.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))}},e.updateForTrack=function(i){if("function"==typeof t.WebVTT&&i.activeCues){for(var s=this.t.textTrackSettings.getValues(),e=[],n=0;n<i.activeCues.length;n++)e.push(i.activeCues[n]);t.WebVTT.processCues(t,e,this.v);for(var r=e.length;r--;){var h=e[r];if(h){var o=h.displayState;if(s.color&&(o.firstChild.style.color=s.color),s.textOpacity&&th(o.firstChild,"color",Zr(s.color||"#fff",s.textOpacity)),s.backgroundColor&&(o.firstChild.style.backgroundColor=s.backgroundColor),s.backgroundOpacity&&th(o.firstChild,"backgroundColor",Zr(s.backgroundColor||"#000",s.backgroundOpacity)),s.windowColor&&(s.windowOpacity?th(o,"backgroundColor",Zr(s.windowColor,s.windowOpacity)):o.style.backgroundColor=s.windowColor),s.edgeStyle&&("dropshadow"===s.edgeStyle?o.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+Yr:"raised"===s.edgeStyle?o.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+Yr:"depressed"===s.edgeStyle?o.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+Yr:"uniform"===s.edgeStyle&&(o.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+Yr)),s.fontPercent&&1!==s.fontPercent){var a=t.parseFloat(o.style.fontSize);o.style.fontSize=a*s.fontPercent+"px",o.style.height="auto",o.style.top="auto",o.style.bottom="2px"}s.fontFamily&&"default"!==s.fontFamily&&("small-caps"===s.fontFamily?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=Kr[s.fontFamily])}}}},s}(i);i.registerComponent("TextTrackDisplay",ih);var sh=function(t){function i(){return t.apply(this,arguments)||this}return fe(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},i}(i);i.registerComponent("LoadingSpinner",sh);var eh=function(t){function s(){return t.apply(this,arguments)||this}fe(s,t);var e=s.prototype;return e.createEl=function(t,s,e){void 0===t&&(t="button"),void 0===s&&(s={}),void 0===e&&(e={}),s=Ri({className:this.buildCSSClass()},s),"button"!==t&&(zi.warn("Creating a Button with an HTML element of "+t+" is deprecated; use ClickableComponent instead."),s=Ri({tabIndex:0},s),e=Ri({role:"button"},e)),e=Ri({type:"button","aria-live":"polite"},e);var n=i.prototype.createEl.call(this,t,s,e);return this.createControlTextEl(n),n},e.addChild=function(t,s){void 0===s&&(s={});var e=this.constructor.name;return zi.warn("Adding an actionable (user controllable) child to a Button ("+e+") is not supported; use a ClickableComponent instead."),i.prototype.addChild.call(this,t,s)},e.enable=function(){t.prototype.enable.call(this),this.v.removeAttribute("disabled")},e.disable=function(){t.prototype.disable.call(this),this.v.setAttribute("disabled","disabled")},e.handleKeyPress=function(i){32!==i.which&&13!==i.which&&t.prototype.handleKeyPress.call(this,i)},s}(Jr);i.registerComponent("Button",eh);var nh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Tt=!1,e.on("mousedown",e.handleMouseDown),e}fe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-big-play-button"},s.handleClick=function(t){var i=this;if(this.Tt&&t.clientX&&t.clientY)this.t.play();else{var s=this.t.getChild("controlBar"),e=s&&s.getChild("playToggle");this.one(this.t,"play",(function(){e?e.focus():i.t.focus()})),this.t.play()}},s.handleKeyPress=function(i){this.Tt=!1,t.prototype.handleKeyPress.call(this,i)},s.handleMouseDown=function(t){this.Tt=!0},i}(eh);nh.prototype.St="Play Video",i.registerComponent("BigPlayButton",nh);var rh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).controlText(s&&s.controlText||"Close"),e}fe(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}(eh);i.registerComponent("CloseButton",rh);var hh=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}fe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.t.paused()?this.t.play():this.t.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}(eh);function oh(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)}hh.prototype.St="Play",i.registerComponent("PlayToggle",hh);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,"languagechange",e.updateContent),e}fe(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.S=Ki("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00'},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),s=this.localize("Current Time"),e=oh(i,this.t.duration());e!==this.Mt&&(this.Mt=e,this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e)},i}(i);i.registerComponent("CurrentTimeDisplay",ah);var uh=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}fe(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.S=Ki("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Duration Time")+"</span> 0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.duration();if(i&&this.ct!==i){this.ct=i;var s=this.localize("Duration Time"),e=oh(i);this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e}},i}(i);i.registerComponent("DurationDisplay",uh);var ch=function(t){function i(){return t.apply(this,arguments)||this}return fe(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}(i);i.registerComponent("TimeDivider",ch);var lh=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}fe(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.S=Ki("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.S),i},s.updateContent=function(t){if(this.t.duration()){var i=this.localize("Remaining Time"),s=oh(this.t.remainingTime());s!==this.Mt&&(this.Mt=s,this.S.innerHTML='<span class="vjs-control-text">'+i+"</span> -"+s)}},i}(i);i.registerComponent("RemainingTimeDisplay",lh);var dh=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}fe(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.S=Ki("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.Ct=Ki("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.At=Pi.createTextNode(this.localize("LIVE")),this.S.appendChild(this.Ct),this.S.appendChild(this.At),i.appendChild(this.S),i},s.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},s.handleLanguagechange=function(){this.Ct.innerHTML=this.localize("Stream Type"),this.At.innerHTML=this.localize("LIVE")},i}(i);i.registerComponent("LiveDisplay",dh);var fh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).bar=e.getChild(e.h.barName),e.vertical(!!e.h.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}fe(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=Ri({tabIndex:0},s),e=Ri({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.v.ownerDocument;t.preventDefault(),Pi.body.focus(),Pi.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.v.ownerDocument;Pi.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.v){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=ps(this.v,t);return this.vertical()?i.y:i.x},s.handleFocus=function(){this.on(this.bar.v.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.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},s.vertical=function(t){return void 0===t?this.Pt||!1:(this.Pt=!!t,this.Pt?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(i);function vh(i,s){if(!i||!s)return"";if("function"==typeof t.getComputedStyle){var e=t.getComputedStyle(i);return e?e[s]:""}return i.currentStyle[s]||""}i.registerComponent("Slider",fh);var ph=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}fe(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});return this.Nt=Ki("span",{innerHTML:this.localize("Loaded")}),this.Bt=Pi.createTextNode(": 0%"),this.Ct=Ki("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Nt),this.Ct.appendChild(this.Bt),i.appendChild(this.Ct),i},s.update=function(t){var i=this.t.buffered(),s=this.t.duration(),e=this.t.bufferedEnd(),n=this.Et,r=function(t,i){var s=t/i||0;return 100*(s>=1?1:s)+"%"};this.v.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.v.appendChild(Ki()),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.v.removeChild(n[c-1]);n.length=i.length},s.handleLanguagechange=function(){this.Nt.innerHTML=this.localize("Loaded")},i}(i);i.registerComponent("LoadProgressBar",ph);var mh=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(oe(le(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}fe(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.It=Ki("span",{innerHTML:this.localize("Progress")}),this.Ft=Pi.createTextNode(": 0%"),this.Ct=Ki("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.It),this.Ct.appendChild(this.Ft),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();this.v.setAttribute("data-current-time",oh(i,this.t.duration()))},s.handleLanguagechange=function(){this.It.innerHTML=this.localize("Progress")},i}(i);i.registerComponent("PlayProgressBar",mh);var gh=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(oe(le(e),e.updateDataAttr)),e}fe(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=Ki("div",{className:"vjs-time-tooltip"}),this.It=Ki("span",{innerHTML:this.localize("Progress")}),this.Ft=Pi.createTextNode(": 0%"),this.Ct=Ki("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.It),this.Ct.appendChild(this.Ft),i.appendChild(this.tooltip),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=oh(this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),this.t.duration());this.v.setAttribute("data-current-time",i),this.tooltip.innerHTML=i},s.handleLanguagechange=function(){this.It.innerHTML=this.localize("Progress")},i}(i);i.registerComponent("TooltipProgressBar",gh);var yh=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(oe(le(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}fe(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.v),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.v),this.tooltipProgressBar.v.style.width=this.bar.v.style.width;var i=C(vh(this.player().el(),"width")),s=C(vh(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.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();t.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),t.setAttribute("aria-valuetext",oh(i,this.t.duration()))},s.getPercent=function(){var t=this.t.currentTime()/this.t.duration();return t>=1?1:t},s.handleMouseDown=function(i){this.t.scrubbing(!0),this.videoWasPlaying=!this.t.paused(),this.t.pause(),t.prototype.handleMouseDown.call(this,i)},s.handleMouseMove=function(t){var i=this.calculateDistance(t)*this.t.duration();i===this.t.duration()&&(i-=.1),this.t.currentTime(i)},s.handleMouseUp=function(i){t.prototype.handleMouseUp.call(this,i),this.t.scrubbing(!1),this.videoWasPlaying&&this.t.play()},s.stepForward=function(){this.t.currentTime(this.t.currentTime()+5)},s.stepBack=function(){this.t.currentTime(this.t.currentTime()-5)},i}(fh);yh.prototype.h={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},yh.prototype.playerEvent="timeupdate",i.registerComponent("SeekBar",yh);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=Ki("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)}}(oe(le(e),e.handleMouseMove),25))})),e}fe(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.t.duration(),s=this.calculateDistance(t)*i,e=t.pageX-vs(this.el().parentNode).left;this.update(s,e)},s.update=function(t,i){var s=oh(t,this.t.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",s),this.keepTooltipsInside){var e=i-this.Dt(i)+1,n=C(vh(this.tooltip,"width"))/2;this.tooltip.innerHTML=s,this.tooltip.style.right="-"+(n-e)+"px"}},s.calculateDistance=function(t){return ps(this.el().parentNode,t).x},s.Dt=function(t){if(!this.keepTooltipsInside)return t;var i=C(vh(this.player().el(),"width")),s=C(vh(this.tooltip,"width"))/2,e=t;return t<s?e=_.ceil(s):t>i-s&&(e=_.floor(i-s)),e},i}(i);i.registerComponent("MouseTimeDisplay",bh);var kh=function(t){function i(){return t.apply(this,arguments)||this}return fe(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(i);kh.prototype.h={children:["seekBar"]},i.registerComponent("ProgressControl",kh);var wh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"fullscreenchange",e.handleFullscreenChange),e}fe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},s.handleFullscreenChange=function(t){this.t.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},s.handleClick=function(t){this.t.isFullscreen()?this.t.exitFullscreen():this.t.requestFullscreen()},i}(eh);wh.prototype.St="Fullscreen",i.registerComponent("FullscreenToggle",wh);var _h=function(t){function i(){return t.apply(this,arguments)||this}return fe(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}(i);i.registerComponent("VolumeLevel",_h);var xh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.updateARIAAttributes),i.ready(oe(le(e),e.updateARIAAttributes)),e}fe(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.t.volume(this.calculateDistance(t))},s.checkMuted=function(){this.t.muted()&&this.t.muted(!1)},s.getPercent=function(){return this.t.muted()?0:this.t.volume()},s.stepForward=function(){this.checkMuted(),this.t.volume(this.t.volume()+.1)},s.stepBack=function(){this.checkMuted(),this.t.volume(this.t.volume()-.1)},s.updateARIAAttributes=function(t){var i=(100*this.t.volume()).toFixed(2);this.v.setAttribute("aria-valuenow",i),this.v.setAttribute("aria-valuetext",i+"%")},i}(fh);xh.prototype.h={children:["volumeLevel"],barName:"volumeLevel"},xh.prototype.playerEvent="volumechange",i.registerComponent("VolumeBar",xh);var Ch=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,i.H&&!1===i.H.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",(function(){!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),e}return fe(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(i);Ch.prototype.h={children:["volumeBar"]},i.registerComponent("VolumeControl",Ch);var Sh=function(t){function i(){return t.apply(this,arguments)||this}fe(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",oe(this,(function(){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=Ki(i,{className:"vjs-menu-content"});var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.appendChild(this.S),Ys(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},i}(i);i.registerComponent("Popup",Sh);var jh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e}fe(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.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},i}(Jr);i.registerComponent("PopupButton",jh);var Th=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.update),i.H&&!1===i.H.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",(function(){this.update(),!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),e}fe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.t.muted(!this.t.muted())},s.update=function(t){var i=this.t.volume(),s=3;this.t.muted()?s=0:i<.33?s=1:i<.67&&(s=2);var e=this.t.muted()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e);for(var n=0;n<4;n++)as(this.v,"vjs-vol-"+n);os(this.v,"vjs-vol-"+s)},i}(eh);Th.prototype.St="Mute",i.registerComponent("MuteToggle",Th);var Mh=function(t){function i(i,s){var e;function n(){i.H&&!1===i.H.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(le(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}fe(i,t);var s=i.prototype;return s.buildCSSClass=function(){var i="";return i=this.h.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 Sh(this.t,{contentElType:"div"}),i=new xh(this.t,this.h.volumeBar);return t.addChild(i),this.menuContent=t,this.volumeBar=i,this.attachVolumeBarEvents(),t},s.handleClick=function(i){Th.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},s.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],oe(this,this.handleMouseDown))},s.handleMouseDown=function(t){this.on(["mousemove","touchmove"],oe(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.v.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},s.handleMouseUp=function(t){this.off(["mousemove","touchmove"],oe(this.volumeBar,this.volumeBar.handleMouseMove))},i}(jh);Mh.prototype.volumeUpdate=Th.prototype.update,Mh.prototype.St="Mute",i.registerComponent("VolumeMenuButton",Mh);var Ah=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).$t=-1,e.on("keydown",e.handleKeyPress),e}fe(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",oe(this,(function(t){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=Ki(i,{className:"vjs-menu-content"}),this.S.setAttribute("role","menu");var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.setAttribute("role","presentation"),s.appendChild(this.S),Ys(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.$t&&(t=this.$t+1),this.focus(t)},s.stepBack=function(){var t=0;void 0!==this.$t&&(t=this.$t-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.$t=t,i[t].v.focus())},i}(i);i.registerComponent("Menu",Ah);var Ph=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.v.setAttribute("aria-haspopup","true"),e.v.setAttribute("role","menuitem"),e.on("keydown",e.handleSubmenuKeyPress),e}fe(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.Ot=!1,this.v.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.Vt?this.hide():this.show()},s.createMenu=function(){var t=new Ah(this.t);if(this.Vt=0,this.h.title){var i=Ki("li",{className:"vjs-menu-title",innerHTML:ae(this.h.title),tabIndex:-1});this.Vt+=1,t.m.unshift(i),ts(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.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",oe(this,(function(t){this.unpressButton(),this.v.blur()}))),this.Ot?this.unpressButton():this.pressButton()},s.handleKeyPress=function(i){27===i.which||9===i.which?(this.Ot&&this.unpressButton(),9!==i.which&&i.preventDefault()):38===i.which||40===i.which?this.Ot||(this.pressButton(),i.preventDefault()):t.prototype.handleKeyPress.call(this,i)},s.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.Ot&&this.unpressButton(),9!==t.which&&t.preventDefault())},s.pressButton=function(){this.Rt&&(this.Ot=!0,this.menu.lockShowing(),this.v.setAttribute("aria-expanded","true"),this.menu.focus())},s.unpressButton=function(){this.Rt&&(this.Ot=!1,this.menu.unlockShowing(),this.v.setAttribute("aria-expanded","false"),this.v.focus())},s.disable=function(){return this.Ot=!1,this.menu.unlockShowing(),this.v.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}(Jr);i.registerComponent("MenuButton",Ph);var Eh=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 le(e);var r=oe(le(e),e.update);return n.addEventListener("removetrack",r),n.addEventListener("addtrack",r),e.t.on("dispose",(function(){n.removeEventListener("removetrack",r),n.removeEventListener("addtrack",r)})),e}return fe(i,t),i}(Ph);i.registerComponent("TrackButton",Eh);var Nh=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.v.setAttribute("role","menuitemcheckbox"):e.v.setAttribute("role","menuitem"),e}fe(i,t);var s=i.prototype;return s.createEl=function(i,s,e){this.nonIconControl=!0;var n=t.prototype.createEl.call(this,"li",Ri({className:"vjs-menu-item",tabIndex:-1},s),e);return this.Ut=Pi.createTextNode(this.localize(this.h.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.v.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.v.setAttribute("aria-checked","false"),this.controlText("")))},s.handleLanguagechange=function(){t.prototype.handleLanguagechange.call(this),this.Ut.innerHTML=this.localize(this.h.label)},i}(Jr);i.registerComponent("MenuItem",Nh);var Bh=function(i){function s(s,e){var n,r,h=e.track,o=s.textTracks();if(e.label=h.label||h.language||"Unknown",e.selected=h.default||"showing"===h.mode,(n=i.call(this,s,e)||this).track=h,o){var a=oe(le(n),n.handleTracksChange);s.on(["loadstart","texttrackchange"],a),o.addEventListener("change",a),n.on("dispose",(function(){o.removeEventListener("change",a)}))}o&&void 0===o.onchange&&n.on(["tap","click"],(function(){if("object"!=typeof t.Event)try{r=new t.Event("change")}catch(t){}r||(r=Pi.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(r)}));return n}fe(s,i);var e=s.prototype;return e.handleClick=function(t){var s=this.track.kind,e=this.t.textTracks();if(i.prototype.handleClick.call(this,t),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"))}},e.handleTracksChange=function(t){this.selected("showing"===this.track.mode)},s}(Nh);i.registerComponent("TextTrackMenuItem",Bh);var Ih=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 fe(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}(Bh);i.registerComponent("OffTextTrackMenuItem",Ih);var Fh=function(t){function i(i,s){return void 0===s&&(s={}),s.tracks=i.textTracks(),t.call(this,i,s)||this}return fe(i,t),i.prototype.createItems=function(t){void 0===t&&(t=[]),t.push(new Ih(this.t,{kind:this.zt})),this.Vt+=1;var i=this.t.textTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];e.kind===this.zt&&t.push(new Bh(this.t,{track:e,selectable:!0}))}return t},i}(Eh);i.registerComponent("TextTrackButton",Fh);var Dh=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",oe(le(e),e.update)),e}fe(i,t);var s=i.prototype;return s.handleClick=function(i){t.prototype.handleClick.call(this),this.t.currentTime(this.cue.startTime),this.update(this.cue.startTime)},s.update=function(t){var i=this.cue,s=this.t.currentTime();this.selected(i.startTime<=s&&s<i.endTime)},i}(Nh);i.registerComponent("ChaptersTrackMenuItem",Dh);var $h=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Chapters Menu"),n}fe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},s.update=function(i){this.Lt&&(!i||"addtrack"!==i.type&&"removetrack"!==i.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},s.setTrack=function(t){if(this.Lt!==t){if(this.Ht||(this.Ht=this.update.bind(this)),this.Lt){var i=this.t.remoteTextTrackEls().Y(this.Lt);i&&i.removeEventListener("load",this.Ht),this.Lt=null}if(this.Lt=t,this.Lt){this.Lt.mode="hidden";var s=this.t.remoteTextTrackEls().Y(this.Lt);s&&s.addEventListener("load",this.Ht)}}},s.findChaptersTrack=function(){for(var t=this.t.textTracks()||[],i=t.length-1;i>=0;i--){var s=t[i];if(s.kind===this.zt)return s}},s.getMenuCaption=function(){return this.Lt&&this.Lt.label?this.Lt.label:this.localize(ae(this.zt))},s.createMenu=function(){return this.h.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},s.createItems=function(){var t=[];if(!this.Lt)return t;var i=this.Lt.cues;if(!i)return t;for(var s=0,e=i.length;s<e;s++){var n=i[s],r=new Dh(this.t,{track:this.Lt,cue:n});t.push(r)}return t},i}(Fh);$h.prototype.zt="chapters",$h.prototype.St="Chapters",i.registerComponent("ChaptersButton",$h);var Rh=function(t){function i(i,s,e){var n;(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Descriptions Menu");var r=i.textTracks();if(r){var h=oe(le(n),n.handleTracksChange);r.addEventListener("change",h),n.on("dispose",(function(){r.removeEventListener("change",h)}))}return n}fe(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.zt&&"showing"===r.mode){s=!0;break}}s?this.disable():this.enable()},s.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},i}(Fh);Rh.prototype.zt="descriptions",Rh.prototype.St="Descriptions",i.registerComponent("DescriptionsButton",Rh);var Oh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Subtitles Menu"),n}return fe(i,t),i.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},i}(Fh);Oh.prototype.zt="subtitles",Oh.prototype.St="Subtitles",i.registerComponent("SubtitlesButton",Oh);var Vh=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 fe(i,t),i.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").v.focus()},i}(Bh);i.registerComponent("CaptionSettingsMenuItem",Vh);var Uh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Captions Menu"),n}fe(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().H&&this.player().H.featuresNativeTextTracks||(i.push(new Vh(this.t,{kind:this.zt})),this.Vt+=1),t.prototype.createItems.call(this,i)},i}(Fh);Uh.prototype.zt="captions",Uh.prototype.St="Captions",i.registerComponent("CaptionsButton",Uh);var zh=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=oe(le(e),e.handleTracksChange);r.addEventListener("change",h),e.on("dispose",(function(){r.removeEventListener("change",h)}))}return e}fe(i,t);var s=i.prototype;return s.handleClick=function(i){var s=this.t.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}(Nh);i.registerComponent("AudioTrackMenuItem",zh);var Lh=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).v.setAttribute("aria-label","Audio Menu"),e}fe(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.t.audioTracks&&this.t.audioTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];t.push(new zh(this.t,{track:e,selectable:!0}))}return t},i}(Eh);Lh.prototype.St="Audio Track",i.registerComponent("AudioTrackButton",Lh);var Hh=function(t){function i(i,s){var e,n=s.rate,r=C(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}fe(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}(Nh);Hh.prototype.contentElType="button",i.registerComponent("PlaybackRateMenuItem",Hh);var qh=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}fe(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this);return this.Ut=Ki("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 Ah(this.player()),i=this.playbackRates();if(i)for(var s=i.length-1;s>=0;s--)t.addChild(new Hh(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.h.playbackRates||this.h.playerOptions&&this.h.playerOptions.playbackRates},s.playbackRateSupported=function(){return this.player().H&&this.player().H.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}(Ph);qh.prototype.St="Playback Rate",i.registerComponent("PlaybackRateMenuButton",qh);var Wh=function(t){function i(){return t.apply(this,arguments)||this}fe(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}(i);i.registerComponent("Spacer",Wh);var Gh=function(t){function i(){return t.apply(this,arguments)||this}fe(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);i.registerComponent("CustomControlSpacer",Gh);var Xh=function(t){function i(){return t.apply(this,arguments)||this}return fe(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(i);Xh.prototype.h={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},i.registerComponent("ControlBar",Xh);var Jh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"error",e.open),e}fe(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}(Ee);Jh.prototype.h=ue(Ee.prototype.h,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),i.registerComponent("ErrorDisplay",Jh);var Qh="vjs-text-track-settings",Yh=["#000","Black"],Kh=["#00F","Blue"],Zh=["#0FF","Cyan"],to=["#0F0","Green"],io=["#F0F","Magenta"],so=["#F00","Red"],eo=["#FFF","White"],no=["#FF0","Yellow"],ro=["1","Opaque"],ho=["0.5","Semi-Transparent"],oo=["0","Transparent"],ao={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Yh,eo,so,to,Kh,no,io,Zh]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[ro,ho,oo]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[eo,Yh,so,to,Kh,no,io,Zh]},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:[ro,ho]},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:[oo,ho,ro]}};function uo(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}ao.windowColor.options=ao.backgroundColor.options;var co,lo=function(i){function s(t,s){var e;return(e=i.call(this,t,s)||this).setDefaults(),e.hide(),e.updateDisplay=oe(le(e),e.updateDisplay),void 0===s.persistTextTrackSettings&&(e.h.persistTextTrackSettings=e.h.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()})),$i(ao,(function(t){e.on(e.$(t.selector),"change",e.updateDisplay)})),e.h.persistTextTrackSettings&&e.restoreSettings(),e}fe(s,i);var e=s.prototype;return e.qt=function(t){var i=this,s=ao[t],e=s.id.replace("%s",this.o);return[Ki("label",{className:"vjs-label",textContent:s.label},{for:e}),Ki("select",{id:e},void 0,s.options.map((function(t){return Ki("option",{textContent:i.localize(t[1]),value:t[0]})})))]},e.Wt=function(){var t=Ki("legend",{textContent:this.localize("Text")}),i=this.qt("color"),s=Ki("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.qt("textOpacity"));return Ki("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,s))},e.Gt=function(){var t=Ki("legend",{textContent:this.localize("Background")}),i=this.qt("backgroundColor"),s=Ki("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.qt("backgroundOpacity"));return Ki("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,s))},e.Xt=function(){var t=Ki("legend",{textContent:this.localize("Window")}),i=this.qt("windowColor"),s=Ki("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.qt("windowOpacity"));return Ki("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,s))},e.Jt=function(){return Ki("div",{className:"vjs-tracksettings-colors"},void 0,[this.Wt(),this.Gt(),this.Xt()])},e.Qt=function(){var t=Ki("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.qt("fontPercent")),i=Ki("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.qt("edgeStyle")),s=Ki("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.qt("fontFamily"));return Ki("div",{className:"vjs-tracksettings-font"},void 0,[t,i,s])},e.Yt=function(){var t=Ki("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=Ki("button",{className:"vjs-done-button",textContent:"Done"});return Ki("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},e.createEl=function(){var t=Ki("div",{className:"vjs-tracksettings"},void 0,[this.Jt(),this.Qt(),this.Yt()]),i=Ki("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.o,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),s=Ki("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.o,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),e=Ki("div",void 0,{role:"document"},[i,s,t]);return Ki("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":i.id,"aria-describedby":s.id},e)},e.getValues=function(){var t=this;return function(t,i,s){return void 0===s&&(s=0),Di(t).reduce((function(s,e){return i(s,t[e],e)}),s)}(ao,(function(i,s,e){var n=function(t,i){return uo(t.options[t.options.selectedIndex].value,i)}(t.$(s.selector),s.parser);return void 0!==n&&(i[e]=n),i}),{})},e.setValues=function(t){var i=this;$i(ao,(function(s,e){!function(t,i,s){if(i)for(var e=0;e<t.options.length;e++)if(uo(t.options[e].value,s)===i){t.selectedIndex=e;break}}(i.$(s.selector),t[e],s.parser)}))},e.setDefaults=function(){var t=this;$i(ao,(function(i){var s=i.hasOwnProperty("default")?i.default:0;t.$(i.selector).selectedIndex=s}))},e.restoreSettings=function(){var i;try{i=JSON.parse(t.localStorage.getItem(Qh))}catch(t){zi.warn(t)}i&&this.setValues(i)},e.saveSettings=function(){if(this.h.persistTextTrackSettings){var i=this.getValues();try{w.keys(i).length?t.localStorage.setItem(Qh,JSON.stringify(i)):t.localStorage.removeItem(Qh)}catch(t){zi.warn(t)}}},e.updateDisplay=function(){var t=this.t.getChild("textTrackDisplay");t&&t.updateDisplay()},s}(i);i.registerComponent("TextTrackSettings",lo);var fo,vo=function(i){function s(t,s){var e;e=i.call(this,t,s)||this;var n=t.source,r=!1;if(n&&(e.v.currentSrc!==n.src||t.tag&&3===t.tag.Kt)?e.setSource(n):e.Zt(e.v),e.v.hasChildNodes()){for(var h=e.v.childNodes,o=h.length,a=[];o--;){var u=h[o];"track"===u.nodeName.toLowerCase()&&(e.featuresNativeTextTracks?(e.remoteTextTrackEls().J(u),e.remoteTextTracks().tt(u.track),r||e.v.hasAttribute("crossorigin")||!Oe(u.src)||(r=!0)):a.push(u))}for(var c=0;c<a.length;c++)e.v.removeChild(a[c])}return["audio","video"].forEach((function(t){var i=e.el()[t+"Tracks"],s=e[t+"Tracks"](),n=ae(t);e["featuresNative"+n+"Tracks"]&&i&&i.addEventListener&&(e["handle"+n+"ti"]=function(t){s.trigger({type:"change",target:s,currentTarget:s,srcElement:s})},e["handle"+n+"ii"]=function(t){return s.addTrack(t.track)},e["handle"+n+"si"]=function(t){return s.removeTrack(t.track)},i.addEventListener("change",e["handle"+n+"ti"]),i.addEventListener("addtrack",e["handle"+n+"ii"]),i.addEventListener("removetrack",e["handle"+n+"si"]),e["removeOld"+n+"ei"]=function(t){return e.ni(s,i)},e.on("loadstart",e["removeOld"+n+"ei"]))})),e.featuresNativeTextTracks&&(r&&zi.warn(Wi(co||(co=Ei(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."])))),e.ri=oe(le(e),e.handleTextTrackChange),e.hi=oe(le(e),e.handleTextTrackAdd),e.oi=oe(le(e),e.handleTextTrackRemove),e.ai()),e.ci(),(Ls||Ts||Is)&&!0===t.nativeControlsForTouch&&e.setControls(!0),e.di(),e.triggerReady(),e}fe(s,i);var e=s.prototype;return e.dispose=function(){var t=this;["audio","video","text"].forEach((function(i){var s=ae(i),e=t.v[i+"Tracks"];e&&e.removeEventListener&&(e.removeEventListener("change",t["handle"+s+"ti"]),e.removeEventListener("addtrack",t["handle"+s+"ii"]),e.removeEventListener("removetrack",t["handle"+s+"si"])),e&&t.off("loadstart",t["removeOld"+s+"ei"])})),s.disposeMediaElement(this.v),i.prototype.dispose.call(this)},e.ci=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)}))},e.createEl=function(){var t=this.h.tag;if(!t||!this.h.playerElIngest&&!this.movingMediaElementInDOM){if(t){var i=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(i,t),s.disposeMediaElement(t),t=i}else{t=Pi.createElement("video");var e=ue({},this.h.tag&&ls(this.h.tag));Ls&&!0===this.h.nativeControlsForTouch||delete e.controls,cs(t,Ri(e,{id:this.h.techId,class:"vjs-tech"}))}t.playerId=this.h.playerId}void 0!==this.h.preload&&ds(t,"preload",this.h.preload);for(var n=["loop","muted","playsinline","autoplay"],r=n.length-1;r>=0;r--){var h=n[r],o=this.h[h];void 0!==o&&(o?ds(t,h,h):fs(t,h),t[h]=o)}return t},e.Zt=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)}))}},e.ai=function(){var t=this.el().textTracks;if(t){for(var i=0;i<t.length;i++)this.textTracks().tt(t[i]);t.addEventListener&&(t.addEventListener("change",this.ri),t.addEventListener("addtrack",this.hi),t.addEventListener("removetrack",this.oi)),this.on("loadstart",this.fi)}},e.handleTextTrackChange=function(t){var i=this.textTracks();this.textTracks().trigger({type:"change",target:i,currentTarget:i,srcElement:i})},e.handleTextTrackAdd=function(t){this.textTracks().tt(t.track)},e.handleTextTrackRemove=function(t){this.textTracks().it(t.track)},e.ni=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.it(a)}}},e.fi=function(t){var i=this.textTracks(),s=this.el().textTracks;this.ni(i,s)},e.play=function(){var t=this.v.play();void 0!==t&&"function"==typeof t.then&&t.then(null,(function(t){}))},e.setCurrentTime=function(t){try{this.v.currentTime=t}catch(t){zi(t,"Video is not ready. (Video.js)")}},e.duration=function(){var t=this;if(this.v.duration===1/0&&Es&&$s&&0===this.v.currentTime){return this.on("timeupdate",(function i(){t.v.currentTime>0&&(t.v.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",i))})),NaN}return this.v.duration||NaN},e.width=function(){return this.v.offsetWidth},e.height=function(){return this.v.offsetHeight},e.di=function(){var t=this;if("webkitDisplayingFullscreen"in this.v){var i=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},s=function(){"webkitPresentationMode"in this.v&&"picture-in-picture"!==this.v.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)}))}},e.supportsFullScreen=function(){if("function"==typeof this.v.webkitEnterFullScreen){var i=t.navigator&&t.navigator.userAgent||"";if(/Android/.test(i)||!/Chrome|Mac OS X 10.5/.test(i))return!0}return!1},e.enterFullScreen=function(){var t=this.v;t.paused&&t.networkState<=t.HAVE_METADATA?(this.v.play(),this.setTimeout((function(){t.pause(),t.webkitEnterFullScreen()}),0)):t.webkitEnterFullScreen()},e.exitFullScreen=function(){this.v.webkitExitFullScreen()},e.src=function(t){if(void 0===t)return this.v.src;this.setSrc(t)},e.reset=function(){s.resetMediaElement(this.v)},e.currentSrc=function(){return this.bt?this.bt.src:this.v.currentSrc},e.setControls=function(t){this.v.controls=!!t},e.addTextTrack=function(t,s,e){return this.featuresNativeTextTracks?this.v.addTextTrack(t,s,e):i.prototype.addTextTrack.call(this,t,s,e)},e.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return i.prototype.createRemoteTextTrack.call(this,t);var s=Pi.createElement("track");return t.kind&&(s.kind=t.kind),t.label&&(s.label=t.label),(t.language||t.srclang)&&(s.srclang=t.language||t.srclang),t.default&&(s.default=t.default),t.id&&(s.id=t.id),t.src&&(s.src=t.src),s},e.addRemoteTextTrack=function(t,s){var e=i.prototype.addRemoteTextTrack.call(this,t,s);return this.featuresNativeTextTracks&&this.el().appendChild(e),e},e.removeRemoteTextTrack=function(t){if(i.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var s=this.$$("track"),e=s.length;e--;)t!==s[e]&&t!==s[e].track||this.el().removeChild(s[e])},e.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var i={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(i.droppedVideoFrames=this.el().webkitDroppedFrameCount,i.totalVideoFrames=this.el().webkitDecodedFrameCount),t.performance&&"function"==typeof t.performance.now?i.creationTime=t.performance.now():t.performance&&t.performance.timing&&"number"==typeof t.performance.timing.navigationStart&&(i.creationTime=t.Date.now()-t.performance.timing.navigationStart),i},s}(Gr);Ji()&&(vo.TEST_VID=Pi.createElement("video"),(fo=Pi.createElement("track")).kind="captions",fo.srclang="en",fo.label="English",vo.TEST_VID.appendChild(fo)),vo.isSupported=function(){try{vo.TEST_VID.volume=.5}catch(t){return!1}return!(!vo.TEST_VID||!vo.TEST_VID.canPlayType)},vo.canControlVolume=function(){try{var t=vo.TEST_VID.volume;return vo.TEST_VID.volume=t/2+.1,t!==vo.TEST_VID.volume}catch(t){return!1}},vo.canControlPlaybackRate=function(){if(Es&&$s&&Rs<58)return!1;try{var t=vo.TEST_VID.playbackRate;return vo.TEST_VID.playbackRate=t/2+.1,t!==vo.TEST_VID.playbackRate}catch(t){return!1}},vo.supportsNativeTextTracks=function(){return zs},vo.supportsNativeVideoTracks=function(){return!(!vo.TEST_VID||!vo.TEST_VID.videoTracks)},vo.supportsNativeAudioTracks=function(){return!(!vo.TEST_VID||!vo.TEST_VID.audioTracks)},vo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],vo.prototype.featuresVolumeControl=vo.canControlVolume(),vo.prototype.featuresPlaybackRate=vo.canControlPlaybackRate(),vo.prototype.movingMediaElementInDOM=!As,vo.prototype.featuresFullscreenResize=!0,vo.prototype.featuresProgressEvents=!0,vo.prototype.featuresTimeupdateEvents=!0,vo.prototype.featuresNativeTextTracks=vo.supportsNativeTextTracks(),vo.prototype.featuresNativeVideoTracks=vo.supportsNativeVideoTracks(),vo.prototype.featuresNativeAudioTracks=vo.supportsNativeAudioTracks();var po=vo.TEST_VID&&vo.TEST_VID.constructor.prototype.canPlayType,mo=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,go=/^video\/mp4/i;vo.patchCanPlayType=function(){Ns>=4&&!Fs?vo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&mo.test(t)?"maybe":po.call(this,t)}:Bs&&(vo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&go.test(t)?"maybe":po.call(this,t)})},vo.unpatchCanPlayType=function(){var t=vo.TEST_VID.constructor.prototype.canPlayType;return vo.TEST_VID.constructor.prototype.canPlayType=po,t},vo.patchCanPlayType(),vo.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){}}()}}},vo.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){vo.prototype[t]=function(){return this.v[t]||this.v.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){vo.prototype["set"+ae(t)]=function(i){this.v[t]=i,i?this.v.setAttribute(t,t):this.v.removeAttribute(t)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(t){vo.prototype[t]=function(){return this.v[t]}})),["volume","src","poster","preload","playbackRate"].forEach((function(t){vo.prototype["set"+ae(t)]=function(i){this.v[t]=i}})),["pause","load"].forEach((function(t){vo.prototype[t]=function(){return this.v[t]()}})),Gr.withSourceHandlers(vo),vo.nativeSourceHandler={},vo.nativeSourceHandler.canPlayType=function(t){try{return vo.TEST_VID.canPlayType(t)}catch(t){return""}},vo.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return vo.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 vo.nativeSourceHandler.canPlayType("video/"+s)}return""},vo.nativeSourceHandler.handleSource=function(t,i,s){i.setSrc(t.src)},vo.nativeSourceHandler.dispose=function(){},vo.registerSourceHandler(vo.nativeSourceHandler),i.registerComponent("Html5",vo),Gr.registerTech("Html5",vo);var yo=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],bo=function(s){function e(t,i,n){var r;if(t.id=t.id||["vjs_video",Bi()].join("_"),(i=Ri(e.getTagSettings(t),i)).initChildren=!1,i.createEl=!1,i.reportTouchActivity=!1,!i.language)if("function"==typeof t.closest){var h=t.closest("[lang]");h&&(i.language=h.getAttribute("lang"))}else for(var o=t;o&&1===o.nodeType;){if(ls(o).hasOwnProperty("lang")){i.language=o.getAttribute("lang");break}o=o.parentNode}if(!(r=s.call(this,null,i,n)||this).h||!r.h.techOrder||!r.h.techOrder.length)throw new g("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(r.tag=t,r.tagAttributes=t&&ls(t),r.language(r.h.language),i.languages){var a={};w.getOwnPropertyNames(i.languages).forEach((function(t){a[t.toLowerCase()]=i.languages[t]})),r.vi=a}else r.vi=e.prototype.h.languages;r.pi={},r.mi=i.poster||"",r.gi=!!i.controls,t.controls=!1,r.yi=!1,r.v=r.createEl();var u=ue(r.h);if(i.plugins){var c=i.plugins;w.getOwnPropertyNames(c).forEach((function(t){"function"==typeof this[t]?this[t](c[t]):zi.error("Unable to find plugin:",t)}),le(r))}r.h.playerOptions=u,r.initChildren(),r.isAudio("audio"===t.nodeName.toLowerCase()),r.controls()?r.addClass("vjs-controls-enabled"):r.addClass("vjs-controls-disabled"),r.v.setAttribute("role","region"),r.isAudio()?r.v.setAttribute("aria-label","audio player"):r.v.setAttribute("aria-label","video player"),r.isAudio()&&r.addClass("vjs-audio"),r.bi()&&r.addClass("vjs-no-flex"),As||r.addClass("vjs-workinghover"),e.players[r.o]=le(r);var l="5.20.6-opentelly.14".split(".")[0];return r.addClass("vjs-v"+l),r.userActive(!0),r.reportUserActivity(),r.ki(),r.on("fullscreenchange",r.wi),r.on("stageclick",r._i),r}fe(e,s);var n=e.prototype;return n.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.xi&&this.xi.parentNode&&this.xi.parentNode.removeChild(this.xi),e.players[this.o]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.v&&this.v.player&&(this.v.player=null),this.H&&this.H.dispose(),s.prototype.dispose.call(this)},n.createEl=function(){var i,e=this.tag,n=this.Ci=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player");i=this.v=n?e.parentNode:s.prototype.createEl.call(this,"div"),e.setAttribute("tabindex","-1"),e.removeAttribute("width"),e.removeAttribute("height");var r=ls(e);if(w.getOwnPropertyNames(r).forEach((function(t){"class"===t?i.className+=" "+r[t]:i.setAttribute(t,r[t])})),e.playerId=e.id,e.id+="Si",e.className="vjs-tech",e.player=i.player=this,this.addClass("vjs-paused"),!0!==t.VIDEOJS_NO_DYNAMIC_STYLE){this.xi=re("vjs-styles-dimensions");var h=ws(".vjs-styles-defaults"),o=ws("head");o.insertBefore(this.xi,h?h.nextSibling:o.firstChild)}this.width(this.h.width),this.height(this.h.height),this.fluid(this.h.fluid),this.aspectRatio(this.h.aspectRatio);for(var a=e.getElementsByTagName("a"),u=0;u<a.length;u++){var c=a.item(u);os(c,"vjs-hidden"),c.setAttribute("hidden","hidden")}return e.Kt=e.networkState,e.parentNode&&!n&&e.parentNode.insertBefore(i,e),ts(e,i),this.m.unshift(e),this.v=i,i},n.width=function(t){return this.dimension("width",t)},n.height=function(t){return this.dimension("height",t)},n.dimension=function(t,i){var s="width"===t?"ji":"Ti";if(void 0===i)return this[s]||0;if(""===i)this[s]=void 0;else{var e=C(i);if(S(e))return zi.error('Improper value "'+i+'" supplied for for '+t),this;this[s]=e}return this.Mi(),this},n.fluid=function(t){if(void 0===t)return!!this.Ai;this.Ai=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.Mi()},n.aspectRatio=function(t){if(void 0===t)return this.Pi;if(!/^\d+\:\d+$/.test(t))throw new g("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.Pi=t,this.fluid(!0),this.Mi()},n.Mi=function(){if(!0!==t.VIDEOJS_NO_DYNAMIC_STYLE){var i,s,e,n=(void 0!==this.Pi&&"auto"!==this.Pi?this.Pi:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),r=n[1]/n[0];i=void 0!==this.ji?this.ji:void 0!==this.Ti?this.Ti/r:this.videoWidth()||300,s=void 0!==this.Ti?this.Ti:i*r,e=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(e),he(this.xi,"\n ."+e+" {\n width: "+i+"px;\n height: "+s+"px;\n }\n\n ."+e+".vjs-fluid {\n padding-top: "+100*r+"%;\n }\n ")}else{var h="number"==typeof this.ji?this.ji:this.h.width,o="number"==typeof this.Ti?this.Ti:this.h.height,a=this.H&&this.H.el();a&&(h>=0&&(a.width=h),o>=0&&(a.height=o))}},n._t=function(t,s){var e=this;this.H&&this.Ei(),"Html5"!==t&&this.tag&&(Gr.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Ni=t,this.j=!1;var n=Ri({source:s,nativeControlsForTouch:this.h.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Bi",videoTracks:this.rt,textTracks:this.nt,audioTracks:this.ht,autoplay:this.h.autoplay,playsinline:this.h.playsinline,preload:this.h.preload,loop:this.h.loop,muted:this.h.muted,poster:this.poster(),language:this.language(),playerElIngest:this.Ci||!1,"vtt.js":this.h["vtt.js"]},this.h[t.toLowerCase()]);this.tag&&(n.tag=this.tag),s&&(this.Ii=s.type,s.src===this.pi.src&&this.pi.currentTime>0&&(n.startTime=this.pi.currentTime),this.pi.sources=null,this.pi.source=s,this.pi.src=s.src);var r=Gr.getTech(t);r||(r=i.getComponent(t)),this.H=new r(n),this.H.ready(oe(this,this.Fi),!0),Ae(this.Di||[],this.H),yo.forEach((function(t){e.on(e.H,t,e["handleTech"+ae(t)+"_"])})),this.on(this.H,"loadstart",this.$i),this.on(this.H,"waiting",this.Ri),this.on(this.H,"canplay",this.Oi),this.on(this.H,"canplaythrough",this.Vi),this.on(this.H,"playing",this.Ui),this.on(this.H,"ended",this.zi),this.on(this.H,"seeking",this.Li),this.on(this.H,"seeked",this.Hi),this.on(this.H,"play",this.qi),this.on(this.H,"firstplay",this.Wi),this.on(this.H,"pause",this.Gi),this.on(this.H,"durationchange",this.Xi),this.on(this.H,"fullscreenchange",this.Ji),this.on(this.H,"error",this.Qi),this.on(this.H,"loadedmetadata",this.Mi),this.on(this.H,"resize",this.Mi),this.on(this.H,"posterchange",this.Yi),this.on(this.H,"textdata",this.Ki),this.usingNativeControls(this.Zi("controls")),this.controls()&&!this.usingNativeControls()&&this.ts(),this.H.el().parentNode===this.contentEl()||"Html5"===t&&this.tag||ts(this.H.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},n.Ei=function(){this.rt=this.videoTracks(),this.nt=this.textTracks(),this.ht=this.audioTracks(),this.Di=Me(this.H),this.j=!1,this.H.dispose(),this.H=!1},n.tech=function(i){if(i&&i.IWillNotUseThisInPlugins)return this.H;var s="\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 t.alert(s),new g(s)},n.ts=function(){this.ss(),this.on(this.H,"mousedown",this.es),this.on(this.H,"touchstart",this.ns),this.on(this.H,"touchmove",this.rs),this.on(this.H,"touchend",this.hs),this.on(this.H,"tap",this.os)},n.ss=function(){this.off(this.H,"tap",this.os),this.off(this.H,"touchstart",this.ns),this.off(this.H,"touchmove",this.rs),this.off(this.H,"touchend",this.hs),this.off(this.H,"mousedown",this.es)},n.Fi=function(){if(this.triggerReady(),this.pi.volume&&this.us("setVolume",this.pi.volume),this.Yi(),this.Xi(),(this.src()||this.currentSrc())&&this.tag&&this.h.autoplay&&this.paused()){try{delete this.tag.poster}catch(t){zi("deleting tag.poster throws in some browsers",t)}this.play()}},n.$i=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"))},n.hasStarted=function(t){return void 0!==t?(this.et!==t&&(this.et=t,t?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.et},n.qi=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},n.Ri=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return t.removeClass("vjs-waiting")}))},n.Oi=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},n.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},n.Ui=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},n.Li=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},n.Hi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},n.Wi=function(){this.h.starttime&&(zi.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.h.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},n.Gi=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},n.zi=function(){this.addClass("vjs-ended"),this.h.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},n.Xi=function(){this.duration(this.Zi("duration"))},n.es=function(t){0===t.button&&this.controls()&&(void 0!==this.h&&void 0!==this.h.userActions&&void 0!==this.h.userActions.click&&!1===this.h.userActions.click||(void 0!==this.h&&void 0!==this.h.userActions&&"function"==typeof this.h.userActions.click?this.h.userActions.click.call(this,t):this.paused()?this.play():this.pause()))},n.os=function(){this.userActive(!this.userActive())},n.ns=function(){this.userWasActive=this.userActive()},n.rs=function(){this.userWasActive&&this.reportUserActivity()},n.hs=function(t){t.cancelable&&t.preventDefault()},n.wi=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n._i=function(){this.reportUserActivity()},n.Ji=function(t,i){i&&(this.toggleClass("vjs-ios-native-fs",!(!i.nativeIOSFullscreen||!i.isFullscreen)),this.isFullscreen(i.isFullscreen)),this.trigger("fullscreenchange")},n.Qi=function(){var t=this.H.error();this.error(t)},n.Ki=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},n.getCache=function(){return this.pi},n.us=function(t,i){if(this.H&&!this.H.j)this.H.ready((function(){this[t](i)}),!0);else try{this.H&&this.H[t](i)}catch(t){throw zi(t),t}},n.Zi=function(t){if(this.H&&this.H.j)try{return this.H[t]()}catch(i){throw void 0===this.H[t]?zi("Video.js: "+t+" method not defined for "+this.Ni+" playback technology.",i):"TypeError"===i.name?(zi("Video.js: "+t+" unavailable on "+this.Ni+" playback technology element.",i),this.H.j=!1):zi(i),i}},n.play=function(){return this.src()||this.currentSrc()?this.us("play"):this.H.one("loadstart",(function(){this.play()})),this},n.pause=function(){return this.us("pause"),this},n.paused=function(){return!1!==this.Zi("paused")},n.scrubbing=function(t){return void 0!==t?(this.yi=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.yi},n.currentTime=function(t){return void 0!==t?(this.us("setCurrentTime",t),this):(this.pi.currentTime=this.Zi("currentTime")||0,this.pi.currentTime)},n.duration=function(t){return void 0===t?void 0!==this.pi.duration?this.pi.duration:NaN:((t=C(t))<0&&(t=1/0),t!==this.pi.duration&&(this.pi.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},n.remainingTime=function(){return this.duration()-this.currentTime()},n.buffered=function(){var t=this.Zi("buffered");return t&&t.length||(t=me(0,0)),t},n.bufferedPercent=function(){return ge(this.buffered(),this.duration())},n.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),s=t.end(t.length-1);return s>i&&(s=i),s},n.volume=function(t){var i;return void 0!==t?(i=_.max(0,_.min(1,C(t))),this.pi.volume=i,this.us("setVolume",i),this):(i=C(this.Zi("volume")),S(i)?1:i)},n.muted=function(t){return void 0!==t?(this.us("setMuted",t),this):this.Zi("muted")||!1},n.supportsFullScreen=function(){return this.Zi("supportsFullScreen")||!1},n.isFullscreen=function(t){return void 0!==t?(this.cs=!!t,this):!!this.cs},n.requestFullscreen=function(t){var i,s=_e;return this.isFullscreen(!0),s.requestFullscreen?(Ys(Pi,s.fullscreenchange,oe(this,(function t(i){this.isFullscreen(Pi[s.fullscreenElement]),!1===this.isFullscreen()&&Ks(Pi,s.fullscreenchange,t),this.trigger("fullscreenchange")}))),s.prefixed||(i=this.h.fullscreenOptions,void 0!==t&&(i=t)),this.v[s.requestFullscreen](i)):this.H.supportsFullScreen()?this.us("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},n.exitFullscreen=function(){var t=_e;return this.isFullscreen(!1),t.requestFullscreen?Pi[t.exitFullscreen]():this.H.supportsFullScreen()?this.us("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},n.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=Pi.documentElement.style.overflow,Ys(Pi,"keydown",oe(this,this.fullWindowOnEscKey)),Pi.documentElement.style.overflow="hidden",os(Pi.body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},n.exitFullWindow=function(){this.isFullWindow=!1,Ks(Pi,"keydown",this.fullWindowOnEscKey),Pi.documentElement.style.overflow=this.docOrigOverflow,as(Pi.body,"vjs-full-window"),this.trigger("exitFullWindow")},n.canPlayType=function(t){for(var s,e=0,n=this.h.techOrder;e<n.length;e++){var r=ae(n[e]),h=Gr.getTech(r);if(h||(h=i.getComponent(r)),h){if(h.isSupported()&&(s=h.canPlayType(t)))return s}else zi.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},n.selectSource=function(t){var s,e=this,n=this.h.techOrder.map(ae).map((function(t){return[t,Gr.getTech(t)||i.getComponent(t)]})).filter((function(t){var i=t[0],s=t[1];return s?s.isSupported():(zi.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 s=t[0];if(t[1].canPlaySource(i,e.h[s.toLowerCase()]))return{source:i,tech:s}};return(this.h.sourceOrder?r(t,n,(s=h,function(t,i){return s(i,t)})):r(n,t,h))||!1},n.src=function(t){if(void 0===t)return this.Zi("src");var s=Gr.getTech(this.Ni);return s||(s=i.getComponent(this.Ni)),Array.isArray(t)?this.ls(t):"string"==typeof t?this.src({src:t}):t instanceof w&&(t.type&&!s.canPlaySource(t,this.h[this.Ni.toLowerCase()])?this.ls([t]):(this.pi.sources=null,this.pi.source=t,this.pi.src=t.src,this.Ii=t.type||"",this.ready((function(){s.prototype.hasOwnProperty("setSource")?this.us("setSource",t):this.us("src",t.src),"auto"===this.h.preload&&this.load(),this.h.autoplay&&this.play()}),!0))),this},n.ls=function(t){var i=this.selectSource(t);i?(i.tech===this.Ni?this.src(i.source):this._t(i.tech,i.source),this.pi.sources=t):(this.setTimeout((function(){this.error({code:4,message:this.localize(this.h.notSupportedMessage)})}),0),this.triggerReady())},n.load=function(){return this.us("load"),this},n.reset=function(){return this._t(ae(this.h.techOrder[0]),null),this.us("reset"),this},n.currentSources=function(){var t=this.currentSource(),i=[];return 0!==w.keys(t).length&&i.push(t),this.pi.sources||i},n.currentSource=function(){var t={},i=this.currentSrc();return i&&(t.src=i),this.pi.source||t},n.currentSrc=function(){return this.Zi("currentSrc")||this.pi.src||""},n.currentType=function(){return this.Ii||""},n.preload=function(t){return void 0!==t?(this.us("setPreload",t),this.h.preload=t,this):this.Zi("preload")},n.autoplay=function(t){return void 0!==t?(this.us("setAutoplay",t),this.h.autoplay=t,this):this.Zi("autoplay",t)},n.playsinline=function(t){return void 0!==t?(this.us("setPlaysinline",t),this.h.playsinline=t,this):this.Zi("playsinline")},n.loop=function(t){return void 0!==t?(this.us("setLoop",t),this.h.loop=t,this):this.Zi("loop")},n.poster=function(t){return void 0===t?this.mi:(t||(t=""),this.mi=t,this.us("setPoster",t),this.trigger("posterchange"),this)},n.Yi=function(){!this.mi&&this.H&&this.H.poster&&(this.mi=this.H.poster()||"",this.trigger("posterchange"))},n.controls=function(t){return void 0!==t?(t=!!t,this.gi!==t&&(this.gi=t,this.usingNativeControls()&&this.us("setControls",t),t?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.ts()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.ss())),this):!!this.gi},n.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},n.error=function(t){return void 0===t?this.lt||null:null===t?(this.lt=t,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close(),this):(this.lt=new Se(t),this.addClass("vjs-error"),zi.error("(CODE:"+this.lt.code+" "+Se.errorTypes[this.lt.code]+")",this.lt.message,this.lt),this.trigger("error"),this)},n.reportUserActivity=function(t){this.fs=!0},n.userActive=function(t){return void 0!==t?((t=!!t)!==this.vs&&(this.vs=t,t?(this.fs=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.fs=!1,this.H&&this.H.one("mousemove",(function(t){t.stopPropagation(),t.preventDefault()})),this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive"))),this):this.vs},n.ki=function(){var t,i,s,e,n=oe(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.fs){this.fs=!1,this.userActive(!0),this.clearTimeout(e);var t=this.h.inactivityTimeout;t>0&&(e=this.setTimeout((function(){this.fs||this.userActive(!1)}),t))}}),250)},n.playbackRate=function(t){return void 0!==t?(this.us("setPlaybackRate",t),this):this.H&&this.H.featuresPlaybackRate?this.Zi("playbackRate"):1},n.isAudio=function(t){return void 0!==t?(this.ps=!!t,this):!!this.ps},n.videoTracks=function(){return this.H?this.H.videoTracks():(this.rt=this.rt||new Lr,this.rt)},n.audioTracks=function(){return this.H?this.H.audioTracks():(this.ht=this.ht||new qr,this.ht)},n.textTracks=function(){if(this.H)return this.H.textTracks()},n.remoteTextTracks=function(){if(this.H)return this.H.remoteTextTracks()},n.remoteTextTrackEls=function(){if(this.H)return this.H.remoteTextTrackEls()},n.addTextTrack=function(t,i,s){if(this.H)return this.H.addTextTrack(t,i,s)},n.addRemoteTextTrack=function(t,i){if(this.H)return this.H.addRemoteTextTrack(t,i)},n.removeRemoteTextTrack=function(t){var i=(void 0===t?{}:t).track,s=void 0===i?arguments[0]:i;if(this.H)return this.H.removeRemoteTextTrack(s)},n.getVideoPlaybackQuality=function(){return this.Zi("getVideoPlaybackQuality")},n.videoWidth=function(){return this.H&&this.H.videoWidth&&this.H.videoWidth()||0},n.videoHeight=function(){return this.H&&this.H.videoHeight&&this.H.videoHeight()||0},n.language=function(t){return void 0===t?this.gs:(this.gs!==String(t).toLowerCase()&&(this.gs=String(t).toLowerCase(),void 0!==this.v&&this.trigger("languagechange")),this)},n.languages=function(){return ue(e.prototype.h.languages,this.vi)},n.toJSON=function(){var t=ue(this.h),i=t.tracks;t.tracks=[];for(var s=0;s<i.length;s++){var e=i[s];(e=ue(e)).player=void 0,t.tracks[s]=e}return t},n.createModal=function(t,i){var s=this;(i=i||{}).content=t||"";var e=new Ee(this,i);return this.addChild(e),e.on("dispose",(function(){s.removeChild(e)})),e.open()},e.getTagSettings=function(t){var i={sources:[],tracks:[]},s=ls(t),e=s["data-setup"];if(hs(t,"vjs-fluid")&&(s.fluid=!0),null!==e){var n=je(e||"{}"),r=n[0],h=n[1];r&&zi.error(r),Ri(s,h)}if(Ri(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(ls(c)):"track"===l&&i.tracks.push(ls(c))}return i},n.bi=function(){var t=Pi.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},e}(i);bo.players={};var ko=t.navigator;bo.prototype.h={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:ko&&(ko.languages&&ko.languages[0]||ko.userLanguage||ko.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.Zi(t)}})),yo.forEach((function(t){bo.prototype["handleTech"+ae(t)+"_"]=function(){return this.trigger(t)}})),i.registerComponent("Player",bo);var wo,_o,xo=function(t){function i(s){var e;void 0===s&&(s={});var n=ue(s,{kind:Ie[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(Os)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return w.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.W=!0,r||le(e)}return fe(i,t),i}($e),Co=function(t){function i(s){var e;void 0===s&&(s={});var n=ue(s,{kind:Be[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(Os)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return w.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||le(e)}return fe(i,t),i}($e);function So(t,s,e){var n;if("string"==typeof t){if(0===t.indexOf("#")&&(t=t.slice(1)),So.getPlayers()[t])return s&&zi.warn('Player "'+t+'" is already initialised. Options will not be applied.'),e&&So.getPlayers()[t].ready(e),So.getPlayers()[t];n=function(t){return 0===t.indexOf("#")&&(t=t.slice(1)),Pi.getElementById(t)}(t)}else n=t;if(!n||!n.nodeName)throw new b("The element or ID supplied is not valid. (videojs)");if(n.player||bo.players[n.playerId])return n.player||bo.players[n.playerId];s=s||{},So.hooks("beforesetup").forEach((function(t){var i=t(n,ue(s));Oi(i)&&!Array.isArray(i)?s=ue(s,i):zi.error("please return an object in beforesetup hooks")}));var r=new(i.getComponent("Player"))(n,s,e);return So.hooks("setup").forEach((function(t){return t(r)})),r}"undefined"==typeof HTMLVideoElement&&Ji()&&(Pi.createElement("video"),Pi.createElement("audio"),Pi.createElement("track")),So.ys={},So.hooks=function(t,i){return So.ys[t]=So.ys[t]||[],i&&(So.ys[t]=So.ys[t].concat(i)),So.ys[t]},So.hook=function(t,i){So.hooks(t,i)},So.removeHook=function(t,i){var s=So.hooks(t).indexOf(i);return!(s<=-1)&&(So.ys[t]=So.ys[t].slice(),So.ys[t].splice(s,1),!0)},!0!==t.VIDEOJS_NO_DYNAMIC_STYLE&&Ji()&&((wo=ws(".vjs-styles-defaults"))||(wo=re("vjs-styles-defaults"),(_o=ws("head"))&&_o.insertBefore(wo,_o.firstChild),he(wo,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n "))),ne(1,So),So.VERSION="5.20.6-opentelly.14",So.options=bo.prototype.h,So.getPlayers=function(){return bo.players},So.players=bo.players,So.getComponent=i.getComponent,So.registerComponent=function(t,s){Gr.isTech(s)&&zi.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),i.registerComponent.call(i,t,s)},So.getTech=Gr.getTech,So.registerTech=Gr.registerTech,So.browser=qs,So.TOUCH_ENABLED=Ls,So.extend=function(t,i){void 0===i&&(i={});var s=function(){t.apply(this,arguments)},e={};for(var n in Oi(i)?("function"==typeof i.init&&(zi.warn("Constructor logic via init() is deprecated; please use constructor() instead."),i.constructor=i.init),i.constructor!==w.prototype.constructor&&(s=i.constructor),e=i):"function"==typeof i&&(s=i),function(t,i){if("function"!=typeof i&&null!==i)throw new b("Super expression must either be null or a function, not "+typeof i);t.prototype=w.create(i&&i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i&&(t.bs=i)}(s,t),e)e.hasOwnProperty(n)&&(s.prototype[n]=e[n]);return s},So.mergeOptions=ue,So.bind=oe,So.plugin=function(t,i){bo.prototype[t]=i},So.addLanguage=function(t,i){var s;return t=(""+t).toLowerCase(),So.options.languages=ue(So.options.languages,((s={})[t]=i,s)),So.options.languages[t]},So.log=zi,So.createTimeRange=So.createTimeRanges=me,So.formatTime=oh,So.parseUrl=Re,So.isCrossOrigin=Oe,So.EventTarget=ce,So.on=Ys,So.one=te,So.off=Ks,So.trigger=Zs,So.xhr=Er,So.TextTrack=Dr,So.AudioTrack=xo,So.VideoTrack=Co,So.isEl=Qi,So.isTextNode=ms,So.createEl=Ki,So.hasClass=hs,So.addClass=os,So.removeClass=as,So.toggleClass=us,So.setAttributes=cs,So.getAttributes=ls,So.emptyEl=gs,So.appendContent=ys,So.insertContent=bs,So.computedStyle=vh;var jo=10;function To(t){const i=t.duration;if(S(i)){var s;const i=null==(s=t.source)?void 0:s.streamType;return"live"===i||"dvr"===i}return i===1/0}function Mo(t){return t.scrubbing()?t.getCache().currentTime:t.currentTime()}function Ao(t){const i=No(t);return To(t)?i.end(i.length-1):i.start(0)}function Po(t){return No(t).start(0)}function Eo(t){const i=No(t);return i.end(i.length-1)-i.start(0)}function No(t){const i=t.seekable;if(i&&i.length)return i;let s=t.duration;return s=isFinite(s)?s:0,new Ft([0,s]).ks()}function Bo(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 Io(t){return class extends t{get ws(){var t;return null!=(t=this._s)?t:this._s=Fo(this.player())}dispose(){this._s=void 0,super.dispose()}constructor(...t){super(...t),this._s=void 0}}}function Fo(t){return t.tech({IWillNotUseThisInPlugins:!0}).theoplayer()}function Do(t){const i=Fo(t),s=()=>{const s=Mo(t);t.toggleClass("theo-at-live",function(t,i){if(To(t)){let s=t.seekable;return 0===s.length||s.end(s.length-1)-i<jo}return!1}(i,s)),t.toggleClass("vjs-live",To(i)),t.toggleClass("theo-dvr",function(t){var i;return"dvr"===gt(t.duration,t.seekable,null==(i=t.source)?void 0:i.streamType)}(i))};t.on("emptied",s),t.on("timeupdate",s),t.on("durationchange",s)}var $o="theo-ad-playing",Ro="theo-dai-ad-playing";function Oo(t,i,s){t.toggleClass($o,i),t.toggleClass(Ro,i&&s)}function Vo(){this.userActive(!1)}var Uo=class{constructor(t,i){this.type=t.type,this.target=i,this.playerEvent=t}},zo=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],Lo=So.getTech("Tech"),Ho=So.getTech("Html5"),qo=class extends Lo{xs(){var t;for(const t of zo)this.ws.addEventListener(t,this.Cs);this.ws.addEventListener("error",this.Ss),this.ws.addEventListener("contentprotectionerror",this.Ss),this.ws.addEventListener("sourcechange",this.js),this.ws.addEventListener("loadstart",this.Ts),null==(t=this.ws.presentation)||t.addEventListener("presentationmodechange",this.Ms),this.ws.textTracks.addEventListener("addtrack",this.As),this.ws.textTracks.addEventListener("removetrack",this.Ps),this.ws.textTracks.addEventListener("change",this.Es),this.ws.audioTracks.addEventListener("addtrack",this.Ns),this.ws.audioTracks.addEventListener("removetrack",this.Bs),this.ws.audioTracks.addEventListener("change",this.Is)}Fs(){var t;for(const t of zo)this.ws.removeEventListener(t,this.Cs);this.ws.removeEventListener("error",this.Ss),this.ws.removeEventListener("contentprotectionerror",this.Ss),this.ws.removeEventListener("sourcechange",this.js),this.ws.removeEventListener("loadstart",this.Ts),null==(t=this.ws.presentation)||t.removeEventListener("presentationmodechange",this.Ms),this.ws.textTracks.removeEventListener("addtrack",this.As),this.ws.textTracks.removeEventListener("removetrack",this.Ps),this.ws.textTracks.removeEventListener("change",this.Es),this.ws.audioTracks.removeEventListener("addtrack",this.Ns),this.ws.audioTracks.removeEventListener("removetrack",this.Bs),this.ws.audioTracks.removeEventListener("change",this.Is)}Ds(t){this.trigger(new Uo(t,this))}createEl(){let t=this.h,i=t.player;if(!i)throw new g(this.localize('Missing required tech option "player"'));let s=i.element;return So.setAttributes(s,{id:t.techId}),s}theoplayer(){return this.ws}addTextTrack(t,i,s){return super.addTextTrack(t,i,s)}buffered(){return this.ws.buffered}played(){return this.ws.played}reset(){this.ws.stop()}play(){this.ws.play()}pause(){this.ws.pause()}paused(){return this.ws.paused}currentTime(){return this.ws.currentTime}setCurrentTime(t){this.ws.currentTime=t}duration(){return this.ws.duration}volume(){return this.ws.volume}setVolume(t){this.ws.volume=t}muted(){return this.ws.muted}setMuted(t){this.ws.muted=t}src(t){if(void 0!==t)this.setSrc(t);else{if(this.ws.src)return this.ws.src;if(this.ws.source){if(!Yt(this.ws.source.ads))return this.ws.source.ads[0].sources;if(M(this.ws.source))return"This source is managed by the Verizon Media integration extension.";if(Tt(this.ws.source))return"This source is managed by the DAI integration extension.";if(T(this.ws.source))return"This source is managed by Millicast."}}}setSrc(t){return this.setSource({src:t})}setSource(t){this.lt=null,this.trigger("error")}currentSrc(){return this.ws.src}load(){this.setPreload("auto")}preload(){return this.ws.preload}setPreload(t){this.ws.preload=t}autoplay(){return this.ws.autoplay}setAutoplay(t){this.ws.autoplay=!!t}seeking(){return this.ws.seeking}seekable(){return this.ws.seekable}ended(){return this.ws.ended}playbackRate(){return this.ws.playbackRate}setPlaybackRate(t){this.ws.playbackRate=t}readyState(){return this.ws.readyState}networkState(){return 0}controls(){return!1}videoHeight(){return this.ws.videoHeight}videoWidth(){return this.ws.videoWidth}supportsFullScreen(){return this.ws.presentation.supportsMode(Lt.FULLSCREEN)}enterFullScreen(){this.ws.presentation.requestMode(Lt.FULLSCREEN)}exitFullScreen(){this.ws.presentation.requestMode(Lt.INLINE)}$s(){let t=this.ws.ads;if(t&&t.playing)return!0;let i=this.ws.vr;return!(!i||i.state===wt.Rs)}initTextTrackListeners(){return this.on("touchend",(t=>{this.$s()&&(t.preventDefault=()=>{})})),super.initTextTrackListeners()}Zt(){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.Fs(),this.ws=null,super.dispose()}static isSupported(){return!0}static canPlayType(){return"maybe"}static canPlaySource(t){return"maybe"}get featuresVolumeControl(){return di}constructor(t={},i){super(t,i),this.Cs=t=>this.Ds(t),this.Os=!1,this.js=()=>{void 0===this.ws.errorObject&&(this.Ds(new At(this.ws.currentTime,this.ws.readyState)),this.Ds(new pi),this.Ds(new Et(this.ws.duration)))},this.Ts=()=>{this.Ds(new kt(this.ws.currentTime))},this.As=t=>{this.textTracks().tt(t.track)},this.Ns=t=>{this.audioTracks().tt(t.track)},this.Ps=t=>{this.textTracks().it(t.track)},this.Bs=t=>{this.audioTracks().it(t.track)},this.Es=()=>{let t=this.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Is=()=>{let t=this.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Ms=()=>{if(!this.supportsFullScreen())return;let t=this.Os,i=this.ws.presentation.currentMode===Lt.FULLSCREEN;t!==i&&(this.Os=i,this.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))},this.Ss=()=>{const t=this.ws.errorObject,i=t&&nt(t.code)||-1,s=t&&t.message||"An unknown error occurred.";this.error({code:i,message:this.localize(s)})},this.ws=this.h.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.Zt(),s&&this.ready((()=>this.play())),this.triggerReady()}};qo.prototype.featuresFullscreenResize=Ho.prototype.featuresFullscreenResize,qo.prototype.featuresPlaybackRate=Ho.prototype.featuresPlaybackRate,qo.prototype.featuresProgressEvents=!0,qo.prototype.featuresTimeupdateEvents=!0,qo.prototype.featuresNativeTextTracks=!0,So.registerTech("THEOplayer",qo);var Wo=class{constructor(t){this.Vs=t=>{Kt(this.Us,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.zs=t=>{ti(this.Us,"theo-mobile-button-hover")},this.Ls=t=>{this.Us.blur()},this.Us=t,t.addEventListener("touchstart",this.Vs),t.addEventListener("touchend",this.zs),t.addEventListener("focusin",this.Ls)}},Go=So.getComponent("Menu"),Xo=class extends(Io(Go)){get Hs(){return this.player().el()}qs(){Kt(this.Hs,"theo-menu-opened")}Ws(){ti(this.Hs,"theo-menu-opened")}constructor(t,i){super(t,i)}},Jo=So.getComponent("MenuItem"),Qo=class extends(Io(Jo)){get parentMenu(){return this.Gs}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.Xs||(this.parentMenu.Js(this),"tap"!==t.type&&"keydown"!==t.type||(this.Xs=!0,this.trigger("click"),this.Xs=!1))}dispose(){Mt.Ys.Qs&&(this.el().removeEventListener("touchstart",this.Vs),this.el().removeEventListener("touchend",this.zs)),super.dispose()}constructor(t,i,s){super(t,vi({selectable:!0},i)),this.Xs=!1,this.Vs=t=>{Kt(this.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},this.zs=t=>{ti(this.el(),"theo-mobile-menu-item-hover")},this.Gs=s,Mt.Ys.Qs&&(this.el().addEventListener("touchstart",this.Vs),this.el().addEventListener("touchend",this.zs))}},Yo=So.getComponent("ClickableComponent"),Ko=class extends Yo{get parentMenu(){return this.Gs}get Ks(){return this.Zs}set Ks(t){this.Zs=t,this.el().setAttribute("tabindex",this.Ks?"0":"-1"),this.te()}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.Xs&&this.Ks&&(this.Gs.ie(),"tap"===t.type&&(this.Xs=!0,this.trigger("click"),this.Xs=!1))}te(){this.Ks?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.Xs=!1,this.Zs=!1,this.Gs=s,this.on(t,"languagechange",this.te)}},Zo=class extends Xo{get menuHeader(){return this.se}get menuItems(){return this.children()}addMenuItem(t){t=vi({playerOptions:this.h.playerOptions},t);let i=new Qo(this.player(),t,this);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}addSubMenuItem(t){t=vi({playerOptions:this.h.playerOptions},t);let i=this.ee(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"}qs(){super.qs(),s.removeEventListener("resize",this.ne),s.addEventListener("resize",this.ne),this.show()}re(){let t=this.he();if(!t)return;let i=t.getClientRects();Mt.Ys.Qs?this.oe(t,i):this.ae(t,i)}he(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0}ae(t,i){}oe(t,i){}Ws(){s.removeEventListener("resize",this.ne),super.Ws(),this.hide(),Mt.Ys.Qs&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=this.contentEl();Kt(i,"theo-menu-content");let s=new Ko(this.player(),this.h,this);return i.parentNode.insertBefore(s.el(),i),this.se=s,t}Js(t){}show(){return this.re(),super.show()}dispose(){this.se&&this.se.dispose(),super.dispose()}constructor(t,i){super(t,i),this.ne=()=>this.re(),this.ue=this.player().el(),this.hide(),this.on("menuchange",this.re)}},ta=class extends Zo{get ce(){return this.le}set ce(t){this.le&&this.le.de(this),this.le=t,t&&t.fe(this)}ve(t){this.ce.pe(t,"replace")}me(t){t.ce.pe(this,"restore")}ge(){ti(this.ye,"vjs-hidden"),this.ye.style.opacity="1",super.show()}be(){Kt(this.ye,"vjs-hidden")}qs(){this.ce&&this.ce.qs(),super.qs()}Ws(){this.ce&&this.ce.Ws(),super.Ws(),Kt(this.ye,"vjs-hidden")}he(){if(this.ce&&this.ce.ke)return this.ce.ke.ye}ae(t,i){if(i.length>0){let t=i[0].height,s=i[0].width;this.le.we.style.height=t+"px",this.le.we.style.width=s+"px"}super.ae(t,i)}constructor(t,i){super(t,i)}},ia=class{get we(){return this.Us}get ke(){return this._e}fe(t){t.be(),this.Us.appendChild(t.ye)}de(t){this.Us.removeChild(t.ye)}pe(t,i){if(t==this._e)return;let s=this._e;if(this._e=t,this._e.ge(),this.ke.focus(),Mt.Ys.Qs)s.be();else{const t="translateX(100%)",e="translateX(-100%)",n=ri("transform");s.ye.style.opacity="0",s.ye.style[n]="replace"===i?e:t,this._e.ye.style.opacity="1",this._e.ye.style[n]="",u((()=>{s.be(),s.ye.style[n]=""}),300)}}qs(){this.xe(),this._e.ge(),this.Ce()}Ws(){this.xe(),this._e.be(),this.Se.be(),this._e=this.Se,this.Ce()}Ce(){Zt((()=>{ti(this.Us,"theo-no-transition"),ti(this._e.ye,"theo-no-transition")}))}xe(){Kt(this.Us,"theo-no-transition"),Kt(this._e.ye,"theo-no-transition")}constructor(t){this.Se=this._e=t,this.Us=h.createElement("div"),this.Us.className="theo-tertiary-background theo-menu-animation-container",this.Us.appendChild(this.Se.ye),this.ue=this._e.player().el()}},sa=class extends ta{get ye(){return this.el()}get parentMenu(){return this.je}ee(t,i){let s=new ea(t,i,this);return s.subMenu.ce=this.ce,s}ie(){this.Te()}Js(t){super.Js(t),this.Te()}Te(){this.parentMenu.me(this)}buildCSSClass(){return"theo-submenu "+(this.Me?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+super.buildCSSClass()}addSubMenuItem(t){this.Me=!0;let i=super.addSubMenuItem(t);return this.removeClass("theo-leaf-submenu"),i}constructor(t,i,s){super(t,i),this.Me=!1,this.je=s,this.menuHeader.Ks=!0}},ea=class extends Qo{get subMenu(){return this.Ae}handleClick(t){this.parentMenu.ve(this.subMenu)}constructor(t,i,s){super(t,vi({selectable:!1},i),s),this.Ae=new sa(t,i,s)}},na=class extends ta{get menuButton(){return this.Pe}createEl(){let t=So.createEl("div",{className:this.buildCSSClass()});return this.Ee=super.createEl(),this.Ee.className=super.buildCSSClass(),Kt(this.Ee,"theo-menu-content-animatable"),t.appendChild(this.Ee),this.ce=new ia(this),t.appendChild(this.ce.we),t}buildCSSClass(){return"theo-menu-animatable "+super.buildCSSClass()}ee(t,i){let s=new ea(t,i,this);return s.subMenu.ce=this.ce,s}ae(t,i){super.ae(t,i);let s=this.ue.getClientRects(),e=s.length>0?s[0]:void 0,n=C(getComputedStyle(this.el()).fontSize);I(this.el(),this.Pe.el(),e,n)}get ye(){return this.Ee}ie(){this.Pe.closeMenu()}dispose(){this.Ne||(this.Ne=!0,super.dispose())}constructor(t,i,s){super(t,i),this.Ne=!1,this.Pe=s}},ra=class{set Be(t){this.Ie.innerHTML=this.Fe.localize(t),this.De(),this.$e(),hi(this.Fe.el())}get Be(){return this.Ie.textContent||""}Re(){this.Fe.off("mouseover",this.$e),this.Fe.off("mouseout",this.De),this.Fe.off("dispose",this.Oe),Wt(this.Ie)}constructor(t,i){this.$e=()=>{ti(this.Ie,"vjs-hidden");let t=this.Fe.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,s=C(getComputedStyle(this.Ie).fontSize);I(this.Ie,this.Fe.el(),i,s)},this.De=()=>{Kt(this.Ie,"vjs-hidden")},this.Oe=()=>this.Re(),this.Fe=t,hi(t.el()),ai(t.el()),this.Ie=h.createElement("span"),this.Ie.innerHTML=this.Fe.localize(i),this.Ie.className="theo-button-tooltip vjs-hidden",this.Ie.setAttribute("aria-hidden","true"),this.Fe.el().appendChild(this.Ie),this.Fe.on("mouseover",this.$e),this.Fe.on("mouseout",this.De),this.Fe.on("dispose",this.Oe)}},ha=So.getComponent("Button"),oa=class extends(Io(ha)){get Ve(){const t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}get menu(){return this.Ue}isMenuOpen(){return this.ze}openMenu(){this.Le&&!this.ze&&(this.Ue.qs(),this.el().setAttribute("aria-expanded","true"),this.ze=!0,this.Ue.focus())}closeMenu(){this.Le&&this.ze&&(this.Ue.Ws(),this.el().setAttribute("aria-expanded","false"),this.ze=!1)}set minimumMenuItems(t){this.He=t,this.qe()}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.ze?this.closeMenu():this.openMenu()}enable(){return this.Le=!0,super.enable()}disable(){return this.closeMenu(),this.Le=!1,super.disable()}te(){this.Ie.Be=this.controlText()}dispose(){this.player().removeChild(this.Ue),this.Ue.dispose(),this.Ie.Re(),this.ws.removeEventListener("seeking",this.We),super.dispose()}constructor(t,i){super(t,i),this.ze=!1,this.He=1,this.Le=!0,this.Ge=t=>{let i=this.el().contains(t.target),s=this.Ue.el().contains(t.target),e=!1;var n;Mt.Ys.Qs&&this.Ve&&(e=(null==(n=this.el().parentElement)?void 0:n.querySelector(".theo-mobile-menu-background"))===t.target);i||s||!this.ze||(e&&t.preventDefault(),this.closeMenu())},this.Xe=t=>{27===t.which&&(this.closeMenu(),this.focus())},this.We=()=>{this.ze&&this.closeMenu()},this.qe=()=>{this.Ue.menuItems.length>=this.He?this.show():(this.closeMenu(),this.hide())},this.Ue=new na(t,i,this),this.player().getChild("controlBarMenuContainer").addChild(this.Ue),this.Ie=new ra(this,this.controlText()),this.el().setAttribute("aria-haspopup","true"),Mt.Ys.Je?(this.on(h,"touchend",this.Ge),new Wo(this.el())):(this.on(h,"click",this.Ge),this.on(h,"keydown",this.Xe),li&&this.on(h,li.Qe,this.closeMenu)),this.ws.addEventListener("seeking",this.We),this.on(this.Ue,"menuchange",this.qe),this.on(t,"languagechange",this.te),this.qe()}},aa=So.getComponent("Component"),ua=class extends(So.getComponent("ControlBar")){addMenuButton(t){t=vi({playerOptions:this.h.playerOptions},t);let i=new oa(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)}};So.registerComponent("THEOControlBarShadow",class extends aa{createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-tertiary-color theo-control-bar-shadow"}});var ca=So.getComponent("VolumeBar"),la=class extends ca{handleFocus(t){super.handleFocus(t),this.Ye.addClass("focus-within")}handleBlur(t){super.handleBlur(t),this.Ye.removeClass("focus-within")}constructor(t,i){super(t,i),this.Ye=i.Ke}},da=So.getComponent("VolumeControl"),fa=class extends da{constructor(t,i){super(t,i),this.Ze=new la(t,{Ke:this}),this.addChild(this.Ze)}};fa.prototype.h=vi({},da.prototype.h,{children:[]}),So.registerComponent("VolumeControl",fa);var va=class extends(Io(ua)){tn(){this.sn(this.nn())}rn(){0===this.hn&&(this.hn=u(this.an,100))}un(t){"opacity"===t.propertyName&&(0!==this.hn&&(c(this.hn),this.hn=0),this.sn(!0))}cn(t){"opacity"===t.propertyName&&(this.nn()||this.sn(!1))}nn(){return"0"!==s.getComputedStyle(this.el()).opacity}sn(t){this.ln!==t&&(this.ln=t,t?this.dn():this.ws.textTrackStyle.marginBottom=void 0)}dn(){const t=this.el().getBoundingClientRect().height;this.ws.textTrackStyle.marginBottom!==t&&(this.ws.textTrackStyle.marginBottom=t)}dispose(){c(this.hn),this.hn=0,this.vn.fn(ii.pn,this.mn),this.vn.gn(),super.dispose()}constructor(t,i){super(t,i),this.ln=!1,this.hn=0,this.an=()=>{0!==this.hn&&(this.hn=0,this.sn(this.nn()))},this.mn=()=>{this.ln&&this.dn()},this.on(t,"ready",this.tn),this.on(t,"pause",this.tn),this.on(t,"useractive",this.tn),this.on(t,"firstplay",this.rn),this.on(t,"play",this.rn),this.on(t,"userinactive",this.rn),this.on("transitionstart",this.un),this.on("transitionend",this.cn),this.vn=new oi(this.el()),this.vn.yn(ii.pn,this.mn),this.vn.bn(!0)}};va.prototype.h=vi({},ua.prototype.h,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),So.registerComponent("ControlBar",va);var pa=class extends ua{buildCSSClass(){return"theo-top-controlbar "+super.buildCSSClass()}constructor(t,i){super(t,i),t.topControlBar=this}};pa.prototype.h=vi({},ua.prototype.h,{children:[]}),So.registerComponent("TopControlBar",pa);var ma=So.getComponent("CurrentTimeDisplay"),ga=class extends(Io(ma)){updateContent(){const t=Mo(this.player()),i=this.ws,s=Po(i),e=this.localize("Current Time"),n=Bo(_.max(0,t-s),Eo(i));n!==this.Mt&&(this.Mt=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)}};So.registerComponent("CurrentTimeDisplay",ga);var ya=So.getComponent("DurationDisplay"),ba=class extends(Io(ya)){updateContent(){const t=this.ws,i=S(t.duration)?NaN:Eo(t),s=t.clip.endTime-t.clip.startTime,e=_.min(i,s)||0;if(this.ct!==e){this.ct=e;const t=this.localize("Duration Time"),i=Bo(e);this.S.innerHTML='<span class="vjs-control-text">'+t+"</span> "+i}}dispose(){var t;null==(t=this.ws)||t.clip.removeEventListener("change",this.kn),super.dispose()}constructor(t,i){var s;super(t,i),this.kn=()=>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),null==(s=this.ws)||s.clip.addEventListener("change",this.kn)}};So.registerComponent("DurationDisplay",ba);var ka=So.getComponent("Button"),wa=class extends(Io(ka)){buildCSSClass(){return"theo-live-control "+super.buildCSSClass()}createEl(){let t=super.createEl("button",{},{"aria-live":"off"});return this.wn=So.createEl("span",{className:"theo-live-control-indicator"}),Xt(t,this.wn),t}createControlTextEl(t){let i=super.createControlTextEl(t);return So.removeClass(i,"vjs-control-text"),So.addClass(i,"theo-live-control-text"),i}handleClick(){var t;const i=this.ws;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{const t=this.player();t.currentTime(Ao(i)),t.play()}}_n(){To(this.ws)?this.show():this.hide()}constructor(t,i){super(t,i),this.controlText("Live"),this._n(),this.on(t,"emptied",this._n),this.on(t,"durationchange",this._n),Mt.Ys.Je&&new Wo(this.el())}};So.registerComponent("LiveDisplay",wa);var _a=So.getComponent("LoadingSpinner");So.registerComponent("LoadingSpinner",class extends _a{buildCSSClass(){return"theo-secondary-color vjs-loading-spinner "+super.buildCSSClass()}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=So.createEl("div",{className:"theo-loading-spinner-rotator"}),s=So.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=So.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 xa=So.getComponent("LoadProgressBar"),Ca=class extends(Io(xa)){update(){let t=this.ws,i=Ft.xn(No(t)),s=i.Cn(0),e=Ft.xn(t.buffered).Sn(i),n=i.jn(0)-s,r=e.U&&e.jn(e.U-1)||0;r=_.max(0,r-s);let o=this.el(),a=this.Tn;o.style.width=Sa(r,n);for(let t=0;t<e.U;t++){let i=e.Cn(t),n=e.jn(t),u=a[t];u||(u=h.createElement("div"),a.push(u),o.appendChild(u)),u.style.left=Sa(i-s,r),u.style.width=Sa(n-i,r)}for(let t=a.length;t>e.U;t--)o.removeChild(a[t-1]);a.length=e.U}constructor(t,i){super(t,i),this.Tn=[],this.on(t,"emptied",this.update)}};function Sa(t,i){let s=t/i||0;return 100*(s>=1?1:s)+"%"}So.registerComponent("LoadProgressBar",Ca);var ja=So.getComponent("MouseTimeDisplay"),Ta=class extends(Io(ja)){handleMouseMove(t){let i=t,s=this.ws,e=Po(s)+this.calculateDistance(i)*Eo(s),n=i.pageX-N(this.el().parentNode).left;this.update(e,n+"px")}handleTouchMove(t){let i=t,s=this.ws,e=Po(s)+this.calculateDistance(i)*Eo(s),n=i.touches[0].pageX-N(this.el().parentNode).left;this.update(e,n+"px")}createEl(){let t=super.createEl();return this.Mn=So.createEl("span",{className:"theo-time-tooltip-text"}),t}update(t,i){this.An=t;let s=this.Pn(t);this.el().style.left=i,this.el().setAttribute("data-current-time",s),this.keepTooltipsInside&&(l(this.Mn,s),this.En())}En(){if(this.keepTooltipsInside&&this.tooltip.offsetParent){let t=this.player().contentEl(),i=t.getClientRects(),s=i.length>0?i[0]:void 0,e=C(getComputedStyle(t).fontSize);I(this.tooltip,this.el(),s,e)}}Pn(t){const i=this.ws,s=t-Ao(i);return Bo(To(i)?_.min(s,0):s,Eo(i))}dispose(){var t;this.ws.removeEventListener("dimensionchange",this.Nn),null==(t=this.ws.presentation)||t.removeEventListener("presentationmodechange",this.Nn),super.dispose()}constructor(t,i){var s;(super(t,i),this.An=NaN,this.Nn=()=>{let t=Mo(this.player());const i=this.ws;let s=(t-Po(i))/Eo(i)||0;s=zt(s,0,1),this.update(t,100*s+"%")},this.keepTooltipsInside&&(So.addClass(this.tooltip,"theo-secondary-color"),this.tooltip.appendChild(this.Mn)),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"mouseenter",this.handleMouseMove)})),Pt.Qs)&&(this.on(t,"firstplay",this.Nn),this.on(t,"play",this.Nn),this.on(t,"seeking",this.Nn),this.on(t,"seeked",this.Nn),this.on(t,"timeupdate",this.Nn),this.ws.addEventListener("dimensionchange",this.Nn),null==(s=this.ws.presentation)||s.addEventListener("presentationmodechange",this.Nn),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"touchstart",this.handleTouchMove),this.on(t.controlBar.progressControl,"touchmove",Vt((t=>this.handleTouchMove(t)),25)),this.Nn()})))}};So.registerComponent("MouseTimeDisplay",Ta);var Ma=So.getComponent("PlayProgressBar"),Aa=class extends(Io(Ma)){updateDataAttr(){let t=Mo(this.player());this.el().setAttribute("data-current-time",this.Pn(t))}Pn(t){let i=this.ws;return Bo(t-Ao(i),Eo(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)}};So.registerComponent("PlayProgressBar",Aa);var Pa=So.getComponent("RemainingTimeDisplay"),Ea=class extends(Io(Pa)){updateContent(){const t=this.ws,i=Eo(t);if(i){const s=No(t).end(0),e=this.localize("Remaining Time"),n=Bo(_.max(0,s-this.player().currentTime()),i);n!==this.Mt&&(this.Mt=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)}};So.registerComponent("RemainingTimeDisplay",Ea);var Na=class{get ws(){return this._s||(this._s=this.Bn.tech({IWillNotUseThisInPlugins:!0}).theoplayer()),this._s}In(t){if(t.kind!==dt.Fn)return;if(0===this.ws.seekable.length)return;this.Dn=t;const i=t.cues.slice();this.Rn.$n(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 Ba(s,this.ws,n);this.On.push(r),this.Vn.appendChild(r.we)}t.addEventListener("cuechange",this.Un),this.Un()}zn(){this.ws.addEventListener("loadedmetadata",this.Ln),this.ws.addEventListener("loadeddata",this.Ln),this.ws.addEventListener("sourcechange",this.Ln),this.ws.textTracks.addEventListener("addtrack",this.Hn),this.ws.textTracks.addEventListener("removetrack",this.qn),this.ws.textTracks.addEventListener("change",this.Ln)}Wn(){this.ws.removeEventListener("loadedmetadata",this.Ln),this.ws.removeEventListener("loadeddata",this.Ln),this.ws.removeEventListener("sourcechange",this.Ln),this.ws.textTracks.removeEventListener("addtrack",this.Hn),this.ws.textTracks.removeEventListener("removetrack",this.qn),this.ws.textTracks.removeEventListener("change",this.Ln)}Gn(){if(!(this.ws.readyState<yt.Xn))for(let t of this.ws.textTracks)if(t.kind===dt.Fn&&t.mode===ct.Jn&&t.cues.length>0&&t.readyState!==ht.ERROR)return t}Qn(t){this.Rn.Yn(t)}Kn(){this.Rn.ge()}Zn(){this.Rn.be()}tr(){for(let t of this.On)t.Re();this.Rn.tr(),this.On=[],this.ir=void 0,this.Dn&&this.Dn.removeEventListener("cuechange",this.Un),this.Dn=void 0}Re(){this.Wn(),this.sr.removeEventListener("mousemove",this.er),this.sr.removeEventListener("mouseenter",this.nr),this.sr.removeEventListener("mouseleave",this.rr),this.tr(),this.Rn.Re(),this._s=void 0}constructor(t,i){this.Bn=i,this.On=[],this._s=void 0,this.Hn=t=>{let i=t.track;i.kind===dt.Fn&&(i.addEventListener("addcue",this.Ln),i.addEventListener("removecue",this.Ln),i.addEventListener("readystatechange",this.Ln)),this.Ln()},this.qn=t=>{let i=t.track;i.kind===dt.Fn&&(i.removeEventListener("addcue",this.Ln),i.removeEventListener("removecue",this.Ln),i.removeEventListener("readystatechange",this.Ln)),this.Ln()},this.er=t=>{let i=this.ws,s=function(t,i){let s,e,n=N(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.Vn,t),e=Po(i)+s.x*Eo(i);e===i.duration&&(e-=.1),this.Qn(e)},this.rr=()=>{this.Rn.be()},this.nr=()=>{this.Rn.ge()},this.Ln=()=>{let t=this.Gn();t!==this.Dn&&(this.tr(),t&&this.In(t))},this.Un=()=>{var t,i,s;const e=null==(i=this.Dn)||null==(t=i.activeCues)?void 0:t[0],n=A(this.On,(t=>t.hr===e));n!==this.ir&&(null==(s=this.ir)||s.ar(),this.ir=n,null==n||n.ur())},this.sr=t,this.Rn=new Ia,this.Bn.contentEl().appendChild(this.Rn.we),this.Vn=h.createElement("div"),Kt(this.Vn,"theoplayer-chapterbar"),this.sr.appendChild(this.Vn),this.sr.addEventListener("mousemove",this.er),this.sr.addEventListener("mouseenter",this.nr),this.sr.addEventListener("mouseleave",this.rr),this.zn()}},Ba=class{get we(){return this.Us}ur(){Kt(this.Us,"theoplayer-chapter-indicator-active")}ar(){ti(this.Us,"theoplayer-chapter-indicator-active")}cr(t,i){let s=t.seekable.start(0),e=t.seekable.end(t.seekable.length-1)-s,n=this.hr.startTime,r=this.hr.endTime-n,o=h.createElement("div");Kt(o,"theoplayer-chapter-indicator");let a=h.createElement("div");Kt(a,"theoplayer-chapter-indicator-highlight"),o.appendChild(a),i&&Kt(o,"theoplayer-chapter-indicator-discontinuous");let u=_.min(n/e*100,100),c=100-u,l=_.min(r/e*100,c);return o.style.width=l+"%",o.style.left=u+"%",o}Re(){Wt(this.Us)}constructor(t,i,s){this.hr=t,this.Us=this.cr(i,s)}},Ia=class{be(){this.lr--,0===this.lr&&ti(this.we,"theoplayer-chapter-hovering")}$n(t){this.dr=t||[],this.dr.length>0&&(this.we.style.display="")}pr(t){l(this.mr,t.content)}tr(){this.dr=[],l(this.mr,""),this.we.style.display="none"}ge(){this.lr++,this.lr>0&&Kt(this.we,"theoplayer-chapter-hovering")}Yn(t){for(let i of this.dr)if(Fa(i,t)){this.pr(i);break}}Re(){Wt(this.we)}constructor(){this.dr=[],this.lr=0,this.we=h.createElement("div"),Kt(this.we,"theoplayer-chaptertitle"),this.we.style.display="none",this.mr=h.createElement("p"),this.we.appendChild(this.mr)}};function Fa(t,i){return new Ft([t.startTime,t.endTime]).gr(i)}var Da=So.getComponent("SeekBar"),$a=class extends(Io(Da)){updateAriaAttributes(t){const i=Mo(this.player()),s=this.ws;t.setAttribute("aria-valuenow",(100*this.yr(i)).toFixed(2)),t.setAttribute("aria-valuetext",Bo(i-Ao(s),Eo(s)))}getPercent(){return this.yr(this.player().currentTime())}handleMouseMove(t){if(this.ws&&this.ws.ads&&this.ws.ads.playing)return;const i=this.ws;let s=Po(i)+this.calculateDistance(t)*Eo(i);s>=i.duration&&(s=i.duration-.1),this.Vn.Qn(s),this.player().currentTime(s)}handleMouseDown(t){this.playingStates.push(!this.player().paused()),this.Vn.Kn(),super.handleMouseDown(t)}handleMouseUp(t){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.Vn.Zn(),super.handleMouseUp(t)}yr(t){let i=this.ws,s=(t-Po(i))/Eo(i);return zt(s,0,1)}dispose(){this.Vn.Re(),F(this.playingStates)}constructor(t,i){super(t,i),this.playingStates=[],this.on(t,"emptied",this.update),this.on(t,"seeking",this.update),this.Vn=new Na(this.el(),t)}};So.registerComponent("SeekBar",$a);var Ra=So.getComponent("ProgressControl");Mt.Ys.Qs&&So.registerComponent("ProgressControl",class extends Ra{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 Oa=So.getComponent("TooltipProgressBar"),Va=class extends(Io(Oa)){updateDataAttr(){let t=Mo(this.player()),i=this.Pn(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i}Pn(t){const i=this.ws;return Bo(t-Ao(i),Eo(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)}};function Ua(t){for(const i of t)if(i.enabled)return i}function za(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:La(t),description:Ha(t),hd:!!t.height&&t.height>=720}}function La(t){return t.height?t.height+"p":t.bandwidth?Ha(t):""}function Ha(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":""}So.registerComponent("TooltipProgressBar",Va);var qa=class{get br(){return this.kr}set br(t){let i=this.kr;for(let s=i.length-1;s>=0;s--){let e=i[s];B(t,e)||this.wr(e)}for(let i of t)this._r(i);this.Cr.re()}get Sr(){return this.Cr.menuItems}jr(t){let i=this.Sr;if(i)for(let s of i)if(s.Tr===t)return s}Mr(t){let i=this.Cr.addMenuItem();return i.Tr=t,i.on("click",(()=>this.Ar(i))),i.el().setAttribute("role","menuitemradio"),i}Pr(t){t.dispose()}Er(t){return!0}_r(t){if(this.Er(t)){B(this.kr,t)||this.kr.push(t);let i=this.jr(t)||this.Mr(t);return this.Nr(i),i}this.wr(t)}wr(t){let i=this.jr(t);i&&(this.Cr.removeMenuItem(i),this.Pr(i)),E(this.kr,t)}Re(){const t=[];for(let i of this.kr)t.push(i);for(let i of t)this.wr(i);F(t)}constructor(t){this.kr=[],this.Cr=t}},Wa=class extends qa{Br(){return this.Ir=h.createElement("span"),this.Ir.className="theo-settings-control-menu-item-title",l(this.Ir,this.Fr.localize("Quality")),this.Ir}Dr(){return this.$r=h.createElement("span"),this.$r.className="theo-settings-control-menu-quality-automatic",l(this.$r,this.Fr.localize("Automatic")),this.$r}Rr(){return this.Or=h.createElement("span"),l(this.Or,this.Fr.localize("Automatic")),this.Or}Vr(){return this.Ur=h.createElement("span"),this.Ur.className="theo-primary-color theo-settings-control-menu-item-hd-label",l(this.Ur,this.Fr.localize("HD")),this.Ur}zr(){let t=h.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.$r),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Or),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Ur),this.Lr.el().appendChild(this.Ir),this.Lr.el().appendChild(t),this.Lr.el().setAttribute("aria-label",this.Fr.localize("Open the video quality settings menu"))}Hr(){let t=this.qr,i=t&&Za(t.targetQuality),s=t&&t.activeQuality,e=za(this.Wr(i||s))||{name:this.Fr.localize("Automatic")};l(this.Or,e.name),si(this.$r,"vjs-hidden",!!i),si(this.Ur,"vjs-hidden",!e.hd)}Nr(t){let i=za(t.Tr)||{name:this.Fr.localize("Automatic")},s=i.name;i.hd&&(s+='<span class="theo-primary-color theo-settings-control-menu-item-hd-label">'+this.Fr.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.Fr.localize("Set video quality to ")+i.name),t.Tr?t.selected(t.Tr===this.Gr):t.selected(!this.Gr)}Ar(t){this.qr&&(this.qr.targetQuality=t.Tr&&t.Tr.videoQualities)}Wr(t,i){const s=i||this.br;for(let i of s)if(t&&i&&-1!==i.videoQualities.indexOf(t))return i}Re(){this._s.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.Xr),this.Fr.off("languagechange",this.te),this.qr&&(this.qr.removeEventListener("activequalitychanged",this.Jr),this.qr.removeEventListener("targetqualitychanged",this.Qr),this.qr.removeEventListener("update",this.Yr)),super.Re()}constructor(t,i,s){super(t.subMenu),this.qr=void 0,this.Gr=void 0,this.Xr=()=>{let t=Ua(this._s.videoTracks);if(t===this.qr)return;let i=[];if(this.qr&&(this.qr.removeEventListener("activequalitychanged",this.Jr),this.qr.removeEventListener("targetqualitychanged",this.Qr),this.qr.removeEventListener("update",this.Yr)),this.qr=t,t){t.addEventListener("activequalitychanged",this.Jr),t.addEventListener("targetqualitychanged",this.Qr),t.addEventListener("update",this.Yr);const s=Xa(Ya(t.qualities.filter((t=>t.available))));i=s.length>1?[void 0,...s]:[void 0]}this.br=i,this.Qr(),this.Jr()},this.Yr=t=>{const i=t.track;if(i!==this.qr)return;const s=Xa(Ya(i.qualities.filter((t=>t.available)))),e=i&&Za(i.targetQuality);let n;this.Gr=this.Wr(e,s),n=s.length>1?[void 0,...s]:[void 0],this.br=n,this.Hr()},this.Jr=()=>{this._r(void 0),this.Hr()},this.Qr=()=>{let t=Ua(this._s.videoTracks),i=t&&Za(t.targetQuality),s=this.Wr(i),e=this.Gr;s!==e&&(this.Gr=s,s&&e||this._r(void 0),e&&B(this.br,e)&&this._r(e),i&&this._r(s),this.Hr())},this.te=()=>{l(this.Cr.menuHeader.el(),this.Fr.localize("Quality")),l(this.Ir,this.Fr.localize("Quality")),l(this.$r,this.Fr.localize("Automatic")),l(this.Or,this.Fr.localize("Automatic")),l(this.Ur,this.Fr.localize("HD")),this.Lr.el().setAttribute("aria-label",this.Fr.localize("Open the video quality settings menu"));for(const t of this.Sr)this.Nr(t);this.Hr()},this.Lr=t,this._s=i,this.Fr=s,this.Ir=this.Br(),this.$r=this.Dr(),this.Or=this.Rr(),this.Ur=this.Vr(),this.zr(),l(this.Cr.menuHeader.el(),this.Fr.localize("Quality")),this.br=[void 0],this._s.videoTracks.addEventListener(["addtrack","removetrack","change"],this.Xr),this.Fr.on("languagechange",this.te),this.Xr()}},Ga=class{get height(){return this.Kr[0].height}get bandwidth(){return this.Kr[0].bandwidth}get videoQualities(){return this.Kr}get label(){return this.Kr[0].label}add(t){this.Kr.push(t)}constructor(t){this.Kr=t}};function Xa(t){let i=[];for(let s of t){let t=s,e=!1;for(let s of i)if(Ka(s,t)){s.add(t),e=!0;break}e||i.push(new Ga([t]))}return i}function Ja(t,i){return t&&i?Ci(t,i):_i.Zr}function Qa(t,i){return t===i?_i.Zr:Ja(t.height,i.height)||Ja(t.width,i.width)||Ja(t.bandwidth,i.bandwidth)}function Ya(t){return ki(t,Qa).reverse()}function Ka(t,i){return t.label&&i.label&&t.label===i.label||Q(za(t),za(i))}function Za(t){return It(t)?1===t.length?t[0]:void 0:t}function tu(t){return 1===t?"Normal":""+_.round(100*t)/100}var iu=class extends qa{Br(){return this.Ir=h.createElement("span"),this.Ir.className="theo-settings-control-menu-item-title",l(this.Ir,this.Fr.localize("Speed")),this.Ir}zr(){const t=h.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Lr.el().appendChild(this.Ir),this.Lr.el().appendChild(t),this.Lr.el().setAttribute("aria-label",this.Fr.localize("Open the video speed settings menu")),t}Mr(t){let i=super.Mr(t);return this.Nr(i),i}Nr(t){const i=t.Tr,s=this.Fr.localize(tu(i));l(t.el(),s),t.el().setAttribute("aria-label",this.Fr.localize("Set video speed to ")+s),t.selected(t.Tr===this._s.playbackRate)}Ar(t){this._s.playbackRate=t.Tr}Re(){this._s.removeEventListener("ratechange",this.th),this.Fr.off("languagechange",this.te),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.ih=void 0,this.th=()=>{this.ih&&this._r(this.ih);let t=this._s.playbackRate;this.ih=t,l(this.sh,this.Fr.localize(tu(t))),t&&this._r(t)},this.te=()=>{l(this.Cr.menuHeader.el(),this.Fr.localize("Speed")),l(this.Ir,this.Fr.localize("Speed")),this.Lr.el().setAttribute("aria-label",this.Fr.localize("Open the video speed settings menu"));for(const t of this.Sr)this.Nr(t);this.th()},this.Lr=t,this._s=i,this.Fr=s,this.Ir=this.Br(),this.sh=this.zr(),l(this.Cr.menuHeader.el(),this.Fr.localize("Speed")),this.br=e,this._s.addEventListener("ratechange",this.th),this.Fr.on("languagechange",this.te),this.th()}};So.registerComponent("SettingsButton",class extends oa{createEl(){let t=super.createEl();return this.eh=So.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),l(this.eh,this.localize("HD")),t.appendChild(this.eh),t}buildCSSClass(){return"vjs-icon-cog theo-settings-control-button "+super.buildCSSClass()}te(){super.te(),l(this.eh,this.localize("HD")),l(this.menu.menuHeader.el(),this.localize("Settings"))}dispose(){this.qr&&(this.qr.removeEventListener("activequalitychanged",this.Jr),this.qr=void 0),this.ws.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.nh),this.rh.Re(),this.hh.Re(),super.dispose()}constructor(t,i){var s,e;super(t,i),this.qr=void 0,this.nh=()=>{let t=Ua(this.ws.videoTracks);t!==this.qr&&(this.qr&&this.qr.removeEventListener("activequalitychanged",this.Jr),this.qr=t,t&&t.addEventListener("activequalitychanged",this.Jr),this.Jr())},this.Jr=()=>{var t;const i=null==(t=this.qr)?void 0:t.activeQuality,s=!!(i&&i.height>=720);this.player().toggleClass("theo-hd",s)},Kt(this.menu.el(),"theo-settings-control-menu"),l(this.menu.menuHeader.el(),t.localize("Settings")),this.controlText("Settings"),this.Ie.Be=this.controlText(),this.oh=this.menu.addSubMenuItem({name:"QualityMenuItem"}),this.rh=new Wa(this.oh,this.ws,t);let n=null!=(e=null==i||null==(s=i.playerOptions)?void 0:s.playbackRates)?e:[];this.ah=this.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),this.hh=new iu(this.ah,this.ws,t,n),this.ws.videoTracks.addEventListener(["addtrack","removetrack","change"],this.nh),this.nh()}});var su=class extends qa{uh(t){let i=t.label;if(i)return i;let s=t.language;if(s){let t=lt(s);if(t)return t.lh}return s||""}dh(){this.br=this.fh}Re(){this.fh.removeEventListener("addtrack",this.ph),this.fh.removeEventListener("removetrack",this.mh),this.fh.removeEventListener("change",this.gh),super.Re()}constructor(t,i){super(t),this.ph=t=>{const i=t.track;this._r(i),i.addEventListener("update",this.yh)},this.mh=t=>{const i=t.track;this.wr(i),i.removeEventListener("update",this.yh)},this.gh=t=>this.dh(),this.yh=()=>{for(const t of this.br)this._r(t)},this.fh=i,this.fh.addEventListener("addtrack",this.ph),this.fh.addEventListener("removetrack",this.mh),this.fh.addEventListener("change",this.gh),this.dh()}},eu=class extends su{Nr(t){let i=t.Tr,s=this.Fr.localize(this.uh(i));l(t.el(),s),t.el().setAttribute("aria-label",this.Fr.localize("Set the audio language to")+" "+s),t.selected(i.enabled)}Ar(t){let i=t.Tr;for(let t of this.ws.audioTracks)t!==i&&(t.enabled=!1);i.enabled=!0}Re(){this.Fr.off("languagechange",this.te),super.Re()}constructor(t,i,s){super(t,i.audioTracks),this.te=()=>{l(this.Cr.menuHeader.el(),this.Fr.localize("Language"));for(const t of this.Sr)this.Nr(t)},this.ws=i,this.Fr=s,l(this.Cr.menuHeader.el(),this.Fr.localize("Language")),this.Fr.on("languagechange",this.te)}};So.registerComponent("audioTrackButton",class extends oa{buildCSSClass(){return"vjs-icon-audio theo-audio-track-control-button "+super.buildCSSClass()}dispose(){this.bh.Re(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=2,this.bh=new eu(this.menu,this.ws,t),this.controlText("Language"),this.Ie.Be=this.controlText()}});var nu=class extends su{Er(t){return!!super.Er(t)&&(!t.forced&&mt(t.kind))}Mr(t){let i=super.Mr(t);Kt(i.el(),"theo-text-track-menu-item");let s=h.createElement("span");i.kh=s;let e=h.createElement("div");e.className="theo-text-track-menu-item-toggle",i.wh=e;let n=t=>this._h(t,i);i.xh=n,e.addEventListener("click",n);let r=h.createElement("div");return r.className="theo-text-track-menu-item-toggle-slider",e.appendChild(r),i.el().appendChild(s),i.el().appendChild(e),i}Nr(t){let i=t,s=i.Tr,e=this.Fr.localize(this.uh(s));l(i.kh,e),i.el().setAttribute("aria-label",this.Fr.localize("Set the subtitle language to")+" "+e),i.el().setAttribute("role","menuitemcheckbox"),i.selected(s.mode===ct.Jn)}Pr(t){let i=t;i.wh.removeEventListener("click",i.xh),super.Pr(t)}Ar(t){let i=t.Tr;for(let t of this.ws.textTracks)t!==i&&vt(t.kind,i.kind)&&(t.mode=ct.Ch);i.mode!==ct.Jn?i.mode=ct.Jn:i.mode=ct.Ch}_h(t,i){t.stopImmediatePropagation(),this.Ar(i)}Re(){this.Fr.off("languagechange",this.te),super.Re()}constructor(t,i,s){super(t,i.textTracks),this.te=()=>{l(this.Cr.menuHeader.el(),this.Fr.localize("Subtitles"));for(const t of this.Sr)this.Nr(t)},this.ws=i,this.Fr=s,l(this.Cr.menuHeader.el(),s.localize("Subtitles")),this.Fr.on("languagechange",this.te)}};So.registerComponent("subtitlesButton",class extends oa{buildCSSClass(){return"vjs-icon-subtitles theo-text-track-control-button "+super.buildCSSClass()}dispose(){this.bh.Re(),super.dispose()}constructor(t,i){super(t,i),this.bh=new nu(this.menu,this.ws,t),this.controlText("Subtitles"),this.Ie.Be=this.controlText()}});var ru,hu=So.getComponent("playToggle");!function(t){t.Sh="Pause",t.jh="Play",t.Th="Replay"}(ru||(ru={}));var ou=class extends(Io(hu)){handleClick(t){this.ws.muted||this.ws.prepareWithUserAction(),super.handleClick(t)}handlePlay(t){super.handlePlay(t),this.controlText("Pause"),this.Ie.Be=this.controlText()}handlePause(t){this.ws.ended||(super.handlePause(t),this.controlText("Play"),this.Ie.Be=this.controlText())}te(){this.Ie.Be=this.controlText()}dispose(){this.Ie.Re(),this.ws.removeEventListener("ended",this.Mh),super.dispose()}constructor(t,i){super(t,i),this.Mh=()=>{this.controlText("Replay"),this.Ie.Be=this.controlText()},this.controlText("Play"),this.Ie=new ra(this,this.controlText()),this.ws.addEventListener("ended",this.Mh),this.on(t,"languagechange",this.te),Mt.Ys.Je&&new Wo(this.el())}};So.registerComponent("playToggle",ou);var au,uu=So.getComponent("fullscreenToggle");!function(t){t.Ah="Exit fullscreen",t.Ph="Fullscreen"}(au||(au={}));var cu=class extends(Io(uu)){handleClick(t){this.ws.prepareWithUserAction(),super.handleClick(t)}handleFullscreenChange(t){super.handleFullscreenChange(t),this.updateContent()}updateContent(){const t=this.player().isFullscreen()?"Exit fullscreen":"Fullscreen";this.controlText(t),this.Ie.Be=this.controlText()}dispose(){this.Ie.Re(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Fullscreen"),this.Ie=new ra(this,this.controlText()),Mt.Ys.Je&&new Wo(this.el()),this.on(t,"languagechange",this.updateContent)}};So.registerComponent("fullscreenToggle",cu);var lu,du=So.getComponent("muteToggle");!function(t){t.Eh="Unmute",t.Nh="Mute"}(lu||(lu={}));var fu=class extends(Io(du)){handleClick(t){this.ws.muted&&!this.ws.paused&&this.ws.prepareWithUserAction(),super.handleClick(t)}update(t){super.update(t),this.te()}te(){const t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.Ie.Be=this.controlText()}dispose(){this.Ie.Re(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Mute"),this.Ie=new ra(this,this.controlText()),Mt.Ys.Je&&new Wo(this.el()),this.on(t,"languagechange",this.te),ci&&(this.removeClass("vjs-hidden"),this.on(t,"loadstart",(()=>{this.removeClass("vjs-hidden")})))}};So.registerComponent("muteToggle",fu);var vu=So.getComponent("BigPlayButton"),pu="theo-play-svg-circle",mu='<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="'+pu+'" 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>',gu=class extends(Io(vu)){createEl(){let t=super.createEl(),i=So.createEl("div",{className:"theo-big-play-button-svg-container"});return i.innerHTML=mu,t.appendChild(i),t}buildCSSClass(){return"theo-primary-color "+super.buildCSSClass()}handleClick(t){this.ws.muted||this.ws.prepareWithUserAction(),super.handleClick(t),void 0!==this.ws.vr&&"unavailable"!==this.ws.vr.state&&(this.ws.vr.useDeviceMotionControls=!0)}};So.registerComponent("BigPlayButton",gu);var yu=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;So.registerComponent("MouseTimeDisplay",class extends Ta{Bh(t){const i=t.track;"metadata"===i.kind&&"thumbnails"===i.label&&void 0===this.Ih&&(this.Ih=i,this.Fh=i.src?Mt.Dh(i.src).href:void 0,this.Ih.addEventListener(["addcue","removecue"],this.$h),this.Rh())}Oh(t){t.track===this.Ih&&this.Vh()}createEl(){const t=super.createEl();return this.Uh=So.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.zh=So.createEl("canvas",{className:"theo-time-tooltip-thumbnail"}),t}update(t,i){super.update(t,i),this.keepTooltipsInside&&this.Lh(t)}Lh(t){let i;if(this.Ih&&this.Ih.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.Ih.cues,t);i=s&&s.content}if(i===this.Hh)return;if(this.Hh=i,So.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",!!i),!i)return void this.qh();const s=i.match(yu);if(s){let[,t,i,e,n,r]=s;t=this.Wh(t);const h={Gh:+i,Xh:+e,ji:+n,Ti:+r};this.Jh(t,h)}else{const t=this.Wh(i);this.Jh(t)}}Rh(){S(this.An)||this.Lh(this.An)}Wh(t){return this.Ih&&this.Fh?Mt.Dh(t,this.Fh).href:t}Jh(t,i){this.Uh&&(this.Uh.src!==t?(this.Uh.onload=()=>{this.Qh(i)},this.Uh.src="",this.Uh.src=t):this.Qh(i))}Qh(t){if(!this.zh||!this.Uh)return;const i=this.zh.getContext("2d");i&&(null!=t||(t={Gh:0,Xh:0,ji:this.Uh.naturalWidth,Ti:this.Uh.naturalHeight}),this.zh.width=t.ji,this.zh.height=t.Ti,i.drawImage(this.Uh,t.Gh,t.Xh,t.ji,t.Ti,0,0,t.ji,t.Ti),this.Yh(this.zh))}Yh(t){this.Kh||(Xt(this.tooltip,t),this.Kh=t),this.En()}qh(){this.Kh&&(this.tooltip.removeChild(this.Kh),this.Kh=void 0,this.En())}Vh(){void 0!==this.Ih&&(this.Ih.removeEventListener(["addcue","removecue"],this.$h),this.Ih=void 0),this.Fh=void 0,this.qh(),this.Hh=void 0}dispose(){this.Vh(),super.dispose()}constructor(t,i){super(t,i),this.Kh=void 0,this.Ih=void 0,this.Fh=void 0,this.Zh=t=>this.Bh(t),this.io=t=>this.Oh(t),this.$h=t=>this.Rh(),this.showThumbnails=()=>{this.Kh&&this.Kh.hidden&&(this.Kh.hidden=!1,this.En())},this.hideThumbnails=()=>{!this.Kh||this.Kh.hidden||this.player().scrubbing()||(this.Kh.hidden=!0,this.En())},this.on(this.player().textTracks(),"addtrack",this.Zh),this.on(this.player().textTracks(),"removetrack",this.io),Pt.Qs&&(this.on(t,"seeking",this.showThumbnails),this.on(t,"seeked",this.hideThumbnails))}});var bu=So.getComponent("VolumeLevel");So.registerComponent("VolumeLevel",class extends bu{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-volume-level "+super.buildCSSClass()}});var ku=So.getComponent("Component"),wu=class extends ku{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-menu-container "+super.buildCSSClass()}};wu.prototype.h=vi({},wu.prototype.h,{children:[]}),So.registerComponent("controlBarMenuContainer",wu);var _u=So.getComponent("Player"),xu=class extends _u{dispose(){const t=this.el(),i=this.contentEl(),s=t.parentNode,e=t.nextSibling;super.dispose(),Wt(i),this.Ci&&s&&(e?s.insertBefore(t,e):s.appendChild(t)),h.body.removeEventListener("keydown",this.handleKeyPress),h.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")},h.body.addEventListener("keydown",this.handleKeyPress),h.body.addEventListener("click",this.handleClick)}};xu.prototype.h=vi({},_u.prototype.h,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","upcomingAdNotificationText","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),So.registerComponent("Player",xu);var Cu=So.getComponent("Player"),Su=Cu.prototype.es;Cu.prototype.es=function(t){if(!(this.H&&this.H.$s&&this.H.$s()))return Su.call(this,t)};var ju=Cu.prototype.createEl;function Tu(t,i,e,n){let r=vi({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},e);r.controlBar=vi({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&&Dt(e.language)&&(r.languages=vi({},r.languages,{[ut]:e.language}),r.language=ut),i.setAttribute("data-vjs-player","");let o=i.getAttribute("style"),a=So(t.element,r,n);return a.ready((()=>{Do(a),function(t,i){if(i){if(i.ads){const s=i=>{const s="adbreakbegin"===i.type,e=i.adBreak.integration===ft.so;Oo(t,s,e)};i.ads.addEventListener("adbreakbegin",s),i.ads.addEventListener("adbreakend",s)}if(i.verizonMedia){const s=i=>{const s="adbreakbegin"===i.type;Oo(t,s,!1)};i.verizonMedia.ads.adBreaks.addEventListener("addadbreak",(t=>{t.adBreak.addEventListener("adbreakbegin",s),t.adBreak.addEventListener("adbreakend",s)}))}i.addEventListener("sourcechange",(()=>{Oo(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"),Mt.Ys.Qs&&(Kt(i,"theo-mobile"),function(t){let i=s.outerHeight,e=s.outerWidth,n=i>e;n?(ti(t,"theo-mobile-landscape"),Kt(t,"theo-mobile-portrait")):(ti(t,"theo-mobile-portrait"),Kt(t,"theo-mobile-landscape"))}(i)),function(t){t.on("seeking",(()=>{Qt(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()}))}(a),a}Cu.prototype.createEl=function(){let t=ju.call(this),i=So.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.S=i,t};var Mu=So.getComponent("Button");var Au="THEOPiPCloseButton";So.registerComponent(Au,class extends Mu{buildCSSClass(){return"theo-close-button theo-pip-close"}handleClick(){this.no.eo()}constructor(t,i){if(super(t,i),this.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.no)}(i))throw new g("Invalid Picture-in-picture options.");this.no=i.no}});var Pu,Eu=class extends ${get ro(){return this.ho}get oo(){return this.t.cs()}ao(){this.t.yn(H.jh,this.uo),this.co||this.t.yn(H.lo,this.do),this.t.fo.on("languagechange",this.te)}vo(){var t;return"theo-pip-"+(null!=(t=this.po)?t:"bottom-right")}mo(t){let i=this.yo;i&&!this.oo&&(this.bo||this.ko(),this.wo(),Kt(i,"theo-pip"),Kt(i,this.vo()),this.ho=!0,this._o=t,this.xo=!1,this.Co(new Ot(Lt.PICTURE_IN_PICTURE)))}So(t){let i=this.yo;i&&(this.jo(),ti(i,"theo-pip"),ti(i,this.vo()),this.ho=!1,this.xo=t,this.To=this._o,this._o=!1,this.Co(new Ot(Lt.INLINE)))}ko(){if(!this.bo){let t=this.t.fo;t.addChild(Au,{no:this});let i=h.createElement("div");i.className="theo-pip-overlay",this.Mo=h.createElement("div"),this.Mo.className="theo-pip-overlay-text",l(this.Mo,t.localize("Video playing in Picture-in-Picture mode")),i.appendChild(this.Mo),Xt(t.el(),i),this.Ao=i,this.bo=!0}}Po(){this.Eo&&!this.No&&this.t.Bo&&(this.Io=this.t.Bo.Fo(U,this.Do),this.No=!0)}$o(){this.Io&&this.t.Bo&&(this.t.Bo.Ro(this.Io),this.No=!1)}wo(){let t=this.t.fo.contentEl(),i=t.getBoundingClientRect(),s=h.documentElement.clientWidth,e=h.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"}jo(){let t=this.t.fo.contentEl();t.style.top="",t.style.bottom="",t.style.right="",t.style.left="",t.style.width="",t.style.height="",t.style.position=""}Oo(){ti(this.yo,"theo-pip"),this.ro&&this.po&&ti(this.yo,"theo-pip-"+this.po),this.Ao&&(Wt(this.Ao),this.Ao=void 0)}gn(){this.Oo(),this.$o(),this.Vo(),this.t.fn(H.jh,this.uo),this.t.fn(H.lo,this.do),this.t.fo.off("languagechange",this.te),this.t=void 0}constructor(t,i,s){super(),this.Uo=!1,this.ho=!1,this.xo=!1,this._o=!1,this.bo=!1,this.No=!1,this.To=!1,this.uo=()=>{this.Uo=!0,this.Eo&&!this.ro&&this.Io&&this.zo&&this.Io.Lo<=this.zo&&this.mo(!1)},this.do=()=>{this.co||(this.Uo=!1,this.So(!1))},this.te=()=>{if(this.Mo){const t=this.t.fo;l(this.Mo,t.localize("Video playing in Picture-in-Picture mode"))}},this.Do=t=>{!this._o&&this.Eo&&(S(t)||(this.zo&&t<=this.zo||this.To?this.ho||this.xo||this.mo(!1):this.ho?this.So(!1):this.xo=!1))},this.zo=i.visibility,this.po=i.position,this.co=i.retainPresentationModeOnSourceChange,this.Eo=void 0!==this.zo,this.t=t,this.yo=t.Ho,this.eo=s,this.ao()}},Nu=class extends qt{qo(){let t=super.qo();return t===Lt.INLINE&&this.Wo&&this.Wo.ro?Lt.PICTURE_IN_PICTURE:t}Go(t){return t===Lt.PICTURE_IN_PICTURE||super.Go(t)}Xo(t,i){t===Lt.FULLSCREEN&&this.Wo.$o(),super.Xo(t,i),t!==Lt.FULLSCREEN&&this.Wo.Po()}Jo(t,i){t!==i&&(t===Lt.FULLSCREEN&&this.Wo.So(!1),t===Lt.INLINE&&i===Lt.PICTURE_IN_PICTURE&&this.Wo.So(!0),super.Jo(t,i),t===Lt.PICTURE_IN_PICTURE&&(i===Lt.INLINE?this.Wo.mo(!0):this.Wo.mo(!1)))}gn(){super.gn(),this.Wo.gn(),this.Qo.fn(H.jh,this.Yo),this.Qo=void 0}constructor(t,i,s){super(i),this.Ko=()=>this.Yr(),this.eo=()=>this.Zo(Lt.INLINE),this.Yo=()=>{this.qo()!==Lt.FULLSCREEN&&this.Wo.Po(),this.Qo.fn(H.jh,this.Yo)},this.Qo=t,this.Wo=new Eu(t,s.pip,this.eo),this.Wo.yn("presentationmodechange",this.Ko),this.Qo.yn(H.jh,this.Yo),this.Yr()}},Bu=class extends ${get ta(){return fi.ia(this.fo.el())||this.fo.supportsFullScreen()}get cs(){return this.fo.isFullscreen()||this.sa}mo(){this.fo.requestFullscreen()}So(){this.fo.exitFullscreen(),this.ea.So()}gn(){this.Vo(),this.fo.off("fullscreenchange",this.na),this.ea.fn($t.ra,this.na),this.ea.fn($t.ha,this.Ds),this.fo.isFullWindow&&this.fo.exitFullscreen()}constructor(t,i){super(),this.Os=!1,this.sa=!1,this.oa=!1,this.na=()=>{if(this.oa)return;let t=this.Os,i=this.cs;t!==i&&(this.Os=i,this.Co(new ui))},this.aa=()=>{this.sa=this.ea.cs,this.na()},this.ua=()=>{this.oa||(this.fo.isFullWindow&&this.fo.supportsFullScreen()||this.sa&&!this.fo.supportsFullScreen())&&(this.oa=!0,this.fo.exitFullscreen(),this.fo.requestFullscreen(),this.oa=!1,this.na())},this.fo=t,this.ea=i,this.fo.on("fullscreenchange",this.na),this.ea.yn($t.ra,this.aa),this.ea.yn($t.ca,this.ua),this.ea.yn($t.ha,this.Ds),this.na()}};function Iu(t){return class extends t{get Bo(){return this.la}cs(){return"fullscreen"===this.da.qo()}fa(){return function(t,i){let s=w.create(t);const e=i.fo;return X(s,{get controls(){return e.controls()},set controls(t){e.controls(tt(t))},get presentation(){return i.da.va},get presentationMode(){return i.da.qo()},set presentationMode(t){const s=Gt(t);s&&i.da.Zo(s)},get ui(){return e},get visibility(){return i.Bo.va}})}(this.pa,this)}gn(){super.gn(),this.da.gn(),this.ma.gn(),this.fo.dispose(),this.la.gn()}ga(t){this.fo.src(""),super.ga(t)}constructor(t,i,s){super(i,s),this.Ho=t,this.la=new L(t),this.pa=super.fa(),w.defineProperty(this.pa,"constructor",{value:J}),this.fo=Tu(this.pa,this.Ho,s.ui),this.ma=new Bu(this.fo,this.ya),this.da=new Nu(this,this.ma,s),this.da.yn("presentationmodechange",this.Ds)}}}function Fu(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=tt(t.retainPresentationModeOnSourceChange),t}function Du(){return Pu||(Pu=function(t){let i=t;for(const t of ji)i=t(i);return i}(Pu=Iu(G()))),Pu}function $u(t,i){const s=function(t){const i=Bt(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=Fu(i.pip),i}(i),e=h.createElement("div");ni(e),t.appendChild(e);const n=new(Du())(t,e,s);n.ba=n;let r=n.va;return n.ka(),n.wa(q),w.defineProperty(r,"constructor",{value:$u}),r=W(r),jt(n),function(t){for(const i of Mi)i(t)}(n),r}var Ru="theo-cast-",Ou=So.getComponent("Button"),Vu=class extends(Io(Ou)){get _a(){throw new g("xa")}get Ca(){return this.h.Ca}get Sa(){return this.h.Sa}buildCSSClass(){return Ru+"button theo-"+this.Sa+"-button theo-controlbar-button "+super.buildCSSClass()}createEl(t,i,s){const e=super.createEl(),n=h.createElement("div");n.className="theo-button-icon-blur";const r=h.createElement("div");return r.className=Ru+"svg-container",r.innerHTML=this.Ca,e.appendChild(n),e.appendChild(r),e}handleClick(t){var i;if(super.handleClick(t),this.ja===Jt.AVAILABLE)null==(i=this._a)||i.start();else if(this.ja===Jt.CONNECTED||this.ja===Jt.CONNECTING){var s;null==(s=this._a)||s.stop()}}Ta(t){ti(this.yo,"theo-"+this.Sa+"-"+this.ja),this.ja=t,Kt(this.yo,"theo-"+this.Sa+"-"+this.ja),this.te()}te(){this.Ma(this.ja),this.Ie.Be=this.controlText()}Ma(t){t===Jt.CONNECTED?this.controlText("Stop Casting"):t===Jt.AVAILABLE?this.controlText("Start Casting"):t===Jt.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")}constructor(t,i){var s;super(t,i),this.yo=t.el(),this.ja=Jt.UNAVAILABLE,this.controlText("Unavailable"),this.Ie=new ra(this,this.controlText()),null==(s=this._a)||s.addEventListener("statechange",(t=>{const i=t;this.Ta(i.state)})),Mt.Ys.Je&&(this.Aa=new Wo(this.el())),this.Ta(this._a?this._a.state:Jt.UNAVAILABLE),this.on(t,"languagechange",this.te)}},Uu=0;function zu(){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-'+Uu+'">\n <path d="M0-36h44V0H0z"/>\n </clipPath>\n </defs>\n <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 <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-'+Uu+')">\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 Uu++,t}So.registerComponent("chromecastButton",class extends Vu{get _a(){var t;return null==(t=this.ws.cast)?void 0:t.chromecast}constructor(t,i){super(t,vi({},i,{Sa:"chromecast",Ca:zu()}))}});var Lu="theo-chromecast-",Hu=So.getComponent("Component"),qu=class t extends(Io(Hu)){buildCSSClass(){return Lu+"overlay "+super.buildCSSClass()}createEl(){const i=super.createEl();Kt(i,Lu+"overlay");const s=So.createEl("div",{className:Lu+"status-icon",innerHTML:t.ICON_SVG}),e=So.createEl("div",{className:Lu+"status-info"});l(e,"Playing on");const n=So.createEl("div",{className:Lu+"status-title"}),r=So.createEl("div",{className:Lu+"status"});return this.mr=n,r.appendChild(s),r.appendChild(e),r.appendChild(n),i.appendChild(r),i}dispose(){var t;null==(t=this.Pa)||t.removeEventListener("statechange",this.update),this.Pa=void 0,this.ws.removeEventListener("play",this.update),super.dispose()}constructor(t,i){var s,e;super(t,i),this.update=()=>{this.Pa?(this.mr&&l(this.mr,this.Pa.receiverName||""),this.Pa.state===Jt.CONNECTED?this.show():this.hide()):this.hide()},this.Pa=null==(s=this.ws.cast)?void 0:s.chromecast,null==(e=this.Pa)||e.addEventListener("statechange",this.update),this.ws.addEventListener("play",this.update),this.update()}};qu.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>',So.registerComponent("chromecastOverlay",qu);So.registerComponent("airplayButton",class extends Vu{dispose(){var t,i;null==(t=this.ws.ads)||t.removeEventListener("adbreakbegin",this.Ea),null==(i=this.ws.ads)||i.removeEventListener("adbreakend",this.Na),this.ws.removeEventListener("currentsourcechange",this.Na),super.dispose()}get _a(){var t;return null==(t=this.ws.cast)?void 0:t.airplay}constructor(t,i){var s,e;super(t,vi({},i,{Sa:"airplay",Ca:'\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.Ea=()=>{this.disable()},null==(s=this.ws.ads)||s.addEventListener("adbreakbegin",this.Ea),null==(e=this.ws.ads)||e.addEventListener("adbreakend",this.Na),this.ws.addEventListener("currentsourcechange",this.Na)}});var Wu=So.getComponent("Button"),Gu=class extends(Io(Wu)){buildCSSClass(){return"theo-vr-button theo-controlbar-button "+super.buildCSSClass()}handleClick(){this.ws.vr.stereo=!this.ws.vr.stereo,this.te()}_n(){this.ws.vr&&this.ws.vr.state!==wt.Rs?(this.show(),this.ws.vr.canPresentVR?(this.enable(),this.te()):(this.disable(),this.controlText("No VR capable device found"),this.Ba.Be=this.controlText())):this.hide()}te(){var t;this.controlText((null==(t=this.ws.vr)?void 0:t.stereo)?"Stop watching in VR":"Watch in VR"),this.Ba.Be=this.controlText()}dispose(){var t;null==(t=this.ws.vr)||t.removeEventListener("statechange",this.Ia),super.dispose()}constructor(t,i){var s;super(t,i),this.Ia=()=>this._n(),this.controlText("Watch in VR"),this.Ba=new ra(this,this.controlText()),null==(s=this.ws.vr)||s.addEventListener("statechange",this.Ia),this._n(),Mt.Ys.Je&&new Wo(this.el()),this.on(t,"languagechange",this.te)}};So.registerComponent("vrButton",Gu);var Xu=So.getComponent("Component"),Ju=class extends Xu{createEl(){let t=super.createEl("div",{className:this.buildCSSClass()}),i=So.createEl("div",{className:"theo-360-fov"});return t.appendChild(i),this.Fa=i,t}buildCSSClass(){return"theo-360-compass "+super.buildCSSClass()}_n(){this.ws.vr.state===wt.Rs?this.hide():this.show()}Da(){let t=-this.ws.vr.direction.yaw+40;this.Fa.style[ri("transform")]="scale(0.875) rotate("+t+"deg) skew("+"-10deg)"}dispose(){this.ws.vr.removeEventListener("statechange",this.Ia),this.ws.vr.removeEventListener("directionchange",this.$a),super.dispose()}constructor(t,i,s){super(t,i),this.Ia=()=>this._n(),this.$a=()=>this.Da(),this.ws=s,this.ws.vr.addEventListener("statechange",this.Ia),this.ws.vr.addEventListener("directionchange",this.$a),this._n(),this.Da()}},Qu=_.pow(2,31)-1,Yu=So.getComponent("Component"),Ku=class extends Yu{Ra(){this.ws.vr.state===wt.Oa?this.Va():this.Ua()}Va(){if(this.za)return;this.za=!0;let t=this.ws.element;this.La=t.style.zIndex||"",t.style.zIndex=""+Qu,this.Ha=this.player().isFullscreen(),this.player().requestFullscreen()}Ua(){if(!this.za)return;this.za=!1,this.ws.element.style.zIndex=this.La,this.Ha?this.player().requestFullscreen():this.player().exitFullscreen()}dispose(){this.Ua(),this.ws.vr.removeEventListener("statechange",this.qa),super.dispose()}constructor(t,i,s){super(t,i),this.za=!1,this.Ha=!1,this.La="",this.qa=()=>this.Ra(),this.ws=s,this.ws.vr.addEventListener("statechange",this.qa),this.Ra()}};Ai((function(t){let i=t.va;if(!i.vr)return;let s=t.fo,e=new Ju(s,{},i);if(t.yn(H.lo,(()=>{var i;s.removeChild(e);let n=null==(i=t.Wa())?void 0:i.vr;void 0===n||n.nativeVR||s.addChild(e)})),Pt.Ga){let t=new Ku(s,{},i);s.addChild(t)}}));var Zu=class extends O{constructor(){super("relatedchange")}},tc=["relatedchange"],ic=class extends ${get va(){return this.Xa||(this.Xa=function(t){let i,s={get sources(){return t.Ja},set sources(i){t.Ja=i},addEventListener(t,s){i.yn(t,s)},removeEventListener(t,s){i.fn(t,s)}};return i=new Ut(tc,!0,s),i.Qa(t),s}(this)),this.Xa}get Ja(){return this.Ya}set Ja(t){this.Ya=function(t){return t.filter((t=>t&&(Rt(t.link)||K(t,["source"]))))}(t),t.length>this.Ya.length&&console.warn("One or more of the configured related content sources are invalid. Check if they have a source or a link."),this.Co(new Zu)}gn(){this.Vo(),this.Ya=[]}constructor(...t){super(...t),this.Ya=[]}};Ct((function(t){return class extends t{fa(){const t=this.Ka;return X(super.fa(),{get related(){return t.va}})}gn(){this.Ka.gn(),super.gn()}constructor(t,i){super(t,i),this.Ka=new ic}}}),_t.Za);var sc=So.getComponent("Button"),ec=class extends sc{buildCSSClass(){return"vjs-icon-view-grid theo-related-button "+super.buildCSSClass()}handleClick(){this.iu.tu?this.iu.be():this.iu.ge()}te(){this.Ie.Be=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.yo=t.el(),this.iu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText(this.localize("Related content")),this.Ie=new ra(this,this.controlText()),this.on(t,"languagechange",this.te)}},nc=So.getComponent("Button"),rc=class extends nc{buildCSSClass(){return"theo-secondary-background theo-close-button"}handleClick(){this.su.hide()}constructor(t,i){super(t),this.su=i}},hc=(()=>{let t=h.createElement("div");return t.className="theo-related-grid-tile",t.innerHTML='<a class="theo-related-grid-tile-content"><div class="theo-related-grid-tile-image"></div><span class="theo-related-grid-tile-title theo-primary-border theo-tertiary-background"></span><span class="theo-related-grid-tile-duration"></span></a>',t})();function oc(t,i,s){let e=hc.cloneNode(!0),n=e.querySelector(".theo-related-grid-tile-content");K(s,["source"])?(n.style.cursor="pointer",n.addEventListener("click",(()=>{t.source=s.source,i.be()}))):Rt(s.link)&&n.setAttribute("href",s.link);let r=e.querySelector(".theo-related-grid-tile-image");r.style.backgroundImage='url("'+yi(s.image)+'")',r.removeAttribute("id");let h=e.querySelector(".theo-related-grid-tile-title");s.title?(l(h,s.title),h.removeAttribute("id")):Wt(h);let o=e.querySelector(".theo-related-grid-tile-duration");return s.duration?(l(o,s.duration),o.removeAttribute("id")):Wt(o),e}var ac=[15,12,9,8,6,4,3,2,1];var uc=class{get eu(){return"theo-"+this.nu+"-item-grid"}ru(){this.hu.focus()}ou(t){this.au(),function(t){if(t.length)for(let i of ac)if(t.length>=i){t.length=i;break}}(t),this.uu(t.length);for(let i of t){let t=oc(this.cu.va,this.lu,i);this.du.appendChild(t)}}au(){this.du.innerHTML=""}fu(){let t=h.createElement("div");t.className="theo-overlay-panel";const i=h.createElement("div");return i.className="theo-related-grid",this.vu.className="theo-related",this.hu.controlText("Close Related Content"),this.pu.appendChild(this.vu),this.vu.appendChild(t),t.appendChild(this.hu.el()),t.appendChild(i),i}uu(t){ti(this.du,this.eu),this.nu=t,Kt(this.du,this.eu)}gn(){Wt(this.vu),this.mu.gn(),this.gu.gn(),this.hu.dispose(),this.cu=void 0}constructor(t,i,s,e,n){this.cu=t,this.yu=i,this.lu=s,this.pu=e,this.nu=12,this.bu=t=>{this.du.style.width=t.width+"px"},this.vu=h.createElement("div"),this.hu=new rc(this.yu,{hide:()=>{this.lu.be()}}),this.du=this.fu(),this.gu=new cc(n),this.gu.yn(ii.pn,this.bu),this.mu=new pt(this.du,this.gu),this.uu(12)}},cc=class extends ${get ku(){return this.wu||0}get _u(){return this.xu._u}gn(){this.Vo(),this.xu.fn(ii.pn,this.Cu)}constructor(t){super(),this.xu=t,this.Cu=t=>{let i=t.width;if(9*(t.width/16)>t.height){i=16*(t.height/9)}this.wu=i,this.Co(new ei(this.ku,t.height))},this.xu.yn(ii.pn,this.Cu)}},lc=class extends O{constructor(){super("show")}},dc=class extends O{constructor(){super("hide")}},fc="theo-related-available",vc="theo-related-showing",pc=[...tc,"show","hide"],mc=class extends ${get va(){return this.Xa||(this.Xa=function(t){let i;const s={get sources(){return t.Ja},set sources(i){t.Ja=i},get showing(){return t.tu},show(){t.ge()},hide(){t.be()},addEventListener(t,s){i.yn(t,s)},removeEventListener(t,s){i.fn(t,s)}};return i=new Ut(pc,!0,s),i.Qa(t),s}(this)),this.Xa}get Ja(){return this.Su.Ja}set Ja(t){this.Su.Ja=t}get tu(){return this.ju}ge(){let t=this.ju;this.ju=!0,this.Tu(vc),this.Mu.ru(),this.yu.paused()?this.Au=!0:this.yu.pause(),t!==this.ju&&this.Co(new lc)}be(){let t=this.ju;this.ju=!1,this.Pu(vc),this.Eu.focus(),this.Au||this.yu.play(),this.Au=!1,t!==this.ju&&this.Co(new dc)}Tu(t){this.yu.el().classList.add(t)}Pu(t){this.yu.el().classList.remove(t)}gn(){this.Vo(),this.Mu.gn()}constructor(t,i,s,e){super(),this.ju=!1,this.Au=!1,this.Nu=t=>{const i=this.Ja;this.Mu.ou(i),i.length?(this.Tu(fc),this.Eu.show()):(this.Pu(fc),this.Eu.hide()),this.Co(t)},this.Su=i,this.Su.yn("relatedchange",this.Nu),this.yu=s,this.Mu=new uc(t,this.yu,this,s.contentEl(),e),this.Eu=new ec(s,this,{})}};Ti((function(t){return class extends t{fa(){const t=this.Bu;return X(super.fa(),{get related(){return t.va}})}gn(){this.Bu.gn(),super.gn()}constructor(t,i,s){super(t,i,s),this.Bu=new mc(this,this.Ka,this.fo,this.Iu)}}}));var gc,yc=So.getComponent("Button"),bc=class extends yc{buildCSSClass(){return"vjs-icon-share theo-social-button "+super.buildCSSClass()}handleClick(){this.Fu.showing?this.Fu.hide():this.Fu.show()}te(){this.Ie.Be=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.yo=t.el(),this.Fu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText("Share Video"),this.Ie=new ra(this,this.controlText()),this.on(t,"languagechange",this.te)}};function kc(t,i,s){switch(i){case"iconurl":return function(t,i){let s=h.createElement("a");var e;s.className="theo-social-iconurl",s.title=null!=(e=t.label)?e:"",s.target="Du",s.href=i;const n=h.createElement("img");var r,o;return n.src=null!=(r=t.icon)?r:"",n.alt=null!=(o=t.label)?o:"",n.width=25,n.height=25,s.appendChild(n),s}(t,s);case"text":return function(t){let i=h.createElement("div");if(i.className="theo-social-text",t.label){let s=h.createElement("h5");s.className="theo-primary-background theo-social-label",l(s,t.label),i.appendChild(s)}let s=h.createElement("p");var e;return s.className="theo-social-content-container theo-tertiary-background",s.tabIndex=0,l(s,null!=(e=t.text)?e:""),i.appendChild(s),i}(t);case"texturl":return function(t,i){let s=h.createElement("div");if(s.className="theo-social-texturl",t.label){let i=h.createElement("h5");i.className="theo-primary-background theo-social-label",l(i,t.label),s.appendChild(i)}let e=h.createElement("div");e.className="theo-social-content-container theo-tertiary-background";let n=h.createElement("a");return n.target="Du",n.href=i,l(n,i),e.appendChild(n),s.appendChild(e),s}(t,s)}}!function(t){t.$u="iconurl",t.Ru="text",t.Ou="texturl"}(gc||(gc={}));var wc="<URL>";var _c=class{get we(){return this.vu}Vu(t){this.au();for(let i of t)this.Uu(i)}ru(){this.hu.focus()}Uu(t){let i=function(t,i){return t.src?mi(t.src,wc)?t.src.replace(wc,i):t.src:i}(t,this.lu.zu),s=function(t){if(t)return t.icon?"iconurl":t.text?"text":"texturl"}(t),e=kc(t,s,i);e&&("iconurl"===s?this.Lu.appendChild(e):this.Hu.appendChild(e))}au(){this.Lu.innerHTML="",this.Hu.innerHTML=""}gn(){Wt(this.vu),this.qu.gn()}constructor(t,i,s,e){this.Qo=t,this.lu=i,this.pu=s,this.Wu=e;const n=h.createElement("div");n.className="theo-overlay-panel",this.hu=new rc(this.Qo,this.lu.va),this.hu.controlText("Close Share"),this.Mu=h.createElement("div"),this.Mu.className="theo-social-container",this.vu=h.createElement("div"),this.vu.className="theo-social",this.Lu=h.createElement("div"),this.Lu.className="theo-social-icon-container",this.Hu=h.createElement("div"),this.Hu.className="theo-social-text-container",this.pu.appendChild(this.vu),this.vu.appendChild(n),this.Mu.appendChild(this.Lu),this.Mu.appendChild(this.Hu),n.appendChild(this.hu.el()),n.appendChild(this.Mu),this.qu=new pt(this.vu,this.Wu)}},xc="theo-social-available",Cc="theo-social-showing",Sc=class{get va(){return this.Xa}get tu(){return this.ju}get Gu(){return this.Xu}set Gu(t){this.Xu=t,this.Mu.Vu(t),t.length?(this.Tu(xc),this.Eu.show()):(this.Pu(xc),this.Eu.hide())}get zu(){return this.Ju||Ht()}set zu(t){this.Ju=t}ge(){this.ju=!0,this.Tu(Cc),this.Mu.ru(),this.Qu.paused()?this.Au=!0:this.Qu.pause()}be(){this.ju=!1,this.Pu(Cc),this.Eu.focus(),this.Au||this.Qu.play(),this.Au=!1}Tu(t){this.Qu.el().classList.add(t)}Pu(t){this.Qu.el().classList.remove(t)}gn(){this.Eu.dispose(),this.Mu.gn()}constructor(t,i){this.ju=!1,this.Xu=[],this.Au=!1,this.Xa=function(t){return{get showing(){return t.tu},get items(){return t.Gu},set items(i){t.Gu=i},get url(){return t.zu},set url(i){t.zu=i},show(){t.ge()},hide(){t.be()}}}(this),this.Qu=t,this.Mu=new _c(this.Qu,this,t.contentEl(),i),this.Eu=new bc(t,this.Xa,{})}};Ti((function(t){return class extends t{fa(){let t=this.Fu;return X(super.fa(),{get social(){return t.va}})}constructor(t,i,s){super(t,i,s),this.Fu=new Sc(this.fo,this.Iu)}}}));var jc=So.getComponent("Component"),Tc=class extends jc{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-upnext-container "+super.buildCSSClass()}};Tc.prototype.h=vi({},Tc.prototype.h,{children:[]}),So.registerComponent("upNextContainer",Tc);var Mc="theo-upnext-bar-",Ac=So.getComponent("Component"),Pc=class extends Ac{get tu(){return this.ju}set tu(t){this.ju=t,this.Yu&&(this.Yu.tabIndex=t?0:-1)}get Ku(){return this.Zu}set Ku(t){this.Zu=t}ga(t){this.au(),this.tc(t)}tc(t){if(t&&t.link&&t.image){const i=h.createElement("div");Kt(i,Mc+"content"),i.onclick=()=>{this.ic.next()},i.onkeypress=t=>{13===t.which&&this.ic.next()};let s=h.createElement("div");if(s.style.backgroundImage='url("'+yi(t.image)+'")',Kt(s,Mc+"image"),i.appendChild(s),t.duration){let i=h.createElement("span");Kt(i,Mc+"duration"),i.innerHTML=""+t.duration,s.appendChild(i)}let e=h.createElement("div");Kt(e,Mc+"text");let n=h.createElement("div");if(Kt(n,Mc+"upnext"),l(n,this.localize("Up Next")),e.appendChild(n),t.title){let i=h.createElement("div");Kt(i,Mc+"title"),l(i,t.title),e.appendChild(i)}i.appendChild(e),this.Yu=i,this.sc=n,this.el().appendChild(this.Yu)}}au(){this.el().innerHTML="",this.Yu=void 0,this.sc=void 0}te(){this.sc&&l(this.sc,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-bar "+super.buildCSSClass()}dispose(){this.qu.gn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.Yu=void 0,this.sc=void 0,this.ic=i,this.qu=new pt(this.el(),e),this.ju=!1,this.Zu=10,this.on(t,"languagechange",this.te)}},Ec="theo-upnext-panel-",Nc=pu,Bc=So.getComponent("Component"),Ic=class extends Bc{get tu(){return this.ju}set tu(t){this.ju=t}get ec(){return this.nc}set ec(t){this.nc=t}get rc(){return this.hc}set rc(t){this.hc=t}ga(t){this.au(),this.oc(t)}oc(t){if(t&&t.link&&t.image){let i=h.createElement("div");i.className=Ec+"content";let s=h.createElement("div");s.style.backgroundImage='url("'+yi(t.image)+'")',s.className=Ec+"image",i.appendChild(s);let e=h.createElement("div");e.className=Ec+"text";let n=h.createElement("div");if(n.className=Ec+"upnext",l(n,this.localize("Up Next")),e.appendChild(n),t.title){let i=h.createElement("div");i.className=Ec+"title",l(i,t.title),e.appendChild(i)}i.appendChild(e),this.ac=h.createElement("div"),this.ac.className=Ec+"autoplay",this.ac.innerHTML=mu;let r=this.ac.querySelector("svg");r.onclick=()=>{this.ic.next()},r.tabIndex=0,r.onkeypress=t=>{13===t.which&&this.ic.next()},this.uc=n,this.cc=this.ac.querySelector("."+Nc),i.appendChild(this.ac),this.el().appendChild(i)}}get lc(){return this.dc}set lc(t){this.dc=t,this.cc.style.strokeDashoffset=""+_.round(1e5*t)/1e5}au(){this.el().innerHTML="",this.uc=void 0,this.cc=void 0}te(){this.uc&&l(this.uc,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-panel "+super.buildCSSClass()}dispose(){this.qu.gn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.dc=0,this.ic=i,this.qu=new pt(this.el(),e),this.ju=!1,this.nc=10,this.hc=!0,this.on(t,"languagechange",this.te)}},Fc="theo-upnext-panel-showing",Dc="theo-upnext-bar-showing",$c=2*_.PI*73,Rc=class t{get va(){return this.Xa}get fc(){return this.vc}get mc(){return this.gc}get yc(){return this.bc}set yc(t){this.bc=t,this.Mu.ga(t),this.kc.ga(t),this.Qu.off("timeupdate",this.wc),this.Qu.off("ended",this._c),t&&(this.Qu.on("timeupdate",this.wc),this.Qu.on("ended",this._c))}xc(){this.Mu.ec?this.Cc=st(this.Mu.ec):0===this.Mu.ec?this.Cc=0:this.Cc=10,0!==this.Cc?(isFinite(this.Cc)&&(this.Sc=!0),this.Mu.tu=!0,this.Tu(Fc),this.Sc&&(this.Mu.lc=$c-$c/this.Cc,this.jc=v(this.Tc,1e3))):this.Mc()}Ac(){this.Mu.tu=!1,this.Pu(Fc),this.Sc&&(m(this.jc),this.Pc=1,this.Mu.lc=$c)}Ec(){this.kc.tu=!0,this.Tu(Dc)}Nc(){this.kc.tu=!1,this.Pu(Dc)}Mc(){m(this.jc),this.yc&&(s.location.href=this.yc.link)}Tu(t){this.Qu.el().classList.add(t)}Pu(t){this.Qu.el().classList.remove(t)}Bc(t,i){const s=t>=i&&!(this.Ic&&this.Ic.Fc);this.kc.tu&&!s?this.Nc():!this.kc.tu&&s&&this.Ec()}Dc(t,i){this.Mu.tu&&t<i&&!this.Qu.ended()&&this.Ac()}static $c(t,i){let s=st(t);if(!S(s))return i-s;let e=(""+t).match(/^([1-9]?\d|100)%$/);if(e){return i*(1-x(e[1],10)/100)}}gn(){this.jc&&m(this.jc),this.Qu.getChild("upNextContainer").removeChild(this.Mu),this.Qu.getChild("upNextContainer").removeChild(this.kc),this.Mu.dispose(),this.kc.dispose()}constructor(i,s,e){this.bc=void 0,this.Cc=10,this.Pc=1,this.jc=void 0,this.Sc=!0,this.Tc=()=>{this.Pc!==this.Cc?(this.Mu.lc-=$c/this.Cc,this.Pc+=1):this.Mc()},this._c=()=>{this.Mu.tu||this.xc()},this.wc=()=>{let i=this.Qu.currentTime(),s=this.Qu.duration(),e=s?t.$c(this.kc.Ku,s):void 0;void 0!==e&&this.Bc(i,e),this.Mu.rc&&this.Dc(i,s)},this.Xa=function(t){return{get source(){return t.yc},set source(i){t.yc=i},get bar(){return t.fc},get panel(){return t.mc},next(){t.Mc()}}}(this),this.kc=new Pc(i,this.Xa,{},s),this.Mu=new Ic(i,this.Xa,{},s),this.vc=function(t,i){return{get showing(){return i.tu},get offset(){return i.Ku},set offset(t){i.Ku=t},show(){t.Ec()},hide(){t.Nc()}}}(this,this.kc),this.gc=function(t,i){return{get showing(){return i.tu},get countdownDuration(){return i.ec},set countdownDuration(t){i.ec=t},get showUpNextPanel(){return i.rc},set showUpNextPanel(t){i.rc=t},show(){t.xc()},hide(){t.Ac()}}}(this,this.Mu),this.Qu=i,this.Ic=e,i.getChild("upNextContainer").addChild(this.kc,{}),i.getChild("upNextContainer").addChild(this.Mu,{})}};Ti((function(t){return class extends t{fa(){let t=this.Rc;return X(super.fa(),{get upnext(){return t.va}})}gn(){this.Rc.gn(),super.gn()}constructor(t,i,s){super(t,i,s),this.Rc=new Rc(this.fo,this.Iu,this.Oc)}}}));var Oc=So.getComponent("Component"),Vc=class extends Oc{createEl(){let t=super.createEl("ul",{className:"theo-context-menu"}),i=h.createElement("li"),s=h.createElement("a"),e=h.createElement("div");s.className="theo-context-menu-a",i.appendChild(s),e.className="theo-context-menu-logo",e.innerHTML='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t width="507.262px" height="399.16px" viewBox="0 0.1 507.262 399.16" enable-background="new 0 0.1 507.262 399.16"\n\t xml:space="preserve" class=\'theo-context-menu-logo-svg\'>\n\t<g transform="matrix(1.90897, 0, 0, 1.90897, 212.4, 144.6)">\n\t\t<path fill="#FFFFFF" d="M-38.416-53.802C-53.351-38.867-60.82-20.814-60.82,0.353c0,21.253,7.466,39.392,22.404,54.413\n\t\t\tc6.83,6.658,13.827,11.778,20.996,15.363c5.122,2.561,10.583,4.397,16.388,5.507v1.024h-78.481\n\t\t\tc-21.168,0-31.752-10.584-31.752-31.752v-88.724c0-21.252,10.584-31.879,31.752-31.879h79.377v0.896\n\t\t\tc-6.145,1.196-11.95,3.116-17.411,5.762C-24.632-65.538-31.586-60.46-38.416-53.802"/>\n\t</g>\n\t<g transform="matrix(0.535073, 0, 0, 0.535073, 242.35, 104.7)">\n\t\t<path fill="#FFFFFF" d="M188.354,104.104c-32.941,23.472-75.492,49.679-127.641,78.61c-50.275,28.254-94.358,50.44-132.254,66.572l-41.989,15.616\n\t\t\tc-2.645-11.348-5.122-28.17-7.426-50.44c-5.205-44.383-7.809-93.375-7.809-146.975c0-49.079,3.538-94.947,10.622-137.631\n\t\t\tl10.249-49.034l44.551,14.978C-24.762-88.838,17.06-67.03,62.124-38.777c47.705,29.871,88.638,58.294,122.773,85.266\n\t\t\tc17.061,13.571,29.351,24.028,36.862,31.367L188.354,104.104"/>\n\t</g>\n\t<g transform="matrix(1.91028, 0, 0, 1.91028, 327.15, 144.6)">\n\t\t<path fill="#FFFFFF" d="M94.286-43.816v88.723c0,21.168-10.583,31.751-31.751,31.751h-80.018v-1.025\n\t\t\tc14.683-2.816,27.527-9.77,38.537-20.867c14.936-15.024,22.405-33.16,22.405-54.413c0-21.168-7.467-39.22-22.405-54.156\n\t\t\tC9.871-64.985-3.188-71.939-18.123-74.671v-1.024h80.658C83.702-75.696,94.286-65.069,94.286-43.816"/>\n\t</g>\n</svg>\n',s.appendChild(e);let n=h.createElement("div");return n.className="theo-context-version",l(n,"Powered by THEOplayer 8.4.0"),s.appendChild(n),s.href="https://www.theoplayer.com/player-referral",s.target="Du",t.appendChild(i),t}Vc(t){const i=t;i.preventDefault(),this.show(),this.el().style.left="0",this.el().style.top="0";let s=this.player().contentEl(),e=s.getClientRects(),n=e.length>0?e[0]:void 0,r=i.clientX-s.getBoundingClientRect().left,h=C(getComputedStyle(this.el()).fontSize);D(this.el(),r,n,h);let o=i.clientY-s.getBoundingClientRect().top;R(this.el(),o,n,h),this.Uc()}zc(){this.hide(),this.clearTimeout(this.Lc)}Uc(){this.Lc=this.setTimeout(this.zc,4e3)}Hc(){this.clearTimeout(this.Lc)}dispose(){this.zc(),this.off(this.player(),"contextmenu",this.Vc),this.el().removeEventListener("mousedown",Uc,!0),this.off(h,"mousedown",this.zc),this.off("mouseout",this.Uc),this.off("mouseover",this.Hc),super.dispose()}constructor(t,i){super(t,i),this.Lc=0,this.on(this.player(),"contextmenu",this.Vc),this.el().addEventListener("mousedown",Uc,!0),this.on(h,"mousedown",this.zc),this.on("mouseout",this.Uc),this.on("mouseover",this.Hc),this.zc()}};function Uc(t){t.stopPropagation()}Ai((function(t){const i=new Vc(t.fo,{});t.fo.addChild(i),t.fo.on("dispose",(()=>{t.fo.removeChild(i),i.dispose()}))}));var zc={Default:"","Monospaced Serif":gi.qc,"Proportional Serif":gi.Wc,"Monospaced Sans-Serif":gi.Gc,"Proportional Sans-Serif":gi.Xc},Lc={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},Hc=[50,75,100,150,200];function qc(t){return{label:t+"%",value:t}}function Wc(t){return w.keys(t).map((i=>({label:i,value:t[i]})))}Hc.map((function(t){return{label:t+"%",value:t/100+"em"}}));var Gc=Hc.map((function(t){return{label:t+"%",value:t+"%"}})),Xc=[25,50,75,100].map(qc),Jc=[0,25,50,75,100].map(qc),Qc=Wc(Lc),Yc=Wc(zc),Kc=Wc({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),Zc=100,tl="#000000",il="#FFFFFF",sl="#000000",el=class extends qa{Jc(){let t=this.Fr.localize(this.Qc);l(this.Yc.subMenu.menuHeader.el(),t),this.Ir=h.createElement("span"),this.Ir.className="theo-settings-control-menu-item-title",l(this.Ir,t);let i=h.createElement("span");return i.className="theo-primary-color theo-settings-control-menu-item-value",Kt(this.Yc.el(),"theo-subtitle-options-menu-item"),this.Yc.el().appendChild(this.Ir),this.Yc.el().appendChild(i),i}Kc(t){const i=this.jr(t);i&&this.Zc(i)}tl(){return this.br}Ar(t){this.il(t.Tr)}Zc(t){for(let t of this.Cr.menuItems)t.selected(!1);t?(t.selected(!0),this.sl(t.Tr.label)):this.sl("Custom")}sl(t){this.nl=t,l(this.rl,this.Fr.localize(t)),this.Yc.parentMenu.re()}Mr(t){let i=super.Mr(t);return Kt(i.el(),"theo-subtitle-options-menu-item"),this.Nr(i),i}Nr(t){const i=this.Fr.localize(t.Tr.label);l(t.el(),i);const s=this.Fr.localize("Set "+this.Qc+" to ")+i;t.el().setAttribute("aria-label",s)}Re(){this.Fr.off("languagechange",this.te),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.Yc=t,this.Fr=e,this.nl="",this.te=()=>{let t=this.Fr.localize(this.Qc);l(this.Yc.subMenu.menuHeader.el(),t),l(this.Ir,t),this.sl(this.nl);for(const t of this.Sr)this.Nr(t)},this.Qc=i,this.il=s.Ko,this.rl=this.Jc(),this.br=s.hl,this.Fr.on("languagechange",this.te)}},nl=class t{static ol(t,i,s,e){if(void 0===t&&void 0===i)return;return P(void 0===t?s:t,void 0===i?e:i)}constructor(i){this.al=i,this.cl=t=>{this.al.fontFamily=t.value},this.ll=t=>{this.al.fontSize=t.value},this.dl=i=>{this.fl=i.value,this.al.fontColor=t.ol(this.vl,this.fl,il,Zc)},this.pl=i=>{this.vl=i.value,this.al.fontColor=t.ol(this.vl,this.fl,il,Zc)},this.ml=i=>{this.gl=i.value,this.al.backgroundColor=t.ol(this.gl,this.yl,tl,Zc)},this.bl=i=>{this.yl=i.value,this.al.backgroundColor=t.ol(this.gl,this.yl,tl,Zc)},this.kl=i=>{this.wl=i.value,this.al.windowColor=t.ol(this.wl,this._l,sl,Zc)},this.xl=i=>{this._l=i.value,this.al.windowColor=t.ol(this.wl,this._l,sl,Zc)},this.Cl=t=>{this.al.edgeStyle=t.value}}},rl=class{Sl(t,i){const s=this.jl(t,i.tl());s&&i.Kc(s)}jl(t,i){return A(i,(i=>i.value===t))}Tl(t,i,s){let e,n;if(void 0===t)e=this.jl(void 0,i.tl()),n=this.jl(void 0,s.tl());else if(t){let r=function(t){let i=Si(t);i||(i=Si(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=bi(wi(t),1));if(!i){let s=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=bi(wi(Lc[s]),1)}return i}(t);if(r){let t=xi(r),h=100*r.Ml;e=this.jl(t,i.tl()),n=this.jl(h,s.tl())}}e&&i.Kc(e),n&&s.Kc(n)}constructor(t,i){this.al=t,this.Al=i,this.Pl=()=>{let t=this.al.fontFamily;this.Sl(t,this.Al["Font family"]);let i=this.al.fontColor;this.Tl(i,this.Al["Font color"],this.Al["Font opacity"]);let s=this.al.fontSize;this.Sl(s,this.Al["Font size"]);let e=this.al.backgroundColor;this.Tl(e,this.Al["Background color"],this.Al["Background opacity"]);let n=this.al.windowColor;this.Tl(n,this.Al["Window color"],this.Al["Window opacity"]);let r=this.al.edgeStyle;this.Sl(r,this.Al["Character edge style"])},this.al.addEventListener("change",this.Pl),this.Pl()}};var hl=class extends qa{El(){return{"Font family":{hl:ol(Yc),Ko:this.Nl.cl},"Font color":{hl:ol(Qc),Ko:this.Nl.pl},"Font opacity":{hl:ol(Xc),Ko:this.Nl.dl},"Font size":{hl:ol(Gc),Ko:this.Nl.ll},"Background color":{hl:ol(Qc),Ko:this.Nl.ml},"Background opacity":{hl:ol(Jc),Ko:this.Nl.bl},"Window color":{hl:ol(Qc),Ko:this.Nl.kl},"Window opacity":{hl:ol(Jc),Ko:this.Nl.xl},"Character edge style":{hl:ol(Kc),Ko:this.Nl.Cl}}}Bl(){this.Ir=h.createElement("span"),this.Ir.className="theo-settings-control-menu-item-title",this.Il=h.createElement("span"),this.Il.className="theo-primary-color theo-settings-control-menu-item-value",this.Lr.el().appendChild(this.Ir),this.Lr.el().appendChild(this.Il),this.te()}Mr(t){let i=this.Cr.addSubMenuItem();return i.Tr=t,this.Al[t]=new el(i,t,this.Fl[t],this.Fr),i}Nr(t){}Ar(t){}Re(){this.Fr.off("languagechange",this.te),this.Dl.removeEventListener(["addtrack","removetrack"],this.$l),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.Lr=t,this.Dl=i,this.Fr=e,this.Al={},this.$l=()=>{this.Dl.some((t=>mt(t.kind)))?this.Lr.show():this.Lr.hide()},this.te=()=>{l(this.Cr.menuHeader.el(),this.Fr.localize("Subtitle Options")),l(this.Ir,this.Fr.localize("Subtitle")),l(this.Il,this.Fr.localize("Options")),this.Lr.el().setAttribute("aria-label",this.Fr.localize("Open the subtitle options menu"))},this.Nl=new nl(s),this.Fl=this.El(),this.br=w.keys(this.Fl),this.Bl(),this.Rl=new rl(s,this.Al),this.Fr.on("languagechange",this.te),this.Dl.addEventListener(["addtrack","removetrack"],this.$l),this.$l()}};function ol(t){let i=[{label:"Default",value:void 0}];for(let s of t)"Default"!==s.label&&i.push(s);return i}Ai((function(t){const i=t.fo.controlBar.getChild("SettingsButton").menu,s=i.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),e=new hl(s,t.nt.va,t.Ol.va,t.fo);t.fo.on("dispose",(()=>{i.removeMenuItem(s),s.dispose(),e.Re(),i.dispose()}))}));var al=So.getComponent("Component"),ul=class extends al{buildCSSClass(){return"theo-ad-control-panel"}createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}constructor(t,i){super(t,i),t.adControlBar=this}};ul.prototype.h=vi({},al.prototype.h,{children:[]}),So.registerComponent("AdControlPanel",ul);var cl=So.getComponent("Component"),ll="theo-dai-countdown",dl=class extends cl{buildCSSClass(){return ll}createEl(t,i,s){const e=h.createElement("div");return e.className=ll,e}Vl(t,i){i.addEventListener("adbreakbegin",(()=>this.show())),i.addEventListener("adbreakend",(()=>this.hide())),t.addEventListener("timeupdate",this.te)}constructor(t,i,s){super(t,s),this.Qo=t,this.Xa=i,this.te=()=>{const t=this.Xa.ads;t.playing&&t.currentAdBreak&&t.currentAds.length&&l(this.contentEl(),function(t,i,s){const e=t.ads;let n="";const r=e.length;if(r>1){const t=e.indexOf(i)+1;n=s("Ad")+" "+t+"/"+r+". "}const h=_.ceil(t.maxRemainingDuration);return n+=s("The content will resume in {1} seconds.").replace("{1}",""+h),n}(t.currentAdBreak,t.currentAds[0],(t=>this.Qo.localize(t))))},this.yo=t.el(),this.Vl(i,i.ads),this.on(t,"languagechange",this.te)}};var fl=So.getComponent("ClickableComponent"),vl=class extends fl{buildCSSClass(){return St}createEl(t,i,s){return this.h.va.element.querySelector("."+St)}emitTapEvents(){}te(){l(this.el(),this.localize("Learn more"))}constructor(t,i){super(t,i),l(this.el(),t.localize("Learn more")),this.Xa=i.va,this.yo=t.el(),this.on(t,"languagechange",this.te)}};Ai((function(t){if(t.va.ads&&t.Ul){const i=t.fo,s=new dl(i,t.va),e=new vl(i,{va:t.va});i.adControlBar.addChild(s),i.adControlBar.addChild(e)}}));var pl=So.getComponent("Component"),ml=["addtrack","removetrack","change"],gl=class extends(Io(pl)){createEl(){let t=super.createEl();return this.qualityLabel=So.createEl("div",{className:"theo-quality-label-text"}),t.appendChild(this.qualityLabel),hi(this.qualityLabel),t}dispose(){this.qr&&(this.qr.removeEventListener("activequalitychanged",this.zl),this.qr=void 0),this.ws.videoTracks.removeEventListener(ml,this.nh),super.dispose()}constructor(t,i){super(t,i),this.qr=void 0,this.nh=()=>{const t=Ua(this.ws.videoTracks);t!==this.qr&&(this.qr&&this.qr.removeEventListener("activequalitychanged",this.zl),this.qr=t,t&&t.addEventListener("activequalitychanged",this.zl),this.zl())},this.zl=()=>{const t=this.qr&&this.qr.activeQuality;if(!this.qualityLabel||!t)return;const i=t.label?t.label:t.height?t.height+"p":void 0;i&&(l(this.qualityLabel,i),this.addClass("theo-quality-label-show"),this.hideActiveQualityLabel())},this.hideActiveQualityLabel=()=>{this.resetTimeout(),this.startFadeOutID=this.setTimeout(this.fadeoutLabel,3750),this.removeLabelClassesID=this.setTimeout(this.hideLabel,4e3)},this.resetTimeout=()=>{this.startFadeOutID&&this.clearTimeout(this.startFadeOutID),this.removeLabelClassesID&&this.clearTimeout(this.removeLabelClassesID)},this.fadeoutLabel=()=>{this.addClass("theo-quality-label-fadeout")},this.hideLabel=()=>{this.removeClass("theo-quality-label-show"),this.removeClass("theo-quality-label-fadeout")},super.addClass("theo-quality-label"),this.ws.videoTracks&&(this.ws.videoTracks.addEventListener(ml,this.nh),this.nh())}};So.registerComponent("activeQualityLabel",gl);var yl="theo-upcoming-ad-notification",bl=["adbreakbegin","adbreakend","adadded","adloaded","adbegin","adend"],kl=class extends(Io(aa)){createEl(){const t=So.createEl("div",{className:yl});return this.notificationText=So.createEl("div",{className:yl+"text"}),t.appendChild(this.notificationText),t}Ll(){if(!this.ws.ads)return;const t=this.ws.ads.scheduledAdBreaks;let i,s=1/0;for(let e=0;e<t.length;e++){const n=t[e];let r=n.timeOffset;-1!==r&&r<s&&(s=r,i=n)}this.currentAdBreak=i,this.currentAdBreakValid=void 0!==i&&void 0!==i.ads&&i.ads.some((t=>"linear"===t.type))}Hl(){if(!this.ws.ads||this.ws.ads.playing||!this.currentAdBreak||!this.currentAdBreakValid||0===this.currentAdBreak.timeOffset)return void this.ql();const t=this.ws.currentTime;if(this.currentAdBreak.timeOffset>t+10)return void this.ql();const i=_.ceil(this.currentAdBreak.timeOffset-t);i<0?this.ql():this.Wl(i)}Wl(t){this.Gl!==t&&(l(this.notificationText,"Your video will be temporarily interrupted in 0:"+(t<10?"0"+t:t)),this.Gl=t,this.show())}ql(){this.Gl=NaN,this.hide()}dispose(){var t;this.ws.removeEventListener("timeupdate",this.handleTimeUpdate),null==(t=this.ws.ads)||t.removeEventListener(bl,this.handleAdEvent),this.currentAdBreak=void 0,super.dispose()}constructor(t,i){super(t,i),this.currentAdBreak=void 0,this.currentAdBreakValid=!1,this.Gl=NaN,this.handleTimeUpdate=()=>{this.Hl()},this.handleAdEvent=()=>{this.Ll(),this.Hl()},this.ws.ads&&(this.hide(),this.ws.addEventListener("timeupdate",this.handleTimeUpdate),this.ws.ads.addEventListener(bl,this.handleAdEvent))}};So.registerComponent("upcomingAdNotificationText",kl);var wl=So.getComponent("Component");So.registerComponent("VerizonMediaAdBreakBar",class extends wl{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theo-ad-remaining-container",t}get Xl(){return this.h.adBreakProvider()}te(t,i){if(this.Xl&&this.Xl.endTime){const s=_.max(this.Xl.endTime-t,0);l(i,"Content will resume in "+_.ceil(s)+"s"),this.show()}else this.hide()}constructor(t,i){super(t,i),this.Jl=()=>{this.te(this.player().currentTime(),this.el())},this.on(t,"timeupdate",this.Jl)}});var _l=So.getComponent("ClickableComponent");So.registerComponent("VerizonMediaAdSkipButton",class extends _l{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",this.Ql=h.createElement("span"),t.appendChild(this.Ql),this.te(t,this.Ql),t}handleClick(){this.h.skipCallback()}te(t,i){this.Yl<=at.Zl.Kl?(ti(t,"theoplayer-ad-skip-countdown"),Kt(t,"theoplayer-ad-skip-button"),l(i,"Skip ads")):l(i,"Skip ads in "+_.ceil(this.Yl)+"s")}get Yl(){return this.h.adBreak.startTime+this.h.adBreak.skipOffset-this.player().currentTime()}constructor(t,i){super(t,i),this.Jl=()=>{this.te(this.el(),this.Ql)},this.on(t,"timeupdate",this.Jl)}});var xl=So.getComponent("Component"),Cl=class extends xl{buildCSSClass(){return"theo-verizonmedia-marker-bar"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}};So.registerComponent("VerizonMediaAdBreakMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-verizonmedia-marker-bar-adbreak"}});var Sl=So.getComponent("Component"),jl=class extends Sl{get startTime(){return this.h.startTime}get endTime(){return this.h.endTime}get seekable(){return this.player().seekable()}buildCSSClass(){return"theo-verizonmedia-marker"}createEl(t,i,s){const e=h.createElement("div");e.className=this.buildCSSClass();const n=this.seekable.start(0),r=this.seekable.end(this.seekable.length-1),o=_.max(this.startTime-n,0),a=void 0!==this.endTime?_.max(r-this.endTime,0):0,u=r-n;return e.style.left=o/u*100+"%",e.style.right=a/u*100+"%",e}constructor(t,i){super(t,i)}};So.registerComponent("VerizonMediaAdBreakMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-verizonmedia-marker-adbreak"}});So.registerComponent("VerizonMediaAssetMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-verizonmedia-marker-bar-asset"}});So.registerComponent("VerizonMediaAssetMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-verizonmedia-marker-asset"}});var Tl=So.getComponent("Component");So.registerComponent("VerizonMediaContentNotificationBar",class extends Tl{buildCSSClass(){const t="theo-verizonmedia-content-notification-bar",i=t+"-ios";return t+(Pt.Ga||Pt.td?" "+i:"")}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}});var Ml,Al=So.getComponent("Component");function Pl(t,i){return Boolean(t&&void 0===t.verizonMedia)||Boolean(t&&t.verizonMedia&&void 0===t.verizonMedia.ui)||Boolean(t&&t.verizonMedia&&t.verizonMedia.ui&&void 0===t.verizonMedia.ui[i])||Boolean(t&&t.verizonMedia&&t.verizonMedia.ui&&!0===t.verizonMedia.ui[i])}So.registerComponent("VerizonMediaContentNotification",class extends Al{get sd(){return this.h.asset}buildCSSClass(){return"theo-verizonmedia-content-notification"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}ko(){const t=h.createElement("img");t.src=this.sd.posterUrl,t.className=this.buildCSSClass()+"-thumbnail",this.el().appendChild(t);const i=h.createElement("div");i.className=this.buildCSSClass()+"-description";const s=function(t){return"Next: "+t}(this.sd.description);l(i,s),this.el().appendChild(i),this.ed=h.createElement("div"),this.ed.className=this.buildCSSClass()+"-countdown",l(this.ed,this.nd),this.el().appendChild(this.ed)}get nd(){const t=_.min(10,this.rd);return"Starting in "+_.ceil(t)+" seconds"}get rd(){return _.max(0,this.sd.startTime-this.player().currentTime())}od(){const t=this.rd;t>10||t<=0?this.hide():(l(this.ed,this.nd),this.show())}constructor(t,i){super(t,i),this.ko(),this.on(t,"timeupdate",this.od),this.hide()}}),function(t){t.ad="VerizonMediaAdBreakBar",t.ud="VerizonMediaAdSkipButton",t.ld="VerizonMediaAdBreakMarkerBar",t.dd="VerizonMediaAdBreakMarker",t.fd="VerizonMediaAssetMarkerBar",t.vd="VerizonMediaAssetMarker",t.pd="VerizonMediaContentNotificationBar",t.md="VerizonMediaContentNotification"}(Ml||(Ml={})),Ti((function(t){return class extends t{get gd(){return this.fo.controlBar.progressControl.seekBar}ga(t){this.yd=!1,this.va.removeEventListener("timeupdate",this.bd),this.fo.removeChild("VerizonMediaAdBreakBar"),this.fo.removeChild("VerizonMediaAdSkipButton"),this.gd.removeChild("VerizonMediaAdBreakMarkerBar"),this.gd.removeChild("VerizonMediaAssetMarkerBar"),this.fo.removeChild("VerizonMediaContentNotificationBar"),super.ga(t)}kd(){if(!function(t){return Pl(t,"assetMarkers")}(this.wd)||!this.yd)return;const t=this.va.verizonMedia.assets.map((t=>({name:"VerizonMediaAssetMarker",startTime:t.startTime,endTime:t.endTime})));this.gd.removeChild("VerizonMediaAssetMarkerBar"),this.gd.addChild("VerizonMediaAssetMarkerBar",{children:t})}_d(){if(!function(t){return Pl(t,"contentNotification")}(this.wd))return;const t=this.va.verizonMedia.assets.map((t=>({name:"VerizonMediaContentNotification",asset:t})));this.fo.removeChild("VerizonMediaContentNotificationBar"),this.fo.addChild("VerizonMediaContentNotificationBar",{children:t})}gn(){this.va.removeEventListener("timeupdate",this.bd),this.va.verizonMedia.ads.adBreaks.removeEventListener("addadbreak",this.xd),this.va.verizonMedia.ads.adBreaks.removeEventListener("removeadbreak",this.Cd),this.va.verizonMedia.assets.removeEventListener("addasset",this.Sd),this.va.verizonMedia.assets.removeEventListener("removeasset",this.Sd),this.va.removeEventListener("loadeddata",this.jd),super.gn()}constructor(t,i,s){super(t,i,s),this.yd=!1,this.jd=()=>{this.yd=!0,isFinite(this.Td())||this.va.addEventListener("timeupdate",this.bd),this.bd(),this.kd(),this._d()},this.xd=t=>{t.adBreak.addEventListener("adbreakbegin",this.Md),t.adBreak.addEventListener("adbreakend",this.Pd),this.bd()},this.Cd=t=>{t.adBreak.removeEventListener("adbreakbegin",this.Md),t.adBreak.removeEventListener("adbreakend",this.Pd),this.bd()},this.bd=()=>{if(!function(t){return Pl(t,"adBreakMarkers")}(this.wd)||!this.yd)return;const t=this.va.verizonMedia.ads.adBreaks.map((t=>({name:"VerizonMediaAdBreakMarker",startTime:t.startTime,endTime:t.endTime})));this.gd.removeChild("VerizonMediaAdBreakMarkerBar"),this.gd.addChild("VerizonMediaAdBreakMarkerBar",{children:t})},this.Md=()=>{if(function(t){return Pl(t,"adNotification")}(this.wd)){const t=this.va.verizonMedia.ads.currentAdBreak;this.fo.addChild("VerizonMediaAdBreakBar",{adBreakProvider:this.Ed}),-1!==t.skipOffset&&this.fo.addChild("VerizonMediaAdSkipButton",{adBreak:t,skipCallback:this.va.verizonMedia.ads.skip})}},this.Ed=()=>this.va.verizonMedia.ads.currentAdBreak,this.Pd=()=>{this.fo.removeChild("VerizonMediaAdBreakBar"),this.fo.removeChild("VerizonMediaAdSkipButton")},this.Sd=()=>{this.kd(),this._d()},this.va.verizonMedia.ads.adBreaks.addEventListener("addadbreak",this.xd),this.va.verizonMedia.ads.adBreaks.addEventListener("removeadbreak",this.Cd),this.va.verizonMedia.assets.addEventListener("addasset",this.Sd),this.va.verizonMedia.assets.addEventListener("removeasset",this.Sd),this.va.addEventListener("loadeddata",this.jd)}}}));export{J as ChromelessPlayer,z as ErrorCategory,V as ErrorCode,$u as Player,xt as cache,bt as cast,Z as features,et as playerSuiteVersion,rt as players,ot as registerContentProtectionIntegration,Y as utils,it as version,So as videojs};
40
+ var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==s?s:"undefined"!=typeof global?global:this,s=a.window,h=a.document,u=(a.location,a.navigator,a.setTimeout),c=a.clearTimeout,v=a.setInterval,m=a.clearInterval,g=a.Error,b=a.TypeError,k=a.SyntaxError,w=a.Object,_=a.Math,x=a.parseInt,C=a.parseFloat,S=a.isNaN,j=a.Uint8Array;a.Worker,a.WorkerGlobalScope,a.XMLHttpRequest;import{$ as T,$a as M,A,Aa as P,B as E,Ba as N,C as B,Ca as I,D as F,Da as D,E as $,Ea as R,F as O,Fa as l,G as V,Ga as U,H as z,Ha as L,I as H,Ia as q,J as W,Ja as G,K as X,Ka as J,L as Q,La as Y,M as K,Ma as Z,N as tt,Na as it,O as st,Oa as et,P as nt,Pa as rt,Q as ht,Qa as ot,R as at,Ra as ut,S as ct,Sa as lt,T as dt,Ta as ft,U as vt,Ua as pt,V as mt,Va as gt,W as yt,Wa as bt,X as kt,Xa as wt,Y as _t,Ya as xt,Z as Ct,Za as St,_ as jt,_a as Tt,a as Mt,aa as At,b as Pt,ba as Et,c as Nt,ca as Bt,d as It,da as Ft,e as Dt,ea as $t,f as Rt,fa as Ot,g as Vt,ga as Ut,h as zt,ha as Lt,i as Ht,ia as qt,j as Wt,ja as Gt,k as Xt,ka as Jt,l as Qt,la as Yt,m as Kt,ma as Zt,n as ti,na as ii,o as si,oa as ei,p as ni,pa as ri,q as hi,qa as oi,r as ai,ra as ui,s as ci,sa as li,t as di,ta as fi,u as vi,ua as pi,v as mi,va as gi,w as yi,wa as bi,x as ki,xa as wi,y as _i,ya as xi,z as Ci,za as Si}from"./THEOplayer.common.esm.js";var ji=[];function Ti(t){ji.push(t)}var Mi=[];function Ai(t){Mi.push(t)}var t=void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Pi=void 0!==h?h:{createElement:function(){}};function Ei(t,i){return i||(i=t.slice(0)),t.raw=i,t}var Ni=1;function Bi(){return Ni++}var Ii,Fi=w.prototype.toString,Di=function(t){return Oi(t)?w.keys(t):[]};function $i(t,i){Di(t).forEach((function(s){return i(t[s],s)}))}function Ri(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 w.assign?w.assign.apply(w,[t].concat(s)):(s.forEach((function(i){i&&$i(i,(function(i,s){t[s]=i}))})),t)}function Oi(t){return!!t&&"object"==typeof t}function Vi(t){return Oi(t)&&"[object Object]"===Fi.call(t)&&t.constructor===w}var Ui=function(i,s,e){void 0===e&&(e=!!Vs&&Vs<11),"log"!==i&&s.unshift(i.toUpperCase()+":"),Ii.history.push(s),s.unshift("VIDEOJS:");var n=t.console&&t.console[i];n&&(e&&(s=s.map((function(t){if(Oi(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(i){return String(t)}return String(t)})).join(" ")),n.apply?n[Array.isArray(s)?"apply":"call"](t.console,s):n(s))};(Ii=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];Ui("log",i)}).history=[],Ii.error=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ui("error",i)},Ii.warn=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ui("warn",i)};var zi=Ii,Li="undefined"!=typeof globalThis?globalThis:void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Hi(t){return t.replace(/\n\r?\s*/g,"")}var qi,Wi=function(t){for(var i="",s=0;s<arguments.length;s++)i+=Hi(t[s])+(arguments[s+1]||"");return i};function Gi(t){return"string"==typeof t&&/\S/.test(t)}function Xi(t){if(/\s/.test(t))throw new g("class has illegal whitespace characters")}function Ji(){return Pi===t.document&&void 0!==Pi.createElement}function Qi(t){return Oi(t)&&1===t.nodeType}function Yi(t){return function(i,s){if(!Gi(i))return Pi[t](null);Gi(s)&&(s=Pi.querySelector(s));var e=Qi(s)?s:Pi;return e[t]&&e[t](i)}}function Ki(t,i,s,e){void 0===t&&(t="div"),void 0===i&&(i={}),void 0===s&&(s={});var n=Pi.createElement(t);return w.getOwnPropertyNames(i).forEach((function(t){var s=i[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(zi.warn(Wi(qi||(qi=Ei(["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?Zi(n,s):n[t]=s})),w.getOwnPropertyNames(s).forEach((function(t){n.setAttribute(t,s[t])})),e&&ys(n,e),n}function Zi(t,i){return void 0===t.textContent?t.innerText=i:t.textContent=i,t}function ts(t,i){i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t)}var is={},ss="vdata"+(new Date).getTime();function es(t){var i=t[ss];return i||(i=t[ss]=Bi()),is[i]||(is[i]={}),is[i]}function ns(t){var i=t[ss];return!!i&&!!w.getOwnPropertyNames(is[i]).length}function rs(t){var i=t[ss];if(i){delete is[i];try{delete t[ss]}catch(i){t.removeAttribute?t.removeAttribute(ss):t[ss]=null}}}function hs(t,i){return Xi(i),t.classList?t.classList.contains(i):function(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}(i).test(t.className)}function os(t,i){return t.classList?t.classList.add(i):hs(t,i)||(t.className=(t.className+" "+i).trim()),t}function as(t,i){return t.classList?t.classList.remove(i):(Xi(i),t.className=t.className.split(/\s+/).filter((function(t){return t!==i})).join(" ")),t}function us(t,i,s){var e=hs(t,i);if("function"==typeof s&&(s=s(t,i)),"boolean"!=typeof s&&(s=!e),s!==e)return s?os(t,i):as(t,i),t}function cs(t,i){w.getOwnPropertyNames(i).forEach((function(s){var e=i[s];null==e||!1===e?t.removeAttribute(s):t.setAttribute(s,!0===e?"":e)}))}function ls(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 ds(t,i,s){t.setAttribute(i,s)}function fs(t,i){t.removeAttribute(i)}function vs(i){var s;if(i.getBoundingClientRect&&i.parentNode&&(s=i.getBoundingClientRect()),!s)return{left:0,top:0};var e=Pi.documentElement,n=Pi.body,r=e.clientLeft||n.clientLeft||0,h=t.pageXOffset||n.scrollLeft,o=s.left+h-r,a=e.clientTop||n.clientTop||0,u=t.pageYOffset||n.scrollTop,c=s.top+u-a;return{left:_.round(o),top:_.round(c)}}function ps(t,i){var s={},e=vs(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 ms(t){return Oi(t)&&3===t.nodeType}function gs(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function ys(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()),Qi(t)||ms(t)?t:"string"==typeof t&&/\S/.test(t)?Pi.createTextNode(t):void 0})).filter((function(t){return t}))}(i).forEach((function(i){return t.appendChild(i)})),t}function bs(t,i){return ys(gs(t),i)}var ks,ws=Yi("querySelector"),_s=Yi("querySelectorAll"),xs=t.navigator&&t.navigator.userAgent||"",Cs=/AppleWebKit\/([\d.]+)/i.exec(xs),Ss=Cs?C(Cs.pop()):null,js=/iPad/i.test(xs),Ts=/iPhone/i.test(xs)&&!js,Ms=/iPod/i.test(xs),As=Ts||js||Ms,Ps=(ks=xs.match(/OS (\d+)_/i))&&ks[1]?ks[1]:null,Es=/Android/i.test(xs),Ns=function(){var t=xs.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&C(t[1]),s=t[2]&&C(t[2]);return i&&s?C(t[1]+"."+t[2]):i||null}(),Bs=Es&&/webkit/i.test(xs)&&Ns<2.3,Is=Es&&Ns<5&&Ss<537,Fs=/Firefox/i.test(xs),Ds=/Edge/i.test(xs),$s=!Ds&&/Chrome/i.test(xs),Rs=function(){var t=xs.match(/Chrome\/(\d+)/);return t&&t[1]?C(t[1]):null}(),Os=/MSIE\s8\.0/.test(xs),Vs=function(){var t=/MSIE\s(\d+)\.\d/.exec(xs),i=t&&C(t[1]);return!i&&/Trident\/7.0/i.test(xs)&&/rv:11.0/.test(xs)&&(i=11),i}(),Us=/Safari/i.test(xs)&&!$s&&!Es&&!Ds,zs=Us||As,Ls=Ji()&&("ontouchstart"in t||t.DocumentTouch&&t.document instanceof t.DocumentTouch),Hs=Ji()&&"backgroundSize"in t.document.createElement("video").style,qs=w.freeze({__proto__:null,IS_IPAD:js,IS_IPHONE:Ts,IS_IPOD:Ms,IS_IOS:As,IOS_VERSION:Ps,IS_ANDROID:Es,ANDROID_VERSION:Ns,IS_OLD_ANDROID:Bs,IS_NATIVE_ANDROID:Is,IS_FIREFOX:Fs,IS_EDGE:Ds,IS_CHROME:$s,CHROME_VERSION:Rs,IS_IE8:Os,IE_VERSION:Vs,IS_SAFARI:Us,IS_ANY_SAFARI:zs,TOUCH_ENABLED:Ls,BACKGROUND_SIZE_SUPPORTED:Hs});function Ws(t,i){var s=es(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)),w.getOwnPropertyNames(s.handlers).length<=0&&(delete s.handlers,delete s.dispatcher,delete s.disabled),0===w.getOwnPropertyNames(s).length&&rs(t)}function Gs(t,i,s,e){s.forEach((function(s){t(i,s,e)}))}function Xs(i){function s(){return!0}function e(){return!1}if(!i||!i.isPropagationStopped||!i.isImmediatePropagationStopped){var n=i||t.event;for(var r in i={},n)"layerX"!==r&&"layerY"!==r&&"keyLocation"!==r&&"webkitMovementX"!==r&&"webkitMovementY"!==r&&"path"!==r&&("returnValue"===r&&n.preventDefault||(i[r]=n[r]));if(i.target||(i.target=i.srcElement||Pi),i.relatedTarget||(i.relatedTarget=i.fromElement===i.target?i.toElement:i.fromElement),i.preventDefault=function(){n.preventDefault&&n.preventDefault(),i.returnValue=!1,n.returnValue=!1,i.defaultPrevented=!0},i.defaultPrevented=!1,i.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),i.cancelBubble=!0,n.cancelBubble=!0,i.isPropagationStopped=s},i.isPropagationStopped=e,i.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),i.isImmediatePropagationStopped=s,i.stopPropagation()},i.isImmediatePropagationStopped=e,null!==i.clientX&&void 0!==i.clientX){var h=Pi.documentElement,o=Pi.body;i.pageX=i.clientX+(h&&h.scrollLeft||o&&o.scrollLeft||0)-(h&&h.clientLeft||o&&o.clientLeft||0),i.pageY=i.clientY+(h&&h.scrollTop||o&&o.scrollTop||0)-(h&&h.clientTop||o&&o.clientTop||0)}i.which=i.charCode||i.keyCode,null!==i.button&&void 0!==i.button&&(i.button=1&i.button?0:4&i.button?1:2&i.button?2:0)}return i}var Js=!1;!function(){try{var i=w.defineProperty({},"passive",{get:function(){Js=!0}});t.addEventListener("test",null,i)}catch(t){}}();var Qs=["touchstart","touchmove"];function Ys(t,i,s){if(Array.isArray(i))return Gs(Ys,t,i,s);var e=es(t);if(e.handlers||(e.handlers={}),e.handlers[i]||(e.handlers[i]=[]),s.guid||(s.guid=Bi()),e.handlers[i].push(s),e.dispatcher||(e.disabled=!1,e.dispatcher=function(i,s){if(!e.disabled){i=Xs(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){zi.error(t)}}}),1===e.handlers[i].length)if(t.addEventListener){var n=!1;Js&&Qs.indexOf(i)>-1&&(n={passive:!0}),t.addEventListener(i,e.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+i,e.dispatcher)}function Ks(t,i,s){if(ns(t)){var e=es(t);if(e.handlers){if(Array.isArray(i))return Gs(Ks,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 Zs(t,i,s){var e=ns(t)?es(t):{},n=t.parentNode||t.ownerDocument;if("string"==typeof i&&(i={type:i,target:t}),i=Xs(i),e.dispatcher&&e.dispatcher.call(t,i,s),n&&!i.isPropagationStopped()&&!0===i.bubbles)Zs.call(null,n,i,s);else if(!n&&!i.defaultPrevented){var r=es(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 te(t,i,s){if(Array.isArray(i))return Gs(te,t,i,s);var e=function e(){Ks(t,i,e),s.apply(this,arguments)};e.guid=s.guid=s.guid||Bi(),Ys(t,i,e)}var ie,se=!1,ee=function(){if(Ji()){var t=Pi.getElementsByTagName("video"),i=Pi.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){ne(1);break}void 0===u.player&&null!==u.getAttribute("data-setup")&&ie(u)}else se||ne(1)}};function ne(i,s){s&&(ie=s),t.setTimeout(ee,i)}Ji()&&"complete"===Pi.readyState?se=!0:te(t,"load",(function(){se=!0}));var re=function(t){var i=Pi.createElement("style");return i.className=t,i},he=function(t,i){t.styleSheet?t.styleSheet.cssText=i:t.textContent=i},oe=function(t,i,s){i.guid||(i.guid=Bi());var e=function(){return i.apply(t,arguments)};return e.guid=s?s+"_"+i.guid:i.guid,e};function ae(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function ue(){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&&$i(i,(function(i,s){Vi(i)?(Vi(t[s])||(t[s]={}),t[s]=ue(t[s],i)):t[s]=i}))})),t}var i=function(){function i(t,i,s){if(!t&&this.play?this.t=t=this:this.t=t,this.h=ue({},this.h),i=this.h=ue(this.h,i),this.o=i.id||i.el&&i.el.id,!this.o){var e=t&&t.id&&t.id()||"no_player";this.o=e+"u"+Bi()}this.l=i.name||null,i.el?this.v=i.el:!1!==i.createEl&&(this.v=this.createEl()),this.m=[],this.k={},this.C={},!1!==i.initChildren&&this.initChildren(),this.ready(s),!1!==i.reportTouchActivity&&this.enableTouchActivity()}var s=i.prototype;return s.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.m)for(var t=this.m.length-1;t>=0;t--)this.m[t].dispose&&this.m[t].dispose();this.m=null,this.k=null,this.C=null,this.off(),this.v.parentNode&&this.v.parentNode.removeChild(this.v),rs(this.v),this.v=null},s.player=function(){return this.t},s.options=function(t){return zi.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.h=ue(this.h,t),this.h):this.h},s.el=function(){return this.v},s.createEl=function(t,i,s){return Ki(t,i,s)},s.localize=function(t){var i=this.t.language&&this.t.language(),s=this.t.languages&&this.t.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},s.contentEl=function(){return this.S||this.v},s.id=function(){return this.o},s.name=function(){return this.l},s.children=function(){return this.m},s.getChildById=function(t){return this.k[t]},s.getChild=function(t){if(t)return t=ae(t),this.C[t]},s.addChild=function(t,s,e){var n,r;if(void 0===s&&(s={}),void 0===e&&(e=this.m.length),"string"==typeof t){r=ae(t),s||(s={}),!0===s&&(zi.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=i.getComponent(h);if(!o)throw new g("Component "+h+" does not exist");if("function"!=typeof o)return null;n=new o(this.t||this,s)}else n=t;if(this.m.splice(e,0,n),"function"==typeof n.id&&(this.k[n.id()]=n),(r=r||n.name&&ae(n.name()))&&(this.C[r]=n),"function"==typeof n.el&&n.el()){var a=this.contentEl().children[e]||null;this.contentEl().insertBefore(n.el(),a)}return n},s.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.m){for(var i=!1,s=this.m.length-1;s>=0;s--)if(this.m[s]===t){i=!0,this.m.splice(s,1);break}if(i){this.k[t.id()]=null,this.C[t.name()]=null;var e=t.el();e&&e.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},s.initChildren=function(){var t=this,s=this.h.children;if(s){var e,n=this.h,r=i.getComponent("Tech");(e=Array.isArray(s)?s:w.keys(s)).concat(w.keys(this.h).filter((function(t){return!e.some((function(i){return"string"==typeof i?t===i:t===i.name}))}))).map((function(i){var e,n;return"string"==typeof i?n=s[e=i]||t.h[e]||{}:(e=i.name,n=i),{name:e,opts:n}})).filter((function(t){var s=i.getComponent(t.opts.componentClass||ae(t.name));return s&&!r.isTech(s)})).forEach((function(i){var s=i.name,e=i.opts;if(void 0!==n[s]&&(e=n[s]),!1!==e){!0===e&&(e={}),e.playerOptions=t.h.playerOptions;var r=t.addChild(s,e);r&&(t[s]=r)}}))}},s.buildCSSClass=function(){return""},s.on=function(t,i,s){var e=this;if("string"==typeof t||Array.isArray(t))Ys(this.v,t,oe(this,i));else{var n=t,r=i,h=oe(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?(Ys(n,r,h),Ys(n,"dispose",a)):"function"==typeof t.on&&(n.on(r,h),n.on("dispose",a))}return this},s.off=function(t,i,s){if(!t||"string"==typeof t||Array.isArray(t))Ks(this.v,t,i);else{var e=t,n=i,r=oe(this,s);this.off("dispose",r),t.nodeName?(Ks(e,n,r),Ks(e,"dispose",r)):(e.off(n,r),e.off("dispose",r))}return this},s.one=function(t,i,s){var e=arguments,n=this;if("string"==typeof t||Array.isArray(t))te(this.v,t,oe(this,i));else{var r=t,h=i,o=oe(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},s.trigger=function(t,i){return Zs(this.v,t,i),this},s.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.j?i?t.call(this):this.setTimeout(t,1):(this.T=this.T||[],this.T.push(t))),this},s.triggerReady=function(){this.j=!0,this.setTimeout((function(){var t=this.T;this.T=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},s.$=function(t,i){return ws(t,i||this.contentEl())},s.$$=function(t,i){return _s(t,i||this.contentEl())},s.hasClass=function(t){return hs(this.v,t)},s.addClass=function(t){return os(this.v,t),this},s.removeClass=function(t){return as(this.v,t),this},s.toggleClass=function(t,i){return us(this.v,t,i),this},s.show=function(){return this.removeClass("vjs-hidden"),this},s.hide=function(){return this.addClass("vjs-hidden"),this},s.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},s.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},s.getAttribute=function(t){return function(t,i){return t.getAttribute(i)}(this.v,t)},s.setAttribute=function(t,i){return ds(this.v,t,i),this},s.removeAttribute=function(t){return fs(this.v,t),this},s.width=function(t,i){return this.dimension("width",t,i)},s.height=function(t,i){return this.dimension("height",t,i)},s.dimensions=function(t,i){return this.width(t,!0).height(i)},s.dimension=function(t,i,s){if(void 0!==i)return null!==i&&i==i||(i=0),-1!==(""+i).indexOf("%")||-1!==(""+i).indexOf("px")?this.v.style[t]=i:this.v.style[t]="auto"===i?"":i+"px",s||this.trigger("resize"),this;if(!this.v)return 0;var e=this.v.style[t],n=e.indexOf("px");return x(-1!==n?e.slice(0,n):this.v["offset"+ae(t)],10)},s.currentDimension=function(i){var s=0;if("width"!==i&&"height"!==i)throw new g("currentDimension only accepts width or height value");if("function"==typeof t.getComputedStyle){var e=t.getComputedStyle(this.v);s=e.getPropertyValue(i)||e[i]}if(0===(s=C(s))){var n="offset"+ae(i);s=this.v[n]}return s},s.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},s.currentWidth=function(){return this.currentDimension("width")},s.currentHeight=function(){return this.currentDimension("height")},s.focus=function(){this.v.focus()},s.blur=function(){this.v.blur()},s.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")))}))},s.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,i=oe(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)}},s.setTimeout=function(i,s){i=oe(this,i);var e=t.setTimeout(i,s),n=function(){this.clearTimeout(e)};return n.guid="vjs-timeout-"+e,this.on("dispose",n),e},s.clearTimeout=function(i){t.clearTimeout(i);var s=function(){};return s.guid="vjs-timeout-"+i,this.off("dispose",s),i},s.setInterval=function(i,s){i=oe(this,i);var e=t.setInterval(i,s),n=function(){this.clearInterval(e)};return n.guid="vjs-interval-"+e,this.on("dispose",n),e},s.clearInterval=function(i){t.clearInterval(i);var s=function(){};return s.guid="vjs-interval-"+i,this.off("dispose",s),i},i.registerComponent=function(t,s){if(t){if(t=ae(t),i.M||(i.M={}),"Player"===t&&i.M[t]){var e=i.M[t];if(e.players&&w.keys(e.players).length>0&&w.keys(e.players).map((function(t){return e.players[t]})).every(Boolean))throw new g("Can not register Player component after player has been created")}return i.M[t]=s,s}},i.getComponent=function(s){if(s)return s=ae(s),i.M&&i.M[s]?i.M[s]:t&&t.videojs&&t.videojs[s]?(zi.warn("The "+s+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),t.videojs[s]):void 0},i.extend=function(t){t=t||{},zi.warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var s=t.init||t.init||this.prototype.init||this.prototype.init||function(){},e=function(){s.apply(this,arguments)};for(var n in(e.prototype=w.create(this.prototype)).constructor=e,e.extend=i.extend,t)t.hasOwnProperty(n)&&(e.prototype[n]=t[n]);return e},i}();i.registerComponent("Component",i);var ce=function(){};function le(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function de(t,i){return(de=w.setPrototypeOf?w.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function fe(t,i){t.prototype=w.create(i.prototype),t.prototype.constructor=t,de(t,i)}function ve(t,i,s,e){return void 0===e&&(zi.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),e=0),function(t,i,s){if(i<0||i>s)throw new g("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 pe(t){return void 0===t||0===t.length?{length:0,start:function(){throw new g("This TimeRanges object is empty")},end:function(){throw new g("This TimeRanges object is empty")}}:{length:t.length,start:ve.bind(null,"start",0,t),end:ve.bind(null,"end",1,t)}}function me(t,i){return Array.isArray(t)?pe(t):void 0===t||void 0===i?pe():pe([[t,i]])}function ge(t,i){var s,e,n=0;if(!i)return 0;t&&t.length||(t=me(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}ce.prototype.A={},ce.prototype.on=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},Ys(this,t,i),this.addEventListener=s},ce.prototype.addEventListener=ce.prototype.on,ce.prototype.off=function(t,i){Ks(this,t,i)},ce.prototype.removeEventListener=ce.prototype.off,ce.prototype.one=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},te(this,t,i),this.addEventListener=s},ce.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=Xs(t),this.A[i]&&this["on"+i]&&this["on"+i](t),Zs(this,t)},ce.prototype.dispatchEvent=ce.prototype.trigger;var ye,be,ke,we,_e={prefixed:!0},xe=[["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"]],Ce=xe[0];for(be=0;be<xe.length;be++)if(xe[be][1]in Pi){ye=xe[be];break}if(ye){for(ke=0;ke<ye.length;ke++)_e[Ce[ke]]=ye[ke];_e.prefixed=ye[0]!==Ce[0]}function Se(t){if(t instanceof Se)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:Oi(t)&&("number"==typeof t.code&&(this.code=t.code),Ri(this,t)),this.message||(this.message=Se.defaultMessages[this.code]||"")}for(Se.prototype.code=0,Se.prototype.message="",Se.prototype.status=null,Se.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Se.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."},we=0;we<Se.errorTypes.length;we++)Se[Se.errorTypes[we]]=we,Se.prototype[Se.errorTypes[we]]=we;var je=function(t,i){var s,e=null;try{s=JSON.parse(t,i)}catch(t){e=t}return[e,s]};var Te=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}}))})},Me=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=Te(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(Te))},Ae=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()},Pe="vjs-modal-dialog",Ee=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).P=e.N=e.B=!1,e.closeable(!e.h.uncloseable),e.content(e.h.content),e.S=Ki("div",{className:Pe+"-content"},{role:"document"}),e.I=Ki("p",{className:Pe+"-description vjs-offscreen",id:e.el().getAttribute("aria-describedby")}),Zi(e.I,e.description()),e.v.appendChild(e.I),e.v.appendChild(e.S),e.on(i,"languagechange",e.handleLanguagechange),e}fe(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()+"F","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},s.buildCSSClass=function(){return Pe+" vjs-hidden "+t.prototype.buildCSSClass.call(this)},s.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},s.label=function(){return this.h.label||this.localize("Modal Window")},s.description=function(){var t=this.h.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.P){var t=this.player();this.trigger("beforemodalopen"),this.P=!0,(this.h.fillAlways||!this.N&&!this.B)&&this.fill(),this.D=!t.paused(),this.h.pauseOnOpen&&this.D&&t.pause(),this.closeable()&&this.on(this.v.ownerDocument,"keydown",oe(this,this.handleKeyPress)),t.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.N=!0}return this},s.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.P},s.close=function(){if(this.P){var t=this.player();this.trigger("beforemodalclose"),this.P=!1,this.D&&this.h.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.v.ownerDocument,"keydown",oe(this,this.handleKeyPress)),t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.h.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.S;this.S=this.v,s=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.S=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.B=!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"),gs(this.contentEl()),this.trigger("modalempty"),this},s.content=function(t){return void 0!==t&&(this.O=t),this.O},s.handleLanguagechange=function(){this.v.setAttribute("aria-label",this.label()),Zi(this.I,this.description()),this.opened()?this.fill():(this.N||this.B)&&(this.N=!1,this.B=!1,this.empty())},i}(i);Ee.prototype.h={pauseOnOpen:!0,temporary:!0},i.registerComponent("ModalDialog",Ee);var Ne=function(){function t(i){var s=this;if(Os)for(var e in s=Pi.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);if(t.prototype.V.call(s,i),w.defineProperty(s,"length",{get:function(){return this.U}}),Os)return s}var i=t.prototype;return i.V=function(t){var i=this.length||0,s=0,e=t.length;this.L=t,this.U=t.length;var n=function(t){""+t in this||w.defineProperty(this,""+t,{get:function(){return this.L[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}(),Be={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Ie={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Fe={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},De={disabled:"disabled",hidden:"hidden",showing:"showing"},$e=function(t){function i(s){var e;void 0===s&&(s={});var n=le(e=t.call(this)||this);if(Os)for(var r in n=Pi.createElement("custom"),i.prototype)"constructor"!==r&&(n[r]=i.prototype[r]);var h={id:s.id||["vjs_track",Bi()].join("_"),kind:s.kind||"",label:s.label||"",language:s.language||""},o=function(t){w.defineProperty(n,t,{get:function(){return h[t]},set:function(){}})};for(var a in h)o(a);return n||le(e)}return fe(i,t),i}(ce),Re=function(t){var i=["protocol","hostname","port","pathname","search","hash","host"],s=Pi.createElement("a");s.href=t;var e,n=""===s.host&&"file:"!==s.protocol;n&&((e=Pi.createElement("div")).innerHTML='<a href="'+t+'"></a>',s=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),Pi.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&&Pi.body.removeChild(e),r},Oe=function(i){var s=t.location,e=Re(i);return(":"===e.protocol?s.protocol:e.protocol)+e.host!==s.protocol+s.host},Ve={exports:{}};void 0!==s?Ve.exports=s:void 0!==Li?Ve.exports=Li:"undefined"!=typeof self?Ve.exports=self:Ve.exports={};var Ue=function(t){var i=ze.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)},ze=w.prototype.toString;var Le,He,qe,We,Ge,Xe,Je,Qe,Ye,Ke,Ze,tn,sn=Array.prototype.slice,en=w.prototype.toString,nn=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==en.call(i))throw new b("Function.prototype.bind called on incompatible "+i);for(var s,e=sn.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(sn.call(arguments)));return w(n)===n?n:this}return i.apply(t,e.concat(sn.call(arguments)))})),i.prototype){var o=function(){};o.prototype=i.prototype,s.prototype=new o,o.prototype=null}return s},rn=Function.prototype.bind||nn,hn=w.prototype.toString,on=function(t){var i=hn.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]"===hn.call(t.callee)),s};w.keys||(He=w.prototype.hasOwnProperty,qe=w.prototype.toString,We=on,Ge=w.prototype.propertyIsEnumerable,Xe=!Ge.call({toString:null},"toString"),Je=Ge.call((function(){}),"prototype"),Qe=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Ye=function(t){var i=t.constructor;return i&&i.prototype===t},Ke={$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},Ze=function(){if(void 0===s)return!1;for(var t in s)try{if(!Ke["$"+t]&&He.call(s,t)&&null!==s[t]&&"object"==typeof s[t])try{Ye(s[t])}catch(t){return!0}}catch(t){return!0}return!1}(),tn=function(t){if(void 0===s||!Ze)return Ye(t);try{return Ye(t)}catch(t){return!1}},Le=function(t){var i=null!==t&&"object"==typeof t,s="[object Function]"===qe.call(t),e=We(t),n=i&&"[object String]"===qe.call(t),r=[];if(!i&&!s&&!e)throw new b("Object.keys called on a non-object");var h=Je&&s;if(n&&t.length>0&&!He.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||!He.call(t,u)||r.push(String(u));if(Xe)for(var c=tn(t),l=0;l<Qe.length;++l)c&&"constructor"===Qe[l]||!He.call(t,Qe[l])||r.push(Qe[l]);return r});var an=Le,un=Array.prototype.slice,cn=on,ln=w.keys,dn=ln?function(t){return ln(t)}:an,fn=w.keys;dn.shim=function(){if(w.keys){var t=function(){var t=w.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(w.keys=function(t){return cn(t)?fn(un.call(t)):fn(t)})}else w.keys=dn;return w.keys||dn};var vn=dn,pn="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),mn=w.prototype.toString,gn=Array.prototype.concat,yn=w.defineProperty,bn=yn&&function(){var t={};try{for(var i in yn(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),kn=function(t,i,s,e){(!(i in t)||function(t){return"function"==typeof t&&"[object Function]"===mn.call(t)}(e)&&e())&&(bn?yn(t,i,{configurable:!0,enumerable:!1,value:s,writable:!0}):t[i]=s)},wn=function(t,i){var s=arguments.length>2?arguments[2]:{},e=vn(i);pn&&(e=gn.call(e,w.getOwnPropertySymbols(i)));for(var n=0;n<e.length;n+=1)kn(t,e[n],i[e[n]],s[e[n]])};wn.supportsDescriptors=!!bn;var _n,xn=wn,Cn=w.getOwnPropertyDescriptor?function(){return w.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new b},Sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,jn=w.getPrototypeOf||function(t){return t.__proto__},Tn=void 0===j?_n:jn(j),Mn={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?_n:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?_n:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":Sn?jn([][Symbol.iterator]()):_n,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":_n,"$ %AsyncFunction%":undefined,"$ %AsyncFunctionPrototype%":_n,"$ %AsyncGenerator%":_n,"$ %AsyncGeneratorFunction%":undefined,"$ %AsyncGeneratorPrototype%":_n,"$ %AsyncIteratorPrototype%":_n,"$ %Atomics%":"undefined"==typeof Atomics?_n:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?_n:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?_n:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":g,"$ %ErrorPrototype%":g.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?_n:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?_n:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?_n:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?_n:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":_n,"$ %GeneratorFunction%":undefined,"$ %GeneratorPrototype%":_n,"$ %Int8Array%":"undefined"==typeof Int8Array?_n:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?_n:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?_n:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?_n:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?_n:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?_n:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":S,"$ %IteratorPrototype%":Sn?jn(jn([][Symbol.iterator]())):_n,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?_n:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&Sn?jn((new Map)[Symbol.iterator]()):_n,"$ %MapPrototype%":"undefined"==typeof Map?_n:Map.prototype,"$ %Math%":_,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":w,"$ %ObjectPrototype%":w.prototype,"$ %ObjProto_toString%":w.prototype.toString,"$ %ObjProto_valueOf%":w.prototype.valueOf,"$ %parseFloat%":C,"$ %parseInt%":x,"$ %Promise%":"undefined"==typeof Promise?_n:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?_n:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?_n:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?_n:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?_n:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?_n:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?_n:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?_n:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?_n:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&Sn?jn((new Set)[Symbol.iterator]()):_n,"$ %SetPrototype%":"undefined"==typeof Set?_n:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?_n:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?_n:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":Sn?jn(""[Symbol.iterator]()):_n,"$ %StringPrototype%":String.prototype,"$ %Symbol%":Sn?Symbol:_n,"$ %SymbolPrototype%":Sn?Symbol.prototype:_n,"$ %SyntaxError%":k,"$ %SyntaxErrorPrototype%":k.prototype,"$ %ThrowTypeError%":Cn,"$ %TypedArray%":Tn,"$ %TypedArrayPrototype%":Tn?Tn.prototype:_n,"$ %TypeError%":b,"$ %TypeErrorPrototype%":b.prototype,"$ %Uint8Array%":void 0===j?_n:j,"$ %Uint8ArrayPrototype%":void 0===j?_n:j.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?_n:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?_n:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?_n:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?_n:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?_n:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?_n:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?_n:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?_n:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?_n:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?_n:WeakSet.prototype},An=function(t,i){if(arguments.length>1&&"boolean"!=typeof i)throw new b('"allowMissing" argument must be a boolean');var s="$ "+t;if(!(s in Mn))throw new k("intrinsic "+t+" does not exist!");if(void 0===Mn[s]&&!i)throw new b("intrinsic "+t+" exists, but is not available. Please file an issue!");return Mn[s]},Pn=rn.call(Function.call,w.prototype.hasOwnProperty),En=An,Nn=En("%TypeError%"),Bn=En("%SyntaxError%"),In=Pn,Fn={"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(In(i,e)&&!s[e])return!1;var n=In(i,"[[Value]]"),r=In(i,"[[Get]]")||In(i,"[[Set]]");if(n&&r)throw new Nn("Property Descriptors may not be both accessor and data descriptors");return!0}},Dn=Number.isNaN||function(t){return t!=t},$n=Number.isNaN||function(t){return t!=t},Rn=Number.isFinite||function(t){return"number"==typeof t&&!$n(t)&&t!==1/0&&t!==-1/0},On=Function.prototype.toString,Vn=/^\s*class\b/,Un=function(t){try{var i=On.call(t);return Vn.test(i)}catch(t){return!1}},zn=w.prototype.toString,Ln="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,Hn=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(Ln)return function(t){try{return!Un(t)&&(On.call(t),!0)}catch(t){return!1}}(t);if(Un(t))return!1;var i=zn.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},qn=w.prototype.toString,Wn=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},Gn=Hn,Xn=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===qn.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(Gn(t[n[e]])&&(s=t[n[e]](),Wn(s)))return s;throw new b("No default value")}throw new b("invalid [[DefaultValue]] hint supplied")},Jn=An,Qn=Jn("%Object%"),Yn=Jn("%TypeError%"),Kn=Jn("%String%"),Zn=function(t,i,s,e){var n=Fn[i];if("function"!=typeof n)throw new Bn("unknown record type: "+i);if(!n(t,e))throw new Nn(s+" must be a "+i);console.log(n(t,e),e)},tr=Dn,ir=Rn,sr=function(t){return t>=0?1:-1},er=function(t,i){var s=t%i;return _.floor(s>=0?s:s+i)},nr=Pn,rr={ToPrimitive:function(t){return Wn(t)?t:arguments.length>1?Xn(t,arguments[1]):Xn(t)},ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return tr(i)?0:0!==i&&ir(i)?sr(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(tr(i)||0===i||!ir(i))return 0;var s=sr(i)*_.floor(_.abs(i));return er(s,65536)},ToString:function(t){return Kn(t)},ToObject:function(t){return this.CheckObjectCoercible(t),Qn(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new Yn(i||"Cannot call method on "+t);return t},IsCallable:Hn,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:tr(t)&&tr(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(nr(t,s)&&!i[s])return!1;var e=nr(t,"[[Value]]"),n=nr(t,"[[Get]]")||nr(t,"[[Set]]");if(e&&n)throw new Yn("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(Zn(this,"Property Descriptor","Desc",t),!(!nr(t,"[[Get]]")&&!nr(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(Zn(this,"Property Descriptor","Desc",t),!(!nr(t,"[[Value]]")&&!nr(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(Zn(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(Zn(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 Yn("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new Yn("ToPropertyDescriptor requires an object");var i={};if(nr(t,"enumerable")&&(i["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),nr(t,"configurable")&&(i["[[Configurable]]"]=this.ToBoolean(t.configurable)),nr(t,"value")&&(i["[[Value]]"]=t.value),nr(t,"writable")&&(i["[[Writable]]"]=this.ToBoolean(t.writable)),nr(t,"get")){var s=t.get;if(void 0!==s&&!this.IsCallable(s))throw new b("getter must be a function");i["[[Get]]"]=s}if(nr(t,"set")){var e=t.set;if(void 0!==e&&!this.IsCallable(e))throw new Yn("setter must be a function");i["[[Set]]"]=e}if((nr(i,"[[Get]]")||nr(i,"[[Set]]"))&&(nr(i,"[[Value]]")||nr(i,"[[Writable]]")))throw new Yn("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},hr=rn.call(Function.call,String.prototype.replace),or=/^[\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]+/,ar=/[\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]+$/,ur=function(){var t=rr.ToString(rr.CheckObjectCoercible(this));return hr(hr(t,or,""),ar,"")},cr=ur,lr=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:cr},dr=xn,fr=lr,vr=xn,pr=ur,mr=lr,gr=function(){var t=fr();return dr(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},yr=rn.call(Function.call,mr());vr(yr,{getPolyfill:mr,implementation:pr,shim:gr});var br=yr,kr=Hn,wr=w.prototype.toString,_r=w.prototype.hasOwnProperty,xr=br,Cr=function(t,i,s){if(!kr(i))throw new b("iterator must be a function");var e;arguments.length>=3&&(e=s),"[object Array]"===wr.call(t)?function(t,i,s){for(var e=0,n=t.length;e<n;e++)_r.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)_r.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e)},Sr=function(){for(var t={},i=0;i<arguments.length;i++){var s=arguments[i];for(var e in s)jr.call(s,e)&&(t[e]=s[e])}return t},jr=w.prototype.hasOwnProperty;var Tr=Ve.exports,Mr=Ue,Ar=function(t){if(!t)return{};var i={};return Cr(xr(t).split("\n"),(function(t){var s=t.indexOf(":"),e=xr(t.slice(0,s)).toLowerCase(),n=xr(t.slice(s+1));void 0===i[e]?i[e]=n:!function(t){return"[object Array]"===w.prototype.toString.call(t)}(i[e])?i[e]=[i[e],n]:i[e].push(n)})),i},Pr=Sr,Er=Br;function Nr(t,i,s){var e=t;return Mr(i)?(s=i,"string"==typeof t&&(e={uri:t})):e=Pr(i,{uri:t}),e.callback=s,e}function Br(t,i,s){return Ir(i=Nr(t,i,s))}function Ir(t){if(void 0===t.callback)throw new g("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=l.response?l.response:l.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}(l),b)try{t=JSON.parse(t)}catch(t){}return t}var n={body:void 0,headers:{},statusCode:0,method:v,url:f,rawRequest:l};function r(t){return c(d),t instanceof g||(t=new g(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,n)}function h(){if(!a){var i;c(d),i=t.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var r=n,h=null;return 0!==i?(r={body:e(),statusCode:i,method:v,headers:{},url:f,rawRequest:l},l.getAllResponseHeaders&&(r.headers=Ar(l.getAllResponseHeaders()))):h=new g("Internal XMLHttpRequest Error"),s(h,r,r.body)}}var o,a,l=t.xhr||null;l||(l=t.cors||t.useXDR?new Br.XDomainRequest:new Br.XMLHttpRequest);var d,f=l.url=t.uri||t.url,v=l.method=t.method||"GET",p=t.body||t.data||null,m=l.headers=t.headers||{},y=!!t.sync,b=!1;if("json"in t&&(b=!0,m.accept||m.Accept||(m.Accept="application/json"),"GET"!==v&&"HEAD"!==v&&(m["content-type"]||m["Content-Type"]||(m["Content-Type"]="application/json"),p=JSON.stringify(t.json))),l.onreadystatechange=function(){4===l.readyState&&h()},l.onload=h,l.onerror=r,l.onprogress=function(){},l.ontimeout=r,l.open(v,f,!y,t.username,t.password),y||(l.withCredentials=!!t.withCredentials),!y&&t.timeout>0&&(d=u((function(){a=!0,l.abort("timeout");var t=new g("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}),t.timeout)),l.setRequestHeader)for(o in m)m.hasOwnProperty(o)&&l.setRequestHeader(o,m[o]);else if(t.headers&&!function(t){for(var i in t)if(t.hasOwnProperty(i))return!1;return!0}(t.headers))throw new g("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(l.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(l),l.send(p),l}Br.XMLHttpRequest=Tr.XMLHttpRequest||function(){},Br.XDomainRequest="withCredentials"in new Br.XMLHttpRequest?Br.XMLHttpRequest:Tr.XDomainRequest,function(t,i){for(var s=0;s<t.length;s++)i(t[s])}(["get","put","post","patch","head","delete"],(function(t){Br["delete"===t?"del":t]=function(i,s,e){return(s=Nr(i,s,e)).method=t.toUpperCase(),Ir(s)}}));var Fr=function(i,s){var e=new t.WebVTT.Parser(t,t.vttjs,t.WebVTT.StringDecoder()),n=[];e.oncue=function(t){s.addCue(t)},e.onparsingerror=function(t){n.push(t)},e.onflush=function(){s.trigger({type:"loadeddata",target:s})},e.parse(i),n.length>0&&(t.console&&t.console.groupCollapsed&&t.console.groupCollapsed("Text Track parsing errors for "+s.src),n.forEach((function(t){return zi.error(t)})),t.console&&t.console.groupEnd&&t.console.groupEnd()),e.flush()},Dr=function(i){function s(e){var n;if(void 0===e&&(e={}),!e.tech)throw new g("A tech was not provided.");var r=ue(e,{kind:Fe[e.kind]||"subtitles",language:e.language||e.srclang||""}),h=De[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(h="hidden");var a=n=i.call(this,r)||this;if(a.H=r.tech,Os)for(var u in s.prototype)"constructor"!==u&&(a[u]=s.prototype[u]);a.L=[],a.q=[];var c=new Ne(a.L),l=new Ne(a.q),d=!1,f=oe(a,(function(){this.activeCues,d&&(this.trigger("cuechange"),d=!1)}));return"disabled"!==h&&a.H.ready((function(){a.H.on("timeupdate",f)}),!0),w.defineProperty(a,"default",{get:function(){return o},set:function(){}}),w.defineProperty(a,"mode",{get:function(){return h},set:function(t){var i=this;De[t]&&("showing"===(h=t)&&this.H.ready((function(){i.H.on("timeupdate",f)}),!0),this.trigger("modechange"))}}),w.defineProperty(a,"cues",{get:function(){return this.W?c:null},set:function(){}}),w.defineProperty(a,"activeCues",{get:function(){if(!this.W)return null;if(0===this.cues.length)return l;for(var t=this.H.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,l.V(this.q),l},set:function(){}}),r.src?(a.src=r.src,function(i,s){var e={uri:i},n=Oe(i);n&&(e.cors=n),Er(e,oe(this,(function(i,e,n){if(i)return zi.error(i,e);if(s.W=!0,"function"!=typeof t.WebVTT){if(s.H){var r=function(){return Fr(n,s)};s.H.on("vttjsloaded",r),s.H.on("vttjserror",(function(){zi.error("vttjs failed to load, stopping trying to process "+s.src),s.H.off("vttjsloaded",r)}))}}else Fr(n,s)})))}(r.src,a)):a.W=!0,a||le(n)}fe(s,i);var e=s.prototype;return e.addCue=function(i){var s=i;if(t.vttjs&&!(i instanceof t.vttjs.VTTCue)){for(var e in s=new t.vttjs.VTTCue(i.startTime,i.endTime,i.text),i)e in s||(s[e]=i[e]);s.id=i.id,s.G=i}var n=this.H.textTracks();if(n)for(var r=0;r<n.length;r++)n[r]!==this&&n[r].removeCue(s);this.L.push(s),this.cues.V(this.L)},e.removeCue=function(t){for(var i=this.L.length;i--;){var s=this.L[i];if(s===t||s.G&&s.G===t){this.L.splice(i,1),this.cues.V(this.L);break}}},s}($e);Dr.prototype.A={cuechange:"cuechange"};var $r=function(t){function i(s){var e,n;void 0===s&&(s={});var r=le(e=t.call(this)||this);if(Os)for(var h in r=Pi.createElement("custom"),i.prototype)"constructor"!==h&&(r[h]=i.prototype[h]);var o=new Dr(s);return r.kind=o.kind,r.src=o.src,r.srclang=o.language,r.label=o.label,r.default=o.default,w.defineProperty(r,"readyState",{get:function(){return n}}),w.defineProperty(r,"track",{get:function(){return o}}),n=0,o.addEventListener("loadeddata",(function(){n=2,r.trigger({type:"load",target:r})})),Os?r||le(e):e}return fe(i,t),i}(ce);$r.prototype.A={load:"load"},$r.NONE=0,$r.LOADING=1,$r.LOADED=2,$r.ERROR=3;var Rr,Or=function(){function t(i){void 0===i&&(i=[]);var s=this;if(Os)for(var e in s=Pi.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);s.X=[],w.defineProperty(s,"length",{get:function(){return this.X.length}});for(var n=0,r=i.length;n<r;n++)s.J(i[n]);if(Os)return s}var i=t.prototype;return i.J=function(t){var i=this.X.length;""+i in this||w.defineProperty(this,i,{get:function(){return this.X[i]}}),-1===this.X.indexOf(t)&&this.X.push(t)},i.Y=function(t){for(var i,s=0,e=this.X.length;s<e;s++)if(t===this.X[s].track){i=this.X[s];break}return i},i.K=function(t){for(var i=0,s=this.X.length;i<s;i++)if(t===this.X[i]){this.X.splice(i,1);break}},t}(),Vr=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=le(n),Os))for(var r in e=Pi.createElement("custom"),i.prototype)"constructor"!==r&&(e[r]=i.prototype[r]);e.Z=[],w.defineProperty(e,"length",{get:function(){return this.Z.length}});for(var h=0;h<s.length;h++)e.tt(s[h]);return e||le(n)}fe(i,t);var s=i.prototype;return s.tt=function(t){var i=this.Z.length;""+i in this||w.defineProperty(this,i,{get:function(){return this.Z[i]}}),-1===this.Z.indexOf(t)&&(this.Z.push(t),this.trigger({track:t,type:"addtrack"}))},s.it=function(t){for(var i,s=0,e=this.length;s<e;s++)if(this[s]===t){(i=this[s]).off&&i.off(),this.Z.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}(ce);for(Rr in Vr.prototype.A={change:"change",addtrack:"addtrack",removetrack:"removetrack"},Vr.prototype.A)Vr.prototype["on"+Rr]=null;var Ur=function(t){function i(s){var e,n;if(void 0===s&&(s=[]),Os){for(var r in n=Pi.createElement("custom"),Vr.prototype)"constructor"!==r&&(n[r]=Vr.prototype[r]);for(var h in i.prototype)"constructor"!==h&&(n[h]=i.prototype[h])}return(n=e=t.call(this,s,n)||this)||le(e)}return fe(i,t),i.prototype.tt=function(i){t.prototype.tt.call(this,i),i.addEventListener("modechange",oe(this,(function(){this.trigger("change")})))},i}(Vr),zr=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].selected=!1)},Lr=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){zr(s,s[r]);break}if(Os){for(var h in n=Pi.createElement("custom"),Vr.prototype)"constructor"!==h&&(n[h]=Vr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,w.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n||le(e)}fe(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.selected&&zr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("selectedchange",(function(){s.st||(s.st=!0,zr(s,i),s.st=!1,s.trigger("change"))}))},s.addTrack=function(t){this.tt(t)},s.removeTrack=function(i){t.prototype.it.call(this,i)},i}(Vr),Hr=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].enabled=!1)},qr=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){Hr(s,s[r]);break}if(Os){for(var h in n=Pi.createElement("custom"),Vr.prototype)"constructor"!==h&&(n[h]=Vr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,n||le(e)}fe(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.enabled&&Hr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",(function(){s.st||(s.st=!0,Hr(s,i),s.st=!1,s.trigger("change"))}))},s.addTrack=function(t){this.tt(t)},s.removeTrack=function(i){t.prototype.it.call(this,i)},i}(Vr),Wr=void 0;var Gr=function(i){function s(t,s){var e;return void 0===t&&(t={}),void 0===s&&(s=function(){}),t.reportTouchActivity=!1,(e=i.call(this,null,t,s)||this).et=!1,e.on("playing",(function(){this.et=!0})),e.on("loadstart",(function(){this.et=!1})),e.nt=t.textTracks,e.rt=t.videoTracks,e.ht=t.audioTracks,e.featuresProgressEvents||e.manualProgressOn(),e.featuresTimeupdateEvents||e.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(i){!1===t["native"+i+"Tracks"]&&(e["featuresNative"+i+"Tracks"]=!1)})),!1===t.nativeCaptions&&(e.featuresNativeTextTracks=!1),e.featuresNativeTextTracks||e.emulateTextTracks(),e.ot=new Ur,e.initTextTrackListeners(),e.initTrackListeners(),t.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.l=e.constructor.name||"Unknown Tech"),e}fe(s,i);var e=s.prototype;return e.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},e.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},e.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(oe(this,(function(){var t=this.bufferedPercent();this.ut!==t&&this.trigger("progress"),this.ut=t,1===t&&this.stopTrackingProgress()})),500)},e.onDurationChange=function(t){this.ct=this.duration()},e.buffered=function(){return me(0,0)},e.bufferedPercent=function(){return ge(this.buffered(),this.ct)},e.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},e.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},e.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},e.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},e.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.dispose=function(){this.clearTracks(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),i.prototype.dispose.call(this)},e.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.it(n)}}))},e.cleanupAutoTextTracks=function(){for(var t=this.ot||[],i=t.length;i--;){var s=t[i];this.removeRemoteTextTrack(s)}},e.reset=function(){},e.error=function(t){return void 0!==t&&(this.lt=new Se(t),this.trigger("error")),this.lt},e.played=function(){return this.et?me(0,0):me()},e.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.initTextTrackListeners=function(){var t=oe(this,(function(){this.trigger("texttrackchange")})),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",oe(this,(function(){i.removeEventListener("removetrack",t),i.removeEventListener("addtrack",t)}))))},e.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)}))}))},e.dt=function(){var i=this;if(!t.WebVTT)if(Pi.body.contains(this.el())){if(!this.h["vtt.js"]&&Vi(Wr)&&w.keys(Wr).length>0)return void this.trigger("vttjsloaded");var s=Pi.createElement("script");s.src=this.h["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",s.onload=function(){i.trigger("vttjsloaded")},s.onerror=function(){i.trigger("vttjserror")},this.on("dispose",(function(){s.onload=null,s.onerror=null})),t.WebVTT=!0,this.el().parentNode.appendChild(s)}else this.ready(this.dt)},e.emulateTextTracks=function(){var t=this,i=this.textTracks();if(i){var s=this.remoteTextTracks(),e=function(t){return i.tt(t.track)},n=function(t){return i.it(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)}}))}},e.videoTracks=function(){return this.rt=this.rt||new Lr,this.rt},e.audioTracks=function(){return this.ht=this.ht||new qr,this.ht},e.textTracks=function(){return this.nt=this.nt||new Ur,this.nt},e.remoteTextTracks=function(){return this.ft=this.ft||new Ur,this.ft},e.remoteTextTrackEls=function(){return this.vt=this.vt||new Or,this.vt},e.addTextTrack=function(t,i,s){if(!t)throw new g("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 Dr(n);return r.tt(h),h}(this,t,i,s)},e.createRemoteTextTrack=function(t){var i=ue(t,{tech:this});return new $r(i)},e.addRemoteTextTrack=function(t,i){void 0===t&&(t={});var s=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(zi.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().J(s),this.remoteTextTracks().tt(s.track),!0!==i&&this.ot.tt(s.track),s},e.removeRemoteTextTrack=function(t){var i=this.remoteTextTrackEls().Y(t);this.remoteTextTrackEls().K(i),this.remoteTextTracks().it(t),this.ot.it(t)},e.getVideoPlaybackQuality=function(){return{}},e.setPoster=function(){},e.playsinline=function(){},e.setPlaysinline=function(){},e.canPlayType=function(){return""},s.isTech=function(t){return t.prototype instanceof s||t instanceof s||t===s},s.registerTech=function(t,i){if(s.gt||(s.gt={}),!s.isTech(i))throw new g("Tech "+t+" must be a Tech");return s.gt[t]=i,i},s.getTech=function(i){return s.gt&&s.gt[i]?s.gt[i]:t&&t.videojs&&t.videojs[i]?(zi.warn("The "+i+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),t.videojs[i]):void 0},s}(i);Gr.prototype.nt,Gr.prototype.ht,Gr.prototype.rt,Gr.prototype.featuresVolumeControl=!0,Gr.prototype.featuresFullscreenResize=!1,Gr.prototype.featuresPlaybackRate=!1,Gr.prototype.featuresProgressEvents=!1,Gr.prototype.featuresTimeupdateEvents=!1,Gr.prototype.featuresNativeTextTracks=!1,Gr.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.yt&&this.yt[t]?this.yt[t].apply(this.yt,arguments):i.apply(this,arguments)})}),t.prototype),t.prototype.setSource=function(i){var s=t.selectSourceHandler(i,this.h);return s||(t.nativeSourceHandler?s=t.nativeSourceHandler:zi.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),s!==t.nativeSourceHandler&&(this.bt=i,this.off(this.v,"loadstart",t.prototype.kt),this.off(this.v,"loadstart",t.prototype.wt),this.one(this.v,"loadstart",t.prototype.kt)),this.yt=s.handleSource(i,this,this.h),this.on("dispose",this.disposeSourceHandler),this},t.prototype.kt=function(){this.one(this.v,"loadstart",t.prototype.wt)},t.prototype.wt=function(){this.disposeSourceHandler(),this.one(this.v,"loadstart",t.prototype.wt)},t.prototype.disposeSourceHandler=function(){this.bt&&(this.clearTracks(["audio","video"]),this.bt=null),this.cleanupAutoTextTracks(),this.yt&&(this.off(this.v,"loadstart",t.prototype.kt),this.off(this.v,"loadstart",t.prototype.wt),this.yt.dispose&&this.yt.dispose(),this.yt=null)}},i.registerComponent("Tech",Gr),i.registerComponent("MediaTechController",Gr),Gr.registerTech("Tech",Gr);var Xr=function(t){function s(s,e,n){var r;if(r=t.call(this,s,e,n)||this,e.playerOptions.sources&&0!==e.playerOptions.sources.length)s.src(e.playerOptions.sources);else for(var h=0,o=e.playerOptions.techOrder;h<o.length;h++){var a=ae(o[h]),u=Gr.getTech(a);if(a||(u=i.getComponent(a)),u&&u.isSupported()){s._t(a);break}}return r}return fe(s,t),s}(i);i.registerComponent("MediaLoader",Xr);var Jr=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}fe(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=Ri({className:this.buildCSSClass(),tabIndex:0},s),"button"===i&&zi.error("Creating a ClickableComponent with an HTML element of "+i+" is not supported; use a Button instead."),e=Ri({role:"button","aria-live":"polite"},e),this.xt=s.tabIndex;var n=t.prototype.createEl.call(this,i,s,e);return this.createControlTextEl(n),n},s.createControlTextEl=function(t){return this.Ct=Ki("span",{className:"vjs-control-text"}),t&&t.appendChild(this.Ct),this.controlText(this.St,t),this.Ct},s.controlText=function(t,i){if(void 0===i&&(i=this.el()),void 0===t)return this.St||"Need Text";var s=this.localize(t);return this.St=t,this.Ct.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.v.setAttribute("aria-disabled","false"),void 0!==this.xt&&this.v.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.v.setAttribute("aria-disabled","true"),void 0!==this.xt&&this.v.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.St)},s.handleClick=function(t){},s.handleFocus=function(t){Ys(Pi,"keydown",oe(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){Ks(Pi,"keydown",oe(this,this.handleKeyPress))},i}(i);i.registerComponent("ClickableComponent",Jr);var Qr=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).update(),i.on("posterchange",oe(le(e),e.update)),e}fe(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=Ki("div",{className:"vjs-poster",tabIndex:-1});return Hs||(this.jt=Ki("img"),t.appendChild(this.jt)),t},s.update=function(t){var i=this.player().poster();this.setSrc(i),i?this.show():this.hide()},s.setSrc=function(t){if(this.jt)this.jt.src=t;else{var i="";t&&(i='url("'+t+'")'),this.v.style.backgroundImage=i}},s.handleClick=function(t){this.t.controls()&&(this.t.paused()?this.t.play():this.t.pause())},i}(Jr);i.registerComponent("PosterImage",Qr);var Yr="#222",Kr={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 Zr(t,i){return"rgba("+x(t[1]+t[1],16)+","+x(t[2]+t[2],16)+","+x(t[3]+t[3],16)+","+i+")"}function th(t,i,s){try{t.style[i]=s}catch(t){return}}var ih=function(i){function s(t,s,e){var n;return n=i.call(this,t,s,e)||this,t.on("loadstart",oe(le(n),n.toggleDisplay)),t.on("texttrackchange",oe(le(n),n.updateDisplay)),t.ready(oe(le(n),(function(){if(t.H&&t.H.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",oe(this,this.updateDisplay));for(var i=this.h.playerOptions.tracks||[],s=0;s<i.length;s++)this.t.addRemoteTextTrack(i[s],!0);var e,n,r={captions:1,subtitles:1},h=this.t.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}fe(s,i);var e=s.prototype;return e.toggleDisplay=function(){this.t.H&&this.t.H.featuresNativeTextTracks?this.hide():this.show()},e.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},e.clearDisplay=function(){"function"==typeof t.WebVTT&&t.WebVTT.processCues(t,[],this.v)},e.updateDisplay=function(){var t=this.t.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))}},e.updateForTrack=function(i){if("function"==typeof t.WebVTT&&i.activeCues){for(var s=this.t.textTrackSettings.getValues(),e=[],n=0;n<i.activeCues.length;n++)e.push(i.activeCues[n]);t.WebVTT.processCues(t,e,this.v);for(var r=e.length;r--;){var h=e[r];if(h){var o=h.displayState;if(s.color&&(o.firstChild.style.color=s.color),s.textOpacity&&th(o.firstChild,"color",Zr(s.color||"#fff",s.textOpacity)),s.backgroundColor&&(o.firstChild.style.backgroundColor=s.backgroundColor),s.backgroundOpacity&&th(o.firstChild,"backgroundColor",Zr(s.backgroundColor||"#000",s.backgroundOpacity)),s.windowColor&&(s.windowOpacity?th(o,"backgroundColor",Zr(s.windowColor,s.windowOpacity)):o.style.backgroundColor=s.windowColor),s.edgeStyle&&("dropshadow"===s.edgeStyle?o.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+Yr:"raised"===s.edgeStyle?o.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+Yr:"depressed"===s.edgeStyle?o.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+Yr:"uniform"===s.edgeStyle&&(o.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+Yr)),s.fontPercent&&1!==s.fontPercent){var a=t.parseFloat(o.style.fontSize);o.style.fontSize=a*s.fontPercent+"px",o.style.height="auto",o.style.top="auto",o.style.bottom="2px"}s.fontFamily&&"default"!==s.fontFamily&&("small-caps"===s.fontFamily?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=Kr[s.fontFamily])}}}},s}(i);i.registerComponent("TextTrackDisplay",ih);var sh=function(t){function i(){return t.apply(this,arguments)||this}return fe(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},i}(i);i.registerComponent("LoadingSpinner",sh);var eh=function(t){function s(){return t.apply(this,arguments)||this}fe(s,t);var e=s.prototype;return e.createEl=function(t,s,e){void 0===t&&(t="button"),void 0===s&&(s={}),void 0===e&&(e={}),s=Ri({className:this.buildCSSClass()},s),"button"!==t&&(zi.warn("Creating a Button with an HTML element of "+t+" is deprecated; use ClickableComponent instead."),s=Ri({tabIndex:0},s),e=Ri({role:"button"},e)),e=Ri({type:"button","aria-live":"polite"},e);var n=i.prototype.createEl.call(this,t,s,e);return this.createControlTextEl(n),n},e.addChild=function(t,s){void 0===s&&(s={});var e=this.constructor.name;return zi.warn("Adding an actionable (user controllable) child to a Button ("+e+") is not supported; use a ClickableComponent instead."),i.prototype.addChild.call(this,t,s)},e.enable=function(){t.prototype.enable.call(this),this.v.removeAttribute("disabled")},e.disable=function(){t.prototype.disable.call(this),this.v.setAttribute("disabled","disabled")},e.handleKeyPress=function(i){32!==i.which&&13!==i.which&&t.prototype.handleKeyPress.call(this,i)},s}(Jr);i.registerComponent("Button",eh);var nh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Tt=!1,e.on("mousedown",e.handleMouseDown),e}fe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-big-play-button"},s.handleClick=function(t){var i=this;if(this.Tt&&t.clientX&&t.clientY)this.t.play();else{var s=this.t.getChild("controlBar"),e=s&&s.getChild("playToggle");this.one(this.t,"play",(function(){e?e.focus():i.t.focus()})),this.t.play()}},s.handleKeyPress=function(i){this.Tt=!1,t.prototype.handleKeyPress.call(this,i)},s.handleMouseDown=function(t){this.Tt=!0},i}(eh);nh.prototype.St="Play Video",i.registerComponent("BigPlayButton",nh);var rh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).controlText(s&&s.controlText||"Close"),e}fe(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}(eh);i.registerComponent("CloseButton",rh);var hh=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}fe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.t.paused()?this.t.play():this.t.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}(eh);function oh(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)}hh.prototype.St="Play",i.registerComponent("PlayToggle",hh);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,"languagechange",e.updateContent),e}fe(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.S=Ki("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00'},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),s=this.localize("Current Time"),e=oh(i,this.t.duration());e!==this.Mt&&(this.Mt=e,this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e)},i}(i);i.registerComponent("CurrentTimeDisplay",ah);var uh=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}fe(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.S=Ki("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Duration Time")+"</span> 0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.duration();if(i&&this.ct!==i){this.ct=i;var s=this.localize("Duration Time"),e=oh(i);this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e}},i}(i);i.registerComponent("DurationDisplay",uh);var ch=function(t){function i(){return t.apply(this,arguments)||this}return fe(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}(i);i.registerComponent("TimeDivider",ch);var lh=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}fe(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.S=Ki("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.S),i},s.updateContent=function(t){if(this.t.duration()){var i=this.localize("Remaining Time"),s=oh(this.t.remainingTime());s!==this.Mt&&(this.Mt=s,this.S.innerHTML='<span class="vjs-control-text">'+i+"</span> -"+s)}},i}(i);i.registerComponent("RemainingTimeDisplay",lh);var dh=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}fe(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.S=Ki("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.Ct=Ki("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.At=Pi.createTextNode(this.localize("LIVE")),this.S.appendChild(this.Ct),this.S.appendChild(this.At),i.appendChild(this.S),i},s.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},s.handleLanguagechange=function(){this.Ct.innerHTML=this.localize("Stream Type"),this.At.innerHTML=this.localize("LIVE")},i}(i);i.registerComponent("LiveDisplay",dh);var fh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).bar=e.getChild(e.h.barName),e.vertical(!!e.h.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}fe(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=Ri({tabIndex:0},s),e=Ri({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.v.ownerDocument;t.preventDefault(),Pi.body.focus(),Pi.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.v.ownerDocument;Pi.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.v){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=ps(this.v,t);return this.vertical()?i.y:i.x},s.handleFocus=function(){this.on(this.bar.v.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.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},s.vertical=function(t){return void 0===t?this.Pt||!1:(this.Pt=!!t,this.Pt?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(i);function vh(i,s){if(!i||!s)return"";if("function"==typeof t.getComputedStyle){var e=t.getComputedStyle(i);return e?e[s]:""}return i.currentStyle[s]||""}i.registerComponent("Slider",fh);var ph=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}fe(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});return this.Nt=Ki("span",{innerHTML:this.localize("Loaded")}),this.Bt=Pi.createTextNode(": 0%"),this.Ct=Ki("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Nt),this.Ct.appendChild(this.Bt),i.appendChild(this.Ct),i},s.update=function(t){var i=this.t.buffered(),s=this.t.duration(),e=this.t.bufferedEnd(),n=this.Et,r=function(t,i){var s=t/i||0;return 100*(s>=1?1:s)+"%"};this.v.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.v.appendChild(Ki()),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.v.removeChild(n[c-1]);n.length=i.length},s.handleLanguagechange=function(){this.Nt.innerHTML=this.localize("Loaded")},i}(i);i.registerComponent("LoadProgressBar",ph);var mh=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(oe(le(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}fe(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.It=Ki("span",{innerHTML:this.localize("Progress")}),this.Ft=Pi.createTextNode(": 0%"),this.Ct=Ki("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.It),this.Ct.appendChild(this.Ft),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();this.v.setAttribute("data-current-time",oh(i,this.t.duration()))},s.handleLanguagechange=function(){this.It.innerHTML=this.localize("Progress")},i}(i);i.registerComponent("PlayProgressBar",mh);var gh=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(oe(le(e),e.updateDataAttr)),e}fe(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=Ki("div",{className:"vjs-time-tooltip"}),this.It=Ki("span",{innerHTML:this.localize("Progress")}),this.Ft=Pi.createTextNode(": 0%"),this.Ct=Ki("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.It),this.Ct.appendChild(this.Ft),i.appendChild(this.tooltip),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=oh(this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),this.t.duration());this.v.setAttribute("data-current-time",i),this.tooltip.innerHTML=i},s.handleLanguagechange=function(){this.It.innerHTML=this.localize("Progress")},i}(i);i.registerComponent("TooltipProgressBar",gh);var yh=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(oe(le(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}fe(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.v),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.v),this.tooltipProgressBar.v.style.width=this.bar.v.style.width;var i=C(vh(this.player().el(),"width")),s=C(vh(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.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();t.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),t.setAttribute("aria-valuetext",oh(i,this.t.duration()))},s.getPercent=function(){var t=this.t.currentTime()/this.t.duration();return t>=1?1:t},s.handleMouseDown=function(i){this.t.scrubbing(!0),this.videoWasPlaying=!this.t.paused(),this.t.pause(),t.prototype.handleMouseDown.call(this,i)},s.handleMouseMove=function(t){var i=this.calculateDistance(t)*this.t.duration();i===this.t.duration()&&(i-=.1),this.t.currentTime(i)},s.handleMouseUp=function(i){t.prototype.handleMouseUp.call(this,i),this.t.scrubbing(!1),this.videoWasPlaying&&this.t.play()},s.stepForward=function(){this.t.currentTime(this.t.currentTime()+5)},s.stepBack=function(){this.t.currentTime(this.t.currentTime()-5)},i}(fh);yh.prototype.h={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},yh.prototype.playerEvent="timeupdate",i.registerComponent("SeekBar",yh);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=Ki("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)}}(oe(le(e),e.handleMouseMove),25))})),e}fe(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.t.duration(),s=this.calculateDistance(t)*i,e=t.pageX-vs(this.el().parentNode).left;this.update(s,e)},s.update=function(t,i){var s=oh(t,this.t.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",s),this.keepTooltipsInside){var e=i-this.Dt(i)+1,n=C(vh(this.tooltip,"width"))/2;this.tooltip.innerHTML=s,this.tooltip.style.right="-"+(n-e)+"px"}},s.calculateDistance=function(t){return ps(this.el().parentNode,t).x},s.Dt=function(t){if(!this.keepTooltipsInside)return t;var i=C(vh(this.player().el(),"width")),s=C(vh(this.tooltip,"width"))/2,e=t;return t<s?e=_.ceil(s):t>i-s&&(e=_.floor(i-s)),e},i}(i);i.registerComponent("MouseTimeDisplay",bh);var kh=function(t){function i(){return t.apply(this,arguments)||this}return fe(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(i);kh.prototype.h={children:["seekBar"]},i.registerComponent("ProgressControl",kh);var wh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"fullscreenchange",e.handleFullscreenChange),e}fe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},s.handleFullscreenChange=function(t){this.t.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},s.handleClick=function(t){this.t.isFullscreen()?this.t.exitFullscreen():this.t.requestFullscreen()},i}(eh);wh.prototype.St="Fullscreen",i.registerComponent("FullscreenToggle",wh);var _h=function(t){function i(){return t.apply(this,arguments)||this}return fe(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}(i);i.registerComponent("VolumeLevel",_h);var xh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.updateARIAAttributes),i.ready(oe(le(e),e.updateARIAAttributes)),e}fe(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.t.volume(this.calculateDistance(t))},s.checkMuted=function(){this.t.muted()&&this.t.muted(!1)},s.getPercent=function(){return this.t.muted()?0:this.t.volume()},s.stepForward=function(){this.checkMuted(),this.t.volume(this.t.volume()+.1)},s.stepBack=function(){this.checkMuted(),this.t.volume(this.t.volume()-.1)},s.updateARIAAttributes=function(t){var i=(100*this.t.volume()).toFixed(2);this.v.setAttribute("aria-valuenow",i),this.v.setAttribute("aria-valuetext",i+"%")},i}(fh);xh.prototype.h={children:["volumeLevel"],barName:"volumeLevel"},xh.prototype.playerEvent="volumechange",i.registerComponent("VolumeBar",xh);var Ch=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,i.H&&!1===i.H.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",(function(){!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),e}return fe(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(i);Ch.prototype.h={children:["volumeBar"]},i.registerComponent("VolumeControl",Ch);var Sh=function(t){function i(){return t.apply(this,arguments)||this}fe(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",oe(this,(function(){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=Ki(i,{className:"vjs-menu-content"});var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.appendChild(this.S),Ys(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},i}(i);i.registerComponent("Popup",Sh);var jh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e}fe(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.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},i}(Jr);i.registerComponent("PopupButton",jh);var Th=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.update),i.H&&!1===i.H.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",(function(){this.update(),!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),e}fe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.t.muted(!this.t.muted())},s.update=function(t){var i=this.t.volume(),s=3;this.t.muted()?s=0:i<.33?s=1:i<.67&&(s=2);var e=this.t.muted()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e);for(var n=0;n<4;n++)as(this.v,"vjs-vol-"+n);os(this.v,"vjs-vol-"+s)},i}(eh);Th.prototype.St="Mute",i.registerComponent("MuteToggle",Th);var Mh=function(t){function i(i,s){var e;function n(){i.H&&!1===i.H.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(le(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}fe(i,t);var s=i.prototype;return s.buildCSSClass=function(){var i="";return i=this.h.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 Sh(this.t,{contentElType:"div"}),i=new xh(this.t,this.h.volumeBar);return t.addChild(i),this.menuContent=t,this.volumeBar=i,this.attachVolumeBarEvents(),t},s.handleClick=function(i){Th.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},s.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],oe(this,this.handleMouseDown))},s.handleMouseDown=function(t){this.on(["mousemove","touchmove"],oe(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.v.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},s.handleMouseUp=function(t){this.off(["mousemove","touchmove"],oe(this.volumeBar,this.volumeBar.handleMouseMove))},i}(jh);Mh.prototype.volumeUpdate=Th.prototype.update,Mh.prototype.St="Mute",i.registerComponent("VolumeMenuButton",Mh);var Ah=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).$t=-1,e.on("keydown",e.handleKeyPress),e}fe(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",oe(this,(function(t){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=Ki(i,{className:"vjs-menu-content"}),this.S.setAttribute("role","menu");var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.setAttribute("role","presentation"),s.appendChild(this.S),Ys(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.$t&&(t=this.$t+1),this.focus(t)},s.stepBack=function(){var t=0;void 0!==this.$t&&(t=this.$t-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.$t=t,i[t].v.focus())},i}(i);i.registerComponent("Menu",Ah);var Ph=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.v.setAttribute("aria-haspopup","true"),e.v.setAttribute("role","menuitem"),e.on("keydown",e.handleSubmenuKeyPress),e}fe(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.Ot=!1,this.v.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.Vt?this.hide():this.show()},s.createMenu=function(){var t=new Ah(this.t);if(this.Vt=0,this.h.title){var i=Ki("li",{className:"vjs-menu-title",innerHTML:ae(this.h.title),tabIndex:-1});this.Vt+=1,t.m.unshift(i),ts(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.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",oe(this,(function(t){this.unpressButton(),this.v.blur()}))),this.Ot?this.unpressButton():this.pressButton()},s.handleKeyPress=function(i){27===i.which||9===i.which?(this.Ot&&this.unpressButton(),9!==i.which&&i.preventDefault()):38===i.which||40===i.which?this.Ot||(this.pressButton(),i.preventDefault()):t.prototype.handleKeyPress.call(this,i)},s.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.Ot&&this.unpressButton(),9!==t.which&&t.preventDefault())},s.pressButton=function(){this.Rt&&(this.Ot=!0,this.menu.lockShowing(),this.v.setAttribute("aria-expanded","true"),this.menu.focus())},s.unpressButton=function(){this.Rt&&(this.Ot=!1,this.menu.unlockShowing(),this.v.setAttribute("aria-expanded","false"),this.v.focus())},s.disable=function(){return this.Ot=!1,this.menu.unlockShowing(),this.v.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}(Jr);i.registerComponent("MenuButton",Ph);var Eh=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 le(e);var r=oe(le(e),e.update);return n.addEventListener("removetrack",r),n.addEventListener("addtrack",r),e.t.on("dispose",(function(){n.removeEventListener("removetrack",r),n.removeEventListener("addtrack",r)})),e}return fe(i,t),i}(Ph);i.registerComponent("TrackButton",Eh);var Nh=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.v.setAttribute("role","menuitemcheckbox"):e.v.setAttribute("role","menuitem"),e}fe(i,t);var s=i.prototype;return s.createEl=function(i,s,e){this.nonIconControl=!0;var n=t.prototype.createEl.call(this,"li",Ri({className:"vjs-menu-item",tabIndex:-1},s),e);return this.Ut=Pi.createTextNode(this.localize(this.h.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.v.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.v.setAttribute("aria-checked","false"),this.controlText("")))},s.handleLanguagechange=function(){t.prototype.handleLanguagechange.call(this),this.Ut.innerHTML=this.localize(this.h.label)},i}(Jr);i.registerComponent("MenuItem",Nh);var Bh=function(i){function s(s,e){var n,r,h=e.track,o=s.textTracks();if(e.label=h.label||h.language||"Unknown",e.selected=h.default||"showing"===h.mode,(n=i.call(this,s,e)||this).track=h,o){var a=oe(le(n),n.handleTracksChange);s.on(["loadstart","texttrackchange"],a),o.addEventListener("change",a),n.on("dispose",(function(){o.removeEventListener("change",a)}))}o&&void 0===o.onchange&&n.on(["tap","click"],(function(){if("object"!=typeof t.Event)try{r=new t.Event("change")}catch(t){}r||(r=Pi.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(r)}));return n}fe(s,i);var e=s.prototype;return e.handleClick=function(t){var s=this.track.kind,e=this.t.textTracks();if(i.prototype.handleClick.call(this,t),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"))}},e.handleTracksChange=function(t){this.selected("showing"===this.track.mode)},s}(Nh);i.registerComponent("TextTrackMenuItem",Bh);var Ih=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 fe(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}(Bh);i.registerComponent("OffTextTrackMenuItem",Ih);var Fh=function(t){function i(i,s){return void 0===s&&(s={}),s.tracks=i.textTracks(),t.call(this,i,s)||this}return fe(i,t),i.prototype.createItems=function(t){void 0===t&&(t=[]),t.push(new Ih(this.t,{kind:this.zt})),this.Vt+=1;var i=this.t.textTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];e.kind===this.zt&&t.push(new Bh(this.t,{track:e,selectable:!0}))}return t},i}(Eh);i.registerComponent("TextTrackButton",Fh);var Dh=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",oe(le(e),e.update)),e}fe(i,t);var s=i.prototype;return s.handleClick=function(i){t.prototype.handleClick.call(this),this.t.currentTime(this.cue.startTime),this.update(this.cue.startTime)},s.update=function(t){var i=this.cue,s=this.t.currentTime();this.selected(i.startTime<=s&&s<i.endTime)},i}(Nh);i.registerComponent("ChaptersTrackMenuItem",Dh);var $h=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Chapters Menu"),n}fe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},s.update=function(i){this.Lt&&(!i||"addtrack"!==i.type&&"removetrack"!==i.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},s.setTrack=function(t){if(this.Lt!==t){if(this.Ht||(this.Ht=this.update.bind(this)),this.Lt){var i=this.t.remoteTextTrackEls().Y(this.Lt);i&&i.removeEventListener("load",this.Ht),this.Lt=null}if(this.Lt=t,this.Lt){this.Lt.mode="hidden";var s=this.t.remoteTextTrackEls().Y(this.Lt);s&&s.addEventListener("load",this.Ht)}}},s.findChaptersTrack=function(){for(var t=this.t.textTracks()||[],i=t.length-1;i>=0;i--){var s=t[i];if(s.kind===this.zt)return s}},s.getMenuCaption=function(){return this.Lt&&this.Lt.label?this.Lt.label:this.localize(ae(this.zt))},s.createMenu=function(){return this.h.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},s.createItems=function(){var t=[];if(!this.Lt)return t;var i=this.Lt.cues;if(!i)return t;for(var s=0,e=i.length;s<e;s++){var n=i[s],r=new Dh(this.t,{track:this.Lt,cue:n});t.push(r)}return t},i}(Fh);$h.prototype.zt="chapters",$h.prototype.St="Chapters",i.registerComponent("ChaptersButton",$h);var Rh=function(t){function i(i,s,e){var n;(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Descriptions Menu");var r=i.textTracks();if(r){var h=oe(le(n),n.handleTracksChange);r.addEventListener("change",h),n.on("dispose",(function(){r.removeEventListener("change",h)}))}return n}fe(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.zt&&"showing"===r.mode){s=!0;break}}s?this.disable():this.enable()},s.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},i}(Fh);Rh.prototype.zt="descriptions",Rh.prototype.St="Descriptions",i.registerComponent("DescriptionsButton",Rh);var Oh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Subtitles Menu"),n}return fe(i,t),i.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},i}(Fh);Oh.prototype.zt="subtitles",Oh.prototype.St="Subtitles",i.registerComponent("SubtitlesButton",Oh);var Vh=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 fe(i,t),i.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").v.focus()},i}(Bh);i.registerComponent("CaptionSettingsMenuItem",Vh);var Uh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Captions Menu"),n}fe(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().H&&this.player().H.featuresNativeTextTracks||(i.push(new Vh(this.t,{kind:this.zt})),this.Vt+=1),t.prototype.createItems.call(this,i)},i}(Fh);Uh.prototype.zt="captions",Uh.prototype.St="Captions",i.registerComponent("CaptionsButton",Uh);var zh=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=oe(le(e),e.handleTracksChange);r.addEventListener("change",h),e.on("dispose",(function(){r.removeEventListener("change",h)}))}return e}fe(i,t);var s=i.prototype;return s.handleClick=function(i){var s=this.t.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}(Nh);i.registerComponent("AudioTrackMenuItem",zh);var Lh=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).v.setAttribute("aria-label","Audio Menu"),e}fe(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.t.audioTracks&&this.t.audioTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];t.push(new zh(this.t,{track:e,selectable:!0}))}return t},i}(Eh);Lh.prototype.St="Audio Track",i.registerComponent("AudioTrackButton",Lh);var Hh=function(t){function i(i,s){var e,n=s.rate,r=C(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}fe(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}(Nh);Hh.prototype.contentElType="button",i.registerComponent("PlaybackRateMenuItem",Hh);var qh=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}fe(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this);return this.Ut=Ki("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 Ah(this.player()),i=this.playbackRates();if(i)for(var s=i.length-1;s>=0;s--)t.addChild(new Hh(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.h.playbackRates||this.h.playerOptions&&this.h.playerOptions.playbackRates},s.playbackRateSupported=function(){return this.player().H&&this.player().H.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}(Ph);qh.prototype.St="Playback Rate",i.registerComponent("PlaybackRateMenuButton",qh);var Wh=function(t){function i(){return t.apply(this,arguments)||this}fe(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}(i);i.registerComponent("Spacer",Wh);var Gh=function(t){function i(){return t.apply(this,arguments)||this}fe(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);i.registerComponent("CustomControlSpacer",Gh);var Xh=function(t){function i(){return t.apply(this,arguments)||this}return fe(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(i);Xh.prototype.h={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},i.registerComponent("ControlBar",Xh);var Jh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"error",e.open),e}fe(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}(Ee);Jh.prototype.h=ue(Ee.prototype.h,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),i.registerComponent("ErrorDisplay",Jh);var Qh="vjs-text-track-settings",Yh=["#000","Black"],Kh=["#00F","Blue"],Zh=["#0FF","Cyan"],to=["#0F0","Green"],io=["#F0F","Magenta"],so=["#F00","Red"],eo=["#FFF","White"],no=["#FF0","Yellow"],ro=["1","Opaque"],ho=["0.5","Semi-Transparent"],oo=["0","Transparent"],ao={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Yh,eo,so,to,Kh,no,io,Zh]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[ro,ho,oo]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[eo,Yh,so,to,Kh,no,io,Zh]},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:[ro,ho]},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:[oo,ho,ro]}};function uo(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}ao.windowColor.options=ao.backgroundColor.options;var co,lo=function(i){function s(t,s){var e;return(e=i.call(this,t,s)||this).setDefaults(),e.hide(),e.updateDisplay=oe(le(e),e.updateDisplay),void 0===s.persistTextTrackSettings&&(e.h.persistTextTrackSettings=e.h.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()})),$i(ao,(function(t){e.on(e.$(t.selector),"change",e.updateDisplay)})),e.h.persistTextTrackSettings&&e.restoreSettings(),e}fe(s,i);var e=s.prototype;return e.qt=function(t){var i=this,s=ao[t],e=s.id.replace("%s",this.o);return[Ki("label",{className:"vjs-label",textContent:s.label},{for:e}),Ki("select",{id:e},void 0,s.options.map((function(t){return Ki("option",{textContent:i.localize(t[1]),value:t[0]})})))]},e.Wt=function(){var t=Ki("legend",{textContent:this.localize("Text")}),i=this.qt("color"),s=Ki("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.qt("textOpacity"));return Ki("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,s))},e.Gt=function(){var t=Ki("legend",{textContent:this.localize("Background")}),i=this.qt("backgroundColor"),s=Ki("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.qt("backgroundOpacity"));return Ki("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,s))},e.Xt=function(){var t=Ki("legend",{textContent:this.localize("Window")}),i=this.qt("windowColor"),s=Ki("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.qt("windowOpacity"));return Ki("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,s))},e.Jt=function(){return Ki("div",{className:"vjs-tracksettings-colors"},void 0,[this.Wt(),this.Gt(),this.Xt()])},e.Qt=function(){var t=Ki("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.qt("fontPercent")),i=Ki("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.qt("edgeStyle")),s=Ki("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.qt("fontFamily"));return Ki("div",{className:"vjs-tracksettings-font"},void 0,[t,i,s])},e.Yt=function(){var t=Ki("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=Ki("button",{className:"vjs-done-button",textContent:"Done"});return Ki("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},e.createEl=function(){var t=Ki("div",{className:"vjs-tracksettings"},void 0,[this.Jt(),this.Qt(),this.Yt()]),i=Ki("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.o,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),s=Ki("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.o,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),e=Ki("div",void 0,{role:"document"},[i,s,t]);return Ki("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":i.id,"aria-describedby":s.id},e)},e.getValues=function(){var t=this;return function(t,i,s){return void 0===s&&(s=0),Di(t).reduce((function(s,e){return i(s,t[e],e)}),s)}(ao,(function(i,s,e){var n=function(t,i){return uo(t.options[t.options.selectedIndex].value,i)}(t.$(s.selector),s.parser);return void 0!==n&&(i[e]=n),i}),{})},e.setValues=function(t){var i=this;$i(ao,(function(s,e){!function(t,i,s){if(i)for(var e=0;e<t.options.length;e++)if(uo(t.options[e].value,s)===i){t.selectedIndex=e;break}}(i.$(s.selector),t[e],s.parser)}))},e.setDefaults=function(){var t=this;$i(ao,(function(i){var s=i.hasOwnProperty("default")?i.default:0;t.$(i.selector).selectedIndex=s}))},e.restoreSettings=function(){var i;try{i=JSON.parse(t.localStorage.getItem(Qh))}catch(t){zi.warn(t)}i&&this.setValues(i)},e.saveSettings=function(){if(this.h.persistTextTrackSettings){var i=this.getValues();try{w.keys(i).length?t.localStorage.setItem(Qh,JSON.stringify(i)):t.localStorage.removeItem(Qh)}catch(t){zi.warn(t)}}},e.updateDisplay=function(){var t=this.t.getChild("textTrackDisplay");t&&t.updateDisplay()},s}(i);i.registerComponent("TextTrackSettings",lo);var fo,vo=function(i){function s(t,s){var e;e=i.call(this,t,s)||this;var n=t.source,r=!1;if(n&&(e.v.currentSrc!==n.src||t.tag&&3===t.tag.Kt)?e.setSource(n):e.Zt(e.v),e.v.hasChildNodes()){for(var h=e.v.childNodes,o=h.length,a=[];o--;){var u=h[o];"track"===u.nodeName.toLowerCase()&&(e.featuresNativeTextTracks?(e.remoteTextTrackEls().J(u),e.remoteTextTracks().tt(u.track),r||e.v.hasAttribute("crossorigin")||!Oe(u.src)||(r=!0)):a.push(u))}for(var c=0;c<a.length;c++)e.v.removeChild(a[c])}return["audio","video"].forEach((function(t){var i=e.el()[t+"Tracks"],s=e[t+"Tracks"](),n=ae(t);e["featuresNative"+n+"Tracks"]&&i&&i.addEventListener&&(e["handle"+n+"ti"]=function(t){s.trigger({type:"change",target:s,currentTarget:s,srcElement:s})},e["handle"+n+"ii"]=function(t){return s.addTrack(t.track)},e["handle"+n+"si"]=function(t){return s.removeTrack(t.track)},i.addEventListener("change",e["handle"+n+"ti"]),i.addEventListener("addtrack",e["handle"+n+"ii"]),i.addEventListener("removetrack",e["handle"+n+"si"]),e["removeOld"+n+"ei"]=function(t){return e.ni(s,i)},e.on("loadstart",e["removeOld"+n+"ei"]))})),e.featuresNativeTextTracks&&(r&&zi.warn(Wi(co||(co=Ei(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."])))),e.ri=oe(le(e),e.handleTextTrackChange),e.hi=oe(le(e),e.handleTextTrackAdd),e.oi=oe(le(e),e.handleTextTrackRemove),e.ai()),e.ci(),(Ls||Ts||Is)&&!0===t.nativeControlsForTouch&&e.setControls(!0),e.di(),e.triggerReady(),e}fe(s,i);var e=s.prototype;return e.dispose=function(){var t=this;["audio","video","text"].forEach((function(i){var s=ae(i),e=t.v[i+"Tracks"];e&&e.removeEventListener&&(e.removeEventListener("change",t["handle"+s+"ti"]),e.removeEventListener("addtrack",t["handle"+s+"ii"]),e.removeEventListener("removetrack",t["handle"+s+"si"])),e&&t.off("loadstart",t["removeOld"+s+"ei"])})),s.disposeMediaElement(this.v),i.prototype.dispose.call(this)},e.ci=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)}))},e.createEl=function(){var t=this.h.tag;if(!t||!this.h.playerElIngest&&!this.movingMediaElementInDOM){if(t){var i=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(i,t),s.disposeMediaElement(t),t=i}else{t=Pi.createElement("video");var e=ue({},this.h.tag&&ls(this.h.tag));Ls&&!0===this.h.nativeControlsForTouch||delete e.controls,cs(t,Ri(e,{id:this.h.techId,class:"vjs-tech"}))}t.playerId=this.h.playerId}void 0!==this.h.preload&&ds(t,"preload",this.h.preload);for(var n=["loop","muted","playsinline","autoplay"],r=n.length-1;r>=0;r--){var h=n[r],o=this.h[h];void 0!==o&&(o?ds(t,h,h):fs(t,h),t[h]=o)}return t},e.Zt=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)}))}},e.ai=function(){var t=this.el().textTracks;if(t){for(var i=0;i<t.length;i++)this.textTracks().tt(t[i]);t.addEventListener&&(t.addEventListener("change",this.ri),t.addEventListener("addtrack",this.hi),t.addEventListener("removetrack",this.oi)),this.on("loadstart",this.fi)}},e.handleTextTrackChange=function(t){var i=this.textTracks();this.textTracks().trigger({type:"change",target:i,currentTarget:i,srcElement:i})},e.handleTextTrackAdd=function(t){this.textTracks().tt(t.track)},e.handleTextTrackRemove=function(t){this.textTracks().it(t.track)},e.ni=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.it(a)}}},e.fi=function(t){var i=this.textTracks(),s=this.el().textTracks;this.ni(i,s)},e.play=function(){var t=this.v.play();void 0!==t&&"function"==typeof t.then&&t.then(null,(function(t){}))},e.setCurrentTime=function(t){try{this.v.currentTime=t}catch(t){zi(t,"Video is not ready. (Video.js)")}},e.duration=function(){var t=this;if(this.v.duration===1/0&&Es&&$s&&0===this.v.currentTime){return this.on("timeupdate",(function i(){t.v.currentTime>0&&(t.v.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",i))})),NaN}return this.v.duration||NaN},e.width=function(){return this.v.offsetWidth},e.height=function(){return this.v.offsetHeight},e.di=function(){var t=this;if("webkitDisplayingFullscreen"in this.v){var i=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},s=function(){"webkitPresentationMode"in this.v&&"picture-in-picture"!==this.v.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)}))}},e.supportsFullScreen=function(){if("function"==typeof this.v.webkitEnterFullScreen){var i=t.navigator&&t.navigator.userAgent||"";if(/Android/.test(i)||!/Chrome|Mac OS X 10.5/.test(i))return!0}return!1},e.enterFullScreen=function(){var t=this.v;t.paused&&t.networkState<=t.HAVE_METADATA?(this.v.play(),this.setTimeout((function(){t.pause(),t.webkitEnterFullScreen()}),0)):t.webkitEnterFullScreen()},e.exitFullScreen=function(){this.v.webkitExitFullScreen()},e.src=function(t){if(void 0===t)return this.v.src;this.setSrc(t)},e.reset=function(){s.resetMediaElement(this.v)},e.currentSrc=function(){return this.bt?this.bt.src:this.v.currentSrc},e.setControls=function(t){this.v.controls=!!t},e.addTextTrack=function(t,s,e){return this.featuresNativeTextTracks?this.v.addTextTrack(t,s,e):i.prototype.addTextTrack.call(this,t,s,e)},e.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return i.prototype.createRemoteTextTrack.call(this,t);var s=Pi.createElement("track");return t.kind&&(s.kind=t.kind),t.label&&(s.label=t.label),(t.language||t.srclang)&&(s.srclang=t.language||t.srclang),t.default&&(s.default=t.default),t.id&&(s.id=t.id),t.src&&(s.src=t.src),s},e.addRemoteTextTrack=function(t,s){var e=i.prototype.addRemoteTextTrack.call(this,t,s);return this.featuresNativeTextTracks&&this.el().appendChild(e),e},e.removeRemoteTextTrack=function(t){if(i.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var s=this.$$("track"),e=s.length;e--;)t!==s[e]&&t!==s[e].track||this.el().removeChild(s[e])},e.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var i={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(i.droppedVideoFrames=this.el().webkitDroppedFrameCount,i.totalVideoFrames=this.el().webkitDecodedFrameCount),t.performance&&"function"==typeof t.performance.now?i.creationTime=t.performance.now():t.performance&&t.performance.timing&&"number"==typeof t.performance.timing.navigationStart&&(i.creationTime=t.Date.now()-t.performance.timing.navigationStart),i},s}(Gr);Ji()&&(vo.TEST_VID=Pi.createElement("video"),(fo=Pi.createElement("track")).kind="captions",fo.srclang="en",fo.label="English",vo.TEST_VID.appendChild(fo)),vo.isSupported=function(){try{vo.TEST_VID.volume=.5}catch(t){return!1}return!(!vo.TEST_VID||!vo.TEST_VID.canPlayType)},vo.canControlVolume=function(){try{var t=vo.TEST_VID.volume;return vo.TEST_VID.volume=t/2+.1,t!==vo.TEST_VID.volume}catch(t){return!1}},vo.canControlPlaybackRate=function(){if(Es&&$s&&Rs<58)return!1;try{var t=vo.TEST_VID.playbackRate;return vo.TEST_VID.playbackRate=t/2+.1,t!==vo.TEST_VID.playbackRate}catch(t){return!1}},vo.supportsNativeTextTracks=function(){return zs},vo.supportsNativeVideoTracks=function(){return!(!vo.TEST_VID||!vo.TEST_VID.videoTracks)},vo.supportsNativeAudioTracks=function(){return!(!vo.TEST_VID||!vo.TEST_VID.audioTracks)},vo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],vo.prototype.featuresVolumeControl=vo.canControlVolume(),vo.prototype.featuresPlaybackRate=vo.canControlPlaybackRate(),vo.prototype.movingMediaElementInDOM=!As,vo.prototype.featuresFullscreenResize=!0,vo.prototype.featuresProgressEvents=!0,vo.prototype.featuresTimeupdateEvents=!0,vo.prototype.featuresNativeTextTracks=vo.supportsNativeTextTracks(),vo.prototype.featuresNativeVideoTracks=vo.supportsNativeVideoTracks(),vo.prototype.featuresNativeAudioTracks=vo.supportsNativeAudioTracks();var po=vo.TEST_VID&&vo.TEST_VID.constructor.prototype.canPlayType,mo=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,go=/^video\/mp4/i;vo.patchCanPlayType=function(){Ns>=4&&!Fs?vo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&mo.test(t)?"maybe":po.call(this,t)}:Bs&&(vo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&go.test(t)?"maybe":po.call(this,t)})},vo.unpatchCanPlayType=function(){var t=vo.TEST_VID.constructor.prototype.canPlayType;return vo.TEST_VID.constructor.prototype.canPlayType=po,t},vo.patchCanPlayType(),vo.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){}}()}}},vo.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){vo.prototype[t]=function(){return this.v[t]||this.v.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){vo.prototype["set"+ae(t)]=function(i){this.v[t]=i,i?this.v.setAttribute(t,t):this.v.removeAttribute(t)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(t){vo.prototype[t]=function(){return this.v[t]}})),["volume","src","poster","preload","playbackRate"].forEach((function(t){vo.prototype["set"+ae(t)]=function(i){this.v[t]=i}})),["pause","load"].forEach((function(t){vo.prototype[t]=function(){return this.v[t]()}})),Gr.withSourceHandlers(vo),vo.nativeSourceHandler={},vo.nativeSourceHandler.canPlayType=function(t){try{return vo.TEST_VID.canPlayType(t)}catch(t){return""}},vo.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return vo.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 vo.nativeSourceHandler.canPlayType("video/"+s)}return""},vo.nativeSourceHandler.handleSource=function(t,i,s){i.setSrc(t.src)},vo.nativeSourceHandler.dispose=function(){},vo.registerSourceHandler(vo.nativeSourceHandler),i.registerComponent("Html5",vo),Gr.registerTech("Html5",vo);var yo=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],bo=function(s){function e(t,i,n){var r;if(t.id=t.id||["vjs_video",Bi()].join("_"),(i=Ri(e.getTagSettings(t),i)).initChildren=!1,i.createEl=!1,i.reportTouchActivity=!1,!i.language)if("function"==typeof t.closest){var h=t.closest("[lang]");h&&(i.language=h.getAttribute("lang"))}else for(var o=t;o&&1===o.nodeType;){if(ls(o).hasOwnProperty("lang")){i.language=o.getAttribute("lang");break}o=o.parentNode}if(!(r=s.call(this,null,i,n)||this).h||!r.h.techOrder||!r.h.techOrder.length)throw new g("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(r.tag=t,r.tagAttributes=t&&ls(t),r.language(r.h.language),i.languages){var a={};w.getOwnPropertyNames(i.languages).forEach((function(t){a[t.toLowerCase()]=i.languages[t]})),r.vi=a}else r.vi=e.prototype.h.languages;r.pi={},r.mi=i.poster||"",r.gi=!!i.controls,t.controls=!1,r.yi=!1,r.v=r.createEl();var u=ue(r.h);if(i.plugins){var c=i.plugins;w.getOwnPropertyNames(c).forEach((function(t){"function"==typeof this[t]?this[t](c[t]):zi.error("Unable to find plugin:",t)}),le(r))}r.h.playerOptions=u,r.initChildren(),r.isAudio("audio"===t.nodeName.toLowerCase()),r.controls()?r.addClass("vjs-controls-enabled"):r.addClass("vjs-controls-disabled"),r.v.setAttribute("role","region"),r.isAudio()?r.v.setAttribute("aria-label","audio player"):r.v.setAttribute("aria-label","video player"),r.isAudio()&&r.addClass("vjs-audio"),r.bi()&&r.addClass("vjs-no-flex"),As||r.addClass("vjs-workinghover"),e.players[r.o]=le(r);var l="5.20.6-opentelly.14".split(".")[0];return r.addClass("vjs-v"+l),r.userActive(!0),r.reportUserActivity(),r.ki(),r.on("fullscreenchange",r.wi),r.on("stageclick",r._i),r}fe(e,s);var n=e.prototype;return n.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.xi&&this.xi.parentNode&&this.xi.parentNode.removeChild(this.xi),e.players[this.o]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.v&&this.v.player&&(this.v.player=null),this.H&&this.H.dispose(),s.prototype.dispose.call(this)},n.createEl=function(){var i,e=this.tag,n=this.Ci=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player");i=this.v=n?e.parentNode:s.prototype.createEl.call(this,"div"),e.setAttribute("tabindex","-1"),e.removeAttribute("width"),e.removeAttribute("height");var r=ls(e);if(w.getOwnPropertyNames(r).forEach((function(t){"class"===t?i.className+=" "+r[t]:i.setAttribute(t,r[t])})),e.playerId=e.id,e.id+="Si",e.className="vjs-tech",e.player=i.player=this,this.addClass("vjs-paused"),!0!==t.VIDEOJS_NO_DYNAMIC_STYLE){this.xi=re("vjs-styles-dimensions");var h=ws(".vjs-styles-defaults"),o=ws("head");o.insertBefore(this.xi,h?h.nextSibling:o.firstChild)}this.width(this.h.width),this.height(this.h.height),this.fluid(this.h.fluid),this.aspectRatio(this.h.aspectRatio);for(var a=e.getElementsByTagName("a"),u=0;u<a.length;u++){var c=a.item(u);os(c,"vjs-hidden"),c.setAttribute("hidden","hidden")}return e.Kt=e.networkState,e.parentNode&&!n&&e.parentNode.insertBefore(i,e),ts(e,i),this.m.unshift(e),this.v=i,i},n.width=function(t){return this.dimension("width",t)},n.height=function(t){return this.dimension("height",t)},n.dimension=function(t,i){var s="width"===t?"ji":"Ti";if(void 0===i)return this[s]||0;if(""===i)this[s]=void 0;else{var e=C(i);if(S(e))return zi.error('Improper value "'+i+'" supplied for for '+t),this;this[s]=e}return this.Mi(),this},n.fluid=function(t){if(void 0===t)return!!this.Ai;this.Ai=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.Mi()},n.aspectRatio=function(t){if(void 0===t)return this.Pi;if(!/^\d+\:\d+$/.test(t))throw new g("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.Pi=t,this.fluid(!0),this.Mi()},n.Mi=function(){if(!0!==t.VIDEOJS_NO_DYNAMIC_STYLE){var i,s,e,n=(void 0!==this.Pi&&"auto"!==this.Pi?this.Pi:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),r=n[1]/n[0];i=void 0!==this.ji?this.ji:void 0!==this.Ti?this.Ti/r:this.videoWidth()||300,s=void 0!==this.Ti?this.Ti:i*r,e=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(e),he(this.xi,"\n ."+e+" {\n width: "+i+"px;\n height: "+s+"px;\n }\n\n ."+e+".vjs-fluid {\n padding-top: "+100*r+"%;\n }\n ")}else{var h="number"==typeof this.ji?this.ji:this.h.width,o="number"==typeof this.Ti?this.Ti:this.h.height,a=this.H&&this.H.el();a&&(h>=0&&(a.width=h),o>=0&&(a.height=o))}},n._t=function(t,s){var e=this;this.H&&this.Ei(),"Html5"!==t&&this.tag&&(Gr.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Ni=t,this.j=!1;var n=Ri({source:s,nativeControlsForTouch:this.h.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Bi",videoTracks:this.rt,textTracks:this.nt,audioTracks:this.ht,autoplay:this.h.autoplay,playsinline:this.h.playsinline,preload:this.h.preload,loop:this.h.loop,muted:this.h.muted,poster:this.poster(),language:this.language(),playerElIngest:this.Ci||!1,"vtt.js":this.h["vtt.js"]},this.h[t.toLowerCase()]);this.tag&&(n.tag=this.tag),s&&(this.Ii=s.type,s.src===this.pi.src&&this.pi.currentTime>0&&(n.startTime=this.pi.currentTime),this.pi.sources=null,this.pi.source=s,this.pi.src=s.src);var r=Gr.getTech(t);r||(r=i.getComponent(t)),this.H=new r(n),this.H.ready(oe(this,this.Fi),!0),Ae(this.Di||[],this.H),yo.forEach((function(t){e.on(e.H,t,e["handleTech"+ae(t)+"_"])})),this.on(this.H,"loadstart",this.$i),this.on(this.H,"waiting",this.Ri),this.on(this.H,"canplay",this.Oi),this.on(this.H,"canplaythrough",this.Vi),this.on(this.H,"playing",this.Ui),this.on(this.H,"ended",this.zi),this.on(this.H,"seeking",this.Li),this.on(this.H,"seeked",this.Hi),this.on(this.H,"play",this.qi),this.on(this.H,"firstplay",this.Wi),this.on(this.H,"pause",this.Gi),this.on(this.H,"durationchange",this.Xi),this.on(this.H,"fullscreenchange",this.Ji),this.on(this.H,"error",this.Qi),this.on(this.H,"loadedmetadata",this.Mi),this.on(this.H,"resize",this.Mi),this.on(this.H,"posterchange",this.Yi),this.on(this.H,"textdata",this.Ki),this.usingNativeControls(this.Zi("controls")),this.controls()&&!this.usingNativeControls()&&this.ts(),this.H.el().parentNode===this.contentEl()||"Html5"===t&&this.tag||ts(this.H.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},n.Ei=function(){this.rt=this.videoTracks(),this.nt=this.textTracks(),this.ht=this.audioTracks(),this.Di=Me(this.H),this.j=!1,this.H.dispose(),this.H=!1},n.tech=function(i){if(i&&i.IWillNotUseThisInPlugins)return this.H;var s="\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 t.alert(s),new g(s)},n.ts=function(){this.ss(),this.on(this.H,"mousedown",this.es),this.on(this.H,"touchstart",this.ns),this.on(this.H,"touchmove",this.rs),this.on(this.H,"touchend",this.hs),this.on(this.H,"tap",this.os)},n.ss=function(){this.off(this.H,"tap",this.os),this.off(this.H,"touchstart",this.ns),this.off(this.H,"touchmove",this.rs),this.off(this.H,"touchend",this.hs),this.off(this.H,"mousedown",this.es)},n.Fi=function(){if(this.triggerReady(),this.pi.volume&&this.us("setVolume",this.pi.volume),this.Yi(),this.Xi(),(this.src()||this.currentSrc())&&this.tag&&this.h.autoplay&&this.paused()){try{delete this.tag.poster}catch(t){zi("deleting tag.poster throws in some browsers",t)}this.play()}},n.$i=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"))},n.hasStarted=function(t){return void 0!==t?(this.et!==t&&(this.et=t,t?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.et},n.qi=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},n.Ri=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return t.removeClass("vjs-waiting")}))},n.Oi=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},n.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},n.Ui=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},n.Li=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},n.Hi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},n.Wi=function(){this.h.starttime&&(zi.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.h.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},n.Gi=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},n.zi=function(){this.addClass("vjs-ended"),this.h.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},n.Xi=function(){this.duration(this.Zi("duration"))},n.es=function(t){0===t.button&&this.controls()&&(void 0!==this.h&&void 0!==this.h.userActions&&void 0!==this.h.userActions.click&&!1===this.h.userActions.click||(void 0!==this.h&&void 0!==this.h.userActions&&"function"==typeof this.h.userActions.click?this.h.userActions.click.call(this,t):this.paused()?this.play():this.pause()))},n.os=function(){this.userActive(!this.userActive())},n.ns=function(){this.userWasActive=this.userActive()},n.rs=function(){this.userWasActive&&this.reportUserActivity()},n.hs=function(t){t.cancelable&&t.preventDefault()},n.wi=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n._i=function(){this.reportUserActivity()},n.Ji=function(t,i){i&&(this.toggleClass("vjs-ios-native-fs",!(!i.nativeIOSFullscreen||!i.isFullscreen)),this.isFullscreen(i.isFullscreen)),this.trigger("fullscreenchange")},n.Qi=function(){var t=this.H.error();this.error(t)},n.Ki=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},n.getCache=function(){return this.pi},n.us=function(t,i){if(this.H&&!this.H.j)this.H.ready((function(){this[t](i)}),!0);else try{this.H&&this.H[t](i)}catch(t){throw zi(t),t}},n.Zi=function(t){if(this.H&&this.H.j)try{return this.H[t]()}catch(i){throw void 0===this.H[t]?zi("Video.js: "+t+" method not defined for "+this.Ni+" playback technology.",i):"TypeError"===i.name?(zi("Video.js: "+t+" unavailable on "+this.Ni+" playback technology element.",i),this.H.j=!1):zi(i),i}},n.play=function(){return this.src()||this.currentSrc()?this.us("play"):this.H.one("loadstart",(function(){this.play()})),this},n.pause=function(){return this.us("pause"),this},n.paused=function(){return!1!==this.Zi("paused")},n.scrubbing=function(t){return void 0!==t?(this.yi=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.yi},n.currentTime=function(t){return void 0!==t?(this.us("setCurrentTime",t),this):(this.pi.currentTime=this.Zi("currentTime")||0,this.pi.currentTime)},n.duration=function(t){return void 0===t?void 0!==this.pi.duration?this.pi.duration:NaN:((t=C(t))<0&&(t=1/0),t!==this.pi.duration&&(this.pi.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},n.remainingTime=function(){return this.duration()-this.currentTime()},n.buffered=function(){var t=this.Zi("buffered");return t&&t.length||(t=me(0,0)),t},n.bufferedPercent=function(){return ge(this.buffered(),this.duration())},n.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),s=t.end(t.length-1);return s>i&&(s=i),s},n.volume=function(t){var i;return void 0!==t?(i=_.max(0,_.min(1,C(t))),this.pi.volume=i,this.us("setVolume",i),this):(i=C(this.Zi("volume")),S(i)?1:i)},n.muted=function(t){return void 0!==t?(this.us("setMuted",t),this):this.Zi("muted")||!1},n.supportsFullScreen=function(){return this.Zi("supportsFullScreen")||!1},n.isFullscreen=function(t){return void 0!==t?(this.cs=!!t,this):!!this.cs},n.requestFullscreen=function(t){var i,s=_e;return this.isFullscreen(!0),s.requestFullscreen?(Ys(Pi,s.fullscreenchange,oe(this,(function t(i){this.isFullscreen(Pi[s.fullscreenElement]),!1===this.isFullscreen()&&Ks(Pi,s.fullscreenchange,t),this.trigger("fullscreenchange")}))),s.prefixed||(i=this.h.fullscreenOptions,void 0!==t&&(i=t)),this.v[s.requestFullscreen](i)):this.H.supportsFullScreen()?this.us("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},n.exitFullscreen=function(){var t=_e;return this.isFullscreen(!1),t.requestFullscreen?Pi[t.exitFullscreen]():this.H.supportsFullScreen()?this.us("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},n.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=Pi.documentElement.style.overflow,Ys(Pi,"keydown",oe(this,this.fullWindowOnEscKey)),Pi.documentElement.style.overflow="hidden",os(Pi.body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},n.exitFullWindow=function(){this.isFullWindow=!1,Ks(Pi,"keydown",this.fullWindowOnEscKey),Pi.documentElement.style.overflow=this.docOrigOverflow,as(Pi.body,"vjs-full-window"),this.trigger("exitFullWindow")},n.canPlayType=function(t){for(var s,e=0,n=this.h.techOrder;e<n.length;e++){var r=ae(n[e]),h=Gr.getTech(r);if(h||(h=i.getComponent(r)),h){if(h.isSupported()&&(s=h.canPlayType(t)))return s}else zi.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},n.selectSource=function(t){var s,e=this,n=this.h.techOrder.map(ae).map((function(t){return[t,Gr.getTech(t)||i.getComponent(t)]})).filter((function(t){var i=t[0],s=t[1];return s?s.isSupported():(zi.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 s=t[0];if(t[1].canPlaySource(i,e.h[s.toLowerCase()]))return{source:i,tech:s}};return(this.h.sourceOrder?r(t,n,(s=h,function(t,i){return s(i,t)})):r(n,t,h))||!1},n.src=function(t){if(void 0===t)return this.Zi("src");var s=Gr.getTech(this.Ni);return s||(s=i.getComponent(this.Ni)),Array.isArray(t)?this.ls(t):"string"==typeof t?this.src({src:t}):t instanceof w&&(t.type&&!s.canPlaySource(t,this.h[this.Ni.toLowerCase()])?this.ls([t]):(this.pi.sources=null,this.pi.source=t,this.pi.src=t.src,this.Ii=t.type||"",this.ready((function(){s.prototype.hasOwnProperty("setSource")?this.us("setSource",t):this.us("src",t.src),"auto"===this.h.preload&&this.load(),this.h.autoplay&&this.play()}),!0))),this},n.ls=function(t){var i=this.selectSource(t);i?(i.tech===this.Ni?this.src(i.source):this._t(i.tech,i.source),this.pi.sources=t):(this.setTimeout((function(){this.error({code:4,message:this.localize(this.h.notSupportedMessage)})}),0),this.triggerReady())},n.load=function(){return this.us("load"),this},n.reset=function(){return this._t(ae(this.h.techOrder[0]),null),this.us("reset"),this},n.currentSources=function(){var t=this.currentSource(),i=[];return 0!==w.keys(t).length&&i.push(t),this.pi.sources||i},n.currentSource=function(){var t={},i=this.currentSrc();return i&&(t.src=i),this.pi.source||t},n.currentSrc=function(){return this.Zi("currentSrc")||this.pi.src||""},n.currentType=function(){return this.Ii||""},n.preload=function(t){return void 0!==t?(this.us("setPreload",t),this.h.preload=t,this):this.Zi("preload")},n.autoplay=function(t){return void 0!==t?(this.us("setAutoplay",t),this.h.autoplay=t,this):this.Zi("autoplay",t)},n.playsinline=function(t){return void 0!==t?(this.us("setPlaysinline",t),this.h.playsinline=t,this):this.Zi("playsinline")},n.loop=function(t){return void 0!==t?(this.us("setLoop",t),this.h.loop=t,this):this.Zi("loop")},n.poster=function(t){return void 0===t?this.mi:(t||(t=""),this.mi=t,this.us("setPoster",t),this.trigger("posterchange"),this)},n.Yi=function(){!this.mi&&this.H&&this.H.poster&&(this.mi=this.H.poster()||"",this.trigger("posterchange"))},n.controls=function(t){return void 0!==t?(t=!!t,this.gi!==t&&(this.gi=t,this.usingNativeControls()&&this.us("setControls",t),t?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.ts()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.ss())),this):!!this.gi},n.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},n.error=function(t){return void 0===t?this.lt||null:null===t?(this.lt=t,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close(),this):(this.lt=new Se(t),this.addClass("vjs-error"),zi.error("(CODE:"+this.lt.code+" "+Se.errorTypes[this.lt.code]+")",this.lt.message,this.lt),this.trigger("error"),this)},n.reportUserActivity=function(t){this.fs=!0},n.userActive=function(t){return void 0!==t?((t=!!t)!==this.vs&&(this.vs=t,t?(this.fs=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.fs=!1,this.H&&this.H.one("mousemove",(function(t){t.stopPropagation(),t.preventDefault()})),this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive"))),this):this.vs},n.ki=function(){var t,i,s,e,n=oe(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.fs){this.fs=!1,this.userActive(!0),this.clearTimeout(e);var t=this.h.inactivityTimeout;t>0&&(e=this.setTimeout((function(){this.fs||this.userActive(!1)}),t))}}),250)},n.playbackRate=function(t){return void 0!==t?(this.us("setPlaybackRate",t),this):this.H&&this.H.featuresPlaybackRate?this.Zi("playbackRate"):1},n.isAudio=function(t){return void 0!==t?(this.ps=!!t,this):!!this.ps},n.videoTracks=function(){return this.H?this.H.videoTracks():(this.rt=this.rt||new Lr,this.rt)},n.audioTracks=function(){return this.H?this.H.audioTracks():(this.ht=this.ht||new qr,this.ht)},n.textTracks=function(){if(this.H)return this.H.textTracks()},n.remoteTextTracks=function(){if(this.H)return this.H.remoteTextTracks()},n.remoteTextTrackEls=function(){if(this.H)return this.H.remoteTextTrackEls()},n.addTextTrack=function(t,i,s){if(this.H)return this.H.addTextTrack(t,i,s)},n.addRemoteTextTrack=function(t,i){if(this.H)return this.H.addRemoteTextTrack(t,i)},n.removeRemoteTextTrack=function(t){var i=(void 0===t?{}:t).track,s=void 0===i?arguments[0]:i;if(this.H)return this.H.removeRemoteTextTrack(s)},n.getVideoPlaybackQuality=function(){return this.Zi("getVideoPlaybackQuality")},n.videoWidth=function(){return this.H&&this.H.videoWidth&&this.H.videoWidth()||0},n.videoHeight=function(){return this.H&&this.H.videoHeight&&this.H.videoHeight()||0},n.language=function(t){return void 0===t?this.gs:(this.gs!==String(t).toLowerCase()&&(this.gs=String(t).toLowerCase(),void 0!==this.v&&this.trigger("languagechange")),this)},n.languages=function(){return ue(e.prototype.h.languages,this.vi)},n.toJSON=function(){var t=ue(this.h),i=t.tracks;t.tracks=[];for(var s=0;s<i.length;s++){var e=i[s];(e=ue(e)).player=void 0,t.tracks[s]=e}return t},n.createModal=function(t,i){var s=this;(i=i||{}).content=t||"";var e=new Ee(this,i);return this.addChild(e),e.on("dispose",(function(){s.removeChild(e)})),e.open()},e.getTagSettings=function(t){var i={sources:[],tracks:[]},s=ls(t),e=s["data-setup"];if(hs(t,"vjs-fluid")&&(s.fluid=!0),null!==e){var n=je(e||"{}"),r=n[0],h=n[1];r&&zi.error(r),Ri(s,h)}if(Ri(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(ls(c)):"track"===l&&i.tracks.push(ls(c))}return i},n.bi=function(){var t=Pi.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},e}(i);bo.players={};var ko=t.navigator;bo.prototype.h={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:ko&&(ko.languages&&ko.languages[0]||ko.userLanguage||ko.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.Zi(t)}})),yo.forEach((function(t){bo.prototype["handleTech"+ae(t)+"_"]=function(){return this.trigger(t)}})),i.registerComponent("Player",bo);var wo,_o,xo=function(t){function i(s){var e;void 0===s&&(s={});var n=ue(s,{kind:Ie[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(Os)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return w.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.W=!0,r||le(e)}return fe(i,t),i}($e),Co=function(t){function i(s){var e;void 0===s&&(s={});var n=ue(s,{kind:Be[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(Os)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return w.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||le(e)}return fe(i,t),i}($e);function So(t,s,e){var n;if("string"==typeof t){if(0===t.indexOf("#")&&(t=t.slice(1)),So.getPlayers()[t])return s&&zi.warn('Player "'+t+'" is already initialised. Options will not be applied.'),e&&So.getPlayers()[t].ready(e),So.getPlayers()[t];n=function(t){return 0===t.indexOf("#")&&(t=t.slice(1)),Pi.getElementById(t)}(t)}else n=t;if(!n||!n.nodeName)throw new b("The element or ID supplied is not valid. (videojs)");if(n.player||bo.players[n.playerId])return n.player||bo.players[n.playerId];s=s||{},So.hooks("beforesetup").forEach((function(t){var i=t(n,ue(s));Oi(i)&&!Array.isArray(i)?s=ue(s,i):zi.error("please return an object in beforesetup hooks")}));var r=new(i.getComponent("Player"))(n,s,e);return So.hooks("setup").forEach((function(t){return t(r)})),r}"undefined"==typeof HTMLVideoElement&&Ji()&&(Pi.createElement("video"),Pi.createElement("audio"),Pi.createElement("track")),So.ys={},So.hooks=function(t,i){return So.ys[t]=So.ys[t]||[],i&&(So.ys[t]=So.ys[t].concat(i)),So.ys[t]},So.hook=function(t,i){So.hooks(t,i)},So.removeHook=function(t,i){var s=So.hooks(t).indexOf(i);return!(s<=-1)&&(So.ys[t]=So.ys[t].slice(),So.ys[t].splice(s,1),!0)},!0!==t.VIDEOJS_NO_DYNAMIC_STYLE&&Ji()&&((wo=ws(".vjs-styles-defaults"))||(wo=re("vjs-styles-defaults"),(_o=ws("head"))&&_o.insertBefore(wo,_o.firstChild),he(wo,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n "))),ne(1,So),So.VERSION="5.20.6-opentelly.14",So.options=bo.prototype.h,So.getPlayers=function(){return bo.players},So.players=bo.players,So.getComponent=i.getComponent,So.registerComponent=function(t,s){Gr.isTech(s)&&zi.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),i.registerComponent.call(i,t,s)},So.getTech=Gr.getTech,So.registerTech=Gr.registerTech,So.browser=qs,So.TOUCH_ENABLED=Ls,So.extend=function(t,i){void 0===i&&(i={});var s=function(){t.apply(this,arguments)},e={};for(var n in Oi(i)?("function"==typeof i.init&&(zi.warn("Constructor logic via init() is deprecated; please use constructor() instead."),i.constructor=i.init),i.constructor!==w.prototype.constructor&&(s=i.constructor),e=i):"function"==typeof i&&(s=i),function(t,i){if("function"!=typeof i&&null!==i)throw new b("Super expression must either be null or a function, not "+typeof i);t.prototype=w.create(i&&i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i&&(t.bs=i)}(s,t),e)e.hasOwnProperty(n)&&(s.prototype[n]=e[n]);return s},So.mergeOptions=ue,So.bind=oe,So.plugin=function(t,i){bo.prototype[t]=i},So.addLanguage=function(t,i){var s;return t=(""+t).toLowerCase(),So.options.languages=ue(So.options.languages,((s={})[t]=i,s)),So.options.languages[t]},So.log=zi,So.createTimeRange=So.createTimeRanges=me,So.formatTime=oh,So.parseUrl=Re,So.isCrossOrigin=Oe,So.EventTarget=ce,So.on=Ys,So.one=te,So.off=Ks,So.trigger=Zs,So.xhr=Er,So.TextTrack=Dr,So.AudioTrack=xo,So.VideoTrack=Co,So.isEl=Qi,So.isTextNode=ms,So.createEl=Ki,So.hasClass=hs,So.addClass=os,So.removeClass=as,So.toggleClass=us,So.setAttributes=cs,So.getAttributes=ls,So.emptyEl=gs,So.appendContent=ys,So.insertContent=bs,So.computedStyle=vh;var jo=10;function To(t){const i=t.duration;if(S(i)){var s;const i=null==(s=t.source)?void 0:s.streamType;return"live"===i||"dvr"===i}return i===1/0}function Mo(t){return t.scrubbing()?t.getCache().currentTime:t.currentTime()}function Ao(t){const i=No(t);return To(t)?i.end(i.length-1):i.start(0)}function Po(t){return No(t).start(0)}function Eo(t){const i=No(t);return i.end(i.length-1)-i.start(0)}function No(t){const i=t.seekable;if(i&&i.length)return i;let s=t.duration;return s=isFinite(s)?s:0,new Ft([0,s]).ks()}function Bo(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 Io(t){return class extends t{get ws(){var t;return null!=(t=this._s)?t:this._s=Fo(this.player())}dispose(){this._s=void 0,super.dispose()}constructor(...t){super(...t),this._s=void 0}}}function Fo(t){return t.tech({IWillNotUseThisInPlugins:!0}).theoplayer()}function Do(t){const i=Fo(t),s=()=>{const s=Mo(t);t.toggleClass("theo-at-live",function(t,i){if(To(t)){let s=t.seekable;return 0===s.length||s.end(s.length-1)-i<jo}return!1}(i,s)),t.toggleClass("vjs-live",To(i)),t.toggleClass("theo-dvr",function(t){var i;return"dvr"===gt(t.duration,t.seekable,null==(i=t.source)?void 0:i.streamType)}(i))};t.on("emptied",s),t.on("timeupdate",s),t.on("durationchange",s)}var $o="theo-ad-playing",Ro="theo-dai-ad-playing";function Oo(t,i,s){t.toggleClass($o,i),t.toggleClass(Ro,i&&s)}function Vo(){this.userActive(!1)}var Uo=class{constructor(t,i){this.type=t.type,this.target=i,this.playerEvent=t}},zo=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],Lo=So.getTech("Tech"),Ho=So.getTech("Html5"),qo=class extends Lo{xs(){var t;for(const t of zo)this.ws.addEventListener(t,this.Cs);this.ws.addEventListener("error",this.Ss),this.ws.addEventListener("contentprotectionerror",this.Ss),this.ws.addEventListener("sourcechange",this.js),this.ws.addEventListener("loadstart",this.Ts),null==(t=this.ws.presentation)||t.addEventListener("presentationmodechange",this.Ms),this.ws.textTracks.addEventListener("addtrack",this.As),this.ws.textTracks.addEventListener("removetrack",this.Ps),this.ws.textTracks.addEventListener("change",this.Es),this.ws.audioTracks.addEventListener("addtrack",this.Ns),this.ws.audioTracks.addEventListener("removetrack",this.Bs),this.ws.audioTracks.addEventListener("change",this.Is)}Fs(){var t;for(const t of zo)this.ws.removeEventListener(t,this.Cs);this.ws.removeEventListener("error",this.Ss),this.ws.removeEventListener("contentprotectionerror",this.Ss),this.ws.removeEventListener("sourcechange",this.js),this.ws.removeEventListener("loadstart",this.Ts),null==(t=this.ws.presentation)||t.removeEventListener("presentationmodechange",this.Ms),this.ws.textTracks.removeEventListener("addtrack",this.As),this.ws.textTracks.removeEventListener("removetrack",this.Ps),this.ws.textTracks.removeEventListener("change",this.Es),this.ws.audioTracks.removeEventListener("addtrack",this.Ns),this.ws.audioTracks.removeEventListener("removetrack",this.Bs),this.ws.audioTracks.removeEventListener("change",this.Is)}Ds(t){this.trigger(new Uo(t,this))}createEl(){let t=this.h,i=t.player;if(!i)throw new g(this.localize('Missing required tech option "player"'));let s=i.element;return So.setAttributes(s,{id:t.techId}),s}theoplayer(){return this.ws}addTextTrack(t,i,s){return super.addTextTrack(t,i,s)}buffered(){return this.ws.buffered}played(){return this.ws.played}reset(){this.ws.stop()}play(){this.ws.play()}pause(){this.ws.pause()}paused(){return this.ws.paused}currentTime(){return this.ws.currentTime}setCurrentTime(t){this.ws.currentTime=t}duration(){return this.ws.duration}volume(){return this.ws.volume}setVolume(t){this.ws.volume=t}muted(){return this.ws.muted}setMuted(t){this.ws.muted=t}src(t){if(void 0!==t)this.setSrc(t);else{if(this.ws.src)return this.ws.src;if(this.ws.source){if(!Yt(this.ws.source.ads))return this.ws.source.ads[0].sources;if(M(this.ws.source))return"This source is managed by the Verizon Media integration extension.";if(Tt(this.ws.source))return"This source is managed by the DAI integration extension.";if(T(this.ws.source))return"This source is managed by Millicast."}}}setSrc(t){return this.setSource({src:t})}setSource(t){this.lt=null,this.trigger("error")}currentSrc(){return this.ws.src}load(){this.setPreload("auto")}preload(){return this.ws.preload}setPreload(t){this.ws.preload=t}autoplay(){return this.ws.autoplay}setAutoplay(t){this.ws.autoplay=!!t}seeking(){return this.ws.seeking}seekable(){return this.ws.seekable}ended(){return this.ws.ended}playbackRate(){return this.ws.playbackRate}setPlaybackRate(t){this.ws.playbackRate=t}readyState(){return this.ws.readyState}networkState(){return 0}controls(){return!1}videoHeight(){return this.ws.videoHeight}videoWidth(){return this.ws.videoWidth}supportsFullScreen(){return this.ws.presentation.supportsMode(Lt.FULLSCREEN)}enterFullScreen(){this.ws.presentation.requestMode(Lt.FULLSCREEN)}exitFullScreen(){this.ws.presentation.requestMode(Lt.INLINE)}$s(){let t=this.ws.ads;if(t&&t.playing)return!0;let i=this.ws.vr;return!(!i||i.state===wt.Rs)}initTextTrackListeners(){return this.on("touchend",(t=>{this.$s()&&(t.preventDefault=()=>{})})),super.initTextTrackListeners()}Zt(){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.Fs(),this.ws=null,super.dispose()}static isSupported(){return!0}static canPlayType(){return"maybe"}static canPlaySource(t){return"maybe"}get featuresVolumeControl(){return di}constructor(t={},i){super(t,i),this.Cs=t=>this.Ds(t),this.Os=!1,this.js=()=>{void 0===this.ws.errorObject&&(this.Ds(new At(this.ws.currentTime,this.ws.readyState)),this.Ds(new pi),this.Ds(new Et(this.ws.duration)))},this.Ts=()=>{this.Ds(new kt(this.ws.currentTime))},this.As=t=>{this.textTracks().tt(t.track)},this.Ns=t=>{this.audioTracks().tt(t.track)},this.Ps=t=>{this.textTracks().it(t.track)},this.Bs=t=>{this.audioTracks().it(t.track)},this.Es=()=>{let t=this.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Is=()=>{let t=this.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Ms=()=>{if(!this.supportsFullScreen())return;let t=this.Os,i=this.ws.presentation.currentMode===Lt.FULLSCREEN;t!==i&&(this.Os=i,this.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))},this.Ss=()=>{const t=this.ws.errorObject,i=t&&nt(t.code)||-1,s=t&&t.message||"An unknown error occurred.";this.error({code:i,message:this.localize(s)})},this.ws=this.h.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.Zt(),s&&this.ready((()=>this.play())),this.triggerReady()}};qo.prototype.featuresFullscreenResize=Ho.prototype.featuresFullscreenResize,qo.prototype.featuresPlaybackRate=Ho.prototype.featuresPlaybackRate,qo.prototype.featuresProgressEvents=!0,qo.prototype.featuresTimeupdateEvents=!0,qo.prototype.featuresNativeTextTracks=!0,So.registerTech("THEOplayer",qo);var Wo=class{constructor(t){this.Vs=t=>{Kt(this.Us,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.zs=t=>{ti(this.Us,"theo-mobile-button-hover")},this.Ls=t=>{this.Us.blur()},this.Us=t,t.addEventListener("touchstart",this.Vs),t.addEventListener("touchend",this.zs),t.addEventListener("focusin",this.Ls)}},Go=So.getComponent("Menu"),Xo=class extends(Io(Go)){get Hs(){return this.player().el()}qs(){Kt(this.Hs,"theo-menu-opened")}Ws(){ti(this.Hs,"theo-menu-opened")}constructor(t,i){super(t,i)}},Jo=So.getComponent("MenuItem"),Qo=class extends(Io(Jo)){get parentMenu(){return this.Gs}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.Xs||(this.parentMenu.Js(this),"tap"!==t.type&&"keydown"!==t.type||(this.Xs=!0,this.trigger("click"),this.Xs=!1))}dispose(){Mt.Ys.Qs&&(this.el().removeEventListener("touchstart",this.Vs),this.el().removeEventListener("touchend",this.zs)),super.dispose()}constructor(t,i,s){super(t,vi({selectable:!0},i)),this.Xs=!1,this.Vs=t=>{Kt(this.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},this.zs=t=>{ti(this.el(),"theo-mobile-menu-item-hover")},this.Gs=s,Mt.Ys.Qs&&(this.el().addEventListener("touchstart",this.Vs),this.el().addEventListener("touchend",this.zs))}},Yo=So.getComponent("ClickableComponent"),Ko=class extends Yo{get parentMenu(){return this.Gs}get Ks(){return this.Zs}set Ks(t){this.Zs=t,this.el().setAttribute("tabindex",this.Ks?"0":"-1"),this.te()}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.Xs&&this.Ks&&(this.Gs.ie(),"tap"===t.type&&(this.Xs=!0,this.trigger("click"),this.Xs=!1))}te(){this.Ks?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.Xs=!1,this.Zs=!1,this.Gs=s,this.on(t,"languagechange",this.te)}},Zo=class extends Xo{get menuHeader(){return this.se}get menuItems(){return this.children()}addMenuItem(t){t=vi({playerOptions:this.h.playerOptions},t);let i=new Qo(this.player(),t,this);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}addSubMenuItem(t){t=vi({playerOptions:this.h.playerOptions},t);let i=this.ee(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"}qs(){super.qs(),s.removeEventListener("resize",this.ne),s.addEventListener("resize",this.ne),this.show()}re(){let t=this.he();if(!t)return;let i=t.getClientRects();Mt.Ys.Qs?this.oe(t,i):this.ae(t,i)}he(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0}ae(t,i){}oe(t,i){}Ws(){s.removeEventListener("resize",this.ne),super.Ws(),this.hide(),Mt.Ys.Qs&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=this.contentEl();Kt(i,"theo-menu-content");let s=new Ko(this.player(),this.h,this);return i.parentNode.insertBefore(s.el(),i),this.se=s,t}Js(t){}show(){return this.re(),super.show()}dispose(){this.se&&this.se.dispose(),super.dispose()}constructor(t,i){super(t,i),this.ne=()=>this.re(),this.ue=this.player().el(),this.hide(),this.on("menuchange",this.re)}},ta=class extends Zo{get ce(){return this.le}set ce(t){this.le&&this.le.de(this),this.le=t,t&&t.fe(this)}ve(t){this.ce.pe(t,"replace")}me(t){t.ce.pe(this,"restore")}ge(){ti(this.ye,"vjs-hidden"),this.ye.style.opacity="1",super.show()}be(){Kt(this.ye,"vjs-hidden")}qs(){this.ce&&this.ce.qs(),super.qs()}Ws(){this.ce&&this.ce.Ws(),super.Ws(),Kt(this.ye,"vjs-hidden")}he(){if(this.ce&&this.ce.ke)return this.ce.ke.ye}ae(t,i){if(i.length>0){let t=i[0].height,s=i[0].width;this.le.we.style.height=t+"px",this.le.we.style.width=s+"px"}super.ae(t,i)}constructor(t,i){super(t,i)}},ia=class{get we(){return this.Us}get ke(){return this._e}fe(t){t.be(),this.Us.appendChild(t.ye)}de(t){this.Us.removeChild(t.ye)}pe(t,i){if(t==this._e)return;let s=this._e;if(this._e=t,this._e.ge(),this.ke.focus(),Mt.Ys.Qs)s.be();else{const t="translateX(100%)",e="translateX(-100%)",n=ri("transform");s.ye.style.opacity="0",s.ye.style[n]="replace"===i?e:t,this._e.ye.style.opacity="1",this._e.ye.style[n]="",u((()=>{s.be(),s.ye.style[n]=""}),300)}}qs(){this.xe(),this._e.ge(),this.Ce()}Ws(){this.xe(),this._e.be(),this.Se.be(),this._e=this.Se,this.Ce()}Ce(){Zt((()=>{ti(this.Us,"theo-no-transition"),ti(this._e.ye,"theo-no-transition")}))}xe(){Kt(this.Us,"theo-no-transition"),Kt(this._e.ye,"theo-no-transition")}constructor(t){this.Se=this._e=t,this.Us=h.createElement("div"),this.Us.className="theo-tertiary-background theo-menu-animation-container",this.Us.appendChild(this.Se.ye),this.ue=this._e.player().el()}},sa=class extends ta{get ye(){return this.el()}get parentMenu(){return this.je}ee(t,i){let s=new ea(t,i,this);return s.subMenu.ce=this.ce,s}ie(){this.Te()}Js(t){super.Js(t),this.Te()}Te(){this.parentMenu.me(this)}buildCSSClass(){return"theo-submenu "+(this.Me?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+super.buildCSSClass()}addSubMenuItem(t){this.Me=!0;let i=super.addSubMenuItem(t);return this.removeClass("theo-leaf-submenu"),i}constructor(t,i,s){super(t,i),this.Me=!1,this.je=s,this.menuHeader.Ks=!0}},ea=class extends Qo{get subMenu(){return this.Ae}handleClick(t){this.parentMenu.ve(this.subMenu)}constructor(t,i,s){super(t,vi({selectable:!1},i),s),this.Ae=new sa(t,i,s)}},na=class extends ta{get menuButton(){return this.Pe}createEl(){let t=So.createEl("div",{className:this.buildCSSClass()});return this.Ee=super.createEl(),this.Ee.className=super.buildCSSClass(),Kt(this.Ee,"theo-menu-content-animatable"),t.appendChild(this.Ee),this.ce=new ia(this),t.appendChild(this.ce.we),t}buildCSSClass(){return"theo-menu-animatable "+super.buildCSSClass()}ee(t,i){let s=new ea(t,i,this);return s.subMenu.ce=this.ce,s}ae(t,i){super.ae(t,i);let s=this.ue.getClientRects(),e=s.length>0?s[0]:void 0,n=C(getComputedStyle(this.el()).fontSize);I(this.el(),this.Pe.el(),e,n)}get ye(){return this.Ee}ie(){this.Pe.closeMenu()}dispose(){this.Ne||(this.Ne=!0,super.dispose())}constructor(t,i,s){super(t,i),this.Ne=!1,this.Pe=s}},ra=class{set Be(t){this.Ie.innerHTML=this.Fe.localize(t),this.De(),this.$e(),hi(this.Fe.el())}get Be(){return this.Ie.textContent||""}Re(){this.Fe.off("mouseover",this.$e),this.Fe.off("mouseout",this.De),this.Fe.off("dispose",this.Oe),Wt(this.Ie)}constructor(t,i){this.$e=()=>{ti(this.Ie,"vjs-hidden");let t=this.Fe.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,s=C(getComputedStyle(this.Ie).fontSize);I(this.Ie,this.Fe.el(),i,s)},this.De=()=>{Kt(this.Ie,"vjs-hidden")},this.Oe=()=>this.Re(),this.Fe=t,hi(t.el()),ai(t.el()),this.Ie=h.createElement("span"),this.Ie.innerHTML=this.Fe.localize(i),this.Ie.className="theo-button-tooltip vjs-hidden",this.Ie.setAttribute("aria-hidden","true"),this.Fe.el().appendChild(this.Ie),this.Fe.on("mouseover",this.$e),this.Fe.on("mouseout",this.De),this.Fe.on("dispose",this.Oe)}},ha=So.getComponent("Button"),oa=class extends(Io(ha)){get Ve(){const t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}get menu(){return this.Ue}isMenuOpen(){return this.ze}openMenu(){this.Le&&!this.ze&&(this.Ue.qs(),this.el().setAttribute("aria-expanded","true"),this.ze=!0,this.Ue.focus())}closeMenu(){this.Le&&this.ze&&(this.Ue.Ws(),this.el().setAttribute("aria-expanded","false"),this.ze=!1)}set minimumMenuItems(t){this.He=t,this.qe()}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.ze?this.closeMenu():this.openMenu()}enable(){return this.Le=!0,super.enable()}disable(){return this.closeMenu(),this.Le=!1,super.disable()}te(){this.Ie.Be=this.controlText()}dispose(){this.player().removeChild(this.Ue),this.Ue.dispose(),this.Ie.Re(),this.ws.removeEventListener("seeking",this.We),super.dispose()}constructor(t,i){super(t,i),this.ze=!1,this.He=1,this.Le=!0,this.Ge=t=>{let i=this.el().contains(t.target),s=this.Ue.el().contains(t.target),e=!1;var n;Mt.Ys.Qs&&this.Ve&&(e=(null==(n=this.el().parentElement)?void 0:n.querySelector(".theo-mobile-menu-background"))===t.target);i||s||!this.ze||(e&&t.preventDefault(),this.closeMenu())},this.Xe=t=>{27===t.which&&(this.closeMenu(),this.focus())},this.We=()=>{this.ze&&this.closeMenu()},this.qe=()=>{this.Ue.menuItems.length>=this.He?this.show():(this.closeMenu(),this.hide())},this.Ue=new na(t,i,this),this.player().getChild("controlBarMenuContainer").addChild(this.Ue),this.Ie=new ra(this,this.controlText()),this.el().setAttribute("aria-haspopup","true"),Mt.Ys.Je?(this.on(h,"touchend",this.Ge),new Wo(this.el())):(this.on(h,"click",this.Ge),this.on(h,"keydown",this.Xe),li&&this.on(h,li.Qe,this.closeMenu)),this.ws.addEventListener("seeking",this.We),this.on(this.Ue,"menuchange",this.qe),this.on(t,"languagechange",this.te),this.qe()}},aa=So.getComponent("Component"),ua=class extends(So.getComponent("ControlBar")){addMenuButton(t){t=vi({playerOptions:this.h.playerOptions},t);let i=new oa(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)}};So.registerComponent("THEOControlBarShadow",class extends aa{createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-tertiary-color theo-control-bar-shadow"}});var ca=So.getComponent("VolumeBar"),la=class extends ca{handleFocus(t){super.handleFocus(t),this.Ye.addClass("focus-within")}handleBlur(t){super.handleBlur(t),this.Ye.removeClass("focus-within")}constructor(t,i){super(t,i),this.Ye=i.Ke}},da=So.getComponent("VolumeControl"),fa=class extends da{constructor(t,i){super(t,i),this.Ze=new la(t,{Ke:this}),this.addChild(this.Ze)}};fa.prototype.h=vi({},da.prototype.h,{children:[]}),So.registerComponent("VolumeControl",fa);var va=class extends(Io(ua)){tn(){this.sn(this.nn())}rn(){0===this.hn&&(this.hn=u(this.an,100))}un(t){"opacity"===t.propertyName&&(0!==this.hn&&(c(this.hn),this.hn=0),this.sn(!0))}cn(t){"opacity"===t.propertyName&&(this.nn()||this.sn(!1))}nn(){return"0"!==s.getComputedStyle(this.el()).opacity}sn(t){this.ln!==t&&(this.ln=t,t?this.dn():this.ws.textTrackStyle.marginBottom=void 0)}dn(){const t=this.el().getBoundingClientRect().height;this.ws.textTrackStyle.marginBottom!==t&&(this.ws.textTrackStyle.marginBottom=t)}dispose(){c(this.hn),this.hn=0,this.vn.fn(ii.pn,this.mn),this.vn.gn(),super.dispose()}constructor(t,i){super(t,i),this.ln=!1,this.hn=0,this.an=()=>{0!==this.hn&&(this.hn=0,this.sn(this.nn()))},this.mn=()=>{this.ln&&this.dn()},this.on(t,"ready",this.tn),this.on(t,"pause",this.tn),this.on(t,"useractive",this.tn),this.on(t,"firstplay",this.rn),this.on(t,"play",this.rn),this.on(t,"userinactive",this.rn),this.on("transitionstart",this.un),this.on("transitionend",this.cn),this.vn=new oi(this.el()),this.vn.yn(ii.pn,this.mn),this.vn.bn(!0)}};va.prototype.h=vi({},ua.prototype.h,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),So.registerComponent("ControlBar",va);var pa=class extends ua{buildCSSClass(){return"theo-top-controlbar "+super.buildCSSClass()}constructor(t,i){super(t,i),t.topControlBar=this}};pa.prototype.h=vi({},ua.prototype.h,{children:[]}),So.registerComponent("TopControlBar",pa);var ma=So.getComponent("CurrentTimeDisplay"),ga=class extends(Io(ma)){updateContent(){const t=Mo(this.player()),i=this.ws,s=Po(i),e=this.localize("Current Time"),n=Bo(_.max(0,t-s),Eo(i));n!==this.Mt&&(this.Mt=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)}};So.registerComponent("CurrentTimeDisplay",ga);var ya=So.getComponent("DurationDisplay"),ba=class extends(Io(ya)){updateContent(){const t=this.ws,i=S(t.duration)?NaN:Eo(t),s=t.clip.endTime-t.clip.startTime,e=_.min(i,s)||0;if(this.ct!==e){this.ct=e;const t=this.localize("Duration Time"),i=Bo(e);this.S.innerHTML='<span class="vjs-control-text">'+t+"</span> "+i}}dispose(){var t;null==(t=this.ws)||t.clip.removeEventListener("change",this.kn),super.dispose()}constructor(t,i){var s;super(t,i),this.kn=()=>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),null==(s=this.ws)||s.clip.addEventListener("change",this.kn)}};So.registerComponent("DurationDisplay",ba);var ka=So.getComponent("Button"),wa=class extends(Io(ka)){buildCSSClass(){return"theo-live-control "+super.buildCSSClass()}createEl(){let t=super.createEl("button",{},{"aria-live":"off"});return this.wn=So.createEl("span",{className:"theo-live-control-indicator"}),Xt(t,this.wn),t}createControlTextEl(t){let i=super.createControlTextEl(t);return So.removeClass(i,"vjs-control-text"),So.addClass(i,"theo-live-control-text"),i}handleClick(){var t;const i=this.ws;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{const t=this.player();t.currentTime(Ao(i)),t.play()}}_n(){To(this.ws)?this.show():this.hide()}constructor(t,i){super(t,i),this.controlText("Live"),this._n(),this.on(t,"emptied",this._n),this.on(t,"durationchange",this._n),Mt.Ys.Je&&new Wo(this.el())}};So.registerComponent("LiveDisplay",wa);var _a=So.getComponent("LoadingSpinner");So.registerComponent("LoadingSpinner",class extends _a{buildCSSClass(){return"theo-secondary-color vjs-loading-spinner "+super.buildCSSClass()}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=So.createEl("div",{className:"theo-loading-spinner-rotator"}),s=So.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=So.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 xa=So.getComponent("LoadProgressBar"),Ca=class extends(Io(xa)){update(){let t=this.ws,i=Ft.xn(No(t)),s=i.Cn(0),e=Ft.xn(t.buffered).Sn(i),n=i.jn(0)-s,r=e.U&&e.jn(e.U-1)||0;r=_.max(0,r-s);let o=this.el(),a=this.Tn;o.style.width=Sa(r,n);for(let t=0;t<e.U;t++){let i=e.Cn(t),n=e.jn(t),u=a[t];u||(u=h.createElement("div"),a.push(u),o.appendChild(u)),u.style.left=Sa(i-s,r),u.style.width=Sa(n-i,r)}for(let t=a.length;t>e.U;t--)o.removeChild(a[t-1]);a.length=e.U}constructor(t,i){super(t,i),this.Tn=[],this.on(t,"emptied",this.update)}};function Sa(t,i){let s=t/i||0;return 100*(s>=1?1:s)+"%"}So.registerComponent("LoadProgressBar",Ca);var ja=So.getComponent("MouseTimeDisplay"),Ta=class extends(Io(ja)){handleMouseMove(t){let i=t,s=this.ws,e=Po(s)+this.calculateDistance(i)*Eo(s),n=i.pageX-N(this.el().parentNode).left;this.update(e,n+"px")}handleTouchMove(t){let i=t,s=this.ws,e=Po(s)+this.calculateDistance(i)*Eo(s),n=i.touches[0].pageX-N(this.el().parentNode).left;this.update(e,n+"px")}createEl(){let t=super.createEl();return this.Mn=So.createEl("span",{className:"theo-time-tooltip-text"}),t}update(t,i){this.An=t;let s=this.Pn(t);this.el().style.left=i,this.el().setAttribute("data-current-time",s),this.keepTooltipsInside&&(l(this.Mn,s),this.En())}En(){if(this.keepTooltipsInside&&this.tooltip.offsetParent){let t=this.player().contentEl(),i=t.getClientRects(),s=i.length>0?i[0]:void 0,e=C(getComputedStyle(t).fontSize);I(this.tooltip,this.el(),s,e)}}Pn(t){const i=this.ws,s=t-Ao(i);return Bo(To(i)?_.min(s,0):s,Eo(i))}dispose(){var t;this.ws.removeEventListener("dimensionchange",this.Nn),null==(t=this.ws.presentation)||t.removeEventListener("presentationmodechange",this.Nn),super.dispose()}constructor(t,i){var s;(super(t,i),this.An=NaN,this.Nn=()=>{let t=Mo(this.player());const i=this.ws;let s=(t-Po(i))/Eo(i)||0;s=zt(s,0,1),this.update(t,100*s+"%")},this.keepTooltipsInside&&(So.addClass(this.tooltip,"theo-secondary-color"),this.tooltip.appendChild(this.Mn)),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"mouseenter",this.handleMouseMove)})),Pt.Qs)&&(this.on(t,"firstplay",this.Nn),this.on(t,"play",this.Nn),this.on(t,"seeking",this.Nn),this.on(t,"seeked",this.Nn),this.on(t,"timeupdate",this.Nn),this.ws.addEventListener("dimensionchange",this.Nn),null==(s=this.ws.presentation)||s.addEventListener("presentationmodechange",this.Nn),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"touchstart",this.handleTouchMove),this.on(t.controlBar.progressControl,"touchmove",Vt((t=>this.handleTouchMove(t)),25)),this.Nn()})))}};So.registerComponent("MouseTimeDisplay",Ta);var Ma=So.getComponent("PlayProgressBar"),Aa=class extends(Io(Ma)){updateDataAttr(){let t=Mo(this.player());this.el().setAttribute("data-current-time",this.Pn(t))}Pn(t){let i=this.ws;return Bo(t-Ao(i),Eo(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)}};So.registerComponent("PlayProgressBar",Aa);var Pa=So.getComponent("RemainingTimeDisplay"),Ea=class extends(Io(Pa)){updateContent(){const t=this.ws,i=Eo(t);if(i){const s=No(t).end(0),e=this.localize("Remaining Time"),n=Bo(_.max(0,s-this.player().currentTime()),i);n!==this.Mt&&(this.Mt=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)}};So.registerComponent("RemainingTimeDisplay",Ea);var Na=class{get ws(){return this._s||(this._s=this.Bn.tech({IWillNotUseThisInPlugins:!0}).theoplayer()),this._s}In(t){if(t.kind!==dt.Fn)return;if(0===this.ws.seekable.length)return;this.Dn=t;const i=t.cues.slice();this.Rn.$n(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 Ba(s,this.ws,n);this.On.push(r),this.Vn.appendChild(r.we)}t.addEventListener("cuechange",this.Un),this.Un()}zn(){this.ws.addEventListener("loadedmetadata",this.Ln),this.ws.addEventListener("loadeddata",this.Ln),this.ws.addEventListener("sourcechange",this.Ln),this.ws.textTracks.addEventListener("addtrack",this.Hn),this.ws.textTracks.addEventListener("removetrack",this.qn),this.ws.textTracks.addEventListener("change",this.Ln)}Wn(){this.ws.removeEventListener("loadedmetadata",this.Ln),this.ws.removeEventListener("loadeddata",this.Ln),this.ws.removeEventListener("sourcechange",this.Ln),this.ws.textTracks.removeEventListener("addtrack",this.Hn),this.ws.textTracks.removeEventListener("removetrack",this.qn),this.ws.textTracks.removeEventListener("change",this.Ln)}Gn(){if(!(this.ws.readyState<yt.Xn))for(let t of this.ws.textTracks)if(t.kind===dt.Fn&&t.mode===ct.Jn&&t.cues.length>0&&t.readyState!==ht.ERROR)return t}Qn(t){this.Rn.Yn(t)}Kn(){this.Rn.ge()}Zn(){this.Rn.be()}tr(){for(let t of this.On)t.Re();this.Rn.tr(),this.On=[],this.ir=void 0,this.Dn&&this.Dn.removeEventListener("cuechange",this.Un),this.Dn=void 0}Re(){this.Wn(),this.sr.removeEventListener("mousemove",this.er),this.sr.removeEventListener("mouseenter",this.nr),this.sr.removeEventListener("mouseleave",this.rr),this.tr(),this.Rn.Re(),this._s=void 0}constructor(t,i){this.Bn=i,this.On=[],this._s=void 0,this.Hn=t=>{let i=t.track;i.kind===dt.Fn&&(i.addEventListener("addcue",this.Ln),i.addEventListener("removecue",this.Ln),i.addEventListener("readystatechange",this.Ln)),this.Ln()},this.qn=t=>{let i=t.track;i.kind===dt.Fn&&(i.removeEventListener("addcue",this.Ln),i.removeEventListener("removecue",this.Ln),i.removeEventListener("readystatechange",this.Ln)),this.Ln()},this.er=t=>{let i=this.ws,s=function(t,i){let s,e,n=N(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.Vn,t),e=Po(i)+s.x*Eo(i);e===i.duration&&(e-=.1),this.Qn(e)},this.rr=()=>{this.Rn.be()},this.nr=()=>{this.Rn.ge()},this.Ln=()=>{let t=this.Gn();t!==this.Dn&&(this.tr(),t&&this.In(t))},this.Un=()=>{var t,i,s;const e=null==(i=this.Dn)||null==(t=i.activeCues)?void 0:t[0],n=A(this.On,(t=>t.hr===e));n!==this.ir&&(null==(s=this.ir)||s.ar(),this.ir=n,null==n||n.ur())},this.sr=t,this.Rn=new Ia,this.Bn.contentEl().appendChild(this.Rn.we),this.Vn=h.createElement("div"),Kt(this.Vn,"theoplayer-chapterbar"),this.sr.appendChild(this.Vn),this.sr.addEventListener("mousemove",this.er),this.sr.addEventListener("mouseenter",this.nr),this.sr.addEventListener("mouseleave",this.rr),this.zn()}},Ba=class{get we(){return this.Us}ur(){Kt(this.Us,"theoplayer-chapter-indicator-active")}ar(){ti(this.Us,"theoplayer-chapter-indicator-active")}cr(t,i){let s=t.seekable.start(0),e=t.seekable.end(t.seekable.length-1)-s,n=this.hr.startTime,r=this.hr.endTime-n,o=h.createElement("div");Kt(o,"theoplayer-chapter-indicator");let a=h.createElement("div");Kt(a,"theoplayer-chapter-indicator-highlight"),o.appendChild(a),i&&Kt(o,"theoplayer-chapter-indicator-discontinuous");let u=_.min(n/e*100,100),c=100-u,l=_.min(r/e*100,c);return o.style.width=l+"%",o.style.left=u+"%",o}Re(){Wt(this.Us)}constructor(t,i,s){this.hr=t,this.Us=this.cr(i,s)}},Ia=class{be(){this.lr--,0===this.lr&&ti(this.we,"theoplayer-chapter-hovering")}$n(t){this.dr=t||[],this.dr.length>0&&(this.we.style.display="")}pr(t){l(this.mr,t.content)}tr(){this.dr=[],l(this.mr,""),this.we.style.display="none"}ge(){this.lr++,this.lr>0&&Kt(this.we,"theoplayer-chapter-hovering")}Yn(t){for(let i of this.dr)if(Fa(i,t)){this.pr(i);break}}Re(){Wt(this.we)}constructor(){this.dr=[],this.lr=0,this.we=h.createElement("div"),Kt(this.we,"theoplayer-chaptertitle"),this.we.style.display="none",this.mr=h.createElement("p"),this.we.appendChild(this.mr)}};function Fa(t,i){return new Ft([t.startTime,t.endTime]).gr(i)}var Da=So.getComponent("SeekBar"),$a=class extends(Io(Da)){updateAriaAttributes(t){const i=Mo(this.player()),s=this.ws;t.setAttribute("aria-valuenow",(100*this.yr(i)).toFixed(2)),t.setAttribute("aria-valuetext",Bo(i-Ao(s),Eo(s)))}getPercent(){return this.yr(this.player().currentTime())}handleMouseMove(t){if(this.ws&&this.ws.ads&&this.ws.ads.playing)return;const i=this.ws;let s=Po(i)+this.calculateDistance(t)*Eo(i);s>=i.duration&&(s=i.duration-.1),this.Vn.Qn(s),this.player().currentTime(s)}handleMouseDown(t){this.playingStates.push(!this.player().paused()),this.Vn.Kn(),super.handleMouseDown(t)}handleMouseUp(t){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.Vn.Zn(),super.handleMouseUp(t)}yr(t){let i=this.ws,s=(t-Po(i))/Eo(i);return zt(s,0,1)}dispose(){this.Vn.Re(),F(this.playingStates)}constructor(t,i){super(t,i),this.playingStates=[],this.on(t,"emptied",this.update),this.on(t,"seeking",this.update),this.Vn=new Na(this.el(),t)}};So.registerComponent("SeekBar",$a);var Ra=So.getComponent("ProgressControl");Mt.Ys.Qs&&So.registerComponent("ProgressControl",class extends Ra{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 Oa=So.getComponent("TooltipProgressBar"),Va=class extends(Io(Oa)){updateDataAttr(){let t=Mo(this.player()),i=this.Pn(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i}Pn(t){const i=this.ws;return Bo(t-Ao(i),Eo(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)}};function Ua(t){for(const i of t)if(i.enabled)return i}function za(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:La(t),description:Ha(t),hd:!!t.height&&t.height>=720}}function La(t){return t.height?t.height+"p":t.bandwidth?Ha(t):""}function Ha(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":""}So.registerComponent("TooltipProgressBar",Va);var qa=class{get br(){return this.kr}set br(t){let i=this.kr;for(let s=i.length-1;s>=0;s--){let e=i[s];B(t,e)||this.wr(e)}for(let i of t)this._r(i);this.Cr.re()}get Sr(){return this.Cr.menuItems}jr(t){let i=this.Sr;if(i)for(let s of i)if(s.Tr===t)return s}Mr(t){let i=this.Cr.addMenuItem();return i.Tr=t,i.on("click",(()=>this.Ar(i))),i.el().setAttribute("role","menuitemradio"),i}Pr(t){t.dispose()}Er(t){return!0}_r(t){if(this.Er(t)){B(this.kr,t)||this.kr.push(t);let i=this.jr(t)||this.Mr(t);return this.Nr(i),i}this.wr(t)}wr(t){let i=this.jr(t);i&&(this.Cr.removeMenuItem(i),this.Pr(i)),E(this.kr,t)}Re(){const t=[];for(let i of this.kr)t.push(i);for(let i of t)this.wr(i);F(t)}constructor(t){this.kr=[],this.Cr=t}},Wa=class extends qa{Br(){return this.Ir=h.createElement("span"),this.Ir.className="theo-settings-control-menu-item-title",l(this.Ir,this.Fr.localize("Quality")),this.Ir}Dr(){return this.$r=h.createElement("span"),this.$r.className="theo-settings-control-menu-quality-automatic",l(this.$r,this.Fr.localize("Automatic")),this.$r}Rr(){return this.Or=h.createElement("span"),l(this.Or,this.Fr.localize("Automatic")),this.Or}Vr(){return this.Ur=h.createElement("span"),this.Ur.className="theo-primary-color theo-settings-control-menu-item-hd-label",l(this.Ur,this.Fr.localize("HD")),this.Ur}zr(){let t=h.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.$r),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Or),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Ur),this.Lr.el().appendChild(this.Ir),this.Lr.el().appendChild(t),this.Lr.el().setAttribute("aria-label",this.Fr.localize("Open the video quality settings menu"))}Hr(){let t=this.qr,i=t&&Za(t.targetQuality),s=t&&t.activeQuality,e=za(this.Wr(i||s))||{name:this.Fr.localize("Automatic")};l(this.Or,e.name),si(this.$r,"vjs-hidden",!!i),si(this.Ur,"vjs-hidden",!e.hd)}Nr(t){let i=za(t.Tr)||{name:this.Fr.localize("Automatic")},s=i.name;i.hd&&(s+='<span class="theo-primary-color theo-settings-control-menu-item-hd-label">'+this.Fr.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.Fr.localize("Set video quality to ")+i.name),t.Tr?t.selected(t.Tr===this.Gr):t.selected(!this.Gr)}Ar(t){this.qr&&(this.qr.targetQuality=t.Tr&&t.Tr.videoQualities)}Wr(t,i){const s=i||this.br;for(let i of s)if(t&&i&&-1!==i.videoQualities.indexOf(t))return i}Re(){this._s.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.Xr),this.Fr.off("languagechange",this.te),this.qr&&(this.qr.removeEventListener("activequalitychanged",this.Jr),this.qr.removeEventListener("targetqualitychanged",this.Qr),this.qr.removeEventListener("update",this.Yr)),super.Re()}constructor(t,i,s){super(t.subMenu),this.qr=void 0,this.Gr=void 0,this.Xr=()=>{let t=Ua(this._s.videoTracks);if(t===this.qr)return;let i=[];if(this.qr&&(this.qr.removeEventListener("activequalitychanged",this.Jr),this.qr.removeEventListener("targetqualitychanged",this.Qr),this.qr.removeEventListener("update",this.Yr)),this.qr=t,t){t.addEventListener("activequalitychanged",this.Jr),t.addEventListener("targetqualitychanged",this.Qr),t.addEventListener("update",this.Yr);const s=Xa(Ya(t.qualities.filter((t=>t.available))));i=s.length>1?[void 0,...s]:[void 0]}this.br=i,this.Qr(),this.Jr()},this.Yr=t=>{const i=t.track;if(i!==this.qr)return;const s=Xa(Ya(i.qualities.filter((t=>t.available)))),e=i&&Za(i.targetQuality);let n;this.Gr=this.Wr(e,s),n=s.length>1?[void 0,...s]:[void 0],this.br=n,this.Hr()},this.Jr=()=>{this._r(void 0),this.Hr()},this.Qr=()=>{let t=Ua(this._s.videoTracks),i=t&&Za(t.targetQuality),s=this.Wr(i),e=this.Gr;s!==e&&(this.Gr=s,s&&e||this._r(void 0),e&&B(this.br,e)&&this._r(e),i&&this._r(s),this.Hr())},this.te=()=>{l(this.Cr.menuHeader.el(),this.Fr.localize("Quality")),l(this.Ir,this.Fr.localize("Quality")),l(this.$r,this.Fr.localize("Automatic")),l(this.Or,this.Fr.localize("Automatic")),l(this.Ur,this.Fr.localize("HD")),this.Lr.el().setAttribute("aria-label",this.Fr.localize("Open the video quality settings menu"));for(const t of this.Sr)this.Nr(t);this.Hr()},this.Lr=t,this._s=i,this.Fr=s,this.Ir=this.Br(),this.$r=this.Dr(),this.Or=this.Rr(),this.Ur=this.Vr(),this.zr(),l(this.Cr.menuHeader.el(),this.Fr.localize("Quality")),this.br=[void 0],this._s.videoTracks.addEventListener(["addtrack","removetrack","change"],this.Xr),this.Fr.on("languagechange",this.te),this.Xr()}},Ga=class{get height(){return this.Kr[0].height}get bandwidth(){return this.Kr[0].bandwidth}get videoQualities(){return this.Kr}get label(){return this.Kr[0].label}add(t){this.Kr.push(t)}constructor(t){this.Kr=t}};function Xa(t){let i=[];for(let s of t){let t=s,e=!1;for(let s of i)if(Ka(s,t)){s.add(t),e=!0;break}e||i.push(new Ga([t]))}return i}function Ja(t,i){return t&&i?Ci(t,i):_i.Zr}function Qa(t,i){return t===i?_i.Zr:Ja(t.height,i.height)||Ja(t.width,i.width)||Ja(t.bandwidth,i.bandwidth)}function Ya(t){return ki(t,Qa).reverse()}function Ka(t,i){return t.label&&i.label&&t.label===i.label||Q(za(t),za(i))}function Za(t){return It(t)?1===t.length?t[0]:void 0:t}function tu(t){return 1===t?"Normal":""+_.round(100*t)/100}var iu=class extends qa{Br(){return this.Ir=h.createElement("span"),this.Ir.className="theo-settings-control-menu-item-title",l(this.Ir,this.Fr.localize("Speed")),this.Ir}zr(){const t=h.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Lr.el().appendChild(this.Ir),this.Lr.el().appendChild(t),this.Lr.el().setAttribute("aria-label",this.Fr.localize("Open the video speed settings menu")),t}Mr(t){let i=super.Mr(t);return this.Nr(i),i}Nr(t){const i=t.Tr,s=this.Fr.localize(tu(i));l(t.el(),s),t.el().setAttribute("aria-label",this.Fr.localize("Set video speed to ")+s),t.selected(t.Tr===this._s.playbackRate)}Ar(t){this._s.playbackRate=t.Tr}Re(){this._s.removeEventListener("ratechange",this.th),this.Fr.off("languagechange",this.te),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.ih=void 0,this.th=()=>{this.ih&&this._r(this.ih);let t=this._s.playbackRate;this.ih=t,l(this.sh,this.Fr.localize(tu(t))),t&&this._r(t)},this.te=()=>{l(this.Cr.menuHeader.el(),this.Fr.localize("Speed")),l(this.Ir,this.Fr.localize("Speed")),this.Lr.el().setAttribute("aria-label",this.Fr.localize("Open the video speed settings menu"));for(const t of this.Sr)this.Nr(t);this.th()},this.Lr=t,this._s=i,this.Fr=s,this.Ir=this.Br(),this.sh=this.zr(),l(this.Cr.menuHeader.el(),this.Fr.localize("Speed")),this.br=e,this._s.addEventListener("ratechange",this.th),this.Fr.on("languagechange",this.te),this.th()}};So.registerComponent("SettingsButton",class extends oa{createEl(){let t=super.createEl();return this.eh=So.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),l(this.eh,this.localize("HD")),t.appendChild(this.eh),t}buildCSSClass(){return"vjs-icon-cog theo-settings-control-button "+super.buildCSSClass()}te(){super.te(),l(this.eh,this.localize("HD")),l(this.menu.menuHeader.el(),this.localize("Settings"))}dispose(){this.qr&&(this.qr.removeEventListener("activequalitychanged",this.Jr),this.qr=void 0),this.ws.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.nh),this.rh.Re(),this.hh.Re(),super.dispose()}constructor(t,i){var s,e;super(t,i),this.qr=void 0,this.nh=()=>{let t=Ua(this.ws.videoTracks);t!==this.qr&&(this.qr&&this.qr.removeEventListener("activequalitychanged",this.Jr),this.qr=t,t&&t.addEventListener("activequalitychanged",this.Jr),this.Jr())},this.Jr=()=>{var t;const i=null==(t=this.qr)?void 0:t.activeQuality,s=!!(i&&i.height>=720);this.player().toggleClass("theo-hd",s)},Kt(this.menu.el(),"theo-settings-control-menu"),l(this.menu.menuHeader.el(),t.localize("Settings")),this.controlText("Settings"),this.Ie.Be=this.controlText(),this.oh=this.menu.addSubMenuItem({name:"QualityMenuItem"}),this.rh=new Wa(this.oh,this.ws,t);let n=null!=(e=null==i||null==(s=i.playerOptions)?void 0:s.playbackRates)?e:[];this.ah=this.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),this.hh=new iu(this.ah,this.ws,t,n),this.ws.videoTracks.addEventListener(["addtrack","removetrack","change"],this.nh),this.nh()}});var su=class extends qa{uh(t){let i=t.label;if(i)return i;let s=t.language;if(s){let t=lt(s);if(t)return t.lh}return s||""}dh(){this.br=this.fh}Re(){this.fh.removeEventListener("addtrack",this.ph),this.fh.removeEventListener("removetrack",this.mh),this.fh.removeEventListener("change",this.gh),super.Re()}constructor(t,i){super(t),this.ph=t=>{const i=t.track;this._r(i),i.addEventListener("update",this.yh)},this.mh=t=>{const i=t.track;this.wr(i),i.removeEventListener("update",this.yh)},this.gh=t=>this.dh(),this.yh=()=>{for(const t of this.br)this._r(t)},this.fh=i,this.fh.addEventListener("addtrack",this.ph),this.fh.addEventListener("removetrack",this.mh),this.fh.addEventListener("change",this.gh),this.dh()}},eu=class extends su{Nr(t){let i=t.Tr,s=this.Fr.localize(this.uh(i));l(t.el(),s),t.el().setAttribute("aria-label",this.Fr.localize("Set the audio language to")+" "+s),t.selected(i.enabled)}Ar(t){let i=t.Tr;for(let t of this.ws.audioTracks)t!==i&&(t.enabled=!1);i.enabled=!0}Re(){this.Fr.off("languagechange",this.te),super.Re()}constructor(t,i,s){super(t,i.audioTracks),this.te=()=>{l(this.Cr.menuHeader.el(),this.Fr.localize("Language"));for(const t of this.Sr)this.Nr(t)},this.ws=i,this.Fr=s,l(this.Cr.menuHeader.el(),this.Fr.localize("Language")),this.Fr.on("languagechange",this.te)}};So.registerComponent("audioTrackButton",class extends oa{buildCSSClass(){return"vjs-icon-audio theo-audio-track-control-button "+super.buildCSSClass()}dispose(){this.bh.Re(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=2,this.bh=new eu(this.menu,this.ws,t),this.controlText("Language"),this.Ie.Be=this.controlText()}});var nu=class extends su{Er(t){return!!super.Er(t)&&(!t.forced&&mt(t.kind))}Mr(t){let i=super.Mr(t);Kt(i.el(),"theo-text-track-menu-item");let s=h.createElement("span");i.kh=s;let e=h.createElement("div");e.className="theo-text-track-menu-item-toggle",i.wh=e;let n=t=>this._h(t,i);i.xh=n,e.addEventListener("click",n);let r=h.createElement("div");return r.className="theo-text-track-menu-item-toggle-slider",e.appendChild(r),i.el().appendChild(s),i.el().appendChild(e),i}Nr(t){let i=t,s=i.Tr,e=this.Fr.localize(this.uh(s));l(i.kh,e),i.el().setAttribute("aria-label",this.Fr.localize("Set the subtitle language to")+" "+e),i.el().setAttribute("role","menuitemcheckbox"),i.selected(s.mode===ct.Jn)}Pr(t){let i=t;i.wh.removeEventListener("click",i.xh),super.Pr(t)}Ar(t){let i=t.Tr;for(let t of this.ws.textTracks)t!==i&&vt(t.kind,i.kind)&&(t.mode=ct.Ch);i.mode!==ct.Jn?i.mode=ct.Jn:i.mode=ct.Ch}_h(t,i){t.stopImmediatePropagation(),this.Ar(i)}Re(){this.Fr.off("languagechange",this.te),super.Re()}constructor(t,i,s){super(t,i.textTracks),this.te=()=>{l(this.Cr.menuHeader.el(),this.Fr.localize("Subtitles"));for(const t of this.Sr)this.Nr(t)},this.ws=i,this.Fr=s,l(this.Cr.menuHeader.el(),s.localize("Subtitles")),this.Fr.on("languagechange",this.te)}};So.registerComponent("subtitlesButton",class extends oa{buildCSSClass(){return"vjs-icon-subtitles theo-text-track-control-button "+super.buildCSSClass()}dispose(){this.bh.Re(),super.dispose()}constructor(t,i){super(t,i),this.bh=new nu(this.menu,this.ws,t),this.controlText("Subtitles"),this.Ie.Be=this.controlText()}});var ru,hu=So.getComponent("playToggle");!function(t){t.Sh="Pause",t.jh="Play",t.Th="Replay"}(ru||(ru={}));var ou=class extends(Io(hu)){handleClick(t){this.ws.muted||this.ws.prepareWithUserAction(),super.handleClick(t)}handlePlay(t){super.handlePlay(t),this.controlText("Pause"),this.Ie.Be=this.controlText()}handlePause(t){this.ws.ended||(super.handlePause(t),this.controlText("Play"),this.Ie.Be=this.controlText())}te(){this.Ie.Be=this.controlText()}dispose(){this.Ie.Re(),this.ws.removeEventListener("ended",this.Mh),super.dispose()}constructor(t,i){super(t,i),this.Mh=()=>{this.controlText("Replay"),this.Ie.Be=this.controlText()},this.controlText("Play"),this.Ie=new ra(this,this.controlText()),this.ws.addEventListener("ended",this.Mh),this.on(t,"languagechange",this.te),Mt.Ys.Je&&new Wo(this.el())}};So.registerComponent("playToggle",ou);var au,uu=So.getComponent("fullscreenToggle");!function(t){t.Ah="Exit fullscreen",t.Ph="Fullscreen"}(au||(au={}));var cu=class extends(Io(uu)){handleClick(t){this.ws.prepareWithUserAction(),super.handleClick(t)}handleFullscreenChange(t){super.handleFullscreenChange(t),this.updateContent()}updateContent(){const t=this.player().isFullscreen()?"Exit fullscreen":"Fullscreen";this.controlText(t),this.Ie.Be=this.controlText()}dispose(){this.Ie.Re(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Fullscreen"),this.Ie=new ra(this,this.controlText()),Mt.Ys.Je&&new Wo(this.el()),this.on(t,"languagechange",this.updateContent)}};So.registerComponent("fullscreenToggle",cu);var lu,du=So.getComponent("muteToggle");!function(t){t.Eh="Unmute",t.Nh="Mute"}(lu||(lu={}));var fu=class extends(Io(du)){handleClick(t){this.ws.muted&&!this.ws.paused&&this.ws.prepareWithUserAction(),super.handleClick(t)}update(t){super.update(t),this.te()}te(){const t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.Ie.Be=this.controlText()}dispose(){this.Ie.Re(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Mute"),this.Ie=new ra(this,this.controlText()),Mt.Ys.Je&&new Wo(this.el()),this.on(t,"languagechange",this.te),ci&&(this.removeClass("vjs-hidden"),this.on(t,"loadstart",(()=>{this.removeClass("vjs-hidden")})))}};So.registerComponent("muteToggle",fu);var vu=So.getComponent("BigPlayButton"),pu="theo-play-svg-circle",mu='<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="'+pu+'" 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>',gu=class extends(Io(vu)){createEl(){let t=super.createEl(),i=So.createEl("div",{className:"theo-big-play-button-svg-container"});return i.innerHTML=mu,t.appendChild(i),t}buildCSSClass(){return"theo-primary-color "+super.buildCSSClass()}handleClick(t){this.ws.muted||this.ws.prepareWithUserAction(),super.handleClick(t),void 0!==this.ws.vr&&"unavailable"!==this.ws.vr.state&&(this.ws.vr.useDeviceMotionControls=!0)}};So.registerComponent("BigPlayButton",gu);var yu=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;So.registerComponent("MouseTimeDisplay",class extends Ta{Bh(t){const i=t.track;"metadata"===i.kind&&"thumbnails"===i.label&&void 0===this.Ih&&(this.Ih=i,this.Fh=i.src?Mt.Dh(i.src).href:void 0,this.Ih.addEventListener(["addcue","removecue"],this.$h),this.Rh())}Oh(t){t.track===this.Ih&&this.Vh()}createEl(){const t=super.createEl();return this.Uh=So.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.zh=So.createEl("canvas",{className:"theo-time-tooltip-thumbnail"}),t}update(t,i){super.update(t,i),this.keepTooltipsInside&&this.Lh(t)}Lh(t){let i;if(this.Ih&&this.Ih.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.Ih.cues,t);i=s&&s.content}if(i===this.Hh)return;if(this.Hh=i,So.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",!!i),!i)return void this.qh();const s=i.match(yu);if(s){let[,t,i,e,n,r]=s;t=this.Wh(t);const h={Gh:+i,Xh:+e,ji:+n,Ti:+r};this.Jh(t,h)}else{const t=this.Wh(i);this.Jh(t)}}Rh(){S(this.An)||this.Lh(this.An)}Wh(t){return this.Ih&&this.Fh?Mt.Dh(t,this.Fh).href:t}Jh(t,i){this.Uh&&(this.Uh.src!==t?(this.Uh.onload=()=>{this.Qh(i)},this.Uh.src="",this.Uh.src=t):this.Qh(i))}Qh(t){if(!this.zh||!this.Uh)return;const i=this.zh.getContext("2d");i&&(null!=t||(t={Gh:0,Xh:0,ji:this.Uh.naturalWidth,Ti:this.Uh.naturalHeight}),this.zh.width=t.ji,this.zh.height=t.Ti,i.drawImage(this.Uh,t.Gh,t.Xh,t.ji,t.Ti,0,0,t.ji,t.Ti),this.Yh(this.zh))}Yh(t){this.Kh||(Xt(this.tooltip,t),this.Kh=t),this.En()}qh(){this.Kh&&(this.tooltip.removeChild(this.Kh),this.Kh=void 0,this.En())}Vh(){void 0!==this.Ih&&(this.Ih.removeEventListener(["addcue","removecue"],this.$h),this.Ih=void 0),this.Fh=void 0,this.qh(),this.Hh=void 0}dispose(){this.Vh(),super.dispose()}constructor(t,i){super(t,i),this.Kh=void 0,this.Ih=void 0,this.Fh=void 0,this.Zh=t=>this.Bh(t),this.io=t=>this.Oh(t),this.$h=t=>this.Rh(),this.showThumbnails=()=>{this.Kh&&this.Kh.hidden&&(this.Kh.hidden=!1,this.En())},this.hideThumbnails=()=>{!this.Kh||this.Kh.hidden||this.player().scrubbing()||(this.Kh.hidden=!0,this.En())},this.on(this.player().textTracks(),"addtrack",this.Zh),this.on(this.player().textTracks(),"removetrack",this.io),Pt.Qs&&(this.on(t,"seeking",this.showThumbnails),this.on(t,"seeked",this.hideThumbnails))}});var bu=So.getComponent("VolumeLevel");So.registerComponent("VolumeLevel",class extends bu{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-volume-level "+super.buildCSSClass()}});var ku=So.getComponent("Component"),wu=class extends ku{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-menu-container "+super.buildCSSClass()}};wu.prototype.h=vi({},wu.prototype.h,{children:[]}),So.registerComponent("controlBarMenuContainer",wu);var _u=So.getComponent("Player"),xu=class extends _u{dispose(){const t=this.el(),i=this.contentEl(),s=t.parentNode,e=t.nextSibling;super.dispose(),Wt(i),this.Ci&&s&&(e?s.insertBefore(t,e):s.appendChild(t)),h.body.removeEventListener("keydown",this.handleKeyPress),h.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")},h.body.addEventListener("keydown",this.handleKeyPress),h.body.addEventListener("click",this.handleClick)}};xu.prototype.h=vi({},_u.prototype.h,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","upcomingAdNotificationText","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),So.registerComponent("Player",xu);var Cu=So.getComponent("Player"),Su=Cu.prototype.es;Cu.prototype.es=function(t){if(!(this.H&&this.H.$s&&this.H.$s()))return Su.call(this,t)};var ju=Cu.prototype.createEl;function Tu(t,i,e,n){let r=vi({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},e);r.controlBar=vi({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&&Dt(e.language)&&(r.languages=vi({},r.languages,{[ut]:e.language}),r.language=ut),i.setAttribute("data-vjs-player","");let o=i.getAttribute("style"),a=So(t.element,r,n);return a.ready((()=>{Do(a),function(t,i){if(i){if(i.ads){const s=i=>{const s="adbreakbegin"===i.type,e=i.adBreak.integration===ft.so;Oo(t,s,e)};i.ads.addEventListener("adbreakbegin",s),i.ads.addEventListener("adbreakend",s)}if(i.verizonMedia){const s=i=>{const s="adbreakbegin"===i.type;Oo(t,s,!1)};i.verizonMedia.ads.adBreaks.addEventListener("addadbreak",(t=>{t.adBreak.addEventListener("adbreakbegin",s),t.adBreak.addEventListener("adbreakend",s)}))}i.addEventListener("sourcechange",(()=>{Oo(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"),Mt.Ys.Qs&&(Kt(i,"theo-mobile"),function(t){let i=s.outerHeight,e=s.outerWidth,n=i>e;n?(ti(t,"theo-mobile-landscape"),Kt(t,"theo-mobile-portrait")):(ti(t,"theo-mobile-portrait"),Kt(t,"theo-mobile-landscape"))}(i)),function(t){t.on("seeking",(()=>{Qt(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()}))}(a),a}Cu.prototype.createEl=function(){let t=ju.call(this),i=So.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.S=i,t};var Mu=So.getComponent("Button");var Au="THEOPiPCloseButton";So.registerComponent(Au,class extends Mu{buildCSSClass(){return"theo-close-button theo-pip-close"}handleClick(){this.no.eo()}constructor(t,i){if(super(t,i),this.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.no)}(i))throw new g("Invalid Picture-in-picture options.");this.no=i.no}});var Pu,Eu=class extends ${get ro(){return this.ho}get oo(){return this.t.cs()}ao(){this.t.yn(H.jh,this.uo),this.co||this.t.yn(H.lo,this.do),this.t.fo.on("languagechange",this.te)}vo(){var t;return"theo-pip-"+(null!=(t=this.po)?t:"bottom-right")}mo(t){let i=this.yo;i&&!this.oo&&(this.bo||this.ko(),this.wo(),Kt(i,"theo-pip"),Kt(i,this.vo()),this.ho=!0,this._o=t,this.xo=!1,this.Co(new Ot(Lt.PICTURE_IN_PICTURE)))}So(t){let i=this.yo;i&&(this.jo(),ti(i,"theo-pip"),ti(i,this.vo()),this.ho=!1,this.xo=t,this.To=this._o,this._o=!1,this.Co(new Ot(Lt.INLINE)))}ko(){if(!this.bo){let t=this.t.fo;t.addChild(Au,{no:this});let i=h.createElement("div");i.className="theo-pip-overlay",this.Mo=h.createElement("div"),this.Mo.className="theo-pip-overlay-text",l(this.Mo,t.localize("Video playing in Picture-in-Picture mode")),i.appendChild(this.Mo),Xt(t.el(),i),this.Ao=i,this.bo=!0}}Po(){this.Eo&&!this.No&&this.t.Bo&&(this.Io=this.t.Bo.Fo(U,this.Do),this.No=!0)}$o(){this.Io&&this.t.Bo&&(this.t.Bo.Ro(this.Io),this.No=!1)}wo(){let t=this.t.fo.contentEl(),i=t.getBoundingClientRect(),s=h.documentElement.clientWidth,e=h.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"}jo(){let t=this.t.fo.contentEl();t.style.top="",t.style.bottom="",t.style.right="",t.style.left="",t.style.width="",t.style.height="",t.style.position=""}Oo(){ti(this.yo,"theo-pip"),this.ro&&this.po&&ti(this.yo,"theo-pip-"+this.po),this.Ao&&(Wt(this.Ao),this.Ao=void 0)}gn(){this.Oo(),this.$o(),this.Vo(),this.t.fn(H.jh,this.uo),this.t.fn(H.lo,this.do),this.t.fo.off("languagechange",this.te),this.t=void 0}constructor(t,i,s){super(),this.Uo=!1,this.ho=!1,this.xo=!1,this._o=!1,this.bo=!1,this.No=!1,this.To=!1,this.uo=()=>{this.Uo=!0,this.Eo&&!this.ro&&this.Io&&this.zo&&this.Io.Lo<=this.zo&&this.mo(!1)},this.do=()=>{this.co||(this.Uo=!1,this.So(!1))},this.te=()=>{if(this.Mo){const t=this.t.fo;l(this.Mo,t.localize("Video playing in Picture-in-Picture mode"))}},this.Do=t=>{!this._o&&this.Eo&&(S(t)||(this.zo&&t<=this.zo||this.To?this.ho||this.xo||this.mo(!1):this.ho?this.So(!1):this.xo=!1))},this.zo=i.visibility,this.po=i.position,this.co=i.retainPresentationModeOnSourceChange,this.Eo=void 0!==this.zo,this.t=t,this.yo=t.Ho,this.eo=s,this.ao()}},Nu=class extends qt{qo(){let t=super.qo();return t===Lt.INLINE&&this.Wo&&this.Wo.ro?Lt.PICTURE_IN_PICTURE:t}Go(t){return t===Lt.PICTURE_IN_PICTURE||super.Go(t)}Xo(t,i){t===Lt.FULLSCREEN&&this.Wo.$o(),super.Xo(t,i),t!==Lt.FULLSCREEN&&this.Wo.Po()}Jo(t,i){t!==i&&(t===Lt.FULLSCREEN&&this.Wo.So(!1),t===Lt.INLINE&&i===Lt.PICTURE_IN_PICTURE&&this.Wo.So(!0),super.Jo(t,i),t===Lt.PICTURE_IN_PICTURE&&(i===Lt.INLINE?this.Wo.mo(!0):this.Wo.mo(!1)))}gn(){super.gn(),this.Wo.gn(),this.Qo.fn(H.jh,this.Yo),this.Qo=void 0}constructor(t,i,s){super(i),this.Ko=()=>this.Yr(),this.eo=()=>this.Zo(Lt.INLINE),this.Yo=()=>{this.qo()!==Lt.FULLSCREEN&&this.Wo.Po(),this.Qo.fn(H.jh,this.Yo)},this.Qo=t,this.Wo=new Eu(t,s.pip,this.eo),this.Wo.yn("presentationmodechange",this.Ko),this.Qo.yn(H.jh,this.Yo),this.Yr()}},Bu=class extends ${get ta(){return fi.ia(this.fo.el())||this.fo.supportsFullScreen()}get cs(){return this.fo.isFullscreen()||this.sa}mo(){this.fo.requestFullscreen()}So(){this.fo.exitFullscreen(),this.ea.So()}gn(){this.Vo(),this.fo.off("fullscreenchange",this.na),this.ea.fn($t.ra,this.na),this.ea.fn($t.ha,this.Ds),this.fo.isFullWindow&&this.fo.exitFullscreen()}constructor(t,i){super(),this.Os=!1,this.sa=!1,this.oa=!1,this.na=()=>{if(this.oa)return;let t=this.Os,i=this.cs;t!==i&&(this.Os=i,this.Co(new ui))},this.aa=()=>{this.sa=this.ea.cs,this.na()},this.ua=()=>{this.oa||(this.fo.isFullWindow&&this.fo.supportsFullScreen()||this.sa&&!this.fo.supportsFullScreen())&&(this.oa=!0,this.fo.exitFullscreen(),this.fo.requestFullscreen(),this.oa=!1,this.na())},this.fo=t,this.ea=i,this.fo.on("fullscreenchange",this.na),this.ea.yn($t.ra,this.aa),this.ea.yn($t.ca,this.ua),this.ea.yn($t.ha,this.Ds),this.na()}};function Iu(t){return class extends t{get Bo(){return this.la}cs(){return"fullscreen"===this.da.qo()}fa(){return function(t,i){let s=w.create(t);const e=i.fo;return X(s,{get controls(){return e.controls()},set controls(t){e.controls(tt(t))},get presentation(){return i.da.va},get presentationMode(){return i.da.qo()},set presentationMode(t){const s=Gt(t);s&&i.da.Zo(s)},get ui(){return e},get visibility(){return i.Bo.va}})}(this.pa,this)}gn(){super.gn(),this.da.gn(),this.ma.gn(),this.fo.dispose(),this.la.gn()}ga(t){this.fo.src(""),super.ga(t)}constructor(t,i,s){super(i,s),this.Ho=t,this.la=new L(t),this.pa=super.fa(),w.defineProperty(this.pa,"constructor",{value:J}),this.fo=Tu(this.pa,this.Ho,s.ui),this.ma=new Bu(this.fo,this.ya),this.da=new Nu(this,this.ma,s),this.da.yn("presentationmodechange",this.Ds)}}}function Fu(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=tt(t.retainPresentationModeOnSourceChange),t}function Du(){return Pu||(Pu=function(t){let i=t;for(const t of ji)i=t(i);return i}(Pu=Iu(G()))),Pu}function $u(t,i){const s=function(t){const i=Bt(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=Fu(i.pip),i}(i),e=h.createElement("div");ni(e),t.appendChild(e);const n=new(Du())(t,e,s);n.ba=n;let r=n.va;return n.ka(),n.wa(q),w.defineProperty(r,"constructor",{value:$u}),r=W(r),jt(n),function(t){for(const i of Mi)i(t)}(n),r}var Ru="theo-cast-",Ou=So.getComponent("Button"),Vu=class extends(Io(Ou)){get _a(){throw new g("xa")}get Ca(){return this.h.Ca}get Sa(){return this.h.Sa}buildCSSClass(){return Ru+"button theo-"+this.Sa+"-button theo-controlbar-button "+super.buildCSSClass()}createEl(t,i,s){const e=super.createEl(),n=h.createElement("div");n.className="theo-button-icon-blur";const r=h.createElement("div");return r.className=Ru+"svg-container",r.innerHTML=this.Ca,e.appendChild(n),e.appendChild(r),e}handleClick(t){var i;if(super.handleClick(t),this.ja===Jt.AVAILABLE)null==(i=this._a)||i.start();else if(this.ja===Jt.CONNECTED||this.ja===Jt.CONNECTING){var s;null==(s=this._a)||s.stop()}}Ta(t){ti(this.yo,"theo-"+this.Sa+"-"+this.ja),this.ja=t,Kt(this.yo,"theo-"+this.Sa+"-"+this.ja),this.te()}te(){this.Ma(this.ja),this.Ie.Be=this.controlText()}Ma(t){t===Jt.CONNECTED?this.controlText("Stop Casting"):t===Jt.AVAILABLE?this.controlText("Start Casting"):t===Jt.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")}constructor(t,i){var s;super(t,i),this.yo=t.el(),this.ja=Jt.UNAVAILABLE,this.controlText("Unavailable"),this.Ie=new ra(this,this.controlText()),null==(s=this._a)||s.addEventListener("statechange",(t=>{const i=t;this.Ta(i.state)})),Mt.Ys.Je&&(this.Aa=new Wo(this.el())),this.Ta(this._a?this._a.state:Jt.UNAVAILABLE),this.on(t,"languagechange",this.te)}},Uu=0;function zu(){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-'+Uu+'">\n <path d="M0-36h44V0H0z"/>\n </clipPath>\n </defs>\n <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 <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-'+Uu+')">\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 Uu++,t}So.registerComponent("chromecastButton",class extends Vu{get _a(){var t;return null==(t=this.ws.cast)?void 0:t.chromecast}constructor(t,i){super(t,vi({},i,{Sa:"chromecast",Ca:zu()}))}});var Lu="theo-chromecast-",Hu=So.getComponent("Component"),qu=class t extends(Io(Hu)){buildCSSClass(){return Lu+"overlay "+super.buildCSSClass()}createEl(){const i=super.createEl();Kt(i,Lu+"overlay");const s=So.createEl("div",{className:Lu+"status-icon",innerHTML:t.ICON_SVG}),e=So.createEl("div",{className:Lu+"status-info"});l(e,"Playing on");const n=So.createEl("div",{className:Lu+"status-title"}),r=So.createEl("div",{className:Lu+"status"});return this.mr=n,r.appendChild(s),r.appendChild(e),r.appendChild(n),i.appendChild(r),i}dispose(){var t;null==(t=this.Pa)||t.removeEventListener("statechange",this.update),this.Pa=void 0,this.ws.removeEventListener("play",this.update),super.dispose()}constructor(t,i){var s,e;super(t,i),this.update=()=>{this.Pa?(this.mr&&l(this.mr,this.Pa.receiverName||""),this.Pa.state===Jt.CONNECTED?this.show():this.hide()):this.hide()},this.Pa=null==(s=this.ws.cast)?void 0:s.chromecast,null==(e=this.Pa)||e.addEventListener("statechange",this.update),this.ws.addEventListener("play",this.update),this.update()}};qu.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>',So.registerComponent("chromecastOverlay",qu);So.registerComponent("airplayButton",class extends Vu{dispose(){var t,i;null==(t=this.ws.ads)||t.removeEventListener("adbreakbegin",this.Ea),null==(i=this.ws.ads)||i.removeEventListener("adbreakend",this.Na),this.ws.removeEventListener("currentsourcechange",this.Na),super.dispose()}get _a(){var t;return null==(t=this.ws.cast)?void 0:t.airplay}constructor(t,i){var s,e;super(t,vi({},i,{Sa:"airplay",Ca:'\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.Ea=()=>{this.disable()},null==(s=this.ws.ads)||s.addEventListener("adbreakbegin",this.Ea),null==(e=this.ws.ads)||e.addEventListener("adbreakend",this.Na),this.ws.addEventListener("currentsourcechange",this.Na)}});var Wu=So.getComponent("Button"),Gu=class extends(Io(Wu)){buildCSSClass(){return"theo-vr-button theo-controlbar-button "+super.buildCSSClass()}handleClick(){this.ws.vr.stereo=!this.ws.vr.stereo,this.te()}_n(){this.ws.vr&&this.ws.vr.state!==wt.Rs?(this.show(),this.ws.vr.canPresentVR?(this.enable(),this.te()):(this.disable(),this.controlText("No VR capable device found"),this.Ba.Be=this.controlText())):this.hide()}te(){var t;this.controlText((null==(t=this.ws.vr)?void 0:t.stereo)?"Stop watching in VR":"Watch in VR"),this.Ba.Be=this.controlText()}dispose(){var t;null==(t=this.ws.vr)||t.removeEventListener("statechange",this.Ia),super.dispose()}constructor(t,i){var s;super(t,i),this.Ia=()=>this._n(),this.controlText("Watch in VR"),this.Ba=new ra(this,this.controlText()),null==(s=this.ws.vr)||s.addEventListener("statechange",this.Ia),this._n(),Mt.Ys.Je&&new Wo(this.el()),this.on(t,"languagechange",this.te)}};So.registerComponent("vrButton",Gu);var Xu=So.getComponent("Component"),Ju=class extends Xu{createEl(){let t=super.createEl("div",{className:this.buildCSSClass()}),i=So.createEl("div",{className:"theo-360-fov"});return t.appendChild(i),this.Fa=i,t}buildCSSClass(){return"theo-360-compass "+super.buildCSSClass()}_n(){this.ws.vr.state===wt.Rs?this.hide():this.show()}Da(){let t=-this.ws.vr.direction.yaw+40;this.Fa.style[ri("transform")]="scale(0.875) rotate("+t+"deg) skew("+"-10deg)"}dispose(){this.ws.vr.removeEventListener("statechange",this.Ia),this.ws.vr.removeEventListener("directionchange",this.$a),super.dispose()}constructor(t,i,s){super(t,i),this.Ia=()=>this._n(),this.$a=()=>this.Da(),this.ws=s,this.ws.vr.addEventListener("statechange",this.Ia),this.ws.vr.addEventListener("directionchange",this.$a),this._n(),this.Da()}},Qu=_.pow(2,31)-1,Yu=So.getComponent("Component"),Ku=class extends Yu{Ra(){this.ws.vr.state===wt.Oa?this.Va():this.Ua()}Va(){if(this.za)return;this.za=!0;let t=this.ws.element;this.La=t.style.zIndex||"",t.style.zIndex=""+Qu,this.Ha=this.player().isFullscreen(),this.player().requestFullscreen()}Ua(){if(!this.za)return;this.za=!1,this.ws.element.style.zIndex=this.La,this.Ha?this.player().requestFullscreen():this.player().exitFullscreen()}dispose(){this.Ua(),this.ws.vr.removeEventListener("statechange",this.qa),super.dispose()}constructor(t,i,s){super(t,i),this.za=!1,this.Ha=!1,this.La="",this.qa=()=>this.Ra(),this.ws=s,this.ws.vr.addEventListener("statechange",this.qa),this.Ra()}};Ai((function(t){let i=t.va;if(!i.vr)return;let s=t.fo,e=new Ju(s,{},i);if(t.yn(H.lo,(()=>{var i;s.removeChild(e);let n=null==(i=t.Wa())?void 0:i.vr;void 0===n||n.nativeVR||s.addChild(e)})),Pt.Ga){let t=new Ku(s,{},i);s.addChild(t)}}));var Zu=class extends O{constructor(){super("relatedchange")}},tc=["relatedchange"],ic=class extends ${get va(){return this.Xa||(this.Xa=function(t){let i,s={get sources(){return t.Ja},set sources(i){t.Ja=i},addEventListener(t,s){i.yn(t,s)},removeEventListener(t,s){i.fn(t,s)}};return i=new Ut(tc,!0,s),i.Qa(t),s}(this)),this.Xa}get Ja(){return this.Ya}set Ja(t){this.Ya=function(t){return t.filter((t=>t&&(Rt(t.link)||K(t,["source"]))))}(t),t.length>this.Ya.length&&console.warn("One or more of the configured related content sources are invalid. Check if they have a source or a link."),this.Co(new Zu)}gn(){this.Vo(),this.Ya=[]}constructor(...t){super(...t),this.Ya=[]}};Ct((function(t){return class extends t{fa(){const t=this.Ka;return X(super.fa(),{get related(){return t.va}})}gn(){this.Ka.gn(),super.gn()}constructor(t,i){super(t,i),this.Ka=new ic}}}),_t.Za);var sc=So.getComponent("Button"),ec=class extends sc{buildCSSClass(){return"vjs-icon-view-grid theo-related-button "+super.buildCSSClass()}handleClick(){this.iu.tu?this.iu.be():this.iu.ge()}te(){this.Ie.Be=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.yo=t.el(),this.iu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText(this.localize("Related content")),this.Ie=new ra(this,this.controlText()),this.on(t,"languagechange",this.te)}},nc=So.getComponent("Button"),rc=class extends nc{buildCSSClass(){return"theo-secondary-background theo-close-button"}handleClick(){this.su.hide()}constructor(t,i){super(t),this.su=i}},hc=(()=>{let t=h.createElement("div");return t.className="theo-related-grid-tile",t.innerHTML='<a class="theo-related-grid-tile-content"><div class="theo-related-grid-tile-image"></div><span class="theo-related-grid-tile-title theo-primary-border theo-tertiary-background"></span><span class="theo-related-grid-tile-duration"></span></a>',t})();function oc(t,i,s){let e=hc.cloneNode(!0),n=e.querySelector(".theo-related-grid-tile-content");K(s,["source"])?(n.style.cursor="pointer",n.addEventListener("click",(()=>{t.source=s.source,i.be()}))):Rt(s.link)&&n.setAttribute("href",s.link);let r=e.querySelector(".theo-related-grid-tile-image");r.style.backgroundImage='url("'+yi(s.image)+'")',r.removeAttribute("id");let h=e.querySelector(".theo-related-grid-tile-title");s.title?(l(h,s.title),h.removeAttribute("id")):Wt(h);let o=e.querySelector(".theo-related-grid-tile-duration");return s.duration?(l(o,s.duration),o.removeAttribute("id")):Wt(o),e}var ac=[15,12,9,8,6,4,3,2,1];var uc=class{get eu(){return"theo-"+this.nu+"-item-grid"}ru(){this.hu.focus()}ou(t){this.au(),function(t){if(t.length)for(let i of ac)if(t.length>=i){t.length=i;break}}(t),this.uu(t.length);for(let i of t){let t=oc(this.cu.va,this.lu,i);this.du.appendChild(t)}}au(){this.du.innerHTML=""}fu(){let t=h.createElement("div");t.className="theo-overlay-panel";const i=h.createElement("div");return i.className="theo-related-grid",this.vu.className="theo-related",this.hu.controlText("Close Related Content"),this.pu.appendChild(this.vu),this.vu.appendChild(t),t.appendChild(this.hu.el()),t.appendChild(i),i}uu(t){ti(this.du,this.eu),this.nu=t,Kt(this.du,this.eu)}gn(){Wt(this.vu),this.mu.gn(),this.gu.gn(),this.hu.dispose(),this.cu=void 0}constructor(t,i,s,e,n){this.cu=t,this.yu=i,this.lu=s,this.pu=e,this.nu=12,this.bu=t=>{this.du.style.width=t.width+"px"},this.vu=h.createElement("div"),this.hu=new rc(this.yu,{hide:()=>{this.lu.be()}}),this.du=this.fu(),this.gu=new cc(n),this.gu.yn(ii.pn,this.bu),this.mu=new pt(this.du,this.gu),this.uu(12)}},cc=class extends ${get ku(){return this.wu||0}get _u(){return this.xu._u}gn(){this.Vo(),this.xu.fn(ii.pn,this.Cu)}constructor(t){super(),this.xu=t,this.Cu=t=>{let i=t.width;if(9*(t.width/16)>t.height){i=16*(t.height/9)}this.wu=i,this.Co(new ei(this.ku,t.height))},this.xu.yn(ii.pn,this.Cu)}},lc=class extends O{constructor(){super("show")}},dc=class extends O{constructor(){super("hide")}},fc="theo-related-available",vc="theo-related-showing",pc=[...tc,"show","hide"],mc=class extends ${get va(){return this.Xa||(this.Xa=function(t){let i;const s={get sources(){return t.Ja},set sources(i){t.Ja=i},get showing(){return t.tu},show(){t.ge()},hide(){t.be()},addEventListener(t,s){i.yn(t,s)},removeEventListener(t,s){i.fn(t,s)}};return i=new Ut(pc,!0,s),i.Qa(t),s}(this)),this.Xa}get Ja(){return this.Su.Ja}set Ja(t){this.Su.Ja=t}get tu(){return this.ju}ge(){let t=this.ju;this.ju=!0,this.Tu(vc),this.Mu.ru(),this.yu.paused()?this.Au=!0:this.yu.pause(),t!==this.ju&&this.Co(new lc)}be(){let t=this.ju;this.ju=!1,this.Pu(vc),this.Eu.focus(),this.Au||this.yu.play(),this.Au=!1,t!==this.ju&&this.Co(new dc)}Tu(t){this.yu.el().classList.add(t)}Pu(t){this.yu.el().classList.remove(t)}gn(){this.Vo(),this.Mu.gn()}constructor(t,i,s,e){super(),this.ju=!1,this.Au=!1,this.Nu=t=>{const i=this.Ja;this.Mu.ou(i),i.length?(this.Tu(fc),this.Eu.show()):(this.Pu(fc),this.Eu.hide()),this.Co(t)},this.Su=i,this.Su.yn("relatedchange",this.Nu),this.yu=s,this.Mu=new uc(t,this.yu,this,s.contentEl(),e),this.Eu=new ec(s,this,{})}};Ti((function(t){return class extends t{fa(){const t=this.Bu;return X(super.fa(),{get related(){return t.va}})}gn(){this.Bu.gn(),super.gn()}constructor(t,i,s){super(t,i,s),this.Bu=new mc(this,this.Ka,this.fo,this.Iu)}}}));var gc,yc=So.getComponent("Button"),bc=class extends yc{buildCSSClass(){return"vjs-icon-share theo-social-button "+super.buildCSSClass()}handleClick(){this.Fu.showing?this.Fu.hide():this.Fu.show()}te(){this.Ie.Be=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.yo=t.el(),this.Fu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText("Share Video"),this.Ie=new ra(this,this.controlText()),this.on(t,"languagechange",this.te)}};function kc(t,i,s){switch(i){case"iconurl":return function(t,i){let s=h.createElement("a");var e;s.className="theo-social-iconurl",s.title=null!=(e=t.label)?e:"",s.target="Du",s.href=i;const n=h.createElement("img");var r,o;return n.src=null!=(r=t.icon)?r:"",n.alt=null!=(o=t.label)?o:"",n.width=25,n.height=25,s.appendChild(n),s}(t,s);case"text":return function(t){let i=h.createElement("div");if(i.className="theo-social-text",t.label){let s=h.createElement("h5");s.className="theo-primary-background theo-social-label",l(s,t.label),i.appendChild(s)}let s=h.createElement("p");var e;return s.className="theo-social-content-container theo-tertiary-background",s.tabIndex=0,l(s,null!=(e=t.text)?e:""),i.appendChild(s),i}(t);case"texturl":return function(t,i){let s=h.createElement("div");if(s.className="theo-social-texturl",t.label){let i=h.createElement("h5");i.className="theo-primary-background theo-social-label",l(i,t.label),s.appendChild(i)}let e=h.createElement("div");e.className="theo-social-content-container theo-tertiary-background";let n=h.createElement("a");return n.target="Du",n.href=i,l(n,i),e.appendChild(n),s.appendChild(e),s}(t,s)}}!function(t){t.$u="iconurl",t.Ru="text",t.Ou="texturl"}(gc||(gc={}));var wc="<URL>";var _c=class{get we(){return this.vu}Vu(t){this.au();for(let i of t)this.Uu(i)}ru(){this.hu.focus()}Uu(t){let i=function(t,i){return t.src?mi(t.src,wc)?t.src.replace(wc,i):t.src:i}(t,this.lu.zu),s=function(t){if(t)return t.icon?"iconurl":t.text?"text":"texturl"}(t),e=kc(t,s,i);e&&("iconurl"===s?this.Lu.appendChild(e):this.Hu.appendChild(e))}au(){this.Lu.innerHTML="",this.Hu.innerHTML=""}gn(){Wt(this.vu),this.qu.gn()}constructor(t,i,s,e){this.Qo=t,this.lu=i,this.pu=s,this.Wu=e;const n=h.createElement("div");n.className="theo-overlay-panel",this.hu=new rc(this.Qo,this.lu.va),this.hu.controlText("Close Share"),this.Mu=h.createElement("div"),this.Mu.className="theo-social-container",this.vu=h.createElement("div"),this.vu.className="theo-social",this.Lu=h.createElement("div"),this.Lu.className="theo-social-icon-container",this.Hu=h.createElement("div"),this.Hu.className="theo-social-text-container",this.pu.appendChild(this.vu),this.vu.appendChild(n),this.Mu.appendChild(this.Lu),this.Mu.appendChild(this.Hu),n.appendChild(this.hu.el()),n.appendChild(this.Mu),this.qu=new pt(this.vu,this.Wu)}},xc="theo-social-available",Cc="theo-social-showing",Sc=class{get va(){return this.Xa}get tu(){return this.ju}get Gu(){return this.Xu}set Gu(t){this.Xu=t,this.Mu.Vu(t),t.length?(this.Tu(xc),this.Eu.show()):(this.Pu(xc),this.Eu.hide())}get zu(){return this.Ju||Ht()}set zu(t){this.Ju=t}ge(){this.ju=!0,this.Tu(Cc),this.Mu.ru(),this.Qu.paused()?this.Au=!0:this.Qu.pause()}be(){this.ju=!1,this.Pu(Cc),this.Eu.focus(),this.Au||this.Qu.play(),this.Au=!1}Tu(t){this.Qu.el().classList.add(t)}Pu(t){this.Qu.el().classList.remove(t)}gn(){this.Eu.dispose(),this.Mu.gn()}constructor(t,i){this.ju=!1,this.Xu=[],this.Au=!1,this.Xa=function(t){return{get showing(){return t.tu},get items(){return t.Gu},set items(i){t.Gu=i},get url(){return t.zu},set url(i){t.zu=i},show(){t.ge()},hide(){t.be()}}}(this),this.Qu=t,this.Mu=new _c(this.Qu,this,t.contentEl(),i),this.Eu=new bc(t,this.Xa,{})}};Ti((function(t){return class extends t{fa(){let t=this.Fu;return X(super.fa(),{get social(){return t.va}})}constructor(t,i,s){super(t,i,s),this.Fu=new Sc(this.fo,this.Iu)}}}));var jc=So.getComponent("Component"),Tc=class extends jc{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-upnext-container "+super.buildCSSClass()}};Tc.prototype.h=vi({},Tc.prototype.h,{children:[]}),So.registerComponent("upNextContainer",Tc);var Mc="theo-upnext-bar-",Ac=So.getComponent("Component"),Pc=class extends Ac{get tu(){return this.ju}set tu(t){this.ju=t,this.Yu&&(this.Yu.tabIndex=t?0:-1)}get Ku(){return this.Zu}set Ku(t){this.Zu=t}ga(t){this.au(),this.tc(t)}tc(t){if(t&&t.link&&t.image){const i=h.createElement("div");Kt(i,Mc+"content"),i.onclick=()=>{this.ic.next()},i.onkeypress=t=>{13===t.which&&this.ic.next()};let s=h.createElement("div");if(s.style.backgroundImage='url("'+yi(t.image)+'")',Kt(s,Mc+"image"),i.appendChild(s),t.duration){let i=h.createElement("span");Kt(i,Mc+"duration"),i.innerHTML=""+t.duration,s.appendChild(i)}let e=h.createElement("div");Kt(e,Mc+"text");let n=h.createElement("div");if(Kt(n,Mc+"upnext"),l(n,this.localize("Up Next")),e.appendChild(n),t.title){let i=h.createElement("div");Kt(i,Mc+"title"),l(i,t.title),e.appendChild(i)}i.appendChild(e),this.Yu=i,this.sc=n,this.el().appendChild(this.Yu)}}au(){this.el().innerHTML="",this.Yu=void 0,this.sc=void 0}te(){this.sc&&l(this.sc,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-bar "+super.buildCSSClass()}dispose(){this.qu.gn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.Yu=void 0,this.sc=void 0,this.ic=i,this.qu=new pt(this.el(),e),this.ju=!1,this.Zu=10,this.on(t,"languagechange",this.te)}},Ec="theo-upnext-panel-",Nc=pu,Bc=So.getComponent("Component"),Ic=class extends Bc{get tu(){return this.ju}set tu(t){this.ju=t}get ec(){return this.nc}set ec(t){this.nc=t}get rc(){return this.hc}set rc(t){this.hc=t}ga(t){this.au(),this.oc(t)}oc(t){if(t&&t.link&&t.image){let i=h.createElement("div");i.className=Ec+"content";let s=h.createElement("div");s.style.backgroundImage='url("'+yi(t.image)+'")',s.className=Ec+"image",i.appendChild(s);let e=h.createElement("div");e.className=Ec+"text";let n=h.createElement("div");if(n.className=Ec+"upnext",l(n,this.localize("Up Next")),e.appendChild(n),t.title){let i=h.createElement("div");i.className=Ec+"title",l(i,t.title),e.appendChild(i)}i.appendChild(e),this.ac=h.createElement("div"),this.ac.className=Ec+"autoplay",this.ac.innerHTML=mu;let r=this.ac.querySelector("svg");r.onclick=()=>{this.ic.next()},r.tabIndex=0,r.onkeypress=t=>{13===t.which&&this.ic.next()},this.uc=n,this.cc=this.ac.querySelector("."+Nc),i.appendChild(this.ac),this.el().appendChild(i)}}get lc(){return this.dc}set lc(t){this.dc=t,this.cc.style.strokeDashoffset=""+_.round(1e5*t)/1e5}au(){this.el().innerHTML="",this.uc=void 0,this.cc=void 0}te(){this.uc&&l(this.uc,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-panel "+super.buildCSSClass()}dispose(){this.qu.gn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.dc=0,this.ic=i,this.qu=new pt(this.el(),e),this.ju=!1,this.nc=10,this.hc=!0,this.on(t,"languagechange",this.te)}},Fc="theo-upnext-panel-showing",Dc="theo-upnext-bar-showing",$c=2*_.PI*73,Rc=class t{get va(){return this.Xa}get fc(){return this.vc}get mc(){return this.gc}get yc(){return this.bc}set yc(t){this.bc=t,this.Mu.ga(t),this.kc.ga(t),this.Qu.off("timeupdate",this.wc),this.Qu.off("ended",this._c),t&&(this.Qu.on("timeupdate",this.wc),this.Qu.on("ended",this._c))}xc(){this.Mu.ec?this.Cc=st(this.Mu.ec):0===this.Mu.ec?this.Cc=0:this.Cc=10,0!==this.Cc?(isFinite(this.Cc)&&(this.Sc=!0),this.Mu.tu=!0,this.Tu(Fc),this.Sc&&(this.Mu.lc=$c-$c/this.Cc,this.jc=v(this.Tc,1e3))):this.Mc()}Ac(){this.Mu.tu=!1,this.Pu(Fc),this.Sc&&(m(this.jc),this.Pc=1,this.Mu.lc=$c)}Ec(){this.kc.tu=!0,this.Tu(Dc)}Nc(){this.kc.tu=!1,this.Pu(Dc)}Mc(){m(this.jc),this.yc&&(s.location.href=this.yc.link)}Tu(t){this.Qu.el().classList.add(t)}Pu(t){this.Qu.el().classList.remove(t)}Bc(t,i){const s=t>=i&&!(this.Ic&&this.Ic.Fc);this.kc.tu&&!s?this.Nc():!this.kc.tu&&s&&this.Ec()}Dc(t,i){this.Mu.tu&&t<i&&!this.Qu.ended()&&this.Ac()}static $c(t,i){let s=st(t);if(!S(s))return i-s;let e=(""+t).match(/^([1-9]?\d|100)%$/);if(e){return i*(1-x(e[1],10)/100)}}gn(){this.jc&&m(this.jc),this.Qu.getChild("upNextContainer").removeChild(this.Mu),this.Qu.getChild("upNextContainer").removeChild(this.kc),this.Mu.dispose(),this.kc.dispose()}constructor(i,s,e){this.bc=void 0,this.Cc=10,this.Pc=1,this.jc=void 0,this.Sc=!0,this.Tc=()=>{this.Pc!==this.Cc?(this.Mu.lc-=$c/this.Cc,this.Pc+=1):this.Mc()},this._c=()=>{this.Mu.tu||this.xc()},this.wc=()=>{let i=this.Qu.currentTime(),s=this.Qu.duration(),e=s?t.$c(this.kc.Ku,s):void 0;void 0!==e&&this.Bc(i,e),this.Mu.rc&&this.Dc(i,s)},this.Xa=function(t){return{get source(){return t.yc},set source(i){t.yc=i},get bar(){return t.fc},get panel(){return t.mc},next(){t.Mc()}}}(this),this.kc=new Pc(i,this.Xa,{},s),this.Mu=new Ic(i,this.Xa,{},s),this.vc=function(t,i){return{get showing(){return i.tu},get offset(){return i.Ku},set offset(t){i.Ku=t},show(){t.Ec()},hide(){t.Nc()}}}(this,this.kc),this.gc=function(t,i){return{get showing(){return i.tu},get countdownDuration(){return i.ec},set countdownDuration(t){i.ec=t},get showUpNextPanel(){return i.rc},set showUpNextPanel(t){i.rc=t},show(){t.xc()},hide(){t.Ac()}}}(this,this.Mu),this.Qu=i,this.Ic=e,i.getChild("upNextContainer").addChild(this.kc,{}),i.getChild("upNextContainer").addChild(this.Mu,{})}};Ti((function(t){return class extends t{fa(){let t=this.Rc;return X(super.fa(),{get upnext(){return t.va}})}gn(){this.Rc.gn(),super.gn()}constructor(t,i,s){super(t,i,s),this.Rc=new Rc(this.fo,this.Iu,this.Oc)}}}));var Oc=So.getComponent("Component"),Vc=class extends Oc{createEl(){let t=super.createEl("ul",{className:"theo-context-menu"}),i=h.createElement("li"),s=h.createElement("a"),e=h.createElement("div");s.className="theo-context-menu-a",i.appendChild(s),e.className="theo-context-menu-logo",e.innerHTML='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t width="507.262px" height="399.16px" viewBox="0 0.1 507.262 399.16" enable-background="new 0 0.1 507.262 399.16"\n\t xml:space="preserve" class=\'theo-context-menu-logo-svg\'>\n\t<g transform="matrix(1.90897, 0, 0, 1.90897, 212.4, 144.6)">\n\t\t<path fill="#FFFFFF" d="M-38.416-53.802C-53.351-38.867-60.82-20.814-60.82,0.353c0,21.253,7.466,39.392,22.404,54.413\n\t\t\tc6.83,6.658,13.827,11.778,20.996,15.363c5.122,2.561,10.583,4.397,16.388,5.507v1.024h-78.481\n\t\t\tc-21.168,0-31.752-10.584-31.752-31.752v-88.724c0-21.252,10.584-31.879,31.752-31.879h79.377v0.896\n\t\t\tc-6.145,1.196-11.95,3.116-17.411,5.762C-24.632-65.538-31.586-60.46-38.416-53.802"/>\n\t</g>\n\t<g transform="matrix(0.535073, 0, 0, 0.535073, 242.35, 104.7)">\n\t\t<path fill="#FFFFFF" d="M188.354,104.104c-32.941,23.472-75.492,49.679-127.641,78.61c-50.275,28.254-94.358,50.44-132.254,66.572l-41.989,15.616\n\t\t\tc-2.645-11.348-5.122-28.17-7.426-50.44c-5.205-44.383-7.809-93.375-7.809-146.975c0-49.079,3.538-94.947,10.622-137.631\n\t\t\tl10.249-49.034l44.551,14.978C-24.762-88.838,17.06-67.03,62.124-38.777c47.705,29.871,88.638,58.294,122.773,85.266\n\t\t\tc17.061,13.571,29.351,24.028,36.862,31.367L188.354,104.104"/>\n\t</g>\n\t<g transform="matrix(1.91028, 0, 0, 1.91028, 327.15, 144.6)">\n\t\t<path fill="#FFFFFF" d="M94.286-43.816v88.723c0,21.168-10.583,31.751-31.751,31.751h-80.018v-1.025\n\t\t\tc14.683-2.816,27.527-9.77,38.537-20.867c14.936-15.024,22.405-33.16,22.405-54.413c0-21.168-7.467-39.22-22.405-54.156\n\t\t\tC9.871-64.985-3.188-71.939-18.123-74.671v-1.024h80.658C83.702-75.696,94.286-65.069,94.286-43.816"/>\n\t</g>\n</svg>\n',s.appendChild(e);let n=h.createElement("div");return n.className="theo-context-version",l(n,"Powered by THEOplayer 8.4.2"),s.appendChild(n),s.href="https://www.theoplayer.com/player-referral",s.target="Du",t.appendChild(i),t}Vc(t){const i=t;i.preventDefault(),this.show(),this.el().style.left="0",this.el().style.top="0";let s=this.player().contentEl(),e=s.getClientRects(),n=e.length>0?e[0]:void 0,r=i.clientX-s.getBoundingClientRect().left,h=C(getComputedStyle(this.el()).fontSize);D(this.el(),r,n,h);let o=i.clientY-s.getBoundingClientRect().top;R(this.el(),o,n,h),this.Uc()}zc(){this.hide(),this.clearTimeout(this.Lc)}Uc(){this.Lc=this.setTimeout(this.zc,4e3)}Hc(){this.clearTimeout(this.Lc)}dispose(){this.zc(),this.off(this.player(),"contextmenu",this.Vc),this.el().removeEventListener("mousedown",Uc,!0),this.off(h,"mousedown",this.zc),this.off("mouseout",this.Uc),this.off("mouseover",this.Hc),super.dispose()}constructor(t,i){super(t,i),this.Lc=0,this.on(this.player(),"contextmenu",this.Vc),this.el().addEventListener("mousedown",Uc,!0),this.on(h,"mousedown",this.zc),this.on("mouseout",this.Uc),this.on("mouseover",this.Hc),this.zc()}};function Uc(t){t.stopPropagation()}Ai((function(t){const i=new Vc(t.fo,{});t.fo.addChild(i),t.fo.on("dispose",(()=>{t.fo.removeChild(i),i.dispose()}))}));var zc={Default:"","Monospaced Serif":gi.qc,"Proportional Serif":gi.Wc,"Monospaced Sans-Serif":gi.Gc,"Proportional Sans-Serif":gi.Xc},Lc={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},Hc=[50,75,100,150,200];function qc(t){return{label:t+"%",value:t}}function Wc(t){return w.keys(t).map((i=>({label:i,value:t[i]})))}Hc.map((function(t){return{label:t+"%",value:t/100+"em"}}));var Gc=Hc.map((function(t){return{label:t+"%",value:t+"%"}})),Xc=[25,50,75,100].map(qc),Jc=[0,25,50,75,100].map(qc),Qc=Wc(Lc),Yc=Wc(zc),Kc=Wc({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),Zc=100,tl="#000000",il="#FFFFFF",sl="#000000",el=class extends qa{Jc(){let t=this.Fr.localize(this.Qc);l(this.Yc.subMenu.menuHeader.el(),t),this.Ir=h.createElement("span"),this.Ir.className="theo-settings-control-menu-item-title",l(this.Ir,t);let i=h.createElement("span");return i.className="theo-primary-color theo-settings-control-menu-item-value",Kt(this.Yc.el(),"theo-subtitle-options-menu-item"),this.Yc.el().appendChild(this.Ir),this.Yc.el().appendChild(i),i}Kc(t){const i=this.jr(t);i&&this.Zc(i)}tl(){return this.br}Ar(t){this.il(t.Tr)}Zc(t){for(let t of this.Cr.menuItems)t.selected(!1);t?(t.selected(!0),this.sl(t.Tr.label)):this.sl("Custom")}sl(t){this.nl=t,l(this.rl,this.Fr.localize(t)),this.Yc.parentMenu.re()}Mr(t){let i=super.Mr(t);return Kt(i.el(),"theo-subtitle-options-menu-item"),this.Nr(i),i}Nr(t){const i=this.Fr.localize(t.Tr.label);l(t.el(),i);const s=this.Fr.localize("Set "+this.Qc+" to ")+i;t.el().setAttribute("aria-label",s)}Re(){this.Fr.off("languagechange",this.te),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.Yc=t,this.Fr=e,this.nl="",this.te=()=>{let t=this.Fr.localize(this.Qc);l(this.Yc.subMenu.menuHeader.el(),t),l(this.Ir,t),this.sl(this.nl);for(const t of this.Sr)this.Nr(t)},this.Qc=i,this.il=s.Ko,this.rl=this.Jc(),this.br=s.hl,this.Fr.on("languagechange",this.te)}},nl=class t{static ol(t,i,s,e){if(void 0===t&&void 0===i)return;return P(void 0===t?s:t,void 0===i?e:i)}constructor(i){this.al=i,this.cl=t=>{this.al.fontFamily=t.value},this.ll=t=>{this.al.fontSize=t.value},this.dl=i=>{this.fl=i.value,this.al.fontColor=t.ol(this.vl,this.fl,il,Zc)},this.pl=i=>{this.vl=i.value,this.al.fontColor=t.ol(this.vl,this.fl,il,Zc)},this.ml=i=>{this.gl=i.value,this.al.backgroundColor=t.ol(this.gl,this.yl,tl,Zc)},this.bl=i=>{this.yl=i.value,this.al.backgroundColor=t.ol(this.gl,this.yl,tl,Zc)},this.kl=i=>{this.wl=i.value,this.al.windowColor=t.ol(this.wl,this._l,sl,Zc)},this.xl=i=>{this._l=i.value,this.al.windowColor=t.ol(this.wl,this._l,sl,Zc)},this.Cl=t=>{this.al.edgeStyle=t.value}}},rl=class{Sl(t,i){const s=this.jl(t,i.tl());s&&i.Kc(s)}jl(t,i){return A(i,(i=>i.value===t))}Tl(t,i,s){let e,n;if(void 0===t)e=this.jl(void 0,i.tl()),n=this.jl(void 0,s.tl());else if(t){let r=function(t){let i=Si(t);i||(i=Si(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=bi(wi(t),1));if(!i){let s=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=bi(wi(Lc[s]),1)}return i}(t);if(r){let t=xi(r),h=100*r.Ml;e=this.jl(t,i.tl()),n=this.jl(h,s.tl())}}e&&i.Kc(e),n&&s.Kc(n)}constructor(t,i){this.al=t,this.Al=i,this.Pl=()=>{let t=this.al.fontFamily;this.Sl(t,this.Al["Font family"]);let i=this.al.fontColor;this.Tl(i,this.Al["Font color"],this.Al["Font opacity"]);let s=this.al.fontSize;this.Sl(s,this.Al["Font size"]);let e=this.al.backgroundColor;this.Tl(e,this.Al["Background color"],this.Al["Background opacity"]);let n=this.al.windowColor;this.Tl(n,this.Al["Window color"],this.Al["Window opacity"]);let r=this.al.edgeStyle;this.Sl(r,this.Al["Character edge style"])},this.al.addEventListener("change",this.Pl),this.Pl()}};var hl=class extends qa{El(){return{"Font family":{hl:ol(Yc),Ko:this.Nl.cl},"Font color":{hl:ol(Qc),Ko:this.Nl.pl},"Font opacity":{hl:ol(Xc),Ko:this.Nl.dl},"Font size":{hl:ol(Gc),Ko:this.Nl.ll},"Background color":{hl:ol(Qc),Ko:this.Nl.ml},"Background opacity":{hl:ol(Jc),Ko:this.Nl.bl},"Window color":{hl:ol(Qc),Ko:this.Nl.kl},"Window opacity":{hl:ol(Jc),Ko:this.Nl.xl},"Character edge style":{hl:ol(Kc),Ko:this.Nl.Cl}}}Bl(){this.Ir=h.createElement("span"),this.Ir.className="theo-settings-control-menu-item-title",this.Il=h.createElement("span"),this.Il.className="theo-primary-color theo-settings-control-menu-item-value",this.Lr.el().appendChild(this.Ir),this.Lr.el().appendChild(this.Il),this.te()}Mr(t){let i=this.Cr.addSubMenuItem();return i.Tr=t,this.Al[t]=new el(i,t,this.Fl[t],this.Fr),i}Nr(t){}Ar(t){}Re(){this.Fr.off("languagechange",this.te),this.Dl.removeEventListener(["addtrack","removetrack"],this.$l),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.Lr=t,this.Dl=i,this.Fr=e,this.Al={},this.$l=()=>{this.Dl.some((t=>mt(t.kind)))?this.Lr.show():this.Lr.hide()},this.te=()=>{l(this.Cr.menuHeader.el(),this.Fr.localize("Subtitle Options")),l(this.Ir,this.Fr.localize("Subtitle")),l(this.Il,this.Fr.localize("Options")),this.Lr.el().setAttribute("aria-label",this.Fr.localize("Open the subtitle options menu"))},this.Nl=new nl(s),this.Fl=this.El(),this.br=w.keys(this.Fl),this.Bl(),this.Rl=new rl(s,this.Al),this.Fr.on("languagechange",this.te),this.Dl.addEventListener(["addtrack","removetrack"],this.$l),this.$l()}};function ol(t){let i=[{label:"Default",value:void 0}];for(let s of t)"Default"!==s.label&&i.push(s);return i}Ai((function(t){const i=t.fo.controlBar.getChild("SettingsButton").menu,s=i.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),e=new hl(s,t.nt.va,t.Ol.va,t.fo);t.fo.on("dispose",(()=>{i.removeMenuItem(s),s.dispose(),e.Re(),i.dispose()}))}));var al=So.getComponent("Component"),ul=class extends al{buildCSSClass(){return"theo-ad-control-panel"}createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}constructor(t,i){super(t,i),t.adControlBar=this}};ul.prototype.h=vi({},al.prototype.h,{children:[]}),So.registerComponent("AdControlPanel",ul);var cl=So.getComponent("Component"),ll="theo-dai-countdown",dl=class extends cl{buildCSSClass(){return ll}createEl(t,i,s){const e=h.createElement("div");return e.className=ll,e}Vl(t,i){i.addEventListener("adbreakbegin",(()=>this.show())),i.addEventListener("adbreakend",(()=>this.hide())),t.addEventListener("timeupdate",this.te)}constructor(t,i,s){super(t,s),this.Qo=t,this.Xa=i,this.te=()=>{const t=this.Xa.ads;t.playing&&t.currentAdBreak&&t.currentAds.length&&l(this.contentEl(),function(t,i,s){const e=t.ads;let n="";const r=e.length;if(r>1){const t=e.indexOf(i)+1;n=s("Ad")+" "+t+"/"+r+". "}const h=_.ceil(t.maxRemainingDuration);return n+=s("The content will resume in {1} seconds.").replace("{1}",""+h),n}(t.currentAdBreak,t.currentAds[0],(t=>this.Qo.localize(t))))},this.yo=t.el(),this.Vl(i,i.ads),this.on(t,"languagechange",this.te)}};var fl=So.getComponent("ClickableComponent"),vl=class extends fl{buildCSSClass(){return St}createEl(t,i,s){return this.h.va.element.querySelector("."+St)}emitTapEvents(){}te(){l(this.el(),this.localize("Learn more"))}constructor(t,i){super(t,i),l(this.el(),t.localize("Learn more")),this.Xa=i.va,this.yo=t.el(),this.on(t,"languagechange",this.te)}};Ai((function(t){if(t.va.ads&&t.Ul){const i=t.fo,s=new dl(i,t.va),e=new vl(i,{va:t.va});i.adControlBar.addChild(s),i.adControlBar.addChild(e)}}));var pl=So.getComponent("Component"),ml=["addtrack","removetrack","change"],gl=class extends(Io(pl)){createEl(){let t=super.createEl();return this.qualityLabel=So.createEl("div",{className:"theo-quality-label-text"}),t.appendChild(this.qualityLabel),hi(this.qualityLabel),t}dispose(){this.qr&&(this.qr.removeEventListener("activequalitychanged",this.zl),this.qr=void 0),this.ws.videoTracks.removeEventListener(ml,this.nh),super.dispose()}constructor(t,i){super(t,i),this.qr=void 0,this.nh=()=>{const t=Ua(this.ws.videoTracks);t!==this.qr&&(this.qr&&this.qr.removeEventListener("activequalitychanged",this.zl),this.qr=t,t&&t.addEventListener("activequalitychanged",this.zl),this.zl())},this.zl=()=>{const t=this.qr&&this.qr.activeQuality;if(!this.qualityLabel||!t)return;const i=t.label?t.label:t.height?t.height+"p":void 0;i&&(l(this.qualityLabel,i),this.addClass("theo-quality-label-show"),this.hideActiveQualityLabel())},this.hideActiveQualityLabel=()=>{this.resetTimeout(),this.startFadeOutID=this.setTimeout(this.fadeoutLabel,3750),this.removeLabelClassesID=this.setTimeout(this.hideLabel,4e3)},this.resetTimeout=()=>{this.startFadeOutID&&this.clearTimeout(this.startFadeOutID),this.removeLabelClassesID&&this.clearTimeout(this.removeLabelClassesID)},this.fadeoutLabel=()=>{this.addClass("theo-quality-label-fadeout")},this.hideLabel=()=>{this.removeClass("theo-quality-label-show"),this.removeClass("theo-quality-label-fadeout")},super.addClass("theo-quality-label"),this.ws.videoTracks&&(this.ws.videoTracks.addEventListener(ml,this.nh),this.nh())}};So.registerComponent("activeQualityLabel",gl);var yl="theo-upcoming-ad-notification",bl=["adbreakbegin","adbreakend","adadded","adloaded","adbegin","adend"],kl=class extends(Io(aa)){createEl(){const t=So.createEl("div",{className:yl});return this.notificationText=So.createEl("div",{className:yl+"text"}),t.appendChild(this.notificationText),t}Ll(){if(!this.ws.ads)return;const t=this.ws.ads.scheduledAdBreaks;let i,s=1/0;for(let e=0;e<t.length;e++){const n=t[e];let r=n.timeOffset;-1!==r&&r<s&&(s=r,i=n)}this.currentAdBreak=i,this.currentAdBreakValid=void 0!==i&&void 0!==i.ads&&i.ads.some((t=>"linear"===t.type))}Hl(){if(!this.ws.ads||this.ws.ads.playing||!this.currentAdBreak||!this.currentAdBreakValid||0===this.currentAdBreak.timeOffset)return void this.ql();const t=this.ws.currentTime;if(this.currentAdBreak.timeOffset>t+10)return void this.ql();const i=_.ceil(this.currentAdBreak.timeOffset-t);i<0?this.ql():this.Wl(i)}Wl(t){this.Gl!==t&&(l(this.notificationText,"Your video will be temporarily interrupted in 0:"+(t<10?"0"+t:t)),this.Gl=t,this.show())}ql(){this.Gl=NaN,this.hide()}dispose(){var t;this.ws.removeEventListener("timeupdate",this.handleTimeUpdate),null==(t=this.ws.ads)||t.removeEventListener(bl,this.handleAdEvent),this.currentAdBreak=void 0,super.dispose()}constructor(t,i){super(t,i),this.currentAdBreak=void 0,this.currentAdBreakValid=!1,this.Gl=NaN,this.handleTimeUpdate=()=>{this.Hl()},this.handleAdEvent=()=>{this.Ll(),this.Hl()},this.ws.ads&&(this.hide(),this.ws.addEventListener("timeupdate",this.handleTimeUpdate),this.ws.ads.addEventListener(bl,this.handleAdEvent))}};So.registerComponent("upcomingAdNotificationText",kl);var wl=So.getComponent("Component");So.registerComponent("VerizonMediaAdBreakBar",class extends wl{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theo-ad-remaining-container",t}get Xl(){return this.h.adBreakProvider()}te(t,i){if(this.Xl&&this.Xl.endTime){const s=_.max(this.Xl.endTime-t,0);l(i,"Content will resume in "+_.ceil(s)+"s"),this.show()}else this.hide()}constructor(t,i){super(t,i),this.Jl=()=>{this.te(this.player().currentTime(),this.el())},this.on(t,"timeupdate",this.Jl)}});var _l=So.getComponent("ClickableComponent");So.registerComponent("VerizonMediaAdSkipButton",class extends _l{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",this.Ql=h.createElement("span"),t.appendChild(this.Ql),this.te(t,this.Ql),t}handleClick(){this.h.skipCallback()}te(t,i){this.Yl<=at.Zl.Kl?(ti(t,"theoplayer-ad-skip-countdown"),Kt(t,"theoplayer-ad-skip-button"),l(i,"Skip ads")):l(i,"Skip ads in "+_.ceil(this.Yl)+"s")}get Yl(){return this.h.adBreak.startTime+this.h.adBreak.skipOffset-this.player().currentTime()}constructor(t,i){super(t,i),this.Jl=()=>{this.te(this.el(),this.Ql)},this.on(t,"timeupdate",this.Jl)}});var xl=So.getComponent("Component"),Cl=class extends xl{buildCSSClass(){return"theo-verizonmedia-marker-bar"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}};So.registerComponent("VerizonMediaAdBreakMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-verizonmedia-marker-bar-adbreak"}});var Sl=So.getComponent("Component"),jl=class extends Sl{get startTime(){return this.h.startTime}get endTime(){return this.h.endTime}get seekable(){return this.player().seekable()}buildCSSClass(){return"theo-verizonmedia-marker"}createEl(t,i,s){const e=h.createElement("div");e.className=this.buildCSSClass();const n=this.seekable.start(0),r=this.seekable.end(this.seekable.length-1),o=_.max(this.startTime-n,0),a=void 0!==this.endTime?_.max(r-this.endTime,0):0,u=r-n;return e.style.left=o/u*100+"%",e.style.right=a/u*100+"%",e}constructor(t,i){super(t,i)}};So.registerComponent("VerizonMediaAdBreakMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-verizonmedia-marker-adbreak"}});So.registerComponent("VerizonMediaAssetMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-verizonmedia-marker-bar-asset"}});So.registerComponent("VerizonMediaAssetMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-verizonmedia-marker-asset"}});var Tl=So.getComponent("Component");So.registerComponent("VerizonMediaContentNotificationBar",class extends Tl{buildCSSClass(){const t="theo-verizonmedia-content-notification-bar",i=t+"-ios";return t+(Pt.Ga||Pt.td?" "+i:"")}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}});var Ml,Al=So.getComponent("Component");function Pl(t,i){return Boolean(t&&void 0===t.verizonMedia)||Boolean(t&&t.verizonMedia&&void 0===t.verizonMedia.ui)||Boolean(t&&t.verizonMedia&&t.verizonMedia.ui&&void 0===t.verizonMedia.ui[i])||Boolean(t&&t.verizonMedia&&t.verizonMedia.ui&&!0===t.verizonMedia.ui[i])}So.registerComponent("VerizonMediaContentNotification",class extends Al{get sd(){return this.h.asset}buildCSSClass(){return"theo-verizonmedia-content-notification"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}ko(){const t=h.createElement("img");t.src=this.sd.posterUrl,t.className=this.buildCSSClass()+"-thumbnail",this.el().appendChild(t);const i=h.createElement("div");i.className=this.buildCSSClass()+"-description";const s=function(t){return"Next: "+t}(this.sd.description);l(i,s),this.el().appendChild(i),this.ed=h.createElement("div"),this.ed.className=this.buildCSSClass()+"-countdown",l(this.ed,this.nd),this.el().appendChild(this.ed)}get nd(){const t=_.min(10,this.rd);return"Starting in "+_.ceil(t)+" seconds"}get rd(){return _.max(0,this.sd.startTime-this.player().currentTime())}od(){const t=this.rd;t>10||t<=0?this.hide():(l(this.ed,this.nd),this.show())}constructor(t,i){super(t,i),this.ko(),this.on(t,"timeupdate",this.od),this.hide()}}),function(t){t.ad="VerizonMediaAdBreakBar",t.ud="VerizonMediaAdSkipButton",t.ld="VerizonMediaAdBreakMarkerBar",t.dd="VerizonMediaAdBreakMarker",t.fd="VerizonMediaAssetMarkerBar",t.vd="VerizonMediaAssetMarker",t.pd="VerizonMediaContentNotificationBar",t.md="VerizonMediaContentNotification"}(Ml||(Ml={})),Ti((function(t){return class extends t{get gd(){return this.fo.controlBar.progressControl.seekBar}ga(t){this.yd=!1,this.va.removeEventListener("timeupdate",this.bd),this.fo.removeChild("VerizonMediaAdBreakBar"),this.fo.removeChild("VerizonMediaAdSkipButton"),this.gd.removeChild("VerizonMediaAdBreakMarkerBar"),this.gd.removeChild("VerizonMediaAssetMarkerBar"),this.fo.removeChild("VerizonMediaContentNotificationBar"),super.ga(t)}kd(){if(!function(t){return Pl(t,"assetMarkers")}(this.wd)||!this.yd)return;const t=this.va.verizonMedia.assets.map((t=>({name:"VerizonMediaAssetMarker",startTime:t.startTime,endTime:t.endTime})));this.gd.removeChild("VerizonMediaAssetMarkerBar"),this.gd.addChild("VerizonMediaAssetMarkerBar",{children:t})}_d(){if(!function(t){return Pl(t,"contentNotification")}(this.wd))return;const t=this.va.verizonMedia.assets.map((t=>({name:"VerizonMediaContentNotification",asset:t})));this.fo.removeChild("VerizonMediaContentNotificationBar"),this.fo.addChild("VerizonMediaContentNotificationBar",{children:t})}gn(){this.va.removeEventListener("timeupdate",this.bd),this.va.verizonMedia.ads.adBreaks.removeEventListener("addadbreak",this.xd),this.va.verizonMedia.ads.adBreaks.removeEventListener("removeadbreak",this.Cd),this.va.verizonMedia.assets.removeEventListener("addasset",this.Sd),this.va.verizonMedia.assets.removeEventListener("removeasset",this.Sd),this.va.removeEventListener("loadeddata",this.jd),super.gn()}constructor(t,i,s){super(t,i,s),this.yd=!1,this.jd=()=>{this.yd=!0,isFinite(this.Td())||this.va.addEventListener("timeupdate",this.bd),this.bd(),this.kd(),this._d()},this.xd=t=>{t.adBreak.addEventListener("adbreakbegin",this.Md),t.adBreak.addEventListener("adbreakend",this.Pd),this.bd()},this.Cd=t=>{t.adBreak.removeEventListener("adbreakbegin",this.Md),t.adBreak.removeEventListener("adbreakend",this.Pd),this.bd()},this.bd=()=>{if(!function(t){return Pl(t,"adBreakMarkers")}(this.wd)||!this.yd)return;const t=this.va.verizonMedia.ads.adBreaks.map((t=>({name:"VerizonMediaAdBreakMarker",startTime:t.startTime,endTime:t.endTime})));this.gd.removeChild("VerizonMediaAdBreakMarkerBar"),this.gd.addChild("VerizonMediaAdBreakMarkerBar",{children:t})},this.Md=()=>{if(function(t){return Pl(t,"adNotification")}(this.wd)){const t=this.va.verizonMedia.ads.currentAdBreak;this.fo.addChild("VerizonMediaAdBreakBar",{adBreakProvider:this.Ed}),-1!==t.skipOffset&&this.fo.addChild("VerizonMediaAdSkipButton",{adBreak:t,skipCallback:this.va.verizonMedia.ads.skip})}},this.Ed=()=>this.va.verizonMedia.ads.currentAdBreak,this.Pd=()=>{this.fo.removeChild("VerizonMediaAdBreakBar"),this.fo.removeChild("VerizonMediaAdSkipButton")},this.Sd=()=>{this.kd(),this._d()},this.va.verizonMedia.ads.adBreaks.addEventListener("addadbreak",this.xd),this.va.verizonMedia.ads.adBreaks.addEventListener("removeadbreak",this.Cd),this.va.verizonMedia.assets.addEventListener("addasset",this.Sd),this.va.verizonMedia.assets.addEventListener("removeasset",this.Sd),this.va.addEventListener("loadeddata",this.jd)}}}));export{J as ChromelessPlayer,z as ErrorCategory,V as ErrorCode,$u as Player,xt as cache,bt as cast,Z as features,et as playerSuiteVersion,rt as players,ot as registerContentProtectionIntegration,Y as utils,it as version,So as videojs};