@theoplayer/extended 9.2.0 → 9.3.1
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.chromeless.d.ts +1 -1
- package/THEOplayer.chromeless.esm.js +2 -2
- package/THEOplayer.chromeless.js +3 -3
- package/THEOplayer.common.d.ts +5 -0
- package/THEOplayer.common.esm.js +3 -3
- package/THEOplayer.d.ts +1 -1
- package/THEOplayer.esm.js +3 -3
- package/THEOplayer.js +3 -3
- package/THEOplayer.transmux.asmjs.js +3 -3
- package/THEOplayer.transmux.js +3 -3
- package/package.json +1 -1
- package/theoplayer.d.js +3 -3
- package/theoplayer.sw.js +3 -3
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: 9.
|
|
38
|
-
Created: 2025-
|
|
37
|
+
Version: 9.3.1
|
|
38
|
+
Created: 2025-05-12T14:31:06.609Z
|
|
39
39
|
*/
|
|
40
|
-
var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==a?a:"undefined"!=typeof global?global:this,a=s.window,h=s.document,u=(s.location,s.navigator,s.setTimeout),c=s.clearTimeout,v=(s.setInterval,s.clearInterval,s.Error),p=s.TypeError,m=s.SyntaxError,g=s.Object,w=s.Math,k=s.parseInt,_=s.parseFloat,j=s.isNaN,x=s.Uint8Array;s.Worker,s.WorkerGlobalScope,s.XMLHttpRequest;import{$ as S,$a as T,A as C,Aa as P,Ab as M,B as A,Ba as I,Bb as E,C as D,Ca as N,Cb as F,D as B,Da as $,E as R,Ea as O,F as V,Fa as U,G as L,Ga as H,H as z,Ha as W,I as q,Ia as G,J as X,Ja as J,K as Q,Ka as Y,L as K,La as Z,M as tt,Ma as it,N as st,Na as et,O as nt,Oa as rt,P as ht,Pa as ot,Q as at,Qa as ut,R as ct,Ra as lt,S as ft,Sa as dt,T as vt,Ta as pt,U as mt,Ua as gt,V as yt,Va as bt,W as wt,Wa as kt,X as _t,Xa as jt,Y as xt,Ya as St,Z as Tt,Za as Ct,_ as Pt,_a as Mt,a as At,aa as It,ab as Et,b as Dt,ba as Nt,bb as Ft,c as Bt,ca as $t,cb as Rt,d as Ot,da as Vt,db as Ut,e as Lt,ea as Ht,eb as zt,f as Wt,fa as qt,fb as Gt,g as Xt,ga as Jt,gb as Qt,h as Yt,ha as Kt,hb as Zt,i as ti,ia as ii,ib as si,j as ei,ja as ni,jb as ri,k as r,ka as hi,kb as d,l as oi,la as ai,lb as ui,m as ci,ma as li,mb as fi,n as di,na as vi,nb as pi,o as mi,oa as gi,ob as yi,p as bi,pa as wi,pb as ki,q as _i,qa as ji,qb as xi,r as Si,ra as Ti,rb as Ci,s as Pi,sa as Mi,sb as Ai,t as Ii,ta as Ei,tb as Di,u as Ni,ua as Fi,ub as Bi,v as $i,va as Ri,vb as Oi,w as Vi,wa as Ui,wb as Li,x as Hi,xa as zi,xb as Wi,y as qi,ya as Gi,yb as Xi,z as Ji,za as Qi,zb as Yi}from"./THEOplayer.common.esm.js";Bt(),Bt(),Bt(),Bt();var Ki=[];var Zi=[];Bt(),Bt(),Bt(),Bt();var ts=void 0!==a?a:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},is=void 0!==h?h:{createElement:function(){}};function ss(t,i){return i||(i=t.slice(0)),t.raw=i,t}var es=1;function ns(){return es++}var rs,hs=g.prototype.toString,os=function(t){return cs(t)?g.keys(t):[]};function as(t,i){os(t).forEach((function(s){return i(t[s],s)}))}function us(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 g.assign?g.assign.apply(g,[t].concat(s)):(s.forEach((function(i){i&&as(i,(function(i,s){t[s]=i}))})),t)}function cs(t){return!!t&&"object"==typeof t}function ls(t){return cs(t)&&"[object Object]"===hs.call(t)&&t.constructor===g}var fs=function(t,i,s){void 0===s&&(s=!!ce&&ce<11),"log"!==t&&i.unshift(t.toUpperCase()+":"),rs.history.push(i),i.unshift("VIDEOJS:");var e=ts.console&&ts.console[t];e&&(s&&(i=i.map((function(t){if(cs(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(i){return String(t)}return String(t)})).join(" ")),e.apply?e[Array.isArray(i)?"apply":"call"](ts.console,i):e(i))};(rs=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];fs("log",i)}).history=[],rs.error=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return fs("error",i)},rs.warn=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return fs("warn",i)};var ds=rs,vs="undefined"!=typeof globalThis?globalThis:void 0!==a?a:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ps(t){return t.replace(/\n\r?\s*/g,"")}var ms,gs=function(t){for(var i="",s=0;s<arguments.length;s++)i+=ps(t[s])+(arguments[s+1]||"");return i};function ys(t){return"string"==typeof t&&/\S/.test(t)}function bs(t){if(/\s/.test(t))throw new v("class has illegal whitespace characters")}function ws(){return is===ts.document&&void 0!==is.createElement}function ks(t){return cs(t)&&1===t.nodeType}function _s(t){return function(i,s){if(!ys(i))return is[t](null);ys(s)&&(s=is.querySelector(s));var e=ks(s)?s:is;return e[t]&&e[t](i)}}function js(t,i,s,e){void 0===t&&(t="div"),void 0===i&&(i={}),void 0===s&&(s={});var n=is.createElement(t);return g.getOwnPropertyNames(i).forEach((function(t){var s=i[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(ds.warn(gs(ms||(ms=ss(["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?xs(n,s):n[t]=s})),g.getOwnPropertyNames(s).forEach((function(t){n.setAttribute(t,s[t])})),e&&Hs(n,e),n}function xs(t,i){return void 0===t.textContent?t.innerText=i:t.textContent=i,t}function Ss(t,i){i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t)}var Ts={},Cs="vdata"+(new Date).getTime();function Ps(t){var i=t[Cs];return i||(i=t[Cs]=ns()),Ts[i]||(Ts[i]={}),Ts[i]}function Ms(t){var i=t[Cs];return!!i&&!!g.getOwnPropertyNames(Ts[i]).length}function As(t){var i=t[Cs];if(i){delete Ts[i];try{delete t[Cs]}catch(i){t.removeAttribute?t.removeAttribute(Cs):t[Cs]=null}}}function Is(t,i){return bs(i),t.classList?t.classList.contains(i):function(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}(i).test(t.className)}function Es(t,i){return t.classList?t.classList.add(i):Is(t,i)||(t.className=(t.className+" "+i).trim()),t}function Ds(t,i){return t.classList?t.classList.remove(i):(bs(i),t.className=t.className.split(/\s+/).filter((function(t){return t!==i})).join(" ")),t}function Ns(t,i,s){var e=Is(t,i);if("function"==typeof s&&(s=s(t,i)),"boolean"!=typeof s&&(s=!e),s!==e)return s?Es(t,i):Ds(t,i),t}function Fs(t,i){g.getOwnPropertyNames(i).forEach((function(s){var e=i[s];null==e||!1===e?t.removeAttribute(s):t.setAttribute(s,!0===e?"":e)}))}function Bs(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 $s(t,i,s){t.setAttribute(i,s)}function Rs(t,i){t.removeAttribute(i)}function Os(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var s=is.documentElement,e=is.body,n=s.clientLeft||e.clientLeft||0,r=ts.pageXOffset||e.scrollLeft,h=i.left+r-n,o=s.clientTop||e.clientTop||0,a=ts.pageYOffset||e.scrollTop,u=i.top+a-o;return{left:w.round(h),top:w.round(u)}}function Vs(t,i){var s={},e=Os(t),n=t.offsetWidth,r=t.offsetHeight,h=e.top,o=e.left,a=i.pageY,u=i.pageX;return i.changedTouches&&(u=i.changedTouches[0].pageX,a=i.changedTouches[0].pageY),s.y=w.max(0,w.min(1,(h-a+r)/r)),s.x=w.max(0,w.min(1,(u-o)/n)),s}function Us(t){return cs(t)&&3===t.nodeType}function Ls(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function Hs(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()),ks(t)||Us(t)?t:"string"==typeof t&&/\S/.test(t)?is.createTextNode(t):void 0})).filter((function(t){return t}))}(i).forEach((function(i){return t.appendChild(i)})),t}function zs(t,i){return Hs(Ls(t),i)}var b,Ws=_s("querySelector"),qs=_s("querySelectorAll"),Gs=ts.navigator&&ts.navigator.userAgent||"",Xs=/AppleWebKit\/([\d.]+)/i.exec(Gs),Js=Xs?_(Xs.pop()):null,Qs=/iPad/i.test(Gs),Ys=/iPhone/i.test(Gs)&&!Qs,Ks=/iPod/i.test(Gs),Zs=Ys||Qs||Ks,te=(b=Gs.match(/OS (\d+)_/i))&&b[1]?b[1]:null,ie=/Android/i.test(Gs),se=function(){var t=Gs.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&_(t[1]),s=t[2]&&_(t[2]);return i&&s?_(t[1]+"."+t[2]):i||null}(),ee=ie&&/webkit/i.test(Gs)&&se<2.3,ne=ie&&se<5&&Js<537,re=/Firefox/i.test(Gs),he=/Edge/i.test(Gs),oe=!he&&/Chrome/i.test(Gs),ae=function(){var t=Gs.match(/Chrome\/(\d+)/);return t&&t[1]?_(t[1]):null}(),ue=/MSIE\s8\.0/.test(Gs),ce=function(){var t=/MSIE\s(\d+)\.\d/.exec(Gs),i=t&&_(t[1]);return!i&&/Trident\/7.0/i.test(Gs)&&/rv:11.0/.test(Gs)&&(i=11),i}(),le=/Safari/i.test(Gs)&&!oe&&!ie&&!he,fe=le||Zs,de=ws()&&("ontouchstart"in ts||ts.DocumentTouch&&ts.document instanceof ts.DocumentTouch),ve=ws()&&"backgroundSize"in ts.document.createElement("video").style,pe=g.freeze({__proto__:null,IS_IPAD:Qs,IS_IPHONE:Ys,IS_IPOD:Ks,IS_IOS:Zs,IOS_VERSION:te,IS_ANDROID:ie,ANDROID_VERSION:se,IS_OLD_ANDROID:ee,IS_NATIVE_ANDROID:ne,IS_FIREFOX:re,IS_EDGE:he,IS_CHROME:oe,CHROME_VERSION:ae,IS_IE8:ue,IE_VERSION:ce,IS_SAFARI:le,IS_ANY_SAFARI:fe,TOUCH_ENABLED:de,BACKGROUND_SIZE_SUPPORTED:ve});function me(t,i){var s=Ps(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)),g.getOwnPropertyNames(s.handlers).length<=0&&(delete s.handlers,delete s.dispatcher,delete s.disabled),0===g.getOwnPropertyNames(s).length&&As(t)}function ge(t,i,s,e){s.forEach((function(s){t(i,s,e)}))}function ye(t){function i(){return!0}function s(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){var e=t||ts.event;for(var n in t={},e)"layerX"!==n&&"layerY"!==n&&"keyLocation"!==n&&"webkitMovementX"!==n&&"webkitMovementY"!==n&&"path"!==n&&("returnValue"===n&&e.preventDefault||(t[n]=e[n]));if(t.target||(t.target=t.srcElement||is),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){e.preventDefault&&e.preventDefault(),t.returnValue=!1,e.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){e.stopPropagation&&e.stopPropagation(),t.cancelBubble=!0,e.cancelBubble=!0,t.isPropagationStopped=i},t.isPropagationStopped=s,t.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation(),t.isImmediatePropagationStopped=i,t.stopPropagation()},t.isImmediatePropagationStopped=s,null!==t.clientX&&void 0!==t.clientX){var r=is.documentElement,h=is.body;t.pageX=t.clientX+(r&&r.scrollLeft||h&&h.scrollLeft||0)-(r&&r.clientLeft||h&&h.clientLeft||0),t.pageY=t.clientY+(r&&r.scrollTop||h&&h.scrollTop||0)-(r&&r.clientTop||h&&h.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var be=!1;!function(){try{var t=g.defineProperty({},"passive",{get:function(){be=!0}});ts.addEventListener("test",null,t)}catch(t){}}();var we=["touchstart","touchmove"];function ke(t,i,s){if(Array.isArray(i))return ge(ke,t,i,s);var e=Ps(t);if(e.handlers||(e.handlers={}),e.handlers[i]||(e.handlers[i]=[]),s.guid||(s.guid=ns()),e.handlers[i].push(s),e.dispatcher||(e.disabled=!1,e.dispatcher=function(i,s){if(!e.disabled){i=ye(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){ds.error(t)}}}),1===e.handlers[i].length)if(t.addEventListener){var n=!1;be&&we.indexOf(i)>-1&&(n={passive:!0}),t.addEventListener(i,e.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+i,e.dispatcher)}function _e(t,i,s){if(Ms(t)){var e=Ps(t);if(e.handlers){if(Array.isArray(i))return ge(_e,t,i,s);var n=function(i){e.handlers[i]=[],me(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);me(t,i)}else n(i)}else for(var o in e.handlers)n(o)}}}function je(t,i,s){var e=Ms(t)?Ps(t):{},n=t.parentNode||t.ownerDocument;if("string"==typeof i&&(i={type:i,target:t}),i=ye(i),e.dispatcher&&e.dispatcher.call(t,i,s),n&&!i.isPropagationStopped()&&!0===i.bubbles)je.call(null,n,i,s);else if(!n&&!i.defaultPrevented){var r=Ps(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 xe(t,i,s){if(Array.isArray(i))return ge(xe,t,i,s);var e=function e(){_e(t,i,e),s.apply(this,arguments)};e.guid=s.guid=s.guid||ns(),ke(t,i,e)}var Se,Te=!1,Ce=function(){if(ws()){var t=is.getElementsByTagName("video"),i=is.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){Pe(1);break}void 0===u.player&&null!==u.getAttribute("data-setup")&&Se(u)}else Te||Pe(1)}};function Pe(t,i){i&&(Se=i),ts.setTimeout(Ce,t)}ws()&&"complete"===is.readyState?Te=!0:xe(ts,"load",(function(){Te=!0}));var Me=function(t){var i=is.createElement("style");return i.className=t,i},Ae=function(t,i){t.styleSheet?t.styleSheet.cssText=i:t.textContent=i},Ie=function(t,i,s){i.guid||(i.guid=ns());var e=function(){return i.apply(t,arguments)};return e.guid=s?s+"_"+i.guid:i.guid,e};function Ee(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function De(){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&&as(i,(function(i,s){ls(i)?(ls(t[s])||(t[s]={}),t[s]=De(t[s],i)):t[s]=i}))})),t}var Ne=function(){function t(t,i,s){if(!t&&this.play?this.t=t=this:this.t=t,this.h=De({},this.h),i=this.h=De(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"+ns()}this.l=i.name||null,i.el?this.v=i.el:!1!==i.createEl&&(this.v=this.createEl()),this.m=[],this.k={},this.j={},!1!==i.initChildren&&this.initChildren(),this.ready(s),!1!==i.reportTouchActivity&&this.enableTouchActivity()}var i=t.prototype;return i.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.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.j=null,this.off(),this.v.parentNode&&this.v.parentNode.removeChild(this.v),As(this.v),this.v=null},i.player=function(){return this.t},i.options=function(t){return ds.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.h=De(this.h,t),this.h):this.h},i.el=function(){return this.v},i.createEl=function(t,i,s){return js(t,i,s)},i.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},i.contentEl=function(){return this.S||this.v},i.id=function(){return this.o},i.name=function(){return this.l},i.children=function(){return this.m},i.getChildById=function(t){return this.k[t]},i.getChild=function(t){if(t)return t=Ee(t),this.j[t]},i.addChild=function(i,s,e){var n,r;if(void 0===s&&(s={}),void 0===e&&(e=this.m.length),"string"==typeof i){r=Ee(i),s||(s={}),!0===s&&(ds.warn("Initializing a child component with `true` is deprecated.Children should be defined in an array when possible, but if necessary use an object instead of `true`."),s={});var h=s.componentClass||r;s.name=r;var o=t.getComponent(h);if(!o)throw new v("Component "+h+" does not exist");if("function"!=typeof o)return null;n=new o(this.t||this,s)}else n=i;if(this.m.splice(e,0,n),"function"==typeof n.id&&(this.k[n.id()]=n),(r=r||n.name&&Ee(n.name()))&&(this.j[r]=n),"function"==typeof n.el&&n.el()){var a=this.contentEl().children[e]||null;this.contentEl().insertBefore(n.el(),a)}return n},i.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.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.j[t.name()]=null;var e=t.el();e&&e.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},i.initChildren=function(){var i=this,s=this.h.children;if(s){var e,n=this.h,r=t.getComponent("Tech");(e=Array.isArray(s)?s:g.keys(s)).concat(g.keys(this.h).filter((function(t){return!e.some((function(i){return"string"==typeof i?t===i:t===i.name}))}))).map((function(t){var e,n;return"string"==typeof t?n=s[e=t]||i.h[e]||{}:(e=t.name,n=t),{name:e,opts:n}})).filter((function(i){var s=t.getComponent(i.opts.componentClass||Ee(i.name));return s&&!r.isTech(s)})).forEach((function(t){var s=t.name,e=t.opts;if(void 0!==n[s]&&(e=n[s]),!1!==e){!0===e&&(e={}),e.playerOptions=i.h.playerOptions;var r=i.addChild(s,e);r&&(i[s]=r)}}))}},i.buildCSSClass=function(){return""},i.on=function(t,i,s){var e=this;if("string"==typeof t||Array.isArray(t))ke(this.v,t,Ie(this,i));else{var n=t,r=i,h=Ie(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?(ke(n,r,h),ke(n,"dispose",a)):"function"==typeof t.on&&(n.on(r,h),n.on("dispose",a))}return this},i.off=function(t,i,s){if(!t||"string"==typeof t||Array.isArray(t))_e(this.v,t,i);else{var e=t,n=i,r=Ie(this,s);this.off("dispose",r),t.nodeName?(_e(e,n,r),_e(e,"dispose",r)):(e.off(n,r),e.off("dispose",r))}return this},i.one=function(t,i,s){var e=arguments,n=this;if("string"==typeof t||Array.isArray(t))xe(this.v,t,Ie(this,i));else{var r=t,h=i,o=Ie(this,s),a=function t(){n.off(r,h,t),o.apply(null,e)};a.guid=o.guid,this.on(r,h,a)}return this},i.trigger=function(t,i){return je(this.v,t,i),this},i.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.T?i?t.call(this):this.setTimeout(t,1):(this.C=this.C||[],this.C.push(t))),this},i.triggerReady=function(){this.T=!0,this.setTimeout((function(){var t=this.C;this.C=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},i.$=function(t,i){return Ws(t,i||this.contentEl())},i.$$=function(t,i){return qs(t,i||this.contentEl())},i.hasClass=function(t){return Is(this.v,t)},i.addClass=function(t){return Es(this.v,t),this},i.removeClass=function(t){return Ds(this.v,t),this},i.toggleClass=function(t,i){return Ns(this.v,t,i),this},i.show=function(){return this.removeClass("vjs-hidden"),this},i.hide=function(){return this.addClass("vjs-hidden"),this},i.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},i.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},i.getAttribute=function(t){return function(t,i){return t.getAttribute(i)}(this.v,t)},i.setAttribute=function(t,i){return $s(this.v,t,i),this},i.removeAttribute=function(t){return Rs(this.v,t),this},i.width=function(t,i){return this.dimension("width",t,i)},i.height=function(t,i){return this.dimension("height",t,i)},i.dimensions=function(t,i){return this.width(t,!0).height(i)},i.dimension=function(t,i,s){if(void 0!==i)return null!==i&&i==i||(i=0),-1!==(""+i).indexOf("%")||-1!==(""+i).indexOf("px")?this.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 k(-1!==n?e.slice(0,n):this.v["offset"+Ee(t)],10)},i.currentDimension=function(t){var i=0;if("width"!==t&&"height"!==t)throw new v("currentDimension only accepts width or height value");if("function"==typeof ts.getComputedStyle){var s=ts.getComputedStyle(this.v);i=s.getPropertyValue(t)||s[t]}if(0===(i=_(i))){var e="offset"+Ee(t);i=this.v[e]}return i},i.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},i.currentWidth=function(){return this.currentDimension("width")},i.currentHeight=function(){return this.currentDimension("height")},i.focus=function(){this.v.focus()},i.blur=function(){this.v.blur()},i.emitTapEvents=function(){var t,i=0,s=null;this.on("touchstart",(function(e){1===e.touches.length&&(s={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},i=(new Date).getTime(),t=!0)})),this.on("touchmove",(function(i){if(i.touches.length>1)t=!1;else if(s){var e=i.touches[0].pageX-s.pageX,n=i.touches[0].pageY-s.pageY;w.sqrt(e*e+n*n)>10&&(t=!1)}}));var e=function(){t=!1};this.on("touchleave",e),this.on("touchcancel",e),this.on("touchend",(function(e){(s=null,!0===t)&&((new Date).getTime()-i<200&&(e.preventDefault(),this.trigger("tap")))}))},i.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,i=Ie(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){i(),this.clearInterval(t),t=this.setInterval(i,250)}));var s=function(s){i(),this.clearInterval(t)};this.on("touchmove",i),this.on("touchend",s),this.on("touchcancel",s)}},i.setTimeout=function(t,i){t=Ie(this,t);var s=ts.setTimeout(t,i),e=function(){this.clearTimeout(s)};return e.guid="vjs-timeout-"+s,this.on("dispose",e),s},i.clearTimeout=function(t){ts.clearTimeout(t);var i=function(){};return i.guid="vjs-timeout-"+t,this.off("dispose",i),t},i.setInterval=function(t,i){t=Ie(this,t);var s=ts.setInterval(t,i),e=function(){this.clearInterval(s)};return e.guid="vjs-interval-"+s,this.on("dispose",e),s},i.clearInterval=function(t){ts.clearInterval(t);var i=function(){};return i.guid="vjs-interval-"+t,this.off("dispose",i),t},t.registerComponent=function(i,s){if(i){if(i=Ee(i),t.P||(t.P={}),"Player"===i&&t.P[i]){var e=t.P[i];if(e.players&&g.keys(e.players).length>0&&g.keys(e.players).map((function(t){return e.players[t]})).every(Boolean))throw new v("Can not register Player component after player has been created")}return t.P[i]=s,s}},t.getComponent=function(i){if(i)return i=Ee(i),t.P&&t.P[i]?t.P[i]:ts&&ts.videojs&&ts.videojs[i]?(ds.warn("The "+i+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),ts.videojs[i]):void 0},t.extend=function(i){i=i||{},ds.warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var s=i.init||i.init||this.prototype.init||this.prototype.init||function(){},e=function(){s.apply(this,arguments)};for(var n in(e.prototype=g.create(this.prototype)).constructor=e,e.extend=t.extend,i)i.hasOwnProperty(n)&&(e.prototype[n]=i[n]);return e},t}();Ne.registerComponent("Component",Ne);var Fe=function(){};function Be(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $e(t,i){return($e=g.setPrototypeOf?g.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function Re(t,i){t.prototype=g.create(i.prototype),t.prototype.constructor=t,$e(t,i)}function Oe(t,i,s,e){return void 0===e&&(ds.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),e=0),function(t,i,s){if(i<0||i>s)throw new v("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 Ve(t){return void 0===t||0===t.length?{length:0,start:function(){throw new v("This TimeRanges object is empty")},end:function(){throw new v("This TimeRanges object is empty")}}:{length:t.length,start:Oe.bind(null,"start",0,t),end:Oe.bind(null,"end",1,t)}}function Ue(t,i){return Array.isArray(t)?Ve(t):void 0===t||void 0===i?Ve():Ve([[t,i]])}function Le(t,i){var s,e,n=0;if(!i)return 0;t&&t.length||(t=Ue(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}Fe.prototype.M={},Fe.prototype.on=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},ke(this,t,i),this.addEventListener=s},Fe.prototype.addEventListener=Fe.prototype.on,Fe.prototype.off=function(t,i){_e(this,t,i)},Fe.prototype.removeEventListener=Fe.prototype.off,Fe.prototype.one=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},xe(this,t,i),this.addEventListener=s},Fe.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=ye(t),this.M[i]&&this["on"+i]&&this["on"+i](t),je(this,t)},Fe.prototype.dispatchEvent=Fe.prototype.trigger;var He,ze,We,qe,Ge={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"]],Je=Xe[0];for(ze=0;ze<Xe.length;ze++)if(Xe[ze][1]in is){He=Xe[ze];break}if(He){for(We=0;We<He.length;We++)Ge[Je[We]]=He[We];Ge.prefixed=He[0]!==Je[0]}function Qe(t){if(t instanceof Qe)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:cs(t)&&("number"==typeof t.code&&(this.code=t.code),us(this,t)),this.message||(this.message=Qe.defaultMessages[this.code]||"")}for(Qe.prototype.code=0,Qe.prototype.message="",Qe.prototype.status=null,Qe.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Qe.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."},qe=0;qe<Qe.errorTypes.length;qe++)Qe[Qe.errorTypes[qe]]=qe,Qe.prototype[Qe.errorTypes[qe]]=qe;var Ye=function(t,i){var s,e=null;try{s=JSON.parse(t,i)}catch(t){e=t}return[e,s]};var Ke=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}}))})},Ze=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=Ke(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(Ke))},tn=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()},sn="vjs-modal-dialog",en=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).A=e.I=e.D=!1,e.closeable(!e.h.uncloseable),e.content(e.h.content),e.S=js("div",{className:sn+"-content"},{role:"document"}),e.N=js("p",{className:sn+"-description vjs-offscreen",id:e.el().getAttribute("aria-describedby")}),xs(e.N,e.description()),e.v.appendChild(e.N),e.v.appendChild(e.S),e.on(i,"languagechange",e.handleLanguagechange),e}Re(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 sn+" 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.A){var t=this.player();this.trigger("beforemodalopen"),this.A=!0,(this.h.fillAlways||!this.I&&!this.D)&&this.fill(),this.B=!t.paused(),this.h.pauseOnOpen&&this.B&&t.pause(),this.closeable()&&this.on(this.v.ownerDocument,"keydown",Ie(this,this.handleKeyPress)),t.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.I=!0}return this},s.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.A},s.close=function(){if(this.A){var t=this.player();this.trigger("beforemodalclose"),this.A=!1,this.B&&this.h.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.v.ownerDocument,"keydown",Ie(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.D=!0,s.removeChild(i),this.empty(),zs(i,t),this.trigger("modalfill"),e?s.insertBefore(i,e):s.appendChild(i),this},s.empty=function(){return this.trigger("beforemodalempty"),Ls(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()),xs(this.N,this.description()),this.opened()?this.fill():(this.I||this.D)&&(this.I=!1,this.D=!1,this.empty())},i}(Ne);en.prototype.h={pauseOnOpen:!0,temporary:!0},Ne.registerComponent("ModalDialog",en);var nn=function(){function t(i){var s=this;if(ue)for(var e in s=is.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);if(t.prototype.V.call(s,i),g.defineProperty(s,"length",{get:function(){return this.U}}),ue)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||g.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}(),rn={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},hn={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},on={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},an={disabled:"disabled",hidden:"hidden",showing:"showing"},un=function(t){function i(s){var e;void 0===s&&(s={});var n=Be(e=t.call(this)||this);if(ue)for(var r in n=is.createElement("custom"),i.prototype)"constructor"!==r&&(n[r]=i.prototype[r]);var h={id:s.id||["vjs_track",ns()].join("_"),kind:s.kind||"",label:s.label||"",language:s.language||""},o=function(t){g.defineProperty(n,t,{get:function(){return h[t]},set:function(){}})};for(var a in h)o(a);return n||Be(e)}return Re(i,t),i}(Fe),cn=function(t){var i=["protocol","hostname","port","pathname","search","hash","host"],s=is.createElement("a");s.href=t;var e,n=""===s.host&&"file:"!==s.protocol;n&&((e=is.createElement("div")).innerHTML='<a href="'+t+'"></a>',s=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),is.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&&is.body.removeChild(e),r},ln=function(t){var i=ts.location,s=cn(t);return(":"===s.protocol?i.protocol:s.protocol)+s.host!==i.protocol+i.host},fn={exports:{}};void 0!==a?fn.exports=a:void 0!==vs?fn.exports=vs:"undefined"!=typeof self?fn.exports=self:fn.exports={};var dn=function(t){var i=vn.call(t);return"[object Function]"===i||"function"==typeof t&&"[object RegExp]"!==i||void 0!==a&&(t===a.setTimeout||t===a.alert||t===a.confirm||t===a.prompt)},vn=g.prototype.toString;var pn,mn,gn,yn,bn,wn,kn,_n,jn,xn,Sn,Tn,Cn=Array.prototype.slice,Pn=g.prototype.toString,Mn=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==Pn.call(i))throw new p("Function.prototype.bind called on incompatible "+i);for(var s,e=Cn.call(arguments,1),n=w.max(0,i.length-e.length),r=[],h=0;h<n;h++)r.push("$"+h);if(s=Function("binder","return function ("+r.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof s){var n=i.apply(this,e.concat(Cn.call(arguments)));return g(n)===n?n:this}return i.apply(t,e.concat(Cn.call(arguments)))})),i.prototype){var o=function(){};o.prototype=i.prototype,s.prototype=new o,o.prototype=null}return s},An=Function.prototype.bind||Mn,In=g.prototype.toString,En=function(t){var i=In.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]"===In.call(t.callee)),s};g.keys||(mn=g.prototype.hasOwnProperty,gn=g.prototype.toString,yn=En,bn=g.prototype.propertyIsEnumerable,wn=!bn.call({toString:null},"toString"),kn=bn.call((function(){}),"prototype"),_n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],jn=function(t){var i=t.constructor;return i&&i.prototype===t},xn={$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},Sn=function(){if(void 0===a)return!1;for(var t in a)try{if(!xn["$"+t]&&mn.call(a,t)&&null!==a[t]&&"object"==typeof a[t])try{jn(a[t])}catch(t){return!0}}catch(t){return!0}return!1}(),Tn=function(t){if(void 0===a||!Sn)return jn(t);try{return jn(t)}catch(t){return!1}},pn=function(t){var i=null!==t&&"object"==typeof t,s="[object Function]"===gn.call(t),e=yn(t),n=i&&"[object String]"===gn.call(t),r=[];if(!i&&!s&&!e)throw new p("Object.keys called on a non-object");var h=kn&&s;if(n&&t.length>0&&!mn.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||!mn.call(t,u)||r.push(String(u));if(wn)for(var c=Tn(t),l=0;l<_n.length;++l)c&&"constructor"===_n[l]||!mn.call(t,_n[l])||r.push(_n[l]);return r});var Dn=pn,Nn=Array.prototype.slice,Fn=En,Bn=g.keys,$n=Bn?function(t){return Bn(t)}:Dn,Rn=g.keys;$n.shim=function(){if(g.keys){var t=function(){var t=g.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(g.keys=function(t){return Fn(t)?Rn(Nn.call(t)):Rn(t)})}else g.keys=$n;return g.keys||$n};var On=$n,Vn="function"==typeof At&&"symbol"==typeof At("foo"),Un=g.prototype.toString,Ln=Array.prototype.concat,Hn=g.defineProperty,zn=Hn&&function(){var t={};try{for(var i in Hn(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),Wn=function(t,i,s,e){(!(i in t)||function(t){return"function"==typeof t&&"[object Function]"===Un.call(t)}(e)&&e())&&(zn?Hn(t,i,{configurable:!0,enumerable:!1,value:s,writable:!0}):t[i]=s)},qn=function(t,i){var s=arguments.length>2?arguments[2]:{},e=On(i);Vn&&(e=Ln.call(e,g.getOwnPropertySymbols(i)));for(var n=0;n<e.length;n+=1)Wn(t,e[n],i[e[n]],s[e[n]])};qn.supportsDescriptors=!!zn;var Gn,Xn=qn,Jn=g.getOwnPropertyDescriptor?function(){return g.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new p},Qn="function"==typeof At&&"symbol"==typeof Dt,Yn=g.getPrototypeOf||function(t){return t.__proto__},Kn=void 0===x?Gn:Yn(x),Zn={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?Gn:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?Gn:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":Qn?Yn([][Dt]()):Gn,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":Gn,"$ %AsyncFunction%":undefined,"$ %AsyncFunctionPrototype%":Gn,"$ %AsyncGenerator%":Gn,"$ %AsyncGeneratorFunction%":undefined,"$ %AsyncGeneratorPrototype%":Gn,"$ %AsyncIteratorPrototype%":Gn,"$ %Atomics%":"undefined"==typeof Atomics?Gn:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?Gn:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?Gn:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":v,"$ %ErrorPrototype%":v.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?Gn:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?Gn:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?Gn:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?Gn:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":Gn,"$ %GeneratorFunction%":undefined,"$ %GeneratorPrototype%":Gn,"$ %Int8Array%":"undefined"==typeof Int8Array?Gn:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?Gn:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?Gn:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?Gn:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?Gn:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?Gn:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":j,"$ %IteratorPrototype%":Qn?Yn(Yn([][Dt]())):Gn,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?Gn:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&Qn?Yn((new Map)[Dt]()):Gn,"$ %MapPrototype%":"undefined"==typeof Map?Gn:Map.prototype,"$ %Math%":w,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":g,"$ %ObjectPrototype%":g.prototype,"$ %ObjProto_toString%":g.prototype.toString,"$ %ObjProto_valueOf%":g.prototype.valueOf,"$ %parseFloat%":_,"$ %parseInt%":k,"$ %Promise%":"undefined"==typeof Promise?Gn:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?Gn:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?Gn:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?Gn:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?Gn:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?Gn:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?Gn:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?Gn:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?Gn:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&Qn?Yn((new Set)[Dt]()):Gn,"$ %SetPrototype%":"undefined"==typeof Set?Gn:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Gn:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?Gn:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":Qn?Yn(""[Dt]()):Gn,"$ %StringPrototype%":String.prototype,"$ %Symbol%":Qn?At:Gn,"$ %SymbolPrototype%":Qn?At.prototype:Gn,"$ %SyntaxError%":m,"$ %SyntaxErrorPrototype%":m.prototype,"$ %ThrowTypeError%":Jn,"$ %TypedArray%":Kn,"$ %TypedArrayPrototype%":Kn?Kn.prototype:Gn,"$ %TypeError%":p,"$ %TypeErrorPrototype%":p.prototype,"$ %Uint8Array%":void 0===x?Gn:x,"$ %Uint8ArrayPrototype%":void 0===x?Gn:x.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Gn:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?Gn:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?Gn:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?Gn:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?Gn:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?Gn:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?Gn:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?Gn:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?Gn:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?Gn:WeakSet.prototype},tr=function(t,i){if(arguments.length>1&&"boolean"!=typeof i)throw new p('"allowMissing" argument must be a boolean');var s="$ "+t;if(!(s in Zn))throw new m("intrinsic "+t+" does not exist!");if(void 0===Zn[s]&&!i)throw new p("intrinsic "+t+" exists, but is not available. Please file an issue!");return Zn[s]},ir=An.call(Function.call,g.prototype.hasOwnProperty),sr=tr,er=sr("%TypeError%"),nr=sr("%SyntaxError%"),rr=ir,hr={"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(rr(i,e)&&!s[e])return!1;var n=rr(i,"[[Value]]"),r=rr(i,"[[Get]]")||rr(i,"[[Set]]");if(n&&r)throw new er("Property Descriptors may not be both accessor and data descriptors");return!0}},or=Number.isNaN||function(t){return t!=t},ar=Number.isNaN||function(t){return t!=t},ur=Number.isFinite||function(t){return"number"==typeof t&&!ar(t)&&t!==1/0&&t!==-1/0},cr=Function.prototype.toString,lr=/^\s*class\b/,fr=function(t){try{var i=cr.call(t);return lr.test(i)}catch(t){return!1}},dr=g.prototype.toString,vr="function"==typeof At&&"symbol"==typeof At.toStringTag,pr=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(vr)return function(t){try{return!fr(t)&&(cr.call(t),!0)}catch(t){return!1}}(t);if(fr(t))return!1;var i=dr.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},mr=g.prototype.toString,gr=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},yr=pr,br=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===mr.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(yr(t[n[e]])&&(s=t[n[e]](),gr(s)))return s;throw new p("No default value")}throw new p("invalid [[DefaultValue]] hint supplied")},wr=tr,kr=wr("%Object%"),_r=wr("%TypeError%"),jr=wr("%String%"),xr=function(t,i,s,e){var n=hr[i];if("function"!=typeof n)throw new nr("unknown record type: "+i);if(!n(t,e))throw new er(s+" must be a "+i);console.log(n(t,e),e)},Sr=or,Tr=ur,Cr=function(t){return t>=0?1:-1},Pr=function(t,i){var s=t%i;return w.floor(s>=0?s:s+i)},Mr=ir,Ar={ToPrimitive:function(t){return gr(t)?t:arguments.length>1?br(t,arguments[1]):br(t)},ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return Sr(i)?0:0!==i&&Tr(i)?Cr(i)*w.floor(w.abs(i)):i},ToInt32:function(t){return this.ToNumber(t)>>0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var i=this.ToNumber(t);if(Sr(i)||0===i||!Tr(i))return 0;var s=Cr(i)*w.floor(w.abs(i));return Pr(s,65536)},ToString:function(t){return jr(t)},ToObject:function(t){return this.CheckObjectCoercible(t),kr(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new _r(i||"Cannot call method on "+t);return t},IsCallable:pr,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:Sr(t)&&Sr(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(Mr(t,s)&&!i[s])return!1;var e=Mr(t,"[[Value]]"),n=Mr(t,"[[Get]]")||Mr(t,"[[Set]]");if(e&&n)throw new _r("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(xr(this,"Property Descriptor","Desc",t),!(!Mr(t,"[[Get]]")&&!Mr(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(xr(this,"Property Descriptor","Desc",t),!(!Mr(t,"[[Value]]")&&!Mr(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(xr(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(xr(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 _r("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new _r("ToPropertyDescriptor requires an object");var i={};if(Mr(t,"enumerable")&&(i["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),Mr(t,"configurable")&&(i["[[Configurable]]"]=this.ToBoolean(t.configurable)),Mr(t,"value")&&(i["[[Value]]"]=t.value),Mr(t,"writable")&&(i["[[Writable]]"]=this.ToBoolean(t.writable)),Mr(t,"get")){var s=t.get;if(void 0!==s&&!this.IsCallable(s))throw new p("getter must be a function");i["[[Get]]"]=s}if(Mr(t,"set")){var e=t.set;if(void 0!==e&&!this.IsCallable(e))throw new _r("setter must be a function");i["[[Set]]"]=e}if((Mr(i,"[[Get]]")||Mr(i,"[[Set]]"))&&(Mr(i,"[[Value]]")||Mr(i,"[[Writable]]")))throw new _r("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},Ir=An.call(Function.call,String.prototype.replace),Er=/^[\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]+/,Dr=/[\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]+$/,Nr=function(){var t=Ar.ToString(Ar.CheckObjectCoercible(this));return Ir(Ir(t,Er,""),Dr,"")},Fr=Nr,Br=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:Fr},$r=Xn,Rr=Br,Or=Xn,Vr=Nr,Ur=Br,Lr=function(){var t=Rr();return $r(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},Hr=An.call(Function.call,Ur());Or(Hr,{getPolyfill:Ur,implementation:Vr,shim:Lr});var zr=Hr,Wr=pr,qr=g.prototype.toString,Gr=g.prototype.hasOwnProperty,Xr=zr,Jr=function(t,i,s){if(!Wr(i))throw new p("iterator must be a function");var e;arguments.length>=3&&(e=s),"[object Array]"===qr.call(t)?function(t,i,s){for(var e=0,n=t.length;e<n;e++)Gr.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)Gr.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e)},Qr=function(){for(var t={},i=0;i<arguments.length;i++){var s=arguments[i];for(var e in s)Yr.call(s,e)&&(t[e]=s[e])}return t},Yr=g.prototype.hasOwnProperty;var Kr=fn.exports,Zr=dn,th=function(t){if(!t)return{};var i={};return Jr(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]"===g.prototype.toString.call(t)}(i[e])?i[e]=[i[e],n]:i[e].push(n)})),i},ih=Qr,sh=nh;function eh(t,i,s){var e=t;return Zr(i)?(s=i,"string"==typeof t&&(e={uri:t})):e=ih(i,{uri:t}),e.callback=s,e}function nh(t,i,s){return rh(i=eh(t,i,s))}function rh(t){if(void 0===t.callback)throw new v("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:p,url:d,rawRequest:l};function r(t){return c(f),t instanceof v||(t=new v(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,n)}function h(){if(!a){var i;c(f),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:p,headers:{},url:d,rawRequest:l},l.getAllResponseHeaders&&(r.headers=th(l.getAllResponseHeaders()))):h=new v("Internal XMLHttpRequest Error"),s(h,r,r.body)}}var o,a,l=t.xhr||null;l||(l=t.cors||t.useXDR?new nh.XDomainRequest:new nh.XMLHttpRequest);var f,d=l.url=t.uri||t.url,p=l.method=t.method||"GET",m=t.body||t.data||null,g=l.headers=t.headers||{},y=!!t.sync,b=!1;if("json"in t&&(b=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==p&&"HEAD"!==p&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),m=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(p,d,!y,t.username,t.password),y||(l.withCredentials=!!t.withCredentials),!y&&t.timeout>0&&(f=u((function(){a=!0,l.abort("timeout");var t=new v("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}),t.timeout)),l.setRequestHeader)for(o in g)g.hasOwnProperty(o)&&l.setRequestHeader(o,g[o]);else if(t.headers&&!function(t){for(var i in t)if(t.hasOwnProperty(i))return!1;return!0}(t.headers))throw new v("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(m),l}nh.XMLHttpRequest=Kr.XMLHttpRequest||function(){},nh.XDomainRequest="withCredentials"in new nh.XMLHttpRequest?nh.XMLHttpRequest:Kr.XDomainRequest,function(t,i){for(var s=0;s<t.length;s++)i(t[s])}(["get","put","post","patch","head","delete"],(function(t){nh["delete"===t?"del":t]=function(i,s,e){return(s=eh(i,s,e)).method=t.toUpperCase(),rh(s)}}));var hh=function(t,i){var s=new ts.WebVTT.Parser(ts,ts.vttjs,ts.WebVTT.StringDecoder()),e=[];s.oncue=function(t){i.addCue(t)},s.onparsingerror=function(t){e.push(t)},s.onflush=function(){i.trigger({type:"loadeddata",target:i})},s.parse(t),e.length>0&&(ts.console&&ts.console.groupCollapsed&&ts.console.groupCollapsed("Text Track parsing errors for "+i.src),e.forEach((function(t){return ds.error(t)})),ts.console&&ts.console.groupEnd&&ts.console.groupEnd()),s.flush()},oh=function(t){function i(s){var e;if(void 0===s&&(s={}),!s.tech)throw new v("A tech was not provided.");var n=De(s,{kind:on[s.kind]||"subtitles",language:s.language||s.srclang||""}),r=an[n.mode]||"disabled",h=n.default;"metadata"!==n.kind&&"chapters"!==n.kind||(r="hidden");var o=e=t.call(this,n)||this;if(o.H=n.tech,ue)for(var a in i.prototype)"constructor"!==a&&(o[a]=i.prototype[a]);o.L=[],o.W=[];var u=new nn(o.L),c=new nn(o.W),l=!1,f=Ie(o,(function(){this.activeCues,l&&(this.trigger("cuechange"),l=!1)}));return"disabled"!==r&&o.H.ready((function(){o.H.on("timeupdate",f)}),!0),g.defineProperty(o,"default",{get:function(){return h},set:function(){}}),g.defineProperty(o,"mode",{get:function(){return r},set:function(t){var i=this;an[t]&&("showing"===(r=t)&&this.H.ready((function(){i.H.on("timeupdate",f)}),!0),this.trigger("modechange"))}}),g.defineProperty(o,"cues",{get:function(){return this.q?u:null},set:function(){}}),g.defineProperty(o,"activeCues",{get:function(){if(!this.q)return null;if(0===this.cues.length)return c;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(l=!1,i.length!==this.W.length)l=!0;else for(var r=0;r<i.length;r++)-1===this.W.indexOf(i[r])&&(l=!0);return this.W=i,c.V(this.W),c},set:function(){}}),n.src?(o.src=n.src,function(t,i){var s={uri:t},e=ln(t);e&&(s.cors=e),sh(s,Ie(this,(function(t,s,e){if(t)return ds.error(t,s);if(i.q=!0,"function"!=typeof ts.WebVTT){if(i.H){var n=function(){return hh(e,i)};i.H.on("vttjsloaded",n),i.H.on("vttjserror",(function(){ds.error("vttjs failed to load, stopping trying to process "+i.src),i.H.off("vttjsloaded",n)}))}}else hh(e,i)})))}(n.src,o)):o.q=!0,o||Be(e)}Re(i,t);var s=i.prototype;return s.addCue=function(t){var i=t;if(ts.vttjs&&!(t instanceof ts.vttjs.VTTCue)){for(var s in i=new ts.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)s in i||(i[s]=t[s]);i.id=t.id,i.G=t}var e=this.H.textTracks();if(e)for(var n=0;n<e.length;n++)e[n]!==this&&e[n].removeCue(i);this.L.push(i),this.cues.V(this.L)},s.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}}},i}(un);oh.prototype.M={cuechange:"cuechange"};var ah=function(t){function i(s){var e,n;void 0===s&&(s={});var r=Be(e=t.call(this)||this);if(ue)for(var h in r=is.createElement("custom"),i.prototype)"constructor"!==h&&(r[h]=i.prototype[h]);var o=new oh(s);return r.kind=o.kind,r.src=o.src,r.srclang=o.language,r.label=o.label,r.default=o.default,g.defineProperty(r,"readyState",{get:function(){return n}}),g.defineProperty(r,"track",{get:function(){return o}}),n=0,o.addEventListener("loadeddata",(function(){n=2,r.trigger({type:"load",target:r})})),ue?r||Be(e):e}return Re(i,t),i}(Fe);ah.prototype.M={load:"load"},ah.NONE=0,ah.LOADING=1,ah.LOADED=2,ah.ERROR=3;var uh,ch=function(){function t(i){void 0===i&&(i=[]);var s=this;if(ue)for(var e in s=is.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);s.X=[],g.defineProperty(s,"length",{get:function(){return this.X.length}});for(var n=0,r=i.length;n<r;n++)s.J(i[n]);if(ue)return s}var i=t.prototype;return i.J=function(t){var i=this.X.length;""+i in this||g.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}(),lh=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=Be(n),ue))for(var r in e=is.createElement("custom"),i.prototype)"constructor"!==r&&(e[r]=i.prototype[r]);e.Z=[],g.defineProperty(e,"length",{get:function(){return this.Z.length}});for(var h=0;h<s.length;h++)e.tt(s[h]);return e||Be(n)}Re(i,t);var s=i.prototype;return s.tt=function(t){var i=this.Z.length;""+i in this||g.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}(Fe);for(uh in lh.prototype.M={change:"change",addtrack:"addtrack",removetrack:"removetrack"},lh.prototype.M)lh.prototype["on"+uh]=null;var fh=function(t){function i(s){var e,n;if(void 0===s&&(s=[]),ue){for(var r in n=is.createElement("custom"),lh.prototype)"constructor"!==r&&(n[r]=lh.prototype[r]);for(var h in i.prototype)"constructor"!==h&&(n[h]=i.prototype[h])}return(n=e=t.call(this,s,n)||this)||Be(e)}return Re(i,t),i.prototype.tt=function(i){t.prototype.tt.call(this,i),i.addEventListener("modechange",Ie(this,(function(){this.trigger("change")})))},i}(lh),dh=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].selected=!1)},vh=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){dh(s,s[r]);break}if(ue){for(var h in n=is.createElement("custom"),lh.prototype)"constructor"!==h&&(n[h]=lh.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,g.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n||Be(e)}Re(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.selected&&dh(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("selectedchange",(function(){s.st||(s.st=!0,dh(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}(lh),ph=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].enabled=!1)},mh=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){ph(s,s[r]);break}if(ue){for(var h in n=is.createElement("custom"),lh.prototype)"constructor"!==h&&(n[h]=lh.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||Be(e)}Re(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.enabled&&ph(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",(function(){s.st||(s.st=!0,ph(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}(lh),gh=void 0;var yh=function(t){function i(i,s){var e;return void 0===i&&(i={}),void 0===s&&(s=function(){}),i.reportTouchActivity=!1,(e=t.call(this,null,i,s)||this).et=!1,e.on("playing",(function(){this.et=!0})),e.on("loadstart",(function(){this.et=!1})),e.nt=i.textTracks,e.rt=i.videoTracks,e.ht=i.audioTracks,e.featuresProgressEvents||e.manualProgressOn(),e.featuresTimeupdateEvents||e.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(t){!1===i["native"+t+"Tracks"]&&(e["featuresNative"+t+"Tracks"]=!1)})),!1===i.nativeCaptions&&(e.featuresNativeTextTracks=!1),e.featuresNativeTextTracks||e.emulateTextTracks(),e.ot=new fh,e.initTextTrackListeners(),e.initTrackListeners(),i.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.l=e.constructor.name||"Unknown Tech"),e}Re(i,t);var s=i.prototype;return s.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},s.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},s.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Ie(this,(function(){var t=this.bufferedPercent();this.ut!==t&&this.trigger("progress"),this.ut=t,1===t&&this.stopTrackingProgress()})),500)},s.onDurationChange=function(t){this.ct=this.duration()},s.buffered=function(){return Ue(0,0)},s.bufferedPercent=function(){return Le(this.buffered(),this.ct)},s.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},s.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},s.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},s.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},s.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.dispose=function(){this.clearTracks(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},s.clearTracks=function(t){var i=this;(t=[].concat(t)).forEach((function(t){for(var s=i[t+"Tracks"]()||[],e=s.length;e--;){var n=s[e];"text"===t&&i.removeRemoteTextTrack(n),s.it(n)}}))},s.cleanupAutoTextTracks=function(){for(var t=this.ot||[],i=t.length;i--;){var s=t[i];this.removeRemoteTextTrack(s)}},s.reset=function(){},s.error=function(t){return void 0!==t&&(this.lt=new Qe(t),this.trigger("error")),this.lt},s.played=function(){return this.et?Ue(0,0):Ue()},s.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.initTextTrackListeners=function(){var t=Ie(this,(function(){this.trigger("texttrackchange")})),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",Ie(this,(function(){i.removeEventListener("removetrack",t),i.removeEventListener("addtrack",t)}))))},s.initTrackListeners=function(){var t=this;["video","audio"].forEach((function(i){var s=function(){t.trigger(i+"trackchange")},e=t[i+"Tracks"]();e.addEventListener("removetrack",s),e.addEventListener("addtrack",s),t.on("dispose",(function(){e.removeEventListener("removetrack",s),e.removeEventListener("addtrack",s)}))}))},s.ft=function(){var t=this;if(!ts.WebVTT)if(is.body.contains(this.el())){if(!this.h["vtt.js"]&&ls(gh)&&g.keys(gh).length>0)return void this.trigger("vttjsloaded");var i=is.createElement("script");i.src=this.h["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",i.onload=function(){t.trigger("vttjsloaded")},i.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){i.onload=null,i.onerror=null})),ts.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.ft)},s.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.ft();var r=function(){return t.trigger("texttrackchange")},h=function(){r();for(var t=0;t<i.length;t++){var s=i[t];s.removeEventListener("cuechange",r),"showing"===s.mode&&s.addEventListener("cuechange",r)}};h(),i.addEventListener("change",h),i.addEventListener("addtrack",h),i.addEventListener("removetrack",h),this.on("dispose",(function(){s.off("addtrack",e),s.off("removetrack",n),i.removeEventListener("change",h),i.removeEventListener("addtrack",h),i.removeEventListener("removetrack",h);for(var t=0;t<i.length;t++){i[t].removeEventListener("cuechange",r)}}))}},s.videoTracks=function(){return this.rt=this.rt||new vh,this.rt},s.audioTracks=function(){return this.ht=this.ht||new mh,this.ht},s.textTracks=function(){return this.nt=this.nt||new fh,this.nt},s.remoteTextTracks=function(){return this.dt=this.dt||new fh,this.dt},s.remoteTextTrackEls=function(){return this.vt=this.vt||new ch,this.vt},s.addTextTrack=function(t,i,s){if(!t)throw new v("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 oh(n);return r.tt(h),h}(this,t,i,s)},s.createRemoteTextTrack=function(t){var i=De(t,{tech:this});return new ah(i)},s.addRemoteTextTrack=function(t,i){void 0===t&&(t={});var s=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(ds.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},s.removeRemoteTextTrack=function(t){var i=this.remoteTextTrackEls().Y(t);this.remoteTextTrackEls().K(i),this.remoteTextTracks().it(t),this.ot.it(t)},s.getVideoPlaybackQuality=function(){return{}},s.setPoster=function(){},s.playsinline=function(){},s.setPlaysinline=function(){},s.canPlayType=function(){return""},i.isTech=function(t){return t.prototype instanceof i||t instanceof i||t===i},i.registerTech=function(t,s){if(i.gt||(i.gt={}),!i.isTech(s))throw new v("Tech "+t+" must be a Tech");return i.gt[t]=s,s},i.getTech=function(t){return i.gt&&i.gt[t]?i.gt[t]:ts&&ts.videojs&&ts.videojs[t]?(ds.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),ts.videojs[t]):void 0},i}(Ne);yh.prototype.nt,yh.prototype.ht,yh.prototype.rt,yh.prototype.featuresVolumeControl=!0,yh.prototype.featuresFullscreenResize=!1,yh.prototype.featuresPlaybackRate=!1,yh.prototype.featuresProgressEvents=!1,yh.prototype.featuresTimeupdateEvents=!1,yh.prototype.featuresNativeTextTracks=!1,yh.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:ds.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.wt),this.off(this.v,"loadstart",t.prototype.kt),this.one(this.v,"loadstart",t.prototype.wt)),this.yt=s.handleSource(i,this,this.h),this.on("dispose",this.disposeSourceHandler),this},t.prototype.wt=function(){this.one(this.v,"loadstart",t.prototype.kt)},t.prototype.kt=function(){this.disposeSourceHandler(),this.one(this.v,"loadstart",t.prototype.kt)},t.prototype.disposeSourceHandler=function(){this.bt&&(this.clearTracks(["audio","video"]),this.bt=null),this.cleanupAutoTextTracks(),this.yt&&(this.off(this.v,"loadstart",t.prototype.wt),this.off(this.v,"loadstart",t.prototype.kt),this.yt.dispose&&this.yt.dispose(),this.yt=null)}},Ne.registerComponent("Tech",yh),Ne.registerComponent("MediaTechController",yh),yh.registerTech("Tech",yh);var bh=function(t){function i(i,s,e){var n;if(n=t.call(this,i,s,e)||this,s.playerOptions.sources&&0!==s.playerOptions.sources.length)i.src(s.playerOptions.sources);else for(var r=0,h=s.playerOptions.techOrder;r<h.length;r++){var o=Ee(h[r]),a=yh.getTech(o);if(o||(a=Ne.getComponent(o)),a&&a.isSupported()){i._t(o);break}}return n}return Re(i,t),i}(Ne);Ne.registerComponent("MediaLoader",bh);var wh=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}Re(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=us({className:this.buildCSSClass(),tabIndex:0},s),"button"===i&&ds.error("Creating a ClickableComponent with an HTML element of "+i+" is not supported; use a Button instead."),e=us({role:"button","aria-live":"polite"},e),this.jt=s.tabIndex;var n=t.prototype.createEl.call(this,i,s,e);return this.createControlTextEl(n),n},s.createControlTextEl=function(t){return this.xt=js("span",{className:"vjs-control-text"}),t&&t.appendChild(this.xt),this.controlText(this.St,t),this.xt},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.xt.innerHTML=s,this.nonIconControl||i.setAttribute("title",s),this},s.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},s.enable=function(){return this.removeClass("vjs-disabled"),this.v.setAttribute("aria-disabled","false"),void 0!==this.jt&&this.v.setAttribute("tabIndex",this.jt),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.jt&&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){ke(is,"keydown",Ie(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){_e(is,"keydown",Ie(this,this.handleKeyPress))},i}(Ne);Ne.registerComponent("ClickableComponent",wh);var kh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).update(),i.on("posterchange",Ie(Be(e),e.update)),e}Re(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=js("div",{className:"vjs-poster",tabIndex:-1});return ve||(this.Tt=js("img"),t.appendChild(this.Tt)),t},s.update=function(t){var i=this.player().poster();this.setSrc(i),i?this.show():this.hide()},s.setSrc=function(t){if(this.Tt)this.Tt.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}(wh);Ne.registerComponent("PosterImage",kh);var _h="#222",jh={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 xh(t,i){return"rgba("+k(t[1]+t[1],16)+","+k(t[2]+t[2],16)+","+k(t[3]+t[3],16)+","+i+")"}function Sh(t,i,s){try{t.style[i]=s}catch(t){return}}var Th=function(t){function i(i,s,e){var n;return n=t.call(this,i,s,e)||this,i.on("loadstart",Ie(Be(n),n.toggleDisplay)),i.on("texttrackchange",Ie(Be(n),n.updateDisplay)),i.ready(Ie(Be(n),(function(){if(i.H&&i.H.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",Ie(this,this.updateDisplay));for(var t=this.h.playerOptions.tracks||[],s=0;s<t.length;s++)this.t.addRemoteTextTrack(t[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}Re(i,t);var s=i.prototype;return s.toggleDisplay=function(){this.t.H&&this.t.H.featuresNativeTextTracks?this.hide():this.show()},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},s.clearDisplay=function(){"function"==typeof ts.WebVTT&&ts.WebVTT.processCues(ts,[],this.v)},s.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))}},s.updateForTrack=function(t){if("function"==typeof ts.WebVTT&&t.activeCues){for(var i=this.t.textTrackSettings.getValues(),s=[],e=0;e<t.activeCues.length;e++)s.push(t.activeCues[e]);ts.WebVTT.processCues(ts,s,this.v);for(var n=s.length;n--;){var r=s[n];if(r){var h=r.displayState;if(i.color&&(h.firstChild.style.color=i.color),i.textOpacity&&Sh(h.firstChild,"color",xh(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(h.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&Sh(h.firstChild,"backgroundColor",xh(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?Sh(h,"backgroundColor",xh(i.windowColor,i.windowOpacity)):h.style.backgroundColor=i.windowColor),i.edgeStyle&&("dropshadow"===i.edgeStyle?h.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+_h:"raised"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+_h:"depressed"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+_h:"uniform"===i.edgeStyle&&(h.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+_h)),i.fontPercent&&1!==i.fontPercent){var o=ts.parseFloat(h.style.fontSize);h.style.fontSize=o*i.fontPercent+"px",h.style.height="auto",h.style.top="auto",h.style.bottom="2px"}i.fontFamily&&"default"!==i.fontFamily&&("small-caps"===i.fontFamily?h.firstChild.style.fontVariant="small-caps":h.firstChild.style.fontFamily=jh[i.fontFamily])}}}},i}(Ne);Ne.registerComponent("TextTrackDisplay",Th);var Ch=function(t){function i(){return t.apply(this,arguments)||this}return Re(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},i}(Ne);Ne.registerComponent("LoadingSpinner",Ch);var Ph=function(t){function i(){return t.apply(this,arguments)||this}Re(i,t);var s=i.prototype;return s.createEl=function(t,i,s){void 0===t&&(t="button"),void 0===i&&(i={}),void 0===s&&(s={}),i=us({className:this.buildCSSClass()},i),"button"!==t&&(ds.warn("Creating a Button with an HTML element of "+t+" is deprecated; use ClickableComponent instead."),i=us({tabIndex:0},i),s=us({role:"button"},s)),s=us({type:"button","aria-live":"polite"},s);var e=Ne.prototype.createEl.call(this,t,i,s);return this.createControlTextEl(e),e},s.addChild=function(t,i){void 0===i&&(i={});var s=this.constructor.name;return ds.warn("Adding an actionable (user controllable) child to a Button ("+s+") is not supported; use a ClickableComponent instead."),Ne.prototype.addChild.call(this,t,i)},s.enable=function(){t.prototype.enable.call(this),this.v.removeAttribute("disabled")},s.disable=function(){t.prototype.disable.call(this),this.v.setAttribute("disabled","disabled")},s.handleKeyPress=function(i){32!==i.which&&13!==i.which&&t.prototype.handleKeyPress.call(this,i)},i}(wh);Ne.registerComponent("Button",Ph);var Mh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Ct=!1,e.on("mousedown",e.handleMouseDown),e}Re(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-big-play-button"},s.handleClick=function(t){var i=this;if(this.Ct&&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.Ct=!1,t.prototype.handleKeyPress.call(this,i)},s.handleMouseDown=function(t){this.Ct=!0},i}(Ph);Mh.prototype.St="Play Video",Ne.registerComponent("BigPlayButton",Mh);var Ah=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).controlText(s&&s.controlText||"Close"),e}Re(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}(Ph);Ne.registerComponent("CloseButton",Ah);var Ih=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}Re(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}(Ph);function Eh(t,i){void 0===i&&(i=t),t=t<0?0:t;var s=w.floor(t%60),e=w.floor(t/60%60),n=w.floor(t/3600),r=w.floor(i/60%60),h=w.floor(i/3600);return(j(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)}Ih.prototype.St="Play",Ne.registerComponent("PlayToggle",Ih);var Dh=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}Re(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=js("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=Eh(i,this.t.duration());e!==this.Pt&&(this.Pt=e,this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e)},i}(Ne);Ne.registerComponent("CurrentTimeDisplay",Dh);var Nh=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}Re(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=js("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=Eh(i);this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e}},i}(Ne);Ne.registerComponent("DurationDisplay",Nh);var Fh=function(t){function i(){return t.apply(this,arguments)||this}return Re(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}(Ne);Ne.registerComponent("TimeDivider",Fh);var Bh=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}Re(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=js("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=Eh(this.t.remainingTime());s!==this.Pt&&(this.Pt=s,this.S.innerHTML='<span class="vjs-control-text">'+i+"</span> -"+s)}},i}(Ne);Ne.registerComponent("RemainingTimeDisplay",Bh);var $h=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}Re(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=js("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.xt=js("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.Mt=is.createTextNode(this.localize("LIVE")),this.S.appendChild(this.xt),this.S.appendChild(this.Mt),i.appendChild(this.S),i},s.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},s.handleLanguagechange=function(){this.xt.innerHTML=this.localize("Stream Type"),this.Mt.innerHTML=this.localize("LIVE")},i}(Ne);Ne.registerComponent("LiveDisplay",$h);var Rh=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}Re(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=us({tabIndex:0},s),e=us({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(),is.body.focus(),is.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;is.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=Vs(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.At||!1:(this.At=!!t,this.At?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(Ne);function Oh(t,i){if(!t||!i)return"";if("function"==typeof ts.getComputedStyle){var s=ts.getComputedStyle(t);return s?s[i]:""}return t.currentStyle[i]||""}Ne.registerComponent("Slider",Rh);var Vh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).It=[],e.on(i,"progress",e.update),e.on(i,"languagechange",e.handleLanguagechange),e}Re(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});return this.Et=js("span",{innerHTML:this.localize("Loaded")}),this.Dt=is.createTextNode(": 0%"),this.xt=js("span",{className:"vjs-control-text"}),this.xt.appendChild(this.Et),this.xt.appendChild(this.Dt),i.appendChild(this.xt),i},s.update=function(t){var i=this.t.buffered(),s=this.t.duration(),e=this.t.bufferedEnd(),n=this.It,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(js()),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.Et.innerHTML=this.localize("Loaded")},i}(Ne);Ne.registerComponent("LoadProgressBar",Vh);var Uh=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(Ie(Be(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}Re(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"});return this.Nt=js("span",{innerHTML:this.localize("Progress")}),this.Ft=is.createTextNode(": 0%"),this.xt=js("span",{className:"vjs-control-text"}),this.xt.appendChild(this.Nt),this.xt.appendChild(this.Ft),i.appendChild(this.xt),i},s.updateDataAttr=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();this.v.setAttribute("data-current-time",Eh(i,this.t.duration()))},s.handleLanguagechange=function(){this.Nt.innerHTML=this.localize("Progress")},i}(Ne);Ne.registerComponent("PlayProgressBar",Uh);var Lh=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(Ie(Be(e),e.updateDataAttr)),e}Re(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=js("div",{className:"vjs-time-tooltip"}),this.Nt=js("span",{innerHTML:this.localize("Progress")}),this.Ft=is.createTextNode(": 0%"),this.xt=js("span",{className:"vjs-control-text"}),this.xt.appendChild(this.Nt),this.xt.appendChild(this.Ft),i.appendChild(this.tooltip),i.appendChild(this.xt),i},s.updateDataAttr=function(t){var i=Eh(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.Nt.innerHTML=this.localize("Progress")},i}(Ne);Ne.registerComponent("TooltipProgressBar",Lh);var Hh=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(Ie(Be(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}Re(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=_(Oh(this.player().el(),"width")),s=_(Oh(this.tooltipProgressBar.tooltip,"width")),e=this.tooltipProgressBar.el().style;e.maxWidth=w.floor(i-s/2)+"px",e.minWidth=w.ceil(s/2)+"px",e.right="-"+s/2+"px"}},s.updateAriaAttributes=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();t.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),t.setAttribute("aria-valuetext",Eh(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}(Rh);Hh.prototype.h={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},Hh.prototype.playerEvent="timeupdate",Ne.registerComponent("SeekBar",Hh);var zh=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=js("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)}}(Ie(Be(e),e.handleMouseMove),25))})),e}Re(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-Os(this.el().parentNode).left;this.update(s,e)},s.update=function(t,i){var s=Eh(t,this.t.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",s),this.keepTooltipsInside){var e=i-this.Bt(i)+1,n=_(Oh(this.tooltip,"width"))/2;this.tooltip.innerHTML=s,this.tooltip.style.right="-"+(n-e)+"px"}},s.calculateDistance=function(t){return Vs(this.el().parentNode,t).x},s.Bt=function(t){if(!this.keepTooltipsInside)return t;var i=_(Oh(this.player().el(),"width")),s=_(Oh(this.tooltip,"width"))/2,e=t;return t<s?e=w.ceil(s):t>i-s&&(e=w.floor(i-s)),e},i}(Ne);Ne.registerComponent("MouseTimeDisplay",zh);var Wh=function(t){function i(){return t.apply(this,arguments)||this}return Re(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(Ne);Wh.prototype.h={children:["seekBar"]},Ne.registerComponent("ProgressControl",Wh);var qh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"fullscreenchange",e.handleFullscreenChange),e}Re(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}(Ph);qh.prototype.St="Fullscreen",Ne.registerComponent("FullscreenToggle",qh);var Gh=function(t){function i(){return t.apply(this,arguments)||this}return Re(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}(Ne);Ne.registerComponent("VolumeLevel",Gh);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(Ie(Be(e),e.updateARIAAttributes)),e}Re(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}(Rh);Xh.prototype.h={children:["volumeLevel"],barName:"volumeLevel"},Xh.prototype.playerEvent="volumechange",Ne.registerComponent("VolumeBar",Xh);var Jh=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 Re(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(Ne);Jh.prototype.h={children:["volumeBar"]},Ne.registerComponent("VolumeControl",Jh);var Qh=function(t){function i(){return t.apply(this,arguments)||this}Re(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",Ie(this,(function(){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=js(i,{className:"vjs-menu-content"});var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.appendChild(this.S),ke(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},i}(Ne);Ne.registerComponent("Popup",Qh);var Yh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e}Re(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}(wh);Ne.registerComponent("PopupButton",Yh);var Kh=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}Re(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++)Ds(this.v,"vjs-vol-"+n);Es(this.v,"vjs-vol-"+s)},i}(Ph);Kh.prototype.St="Mute",Ne.registerComponent("MuteToggle",Kh);var Zh=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(Be(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}Re(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 Qh(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){Kh.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},s.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],Ie(this,this.handleMouseDown))},s.handleMouseDown=function(t){this.on(["mousemove","touchmove"],Ie(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.v.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},s.handleMouseUp=function(t){this.off(["mousemove","touchmove"],Ie(this.volumeBar,this.volumeBar.handleMouseMove))},i}(Yh);Zh.prototype.volumeUpdate=Kh.prototype.update,Zh.prototype.St="Mute",Ne.registerComponent("VolumeMenuButton",Zh);var to=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).$t=-1,e.on("keydown",e.handleKeyPress),e}Re(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",Ie(this,(function(t){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=js(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),ke(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}(Ne);Ne.registerComponent("Menu",to);var io=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}Re(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 to(this.t);if(this.Vt=0,this.h.title){var i=js("li",{className:"vjs-menu-title",innerHTML:Ee(this.h.title),tabIndex:-1});this.Vt+=1,t.m.unshift(i),Ss(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",Ie(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}(wh);Ne.registerComponent("MenuButton",io);var so=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 Be(e);var r=Ie(Be(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 Re(i,t),i}(io);Ne.registerComponent("TrackButton",so);var eo=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}Re(i,t);var s=i.prototype;return s.createEl=function(i,s,e){this.nonIconControl=!0;var n=t.prototype.createEl.call(this,"li",us({className:"vjs-menu-item",tabIndex:-1},s),e);return this.Ut=is.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}(wh);Ne.registerComponent("MenuItem",eo);var no=function(t){function i(i,s){var e,n,r=s.track,h=i.textTracks();if(s.label=r.label||r.language||"Unknown",s.selected=r.default||"showing"===r.mode,(e=t.call(this,i,s)||this).track=r,h){var o=Ie(Be(e),e.handleTracksChange);i.on(["loadstart","texttrackchange"],o),h.addEventListener("change",o),e.on("dispose",(function(){h.removeEventListener("change",o)}))}h&&void 0===h.onchange&&e.on(["tap","click"],(function(){if("object"!=typeof ts.Event)try{n=new ts.Event("change")}catch(t){}n||(n=is.createEvent("Event")).initEvent("change",!0,!0),h.dispatchEvent(n)}));return e}Re(i,t);var s=i.prototype;return s.handleClick=function(i){var s=this.track.kind,e=this.t.textTracks();if(t.prototype.handleClick.call(this,i),e)for(var n=0;n<e.length;n++){var r=e[n];r.kind===s&&(r===this.track?"showing"!==r.mode&&(r.mode="showing"):"disabled"!==r.mode&&(r.mode="disabled"))}},s.handleTracksChange=function(t){this.selected("showing"===this.track.mode)},i}(eo);Ne.registerComponent("TextTrackMenuItem",no);var ro=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 Re(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}(no);Ne.registerComponent("OffTextTrackMenuItem",ro);var ho=function(t){function i(i,s){return void 0===s&&(s={}),s.tracks=i.textTracks(),t.call(this,i,s)||this}return Re(i,t),i.prototype.createItems=function(t){void 0===t&&(t=[]),t.push(new ro(this.t,{kind:this.Lt})),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.Lt&&t.push(new no(this.t,{track:e,selectable:!0}))}return t},i}(so);Ne.registerComponent("TextTrackButton",ho);var oo=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",Ie(Be(e),e.update)),e}Re(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}(eo);Ne.registerComponent("ChaptersTrackMenuItem",oo);var ao=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}Re(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},s.update=function(i){this.Ht&&(!i||"addtrack"!==i.type&&"removetrack"!==i.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},s.setTrack=function(t){if(this.Ht!==t){if(this.zt||(this.zt=this.update.bind(this)),this.Ht){var i=this.t.remoteTextTrackEls().Y(this.Ht);i&&i.removeEventListener("load",this.zt),this.Ht=null}if(this.Ht=t,this.Ht){this.Ht.mode="hidden";var s=this.t.remoteTextTrackEls().Y(this.Ht);s&&s.addEventListener("load",this.zt)}}},s.findChaptersTrack=function(){for(var t=this.t.textTracks()||[],i=t.length-1;i>=0;i--){var s=t[i];if(s.kind===this.Lt)return s}},s.getMenuCaption=function(){return this.Ht&&this.Ht.label?this.Ht.label:this.localize(Ee(this.Lt))},s.createMenu=function(){return this.h.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},s.createItems=function(){var t=[];if(!this.Ht)return t;var i=this.Ht.cues;if(!i)return t;for(var s=0,e=i.length;s<e;s++){var n=i[s],r=new oo(this.t,{track:this.Ht,cue:n});t.push(r)}return t},i}(ho);ao.prototype.Lt="chapters",ao.prototype.St="Chapters",Ne.registerComponent("ChaptersButton",ao);var uo=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=Ie(Be(n),n.handleTracksChange);r.addEventListener("change",h),n.on("dispose",(function(){r.removeEventListener("change",h)}))}return n}Re(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.Lt&&"showing"===r.mode){s=!0;break}}s?this.disable():this.enable()},s.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},i}(ho);uo.prototype.Lt="descriptions",uo.prototype.St="Descriptions",Ne.registerComponent("DescriptionsButton",uo);var co=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 Re(i,t),i.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},i}(ho);co.prototype.Lt="subtitles",co.prototype.St="Subtitles",Ne.registerComponent("SubtitlesButton",co);var lo=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 Re(i,t),i.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").v.focus()},i}(no);Ne.registerComponent("CaptionSettingsMenuItem",lo);var fo=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}Re(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 lo(this.t,{kind:this.Lt})),this.Vt+=1),t.prototype.createItems.call(this,i)},i}(ho);fo.prototype.Lt="captions",fo.prototype.St="Captions",Ne.registerComponent("CaptionsButton",fo);var vo=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=Ie(Be(e),e.handleTracksChange);r.addEventListener("change",h),e.on("dispose",(function(){r.removeEventListener("change",h)}))}return e}Re(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}(eo);Ne.registerComponent("AudioTrackMenuItem",vo);var po=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}Re(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 vo(this.t,{track:e,selectable:!0}))}return t},i}(so);po.prototype.St="Audio Track",Ne.registerComponent("AudioTrackButton",po);var mo=function(t){function i(i,s){var e,n=s.rate,r=_(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}Re(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}(eo);mo.prototype.contentElType="button",Ne.registerComponent("PlaybackRateMenuItem",mo);var go=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}Re(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this);return this.Ut=js("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 to(this.player()),i=this.playbackRates();if(i)for(var s=i.length-1;s>=0;s--)t.addChild(new mo(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}(io);go.prototype.St="Playback Rate",Ne.registerComponent("PlaybackRateMenuButton",go);var yo=function(t){function i(){return t.apply(this,arguments)||this}Re(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}(Ne);Ne.registerComponent("Spacer",yo);var bo=function(t){function i(){return t.apply(this,arguments)||this}Re(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=" ",i},i}(yo);Ne.registerComponent("CustomControlSpacer",bo);var wo=function(t){function i(){return t.apply(this,arguments)||this}return Re(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(Ne);wo.prototype.h={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},Ne.registerComponent("ControlBar",wo);var ko=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"error",e.open),e}Re(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}(en);ko.prototype.h=De(en.prototype.h,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Ne.registerComponent("ErrorDisplay",ko);var _o="vjs-text-track-settings",jo=["#000","Black"],xo=["#00F","Blue"],So=["#0FF","Cyan"],To=["#0F0","Green"],Co=["#F0F","Magenta"],Po=["#F00","Red"],Mo=["#FFF","White"],Ao=["#FF0","Yellow"],Io=["1","Opaque"],Eo=["0.5","Semi-Transparent"],Do=["0","Transparent"],No={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[jo,Mo,Po,To,xo,Ao,Co,So]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Io,Eo,Do]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Mo,jo,Po,To,xo,Ao,Co,So]},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:[Io,Eo]},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:[Do,Eo,Io]}};function Fo(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}No.windowColor.options=No.backgroundColor.options;var Bo,$o=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).setDefaults(),e.hide(),e.updateDisplay=Ie(Be(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()})),as(No,(function(t){e.on(e.$(t.selector),"change",e.updateDisplay)})),e.h.persistTextTrackSettings&&e.restoreSettings(),e}Re(i,t);var s=i.prototype;return s.Wt=function(t){var i=this,s=No[t],e=s.id.replace("%s",this.o);return[js("label",{className:"vjs-label",textContent:s.label},{for:e}),js("select",{id:e},void 0,s.options.map((function(t){return js("option",{textContent:i.localize(t[1]),value:t[0]})})))]},s.qt=function(){var t=js("legend",{textContent:this.localize("Text")}),i=this.Wt("color"),s=js("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.Wt("textOpacity"));return js("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Gt=function(){var t=js("legend",{textContent:this.localize("Background")}),i=this.Wt("backgroundColor"),s=js("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.Wt("backgroundOpacity"));return js("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Xt=function(){var t=js("legend",{textContent:this.localize("Window")}),i=this.Wt("windowColor"),s=js("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.Wt("windowOpacity"));return js("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Jt=function(){return js("div",{className:"vjs-tracksettings-colors"},void 0,[this.qt(),this.Gt(),this.Xt()])},s.Qt=function(){var t=js("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.Wt("fontPercent")),i=js("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.Wt("edgeStyle")),s=js("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.Wt("fontFamily"));return js("div",{className:"vjs-tracksettings-font"},void 0,[t,i,s])},s.Yt=function(){var t=js("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=js("button",{className:"vjs-done-button",textContent:"Done"});return js("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},s.createEl=function(){var t=js("div",{className:"vjs-tracksettings"},void 0,[this.Jt(),this.Qt(),this.Yt()]),i=js("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.o,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),s=js("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.o,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),e=js("div",void 0,{role:"document"},[i,s,t]);return js("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":i.id,"aria-describedby":s.id},e)},s.getValues=function(){var t=this;return function(t,i,s){return void 0===s&&(s=0),os(t).reduce((function(s,e){return i(s,t[e],e)}),s)}(No,(function(i,s,e){var n=function(t,i){return Fo(t.options[t.options.selectedIndex].value,i)}(t.$(s.selector),s.parser);return void 0!==n&&(i[e]=n),i}),{})},s.setValues=function(t){var i=this;as(No,(function(s,e){!function(t,i,s){if(i)for(var e=0;e<t.options.length;e++)if(Fo(t.options[e].value,s)===i){t.selectedIndex=e;break}}(i.$(s.selector),t[e],s.parser)}))},s.setDefaults=function(){var t=this;as(No,(function(i){var s=i.hasOwnProperty("default")?i.default:0;t.$(i.selector).selectedIndex=s}))},s.restoreSettings=function(){var t;try{t=JSON.parse(ts.localStorage.getItem(_o))}catch(t){ds.warn(t)}t&&this.setValues(t)},s.saveSettings=function(){if(this.h.persistTextTrackSettings){var t=this.getValues();try{g.keys(t).length?ts.localStorage.setItem(_o,JSON.stringify(t)):ts.localStorage.removeItem(_o)}catch(t){ds.warn(t)}}},s.updateDisplay=function(){var t=this.t.getChild("textTrackDisplay");t&&t.updateDisplay()},i}(Ne);Ne.registerComponent("TextTrackSettings",$o);var Ro,e=function(t){function i(i,s){var e;e=t.call(this,i,s)||this;var n=i.source,r=!1;if(n&&(e.v.currentSrc!==n.src||i.tag&&3===i.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")||!ln(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=Ee(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&&ds.warn(gs(Bo||(Bo=ss(["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=Ie(Be(e),e.handleTextTrackChange),e.hi=Ie(Be(e),e.handleTextTrackAdd),e.oi=Ie(Be(e),e.handleTextTrackRemove),e.ai()),e.ci(),(de||Ys||ne)&&!0===i.nativeControlsForTouch&&e.setControls(!0),e.fi(),e.triggerReady(),e}Re(i,t);var s=i.prototype;return s.dispose=function(){var s=this;["audio","video","text"].forEach((function(t){var i=Ee(t),e=s.v[t+"Tracks"];e&&e.removeEventListener&&(e.removeEventListener("change",s["handle"+i+"ti"]),e.removeEventListener("addtrack",s["handle"+i+"ii"]),e.removeEventListener("removetrack",s["handle"+i+"si"])),e&&s.off("loadstart",s["removeOld"+i+"ei"])})),i.disposeMediaElement(this.v),t.prototype.dispose.call(this)},s.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)}))},s.createEl=function(){var t=this.h.tag;if(!t||!this.h.playerElIngest&&!this.movingMediaElementInDOM){if(t){var s=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(s,t),i.disposeMediaElement(t),t=s}else{t=is.createElement("video");var e=De({},this.h.tag&&Bs(this.h.tag));de&&!0===this.h.nativeControlsForTouch||delete e.controls,Fs(t,us(e,{id:this.h.techId,class:"vjs-tech"}))}t.playerId=this.h.playerId}void 0!==this.h.preload&&$s(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?$s(t,h,h):Rs(t,h),t[h]=o)}return t},s.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)}))}},s.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.di)}},s.handleTextTrackChange=function(t){var i=this.textTracks();this.textTracks().trigger({type:"change",target:i,currentTarget:i,srcElement:i})},s.handleTextTrackAdd=function(t){this.textTracks().tt(t.track)},s.handleTextTrackRemove=function(t){this.textTracks().it(t.track)},s.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)}}},s.di=function(t){var i=this.textTracks(),s=this.el().textTracks;this.ni(i,s)},s.play=function(){var t=this.v.play();void 0!==t&&"function"==typeof t.then&&t.then(null,(function(t){}))},s.setCurrentTime=function(t){try{this.v.currentTime=t}catch(t){ds(t,"Video is not ready. (Video.js)")}},s.duration=function(){var t=this;if(this.v.duration===1/0&&ie&&oe&&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},s.width=function(){return this.v.offsetWidth},s.height=function(){return this.v.offsetHeight},s.fi=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)}))}},s.supportsFullScreen=function(){if("function"==typeof this.v.webkitEnterFullScreen){var t=ts.navigator&&ts.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},s.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()},s.exitFullScreen=function(){this.v.webkitExitFullScreen()},s.src=function(t){if(void 0===t)return this.v.src;this.setSrc(t)},s.reset=function(){i.resetMediaElement(this.v)},s.currentSrc=function(){return this.bt?this.bt.src:this.v.currentSrc},s.setControls=function(t){this.v.controls=!!t},s.addTextTrack=function(i,s,e){return this.featuresNativeTextTracks?this.v.addTextTrack(i,s,e):t.prototype.addTextTrack.call(this,i,s,e)},s.createRemoteTextTrack=function(i){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,i);var s=is.createElement("track");return i.kind&&(s.kind=i.kind),i.label&&(s.label=i.label),(i.language||i.srclang)&&(s.srclang=i.language||i.srclang),i.default&&(s.default=i.default),i.id&&(s.id=i.id),i.src&&(s.src=i.src),s},s.addRemoteTextTrack=function(i,s){var e=t.prototype.addRemoteTextTrack.call(this,i,s);return this.featuresNativeTextTracks&&this.el().appendChild(e),e},s.removeRemoteTextTrack=function(i){if(t.prototype.removeRemoteTextTrack.call(this,i),this.featuresNativeTextTracks)for(var s=this.$$("track"),e=s.length;e--;)i!==s[e]&&i!==s[e].track||this.el().removeChild(s[e])},s.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),ts.performance&&"function"==typeof ts.performance.now?t.creationTime=ts.performance.now():ts.performance&&ts.performance.timing&&"number"==typeof ts.performance.timing.navigationStart&&(t.creationTime=ts.Date.now()-ts.performance.timing.navigationStart),t},i}(yh);ws()&&(e.TEST_VID=is.createElement("video"),(Ro=is.createElement("track")).kind="captions",Ro.srclang="en",Ro.label="English",e.TEST_VID.appendChild(Ro)),e.isSupported=function(){try{e.TEST_VID.volume=.5}catch(t){return!1}return!(!e.TEST_VID||!e.TEST_VID.canPlayType)},e.canControlVolume=function(){try{var t=e.TEST_VID.volume;return e.TEST_VID.volume=t/2+.1,t!==e.TEST_VID.volume}catch(t){return!1}},e.canControlPlaybackRate=function(){if(ie&&oe&&ae<58)return!1;try{var t=e.TEST_VID.playbackRate;return e.TEST_VID.playbackRate=t/2+.1,t!==e.TEST_VID.playbackRate}catch(t){return!1}},e.supportsNativeTextTracks=function(){return fe},e.supportsNativeVideoTracks=function(){return!(!e.TEST_VID||!e.TEST_VID.videoTracks)},e.supportsNativeAudioTracks=function(){return!(!e.TEST_VID||!e.TEST_VID.audioTracks)},e.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],e.prototype.featuresVolumeControl=e.canControlVolume(),e.prototype.featuresPlaybackRate=e.canControlPlaybackRate(),e.prototype.movingMediaElementInDOM=!Zs,e.prototype.featuresFullscreenResize=!0,e.prototype.featuresProgressEvents=!0,e.prototype.featuresTimeupdateEvents=!0,e.prototype.featuresNativeTextTracks=e.supportsNativeTextTracks(),e.prototype.featuresNativeVideoTracks=e.supportsNativeVideoTracks(),e.prototype.featuresNativeAudioTracks=e.supportsNativeAudioTracks();var Oo=e.TEST_VID&&e.TEST_VID.constructor.prototype.canPlayType,Vo=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,Uo=/^video\/mp4/i;e.patchCanPlayType=function(){se>=4&&!re?e.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Vo.test(t)?"maybe":Oo.call(this,t)}:ee&&(e.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Uo.test(t)?"maybe":Oo.call(this,t)})},e.unpatchCanPlayType=function(){var t=e.TEST_VID.constructor.prototype.canPlayType;return e.TEST_VID.constructor.prototype.canPlayType=Oo,t},e.patchCanPlayType(),e.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){}}()}}},e.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){e.prototype[t]=function(){return this.v[t]||this.v.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){e.prototype["set"+Ee(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){e.prototype[t]=function(){return this.v[t]}})),["volume","src","poster","preload","playbackRate"].forEach((function(t){e.prototype["set"+Ee(t)]=function(i){this.v[t]=i}})),["pause","load"].forEach((function(t){e.prototype[t]=function(){return this.v[t]()}})),yh.withSourceHandlers(e),e.nativeSourceHandler={},e.nativeSourceHandler.canPlayType=function(t){try{return e.TEST_VID.canPlayType(t)}catch(t){return""}},e.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return e.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 e.nativeSourceHandler.canPlayType("video/"+s)}return""},e.nativeSourceHandler.handleSource=function(t,i,s){i.setSrc(t.src)},e.nativeSourceHandler.dispose=function(){},e.registerSourceHandler(e.nativeSourceHandler),Ne.registerComponent("Html5",e),yh.registerTech("Html5",e);var Lo=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],Ho=function(t){function i(s,e,n){var r;if(s.id=s.id||["vjs_video",ns()].join("_"),(e=us(i.getTagSettings(s),e)).initChildren=!1,e.createEl=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof s.closest){var h=s.closest("[lang]");h&&(e.language=h.getAttribute("lang"))}else for(var o=s;o&&1===o.nodeType;){if(Bs(o).hasOwnProperty("lang")){e.language=o.getAttribute("lang");break}o=o.parentNode}if(!(r=t.call(this,null,e,n)||this).h||!r.h.techOrder||!r.h.techOrder.length)throw new v("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(r.tag=s,r.tagAttributes=s&&Bs(s),r.language(r.h.language),e.languages){var a={};g.getOwnPropertyNames(e.languages).forEach((function(t){a[t.toLowerCase()]=e.languages[t]})),r.vi=a}else r.vi=i.prototype.h.languages;r.pi={},r.mi=e.poster||"",r.gi=!!e.controls,s.controls=!1,r.yi=!1,r.v=r.createEl();var u=De(r.h);if(e.plugins){var c=e.plugins;g.getOwnPropertyNames(c).forEach((function(t){"function"==typeof this[t]?this[t](c[t]):ds.error("Unable to find plugin:",t)}),Be(r))}r.h.playerOptions=u,r.initChildren(),r.isAudio("audio"===s.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"),Zs||r.addClass("vjs-workinghover"),i.players[r.o]=Be(r);var l="5.20.6-opentelly.14".split(".")[0];return r.addClass("vjs-v"+l),r.userActive(!0),r.reportUserActivity(),r.wi(),r.on("fullscreenchange",r.ki),r.on("stageclick",r._i),r}Re(i,t);var s=i.prototype;return s.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.ji&&this.ji.parentNode&&this.ji.parentNode.removeChild(this.ji),i.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(),t.prototype.dispose.call(this)},s.createEl=function(){var i,s=this.tag,e=this.xi=s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player");i=this.v=e?s.parentNode:t.prototype.createEl.call(this,"div"),s.setAttribute("tabindex","-1"),s.removeAttribute("width"),s.removeAttribute("height");var n=Bs(s);if(g.getOwnPropertyNames(n).forEach((function(t){"class"===t?i.className+=" "+n[t]:i.setAttribute(t,n[t])})),s.playerId=s.id,s.id+="Si",s.className="vjs-tech",s.player=i.player=this,this.addClass("vjs-paused"),!0!==ts.VIDEOJS_NO_DYNAMIC_STYLE){this.ji=Me("vjs-styles-dimensions");var r=Ws(".vjs-styles-defaults"),h=Ws("head");h.insertBefore(this.ji,r?r.nextSibling:h.firstChild)}this.width(this.h.width),this.height(this.h.height),this.fluid(this.h.fluid),this.aspectRatio(this.h.aspectRatio);for(var o=s.getElementsByTagName("a"),a=0;a<o.length;a++){var u=o.item(a);Es(u,"vjs-hidden"),u.setAttribute("hidden","hidden")}return s.Kt=s.networkState,s.parentNode&&!e&&s.parentNode.insertBefore(i,s),Ss(s,i),this.m.unshift(s),this.v=i,i},s.width=function(t){return this.dimension("width",t)},s.height=function(t){return this.dimension("height",t)},s.dimension=function(t,i){var s="width"===t?"Ti":"Ci";if(void 0===i)return this[s]||0;if(""===i)this[s]=void 0;else{var e=_(i);if(j(e))return ds.error('Improper value "'+i+'" supplied for for '+t),this;this[s]=e}return this.Pi(),this},s.fluid=function(t){if(void 0===t)return!!this.Mi;this.Mi=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.Pi()},s.aspectRatio=function(t){if(void 0===t)return this.Ai;if(!/^\d+\:\d+$/.test(t))throw new v("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.Ai=t,this.fluid(!0),this.Pi()},s.Pi=function(){if(!0!==ts.VIDEOJS_NO_DYNAMIC_STYLE){var t,i,s,e=(void 0!==this.Ai&&"auto"!==this.Ai?this.Ai:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),n=e[1]/e[0];t=void 0!==this.Ti?this.Ti:void 0!==this.Ci?this.Ci/n:this.videoWidth()||300,i=void 0!==this.Ci?this.Ci:t*n,s=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(s),Ae(this.ji,"\n ."+s+" {\n width: "+t+"px;\n height: "+i+"px;\n }\n\n ."+s+".vjs-fluid {\n padding-top: "+100*n+"%;\n }\n ")}else{var r="number"==typeof this.Ti?this.Ti:this.h.width,h="number"==typeof this.Ci?this.Ci:this.h.height,o=this.H&&this.H.el();o&&(r>=0&&(o.width=r),h>=0&&(o.height=h))}},s._t=function(t,i){var s=this;this.H&&this.Ii(),"Html5"!==t&&this.tag&&(yh.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Ei=t,this.T=!1;var e=us({source:i,nativeControlsForTouch:this.h.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Di",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.xi||!1,"vtt.js":this.h["vtt.js"]},this.h[t.toLowerCase()]);this.tag&&(e.tag=this.tag),i&&(this.Ni=i.type,i.src===this.pi.src&&this.pi.currentTime>0&&(e.startTime=this.pi.currentTime),this.pi.sources=null,this.pi.source=i,this.pi.src=i.src);var n=yh.getTech(t);n||(n=Ne.getComponent(t)),this.H=new n(e),this.H.ready(Ie(this,this.Fi),!0),tn(this.Bi||[],this.H),Lo.forEach((function(t){s.on(s.H,t,s["handleTech"+Ee(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.Li),this.on(this.H,"seeking",this.Hi),this.on(this.H,"seeked",this.zi),this.on(this.H,"play",this.Wi),this.on(this.H,"firstplay",this.qi),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.Pi),this.on(this.H,"resize",this.Pi),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||Ss(this.H.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},s.Ii=function(){this.rt=this.videoTracks(),this.nt=this.textTracks(),this.ht=this.audioTracks(),this.Bi=Ze(this.H),this.T=!1,this.H.dispose(),this.H=!1},s.tech=function(t){if(t&&t.IWillNotUseThisInPlugins)return this.H;var i="\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n ";throw ts.alert(i),new v(i)},s.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)},s.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)},s.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){ds("deleting tag.poster throws in some browsers",t)}this.play()}},s.$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"))},s.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},s.Wi=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},s.Ri=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return t.removeClass("vjs-waiting")}))},s.Oi=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},s.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},s.Ui=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},s.Hi=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},s.zi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},s.qi=function(){this.h.starttime&&(ds.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")},s.Gi=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},s.Li=function(){this.addClass("vjs-ended"),this.h.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},s.Xi=function(){this.duration(this.Zi("duration"))},s.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()))},s.os=function(){this.userActive(!this.userActive())},s.ns=function(){this.userWasActive=this.userActive()},s.rs=function(){this.userWasActive&&this.reportUserActivity()},s.hs=function(t){t.cancelable&&t.preventDefault()},s.ki=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},s._i=function(){this.reportUserActivity()},s.Ji=function(t,i){i&&(this.toggleClass("vjs-ios-native-fs",!(!i.nativeIOSFullscreen||!i.isFullscreen)),this.isFullscreen(i.isFullscreen)),this.trigger("fullscreenchange")},s.Qi=function(){var t=this.H.error();this.error(t)},s.Ki=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},s.getCache=function(){return this.pi},s.us=function(t,i){if(this.H&&!this.H.T)this.H.ready((function(){this[t](i)}),!0);else try{this.H&&this.H[t](i)}catch(t){throw ds(t),t}},s.Zi=function(t){if(this.H&&this.H.T)try{return this.H[t]()}catch(i){throw void 0===this.H[t]?ds("Video.js: "+t+" method not defined for "+this.Ei+" playback technology.",i):"TypeError"===i.name?(ds("Video.js: "+t+" unavailable on "+this.Ei+" playback technology element.",i),this.H.T=!1):ds(i),i}},s.play=function(){return this.src()||this.currentSrc()?this.us("play"):this.H.one("loadstart",(function(){this.play()})),this},s.pause=function(){return this.us("pause"),this},s.paused=function(){return!1!==this.Zi("paused")},s.scrubbing=function(t){return void 0!==t?(this.yi=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.yi},s.currentTime=function(t){return void 0!==t?(this.us("setCurrentTime",t),this):(this.pi.currentTime=this.Zi("currentTime")||0,this.pi.currentTime)},s.duration=function(t){return void 0===t?void 0!==this.pi.duration?this.pi.duration:NaN:((t=_(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)},s.remainingTime=function(){return this.duration()-this.currentTime()},s.buffered=function(){var t=this.Zi("buffered");return t&&t.length||(t=Ue(0,0)),t},s.bufferedPercent=function(){return Le(this.buffered(),this.duration())},s.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),s=t.end(t.length-1);return s>i&&(s=i),s},s.volume=function(t){var i;return void 0!==t?(i=w.max(0,w.min(1,_(t))),this.pi.volume=i,this.us("setVolume",i),this):(i=_(this.Zi("volume")),j(i)?1:i)},s.muted=function(t){return void 0!==t?(this.us("setMuted",t),this):this.Zi("muted")||!1},s.supportsFullScreen=function(){return this.Zi("supportsFullScreen")||!1},s.isFullscreen=function(t){return void 0!==t?(this.cs=!!t,this):!!this.cs},s.requestFullscreen=function(t){var i,s=Ge;return this.isFullscreen(!0),s.requestFullscreen?(ke(is,s.fullscreenchange,Ie(this,(function t(i){this.isFullscreen(is[s.fullscreenElement]),!1===this.isFullscreen()&&_e(is,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},s.exitFullscreen=function(){var t=Ge;return this.isFullscreen(!1),t.requestFullscreen?is[t.exitFullscreen]():this.H.supportsFullScreen()?this.us("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},s.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=is.documentElement.style.overflow,ke(is,"keydown",Ie(this,this.fullWindowOnEscKey)),is.documentElement.style.overflow="hidden",Es(is.body,"vjs-full-window"),this.trigger("enterFullWindow")},s.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},s.exitFullWindow=function(){this.isFullWindow=!1,_e(is,"keydown",this.fullWindowOnEscKey),is.documentElement.style.overflow=this.docOrigOverflow,Ds(is.body,"vjs-full-window"),this.trigger("exitFullWindow")},s.canPlayType=function(t){for(var i,s=0,e=this.h.techOrder;s<e.length;s++){var n=Ee(e[s]),r=yh.getTech(n);if(r||(r=Ne.getComponent(n)),r){if(r.isSupported()&&(i=r.canPlayType(t)))return i}else ds.error('The "'+n+'" tech is undefined. Skipped browser support check for that tech.')}return""},s.selectSource=function(t){var i,s=this,e=this.h.techOrder.map(Ee).map((function(t){return[t,yh.getTech(t)||Ne.getComponent(t)]})).filter((function(t){var i=t[0],s=t[1];return s?s.isSupported():(ds.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),n=function(t,i,s){var e;return t.some((function(t){return i.some((function(i){if(e=s(t,i))return!0}))})),e},r=function(t,i){var e=t[0];if(t[1].canPlaySource(i,s.h[e.toLowerCase()]))return{source:i,tech:e}};return(this.h.sourceOrder?n(t,e,(i=r,function(t,s){return i(s,t)})):n(e,t,r))||!1},s.src=function(t){if(void 0===t)return this.Zi("src");var i=yh.getTech(this.Ei);return i||(i=Ne.getComponent(this.Ei)),Array.isArray(t)?this.ls(t):"string"==typeof t?this.src({src:t}):t instanceof g&&(t.type&&!i.canPlaySource(t,this.h[this.Ei.toLowerCase()])?this.ls([t]):(this.pi.sources=null,this.pi.source=t,this.pi.src=t.src,this.Ni=t.type||"",this.ready((function(){i.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},s.ls=function(t){var i=this.selectSource(t);i?(i.tech===this.Ei?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())},s.load=function(){return this.us("load"),this},s.reset=function(){return this._t(Ee(this.h.techOrder[0]),null),this.us("reset"),this},s.currentSources=function(){var t=this.currentSource(),i=[];return 0!==g.keys(t).length&&i.push(t),this.pi.sources||i},s.currentSource=function(){var t={},i=this.currentSrc();return i&&(t.src=i),this.pi.source||t},s.currentSrc=function(){return this.Zi("currentSrc")||this.pi.src||""},s.currentType=function(){return this.Ni||""},s.preload=function(t){return void 0!==t?(this.us("setPreload",t),this.h.preload=t,this):this.Zi("preload")},s.autoplay=function(t){return void 0!==t?(this.us("setAutoplay",t),this.h.autoplay=t,this):this.Zi("autoplay",t)},s.playsinline=function(t){return void 0!==t?(this.us("setPlaysinline",t),this.h.playsinline=t,this):this.Zi("playsinline")},s.loop=function(t){return void 0!==t?(this.us("setLoop",t),this.h.loop=t,this):this.Zi("loop")},s.poster=function(t){return void 0===t?this.mi:(t||(t=""),this.mi=t,this.us("setPoster",t),this.trigger("posterchange"),this)},s.Yi=function(){!this.mi&&this.H&&this.H.poster&&(this.mi=this.H.poster()||"",this.trigger("posterchange"))},s.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},s.usingNativeControls=function(t){return void 0!==t?(t=!!t,this.fs!==t&&(this.fs=t,t?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):!!this.fs},s.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 Qe(t),this.addClass("vjs-error"),ds.error("(CODE:"+this.lt.code+" "+Qe.errorTypes[this.lt.code]+")",this.lt.message,this.lt),this.trigger("error"),this)},s.reportUserActivity=function(t){this.ds=!0},s.userActive=function(t){return void 0!==t?((t=!!t)!==this.vs&&(this.vs=t,t?(this.ds=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.ds=!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},s.wi=function(){var t,i,s,e,n=Ie(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.ds){this.ds=!1,this.userActive(!0),this.clearTimeout(e);var t=this.h.inactivityTimeout;t>0&&(e=this.setTimeout((function(){this.ds||this.userActive(!1)}),t))}}),250)},s.playbackRate=function(t){return void 0!==t?(this.us("setPlaybackRate",t),this):this.H&&this.H.featuresPlaybackRate?this.Zi("playbackRate"):1},s.isAudio=function(t){return void 0!==t?(this.ps=!!t,this):!!this.ps},s.videoTracks=function(){return this.H?this.H.videoTracks():(this.rt=this.rt||new vh,this.rt)},s.audioTracks=function(){return this.H?this.H.audioTracks():(this.ht=this.ht||new mh,this.ht)},s.textTracks=function(){if(this.H)return this.H.textTracks()},s.remoteTextTracks=function(){if(this.H)return this.H.remoteTextTracks()},s.remoteTextTrackEls=function(){if(this.H)return this.H.remoteTextTrackEls()},s.addTextTrack=function(t,i,s){if(this.H)return this.H.addTextTrack(t,i,s)},s.addRemoteTextTrack=function(t,i){if(this.H)return this.H.addRemoteTextTrack(t,i)},s.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)},s.getVideoPlaybackQuality=function(){return this.Zi("getVideoPlaybackQuality")},s.videoWidth=function(){return this.H&&this.H.videoWidth&&this.H.videoWidth()||0},s.videoHeight=function(){return this.H&&this.H.videoHeight&&this.H.videoHeight()||0},s.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)},s.languages=function(){return De(i.prototype.h.languages,this.vi)},s.toJSON=function(){var t=De(this.h),i=t.tracks;t.tracks=[];for(var s=0;s<i.length;s++){var e=i[s];(e=De(e)).player=void 0,t.tracks[s]=e}return t},s.createModal=function(t,i){var s=this;(i=i||{}).content=t||"";var e=new en(this,i);return this.addChild(e),e.on("dispose",(function(){s.removeChild(e)})),e.open()},i.getTagSettings=function(t){var i={sources:[],tracks:[]},s=Bs(t),e=s["data-setup"];if(Is(t,"vjs-fluid")&&(s.fluid=!0),null!==e){var n=Ye(e||"{}"),r=n[0],h=n[1];r&&ds.error(r),us(s,h)}if(us(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(Bs(c)):"track"===l&&i.tracks.push(Bs(c))}return i},s.bi=function(){var t=is.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},i}(Ne);Ho.players={};var zo=ts.navigator;Ho.prototype.h={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:zo&&(zo.languages&&zo.languages[0]||zo.userLanguage||zo.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreenOptions:{navigationUI:"hide"}},["ended","seeking","seekable","networkState","readyState"].forEach((function(t){Ho.prototype[t]=function(){return this.Zi(t)}})),Lo.forEach((function(t){Ho.prototype["handleTech"+Ee(t)+"_"]=function(){return this.trigger(t)}})),Ne.registerComponent("Player",Ho);var Wo,qo,Go=function(t){function i(s){var e;void 0===s&&(s={});var n=De(s,{kind:hn[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(ue)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return g.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.q=!0,r||Be(e)}return Re(i,t),i}(un),Xo=function(t){function i(s){var e;void 0===s&&(s={});var n=De(s,{kind:rn[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(ue)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return g.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||Be(e)}return Re(i,t),i}(un);function Jo(t,i,s){var e;if("string"==typeof t){if(0===t.indexOf("#")&&(t=t.slice(1)),Jo.getPlayers()[t])return i&&ds.warn('Player "'+t+'" is already initialised. Options will not be applied.'),s&&Jo.getPlayers()[t].ready(s),Jo.getPlayers()[t];e=function(t){return 0===t.indexOf("#")&&(t=t.slice(1)),is.getElementById(t)}(t)}else e=t;if(!e||!e.nodeName)throw new p("The element or ID supplied is not valid. (videojs)");if(e.player||Ho.players[e.playerId])return e.player||Ho.players[e.playerId];i=i||{},Jo.hooks("beforesetup").forEach((function(t){var s=t(e,De(i));cs(s)&&!Array.isArray(s)?i=De(i,s):ds.error("please return an object in beforesetup hooks")}));var n=new(Ne.getComponent("Player"))(e,i,s);return Jo.hooks("setup").forEach((function(t){return t(n)})),n}"undefined"==typeof HTMLVideoElement&&ws()&&(is.createElement("video"),is.createElement("audio"),is.createElement("track")),Jo.ys={},Jo.hooks=function(t,i){return Jo.ys[t]=Jo.ys[t]||[],i&&(Jo.ys[t]=Jo.ys[t].concat(i)),Jo.ys[t]},Jo.hook=function(t,i){Jo.hooks(t,i)},Jo.removeHook=function(t,i){var s=Jo.hooks(t).indexOf(i);return!(s<=-1)&&(Jo.ys[t]=Jo.ys[t].slice(),Jo.ys[t].splice(s,1),!0)},!0!==ts.VIDEOJS_NO_DYNAMIC_STYLE&&ws()&&((Wo=Ws(".vjs-styles-defaults"))||(Wo=Me("vjs-styles-defaults"),(qo=Ws("head"))&&qo.insertBefore(Wo,qo.firstChild),Ae(Wo,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n "))),Pe(1,Jo),Jo.VERSION="5.20.6-opentelly.14",Jo.options=Ho.prototype.h,Jo.getPlayers=function(){return Ho.players},Jo.players=Ho.players,Jo.getComponent=Ne.getComponent,Jo.registerComponent=function(t,i){yh.isTech(i)&&ds.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Ne.registerComponent.call(Ne,t,i)},Jo.getTech=yh.getTech,Jo.registerTech=yh.registerTech,Jo.browser=pe,Jo.TOUCH_ENABLED=de,Jo.extend=function(t,i){void 0===i&&(i={});var s=function(){t.apply(this,arguments)},e={};for(var n in cs(i)?("function"==typeof i.init&&(ds.warn("Constructor logic via init() is deprecated; please use constructor() instead."),i.constructor=i.init),i.constructor!==g.prototype.constructor&&(s=i.constructor),e=i):"function"==typeof i&&(s=i),function(t,i){if("function"!=typeof i&&null!==i)throw new p("Super expression must either be null or a function, not "+typeof i);t.prototype=g.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},Jo.mergeOptions=De,Jo.bind=Ie,Jo.plugin=function(t,i){Ho.prototype[t]=i},Jo.addLanguage=function(t,i){var s;return t=(""+t).toLowerCase(),Jo.options.languages=De(Jo.options.languages,((s={})[t]=i,s)),Jo.options.languages[t]},Jo.log=ds,Jo.createTimeRange=Jo.createTimeRanges=Ue,Jo.formatTime=Eh,Jo.parseUrl=cn,Jo.isCrossOrigin=ln,Jo.EventTarget=Fe,Jo.on=ke,Jo.one=xe,Jo.off=_e,Jo.trigger=je,Jo.xhr=sh,Jo.TextTrack=oh,Jo.AudioTrack=Go,Jo.VideoTrack=Xo,Jo.isEl=ks,Jo.isTextNode=Us,Jo.createEl=js,Jo.hasClass=Is,Jo.addClass=Es,Jo.removeClass=Ds,Jo.toggleClass=Ns,Jo.setAttributes=Fs,Jo.getAttributes=Bs,Jo.emptyEl=Ls,Jo.appendContent=Hs,Jo.insertContent=zs,Jo.computedStyle=Oh,Bt(),Bt();var Qo=10;function Yo(t){const i=t.duration;if(j(i)){var s;const i=null==(s=t.source)?void 0:s.streamType;return"live"===i||"dvr"===i}return i===1/0}function Ko(t){return t.scrubbing()?t.getCache().currentTime:t.currentTime()}function Zo(t){const i=sa(t);return Yo(t)?i.end(i.length-1):i.start(0)}function ta(t){return sa(t).start(0)}function ia(t){const i=sa(t);return i.end(i.length-1)-i.start(0)}function sa(t){const i=t.seekable;if(i&&i.length)return i;let s=t.duration;return s=isFinite(s)?s:0,new vi([0,s]).ws()}function ea(t,i){void 0===i&&(i=t);let s=t<0?"-":"";t=w.abs(t);let e=w.floor(t%60),n=w.floor(t/60%60),r=w.floor(t/3600);const h=w.floor(i/60%60),o=w.floor(i/3600);return(j(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 na(t){return class extends t{get ks(){var t;return null!=(t=this._s)?t:this._s=ra(this.player())}dispose(){this._s=void 0,super.dispose()}constructor(...t){super(...t),this._s=void 0}}}function ra(t){return t.tech({IWillNotUseThisInPlugins:!0}).theoplayer()}function ha(t){const i=ra(t),s=()=>{const s=Ko(t);t.toggleClass("theo-at-live",function(t,i){if(Yo(t)){let s=t.seekable;return 0===s.length||s.end(s.length-1)-i<Qo}return!1}(i,s)),t.toggleClass("vjs-live",Yo(i)),t.toggleClass("theo-dvr",function(t){var i;return"dvr"===M(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)}Bt(),Bt();var oa="theo-ad-playing",aa="theo-dai-ad-playing";function ua(t,i,s){t.toggleClass(oa,i),t.toggleClass(aa,i&&s)}function ca(){this.userActive(!1)}Bt(),Bt(),Bt();var la=class{constructor(t,i){this.type=t.type,this.target=i,this.playerEvent=t}};Bt();var fa=function(t){return t.js="unavailable",t.xs="available",t.Ss="presenting",t}({});Bt(),Bt(),Bt();var da=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],va=Jo.getTech("Tech"),pa=Jo.getTech("Html5"),ma=class extends va{Ts(){var t;for(const t of da)this.ks.addEventListener(t,this.Cs);this.ks.addEventListener("error",this.Ps),this.ks.addEventListener("contentprotectionerror",this.Ps),this.ks.addEventListener("sourcechange",this.Ms),this.ks.addEventListener("loadstart",this.As),null==(t=this.ks.presentation)||t.addEventListener(gt.MODE_CHANGE,this.Is),this.ks.textTracks.addEventListener("addtrack",this.Es),this.ks.textTracks.addEventListener("removetrack",this.Ds),this.ks.textTracks.addEventListener("change",this.Ns),this.ks.audioTracks.addEventListener("addtrack",this.Fs),this.ks.audioTracks.addEventListener("removetrack",this.Bs),this.ks.audioTracks.addEventListener("change",this.$s)}Rs(){var t;for(const t of da)this.ks.removeEventListener(t,this.Cs);this.ks.removeEventListener("error",this.Ps),this.ks.removeEventListener("contentprotectionerror",this.Ps),this.ks.removeEventListener("sourcechange",this.Ms),this.ks.removeEventListener("loadstart",this.As),null==(t=this.ks.presentation)||t.removeEventListener(gt.MODE_CHANGE,this.Is),this.ks.textTracks.removeEventListener("addtrack",this.Es),this.ks.textTracks.removeEventListener("removetrack",this.Ds),this.ks.textTracks.removeEventListener("change",this.Ns),this.ks.audioTracks.removeEventListener("addtrack",this.Fs),this.ks.audioTracks.removeEventListener("removetrack",this.Bs),this.ks.audioTracks.removeEventListener("change",this.$s)}Os(t){this.trigger(new la(t,this))}createEl(){let t=this.h,i=t.player;if(!i)throw new v(this.localize('Missing required tech option "player"'));let s=i.element;return Jo.setAttributes(s,{id:t.techId}),s}theoplayer(){return this.ks}addTextTrack(t,i,s){return super.addTextTrack(t,i,s)}buffered(){return this.ks.buffered}played(){return this.ks.played}reset(){this.ks.stop()}play(){this.ks.play()}pause(){this.ks.pause()}paused(){return this.ks.paused}currentTime(){return this.ks.currentTime}setCurrentTime(t){this.ks.currentTime=t}duration(){return this.ks.duration}volume(){return this.ks.volume}setVolume(t){this.ks.volume=t}muted(){return this.ks.muted}setMuted(t){this.ks.muted=t}src(t){if(void 0!==t)this.setSrc(t);else{if(this.ks.src)return this.ks.src;if(this.ks.source){if(!G(this.ks.source.ads))return this.ks.source.ads[0].sources;if(function(t){return!!t.sources&&(Wt(t.sources)?t.sources.some(wi):wi(t.sources))}(this.ks.source))return"This source is managed by the Uplynk integration extension.";if(function(t){if(t.sources)if(Wt(t.sources)){for(const i of t.sources)if(gi(i))return!0}else if(Xt(t.sources))return gi(t.sources);return!1}(this.ks.source))return"This source is managed by the DAI integration extension.";if(ji(this.ks.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.ks.src}load(){this.setPreload("auto")}preload(){return this.ks.preload}setPreload(t){this.ks.preload=t}autoplay(){return this.ks.autoplay}setAutoplay(t){this.ks.autoplay=!!t}seeking(){return this.ks.seeking}seekable(){return this.ks.seekable}ended(){return this.ks.ended}playbackRate(){return this.ks.playbackRate}setPlaybackRate(t){this.ks.playbackRate=t}readyState(){return this.ks.readyState}networkState(){return 0}controls(){return!1}videoHeight(){return this.ks.videoHeight}videoWidth(){return this.ks.videoWidth}supportsFullScreen(){return this.ks.presentation.supportsMode(P.FULLSCREEN)}enterFullScreen(){this.ks.presentation.requestMode(P.FULLSCREEN)}exitFullScreen(){this.ks.presentation.requestMode(P.INLINE)}Vs(){let t=this.ks.ads;if(t&&t.playing)return!0;let i=this.ks.vr;return!(!i||i.state===fa.js)}initTextTrackListeners(){return this.on("touchend",(t=>{this.Vs()&&(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.Rs(),this.ks=null,super.dispose()}static isSupported(){return!0}static canPlayType(){return"maybe"}static canPlaySource(t){return"maybe"}get featuresVolumeControl(){return $i}constructor(t={},i){super(t,i),this.Cs=t=>this.Os(t),this.Us=!1,this.Ms=()=>{void 0===this.ks.errorObject&&(this.Os(new Ti(this.ks.currentTime,this.ks.readyState)),this.Os(new Et),this.Os(new Fi(this.ks.duration)))},this.As=()=>{this.Os(new Ht(this.ks.currentTime))},this.Es=t=>{this.textTracks().tt(t.track)},this.Fs=t=>{this.audioTracks().tt(t.track)},this.Ds=t=>{this.textTracks().it(t.track)},this.Bs=t=>{this.audioTracks().it(t.track)},this.Ns=()=>{let t=this.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.$s=()=>{let t=this.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Is=()=>{if(!this.supportsFullScreen())return;let t=this.Us,i=this.ks.presentation.currentMode===P.FULLSCREEN;t!==i&&(this.Us=i,this.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))},this.Ps=()=>{const t=this.ks.errorObject,i=t&&mt(t.code)||-1,s=t&&t.message||"An unknown error occurred.";this.error({code:i,message:this.localize(s)})},this.ks=this.h.player,this.Ts();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()}};ma.prototype.featuresFullscreenResize=pa.prototype.featuresFullscreenResize,ma.prototype.featuresPlaybackRate=pa.prototype.featuresPlaybackRate,ma.prototype.featuresProgressEvents=!0,ma.prototype.featuresTimeupdateEvents=!0,ma.prototype.featuresNativeTextTracks=!0,Jo.registerTech("THEOplayer",ma),Bt(),Bt(),Bt(),Bt();var ga=class{constructor(t){this.Ls=t=>{r(this.Hs,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.zs=t=>{oi(this.Hs,"theo-mobile-button-hover")},this.Ws=t=>{this.Hs.blur()},this.Hs=t,t.addEventListener("touchstart",this.Ls),t.addEventListener("touchend",this.zs),t.addEventListener("focusin",this.Ws)}};Bt(),Bt(),Bt(),Bt();var ya=Jo.getComponent("Menu"),ba=class extends(na(ya)){get qs(){return this.player().el()}Gs(){r(this.qs,"theo-menu-opened")}Xs(){oi(this.qs,"theo-menu-opened")}constructor(t,i){super(t,i)}};Bt();var wa=Jo.getComponent("MenuItem"),ka=class extends(na(wa)){get parentMenu(){return this.Js}buildCSSClass(){return"theo-menu-item vjs-menu-item"}createEl(){let t=super.createEl("li",{className:this.buildCSSClass(),tabIndex:0},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){this.Qs||(this.parentMenu.Ys(this),"tap"!==t.type&&"keydown"!==t.type||(this.Qs=!0,this.trigger("click"),this.Qs=!1))}dispose(){_i.Zs.Ks&&(this.el().removeEventListener("touchstart",this.Ls),this.el().removeEventListener("touchend",this.zs)),super.dispose()}constructor(t,i,s){super(t,Vi({selectable:!0},i)),this.Qs=!1,this.Ls=t=>{r(this.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},this.zs=t=>{oi(this.el(),"theo-mobile-menu-item-hover")},this.Js=s,_i.Zs.Ks&&(this.el().addEventListener("touchstart",this.Ls),this.el().addEventListener("touchend",this.zs))}};Bt();var _a=Jo.getComponent("ClickableComponent"),ja=class extends _a{get parentMenu(){return this.Js}get te(){return this.ie}set te(t){this.ie=t,this.el().setAttribute("tabindex",this.te?"0":"-1"),this.se()}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.Qs&&this.te&&(this.Js.ee(),"tap"===t.type&&(this.Qs=!0,this.trigger("click"),this.Qs=!1))}se(){this.te?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.Qs=!1,this.ie=!1,this.Js=s,this.on(t,"languagechange",this.se)}},xa=class extends ba{get menuHeader(){return this.ne}get menuItems(){return this.children()}addMenuItem(t){t=Vi({playerOptions:this.h.playerOptions},t);let i=new ka(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.re(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"}Gs(){super.Gs(),a.removeEventListener("resize",this.he),a.addEventListener("resize",this.he),this.show()}oe(){let t=this.ae();if(!t)return;let i=t.getClientRects();_i.Zs.Ks?this.ue(t,i):this.ce(t,i)}ae(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0}ce(t,i){}ue(t,i){}Xs(){a.removeEventListener("resize",this.he),super.Xs(),this.hide(),_i.Zs.Ks&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=this.contentEl();r(i,"theo-menu-content");let s=new ja(this.player(),this.h,this);return i.parentNode.insertBefore(s.el(),i),this.ne=s,t}Ys(t){}show(){return this.oe(),super.show()}dispose(){this.ne&&this.ne.dispose(),super.dispose()}constructor(t,i){super(t,i),this.he=()=>this.oe(),this.le=this.player().el(),this.hide(),this.on("menuchange",this.oe)}},Sa=class extends xa{get fe(){return this.de}set fe(t){this.de&&this.de.ve(this),this.de=t,t&&t.pe(this)}me(t){this.fe.ge(t,"replace")}ye(t){t.fe.ge(this,"restore")}be(){oi(this.we,"vjs-hidden"),this.we.style.opacity="1",super.show()}ke(){r(this.we,"vjs-hidden")}Gs(){this.fe&&this.fe.Gs(),super.Gs()}Xs(){this.fe&&this.fe.Xs(),super.Xs(),r(this.we,"vjs-hidden")}ae(){if(this.fe&&this.fe._e)return this.fe._e.we}ce(t,i){if(i.length>0){let t=i[0].height,s=i[0].width;this.de.je.style.height=t+"px",this.de.je.style.width=s+"px"}super.ce(t,i)}constructor(t,i){super(t,i)}};Bt();var Ta=class{get je(){return this.Hs}get _e(){return this.xe}pe(t){t.ke(),this.Hs.appendChild(t.we)}ve(t){this.Hs.removeChild(t.we)}ge(t,i){if(t==this.xe)return;let s=this.xe;if(this.xe=t,this.xe.be(),this._e.focus(),_i.Zs.Ks)s.ke();else{const t="translateX(100%)",e="translateX(-100%)",n=ot("transform");s.we.style.opacity="0",s.we.style[n]="replace"===i?e:t,this.xe.we.style.opacity="1",this.xe.we.style[n]="",u((()=>{s.ke(),s.we.style[n]=""}),300)}}Gs(){this.Se(),this.xe.be(),this.Te()}Xs(){this.Se(),this.xe.ke(),this.Ce.ke(),this.xe=this.Ce,this.Te()}Te(){et((()=>{oi(this.Hs,"theo-no-transition"),oi(this.xe.we,"theo-no-transition")}))}Se(){r(this.Hs,"theo-no-transition"),r(this.xe.we,"theo-no-transition")}constructor(t){this.Ce=this.xe=t,this.Hs=h.createElement("div"),this.Hs.className="theo-tertiary-background theo-menu-animation-container",this.Hs.appendChild(this.Ce.we),this.le=this.xe.player().el()}};Bt(),Bt();var Ca=class extends Sa{get we(){return this.el()}get parentMenu(){return this.Pe}re(t,i){let s=new Pa(t,i,this);return s.subMenu.fe=this.fe,s}ee(){this.Me()}Ys(t){super.Ys(t),this.Me()}Me(){this.parentMenu.ye(this)}buildCSSClass(){return"theo-submenu "+(this.Ae?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+super.buildCSSClass()}addSubMenuItem(t){this.Ae=!0;let i=super.addSubMenuItem(t);return this.removeClass("theo-leaf-submenu"),i}constructor(t,i,s){super(t,i),this.Ae=!1,this.Pe=s,this.menuHeader.te=!0}},Pa=class extends ka{get subMenu(){return this.Ie}handleClick(t){this.parentMenu.me(this.subMenu)}constructor(t,i,s){super(t,Vi({selectable:!1},i),s),this.Ie=new Ca(t,i,s)}},Ma=class extends Sa{get menuButton(){return this.Ee}createEl(){let t=Jo.createEl("div",{className:this.buildCSSClass()});return this.De=super.createEl(),this.De.className=super.buildCSSClass(),r(this.De,"theo-menu-content-animatable"),t.appendChild(this.De),this.fe=new Ta(this),t.appendChild(this.fe.je),t}buildCSSClass(){return"theo-menu-animatable "+super.buildCSSClass()}re(t,i){let s=new Pa(t,i,this);return s.subMenu.fe=this.fe,s}ce(t,i){super.ce(t,i);let s=this.le.getClientRects(),e=s.length>0?s[0]:void 0,n=_(getComputedStyle(this.el()).fontSize);ri(this.el(),this.Ee.el(),e,n)}get we(){return this.De}ee(){this.Ee.closeMenu()}dispose(){this.Ne||(this.Ne=!0,super.dispose())}constructor(t,i,s){super(t,i),this.Ne=!1,this.Ee=s}};Bt();var Aa=class{set Fe(t){this.Be.innerHTML=this.$e.localize(t),this.Re(),this.Oe(),mi(this.$e.el())}get Fe(){return this.Be.textContent||""}Ve(){this.$e.off("mouseover",this.Oe),this.$e.off("mouseout",this.Re),this.$e.off("dispose",this.Ue),Yt(this.Be)}constructor(t,i){this.Oe=()=>{oi(this.Be,"vjs-hidden");let t=this.$e.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,s=_(getComputedStyle(this.Be).fontSize);ri(this.Be,this.$e.el(),i,s)},this.Re=()=>{r(this.Be,"vjs-hidden")},this.Ue=()=>this.Ve(),this.$e=t,mi(t.el()),bi(t.el()),this.Be=h.createElement("span"),this.Be.innerHTML=this.$e.localize(i),this.Be.className="theo-button-tooltip vjs-hidden",this.Be.setAttribute("aria-hidden","true"),this.$e.el().appendChild(this.Be),this.$e.on("mouseover",this.Oe),this.$e.on("mouseout",this.Re),this.$e.on("dispose",this.Ue)}},Ia=Jo.getComponent("Button"),Ea=class extends(na(Ia)){get Le(){const t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}get menu(){return this.He}isMenuOpen(){return this.ze}openMenu(){this.We&&!this.ze&&(this.He.Gs(),this.el().setAttribute("aria-expanded","true"),this.ze=!0,this.He.focus())}closeMenu(){this.We&&this.ze&&(this.He.Xs(),this.el().setAttribute("aria-expanded","false"),this.ze=!1)}set minimumMenuItems(t){this.qe=t,this.Ge()}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.We=!0,super.enable()}disable(){return this.closeMenu(),this.We=!1,super.disable()}se(){this.Be.Fe=this.controlText()}dispose(){this.player().removeChild(this.He),this.He.dispose(),this.Be.Ve(),this.ks.removeEventListener("seeking",this.Xe),super.dispose()}constructor(t,i){super(t,i),this.ze=!1,this.qe=1,this.We=!0,this.Je=t=>{let i=this.el().contains(t.target),s=this.He.el().contains(t.target),e=!1;var n;_i.Zs.Ks&&this.Le&&(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.Qe=t=>{27===t.which&&(this.closeMenu(),this.focus())},this.Xe=()=>{this.ze&&this.closeMenu()},this.Ge=()=>{this.He.menuItems.length>=this.qe?this.show():(this.closeMenu(),this.hide())},this.He=new Ma(t,i,this),this.player().getChild("controlBarMenuContainer").addChild(this.He),this.Be=new Aa(this,this.controlText()),this.el().setAttribute("aria-haspopup","true"),_i.Zs.Ye?(this.on(h,"touchend",this.Je),new ga(this.el())):(this.on(h,"click",this.Je),this.on(h,"keydown",this.Qe),dt&&this.on(h,dt.Ke,this.closeMenu)),this.ks.addEventListener("seeking",this.Xe),this.on(this.He,"menuchange",this.Ge),this.on(t,"languagechange",this.se),this.Ge()}},Da=Jo.getComponent("Component"),Na=class extends(Jo.getComponent("ControlBar")){addMenuButton(t){t=Vi({playerOptions:this.h.playerOptions},t);let i=new Ea(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)}};Jo.registerComponent("THEOControlBarShadow",class extends Da{createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-tertiary-color theo-control-bar-shadow"}}),Bt(),Bt();var Fa=Jo.getComponent("VolumeBar"),Ba=class extends Fa{handleFocus(t){super.handleFocus(t),this.Ze.addClass("focus-within")}handleBlur(t){super.handleBlur(t),this.Ze.removeClass("focus-within")}constructor(t,i){super(t,i),this.Ze=i.tn}};Bt();var $a=Jo.getComponent("VolumeControl"),Ra=class extends $a{constructor(t,i){super(t,i),this.sn=new Ba(t,{tn:this}),this.addChild(this.sn)}};Ra.prototype.h=Vi({},$a.prototype.h,{children:[]}),Jo.registerComponent("VolumeControl",Ra);var Oa=class extends(na(Na)){nn(){this.rn(this.hn())}an(){0===this.un&&(this.un=u(this.cn,100))}ln(t){"opacity"===t.propertyName&&(0!==this.un&&(c(this.un),this.un=0),this.rn(!0))}fn(t){"opacity"===t.propertyName&&(this.hn()||this.rn(!1))}hn(){return"0"!==a.getComputedStyle(this.el()).opacity}rn(t){this.dn!==t&&(this.dn=t,t?this.vn():this.ks.textTrackStyle.marginBottom=void 0)}vn(){const t=this.el().getBoundingClientRect().height;this.ks.textTrackStyle.marginBottom!==t&&(this.ks.textTrackStyle.marginBottom=t)}dispose(){c(this.un),this.un=0,this.mn.pn(rt.gn,this.yn),this.mn.bn(),super.dispose()}constructor(t,i){super(t,i),this.dn=!1,this.un=0,this.cn=()=>{0!==this.un&&(this.un=0,this.rn(this.hn()))},this.yn=()=>{this.dn&&this.vn()},this.on(t,"ready",this.nn),this.on(t,"pause",this.nn),this.on(t,"useractive",this.nn),this.on(t,"firstplay",this.an),this.on(t,"play",this.an),this.on(t,"userinactive",this.an),this.on("transitionstart",this.ln),this.on("transitionend",this.fn),this.mn=new ut(this.el()),this.mn.wn(rt.gn,this.yn),this.mn.kn(!0)}};Oa.prototype.h=Vi({},Na.prototype.h,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),Jo.registerComponent("ControlBar",Oa),Bt();var Va=class extends Na{buildCSSClass(){return"theo-top-controlbar "+super.buildCSSClass()}constructor(t,i){super(t,i),t.topControlBar=this}};Va.prototype.h=Vi({},Na.prototype.h,{children:[]}),Jo.registerComponent("TopControlBar",Va),Bt();var Ua=Jo.getComponent("CurrentTimeDisplay"),La=class extends(na(Ua)){updateContent(){const t=Ko(this.player()),i=this.ks,s=ta(i),e=this.localize("Current Time"),n=ea(w.max(0,t-s),ia(i));n!==this.Pt&&(this.Pt=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)}};Jo.registerComponent("CurrentTimeDisplay",La),Bt();var Ha=Jo.getComponent("DurationDisplay"),za=class extends(na(Ha)){updateContent(){const t=this.ks,i=j(t.duration)?NaN:ia(t),s=t.clip.endTime-t.clip.startTime,e=w.min(i,s)||0;if(this.ct!==e){this.ct=e;const t=this.localize("Duration Time"),i=ea(e);this.S.innerHTML='<span class="vjs-control-text">'+t+"</span> "+i}}dispose(){var t;null==(t=this.ks)||t.clip.removeEventListener("change",this._n),super.dispose()}constructor(t,i){var s;super(t,i),this._n=()=>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.ks)||s.clip.addEventListener("change",this._n)}};Jo.registerComponent("DurationDisplay",za),Bt();var Wa=Jo.getComponent("Button"),qa=class extends(na(Wa)){buildCSSClass(){return"theo-live-control "+super.buildCSSClass()}createEl(){let t=super.createEl("button",{},{"aria-live":"off"});return this.jn=Jo.createEl("span",{className:"theo-live-control-indicator"}),ti(t,this.jn),t}createControlTextEl(t){let i=super.createControlTextEl(t);return Jo.removeClass(i,"vjs-control-text"),Jo.addClass(i,"theo-live-control-text"),i}handleClick(){var t;const i=this.ks;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{const t=this.player();t.currentTime(Zo(i)),t.play()}}xn(){Yo(this.ks)?this.show():this.hide()}constructor(t,i){super(t,i),this.controlText("Live"),this.xn(),this.on(t,"emptied",this.xn),this.on(t,"durationchange",this.xn),_i.Zs.Ye&&new ga(this.el())}};Jo.registerComponent("LiveDisplay",qa),Bt();var Ga=Jo.getComponent("LoadingSpinner");Jo.registerComponent("LoadingSpinner",class extends Ga{buildCSSClass(){return"theo-secondary-color vjs-loading-spinner "+super.buildCSSClass()}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=Jo.createEl("div",{className:"theo-loading-spinner-rotator"}),s=Jo.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=Jo.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)}}),Bt();var Xa=Jo.getComponent("LoadProgressBar"),Ja=class extends(na(Xa)){update(){let t=this.ks,i=vi.Sn(sa(t)),s=i.Tn(0),e=vi.Sn(t.buffered).Cn(i),n=i.Pn(0)-s,r=e.U&&e.Pn(e.U-1)||0;r=w.max(0,r-s);let o=this.el(),a=this.Mn;o.style.width=Qa(r,n);for(let t=0;t<e.U;t++){let i=e.Tn(t),n=e.Pn(t),u=a[t];u||(u=h.createElement("div"),a.push(u),o.appendChild(u)),u.style.left=Qa(i-s,r),u.style.width=Qa(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.Mn=[],this.on(t,"emptied",this.update)}};function Qa(t,i){let s=t/i||0;return 100*(s>=1?1:s)+"%"}Jo.registerComponent("LoadProgressBar",Ja),Bt();var Ya=Jo.getComponent("MouseTimeDisplay"),Ka=class extends(na(Ya)){handleMouseMove(t){let i=t,s=this.ks,e=ta(s)+this.calculateDistance(i)*ia(s),n=i.pageX-si(this.el().parentNode).left;this.update(e,n+"px")}handleTouchMove(t){let i=t,s=this.ks,e=ta(s)+this.calculateDistance(i)*ia(s),n=i.touches[0].pageX-si(this.el().parentNode).left;this.update(e,n+"px")}createEl(){let t=super.createEl();return this.An=Jo.createEl("span",{className:"theo-time-tooltip-text"}),t}update(t,i){this.In=t;let s=this.En(t);this.el().style.left=i,this.el().setAttribute("data-current-time",s),this.keepTooltipsInside&&(d(this.An,s),this.Dn())}Dn(){if(this.keepTooltipsInside&&this.tooltip.offsetParent){let t=this.player().contentEl(),i=t.getClientRects(),s=i.length>0?i[0]:void 0,e=_(getComputedStyle(t).fontSize);ri(this.tooltip,this.el(),s,e)}}En(t){const i=this.ks,s=t-Zo(i);return ea(Yo(i)?w.min(s,0):s,ia(i))}dispose(){var t;this.ks.removeEventListener("dimensionchange",this.Nn),null==(t=this.ks.presentation)||t.removeEventListener(gt.MODE_CHANGE,this.Nn),super.dispose()}constructor(t,i){var s;(super(t,i),this.In=NaN,this.Nn=()=>{let t=Ko(this.player());const i=this.ks;let s=(t-ta(i))/ia(i)||0;s=Ii(s,0,1),this.update(t,100*s+"%")},this.keepTooltipsInside&&(Jo.addClass(this.tooltip,"theo-secondary-color"),this.tooltip.appendChild(this.An)),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"mouseenter",this.handleMouseMove)})),Ot.Ks)&&(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.ks.addEventListener("dimensionchange",this.Nn),null==(s=this.ks.presentation)||s.addEventListener(gt.MODE_CHANGE,this.Nn),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"touchstart",this.handleTouchMove),this.on(t.controlBar.progressControl,"touchmove",Pi((t=>this.handleTouchMove(t)),25)),this.Nn()})))}};Jo.registerComponent("MouseTimeDisplay",Ka),Bt();var Za=Jo.getComponent("PlayProgressBar"),tu=class extends(na(Za)){updateDataAttr(){let t=Ko(this.player());this.el().setAttribute("data-current-time",this.En(t))}En(t){let i=this.ks;return ea(t-Zo(i),ia(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)}};Jo.registerComponent("PlayProgressBar",tu),Bt();var iu=Jo.getComponent("RemainingTimeDisplay"),su=class extends(na(iu)){updateContent(){const t=this.ks,i=ia(t);if(i){const s=sa(t).end(0),e=this.localize("Remaining Time"),n=ea(w.max(0,s-this.player().currentTime()),i);n!==this.Pt&&(this.Pt=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)}};Jo.registerComponent("RemainingTimeDisplay",su),Bt(),Bt();var eu=class{get ks(){var t;return null!=(t=this._s)?t:this._s=ra(this.Fn)}Bn(){const t=this.$n;if(!t)return;const i=this.ks;if(0===i.seekable.length)return;const s=t.cues.slice();this.On.Rn(s);for(let t=0;t<s.length;t++){let e=s[t],n=s[t+1],r=!n||e.endTime!==n.startTime,h=new nu(e,i,r);this.Vn.push(h),this.Un.appendChild(h.je)}}Ln(){this.ks.addEventListener("loadedmetadata",this.Hn),this.ks.addEventListener("loadeddata",this.Hn),this.ks.addEventListener("sourcechange",this.Hn),this.ks.addEventListener("durationchange",this.zn),this.ks.clip.addEventListener("change",this.zn),this.ks.textTracks.addEventListener("addtrack",this.Wn),this.ks.textTracks.addEventListener("removetrack",this.qn),this.ks.textTracks.addEventListener("change",this.Hn)}Gn(){this.ks.removeEventListener("loadedmetadata",this.Hn),this.ks.removeEventListener("loadeddata",this.Hn),this.ks.removeEventListener("sourcechange",this.Hn),this.ks.removeEventListener("durationchange",this.zn),this.ks.clip.removeEventListener("change",this.zn),this.ks.textTracks.removeEventListener("addtrack",this.Wn),this.ks.textTracks.removeEventListener("removetrack",this.qn),this.ks.textTracks.removeEventListener("change",this.Hn)}Xn(){if(!(this.ks.readyState<Nt.Jn))for(let t of this.ks.textTracks)if(t.kind===xt.Qn&&t.mode===wt.Yn&&t.cues.length>0&&t.readyState!==yt.ERROR)return t}Kn(t){const i=this.$n;t!==i&&(i&&(this.Zn(),i.removeEventListener("cuechange",this.tr)),this.$n=t,t&&(t.addEventListener("cuechange",this.tr),this.zn()))}ir(t){this.On.sr(t)}er(){this.On.be()}nr(){this.On.ke()}Zn(){for(let t of this.Vn)t.Ve();this.On.rr(),this.Vn=[],this.hr=void 0}Ve(){this.Gn(),this.ar.removeEventListener("mousemove",this.ur),this.ar.removeEventListener("mouseenter",this.cr),this.ar.removeEventListener("mouseleave",this.lr),this.Kn(void 0),this.On.Ve(),this._s=void 0}constructor(t,i){this.Fn=i,this.Vn=[],this._s=void 0,this.Hn=()=>{this.Kn(this.Xn())},this.Wn=t=>{let i=t.track;i.kind===xt.Qn&&(i.addEventListener("addcue",this.Hn),i.addEventListener("removecue",this.Hn),i.addEventListener("readystatechange",this.Hn)),this.Hn()},this.qn=t=>{let i=t.track;i.kind===xt.Qn&&(i.removeEventListener("addcue",this.Hn),i.removeEventListener("removecue",this.Hn),i.removeEventListener("readystatechange",this.Hn)),this.Hn()},this.ur=t=>{let i=this.ks,s=function(t,i){let s,e,n=si(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=Ii((o-s+h)/h,0,1),c=Ii((e-a)/r,0,1);return{x:c,y:u}}(this.Un,t),e=ta(i)+s.x*ia(i);e===i.duration&&(e-=.1),this.ir(e)},this.lr=()=>{this.On.ke()},this.cr=()=>{this.On.be()},this.zn=()=>{this.$n&&(this.Zn(),this.Bn(),this.tr())},this.tr=()=>{var t,i,s;const e=null==(i=this.$n)||null==(t=i.activeCues)?void 0:t[0],n=C(this.Vn,(t=>t.dr===e));n!==this.hr&&(null==(s=this.hr)||s.pr(),this.hr=n,null==n||n.mr())},this.ar=t,this.On=new ru,this.Fn.contentEl().appendChild(this.On.je),this.Un=h.createElement("div"),r(this.Un,"theoplayer-chapterbar"),this.ar.appendChild(this.Un),this.ar.addEventListener("mousemove",this.ur),this.ar.addEventListener("mouseenter",this.cr),this.ar.addEventListener("mouseleave",this.lr),this.Ln()}},nu=class{get je(){return this.Hs}mr(){r(this.Hs,"theoplayer-chapter-indicator-active")}pr(){oi(this.Hs,"theoplayer-chapter-indicator-active")}gr(t,i){let s=t.seekable.start(0),e=t.seekable.end(t.seekable.length-1),n=e-s,o=this.dr.startTime,a=this.dr.endTime,u=a>=s&&o<=e,c=Ii(o-s,0,n),l=Ii(a-s,0,n),f=w.max(0,l-c),d=h.createElement("div");r(d,"theoplayer-chapter-indicator");let v=h.createElement("div");r(v,"theoplayer-chapter-indicator-highlight"),d.appendChild(v),i&&r(d,"theoplayer-chapter-indicator-discontinuous");let p=c/n*100,m=f/n*100;return d.style.display=u?"":"none",d.style.width=m+"%",d.style.left=p+"%",d}Ve(){Yt(this.Hs)}constructor(t,i,s){this.dr=t,this.Hs=this.gr(i,s)}},ru=class{ke(){this.yr--,0===this.yr&&oi(this.je,"theoplayer-chapter-hovering")}Rn(t){this.br=t||[],this.br.length>0&&(this.je.style.display="")}wr(t){d(this.kr,t.content)}rr(){this.br=[],d(this.kr,""),this.je.style.display="none"}be(){this.yr++,this.yr>0&&r(this.je,"theoplayer-chapter-hovering")}sr(t){for(let i of this.br)if(hu(i,t)){this.wr(i);break}}Ve(){Yt(this.je)}constructor(){this.br=[],this.yr=0,this.je=h.createElement("div"),r(this.je,"theoplayer-chaptertitle"),this.je.style.display="none",this.kr=h.createElement("p"),this.je.appendChild(this.kr)}};function hu(t,i){return new vi([t.startTime,t.endTime])._r(i)}var ou=Jo.getComponent("SeekBar"),au=class extends(na(ou)){updateAriaAttributes(t){const i=Ko(this.player()),s=this.ks;t.setAttribute("aria-valuenow",(100*this.jr(i)).toFixed(2)),t.setAttribute("aria-valuetext",ea(i-Zo(s),ia(s)))}getPercent(){return this.jr(this.player().currentTime())}handleMouseMove(t){if(this.ks&&this.ks.ads&&this.ks.ads.playing)return;const i=this.ks;let s=ta(i)+this.calculateDistance(t)*ia(i);s>=i.duration&&(s=i.duration-.1),this.Un.ir(s),this.player().currentTime(s)}handleMouseDown(t){this.playingStates.push(!this.player().paused()),this.Un.er(),super.handleMouseDown(t)}handleMouseUp(t){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.Un.nr(),super.handleMouseUp(t)}jr(t){let i=this.ks,s=(t-ta(i))/ia(i);return Ii(s,0,1)}dispose(){this.Un.Ve(),B(this.playingStates)}constructor(t,i){super(t,i),this.playingStates=[],this.on(t,"emptied",this.update),this.on(t,"seeking",this.update),this.Un=new eu(this.el(),t)}};Jo.registerComponent("SeekBar",au),Bt();var uu=Jo.getComponent("ProgressControl");_i.Zs.Ks&&Jo.registerComponent("ProgressControl",class extends uu{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"])}}),Bt();var cu=Jo.getComponent("TooltipProgressBar"),lu=class extends(na(cu)){updateDataAttr(){let t=Ko(this.player()),i=this.En(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i}En(t){const i=this.ks;return ea(t-Zo(i),ia(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 fu(t){for(const i of t)if(i.enabled)return i}function du(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:vu(t),description:pu(t),hd:!!t.height&&t.height>=720}}function vu(t){return t.height?t.height+"p":t.bandwidth?pu(t):""}function pu(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":""}Jo.registerComponent("TooltipProgressBar",lu),Bt(),Bt(),Bt(),Bt(),Bt();var mu=class{get Sr(){return this.Tr}set Sr(t){let i=this.Tr;for(let s=i.length-1;s>=0;s--){let e=i[s];D(t,e)||this.Cr(e)}for(let i of t)this.Pr(i);this.Mr.oe()}get Ar(){return this.Mr.menuItems}Ir(t){let i=this.Ar;if(i)for(let s of i)if(s.Er===t)return s}Dr(t){let i=this.Mr.addMenuItem();return i.Er=t,i.on("click",(()=>this.Nr(i))),i.el().setAttribute("role","menuitemradio"),i}Fr(t){t.dispose()}Br(t){return!0}Pr(t){if(this.Br(t)){D(this.Tr,t)||this.Tr.push(t);let i=this.Ir(t)||this.Dr(t);return this.$r(i),i}this.Cr(t)}Cr(t){let i=this.Ir(t);i&&(this.Mr.removeMenuItem(i),this.Fr(i)),A(this.Tr,t)}Ve(){const t=[];for(let i of this.Tr)t.push(i);for(let i of t)this.Cr(i);B(t)}constructor(t){this.Tr=[],this.Mr=t}},gu=class extends mu{Rr(){return this.Or=h.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",d(this.Or,this.Vr.localize("Quality")),this.Or}Ur(){return this.Lr=h.createElement("span"),this.Lr.className="theo-settings-control-menu-quality-automatic",d(this.Lr,this.Vr.localize("Automatic")),this.Lr}Hr(){return this.zr=h.createElement("span"),d(this.zr,this.Vr.localize("Automatic")),this.zr}Wr(){return this.qr=h.createElement("span"),this.qr.className="theo-primary-color theo-settings-control-menu-item-hd-label",d(this.qr,this.Vr.localize("HD")),this.qr}Gr(){let t=h.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.Lr),t.appendChild(h.createTextNode(" ")),t.appendChild(this.zr),t.appendChild(h.createTextNode(" ")),t.appendChild(this.qr),this.Xr.el().appendChild(this.Or),this.Xr.el().appendChild(t),this.Xr.el().setAttribute("aria-label",this.Vr.localize("Open the video quality settings menu"))}Jr(){let t=this.Qr,i=t&&xu(t.targetQuality),s=t&&t.activeQuality,e=du(this.Yr(i||s))||{name:this.Vr.localize("Automatic")};d(this.zr,e.name),ci(this.Lr,"vjs-hidden",!!i),ci(this.qr,"vjs-hidden",!e.hd)}$r(t){let i=du(t.Er)||{name:this.Vr.localize("Automatic")},s=i.name;i.hd&&(s+='<span class="theo-primary-color theo-settings-control-menu-item-hd-label">'+this.Vr.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.Vr.localize("Set video quality to ")+i.name),t.Er?t.selected(t.Er===this.Kr):t.selected(!this.Kr)}Nr(t){this.Qr&&(this.Qr.targetQuality=t.Er&&t.Er.videoQualities)}Yr(t,i){const s=i||this.Sr;for(let i of s)if(t&&i&&-1!==i.videoQualities.indexOf(t))return i}Ve(){this._s.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.Zr),this.Vr.off("languagechange",this.se),this.Qr&&(this.Qr.removeEventListener("activequalitychanged",this.th),this.Qr.removeEventListener("targetqualitychanged",this.ih),this.Qr.removeEventListener("update",this.sh)),super.Ve()}constructor(t,i,s){super(t.subMenu),this.Qr=void 0,this.Kr=void 0,this.Zr=()=>{let t=fu(this._s.videoTracks);if(t===this.Qr)return;let i=[];if(this.Qr&&(this.Qr.removeEventListener("activequalitychanged",this.th),this.Qr.removeEventListener("targetqualitychanged",this.ih),this.Qr.removeEventListener("update",this.sh)),this.Qr=t,t){t.addEventListener("activequalitychanged",this.th),t.addEventListener("targetqualitychanged",this.ih),t.addEventListener("update",this.sh);const s=bu(_u(t.qualities.filter((t=>t.available))));i=s.length>1?[void 0,...s]:[void 0]}this.Sr=i,this.ih(),this.th()},this.sh=t=>{const i=t.track;if(i!==this.Qr)return;const s=bu(_u(i.qualities.filter((t=>t.available)))),e=i&&xu(i.targetQuality);let n;this.Kr=this.Yr(e,s),n=s.length>1?[void 0,...s]:[void 0],this.Sr=n,this.Jr()},this.th=()=>{this.Pr(void 0),this.Jr()},this.ih=()=>{let t=fu(this._s.videoTracks),i=t&&xu(t.targetQuality),s=this.Yr(i),e=this.Kr;s!==e&&(this.Kr=s,s&&e||this.Pr(void 0),e&&D(this.Sr,e)&&this.Pr(e),i&&this.Pr(s),this.Jr())},this.se=()=>{d(this.Mr.menuHeader.el(),this.Vr.localize("Quality")),d(this.Or,this.Vr.localize("Quality")),d(this.Lr,this.Vr.localize("Automatic")),d(this.zr,this.Vr.localize("Automatic")),d(this.qr,this.Vr.localize("HD")),this.Xr.el().setAttribute("aria-label",this.Vr.localize("Open the video quality settings menu"));for(const t of this.Ar)this.$r(t);this.Jr()},this.Xr=t,this._s=i,this.Vr=s,this.Or=this.Rr(),this.Lr=this.Ur(),this.zr=this.Hr(),this.qr=this.Wr(),this.Gr(),d(this.Mr.menuHeader.el(),this.Vr.localize("Quality")),this.Sr=[void 0],this._s.videoTracks.addEventListener(["addtrack","removetrack","change"],this.Zr),this.Vr.on("languagechange",this.se),this.Zr()}},yu=class{get height(){return this.eh[0].height}get bandwidth(){return this.eh[0].bandwidth}get videoQualities(){return this.eh}get label(){return this.eh[0].label}add(t){this.eh.push(t)}constructor(t){this.eh=t}};function bu(t){let i=[];for(let s of t){let t=s,e=!1;for(let s of i)if(ju(s,t)){s.add(t),e=!0;break}e||i.push(new yu([t]))}return i}function wu(t,i){return t&&i?Ji(t,i):qi.nh}function ku(t,i){return t===i?qi.nh:wu(t.height,i.height)||wu(t.width,i.width)||wu(t.bandwidth,i.bandwidth)}function _u(t){return Hi(t,ku).reverse()}function ju(t,i){return t.label&&i.label&&t.label===i.label||ct(du(t),du(i))}function xu(t){return Wt(t)?1===t.length?t[0]:void 0:t}function Su(t){return 1===t?"Normal":""+w.round(100*t)/100}Bt();var Tu=class extends mu{Rr(){return this.Or=h.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",d(this.Or,this.Vr.localize("Speed")),this.Or}Gr(){const t=h.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Xr.el().appendChild(this.Or),this.Xr.el().appendChild(t),this.Xr.el().setAttribute("aria-label",this.Vr.localize("Open the video speed settings menu")),t}Dr(t){let i=super.Dr(t);return this.$r(i),i}$r(t){const i=t.Er,s=this.Vr.localize(Su(i));d(t.el(),s),t.el().setAttribute("aria-label",this.Vr.localize("Set video speed to ")+s),t.selected(t.Er===this._s.playbackRate)}Nr(t){this._s.playbackRate=t.Er}Ve(){this._s.removeEventListener("ratechange",this.rh),this.Vr.off("languagechange",this.se),super.Ve()}constructor(t,i,s,e){super(t.subMenu),this.hh=void 0,this.rh=()=>{this.hh&&this.Pr(this.hh);let t=this._s.playbackRate;this.hh=t,d(this.oh,this.Vr.localize(Su(t))),t&&this.Pr(t)},this.se=()=>{d(this.Mr.menuHeader.el(),this.Vr.localize("Speed")),d(this.Or,this.Vr.localize("Speed")),this.Xr.el().setAttribute("aria-label",this.Vr.localize("Open the video speed settings menu"));for(const t of this.Ar)this.$r(t);this.rh()},this.Xr=t,this._s=i,this.Vr=s,this.Or=this.Rr(),this.oh=this.Gr(),d(this.Mr.menuHeader.el(),this.Vr.localize("Speed")),this.Sr=e,this._s.addEventListener("ratechange",this.rh),this.Vr.on("languagechange",this.se),this.rh()}};Jo.registerComponent("SettingsButton",class extends Ea{createEl(){let t=super.createEl();return this.ah=Jo.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),d(this.ah,this.localize("HD")),t.appendChild(this.ah),t}buildCSSClass(){return"vjs-icon-cog theo-settings-control-button "+super.buildCSSClass()}se(){super.se(),d(this.ah,this.localize("HD")),d(this.menu.menuHeader.el(),this.localize("Settings"))}dispose(){this.Qr&&(this.Qr.removeEventListener("activequalitychanged",this.th),this.Qr=void 0),this.ks.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.uh),this.lh.Ve(),this.fh.Ve(),super.dispose()}constructor(t,i){var s,e;super(t,i),this.Qr=void 0,this.uh=()=>{let t=fu(this.ks.videoTracks);t!==this.Qr&&(this.Qr&&this.Qr.removeEventListener("activequalitychanged",this.th),this.Qr=t,t&&t.addEventListener("activequalitychanged",this.th),this.th())},this.th=()=>{var t;const i=null==(t=this.Qr)?void 0:t.activeQuality,s=!!(i&&i.height>=720);this.player().toggleClass("theo-hd",s)},r(this.menu.el(),"theo-settings-control-menu"),d(this.menu.menuHeader.el(),t.localize("Settings")),this.controlText("Settings"),this.Be.Fe=this.controlText(),this.dh=this.menu.addSubMenuItem({name:"QualityMenuItem"}),this.lh=new gu(this.dh,this.ks,t);let n=null!=(e=null==i||null==(s=i.playerOptions)?void 0:s.playbackRates)?e:[];this.ph=this.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),this.fh=new Tu(this.ph,this.ks,t,n),this.ks.videoTracks.addEventListener(["addtrack","removetrack","change"],this.uh),this.uh()}}),Bt(),Bt(),Bt();var Cu=class extends mu{mh(t){let i=t.label;if(i)return i;let s=t.language;if(s){let t=Wi(s);if(t)return t.gh}return s||""}yh(){this.Sr=this.bh}Ve(){this.bh.removeEventListener("addtrack",this.wh),this.bh.removeEventListener("removetrack",this.kh),this.bh.removeEventListener("change",this._h),super.Ve()}constructor(t,i){super(t),this.wh=t=>{const i=t.track;this.Pr(i),i.addEventListener("update",this.jh)},this.kh=t=>{const i=t.track;this.Cr(i),i.removeEventListener("update",this.jh)},this._h=t=>this.yh(),this.jh=()=>{for(const t of this.Sr)this.Pr(t)},this.bh=i,this.bh.addEventListener("addtrack",this.wh),this.bh.addEventListener("removetrack",this.kh),this.bh.addEventListener("change",this._h),this.yh()}},Pu=class extends Cu{$r(t){let i=t.Er,s=this.Vr.localize(this.mh(i));d(t.el(),s),t.el().setAttribute("aria-label",this.Vr.localize("Set the audio language to")+" "+s),t.selected(i.enabled)}Nr(t){let i=t.Er;for(let t of this.ks.audioTracks)t!==i&&(t.enabled=!1);i.enabled=!0}Ve(){this.Vr.off("languagechange",this.se),super.Ve()}constructor(t,i,s){super(t,i.audioTracks),this.se=()=>{d(this.Mr.menuHeader.el(),this.Vr.localize("Language"));for(const t of this.Ar)this.$r(t)},this.ks=i,this.Vr=s,d(this.Mr.menuHeader.el(),this.Vr.localize("Language")),this.Vr.on("languagechange",this.se)}};Jo.registerComponent("audioTrackButton",class extends Ea{buildCSSClass(){return"vjs-icon-audio theo-audio-track-control-button "+super.buildCSSClass()}dispose(){this.xh.Ve(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=2,this.xh=new Pu(this.menu,this.ks,t),this.controlText("Language"),this.Be.Fe=this.controlText()}}),Bt(),Bt();var Mu=class extends Cu{Br(t){return!!super.Br(t)&&(!t.forced&&Pt(t.kind))}Dr(t){let i=super.Dr(t);r(i.el(),"theo-text-track-menu-item");let s=h.createElement("span");i.Sh=s;let e=h.createElement("div");e.className="theo-text-track-menu-item-toggle",i.Th=e;let n=t=>this.Ch(t,i);i.Ph=n,e.addEventListener("click",n);let o=h.createElement("div");return o.className="theo-text-track-menu-item-toggle-slider",e.appendChild(o),i.el().appendChild(s),i.el().appendChild(e),i}$r(t){let i=t,s=i.Er,e=this.Vr.localize(this.mh(s));d(i.Sh,e),i.el().setAttribute("aria-label",this.Vr.localize("Set the subtitle language to")+" "+e),i.el().setAttribute("role","menuitemcheckbox"),i.selected(s.mode===wt.Yn)}Fr(t){let i=t;i.Th.removeEventListener("click",i.Ph),super.Fr(t)}Nr(t){let i=t.Er;for(let t of this.ks.textTracks)t!==i&&Tt(t.kind,i.kind)&&(t.mode=wt.Mh);i.mode!==wt.Yn?i.mode=wt.Yn:i.mode=wt.Mh}Ch(t,i){t.stopImmediatePropagation(),this.Nr(i)}Ve(){this.Vr.off("languagechange",this.se),super.Ve()}constructor(t,i,s){super(t,i.textTracks),this.se=()=>{d(this.Mr.menuHeader.el(),this.Vr.localize("Subtitles"));for(const t of this.Ar)this.$r(t)},this.ks=i,this.Vr=s,d(this.Mr.menuHeader.el(),s.localize("Subtitles")),this.Vr.on("languagechange",this.se)}};Jo.registerComponent("subtitlesButton",class extends Ea{buildCSSClass(){return"vjs-icon-subtitles theo-text-track-control-button "+super.buildCSSClass()}dispose(){this.xh.Ve(),super.dispose()}constructor(t,i){super(t,i),this.xh=new Mu(this.menu,this.ks,t),this.controlText("Subtitles"),this.Be.Fe=this.controlText()}}),Bt();var Au=Jo.getComponent("playToggle"),Iu=class extends(na(Au)){handleClick(t){this.ks.muted||this.ks.prepareWithUserAction(),super.handleClick(t)}handlePlay(t){super.handlePlay(t),this.controlText("Pause"),this.Be.Fe=this.controlText()}handlePause(t){this.ks.ended||(super.handlePause(t),this.controlText("Play"),this.Be.Fe=this.controlText())}se(){this.Be.Fe=this.controlText()}dispose(){this.Be.Ve(),this.ks.removeEventListener("ended",this.Ah),super.dispose()}constructor(t,i){super(t,i),this.Ah=()=>{this.controlText("Replay"),this.Be.Fe=this.controlText()},this.controlText("Play"),this.Be=new Aa(this,this.controlText()),this.ks.addEventListener("ended",this.Ah),this.on(t,"languagechange",this.se),_i.Zs.Ye&&new ga(this.el())}};Jo.registerComponent("playToggle",Iu),Bt();var Eu=Jo.getComponent("fullscreenToggle"),Du=class extends(na(Eu)){handleClick(t){this.ks.prepareWithUserAction(),super.handleClick(t)}handleFullscreenChange(t){super.handleFullscreenChange(t),this.updateContent()}updateContent(){const t=this.player().isFullscreen()?"Exit fullscreen":"Fullscreen";this.controlText(t),this.Be.Fe=this.controlText()}dispose(){this.Be.Ve(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Fullscreen"),this.Be=new Aa(this,this.controlText()),_i.Zs.Ye&&new ga(this.el()),this.on(t,"languagechange",this.updateContent)}};Jo.registerComponent("fullscreenToggle",Du),Bt();var Nu=Jo.getComponent("muteToggle"),Fu=class extends(na(Nu)){handleClick(t){this.ks.muted&&!this.ks.paused&&this.ks.prepareWithUserAction(),super.handleClick(t)}update(t){super.update(t),this.se()}se(){const t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.Be.Fe=this.controlText()}dispose(){this.Be.Ve(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Mute"),this.Be=new Aa(this,this.controlText()),_i.Zs.Ye&&new ga(this.el()),this.on(t,"languagechange",this.se),Ni&&(this.removeClass("vjs-hidden"),this.on(t,"loadstart",(()=>{this.removeClass("vjs-hidden")})))}};Jo.registerComponent("muteToggle",Fu),Bt();var Bu=Jo.getComponent("BigPlayButton"),$u=class extends(na(Bu)){createEl(){let t=super.createEl(),i=Jo.createEl("div",{className:"theo-big-play-button-svg-container"});return i.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150" fill="currentColor">\n <circle cx="75" cy="75" r="73" fill="#000" fill-opacity="0.2"></circle>\n <circle cx="75" cy="75" r="73" class="theo-play-svg-circle" stroke-width="4" stroke="currentColor" fill="none" transform="rotate(-90,75,75)"></circle>\n <g transform="translate(85,75) scale(0.5625) translate(-75,-75)">\n <path d="m 123.89639,85.432 c -12.865,9.167 -29.482997,19.402 -49.848997,30.7 -19.634,11.035 -36.851,19.7 -51.65,26 l -16.3990002,6.099 c -1.033,-4.433 -2,-11.002 -2.9,-19.7 -2.033,-17.333 -3.04999998,-36.466 -3.04999998,-57.399 0,-19.167 1.38199998,-37.081 4.14799998,-53.75 l 4.0019995,-19.1499994 17.3990007,5.849 c 15.068,5.9999994 31.401,14.5169994 49,25.5509994 18.631,11.666 34.616997,22.766 47.948997,33.3 6.663,5.3 11.463,9.383 14.396,12.25 l -13.046,10.25"></path>\n </g>\n</svg>',t.appendChild(i),t}buildCSSClass(){return"theo-primary-color "+super.buildCSSClass()}handleClick(t){this.ks.muted||this.ks.prepareWithUserAction(),super.handleClick(t),void 0!==this.ks.vr&&"unavailable"!==this.ks.vr.state&&(this.ks.vr.useDeviceMotionControls=!0)}};Jo.registerComponent("BigPlayButton",$u),Bt();var Ru=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;Jo.registerComponent("MouseTimeDisplay",class extends Ka{Ih(t){const i=t.track;"metadata"===i.kind&&"thumbnails"===i.label&&void 0===this.Eh&&(this.Eh=i,this.Dh=i.src?_i.Nh(i.src).href:void 0,this.Eh.addEventListener(["addcue","removecue"],this.Fh),this.Bh())}$h(t){t.track===this.Eh&&this.Rh()}createEl(){const t=super.createEl();return this.Oh=Jo.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.Vh=Jo.createEl("canvas",{className:"theo-time-tooltip-thumbnail"}),t}update(t,i){super.update(t,i),this.keepTooltipsInside&&this.Uh(t)}Uh(t){let i;if(this.Eh&&this.Eh.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.Eh.cues,t);i=s&&s.content}if(i===this.Lh)return;if(this.Lh=i,Jo.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",!!i),!i)return void this.Hh();const s=i.match(Ru);if(s){let[,t,i,e,n,r]=s;t=this.zh(t);const h={Wh:+i,qh:+e,Ti:+n,Ci:+r};this.Gh(t,h)}else{const t=this.zh(i);this.Gh(t)}}Bh(){j(this.In)||this.Uh(this.In)}zh(t){return this.Eh&&this.Dh?_i.Nh(t,this.Dh).href:t}Gh(t,i){this.Oh&&(this.Oh.src!==t?(this.Oh.onload=()=>{this.Xh(i)},this.Oh.src="",this.Oh.src=t):this.Xh(i))}Xh(t){if(!this.Vh||!this.Oh)return;const i=this.Vh.getContext("2d");i&&(null!=t||(t={Wh:0,qh:0,Ti:this.Oh.naturalWidth,Ci:this.Oh.naturalHeight}),this.Vh.width=t.Ti,this.Vh.height=t.Ci,i.drawImage(this.Oh,t.Wh,t.qh,t.Ti,t.Ci,0,0,t.Ti,t.Ci),this.Jh(this.Vh))}Jh(t){this.Qh||(ti(this.tooltip,t),this.Qh=t),this.Dn()}Hh(){this.Qh&&(this.tooltip.removeChild(this.Qh),this.Qh=void 0,this.Dn())}Rh(){void 0!==this.Eh&&(this.Eh.removeEventListener(["addcue","removecue"],this.Fh),this.Eh=void 0),this.Dh=void 0,this.Hh(),this.Lh=void 0}dispose(){this.Rh(),super.dispose()}constructor(t,i){super(t,i),this.Qh=void 0,this.Eh=void 0,this.Dh=void 0,this.Yh=t=>this.Ih(t),this.Kh=t=>this.$h(t),this.Fh=t=>this.Bh(),this.showThumbnails=()=>{this.Qh&&this.Qh.hidden&&(this.Qh.hidden=!1,this.Dn())},this.hideThumbnails=()=>{!this.Qh||this.Qh.hidden||this.player().scrubbing()||(this.Qh.hidden=!0,this.Dn())},this.on(this.player().textTracks(),"addtrack",this.Yh),this.on(this.player().textTracks(),"removetrack",this.Kh),Ot.Ks&&(this.on(t,"seeking",this.showThumbnails),this.on(t,"seeked",this.hideThumbnails))}}),Bt();var Ou=Jo.getComponent("VolumeLevel");Jo.registerComponent("VolumeLevel",class extends Ou{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-volume-level "+super.buildCSSClass()}}),Bt(),Bt();var Vu=Jo.getComponent("Component"),Uu=class extends Vu{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-menu-container "+super.buildCSSClass()}};Uu.prototype.h=Vi({},Uu.prototype.h,{children:[]}),Jo.registerComponent("controlBarMenuContainer",Uu);var Lu=Jo.getComponent("Player"),Hu=class extends Lu{dispose(){const t=this.el(),i=this.contentEl(),s=t.parentNode,e=t.nextSibling;super.dispose(),Yt(i),this.xi&&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)}};Hu.prototype.h=Vi({},Lu.prototype.h,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","upcomingAdNotificationText","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),Jo.registerComponent("Player",Hu),Bt(),Bt();var zu=Jo.getComponent("Player"),Wu=zu.prototype.es;zu.prototype.es=function(t){if(!(this.H&&this.H.Vs&&this.H.Vs()))return Wu.call(this,t)};var qu=zu.prototype.createEl;function Gu(t,i,s,e){let n=Vi({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},s);n.controlBar=Vi({progressControl:{keepTooltipsInside:!0}},n.controlBar);let h=n.techOrder||(n.techOrder=[]);-1===h.indexOf("THEOplayer")&&h.unshift("THEOplayer"),(n.theoplayer||(n.theoplayer={})).player=t,s&&Xt(s.language)&&(n.languages=Vi({},n.languages,{[Li]:s.language}),n.language=Li),i.setAttribute("data-vjs-player","");let o=i.getAttribute("style"),a=Jo(t.element,n,e);return a.ready((()=>{ha(a),function(t,i){if(i){if(i.ads){const s=i=>{const s="adbreakbegin"===i.type,e=i.adBreak.integration===Yi.Zh;ua(t,s,e)};i.ads.addEventListener("adbreakbegin",s),i.ads.addEventListener("adbreakend",s)}if(i.uplynk){var s;const e=i=>{const s="adbreakbegin"===i.type;ua(t,s,!1)};null==(s=i.uplynk)||s.ads.adBreaks.addEventListener("addadbreak",(t=>{t.adBreak.addEventListener("adbreakbegin",e),t.adBreak.addEventListener("adbreakend",e)}))}i.addEventListener("sourcechange",(()=>{ua(t,!1,!1)}))}}(a,t),function(t){t.on("mouseleave",ca)}(a)})),i.removeAttribute("data-vjs-player"),o?i.setAttribute("style",o):i.removeAttribute("style"),_i.Zs.Ks&&(r(i,"theo-mobile"),Xu(i)),function(t){t.on("seeking",(()=>{ei(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()}))}(a),a}function Xu(t){a.outerHeight>a.outerWidth?(oi(t,"theo-mobile-landscape"),r(t,"theo-mobile-portrait")):(oi(t,"theo-mobile-portrait"),r(t,"theo-mobile-landscape"))}zu.prototype.createEl=function(){let t=qu.call(this),i=Jo.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.S=i,t},Bt(),Bt(),Bt(),Bt();var Ju=Jo.getComponent("Button");var Qu="THEOPiPCloseButton";Jo.registerComponent(Qu,class extends Ju{buildCSSClass(){return"theo-close-button theo-pip-close"}handleClick(){this.so.io()}constructor(t,i){if(super(t,i),this.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.so)}(i))throw new v("Invalid Picture-in-picture options.");this.so=i.so}});var Yu=class extends z{get eo(){return this.no}get ro(){return this.t.cs()}ho(){this.t.wn(X.oo,this.ao),this.uo||this.t.wn(X.co,this.lo),this.t.fo.on("languagechange",this.se)}do(){var t;return"theo-pip-"+(null!=(t=this.vo)?t:"bottom-right")}po(t){let i=this.mo;i&&!this.ro&&(this.yo||this.bo(),this.wo(),r(i,"theo-pip"),r(i,this.do()),this.no=!0,this.ko=t,this._o=!1,this.jo(new bt(P.PICTURE_IN_PICTURE)))}xo(t){let i=this.mo;i&&(this.So(),oi(i,"theo-pip"),oi(i,this.do()),this.no=!1,this._o=t,this.To=this.ko,this.ko=!1,this.jo(new bt(P.INLINE)))}bo(){if(!this.yo){let t=this.t.fo;t.addChild(Qu,{so:this});let i=h.createElement("div");i.className="theo-pip-overlay",this.Co=h.createElement("div"),this.Co.className="theo-pip-overlay-text",d(this.Co,t.localize("Video playing in Picture-in-Picture mode")),i.appendChild(this.Co),ti(t.el(),i),this.Po=i,this.yo=!0}}Mo(){this.Ao&&!this.Io&&this.t.Eo&&(this.Do=this.t.Eo.No(ui,this.Fo),this.Io=!0)}Bo(){this.Do&&this.t.Eo&&(this.t.Eo.$o(this.Do),this.Io=!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"}So(){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=""}Ro(){oi(this.mo,"theo-pip"),this.eo&&this.vo&&oi(this.mo,"theo-pip-"+this.vo),this.Po&&(Yt(this.Po),this.Po=void 0)}bn(){this.Ro(),this.Bo(),this.Oo(),this.t.pn(X.oo,this.ao),this.t.pn(X.co,this.lo),this.t.fo.off("languagechange",this.se),this.t=void 0}constructor(t,i,s){super(),this.Vo=!1,this.no=!1,this._o=!1,this.ko=!1,this.yo=!1,this.Io=!1,this.To=!1,this.ao=()=>{this.Vo=!0,this.Ao&&!this.eo&&this.Do&&this.Uo&&this.Do.Lo<=this.Uo&&this.po(!1)},this.lo=()=>{this.uo||(this.Vo=!1,this.io(),this.xo(!1))},this.se=()=>{if(this.Co){const t=this.t.fo;d(this.Co,t.localize("Video playing in Picture-in-Picture mode"))}},this.Fo=t=>{!this.ko&&this.Ao&&(j(t)||(this.Uo&&t<=this.Uo||this.To?this.no||this._o||this.po(!1):this.no?this.xo(!1):this._o=!1))},this.Uo=i.visibility,this.vo=i.position,this.uo=i.retainPresentationModeOnSourceChange,this.Ao=void 0!==this.Uo,this.t=t,this.mo=t.Ho,this.io=s,this.ho()}},Ku=class extends kt{zo(){let t=super.zo();return t===P.INLINE&&this.Wo.eo?P.PICTURE_IN_PICTURE:t}qo(t){return t===P.PICTURE_IN_PICTURE||super.qo(t)}Go(t){this.Xo=this.Jo,t===P.FULLSCREEN||t===P.NATIVE_PICTURE_IN_PICTURE?this.Wo.Bo():this.Wo.Mo(),super.Go(t)}Qo(t){super.Qo(t),t===P.PICTURE_IN_PICTURE?L(this.Ko.Yo((t=>this.Zo(t)))):t===P.FULLSCREEN?this.Wo.xo(!1):this.Wo.xo(!0)}async Zo(t){R(t),await Promise.all([this.ta(),this.ia.xo()]).catch(Si),R(t),this.Wo.po(!this.sa),this.jo(new bt(this.Jo)),this.sa=!1,this.ea=!1}ki(){this.ea||(this.Wo.eo&&this.na.cs?this.Go(P.FULLSCREEN):this.Xo!==P.PICTURE_IN_PICTURE||this.na.cs?super.ki():(this.sa=!0,this.Go(P.PICTURE_IN_PICTURE)))}bn(){super.bn(),this.Wo.bn(),this.ra.pn(X.oo,this.ha),this.ra=void 0}constructor(t,i,s,e){super(i,s),this.Xo=P.INLINE,this.sa=!1,this.io=()=>{this.Jo===P.PICTURE_IN_PICTURE&&this.Go(P.INLINE)},this.oa=t=>{this.ea||(this.Jo!==P.PICTURE_IN_PICTURE||this.Wo.eo?this.Jo!==P.PICTURE_IN_PICTURE&&this.Wo.eo&&(this.sa=!0,this.Go(P.PICTURE_IN_PICTURE)):this.Go(P.INLINE))},this.ha=()=>{this.zo()!==P.PICTURE_IN_PICTURE&&this.zo()!==P.INLINE||this.Wo.Mo(),this.ra.pn(X.oo,this.ha)},this.ra=t,this.Wo=new Yu(t,e.pip,this.io),this.Wo.wn(gt.MODE_CHANGE,this.oa),this.ra.wn(X.oo,this.ha)}};Bt();var Zu,tc=class extends z{get aa(){return pt.ua(this.fo.el())||this.fo.supportsFullScreen()}get cs(){return this.fo.isFullscreen()||this.ca}po(){this.fo.requestFullscreen()}xo(){this.fo.exitFullscreen(),this.la.xo()}bn(){this.Oo(),this.fo.off("fullscreenchange",this.fa),this.la.pn(H.da,this.fa),this.la.pn(H.va,this.Os),this.fo.isFullWindow&&this.fo.exitFullscreen()}constructor(t,i){super(),this.Us=!1,this.ca=!1,this.pa=!1,this.fa=()=>{if(this.pa)return;const t=this.Us,i=this.cs;t!==i&&(this.Us=i,this.jo(new lt))},this.ma=()=>{this.ca=this.la.cs,this.fa()},this.ga=()=>{this.pa||(this.fo.isFullWindow&&this.fo.supportsFullScreen()||this.ca&&!this.fo.supportsFullScreen())&&(this.pa=!0,this.fo.exitFullscreen(),this.fo.requestFullscreen(),this.pa=!1,this.fa())},this.fo=t,this.la=i,this.fo.on("fullscreenchange",this.fa),this.la.wn(H.da,this.ma),this.la.wn(H.ya,this.ga),this.la.wn(H.va,this.Os),this.fa()}};function ic(t){return class extends t{get Eo(){return this.ba}cs(){return this.wa.zo()===P.FULLSCREEN}ka(){return function(t,i){let s=g.create(t);const e=i.fo;return at(s,{get controls(){return e.controls()},set controls(t){e.controls(ft(t))},get presentation(){return i.wa._a},get presentationMode(){return i.wa.zo()},set presentationMode(t){const s=$(t);s&&i.wa.Go(s)},get ui(){return e},get visibility(){return i.Eo._a}})}(this.ja,this)}bn(){super.bn(),this.wa.bn(),this.xa.bn(),this.fo.dispose(),this.ba.bn()}Sa(t){this.fo.src(""),super.Sa(t)}constructor(t,i,s){super(i,s),this.Ho=t,this.ba=new fi(t),this.ja=super.ka(),g.defineProperty(this.ja,"constructor",{value:xi}),this.fo=Gu(this.ja,this.Ho,s.ui),this.xa=new tc(this.fo,this.Ta),this.wa=new Ku(this,this.xa,this.Pa.Ca(),s),this.wa.wn(gt.MODE_CHANGE,this.Os)}}}function sc(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(Lt(t)&&!j(t))return Ii(t,0,1)}(t.visibility),t.retainPresentationModeOnSourceChange=ft(t.retainPresentationModeOnSourceChange),t}function ec(t){const i=N(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=sc(i.pip),i}function nc(){return Zu||(Zu=function(t){let i=t;for(const t of Ki)i=t(i);return i}(Zu=ic(ki()))),Zu}function rc(t,i){const s=ec(i),e=h.createElement("div");di(e),t.appendChild(e);const n=new(nc())(t,e,s);n.Ma=n;let r=n._a;return n.Aa(),n.Ia(pi),g.defineProperty(r,"constructor",{value:rc}),r=ht(r),hi(n),function(t){for(const i of Zi)i(t)}(n),r}Bt(),Bt(),Bt(),Bt(),Bt();var hc="theo-cast-",oc=Jo.getComponent("Button"),ac=class extends(na(oc)){get Ea(){throw new v("Da")}get Na(){return this.h.Na}get Fa(){return this.h.Fa}buildCSSClass(){return hc+"button theo-"+this.Fa+"-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=hc+"svg-container",r.innerHTML=this.Na,e.appendChild(n),e.appendChild(r),e}handleClick(t){var i;if(super.handleClick(t),this.Ba===W.AVAILABLE)null==(i=this.Ea)||i.start();else if(this.Ba===W.CONNECTED||this.Ba===W.CONNECTING){var s;null==(s=this.Ea)||s.stop()}}$a(t){oi(this.mo,"theo-"+this.Fa+"-"+this.Ba),this.Ba=t,r(this.mo,"theo-"+this.Fa+"-"+this.Ba),this.se()}se(){this.Ra(this.Ba),this.Be.Fe=this.controlText()}Ra(t){t===W.CONNECTED?this.controlText("Stop Casting"):t===W.AVAILABLE?this.controlText("Start Casting"):t===W.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")}constructor(t,i){var s;super(t,i),this.mo=t.el(),this.Ba=W.UNAVAILABLE,this.controlText("Unavailable"),this.Be=new Aa(this,this.controlText()),null==(s=this.Ea)||s.addEventListener("statechange",(t=>{const i=t;this.$a(i.state)})),_i.Zs.Ye&&(this.Oa=new ga(this.el())),this.$a(this.Ea?this.Ea.state:W.UNAVAILABLE),this.on(t,"languagechange",this.se)}},uc=0;function cc(){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-'+uc+'">\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-'+uc+')">\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 uc++,t}Jo.registerComponent("chromecastButton",class extends ac{get Ea(){var t;return null==(t=this.ks.cast)?void 0:t.chromecast}constructor(t,i){super(t,Vi({},i,{Fa:"chromecast",Na:cc()}))}}),Bt();var lc="theo-chromecast-",fc=Jo.getComponent("Component"),dc=class t extends(na(fc)){buildCSSClass(){return lc+"overlay "+super.buildCSSClass()}createEl(){const i=super.createEl();r(i,lc+"overlay");const s=Jo.createEl("div",{className:lc+"status-icon",innerHTML:t.ICON_SVG}),e=Jo.createEl("div",{className:lc+"status-info"});d(e,"Playing on");const n=Jo.createEl("div",{className:lc+"status-title"}),h=Jo.createEl("div",{className:lc+"status"});return this.kr=n,h.appendChild(s),h.appendChild(e),h.appendChild(n),i.appendChild(h),i}dispose(){var t;null==(t=this.Va)||t.removeEventListener("statechange",this.update),this.Va=void 0,this.ks.removeEventListener("play",this.update),super.dispose()}constructor(t,i){var s,e;super(t,i),this.update=()=>{this.Va?(this.kr&&d(this.kr,this.Va.receiverName||""),this.Va.state===W.CONNECTED?this.show():this.hide()):this.hide()},this.Va=null==(s=this.ks.cast)?void 0:s.chromecast,null==(e=this.Va)||e.addEventListener("statechange",this.update),this.ks.addEventListener("play",this.update),this.update()}};dc.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>',Jo.registerComponent("chromecastOverlay",dc),Bt(),Bt();Jo.registerComponent("airplayButton",class extends ac{dispose(){var t,i;null==(t=this.ks.ads)||t.removeEventListener("adbreakbegin",this.Ua),null==(i=this.ks.ads)||i.removeEventListener("adbreakend",this.La),this.ks.removeEventListener("currentsourcechange",this.La),super.dispose()}get Ea(){var t;return null==(t=this.ks.cast)?void 0:t.airplay}constructor(t,i){var s,e;super(t,Vi({},i,{Fa:"airplay",Na:'\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.La=()=>{this.enable()},this.Ua=()=>{this.disable()},null==(s=this.ks.ads)||s.addEventListener("adbreakbegin",this.Ua),null==(e=this.ks.ads)||e.addEventListener("adbreakend",this.La),this.ks.addEventListener("currentsourcechange",this.La)}}),Bt(),Bt(),Bt(),Bt();var vc={Default:"","Monospaced Serif":Rt.Ha,"Proportional Serif":Rt.za,"Monospaced Sans-Serif":Rt.Wa,"Proportional Sans-Serif":Rt.qa},pc={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},mc=[50,75,100,150,200];function gc(t){return{label:t+"%",value:t}}function yc(t){return g.keys(t).map((i=>({label:i,value:t[i]})))}mc.map((function(t){return{label:t+"%",value:t/100+"em"}}));var bc=mc.map((function(t){return{label:t+"%",value:t+"%"}})),wc=[25,50,75,100].map(gc),kc=[0,25,50,75,100].map(gc),_c=yc(pc),jc=yc(vc),xc=yc({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),Sc=100,Tc="#000000",Cc="#FFFFFF",Pc="#000000";Bt();var Mc=class extends mu{Ga(){let t=this.Vr.localize(this.Xa);d(this.Ja.subMenu.menuHeader.el(),t),this.Or=h.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",d(this.Or,t);let i=h.createElement("span");return i.className="theo-primary-color theo-settings-control-menu-item-value",r(this.Ja.el(),"theo-subtitle-options-menu-item"),this.Ja.el().appendChild(this.Or),this.Ja.el().appendChild(i),i}Qa(t){const i=this.Ir(t);i&&this.Ya(i)}Ka(){return this.Sr}Nr(t){this.Za(t.Er)}Ya(t){for(let t of this.Mr.menuItems)t.selected(!1);t?(t.selected(!0),this.tu(t.Er.label)):this.tu("Custom")}tu(t){this.iu=t,d(this.su,this.Vr.localize(t)),this.Ja.parentMenu.oe()}Dr(t){let i=super.Dr(t);return r(i.el(),"theo-subtitle-options-menu-item"),this.$r(i),i}$r(t){const i=this.Vr.localize(t.Er.label);d(t.el(),i);const s=this.Vr.localize("Set "+this.Xa+" to ")+i;t.el().setAttribute("aria-label",s)}Ve(){this.Vr.off("languagechange",this.se),super.Ve()}constructor(t,i,s,e){super(t.subMenu),this.Ja=t,this.Vr=e,this.iu="",this.se=()=>{let t=this.Vr.localize(this.Xa);d(this.Ja.subMenu.menuHeader.el(),t),d(this.Or,t),this.tu(this.iu);for(const t of this.Ar)this.$r(t)},this.Xa=i,this.Za=s.eu,this.su=this.Ga(),this.Sr=s.nu,this.Vr.on("languagechange",this.se)}};Bt();var Ac=class t{static ru(t,i,s,e){if(void 0===t&&void 0===i)return;return Zt(void 0===t?s:t,void 0===i?e:i)}constructor(i){this.hu=i,this.ou=t=>{this.hu.fontFamily=t.value},this.au=t=>{this.hu.fontSize=t.value},this.uu=i=>{this.cu=i.value,this.hu.fontColor=t.ru(this.lu,this.cu,Cc,Sc)},this.fu=i=>{this.lu=i.value,this.hu.fontColor=t.ru(this.lu,this.cu,Cc,Sc)},this.du=i=>{this.vu=i.value,this.hu.backgroundColor=t.ru(this.vu,this.pu,Tc,Sc)},this.mu=i=>{this.pu=i.value,this.hu.backgroundColor=t.ru(this.vu,this.pu,Tc,Sc)},this.gu=i=>{this.yu=i.value,this.hu.windowColor=t.ru(this.yu,this.bu,Pc,Sc)},this.wu=i=>{this.bu=i.value,this.hu.windowColor=t.ru(this.yu,this.bu,Pc,Sc)},this.ku=t=>{this.hu.edgeStyle=t.value}}};Bt();var Ic=class{_u(t,i){const s=this.ju(t,i.Ka());s&&i.Qa(s)}ju(t,i){return C(i,(i=>i.value===t))}xu(t,i,s){let e,n;if(void 0===t)e=this.ju(void 0,i.Ka()),n=this.ju(void 0,s.Ka());else if(t){let r=function(t){let i=Qt(t);i||(i=Qt(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=Ut(zt(t),1));if(!i){let s=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=Ut(zt(pc[s]),1)}return i}(t);if(r){let t=Gt(r),h=100*r.Su;e=this.ju(t,i.Ka()),n=this.ju(h,s.Ka())}}e&&i.Qa(e),n&&s.Qa(n)}constructor(t,i){this.hu=t,this.Tu=i,this.Cu=()=>{let t=this.hu.fontFamily;this._u(t,this.Tu["Font family"]);let i=this.hu.fontColor;this.xu(i,this.Tu["Font color"],this.Tu["Font opacity"]);let s=this.hu.fontSize;this._u(s,this.Tu["Font size"]);let e=this.hu.backgroundColor;this.xu(e,this.Tu["Background color"],this.Tu["Background opacity"]);let n=this.hu.windowColor;this.xu(n,this.Tu["Window color"],this.Tu["Window opacity"]);let r=this.hu.edgeStyle;this._u(r,this.Tu["Character edge style"])},this.hu.addEventListener("change",this.Cu),this.Cu()}};var Ec=class extends mu{Pu(){return{"Font family":{nu:Dc(jc),eu:this.Mu.ou},"Font color":{nu:Dc(_c),eu:this.Mu.fu},"Font opacity":{nu:Dc(wc),eu:this.Mu.uu},"Font size":{nu:Dc(bc),eu:this.Mu.au},"Background color":{nu:Dc(_c),eu:this.Mu.du},"Background opacity":{nu:Dc(kc),eu:this.Mu.mu},"Window color":{nu:Dc(_c),eu:this.Mu.gu},"Window opacity":{nu:Dc(kc),eu:this.Mu.wu},"Character edge style":{nu:Dc(xc),eu:this.Mu.ku}}}Au(){this.Or=h.createElement("span"),this.Or.className="theo-settings-control-menu-item-title",this.Iu=h.createElement("span"),this.Iu.className="theo-primary-color theo-settings-control-menu-item-value",this.Xr.el().appendChild(this.Or),this.Xr.el().appendChild(this.Iu),this.se()}Dr(t){let i=this.Mr.addSubMenuItem();return i.Er=t,this.Tu[t]=new Mc(i,t,this.Eu[t],this.Vr),i}$r(t){}Nr(t){}Ve(){this.Vr.off("languagechange",this.se),this.Du.removeEventListener(["addtrack","removetrack"],this.Nu),super.Ve()}constructor(t,i,s,e){super(t.subMenu),this.Xr=t,this.Du=i,this.Vr=e,this.Tu={},this.Nu=()=>{this.Du.some((t=>Pt(t.kind)))?this.Xr.show():this.Xr.hide()},this.se=()=>{d(this.Mr.menuHeader.el(),this.Vr.localize("Subtitle Options")),d(this.Or,this.Vr.localize("Subtitle")),d(this.Iu,this.Vr.localize("Options")),this.Xr.el().setAttribute("aria-label",this.Vr.localize("Open the subtitle options menu"))},this.Mu=new Ac(s),this.Eu=this.Pu(),this.Sr=g.keys(this.Eu),this.Au(),this.Fu=new Ic(s,this.Tu),this.Vr.on("languagechange",this.se),this.Du.addEventListener(["addtrack","removetrack"],this.Nu),this.Nu()}};function Dc(t){let i=[{label:"Default",value:void 0}];for(let s of t)"Default"!==s.label&&i.push(s);return i}!function(t){Zi.push(t)}((function(t){const i=t.fo.controlBar.getChild("SettingsButton").menu,s=i.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),e=new Ec(s,t.nt._a,t.Bu._a,t.fo);t.fo.on("dispose",(()=>{i.removeMenuItem(s),s.dispose(),e.Ve(),i.dispose()}))})),Bt(),Bt(),Bt(),Bt(),Bt(),Bt();var Nc=.02,Fc=class{$u(t){const i=t-this.Ou.Ru-20,s=t-this.Ou.Ru+20;if(0===this.Ou.vo)return;const e=this.Ou.t.currentProgramDateTime.valueOf();e>s?this.Vu(this.Uu):e<i?this.Vu(this.Lu):this.Vu(this.Hu)}zu(t){const i=t-this.Ou.Ru/1e3-Nc,s=t-this.Ou.Ru/1e3+Nc;if(0===this.Ou.vo)return;const e=this.Ou.t.currentTime;e>s?this.Vu(this.Uu):e<i?this.Vu(this.Lu):this.Vu(this.Hu)}Wu(){this.Hu=this.ra.qu,this.Uu=this.ra.qu-.05,this.Lu=this.ra.qu+.05}Vu(t){const i=this.Ou.t;if(i.playbackRate!==t&&0!==i.playbackRate){t>=.2&&t<=2.05?i.playbackRate=t:this.ra.Gu(this.Ou)}}Xu(){this.ra.pn(X.Ju,this.Qu),this.ra.pn(X.Yu,this.Ku)}constructor(t,i){this.Hu=1,this.Uu=1.05,this.Lu=.95,this.Qu=()=>{this.Wu()},this.Ku=()=>{if(!this.ra.Zu)return;const t=this.ra.Zu.Ru,i=this.ra.tc,s=this.ra.ic;null!==s?this.$u(s.valueOf()+t):this.zu(i+t/1e3)},this.Ou=t,this.ra=i,this.ra.wn(X.Ju,this.Qu),this.ra.wn(X.Yu,this.Ku)}},Bc=class{get t(){return this.ra}get _a(){var t;return null!=(t=this.sc)?t:this.sc=function(t){return{get label(){return t.Sh},get position(){return t.vo},set position(i){t.vo=i},get muted(){return t.ec},set muted(i){t.ec=i},get canResize(){return t.nc},get x(){return t.Wh},set x(i){t.Wh=i},get y(){return t.qh},set y(i){t.qh=i},get width(){return t.Ti},set width(i){t.Ti=i},get height(){return t.Ci},set height(i){t.Ci=i},get enabled(){return t.Rt},set enabled(i){t.Rt=i},get offset(){return t.Ru},set offset(i){t.Ru=i},remove(){t.rc()}}}(this)}get Sh(){return this.hc}get vo(){return this.ac.oc.indexOf(this)}set vo(t){this.ac.uc(this,t)}get ec(){return this.ra.muted}set ec(t){this.Rt&&(this.ac.cc=this,this.lc(t))}get nc(){return 0!==this.vo&&this.ac.fc===Kc.OVERLAY}get Wh(){return this.dc}set Wh(t){this.nc&&(this.vc||(this.vc=!0),this.dc=t>1-this.Ti?1-this.Ti:w.max(t,0),this.t.element.style.setProperty("left",100*this.dc+"%"))}get qh(){return this.mc}set qh(t){this.nc&&(this.vc||(this.vc=!0),this.mc=t>1-this.Ci?1-this.Ci:w.max(t,0),this.t.element.style.setProperty("top",100*this.mc+"%"))}get Ti(){return this.gc}set Ti(t){this.nc&&this.yc(t)}get Ci(){return this.bc}set Ci(t){this.nc&&this.yc(t)}get Rt(){return this.We}set Rt(t){t!==this.We&&0!==this.vo&&(t?(L(this.ac.Gu(this)),this.ac.wc(this),this.t.element.style.setProperty("display","block")):(this.t.pause(),this.t.element.style.setProperty("display","none")),this.We=t,this.ac.kc(this))}get _c(){return this.vc}set _c(t){this.vc=t}get jc(){return this.xc}set jc(t){this.xc=t}get Ru(){return this.Sc}set Ru(t){this.Sc=t,this.Tc(this.ac.tc,this.ac.ic)}Cc(t,i,s,e,n){!this.vc&&n&&(this.vc=!0),this.dc=t,this.mc=i,this.gc=s,this.bc=e}lc(t){this.ra.muted=t}rc(){0!==this.vo&&this.ac.Pc(this)}Mc(){this.t.element.style.setProperty("top",100*this.mc+"%"),this.t.element.style.setProperty("left",100*this.dc+"%"),this.t.element.style.setProperty("width",100*this.gc+"%")}yc(t){const i=this.dc+this.gc,s=w.min(t,i),e=.9-this.mc,n=w.min(t,e),r=w.max(w.min(s,n),.1),h=this.gc-r;this.gc=r,this.bc=r,this.Wh+=h,this.t.element.style.setProperty("width",100*r+"%")}Tc(t,i){if(null!==i){const t=i.valueOf()-this.Ru;this.ra.currentProgramDateTime=new Date(t)}else this.ra.currentTime=t-this.Ru/1e3}Ac(t){const i=this.t.element.getElementsByClassName(qc)[0],s=t?Xc:Gc;oi(i,t?Gc:Xc),r(i,s)}Xu(){this.Ic.Xu(),this.ra.element.remove(),this.ra.destroy()}constructor(t,i,s,e){this.We=!0,this.vc=!1,this.xc=0,this.hc=t,this.ra=i,this.ac=s,this.Ic=new Fc(this,s),this.Sc=null!=e?e:0,this.gc=.2,this.bc=.2,this.dc=.76,this.mc=0}};Bt();var $c=class{get multiViewPlayer(){return this.ac}get abr(){}get audioTracks(){return this.Ec}get autoplay(){return this.ac.autoplay}set autoplay(t){this.ac.autoplay=t}get buffered(){return this.ac.buffered}get canvas(){}get clip(){return this.Dc._a}get currentProgramDateTime(){return null}get currentTime(){return this.ac.currentTime}set currentTime(t){this.ac.currentTime=t}get duration(){return this.ac.duration}get element(){return this.Hs}get ended(){return this.ac.ended}get error(){}get errorObject(){return this.ac.errorObject}get latency(){}get loop(){return!1}get metrics(){}get muted(){return this.ac.muted}set muted(t){this.ac.muted=t}get network(){}get paused(){return this.ac.paused}get playbackRate(){return this.ac.playbackRate}set playbackRate(t){this.ac.playbackRate=t}get played(){return this.ac.played}get poster(){return""}get preload(){return""}get presentation(){}get readyState(){return this.ac.readyState}get seekable(){return this.ac.seekable}get seeking(){return this.ac.seeking}get source(){}get src(){return"dummySource"}get textTrackStyle(){return this.Nc}get textTracks(){return this.Fc}addTextTrack(t){throw v("Not implemented")}get uid(){return 0}get videoHeight(){return 0}get videoTracks(){return this.Ec}get videoWidth(){return 0}get volume(){return this.ac.volume}set volume(t){this.ac.volume=t}get views(){return this.ac.views}get visibility(){}get layout(){return this.ac.layout}set layout(t){this.ac.layout=t}play(){this.ac.play()}pause(){this.ac.pause()}stop(){this.ac.stop()}destroy(){this.ac.destroy()}prepareWithUserAction(){this.ac.prepareWithUserAction()}addEventListener(t,i){this.Bc.wn(t,i)}removeEventListener(t,i){this.Bc.pn(t,i)}setSource(t){}constructor(t,i){this.Bc=new z,this.ac=t,this.Hs=i,this.Dc=new jt,this.Ec=(new ai)._a,this.Fc=(new li)._a,this.Nc=(new Mt)._a,this.ac.addEventListener(["play","pause","seeking","seeked","timeupdate","ended","playing","waiting","sourcechange","readystatechange","loadedmetadata","loadeddata","canplay","canplaythrough","loadstart","progress","durationchange","volumechange","ratechange","error"],this.Bc.Os)}};Bt();var Rc=class extends q{constructor(t){super(Yc.$c),this.view=t}};Bt();var Oc=class extends q{constructor(t,i){super(Yc.VIEW_POSITION_CHANGE),this.oldPosition=t,this.newPosition=i}};Bt();var Vc=class extends q{constructor(t){super(Yc.Rc),this.view=t}};Bt();var Uc=class extends q{constructor(t){super(Yc.VIEW_CHANGE),this.view=t}};Bt();var Lc=class extends q{constructor(t){super(Yc.Oc),this.layout=t}};Bt();var Hc=class extends z{get tc(){return this.ra.tc}get Vc(){return this.ra.Vc}get lt(){return this.ra.Uc}get Lc(){return this.ra.Lc}get Hc(){return this.ra.Hc}get zc(){return this.ra.zc}get Wc(){return!1}get qc(){return!1}Xu(){this.Oo()}constructor(t){super(),this.Gc=t=>{this.Os(new yi(t.source))},this.Xc=t=>{this.Os(new Ei(t.currentTime))},this.Jc=t=>{this.Os(new Mi(t.currentTime))},this.Qc=t=>{this.Os(new zi(t.currentTime))},this.Yc=t=>{this.Os(new Gi(t.currentTime))},this.Kc=t=>{this.Os(new nt(t.currentTime,t.currentProgramDateTime))},this.Zc=t=>{this.Os(new Ui(t.currentTime))},this.tl=t=>{this.Os(new Kt(t.currentTime))},this.il=t=>{this.Os(new Ht(t.currentTime))},this.sl=t=>{this.Os(new It(t.currentTime,t.readyState))},this.nl=t=>{this.Os(new $t(t.currentTime,this.Hc))},this.rl=t=>{this.Os(new Vt(t.currentTime,this.Hc))},this.hl=t=>{this.Os(new qt(t.currentTime,this.Hc))},this.ol=t=>{this.Os(new Jt(t.currentTime,this.Hc))},this.al=()=>{this.Os(new Et)},this.cl=t=>{this.Os(new T(t.currentTime))},this.ll=t=>{this.Os(new Fi(t.duration))},this.fl=t=>{this.Os(new Qi(this.tc,t.volume))},this.dl=t=>{this.Os(new Ri(this.tc,t.playbackRate))},this.vl=t=>{this.Os(new Xi(t.errorObject))},this.pl=()=>{this.Os(new lt)},this.ra=t,this.ra.wn("sourcechange",this.Gc),this.ra.wn("play",this.Xc),this.ra.wn("pause",this.Jc),this.ra.wn("seeking",this.Qc),this.ra.wn("seeked",this.Yc),this.ra.wn("timeupdate",this.Kc),this.ra.wn("ended",this.Zc),this.ra.wn("playing",this.tl),this.ra.wn("waiting",this.il),this.ra.wn("readystatechange",this.sl),this.ra.wn("loadedmetadata",this.nl),this.ra.wn("loadeddata",this.rl),this.ra.wn("canplay",this.hl),this.ra.wn("canplaythrough",this.ol),this.ra.wn("loadstart",this.al),this.ra.wn("progress",this.cl),this.ra.wn("durationchange",this.ll),this.ra.wn("volumechange",this.fl),this.ra.wn("ratechange",this.dl),this.ra.wn("error",this.vl),this.ra.wn("fullscreenchange",this.pl)}};Bt();var zc=class{async ml(){const t=this.ra;if(!t.gl||!t.Lc)return;const i=this.yl.mutedAutoplay;switch(await this.wl.bl(t.ec)){case"all":t.ec||t.kl(),t._l();break;case"muted":(t.ec||i===I.ALL)&&(t.ec=!0,t._l())}}bn(){this.wl.bn(),this.mn.bn()}constructor(t,i,s){this.ra=t,this.yl=s,this.Nc=new Mt,this.mn=new ut(i);const e=new O(this.mn,this.Nc,1,[vt.jl]);this.wl=new U(e)}},Wc=[S.xl,S.Sl,S.Tl,S.Cl],qc="theo-switch-audio-button",Gc="vjs-icon-volume-mute",Xc="vjs-icon-volume-high",Jc="theo-main-view",Qc="theo-layout-",Yc=function(t){return t.$c="addview",t.Rc="removeview",t.VIEW_CHANGE="viewchange",t.VIEW_POSITION_CHANGE="viewpositionchange",t.Oc="layoutchange",t}({}),Kc=function(t){return t.GALLERY="gallery",t.OVERLAY="overlay",t.SPOTLIGHT="spotlight",t}({}),Zc=class extends z{get _a(){var t;return null!=(t=this.sc)?t:this.sc=function(t){return{load:(i,s,e,n)=>t.Rn(i,s,e,n),get views(){return t.oc.map((t=>t._a))},get mainVideoView(){var i;return null==(i=t.Zu)?void 0:i._a},get mainAudioView(){var i;return null==(i=t.cc)?void 0:i._a},get ui(){return t.fo},get layout(){return t.fc},set layout(i){t.fc=i},get buffered(){return t.Pl},get currentTime(){return t.tc},set currentTime(i){t.tc=i},get autoplay(){return t.gl},set autoplay(i){t.gl=i},get duration(){return t.ct},get ended(){return t.Vc},get errorObject(){return t.Uc},get muted(){return t.ec},set muted(i){t.ec=i},get paused(){return t.Lc},get playbackRate(){return t.qu},set playbackRate(i){t.qu=i},get played(){return t.Ml},get readyState(){return t.Hc},get seekable(){return t.Al},get seeking(){return t.zc},get volume(){return t.Il},set volume(i){t.Il=i},play(){t._l()},pause(){t.El()},stop(){t.Dl()},destroy(){t.Xu(),t=null},requestFullscreen(i){t.Nl(i)},exitFullscreen(){t.ta()},prepareWithUserAction(){t.kl()},addEventListener(i,s){t.wn(i,s)},removeEventListener(i,s){t.pn(i,s)}}}(this)}get fo(){return this.Fl}get oc(){return this.Bl}get Zu(){return this.$l}get cc(){var t;return null!=(t=this.Rl)?t:this.$l}set cc(t){if(this.Rl===t)return;const i=this.cc,s=null!=t?t:this.Zu;i.t.removeEventListener(X.Ol,this.Vl),i.Ac(!1),i.ec||(i.lc(!0),s.lc(!1)),s.t.addEventListener(X.Ol,this.Vl),s.Ac(!0),this.Rl=t}get fc(){return this.Ul}set fc(t){if(t!==this.Ul){if("overlay"===this.fc)for(const t of this.oc)t.t.element.style.setProperty("left","auto"),t.t.element.style.setProperty("top","auto"),t.t.element.style.removeProperty("z-index");oi(this.Hs,Qc+this.Ul),this.Ul=t,r(this.Hs,Qc+this.Ul),this.Mc(),this.jo(new Lc(t))}}get Pl(){if(0===this.oc.length)return vi.Ll().ws();return this.Hl().reduce(((t,i)=>t.Cn(vi.Sn(i.t.buffered))),new vi([0,1/0])).ws()}get tc(){return this.$l&&this.zl?this.$l.t.currentTime+this.$l.Ru/1e3:0}set tc(t){this.Wl();const i=this.Hl();let s=null;if(null!==this.ic){s=this.ic;const i=t-this.tc;s.setSeconds(s.getSeconds()+i)}for(const e of i)e.Tc(t,s)}get ic(){if(!this.$l)return null;return this.oc.every((t=>null!==t.t.currentProgramDateTime))?new Date(this.$l.t.currentProgramDateTime.valueOf()+this.$l.Ru):null}get gl(){return this.ql}set gl(t){this.ql=t,this.Gl.ml()}get ct(){if(0===this.oc.length)return NaN;let t=1/0;for(const i of this.Hl())t=w.min(i.t.duration,t);return t}get Vc(){return this.oc.some((t=>t.t.ended))}get lt(){return this.Uc}get Uc(){if(this.Xl)return this.Xl;for(const t of this.oc){const i=t.t.errorObject;if(void 0!==i)return i}}get ec(){var t,i;return null!=(i=null==(t=this.cc)?void 0:t.ec)&&i}set ec(t){this.cc&&this.cc.lc(t),this.Vl()}get Lc(){if(!this.oc.length)return!0;return this.Hl().some((t=>t.t.paused))}get qu(){var t,i,s;return null!=(s=null!=(i=this.Jl)?i:null==(t=this.$l)?void 0:t.t.playbackRate)?s:1}set qu(t){if(void 0!==this.Jl)this.Jl=t;else for(const i of this.oc)i.t.playbackRate=t;this.Ql()}get Ml(){return this.oc.reduce(((t,i)=>t.Yl(vi.Sn(i.t.played))),vi.Ll()).ws()}get Hc(){if(0===this.oc.length)return Nt.Kl;let t=Nt.Zl;for(const i of this.Hl())i.t.readyState<t&&(t=i.t.readyState);return t}get Al(){if(0===this.oc.length)return vi.Ll().ws();return this.Hl().reduce(((t,i)=>t.Cn(vi.Sn(i.t.seekable))),new vi([0,1/0])).ws()}get zc(){return this.oc.some((t=>t.t.seeking))}get Il(){var t,i;return null!=(i=null==(t=this.cc)?void 0:t.t.volume)?i:1}set Il(t){for(const i of this.oc)i.t.volume=t;this.Vl()}Rn(t,i,s,e){if(this.tf)throw this.Xl;const n=this.oc.filter((i=>i.Sh===t))[0];return n?n._a:this.if(t,i,s,e)}_l(){if(!this.$l||!this.Lc)return;this.Wl();const t=this.Hl();for(const i of t)i.t.play()}El(){const t=this.Hl();for(const i of t)i.t.pause()}Dl(){for(let t=this.oc.length-1;t>=0;t--)this.Pc(this.oc[t]);this.$l=void 0,this.Rl=void 0,this.Xl=void 0,this.sf&&(this.sf.ef(),this.sf=void 0),this.nf=!0,this.rf=!1,this.hf=!1,this.af=-1,this.uf=Nt.Kl,this.cf=!1,this.Jl=void 0,this.lf=!1,this.ff=-1,this.df=!1,this.vf=-1,this.zl=!1,this.pf.rr(),this.jo(new yi(void 0))}Xu(){for(let t=this.oc.length-1;t>=0;t--)this.Pc(this.oc[t]);this.Oo(),this.pf.bn(),this.mf.Xu(),this.gf.Xu(),this.Gl.bn(),this.fo.dispose()}Nl(t){this.jo(new lt),this.Hs.requestFullscreen(t).catch(Si)}ta(){this.jo(new lt),h.exitFullscreen().catch(Si)}kl(){for(const t of this.oc)t.t.prepareWithUserAction()}if(t,i,s,e){const n=h.createElement("div");r(n,"theo-view"),this.Hs.appendChild(n);const o=new(ki())(n,this.yl)._a;o.source=i;const a=new Bc(t,o,this,e);if(s){const t=h.createElement("div");t.className="theo-view-description";const i=h.createElement("span");i.textContent=s,t.appendChild(i),n.appendChild(t),a.t.addEventListener("dimensionchange",(()=>{this.yf(t)}))}return this.bf(a),this.oc.push(a),1===this.oc.length?(this.$l=a,this.wf(this.$l),r(this.$l.t.element,Jc)):(this.kf(o),0!==this.tc&&L(this.Gu(a,!0))),this.Mc(),this.jo(new Rc(a._a)),a._a}Hl(){return this.oc.filter((t=>t.Rt))}_f(){return this.oc.filter((t=>t.Rt&&t!==this.$l))}kf(t){t.volume=this.$l.t.volume,t.muted=!0,t.playbackRate=this.$l.t.playbackRate}bf(t){t.jc=this.oc.length;const i=t.t.element;i.addEventListener("dblclick",(()=>{this.jf(t)})),i.addEventListener("touchend",(i=>{this.xf>=i.timeStamp?(i.preventDefault(),this.jf(t),this.xf=0):this.xf=i.timeStamp+500}));const s=h.createElement("div"),e=0===this.oc.length?Xc:Gc;s.className="theo-primary-color "+qc+" "+e,s.addEventListener("click",(()=>{this.cc=t})),s.addEventListener("touchend",(()=>{this.cc=t})),i.appendChild(s);const n=h.createElement("div");n.className="theo-primary-color theo-disable-button vjs-icon-close",n.addEventListener("click",(()=>{t.Rt=!1})),n.addEventListener("touchend",(()=>{t.Rt=!1})),i.appendChild(n),this.Sf(t,i),this.Tf(t),this.Cf(t)}Sf(t,i){const s=h.createElement("div");let e=0;const n=i=>{if(this.Pf=!0,this.wc(t),i.preventDefault(),"touchstart"===i.type){e=i.changedTouches[0].clientX,h.addEventListener("touchmove",r),h.addEventListener("touchend",o),h.addEventListener("touchcancel",o)}else{e=i.x,h.addEventListener("mousemove",r),h.addEventListener("mouseup",o)}},r=i=>{let s;if("touchmove"===i.type){s=i.changedTouches[0].clientX}else{s=i.x}const n=e-s,r=t.t.element.parentElement.clientWidth,h=(t.t.element.clientWidth+n)/r;t.Ti=h,t.Ci=h,e=s},o=t=>{this.Pf=!1,"mouseup"===t.type?(h.removeEventListener("mousemove",r),h.removeEventListener("mouseup",o)):(h.removeEventListener("touchmove",r),h.removeEventListener("touchend",o),h.removeEventListener("touchcancel",o))};s.addEventListener("mousedown",n),s.addEventListener("touchstart",n),s.className="theo-resize-button theo-primary-color vjs-icon-resize-handle-sw",i.appendChild(s)}yf(t){const i=t.parentElement.clientWidth/100,s=w.min(40,5.23*i);t.style.fontSize=s+"px"}Tf(t){const i=t.t.element,s=i.parentElement;let e={x:0,y:0};const n=i=>{if(!this.Pf&&t.nc)if(this.wc(t),i.preventDefault(),"touchstart"===i.type){const t=i;e.x=t.changedTouches[0].clientX,e.y=t.changedTouches[0].clientY,h.addEventListener("touchmove",r),h.addEventListener("touchend",o),h.addEventListener("touchcancel",o)}else{const t=i;e.x=t.x,e.y=t.y,h.addEventListener("mousemove",r),h.addEventListener("mouseup",o)}},r=n=>{let r;if("touchmove"===n.type){const t=n;r={x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}}else{const t=n;r={x:t.x,y:t.y}}const h=r.x-e.x,o=r.y-e.y,a=i.offsetLeft,u=s.clientWidth;t.Wh=(a+h)/u;const c=s.offsetHeight,l=i.offsetTop;t.qh=(l+o)/c,e=r},o=t=>{"mouseup"===t.type?(h.removeEventListener("mouseup",o),h.removeEventListener("mousemove",r)):(h.removeEventListener("touchmove",r),h.removeEventListener("touchend",o),h.removeEventListener("touchcancel",o))};i.addEventListener("mousedown",n),i.addEventListener("touchstart",n)}wc(t){for(const i of this.oc)i.jc>t.jc&&(i.jc-=1,i.t.element.style.setProperty("z-index",""+i.jc));t.jc=this.oc.length,t.t.element.style.setProperty("z-index",""+t.jc)}Wl(){if(void 0!==this.Jl)return;this.Jl=this.qu;const t=this.Hl();for(const i of t)i.t.playbackRate=0}Mf(){if(void 0===this.Jl)return;if(this.zc||this.Hc<Nt.Af){if(this.$l&&!this.zl){this.zl=!0;for(const t of this._f())this.$l.Ru!==t.Ru&&t.Tc(this.tc,this.ic)}return}const t=this.Hl();for(const i of t)i.t.playbackRate=this.Jl;this.Jl=void 0,this.zl=!0}kc(t){t.Rt||t!==this.Rl||(this.cc=void 0),this.jo(new Uc(t._a)),this.Mc()}async Gu(t,i){void 0===i&&(i=!1),this.Wl();const s=t.t;i&&(this.sf=new Q,s.addEventListener(X.co,this.Ms),await this.sf.If,s.removeEventListener(X.co,this.Ms)),s.readyState===Nt.Kl&&(this.lf=!0,s.play()),this.Lc?s.pause():s.play(),t.Tc(this.tc,this.ic)}Mc(){const t=this.Hl();if(!t.length)return;let i=0;switch(this.fc){case"spotlight":{t.length>1?this.Hs.style.gridTemplateColumns="80% 20%":this.Hs.style.gridTemplateColumns="100%";let s=1/0;for(const e of t)if(i>=s+1)e.Rt=!1;else if(e.t.element.style.setProperty("width","100%"),i++,2===i){const i=e.t.element.clientHeight,n=e.t.element.parentElement.clientHeight,r=w.floor(n/i);s=w.min(t.length-1,r),this.Hs.style.gridTemplateRows="repeat("+s+", 1fr)"}break}case"overlay":{let s=0;for(i=1;i<t.length;i++){const e=t[i];if(i>=5)e.Rt=!1;else{if(!e._c){const t=.04+.24*s;e.Cc(e.Wh,t,e.Ti,e.Ci,!1),this.wc(e),s++}e.t.element.style.setProperty("z-index",""+e.jc),e.Mc()}}break}case"gallery":{const s=t.length,e=w.ceil(w.sqrt(s));for(const s of t)i>=9?s.Rt=!1:(s.t.element.style.setProperty("width",100/e+"%"),i++);break}}}uc(t,i){const s=i>=0?w.min(w.floor(i),this.oc.length-1):0,e=t.vo,n=w.min(e,s),r=w.max(e,s),h=0===n;if(!(!this.oc[n].Rt||!this.oc[r].Rt)||!h){if("overlay"===this.fc){const t=this.oc[r],i=this.oc[n],s=t.Wh,e=t.qh,h=t.Ti,o=t.Ci,a=i._c||t._c;t.Cc(i.Wh,i.qh,i.Ti,i.Ci,a),[this.oc[n],this.oc[r]]=[this.oc[r],this.oc[n]],i.Cc(s,e,h,o,a)}else[this.oc[n],this.oc[r]]=[this.oc[r],this.oc[n]];h&&this.Ef(this.oc[0]),this.jo(new Oc(e,s))}}Pc(t){t===this.Rl&&(this.cc=void 0),t.Xu(),A(this.oc,t),this.Mc(),this.jo(new Vc(t._a))}jf(t){this.Vc||0===this.Ml.length||this.$l===t||"gallery"===this.Ul||this.uc(t,0)}Ef(t,i){void 0===i&&(i=!1);let s=!1;const e=this.$l;this.$l=t,t._c=!1,this.Df(e),oi(e.t.element,Jc),this.Rl||(s=e.ec,e.lc(!0),e.Ac(!1),t.Ac(!0),i&&!s?this.jo(new Qi(this.tc,0)):t.lc(s)),this.wc(e),r(this.$l.t.element,Jc),this.wf(this.$l),"overlay"===this.fc&&this.Mc()}Cf(t){t.t.addEventListener(X.Nf,this.Ff),t.t.addEventListener(X.Bf,this.Ah),t.t.addEventListener(X.oo,this.$f),t.t.addEventListener(X.Rf,this.Of),t.t.addEventListener(X.Vf,this.Xe),t.t.addEventListener(X.Uf,this.Lf),t.t.addEventListener(X.Hf,this.zf),t.t.addEventListener(S.Wf,this.qf),t.t.addEventListener(_t.va,this.Ps)}wf(t){t.t.addEventListener(X.Gf,this.Os),t.t.addEventListener(X.Ju,this.Ql),t.t.addEventListener(X.Yu,this.Xf),this.Rl||t.t.addEventListener(X.Ol,this.Vl)}Df(t){t.t.removeEventListener(X.Gf,this.Os),t.t.removeEventListener(X.Ju,this.Ql),t.t.removeEventListener(X.Yu,this.Xf),this.Rl||t.t.removeEventListener(X.Ol,this.Vl)}constructor(t,i,s){super(),this.Bl=[],this.Ul="gallery",this.Pf=!1,this.tf=!1,this.nf=!0,this.rf=!1,this.hf=!1,this.af=-1,this.uf=Nt.Kl,this.cf=!1,this.xf=0,this.Jl=void 0,this.lf=!1,this.ql=!1,this.ff=-1,this.df=!1,this.vf=-1,this.zl=!1,this.Jf=t=>{this.Mf(),V((()=>this.Os(t)))},this.Qf=t=>{this.Wl(),this.Os(t)},this.Ms=()=>{var t;null==(t=this.sf)||t.Yf(),this.sf=void 0},this.Ql=()=>{const t=this.qu;this.vf!==t&&(this.vf=t,this.Os(new Ri(this.tc,t)))},this.Vl=()=>{const t=this.Il,i=this.ec;this.ff===t&&this.df===i||(this.ff=t,this.df=i,this.Os(new Qi(this.tc,t)))},this.Xf=t=>{(this.Hc>Nt.Kf||this.zc)&&this.Os(t)},this.Ff=t=>{this.Mf(),this.zc||(this.rf=!1,this.Os(t))},this.zf=t=>{const i=this.ct;this.af!==i&&(this.af=i,this.Os(t))},this.Ps=t=>{this.Os(t)},this.$f=t=>{if(this.nf){if(this.lf)return void(this.lf=!1);this.nf=!1,this.hf=!1,this.Os(t)}},this.Xe=t=>{this.rf||(this.rf=!0,this.Os(t))},this.Of=t=>{!this.nf&&this.Lc&&(this.nf=!0,this.Os(t))},this.Ah=t=>{this.hf||(this.hf=!0,this.Os(t))},this.Lf=t=>{this.cf||(this.cf=!0,this.Os(t))},this.qf=t=>{const i=this.Hc;this.uf!==i&&(this.uf=i,this.Os(t))},this.Zf=async()=>{try{await this.sd.td([J.MULTIVIEW])}catch(t){this.Dl(),this.Xl=st(t,K.LICENSE_INVALID_FEATURE),this.tf=!0,this.jo(new ni(this.Xl))}},this.ed=t,this.Hs=i,this.yl=s;const e=_i.nd,n=new Ct,h=new it("9.2.0",e,n),o=new Z(s.isEmbeddable,"9.2.0",Y());if(this.sd=new St(e,o,h,n,s,Y()),this.sd.rd().then(this.Zf),this.od=new $c(this._a,this.Hs),this.Fl=Gu(this.od,this.ed,s.ui),r(this.Hs,Qc+this.Ul),_i.Zs.Ks){const t=this.Fl.el();r(t,"theo-mobile"),Xu(t)}this.gf=new Hc(this),this.mf=new Ft(this.gf),this.mf.wn(S.ad,this.Jf),this.pf=new ii(this,!0),this.pf.wn(Wc,this.Os),this.pf.wn(S.ud,this.Qf),this.Gl=new zc(this,t,s)}};function tl(t,i){var s;const e=ec(Vi({},i||{},{allowNativeFullscreen:!1,ui:Vi({},(null==i?void 0:i.ui)||{},{userActions:Vi({},(null==i||null==(s=i.ui)?void 0:s.userActions)||{},{click:!1})}),abr:Vi({},(null==i?void 0:i.abr)||{},{restrictToPlayerSize:!0})})),n=h.createElement("div");di(n),t.appendChild(n);let r=new Zc(t,n,e)._a;return g.defineProperty(r,"constructor",{value:tl}),r=ht(r),r}Bt(),Bt();var il="vjs-selected",sl=class extends mu{$r(t){const i=t.Er,s=this.Vr.localize(i.label);d(t.Sh,s),t.el().setAttribute("aria-label",this.Vr.localize("Enable/disable")+" "+s),t.el().setAttribute("role","menuitemcheckbox"),t.selected(i.enabled)}Dr(t){const i=super.Dr(t);r(i.el(),"theo-multi-view-menu-item"),2===this.Ar.length&&r(i.el(),"theo-multi-view-menu-item-position-zero");const s=h.createElement("span");i.Sh=s;const e=h.createElement("div");e.className="theo-multi-view-menu-item-toggle",i.Th=e;const n=t=>this.Ch(t,i);i.Ph=n,e.addEventListener("click",n);const o=h.createElement("div");return o.className="theo-multi-view-menu-item-toggle-slider",e.appendChild(o),i.el().appendChild(s),i.el().appendChild(e),this.ld.before(i.el()),i}fd(){const t=this.Mr.addMenuItem().el();r(t,"theo-multi-view-menu-item"),r(t,"theo-multi-view-menu-layout-select");const i=h.createElement("button");i.className="vjs-icon-view-grid",i.addEventListener("click",(()=>{this._s.layout=Kc.GALLERY})),t.appendChild(i),this.dd=i;const s=h.createElement("button");s.className="vjs-icon-view-spotlight",s.addEventListener("click",(()=>{this._s.layout=Kc.SPOTLIGHT})),t.appendChild(s),this.vd=s;const e=h.createElement("button");return e.className="vjs-icon-multi-view",e.addEventListener("click",(()=>{this._s.layout=Kc.OVERLAY})),t.appendChild(e),this.pd=e,t}Ch(t,i){t.stopImmediatePropagation(),this.Nr(i)}Nr(t){const i=t.Er;for(const t of this._s.views)t===i&&(t.enabled=!t.enabled);this.$r(t)}Fr(t){t.Th.removeEventListener("click",t.Ph),super.Fr(t)}constructor(t,i,s){super(t),this.md=t=>{this.Pr(t.view)},this.gd=t=>{this.Cr(t.view)},this.yd=t=>{const i=t.oldPosition,s=t.newPosition,e=w.max(i,s),n=w.min(i,s),o=h.getElementsByClassName("theo-multi-view-menu-item");o[e].before(o[n]),o[n].before(o[e]),0===n&&(oi(o[e],"theo-multi-view-menu-item-position-zero"),r(o[n],"theo-multi-view-menu-item-position-zero"))},this.bd=()=>{const t=this._s.layout;ci(this.dd,il,t===Kc.GALLERY),ci(this.vd,il,t===Kc.SPOTLIGHT),ci(this.pd,il,t===Kc.OVERLAY)},i.views&&(this._s=i,this.Vr=s,this._s.multiViewPlayer.addEventListener(Yc.$c,this.md),this._s.multiViewPlayer.addEventListener(Yc.Rc,this.gd),this._s.multiViewPlayer.addEventListener(Yc.VIEW_CHANGE,this.md),this._s.multiViewPlayer.addEventListener(Yc.VIEW_POSITION_CHANGE,this.yd),this._s.multiViewPlayer.addEventListener(Yc.Oc,this.bd),d(this.Mr.menuHeader.el(),this.Vr.localize("MultiView")),this.ld=this.fd(),this.bd())}};Jo.registerComponent("multiViewButton",class extends Ea{buildCSSClass(){return"vjs-icon-view-grid "+super.buildCSSClass()}dispose(){this.xh.Ve(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=3,this.xh=new sl(this.menu,this.ks,t),this.controlText(t.localize("Views")),this.Be.Fe=this.controlText()}});export{xi as ChromelessPlayer,tt as ErrorCategory,K as ErrorCode,tl as MultiViewPlayer,rc as Player,F as cache,E as cast,Ai as features,Bi as players,Oi as registerContentProtectionIntegration,Ci as utils,Di as version,Jo as videojs};
|
|
40
|
+
var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==a?a:"undefined"!=typeof global?global:this,a=s.window,h=s.document,u=(s.location,s.navigator,s.setTimeout),c=s.clearTimeout,v=(s.setInterval,s.clearInterval,s.Error),p=s.TypeError,m=s.SyntaxError,g=s.Object,w=s.Math,k=s.parseInt,_=s.parseFloat,j=s.isNaN,x=s.Uint8Array;s.Worker,s.WorkerGlobalScope,s.XMLHttpRequest;import{$ as S,$a as T,A as C,Aa as P,Ab as M,B as A,Ba as I,Bb as E,C as D,Ca as N,Cb as F,D as B,Da as $,E as R,Ea as O,F as V,Fa as U,G as L,Ga as H,H as z,Ha as W,I as q,Ia as G,J as X,Ja as J,K as Q,Ka as Y,L as K,La as Z,M as tt,Ma as it,N as st,Na as et,O as nt,Oa as rt,P as ht,Pa as ot,Q as at,Qa as ut,R as ct,Ra as lt,S as ft,Sa as dt,T as vt,Ta as pt,U as mt,Ua as gt,V as yt,Va as bt,W as wt,Wa as kt,X as _t,Xa as jt,Y as xt,Ya as St,Z as Tt,Za as Ct,_ as Pt,_a as Mt,a as At,aa as It,ab as Et,b as Dt,ba as Nt,bb as Ft,c as Bt,ca as $t,cb as Rt,d as Ot,da as Vt,db as Ut,e as Lt,ea as Ht,eb as zt,f as Wt,fa as qt,fb as Gt,g as Xt,ga as Jt,gb as Qt,h as Yt,ha as Kt,hb as Zt,i as ti,ia as ii,ib as si,j as ei,ja as ni,jb as ri,k as r,ka as hi,kb as d,l as oi,la as ai,lb as ui,m as ci,ma as li,mb as fi,n as di,na as vi,nb as pi,o as mi,oa as gi,ob as yi,p as bi,pa as wi,pb as ki,q as _i,qa as ji,qb as xi,r as Si,ra as Ti,rb as Ci,s as Pi,sa as Mi,sb as Ai,t as Ii,ta as Ei,tb as Di,u as Ni,ua as Fi,ub as Bi,v as $i,va as Ri,vb as Oi,w as Vi,wa as Ui,wb as Li,x as Hi,xa as zi,xb as Wi,y as qi,ya as Gi,yb as Xi,z as Ji,za as Qi,zb as Yi}from"./THEOplayer.common.esm.js";Bt(),Bt(),Bt(),Bt();var Ki=[];var Zi=[];Bt(),Bt(),Bt(),Bt();var ts=void 0!==a?a:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},is=void 0!==h?h:{createElement:function(){}};function ss(t,i){return i||(i=t.slice(0)),t.raw=i,t}var es=1;function ns(){return es++}var rs,hs=g.prototype.toString,os=function(t){return cs(t)?g.keys(t):[]};function as(t,i){os(t).forEach((function(s){return i(t[s],s)}))}function us(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 g.assign?g.assign.apply(g,[t].concat(s)):(s.forEach((function(i){i&&as(i,(function(i,s){t[s]=i}))})),t)}function cs(t){return!!t&&"object"==typeof t}function ls(t){return cs(t)&&"[object Object]"===hs.call(t)&&t.constructor===g}var fs=function(t,i,s){void 0===s&&(s=!!ce&&ce<11),"log"!==t&&i.unshift(t.toUpperCase()+":"),rs.history.push(i),i.unshift("VIDEOJS:");var e=ts.console&&ts.console[t];e&&(s&&(i=i.map((function(t){if(cs(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(i){return String(t)}return String(t)})).join(" ")),e.apply?e[Array.isArray(i)?"apply":"call"](ts.console,i):e(i))};(rs=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];fs("log",i)}).history=[],rs.error=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return fs("error",i)},rs.warn=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return fs("warn",i)};var ds=rs,vs="undefined"!=typeof globalThis?globalThis:void 0!==a?a:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ps(t){return t.replace(/\n\r?\s*/g,"")}var ms,gs=function(t){for(var i="",s=0;s<arguments.length;s++)i+=ps(t[s])+(arguments[s+1]||"");return i};function ys(t){return"string"==typeof t&&/\S/.test(t)}function bs(t){if(/\s/.test(t))throw new v("class has illegal whitespace characters")}function ws(){return is===ts.document&&void 0!==is.createElement}function ks(t){return cs(t)&&1===t.nodeType}function _s(t){return function(i,s){if(!ys(i))return is[t](null);ys(s)&&(s=is.querySelector(s));var e=ks(s)?s:is;return e[t]&&e[t](i)}}function js(t,i,s,e){void 0===t&&(t="div"),void 0===i&&(i={}),void 0===s&&(s={});var n=is.createElement(t);return g.getOwnPropertyNames(i).forEach((function(t){var s=i[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(ds.warn(gs(ms||(ms=ss(["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?xs(n,s):n[t]=s})),g.getOwnPropertyNames(s).forEach((function(t){n.setAttribute(t,s[t])})),e&&Hs(n,e),n}function xs(t,i){return void 0===t.textContent?t.innerText=i:t.textContent=i,t}function Ss(t,i){i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t)}var Ts={},Cs="vdata"+(new Date).getTime();function Ps(t){var i=t[Cs];return i||(i=t[Cs]=ns()),Ts[i]||(Ts[i]={}),Ts[i]}function Ms(t){var i=t[Cs];return!!i&&!!g.getOwnPropertyNames(Ts[i]).length}function As(t){var i=t[Cs];if(i){delete Ts[i];try{delete t[Cs]}catch(i){t.removeAttribute?t.removeAttribute(Cs):t[Cs]=null}}}function Is(t,i){return bs(i),t.classList?t.classList.contains(i):function(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}(i).test(t.className)}function Es(t,i){return t.classList?t.classList.add(i):Is(t,i)||(t.className=(t.className+" "+i).trim()),t}function Ds(t,i){return t.classList?t.classList.remove(i):(bs(i),t.className=t.className.split(/\s+/).filter((function(t){return t!==i})).join(" ")),t}function Ns(t,i,s){var e=Is(t,i);if("function"==typeof s&&(s=s(t,i)),"boolean"!=typeof s&&(s=!e),s!==e)return s?Es(t,i):Ds(t,i),t}function Fs(t,i){g.getOwnPropertyNames(i).forEach((function(s){var e=i[s];null==e||!1===e?t.removeAttribute(s):t.setAttribute(s,!0===e?"":e)}))}function Bs(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 $s(t,i,s){t.setAttribute(i,s)}function Rs(t,i){t.removeAttribute(i)}function Os(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var s=is.documentElement,e=is.body,n=s.clientLeft||e.clientLeft||0,r=ts.pageXOffset||e.scrollLeft,h=i.left+r-n,o=s.clientTop||e.clientTop||0,a=ts.pageYOffset||e.scrollTop,u=i.top+a-o;return{left:w.round(h),top:w.round(u)}}function Vs(t,i){var s={},e=Os(t),n=t.offsetWidth,r=t.offsetHeight,h=e.top,o=e.left,a=i.pageY,u=i.pageX;return i.changedTouches&&(u=i.changedTouches[0].pageX,a=i.changedTouches[0].pageY),s.y=w.max(0,w.min(1,(h-a+r)/r)),s.x=w.max(0,w.min(1,(u-o)/n)),s}function Us(t){return cs(t)&&3===t.nodeType}function Ls(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function Hs(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()),ks(t)||Us(t)?t:"string"==typeof t&&/\S/.test(t)?is.createTextNode(t):void 0})).filter((function(t){return t}))}(i).forEach((function(i){return t.appendChild(i)})),t}function zs(t,i){return Hs(Ls(t),i)}var b,Ws=_s("querySelector"),qs=_s("querySelectorAll"),Gs=ts.navigator&&ts.navigator.userAgent||"",Xs=/AppleWebKit\/([\d.]+)/i.exec(Gs),Js=Xs?_(Xs.pop()):null,Qs=/iPad/i.test(Gs),Ys=/iPhone/i.test(Gs)&&!Qs,Ks=/iPod/i.test(Gs),Zs=Ys||Qs||Ks,te=(b=Gs.match(/OS (\d+)_/i))&&b[1]?b[1]:null,ie=/Android/i.test(Gs),se=function(){var t=Gs.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&_(t[1]),s=t[2]&&_(t[2]);return i&&s?_(t[1]+"."+t[2]):i||null}(),ee=ie&&/webkit/i.test(Gs)&&se<2.3,ne=ie&&se<5&&Js<537,re=/Firefox/i.test(Gs),he=/Edge/i.test(Gs),oe=!he&&/Chrome/i.test(Gs),ae=function(){var t=Gs.match(/Chrome\/(\d+)/);return t&&t[1]?_(t[1]):null}(),ue=/MSIE\s8\.0/.test(Gs),ce=function(){var t=/MSIE\s(\d+)\.\d/.exec(Gs),i=t&&_(t[1]);return!i&&/Trident\/7.0/i.test(Gs)&&/rv:11.0/.test(Gs)&&(i=11),i}(),le=/Safari/i.test(Gs)&&!oe&&!ie&&!he,fe=le||Zs,de=ws()&&("ontouchstart"in ts||ts.DocumentTouch&&ts.document instanceof ts.DocumentTouch),ve=ws()&&"backgroundSize"in ts.document.createElement("video").style,pe=g.freeze({__proto__:null,IS_IPAD:Qs,IS_IPHONE:Ys,IS_IPOD:Ks,IS_IOS:Zs,IOS_VERSION:te,IS_ANDROID:ie,ANDROID_VERSION:se,IS_OLD_ANDROID:ee,IS_NATIVE_ANDROID:ne,IS_FIREFOX:re,IS_EDGE:he,IS_CHROME:oe,CHROME_VERSION:ae,IS_IE8:ue,IE_VERSION:ce,IS_SAFARI:le,IS_ANY_SAFARI:fe,TOUCH_ENABLED:de,BACKGROUND_SIZE_SUPPORTED:ve});function me(t,i){var s=Ps(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)),g.getOwnPropertyNames(s.handlers).length<=0&&(delete s.handlers,delete s.dispatcher,delete s.disabled),0===g.getOwnPropertyNames(s).length&&As(t)}function ge(t,i,s,e){s.forEach((function(s){t(i,s,e)}))}function ye(t){function i(){return!0}function s(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){var e=t||ts.event;for(var n in t={},e)"layerX"!==n&&"layerY"!==n&&"keyLocation"!==n&&"webkitMovementX"!==n&&"webkitMovementY"!==n&&"path"!==n&&("returnValue"===n&&e.preventDefault||(t[n]=e[n]));if(t.target||(t.target=t.srcElement||is),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){e.preventDefault&&e.preventDefault(),t.returnValue=!1,e.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){e.stopPropagation&&e.stopPropagation(),t.cancelBubble=!0,e.cancelBubble=!0,t.isPropagationStopped=i},t.isPropagationStopped=s,t.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation(),t.isImmediatePropagationStopped=i,t.stopPropagation()},t.isImmediatePropagationStopped=s,null!==t.clientX&&void 0!==t.clientX){var r=is.documentElement,h=is.body;t.pageX=t.clientX+(r&&r.scrollLeft||h&&h.scrollLeft||0)-(r&&r.clientLeft||h&&h.clientLeft||0),t.pageY=t.clientY+(r&&r.scrollTop||h&&h.scrollTop||0)-(r&&r.clientTop||h&&h.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var be=!1;!function(){try{var t=g.defineProperty({},"passive",{get:function(){be=!0}});ts.addEventListener("test",null,t)}catch(t){}}();var we=["touchstart","touchmove"];function ke(t,i,s){if(Array.isArray(i))return ge(ke,t,i,s);var e=Ps(t);if(e.handlers||(e.handlers={}),e.handlers[i]||(e.handlers[i]=[]),s.guid||(s.guid=ns()),e.handlers[i].push(s),e.dispatcher||(e.disabled=!1,e.dispatcher=function(i,s){if(!e.disabled){i=ye(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){ds.error(t)}}}),1===e.handlers[i].length)if(t.addEventListener){var n=!1;be&&we.indexOf(i)>-1&&(n={passive:!0}),t.addEventListener(i,e.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+i,e.dispatcher)}function _e(t,i,s){if(Ms(t)){var e=Ps(t);if(e.handlers){if(Array.isArray(i))return ge(_e,t,i,s);var n=function(i){e.handlers[i]=[],me(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);me(t,i)}else n(i)}else for(var o in e.handlers)n(o)}}}function je(t,i,s){var e=Ms(t)?Ps(t):{},n=t.parentNode||t.ownerDocument;if("string"==typeof i&&(i={type:i,target:t}),i=ye(i),e.dispatcher&&e.dispatcher.call(t,i,s),n&&!i.isPropagationStopped()&&!0===i.bubbles)je.call(null,n,i,s);else if(!n&&!i.defaultPrevented){var r=Ps(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 xe(t,i,s){if(Array.isArray(i))return ge(xe,t,i,s);var e=function e(){_e(t,i,e),s.apply(this,arguments)};e.guid=s.guid=s.guid||ns(),ke(t,i,e)}var Se,Te=!1,Ce=function(){if(ws()){var t=is.getElementsByTagName("video"),i=is.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){Pe(1);break}void 0===u.player&&null!==u.getAttribute("data-setup")&&Se(u)}else Te||Pe(1)}};function Pe(t,i){i&&(Se=i),ts.setTimeout(Ce,t)}ws()&&"complete"===is.readyState?Te=!0:xe(ts,"load",(function(){Te=!0}));var Me=function(t){var i=is.createElement("style");return i.className=t,i},Ae=function(t,i){t.styleSheet?t.styleSheet.cssText=i:t.textContent=i},Ie=function(t,i,s){i.guid||(i.guid=ns());var e=function(){return i.apply(t,arguments)};return e.guid=s?s+"_"+i.guid:i.guid,e};function Ee(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function De(){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&&as(i,(function(i,s){ls(i)?(ls(t[s])||(t[s]={}),t[s]=De(t[s],i)):t[s]=i}))})),t}var Ne=function(){function t(t,i,s){if(!t&&this.play?this.t=t=this:this.t=t,this.h=De({},this.h),i=this.h=De(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"+ns()}this.l=i.name||null,i.el?this.v=i.el:!1!==i.createEl&&(this.v=this.createEl()),this.m=[],this.k={},this.j={},!1!==i.initChildren&&this.initChildren(),this.ready(s),!1!==i.reportTouchActivity&&this.enableTouchActivity()}var i=t.prototype;return i.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.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.j=null,this.off(),this.v.parentNode&&this.v.parentNode.removeChild(this.v),As(this.v),this.v=null},i.player=function(){return this.t},i.options=function(t){return ds.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.h=De(this.h,t),this.h):this.h},i.el=function(){return this.v},i.createEl=function(t,i,s){return js(t,i,s)},i.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},i.contentEl=function(){return this.S||this.v},i.id=function(){return this.o},i.name=function(){return this.l},i.children=function(){return this.m},i.getChildById=function(t){return this.k[t]},i.getChild=function(t){if(t)return t=Ee(t),this.j[t]},i.addChild=function(i,s,e){var n,r;if(void 0===s&&(s={}),void 0===e&&(e=this.m.length),"string"==typeof i){r=Ee(i),s||(s={}),!0===s&&(ds.warn("Initializing a child component with `true` is deprecated.Children should be defined in an array when possible, but if necessary use an object instead of `true`."),s={});var h=s.componentClass||r;s.name=r;var o=t.getComponent(h);if(!o)throw new v("Component "+h+" does not exist");if("function"!=typeof o)return null;n=new o(this.t||this,s)}else n=i;if(this.m.splice(e,0,n),"function"==typeof n.id&&(this.k[n.id()]=n),(r=r||n.name&&Ee(n.name()))&&(this.j[r]=n),"function"==typeof n.el&&n.el()){var a=this.contentEl().children[e]||null;this.contentEl().insertBefore(n.el(),a)}return n},i.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.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.j[t.name()]=null;var e=t.el();e&&e.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},i.initChildren=function(){var i=this,s=this.h.children;if(s){var e,n=this.h,r=t.getComponent("Tech");(e=Array.isArray(s)?s:g.keys(s)).concat(g.keys(this.h).filter((function(t){return!e.some((function(i){return"string"==typeof i?t===i:t===i.name}))}))).map((function(t){var e,n;return"string"==typeof t?n=s[e=t]||i.h[e]||{}:(e=t.name,n=t),{name:e,opts:n}})).filter((function(i){var s=t.getComponent(i.opts.componentClass||Ee(i.name));return s&&!r.isTech(s)})).forEach((function(t){var s=t.name,e=t.opts;if(void 0!==n[s]&&(e=n[s]),!1!==e){!0===e&&(e={}),e.playerOptions=i.h.playerOptions;var r=i.addChild(s,e);r&&(i[s]=r)}}))}},i.buildCSSClass=function(){return""},i.on=function(t,i,s){var e=this;if("string"==typeof t||Array.isArray(t))ke(this.v,t,Ie(this,i));else{var n=t,r=i,h=Ie(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?(ke(n,r,h),ke(n,"dispose",a)):"function"==typeof t.on&&(n.on(r,h),n.on("dispose",a))}return this},i.off=function(t,i,s){if(!t||"string"==typeof t||Array.isArray(t))_e(this.v,t,i);else{var e=t,n=i,r=Ie(this,s);this.off("dispose",r),t.nodeName?(_e(e,n,r),_e(e,"dispose",r)):(e.off(n,r),e.off("dispose",r))}return this},i.one=function(t,i,s){var e=arguments,n=this;if("string"==typeof t||Array.isArray(t))xe(this.v,t,Ie(this,i));else{var r=t,h=i,o=Ie(this,s),a=function t(){n.off(r,h,t),o.apply(null,e)};a.guid=o.guid,this.on(r,h,a)}return this},i.trigger=function(t,i){return je(this.v,t,i),this},i.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.T?i?t.call(this):this.setTimeout(t,1):(this.C=this.C||[],this.C.push(t))),this},i.triggerReady=function(){this.T=!0,this.setTimeout((function(){var t=this.C;this.C=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},i.$=function(t,i){return Ws(t,i||this.contentEl())},i.$$=function(t,i){return qs(t,i||this.contentEl())},i.hasClass=function(t){return Is(this.v,t)},i.addClass=function(t){return Es(this.v,t),this},i.removeClass=function(t){return Ds(this.v,t),this},i.toggleClass=function(t,i){return Ns(this.v,t,i),this},i.show=function(){return this.removeClass("vjs-hidden"),this},i.hide=function(){return this.addClass("vjs-hidden"),this},i.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},i.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},i.getAttribute=function(t){return function(t,i){return t.getAttribute(i)}(this.v,t)},i.setAttribute=function(t,i){return $s(this.v,t,i),this},i.removeAttribute=function(t){return Rs(this.v,t),this},i.width=function(t,i){return this.dimension("width",t,i)},i.height=function(t,i){return this.dimension("height",t,i)},i.dimensions=function(t,i){return this.width(t,!0).height(i)},i.dimension=function(t,i,s){if(void 0!==i)return null!==i&&i==i||(i=0),-1!==(""+i).indexOf("%")||-1!==(""+i).indexOf("px")?this.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 k(-1!==n?e.slice(0,n):this.v["offset"+Ee(t)],10)},i.currentDimension=function(t){var i=0;if("width"!==t&&"height"!==t)throw new v("currentDimension only accepts width or height value");if("function"==typeof ts.getComputedStyle){var s=ts.getComputedStyle(this.v);i=s.getPropertyValue(t)||s[t]}if(0===(i=_(i))){var e="offset"+Ee(t);i=this.v[e]}return i},i.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},i.currentWidth=function(){return this.currentDimension("width")},i.currentHeight=function(){return this.currentDimension("height")},i.focus=function(){this.v.focus()},i.blur=function(){this.v.blur()},i.emitTapEvents=function(){var t,i=0,s=null;this.on("touchstart",(function(e){1===e.touches.length&&(s={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},i=(new Date).getTime(),t=!0)})),this.on("touchmove",(function(i){if(i.touches.length>1)t=!1;else if(s){var e=i.touches[0].pageX-s.pageX,n=i.touches[0].pageY-s.pageY;w.sqrt(e*e+n*n)>10&&(t=!1)}}));var e=function(){t=!1};this.on("touchleave",e),this.on("touchcancel",e),this.on("touchend",(function(e){(s=null,!0===t)&&((new Date).getTime()-i<200&&(e.preventDefault(),this.trigger("tap")))}))},i.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,i=Ie(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){i(),this.clearInterval(t),t=this.setInterval(i,250)}));var s=function(s){i(),this.clearInterval(t)};this.on("touchmove",i),this.on("touchend",s),this.on("touchcancel",s)}},i.setTimeout=function(t,i){t=Ie(this,t);var s=ts.setTimeout(t,i),e=function(){this.clearTimeout(s)};return e.guid="vjs-timeout-"+s,this.on("dispose",e),s},i.clearTimeout=function(t){ts.clearTimeout(t);var i=function(){};return i.guid="vjs-timeout-"+t,this.off("dispose",i),t},i.setInterval=function(t,i){t=Ie(this,t);var s=ts.setInterval(t,i),e=function(){this.clearInterval(s)};return e.guid="vjs-interval-"+s,this.on("dispose",e),s},i.clearInterval=function(t){ts.clearInterval(t);var i=function(){};return i.guid="vjs-interval-"+t,this.off("dispose",i),t},t.registerComponent=function(i,s){if(i){if(i=Ee(i),t.P||(t.P={}),"Player"===i&&t.P[i]){var e=t.P[i];if(e.players&&g.keys(e.players).length>0&&g.keys(e.players).map((function(t){return e.players[t]})).every(Boolean))throw new v("Can not register Player component after player has been created")}return t.P[i]=s,s}},t.getComponent=function(i){if(i)return i=Ee(i),t.P&&t.P[i]?t.P[i]:ts&&ts.videojs&&ts.videojs[i]?(ds.warn("The "+i+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),ts.videojs[i]):void 0},t.extend=function(i){i=i||{},ds.warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var s=i.init||i.init||this.prototype.init||this.prototype.init||function(){},e=function(){s.apply(this,arguments)};for(var n in(e.prototype=g.create(this.prototype)).constructor=e,e.extend=t.extend,i)i.hasOwnProperty(n)&&(e.prototype[n]=i[n]);return e},t}();Ne.registerComponent("Component",Ne);var Fe=function(){};function Be(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $e(t,i){return($e=g.setPrototypeOf?g.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function Re(t,i){t.prototype=g.create(i.prototype),t.prototype.constructor=t,$e(t,i)}function Oe(t,i,s,e){return void 0===e&&(ds.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),e=0),function(t,i,s){if(i<0||i>s)throw new v("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 Ve(t){return void 0===t||0===t.length?{length:0,start:function(){throw new v("This TimeRanges object is empty")},end:function(){throw new v("This TimeRanges object is empty")}}:{length:t.length,start:Oe.bind(null,"start",0,t),end:Oe.bind(null,"end",1,t)}}function Ue(t,i){return Array.isArray(t)?Ve(t):void 0===t||void 0===i?Ve():Ve([[t,i]])}function Le(t,i){var s,e,n=0;if(!i)return 0;t&&t.length||(t=Ue(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}Fe.prototype.M={},Fe.prototype.on=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},ke(this,t,i),this.addEventListener=s},Fe.prototype.addEventListener=Fe.prototype.on,Fe.prototype.off=function(t,i){_e(this,t,i)},Fe.prototype.removeEventListener=Fe.prototype.off,Fe.prototype.one=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},xe(this,t,i),this.addEventListener=s},Fe.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=ye(t),this.M[i]&&this["on"+i]&&this["on"+i](t),je(this,t)},Fe.prototype.dispatchEvent=Fe.prototype.trigger;var He,ze,We,qe,Ge={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"]],Je=Xe[0];for(ze=0;ze<Xe.length;ze++)if(Xe[ze][1]in is){He=Xe[ze];break}if(He){for(We=0;We<He.length;We++)Ge[Je[We]]=He[We];Ge.prefixed=He[0]!==Je[0]}function Qe(t){if(t instanceof Qe)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:cs(t)&&("number"==typeof t.code&&(this.code=t.code),us(this,t)),this.message||(this.message=Qe.defaultMessages[this.code]||"")}for(Qe.prototype.code=0,Qe.prototype.message="",Qe.prototype.status=null,Qe.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Qe.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."},qe=0;qe<Qe.errorTypes.length;qe++)Qe[Qe.errorTypes[qe]]=qe,Qe.prototype[Qe.errorTypes[qe]]=qe;var Ye=function(t,i){var s,e=null;try{s=JSON.parse(t,i)}catch(t){e=t}return[e,s]};var Ke=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}}))})},Ze=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=Ke(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(Ke))},tn=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()},sn="vjs-modal-dialog",en=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).A=e.I=e.D=!1,e.closeable(!e.h.uncloseable),e.content(e.h.content),e.S=js("div",{className:sn+"-content"},{role:"document"}),e.N=js("p",{className:sn+"-description vjs-offscreen",id:e.el().getAttribute("aria-describedby")}),xs(e.N,e.description()),e.v.appendChild(e.N),e.v.appendChild(e.S),e.on(i,"languagechange",e.handleLanguagechange),e}Re(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 sn+" 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.A){var t=this.player();this.trigger("beforemodalopen"),this.A=!0,(this.h.fillAlways||!this.I&&!this.D)&&this.fill(),this.B=!t.paused(),this.h.pauseOnOpen&&this.B&&t.pause(),this.closeable()&&this.on(this.v.ownerDocument,"keydown",Ie(this,this.handleKeyPress)),t.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.I=!0}return this},s.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.A},s.close=function(){if(this.A){var t=this.player();this.trigger("beforemodalclose"),this.A=!1,this.B&&this.h.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.v.ownerDocument,"keydown",Ie(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.D=!0,s.removeChild(i),this.empty(),zs(i,t),this.trigger("modalfill"),e?s.insertBefore(i,e):s.appendChild(i),this},s.empty=function(){return this.trigger("beforemodalempty"),Ls(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()),xs(this.N,this.description()),this.opened()?this.fill():(this.I||this.D)&&(this.I=!1,this.D=!1,this.empty())},i}(Ne);en.prototype.h={pauseOnOpen:!0,temporary:!0},Ne.registerComponent("ModalDialog",en);var nn=function(){function t(i){var s=this;if(ue)for(var e in s=is.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);if(t.prototype.V.call(s,i),g.defineProperty(s,"length",{get:function(){return this.U}}),ue)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||g.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}(),rn={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},hn={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},on={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},an={disabled:"disabled",hidden:"hidden",showing:"showing"},un=function(t){function i(s){var e;void 0===s&&(s={});var n=Be(e=t.call(this)||this);if(ue)for(var r in n=is.createElement("custom"),i.prototype)"constructor"!==r&&(n[r]=i.prototype[r]);var h={id:s.id||["vjs_track",ns()].join("_"),kind:s.kind||"",label:s.label||"",language:s.language||""},o=function(t){g.defineProperty(n,t,{get:function(){return h[t]},set:function(){}})};for(var a in h)o(a);return n||Be(e)}return Re(i,t),i}(Fe),cn=function(t){var i=["protocol","hostname","port","pathname","search","hash","host"],s=is.createElement("a");s.href=t;var e,n=""===s.host&&"file:"!==s.protocol;n&&((e=is.createElement("div")).innerHTML='<a href="'+t+'"></a>',s=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),is.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&&is.body.removeChild(e),r},ln=function(t){var i=ts.location,s=cn(t);return(":"===s.protocol?i.protocol:s.protocol)+s.host!==i.protocol+i.host},fn={exports:{}};void 0!==a?fn.exports=a:void 0!==vs?fn.exports=vs:"undefined"!=typeof self?fn.exports=self:fn.exports={};var dn=function(t){var i=vn.call(t);return"[object Function]"===i||"function"==typeof t&&"[object RegExp]"!==i||void 0!==a&&(t===a.setTimeout||t===a.alert||t===a.confirm||t===a.prompt)},vn=g.prototype.toString;var pn,mn,gn,yn,bn,wn,kn,_n,jn,xn,Sn,Tn,Cn=Array.prototype.slice,Pn=g.prototype.toString,Mn=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==Pn.call(i))throw new p("Function.prototype.bind called on incompatible "+i);for(var s,e=Cn.call(arguments,1),n=w.max(0,i.length-e.length),r=[],h=0;h<n;h++)r.push("$"+h);if(s=Function("binder","return function ("+r.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof s){var n=i.apply(this,e.concat(Cn.call(arguments)));return g(n)===n?n:this}return i.apply(t,e.concat(Cn.call(arguments)))})),i.prototype){var o=function(){};o.prototype=i.prototype,s.prototype=new o,o.prototype=null}return s},An=Function.prototype.bind||Mn,In=g.prototype.toString,En=function(t){var i=In.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]"===In.call(t.callee)),s};g.keys||(mn=g.prototype.hasOwnProperty,gn=g.prototype.toString,yn=En,bn=g.prototype.propertyIsEnumerable,wn=!bn.call({toString:null},"toString"),kn=bn.call((function(){}),"prototype"),_n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],jn=function(t){var i=t.constructor;return i&&i.prototype===t},xn={$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},Sn=function(){if(void 0===a)return!1;for(var t in a)try{if(!xn["$"+t]&&mn.call(a,t)&&null!==a[t]&&"object"==typeof a[t])try{jn(a[t])}catch(t){return!0}}catch(t){return!0}return!1}(),Tn=function(t){if(void 0===a||!Sn)return jn(t);try{return jn(t)}catch(t){return!1}},pn=function(t){var i=null!==t&&"object"==typeof t,s="[object Function]"===gn.call(t),e=yn(t),n=i&&"[object String]"===gn.call(t),r=[];if(!i&&!s&&!e)throw new p("Object.keys called on a non-object");var h=kn&&s;if(n&&t.length>0&&!mn.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||!mn.call(t,u)||r.push(String(u));if(wn)for(var c=Tn(t),l=0;l<_n.length;++l)c&&"constructor"===_n[l]||!mn.call(t,_n[l])||r.push(_n[l]);return r});var Dn=pn,Nn=Array.prototype.slice,Fn=En,Bn=g.keys,$n=Bn?function(t){return Bn(t)}:Dn,Rn=g.keys;$n.shim=function(){if(g.keys){var t=function(){var t=g.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(g.keys=function(t){return Fn(t)?Rn(Nn.call(t)):Rn(t)})}else g.keys=$n;return g.keys||$n};var On=$n,Vn="function"==typeof At&&"symbol"==typeof At("foo"),Un=g.prototype.toString,Ln=Array.prototype.concat,Hn=g.defineProperty,zn=Hn&&function(){var t={};try{for(var i in Hn(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),Wn=function(t,i,s,e){(!(i in t)||function(t){return"function"==typeof t&&"[object Function]"===Un.call(t)}(e)&&e())&&(zn?Hn(t,i,{configurable:!0,enumerable:!1,value:s,writable:!0}):t[i]=s)},qn=function(t,i){var s=arguments.length>2?arguments[2]:{},e=On(i);Vn&&(e=Ln.call(e,g.getOwnPropertySymbols(i)));for(var n=0;n<e.length;n+=1)Wn(t,e[n],i[e[n]],s[e[n]])};qn.supportsDescriptors=!!zn;var Gn,Xn=qn,Jn=g.getOwnPropertyDescriptor?function(){return g.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new p},Qn="function"==typeof At&&"symbol"==typeof Dt,Yn=g.getPrototypeOf||function(t){return t.__proto__},Kn=void 0===x?Gn:Yn(x),Zn={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?Gn:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?Gn:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":Qn?Yn([][Dt]()):Gn,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":Gn,"$ %AsyncFunction%":undefined,"$ %AsyncFunctionPrototype%":Gn,"$ %AsyncGenerator%":Gn,"$ %AsyncGeneratorFunction%":undefined,"$ %AsyncGeneratorPrototype%":Gn,"$ %AsyncIteratorPrototype%":Gn,"$ %Atomics%":"undefined"==typeof Atomics?Gn:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?Gn:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?Gn:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":v,"$ %ErrorPrototype%":v.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?Gn:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?Gn:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?Gn:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?Gn:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":Gn,"$ %GeneratorFunction%":undefined,"$ %GeneratorPrototype%":Gn,"$ %Int8Array%":"undefined"==typeof Int8Array?Gn:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?Gn:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?Gn:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?Gn:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?Gn:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?Gn:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":j,"$ %IteratorPrototype%":Qn?Yn(Yn([][Dt]())):Gn,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?Gn:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&Qn?Yn((new Map)[Dt]()):Gn,"$ %MapPrototype%":"undefined"==typeof Map?Gn:Map.prototype,"$ %Math%":w,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":g,"$ %ObjectPrototype%":g.prototype,"$ %ObjProto_toString%":g.prototype.toString,"$ %ObjProto_valueOf%":g.prototype.valueOf,"$ %parseFloat%":_,"$ %parseInt%":k,"$ %Promise%":"undefined"==typeof Promise?Gn:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?Gn:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?Gn:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?Gn:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?Gn:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?Gn:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?Gn:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?Gn:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?Gn:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&Qn?Yn((new Set)[Dt]()):Gn,"$ %SetPrototype%":"undefined"==typeof Set?Gn:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Gn:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?Gn:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":Qn?Yn(""[Dt]()):Gn,"$ %StringPrototype%":String.prototype,"$ %Symbol%":Qn?At:Gn,"$ %SymbolPrototype%":Qn?At.prototype:Gn,"$ %SyntaxError%":m,"$ %SyntaxErrorPrototype%":m.prototype,"$ %ThrowTypeError%":Jn,"$ %TypedArray%":Kn,"$ %TypedArrayPrototype%":Kn?Kn.prototype:Gn,"$ %TypeError%":p,"$ %TypeErrorPrototype%":p.prototype,"$ %Uint8Array%":void 0===x?Gn:x,"$ %Uint8ArrayPrototype%":void 0===x?Gn:x.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Gn:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?Gn:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?Gn:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?Gn:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?Gn:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?Gn:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?Gn:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?Gn:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?Gn:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?Gn:WeakSet.prototype},tr=function(t,i){if(arguments.length>1&&"boolean"!=typeof i)throw new p('"allowMissing" argument must be a boolean');var s="$ "+t;if(!(s in Zn))throw new m("intrinsic "+t+" does not exist!");if(void 0===Zn[s]&&!i)throw new p("intrinsic "+t+" exists, but is not available. Please file an issue!");return Zn[s]},ir=An.call(Function.call,g.prototype.hasOwnProperty),sr=tr,er=sr("%TypeError%"),nr=sr("%SyntaxError%"),rr=ir,hr={"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(rr(i,e)&&!s[e])return!1;var n=rr(i,"[[Value]]"),r=rr(i,"[[Get]]")||rr(i,"[[Set]]");if(n&&r)throw new er("Property Descriptors may not be both accessor and data descriptors");return!0}},or=Number.isNaN||function(t){return t!=t},ar=Number.isNaN||function(t){return t!=t},ur=Number.isFinite||function(t){return"number"==typeof t&&!ar(t)&&t!==1/0&&t!==-1/0},cr=Function.prototype.toString,lr=/^\s*class\b/,fr=function(t){try{var i=cr.call(t);return lr.test(i)}catch(t){return!1}},dr=g.prototype.toString,vr="function"==typeof At&&"symbol"==typeof At.toStringTag,pr=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(vr)return function(t){try{return!fr(t)&&(cr.call(t),!0)}catch(t){return!1}}(t);if(fr(t))return!1;var i=dr.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},mr=g.prototype.toString,gr=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},yr=pr,br=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===mr.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(yr(t[n[e]])&&(s=t[n[e]](),gr(s)))return s;throw new p("No default value")}throw new p("invalid [[DefaultValue]] hint supplied")},wr=tr,kr=wr("%Object%"),_r=wr("%TypeError%"),jr=wr("%String%"),xr=function(t,i,s,e){var n=hr[i];if("function"!=typeof n)throw new nr("unknown record type: "+i);if(!n(t,e))throw new er(s+" must be a "+i);console.log(n(t,e),e)},Sr=or,Tr=ur,Cr=function(t){return t>=0?1:-1},Pr=function(t,i){var s=t%i;return w.floor(s>=0?s:s+i)},Mr=ir,Ar={ToPrimitive:function(t){return gr(t)?t:arguments.length>1?br(t,arguments[1]):br(t)},ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return Sr(i)?0:0!==i&&Tr(i)?Cr(i)*w.floor(w.abs(i)):i},ToInt32:function(t){return this.ToNumber(t)>>0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var i=this.ToNumber(t);if(Sr(i)||0===i||!Tr(i))return 0;var s=Cr(i)*w.floor(w.abs(i));return Pr(s,65536)},ToString:function(t){return jr(t)},ToObject:function(t){return this.CheckObjectCoercible(t),kr(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new _r(i||"Cannot call method on "+t);return t},IsCallable:pr,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:Sr(t)&&Sr(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(Mr(t,s)&&!i[s])return!1;var e=Mr(t,"[[Value]]"),n=Mr(t,"[[Get]]")||Mr(t,"[[Set]]");if(e&&n)throw new _r("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(xr(this,"Property Descriptor","Desc",t),!(!Mr(t,"[[Get]]")&&!Mr(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(xr(this,"Property Descriptor","Desc",t),!(!Mr(t,"[[Value]]")&&!Mr(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(xr(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(xr(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 _r("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new _r("ToPropertyDescriptor requires an object");var i={};if(Mr(t,"enumerable")&&(i["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),Mr(t,"configurable")&&(i["[[Configurable]]"]=this.ToBoolean(t.configurable)),Mr(t,"value")&&(i["[[Value]]"]=t.value),Mr(t,"writable")&&(i["[[Writable]]"]=this.ToBoolean(t.writable)),Mr(t,"get")){var s=t.get;if(void 0!==s&&!this.IsCallable(s))throw new p("getter must be a function");i["[[Get]]"]=s}if(Mr(t,"set")){var e=t.set;if(void 0!==e&&!this.IsCallable(e))throw new _r("setter must be a function");i["[[Set]]"]=e}if((Mr(i,"[[Get]]")||Mr(i,"[[Set]]"))&&(Mr(i,"[[Value]]")||Mr(i,"[[Writable]]")))throw new _r("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},Ir=An.call(Function.call,String.prototype.replace),Er=/^[\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]+/,Dr=/[\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]+$/,Nr=function(){var t=Ar.ToString(Ar.CheckObjectCoercible(this));return Ir(Ir(t,Er,""),Dr,"")},Fr=Nr,Br=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:Fr},$r=Xn,Rr=Br,Or=Xn,Vr=Nr,Ur=Br,Lr=function(){var t=Rr();return $r(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},Hr=An.call(Function.call,Ur());Or(Hr,{getPolyfill:Ur,implementation:Vr,shim:Lr});var zr=Hr,Wr=pr,qr=g.prototype.toString,Gr=g.prototype.hasOwnProperty,Xr=zr,Jr=function(t,i,s){if(!Wr(i))throw new p("iterator must be a function");var e;arguments.length>=3&&(e=s),"[object Array]"===qr.call(t)?function(t,i,s){for(var e=0,n=t.length;e<n;e++)Gr.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)Gr.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e)},Qr=function(){for(var t={},i=0;i<arguments.length;i++){var s=arguments[i];for(var e in s)Yr.call(s,e)&&(t[e]=s[e])}return t},Yr=g.prototype.hasOwnProperty;var Kr=fn.exports,Zr=dn,th=function(t){if(!t)return{};var i={};return Jr(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]"===g.prototype.toString.call(t)}(i[e])?i[e]=[i[e],n]:i[e].push(n)})),i},ih=Qr,sh=nh;function eh(t,i,s){var e=t;return Zr(i)?(s=i,"string"==typeof t&&(e={uri:t})):e=ih(i,{uri:t}),e.callback=s,e}function nh(t,i,s){return rh(i=eh(t,i,s))}function rh(t){if(void 0===t.callback)throw new v("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:p,url:d,rawRequest:l};function r(t){return c(f),t instanceof v||(t=new v(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,n)}function h(){if(!a){var i;c(f),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:p,headers:{},url:d,rawRequest:l},l.getAllResponseHeaders&&(r.headers=th(l.getAllResponseHeaders()))):h=new v("Internal XMLHttpRequest Error"),s(h,r,r.body)}}var o,a,l=t.xhr||null;l||(l=t.cors||t.useXDR?new nh.XDomainRequest:new nh.XMLHttpRequest);var f,d=l.url=t.uri||t.url,p=l.method=t.method||"GET",m=t.body||t.data||null,g=l.headers=t.headers||{},y=!!t.sync,b=!1;if("json"in t&&(b=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==p&&"HEAD"!==p&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),m=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(p,d,!y,t.username,t.password),y||(l.withCredentials=!!t.withCredentials),!y&&t.timeout>0&&(f=u((function(){a=!0,l.abort("timeout");var t=new v("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}),t.timeout)),l.setRequestHeader)for(o in g)g.hasOwnProperty(o)&&l.setRequestHeader(o,g[o]);else if(t.headers&&!function(t){for(var i in t)if(t.hasOwnProperty(i))return!1;return!0}(t.headers))throw new v("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(m),l}nh.XMLHttpRequest=Kr.XMLHttpRequest||function(){},nh.XDomainRequest="withCredentials"in new nh.XMLHttpRequest?nh.XMLHttpRequest:Kr.XDomainRequest,function(t,i){for(var s=0;s<t.length;s++)i(t[s])}(["get","put","post","patch","head","delete"],(function(t){nh["delete"===t?"del":t]=function(i,s,e){return(s=eh(i,s,e)).method=t.toUpperCase(),rh(s)}}));var hh=function(t,i){var s=new ts.WebVTT.Parser(ts,ts.vttjs,ts.WebVTT.StringDecoder()),e=[];s.oncue=function(t){i.addCue(t)},s.onparsingerror=function(t){e.push(t)},s.onflush=function(){i.trigger({type:"loadeddata",target:i})},s.parse(t),e.length>0&&(ts.console&&ts.console.groupCollapsed&&ts.console.groupCollapsed("Text Track parsing errors for "+i.src),e.forEach((function(t){return ds.error(t)})),ts.console&&ts.console.groupEnd&&ts.console.groupEnd()),s.flush()},oh=function(t){function i(s){var e;if(void 0===s&&(s={}),!s.tech)throw new v("A tech was not provided.");var n=De(s,{kind:on[s.kind]||"subtitles",language:s.language||s.srclang||""}),r=an[n.mode]||"disabled",h=n.default;"metadata"!==n.kind&&"chapters"!==n.kind||(r="hidden");var o=e=t.call(this,n)||this;if(o.H=n.tech,ue)for(var a in i.prototype)"constructor"!==a&&(o[a]=i.prototype[a]);o.L=[],o.W=[];var u=new nn(o.L),c=new nn(o.W),l=!1,f=Ie(o,(function(){this.activeCues,l&&(this.trigger("cuechange"),l=!1)}));return"disabled"!==r&&o.H.ready((function(){o.H.on("timeupdate",f)}),!0),g.defineProperty(o,"default",{get:function(){return h},set:function(){}}),g.defineProperty(o,"mode",{get:function(){return r},set:function(t){var i=this;an[t]&&("showing"===(r=t)&&this.H.ready((function(){i.H.on("timeupdate",f)}),!0),this.trigger("modechange"))}}),g.defineProperty(o,"cues",{get:function(){return this.q?u:null},set:function(){}}),g.defineProperty(o,"activeCues",{get:function(){if(!this.q)return null;if(0===this.cues.length)return c;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(l=!1,i.length!==this.W.length)l=!0;else for(var r=0;r<i.length;r++)-1===this.W.indexOf(i[r])&&(l=!0);return this.W=i,c.V(this.W),c},set:function(){}}),n.src?(o.src=n.src,function(t,i){var s={uri:t},e=ln(t);e&&(s.cors=e),sh(s,Ie(this,(function(t,s,e){if(t)return ds.error(t,s);if(i.q=!0,"function"!=typeof ts.WebVTT){if(i.H){var n=function(){return hh(e,i)};i.H.on("vttjsloaded",n),i.H.on("vttjserror",(function(){ds.error("vttjs failed to load, stopping trying to process "+i.src),i.H.off("vttjsloaded",n)}))}}else hh(e,i)})))}(n.src,o)):o.q=!0,o||Be(e)}Re(i,t);var s=i.prototype;return s.addCue=function(t){var i=t;if(ts.vttjs&&!(t instanceof ts.vttjs.VTTCue)){for(var s in i=new ts.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)s in i||(i[s]=t[s]);i.id=t.id,i.G=t}var e=this.H.textTracks();if(e)for(var n=0;n<e.length;n++)e[n]!==this&&e[n].removeCue(i);this.L.push(i),this.cues.V(this.L)},s.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}}},i}(un);oh.prototype.M={cuechange:"cuechange"};var ah=function(t){function i(s){var e,n;void 0===s&&(s={});var r=Be(e=t.call(this)||this);if(ue)for(var h in r=is.createElement("custom"),i.prototype)"constructor"!==h&&(r[h]=i.prototype[h]);var o=new oh(s);return r.kind=o.kind,r.src=o.src,r.srclang=o.language,r.label=o.label,r.default=o.default,g.defineProperty(r,"readyState",{get:function(){return n}}),g.defineProperty(r,"track",{get:function(){return o}}),n=0,o.addEventListener("loadeddata",(function(){n=2,r.trigger({type:"load",target:r})})),ue?r||Be(e):e}return Re(i,t),i}(Fe);ah.prototype.M={load:"load"},ah.NONE=0,ah.LOADING=1,ah.LOADED=2,ah.ERROR=3;var uh,ch=function(){function t(i){void 0===i&&(i=[]);var s=this;if(ue)for(var e in s=is.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);s.X=[],g.defineProperty(s,"length",{get:function(){return this.X.length}});for(var n=0,r=i.length;n<r;n++)s.J(i[n]);if(ue)return s}var i=t.prototype;return i.J=function(t){var i=this.X.length;""+i in this||g.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}(),lh=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=Be(n),ue))for(var r in e=is.createElement("custom"),i.prototype)"constructor"!==r&&(e[r]=i.prototype[r]);e.Z=[],g.defineProperty(e,"length",{get:function(){return this.Z.length}});for(var h=0;h<s.length;h++)e.tt(s[h]);return e||Be(n)}Re(i,t);var s=i.prototype;return s.tt=function(t){var i=this.Z.length;""+i in this||g.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}(Fe);for(uh in lh.prototype.M={change:"change",addtrack:"addtrack",removetrack:"removetrack"},lh.prototype.M)lh.prototype["on"+uh]=null;var fh=function(t){function i(s){var e,n;if(void 0===s&&(s=[]),ue){for(var r in n=is.createElement("custom"),lh.prototype)"constructor"!==r&&(n[r]=lh.prototype[r]);for(var h in i.prototype)"constructor"!==h&&(n[h]=i.prototype[h])}return(n=e=t.call(this,s,n)||this)||Be(e)}return Re(i,t),i.prototype.tt=function(i){t.prototype.tt.call(this,i),i.addEventListener("modechange",Ie(this,(function(){this.trigger("change")})))},i}(lh),dh=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].selected=!1)},vh=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){dh(s,s[r]);break}if(ue){for(var h in n=is.createElement("custom"),lh.prototype)"constructor"!==h&&(n[h]=lh.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,g.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n||Be(e)}Re(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.selected&&dh(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("selectedchange",(function(){s.st||(s.st=!0,dh(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}(lh),ph=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].enabled=!1)},mh=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){ph(s,s[r]);break}if(ue){for(var h in n=is.createElement("custom"),lh.prototype)"constructor"!==h&&(n[h]=lh.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||Be(e)}Re(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.enabled&&ph(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",(function(){s.st||(s.st=!0,ph(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}(lh),gh=void 0;var yh=function(t){function i(i,s){var e;return void 0===i&&(i={}),void 0===s&&(s=function(){}),i.reportTouchActivity=!1,(e=t.call(this,null,i,s)||this).et=!1,e.on("playing",(function(){this.et=!0})),e.on("loadstart",(function(){this.et=!1})),e.nt=i.textTracks,e.rt=i.videoTracks,e.ht=i.audioTracks,e.featuresProgressEvents||e.manualProgressOn(),e.featuresTimeupdateEvents||e.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(t){!1===i["native"+t+"Tracks"]&&(e["featuresNative"+t+"Tracks"]=!1)})),!1===i.nativeCaptions&&(e.featuresNativeTextTracks=!1),e.featuresNativeTextTracks||e.emulateTextTracks(),e.ot=new fh,e.initTextTrackListeners(),e.initTrackListeners(),i.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.l=e.constructor.name||"Unknown Tech"),e}Re(i,t);var s=i.prototype;return s.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},s.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},s.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Ie(this,(function(){var t=this.bufferedPercent();this.ut!==t&&this.trigger("progress"),this.ut=t,1===t&&this.stopTrackingProgress()})),500)},s.onDurationChange=function(t){this.ct=this.duration()},s.buffered=function(){return Ue(0,0)},s.bufferedPercent=function(){return Le(this.buffered(),this.ct)},s.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},s.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},s.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},s.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},s.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.dispose=function(){this.clearTracks(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},s.clearTracks=function(t){var i=this;(t=[].concat(t)).forEach((function(t){for(var s=i[t+"Tracks"]()||[],e=s.length;e--;){var n=s[e];"text"===t&&i.removeRemoteTextTrack(n),s.it(n)}}))},s.cleanupAutoTextTracks=function(){for(var t=this.ot||[],i=t.length;i--;){var s=t[i];this.removeRemoteTextTrack(s)}},s.reset=function(){},s.error=function(t){return void 0!==t&&(this.lt=new Qe(t),this.trigger("error")),this.lt},s.played=function(){return this.et?Ue(0,0):Ue()},s.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.initTextTrackListeners=function(){var t=Ie(this,(function(){this.trigger("texttrackchange")})),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",Ie(this,(function(){i.removeEventListener("removetrack",t),i.removeEventListener("addtrack",t)}))))},s.initTrackListeners=function(){var t=this;["video","audio"].forEach((function(i){var s=function(){t.trigger(i+"trackchange")},e=t[i+"Tracks"]();e.addEventListener("removetrack",s),e.addEventListener("addtrack",s),t.on("dispose",(function(){e.removeEventListener("removetrack",s),e.removeEventListener("addtrack",s)}))}))},s.ft=function(){var t=this;if(!ts.WebVTT)if(is.body.contains(this.el())){if(!this.h["vtt.js"]&&ls(gh)&&g.keys(gh).length>0)return void this.trigger("vttjsloaded");var i=is.createElement("script");i.src=this.h["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",i.onload=function(){t.trigger("vttjsloaded")},i.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){i.onload=null,i.onerror=null})),ts.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.ft)},s.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.ft();var r=function(){return t.trigger("texttrackchange")},h=function(){r();for(var t=0;t<i.length;t++){var s=i[t];s.removeEventListener("cuechange",r),"showing"===s.mode&&s.addEventListener("cuechange",r)}};h(),i.addEventListener("change",h),i.addEventListener("addtrack",h),i.addEventListener("removetrack",h),this.on("dispose",(function(){s.off("addtrack",e),s.off("removetrack",n),i.removeEventListener("change",h),i.removeEventListener("addtrack",h),i.removeEventListener("removetrack",h);for(var t=0;t<i.length;t++){i[t].removeEventListener("cuechange",r)}}))}},s.videoTracks=function(){return this.rt=this.rt||new vh,this.rt},s.audioTracks=function(){return this.ht=this.ht||new mh,this.ht},s.textTracks=function(){return this.nt=this.nt||new fh,this.nt},s.remoteTextTracks=function(){return this.dt=this.dt||new fh,this.dt},s.remoteTextTrackEls=function(){return this.vt=this.vt||new ch,this.vt},s.addTextTrack=function(t,i,s){if(!t)throw new v("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 oh(n);return r.tt(h),h}(this,t,i,s)},s.createRemoteTextTrack=function(t){var i=De(t,{tech:this});return new ah(i)},s.addRemoteTextTrack=function(t,i){void 0===t&&(t={});var s=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(ds.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},s.removeRemoteTextTrack=function(t){var i=this.remoteTextTrackEls().Y(t);this.remoteTextTrackEls().K(i),this.remoteTextTracks().it(t),this.ot.it(t)},s.getVideoPlaybackQuality=function(){return{}},s.setPoster=function(){},s.playsinline=function(){},s.setPlaysinline=function(){},s.canPlayType=function(){return""},i.isTech=function(t){return t.prototype instanceof i||t instanceof i||t===i},i.registerTech=function(t,s){if(i.gt||(i.gt={}),!i.isTech(s))throw new v("Tech "+t+" must be a Tech");return i.gt[t]=s,s},i.getTech=function(t){return i.gt&&i.gt[t]?i.gt[t]:ts&&ts.videojs&&ts.videojs[t]?(ds.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),ts.videojs[t]):void 0},i}(Ne);yh.prototype.nt,yh.prototype.ht,yh.prototype.rt,yh.prototype.featuresVolumeControl=!0,yh.prototype.featuresFullscreenResize=!1,yh.prototype.featuresPlaybackRate=!1,yh.prototype.featuresProgressEvents=!1,yh.prototype.featuresTimeupdateEvents=!1,yh.prototype.featuresNativeTextTracks=!1,yh.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:ds.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.wt),this.off(this.v,"loadstart",t.prototype.kt),this.one(this.v,"loadstart",t.prototype.wt)),this.yt=s.handleSource(i,this,this.h),this.on("dispose",this.disposeSourceHandler),this},t.prototype.wt=function(){this.one(this.v,"loadstart",t.prototype.kt)},t.prototype.kt=function(){this.disposeSourceHandler(),this.one(this.v,"loadstart",t.prototype.kt)},t.prototype.disposeSourceHandler=function(){this.bt&&(this.clearTracks(["audio","video"]),this.bt=null),this.cleanupAutoTextTracks(),this.yt&&(this.off(this.v,"loadstart",t.prototype.wt),this.off(this.v,"loadstart",t.prototype.kt),this.yt.dispose&&this.yt.dispose(),this.yt=null)}},Ne.registerComponent("Tech",yh),Ne.registerComponent("MediaTechController",yh),yh.registerTech("Tech",yh);var bh=function(t){function i(i,s,e){var n;if(n=t.call(this,i,s,e)||this,s.playerOptions.sources&&0!==s.playerOptions.sources.length)i.src(s.playerOptions.sources);else for(var r=0,h=s.playerOptions.techOrder;r<h.length;r++){var o=Ee(h[r]),a=yh.getTech(o);if(o||(a=Ne.getComponent(o)),a&&a.isSupported()){i._t(o);break}}return n}return Re(i,t),i}(Ne);Ne.registerComponent("MediaLoader",bh);var wh=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}Re(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=us({className:this.buildCSSClass(),tabIndex:0},s),"button"===i&&ds.error("Creating a ClickableComponent with an HTML element of "+i+" is not supported; use a Button instead."),e=us({role:"button","aria-live":"polite"},e),this.jt=s.tabIndex;var n=t.prototype.createEl.call(this,i,s,e);return this.createControlTextEl(n),n},s.createControlTextEl=function(t){return this.xt=js("span",{className:"vjs-control-text"}),t&&t.appendChild(this.xt),this.controlText(this.St,t),this.xt},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.xt.innerHTML=s,this.nonIconControl||i.setAttribute("title",s),this},s.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},s.enable=function(){return this.removeClass("vjs-disabled"),this.v.setAttribute("aria-disabled","false"),void 0!==this.jt&&this.v.setAttribute("tabIndex",this.jt),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.jt&&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){ke(is,"keydown",Ie(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){_e(is,"keydown",Ie(this,this.handleKeyPress))},i}(Ne);Ne.registerComponent("ClickableComponent",wh);var kh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).update(),i.on("posterchange",Ie(Be(e),e.update)),e}Re(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=js("div",{className:"vjs-poster",tabIndex:-1});return ve||(this.Tt=js("img"),t.appendChild(this.Tt)),t},s.update=function(t){var i=this.player().poster();this.setSrc(i),i?this.show():this.hide()},s.setSrc=function(t){if(this.Tt)this.Tt.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}(wh);Ne.registerComponent("PosterImage",kh);var _h="#222",jh={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 xh(t,i){return"rgba("+k(t[1]+t[1],16)+","+k(t[2]+t[2],16)+","+k(t[3]+t[3],16)+","+i+")"}function Sh(t,i,s){try{t.style[i]=s}catch(t){return}}var Th=function(t){function i(i,s,e){var n;return n=t.call(this,i,s,e)||this,i.on("loadstart",Ie(Be(n),n.toggleDisplay)),i.on("texttrackchange",Ie(Be(n),n.updateDisplay)),i.ready(Ie(Be(n),(function(){if(i.H&&i.H.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",Ie(this,this.updateDisplay));for(var t=this.h.playerOptions.tracks||[],s=0;s<t.length;s++)this.t.addRemoteTextTrack(t[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}Re(i,t);var s=i.prototype;return s.toggleDisplay=function(){this.t.H&&this.t.H.featuresNativeTextTracks?this.hide():this.show()},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},s.clearDisplay=function(){"function"==typeof ts.WebVTT&&ts.WebVTT.processCues(ts,[],this.v)},s.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))}},s.updateForTrack=function(t){if("function"==typeof ts.WebVTT&&t.activeCues){for(var i=this.t.textTrackSettings.getValues(),s=[],e=0;e<t.activeCues.length;e++)s.push(t.activeCues[e]);ts.WebVTT.processCues(ts,s,this.v);for(var n=s.length;n--;){var r=s[n];if(r){var h=r.displayState;if(i.color&&(h.firstChild.style.color=i.color),i.textOpacity&&Sh(h.firstChild,"color",xh(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(h.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&Sh(h.firstChild,"backgroundColor",xh(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?Sh(h,"backgroundColor",xh(i.windowColor,i.windowOpacity)):h.style.backgroundColor=i.windowColor),i.edgeStyle&&("dropshadow"===i.edgeStyle?h.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+_h:"raised"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+_h:"depressed"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+_h:"uniform"===i.edgeStyle&&(h.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+_h)),i.fontPercent&&1!==i.fontPercent){var o=ts.parseFloat(h.style.fontSize);h.style.fontSize=o*i.fontPercent+"px",h.style.height="auto",h.style.top="auto",h.style.bottom="2px"}i.fontFamily&&"default"!==i.fontFamily&&("small-caps"===i.fontFamily?h.firstChild.style.fontVariant="small-caps":h.firstChild.style.fontFamily=jh[i.fontFamily])}}}},i}(Ne);Ne.registerComponent("TextTrackDisplay",Th);var Ch=function(t){function i(){return t.apply(this,arguments)||this}return Re(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},i}(Ne);Ne.registerComponent("LoadingSpinner",Ch);var Ph=function(t){function i(){return t.apply(this,arguments)||this}Re(i,t);var s=i.prototype;return s.createEl=function(t,i,s){void 0===t&&(t="button"),void 0===i&&(i={}),void 0===s&&(s={}),i=us({className:this.buildCSSClass()},i),"button"!==t&&(ds.warn("Creating a Button with an HTML element of "+t+" is deprecated; use ClickableComponent instead."),i=us({tabIndex:0},i),s=us({role:"button"},s)),s=us({type:"button","aria-live":"polite"},s);var e=Ne.prototype.createEl.call(this,t,i,s);return this.createControlTextEl(e),e},s.addChild=function(t,i){void 0===i&&(i={});var s=this.constructor.name;return ds.warn("Adding an actionable (user controllable) child to a Button ("+s+") is not supported; use a ClickableComponent instead."),Ne.prototype.addChild.call(this,t,i)},s.enable=function(){t.prototype.enable.call(this),this.v.removeAttribute("disabled")},s.disable=function(){t.prototype.disable.call(this),this.v.setAttribute("disabled","disabled")},s.handleKeyPress=function(i){32!==i.which&&13!==i.which&&t.prototype.handleKeyPress.call(this,i)},i}(wh);Ne.registerComponent("Button",Ph);var Mh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Ct=!1,e.on("mousedown",e.handleMouseDown),e}Re(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-big-play-button"},s.handleClick=function(t){var i=this;if(this.Ct&&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.Ct=!1,t.prototype.handleKeyPress.call(this,i)},s.handleMouseDown=function(t){this.Ct=!0},i}(Ph);Mh.prototype.St="Play Video",Ne.registerComponent("BigPlayButton",Mh);var Ah=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).controlText(s&&s.controlText||"Close"),e}Re(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}(Ph);Ne.registerComponent("CloseButton",Ah);var Ih=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}Re(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}(Ph);function Eh(t,i){void 0===i&&(i=t),t=t<0?0:t;var s=w.floor(t%60),e=w.floor(t/60%60),n=w.floor(t/3600),r=w.floor(i/60%60),h=w.floor(i/3600);return(j(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)}Ih.prototype.St="Play",Ne.registerComponent("PlayToggle",Ih);var Dh=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}Re(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=js("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=Eh(i,this.t.duration());e!==this.Pt&&(this.Pt=e,this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e)},i}(Ne);Ne.registerComponent("CurrentTimeDisplay",Dh);var Nh=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}Re(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=js("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=Eh(i);this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e}},i}(Ne);Ne.registerComponent("DurationDisplay",Nh);var Fh=function(t){function i(){return t.apply(this,arguments)||this}return Re(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}(Ne);Ne.registerComponent("TimeDivider",Fh);var Bh=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}Re(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=js("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=Eh(this.t.remainingTime());s!==this.Pt&&(this.Pt=s,this.S.innerHTML='<span class="vjs-control-text">'+i+"</span> -"+s)}},i}(Ne);Ne.registerComponent("RemainingTimeDisplay",Bh);var $h=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}Re(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=js("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.xt=js("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.Mt=is.createTextNode(this.localize("LIVE")),this.S.appendChild(this.xt),this.S.appendChild(this.Mt),i.appendChild(this.S),i},s.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},s.handleLanguagechange=function(){this.xt.innerHTML=this.localize("Stream Type"),this.Mt.innerHTML=this.localize("LIVE")},i}(Ne);Ne.registerComponent("LiveDisplay",$h);var Rh=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}Re(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=us({tabIndex:0},s),e=us({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(),is.body.focus(),is.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;is.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=Vs(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.At||!1:(this.At=!!t,this.At?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(Ne);function Oh(t,i){if(!t||!i)return"";if("function"==typeof ts.getComputedStyle){var s=ts.getComputedStyle(t);return s?s[i]:""}return t.currentStyle[i]||""}Ne.registerComponent("Slider",Rh);var Vh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).It=[],e.on(i,"progress",e.update),e.on(i,"languagechange",e.handleLanguagechange),e}Re(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});return this.Et=js("span",{innerHTML:this.localize("Loaded")}),this.Dt=is.createTextNode(": 0%"),this.xt=js("span",{className:"vjs-control-text"}),this.xt.appendChild(this.Et),this.xt.appendChild(this.Dt),i.appendChild(this.xt),i},s.update=function(t){var i=this.t.buffered(),s=this.t.duration(),e=this.t.bufferedEnd(),n=this.It,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(js()),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.Et.innerHTML=this.localize("Loaded")},i}(Ne);Ne.registerComponent("LoadProgressBar",Vh);var Uh=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(Ie(Be(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}Re(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"});return this.Nt=js("span",{innerHTML:this.localize("Progress")}),this.Ft=is.createTextNode(": 0%"),this.xt=js("span",{className:"vjs-control-text"}),this.xt.appendChild(this.Nt),this.xt.appendChild(this.Ft),i.appendChild(this.xt),i},s.updateDataAttr=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();this.v.setAttribute("data-current-time",Eh(i,this.t.duration()))},s.handleLanguagechange=function(){this.Nt.innerHTML=this.localize("Progress")},i}(Ne);Ne.registerComponent("PlayProgressBar",Uh);var Lh=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(Ie(Be(e),e.updateDataAttr)),e}Re(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=js("div",{className:"vjs-time-tooltip"}),this.Nt=js("span",{innerHTML:this.localize("Progress")}),this.Ft=is.createTextNode(": 0%"),this.xt=js("span",{className:"vjs-control-text"}),this.xt.appendChild(this.Nt),this.xt.appendChild(this.Ft),i.appendChild(this.tooltip),i.appendChild(this.xt),i},s.updateDataAttr=function(t){var i=Eh(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.Nt.innerHTML=this.localize("Progress")},i}(Ne);Ne.registerComponent("TooltipProgressBar",Lh);var Hh=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(Ie(Be(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}Re(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=_(Oh(this.player().el(),"width")),s=_(Oh(this.tooltipProgressBar.tooltip,"width")),e=this.tooltipProgressBar.el().style;e.maxWidth=w.floor(i-s/2)+"px",e.minWidth=w.ceil(s/2)+"px",e.right="-"+s/2+"px"}},s.updateAriaAttributes=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();t.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),t.setAttribute("aria-valuetext",Eh(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}(Rh);Hh.prototype.h={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},Hh.prototype.playerEvent="timeupdate",Ne.registerComponent("SeekBar",Hh);var zh=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=js("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)}}(Ie(Be(e),e.handleMouseMove),25))})),e}Re(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-Os(this.el().parentNode).left;this.update(s,e)},s.update=function(t,i){var s=Eh(t,this.t.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",s),this.keepTooltipsInside){var e=i-this.Bt(i)+1,n=_(Oh(this.tooltip,"width"))/2;this.tooltip.innerHTML=s,this.tooltip.style.right="-"+(n-e)+"px"}},s.calculateDistance=function(t){return Vs(this.el().parentNode,t).x},s.Bt=function(t){if(!this.keepTooltipsInside)return t;var i=_(Oh(this.player().el(),"width")),s=_(Oh(this.tooltip,"width"))/2,e=t;return t<s?e=w.ceil(s):t>i-s&&(e=w.floor(i-s)),e},i}(Ne);Ne.registerComponent("MouseTimeDisplay",zh);var Wh=function(t){function i(){return t.apply(this,arguments)||this}return Re(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(Ne);Wh.prototype.h={children:["seekBar"]},Ne.registerComponent("ProgressControl",Wh);var qh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"fullscreenchange",e.handleFullscreenChange),e}Re(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}(Ph);qh.prototype.St="Fullscreen",Ne.registerComponent("FullscreenToggle",qh);var Gh=function(t){function i(){return t.apply(this,arguments)||this}return Re(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}(Ne);Ne.registerComponent("VolumeLevel",Gh);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(Ie(Be(e),e.updateARIAAttributes)),e}Re(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}(Rh);Xh.prototype.h={children:["volumeLevel"],barName:"volumeLevel"},Xh.prototype.playerEvent="volumechange",Ne.registerComponent("VolumeBar",Xh);var Jh=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 Re(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(Ne);Jh.prototype.h={children:["volumeBar"]},Ne.registerComponent("VolumeControl",Jh);var Qh=function(t){function i(){return t.apply(this,arguments)||this}Re(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",Ie(this,(function(){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=js(i,{className:"vjs-menu-content"});var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.appendChild(this.S),ke(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},i}(Ne);Ne.registerComponent("Popup",Qh);var Yh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e}Re(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}(wh);Ne.registerComponent("PopupButton",Yh);var Kh=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}Re(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++)Ds(this.v,"vjs-vol-"+n);Es(this.v,"vjs-vol-"+s)},i}(Ph);Kh.prototype.St="Mute",Ne.registerComponent("MuteToggle",Kh);var Zh=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(Be(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}Re(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 Qh(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){Kh.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},s.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],Ie(this,this.handleMouseDown))},s.handleMouseDown=function(t){this.on(["mousemove","touchmove"],Ie(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.v.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},s.handleMouseUp=function(t){this.off(["mousemove","touchmove"],Ie(this.volumeBar,this.volumeBar.handleMouseMove))},i}(Yh);Zh.prototype.volumeUpdate=Kh.prototype.update,Zh.prototype.St="Mute",Ne.registerComponent("VolumeMenuButton",Zh);var to=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).$t=-1,e.on("keydown",e.handleKeyPress),e}Re(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",Ie(this,(function(t){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=js(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),ke(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}(Ne);Ne.registerComponent("Menu",to);var io=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}Re(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 to(this.t);if(this.Vt=0,this.h.title){var i=js("li",{className:"vjs-menu-title",innerHTML:Ee(this.h.title),tabIndex:-1});this.Vt+=1,t.m.unshift(i),Ss(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",Ie(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}(wh);Ne.registerComponent("MenuButton",io);var so=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 Be(e);var r=Ie(Be(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 Re(i,t),i}(io);Ne.registerComponent("TrackButton",so);var eo=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}Re(i,t);var s=i.prototype;return s.createEl=function(i,s,e){this.nonIconControl=!0;var n=t.prototype.createEl.call(this,"li",us({className:"vjs-menu-item",tabIndex:-1},s),e);return this.Ut=is.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}(wh);Ne.registerComponent("MenuItem",eo);var no=function(t){function i(i,s){var e,n,r=s.track,h=i.textTracks();if(s.label=r.label||r.language||"Unknown",s.selected=r.default||"showing"===r.mode,(e=t.call(this,i,s)||this).track=r,h){var o=Ie(Be(e),e.handleTracksChange);i.on(["loadstart","texttrackchange"],o),h.addEventListener("change",o),e.on("dispose",(function(){h.removeEventListener("change",o)}))}h&&void 0===h.onchange&&e.on(["tap","click"],(function(){if("object"!=typeof ts.Event)try{n=new ts.Event("change")}catch(t){}n||(n=is.createEvent("Event")).initEvent("change",!0,!0),h.dispatchEvent(n)}));return e}Re(i,t);var s=i.prototype;return s.handleClick=function(i){var s=this.track.kind,e=this.t.textTracks();if(t.prototype.handleClick.call(this,i),e)for(var n=0;n<e.length;n++){var r=e[n];r.kind===s&&(r===this.track?"showing"!==r.mode&&(r.mode="showing"):"disabled"!==r.mode&&(r.mode="disabled"))}},s.handleTracksChange=function(t){this.selected("showing"===this.track.mode)},i}(eo);Ne.registerComponent("TextTrackMenuItem",no);var ro=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 Re(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}(no);Ne.registerComponent("OffTextTrackMenuItem",ro);var ho=function(t){function i(i,s){return void 0===s&&(s={}),s.tracks=i.textTracks(),t.call(this,i,s)||this}return Re(i,t),i.prototype.createItems=function(t){void 0===t&&(t=[]),t.push(new ro(this.t,{kind:this.Lt})),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.Lt&&t.push(new no(this.t,{track:e,selectable:!0}))}return t},i}(so);Ne.registerComponent("TextTrackButton",ho);var oo=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",Ie(Be(e),e.update)),e}Re(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}(eo);Ne.registerComponent("ChaptersTrackMenuItem",oo);var ao=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}Re(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},s.update=function(i){this.Ht&&(!i||"addtrack"!==i.type&&"removetrack"!==i.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},s.setTrack=function(t){if(this.Ht!==t){if(this.zt||(this.zt=this.update.bind(this)),this.Ht){var i=this.t.remoteTextTrackEls().Y(this.Ht);i&&i.removeEventListener("load",this.zt),this.Ht=null}if(this.Ht=t,this.Ht){this.Ht.mode="hidden";var s=this.t.remoteTextTrackEls().Y(this.Ht);s&&s.addEventListener("load",this.zt)}}},s.findChaptersTrack=function(){for(var t=this.t.textTracks()||[],i=t.length-1;i>=0;i--){var s=t[i];if(s.kind===this.Lt)return s}},s.getMenuCaption=function(){return this.Ht&&this.Ht.label?this.Ht.label:this.localize(Ee(this.Lt))},s.createMenu=function(){return this.h.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},s.createItems=function(){var t=[];if(!this.Ht)return t;var i=this.Ht.cues;if(!i)return t;for(var s=0,e=i.length;s<e;s++){var n=i[s],r=new oo(this.t,{track:this.Ht,cue:n});t.push(r)}return t},i}(ho);ao.prototype.Lt="chapters",ao.prototype.St="Chapters",Ne.registerComponent("ChaptersButton",ao);var uo=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=Ie(Be(n),n.handleTracksChange);r.addEventListener("change",h),n.on("dispose",(function(){r.removeEventListener("change",h)}))}return n}Re(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.Lt&&"showing"===r.mode){s=!0;break}}s?this.disable():this.enable()},s.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},i}(ho);uo.prototype.Lt="descriptions",uo.prototype.St="Descriptions",Ne.registerComponent("DescriptionsButton",uo);var co=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 Re(i,t),i.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},i}(ho);co.prototype.Lt="subtitles",co.prototype.St="Subtitles",Ne.registerComponent("SubtitlesButton",co);var lo=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 Re(i,t),i.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").v.focus()},i}(no);Ne.registerComponent("CaptionSettingsMenuItem",lo);var fo=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}Re(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 lo(this.t,{kind:this.Lt})),this.Vt+=1),t.prototype.createItems.call(this,i)},i}(ho);fo.prototype.Lt="captions",fo.prototype.St="Captions",Ne.registerComponent("CaptionsButton",fo);var vo=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=Ie(Be(e),e.handleTracksChange);r.addEventListener("change",h),e.on("dispose",(function(){r.removeEventListener("change",h)}))}return e}Re(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}(eo);Ne.registerComponent("AudioTrackMenuItem",vo);var po=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}Re(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 vo(this.t,{track:e,selectable:!0}))}return t},i}(so);po.prototype.St="Audio Track",Ne.registerComponent("AudioTrackButton",po);var mo=function(t){function i(i,s){var e,n=s.rate,r=_(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}Re(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}(eo);mo.prototype.contentElType="button",Ne.registerComponent("PlaybackRateMenuItem",mo);var go=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}Re(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this);return this.Ut=js("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 to(this.player()),i=this.playbackRates();if(i)for(var s=i.length-1;s>=0;s--)t.addChild(new mo(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}(io);go.prototype.St="Playback Rate",Ne.registerComponent("PlaybackRateMenuButton",go);var yo=function(t){function i(){return t.apply(this,arguments)||this}Re(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}(Ne);Ne.registerComponent("Spacer",yo);var bo=function(t){function i(){return t.apply(this,arguments)||this}Re(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=" ",i},i}(yo);Ne.registerComponent("CustomControlSpacer",bo);var wo=function(t){function i(){return t.apply(this,arguments)||this}return Re(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(Ne);wo.prototype.h={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},Ne.registerComponent("ControlBar",wo);var ko=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"error",e.open),e}Re(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}(en);ko.prototype.h=De(en.prototype.h,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Ne.registerComponent("ErrorDisplay",ko);var _o="vjs-text-track-settings",jo=["#000","Black"],xo=["#00F","Blue"],So=["#0FF","Cyan"],To=["#0F0","Green"],Co=["#F0F","Magenta"],Po=["#F00","Red"],Mo=["#FFF","White"],Ao=["#FF0","Yellow"],Io=["1","Opaque"],Eo=["0.5","Semi-Transparent"],Do=["0","Transparent"],No={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[jo,Mo,Po,To,xo,Ao,Co,So]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Io,Eo,Do]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Mo,jo,Po,To,xo,Ao,Co,So]},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:[Io,Eo]},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:[Do,Eo,Io]}};function Fo(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}No.windowColor.options=No.backgroundColor.options;var Bo,$o=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).setDefaults(),e.hide(),e.updateDisplay=Ie(Be(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()})),as(No,(function(t){e.on(e.$(t.selector),"change",e.updateDisplay)})),e.h.persistTextTrackSettings&&e.restoreSettings(),e}Re(i,t);var s=i.prototype;return s.Wt=function(t){var i=this,s=No[t],e=s.id.replace("%s",this.o);return[js("label",{className:"vjs-label",textContent:s.label},{for:e}),js("select",{id:e},void 0,s.options.map((function(t){return js("option",{textContent:i.localize(t[1]),value:t[0]})})))]},s.qt=function(){var t=js("legend",{textContent:this.localize("Text")}),i=this.Wt("color"),s=js("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.Wt("textOpacity"));return js("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Gt=function(){var t=js("legend",{textContent:this.localize("Background")}),i=this.Wt("backgroundColor"),s=js("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.Wt("backgroundOpacity"));return js("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Xt=function(){var t=js("legend",{textContent:this.localize("Window")}),i=this.Wt("windowColor"),s=js("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.Wt("windowOpacity"));return js("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Jt=function(){return js("div",{className:"vjs-tracksettings-colors"},void 0,[this.qt(),this.Gt(),this.Xt()])},s.Qt=function(){var t=js("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.Wt("fontPercent")),i=js("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.Wt("edgeStyle")),s=js("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.Wt("fontFamily"));return js("div",{className:"vjs-tracksettings-font"},void 0,[t,i,s])},s.Yt=function(){var t=js("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=js("button",{className:"vjs-done-button",textContent:"Done"});return js("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},s.createEl=function(){var t=js("div",{className:"vjs-tracksettings"},void 0,[this.Jt(),this.Qt(),this.Yt()]),i=js("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.o,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),s=js("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.o,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),e=js("div",void 0,{role:"document"},[i,s,t]);return js("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":i.id,"aria-describedby":s.id},e)},s.getValues=function(){var t=this;return function(t,i,s){return void 0===s&&(s=0),os(t).reduce((function(s,e){return i(s,t[e],e)}),s)}(No,(function(i,s,e){var n=function(t,i){return Fo(t.options[t.options.selectedIndex].value,i)}(t.$(s.selector),s.parser);return void 0!==n&&(i[e]=n),i}),{})},s.setValues=function(t){var i=this;as(No,(function(s,e){!function(t,i,s){if(i)for(var e=0;e<t.options.length;e++)if(Fo(t.options[e].value,s)===i){t.selectedIndex=e;break}}(i.$(s.selector),t[e],s.parser)}))},s.setDefaults=function(){var t=this;as(No,(function(i){var s=i.hasOwnProperty("default")?i.default:0;t.$(i.selector).selectedIndex=s}))},s.restoreSettings=function(){var t;try{t=JSON.parse(ts.localStorage.getItem(_o))}catch(t){ds.warn(t)}t&&this.setValues(t)},s.saveSettings=function(){if(this.h.persistTextTrackSettings){var t=this.getValues();try{g.keys(t).length?ts.localStorage.setItem(_o,JSON.stringify(t)):ts.localStorage.removeItem(_o)}catch(t){ds.warn(t)}}},s.updateDisplay=function(){var t=this.t.getChild("textTrackDisplay");t&&t.updateDisplay()},i}(Ne);Ne.registerComponent("TextTrackSettings",$o);var Ro,e=function(t){function i(i,s){var e;e=t.call(this,i,s)||this;var n=i.source,r=!1;if(n&&(e.v.currentSrc!==n.src||i.tag&&3===i.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")||!ln(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=Ee(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&&ds.warn(gs(Bo||(Bo=ss(["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=Ie(Be(e),e.handleTextTrackChange),e.hi=Ie(Be(e),e.handleTextTrackAdd),e.oi=Ie(Be(e),e.handleTextTrackRemove),e.ai()),e.ci(),(de||Ys||ne)&&!0===i.nativeControlsForTouch&&e.setControls(!0),e.fi(),e.triggerReady(),e}Re(i,t);var s=i.prototype;return s.dispose=function(){var s=this;["audio","video","text"].forEach((function(t){var i=Ee(t),e=s.v[t+"Tracks"];e&&e.removeEventListener&&(e.removeEventListener("change",s["handle"+i+"ti"]),e.removeEventListener("addtrack",s["handle"+i+"ii"]),e.removeEventListener("removetrack",s["handle"+i+"si"])),e&&s.off("loadstart",s["removeOld"+i+"ei"])})),i.disposeMediaElement(this.v),t.prototype.dispose.call(this)},s.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)}))},s.createEl=function(){var t=this.h.tag;if(!t||!this.h.playerElIngest&&!this.movingMediaElementInDOM){if(t){var s=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(s,t),i.disposeMediaElement(t),t=s}else{t=is.createElement("video");var e=De({},this.h.tag&&Bs(this.h.tag));de&&!0===this.h.nativeControlsForTouch||delete e.controls,Fs(t,us(e,{id:this.h.techId,class:"vjs-tech"}))}t.playerId=this.h.playerId}void 0!==this.h.preload&&$s(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?$s(t,h,h):Rs(t,h),t[h]=o)}return t},s.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)}))}},s.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.di)}},s.handleTextTrackChange=function(t){var i=this.textTracks();this.textTracks().trigger({type:"change",target:i,currentTarget:i,srcElement:i})},s.handleTextTrackAdd=function(t){this.textTracks().tt(t.track)},s.handleTextTrackRemove=function(t){this.textTracks().it(t.track)},s.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)}}},s.di=function(t){var i=this.textTracks(),s=this.el().textTracks;this.ni(i,s)},s.play=function(){var t=this.v.play();void 0!==t&&"function"==typeof t.then&&t.then(null,(function(t){}))},s.setCurrentTime=function(t){try{this.v.currentTime=t}catch(t){ds(t,"Video is not ready. (Video.js)")}},s.duration=function(){var t=this;if(this.v.duration===1/0&&ie&&oe&&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},s.width=function(){return this.v.offsetWidth},s.height=function(){return this.v.offsetHeight},s.fi=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)}))}},s.supportsFullScreen=function(){if("function"==typeof this.v.webkitEnterFullScreen){var t=ts.navigator&&ts.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},s.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()},s.exitFullScreen=function(){this.v.webkitExitFullScreen()},s.src=function(t){if(void 0===t)return this.v.src;this.setSrc(t)},s.reset=function(){i.resetMediaElement(this.v)},s.currentSrc=function(){return this.bt?this.bt.src:this.v.currentSrc},s.setControls=function(t){this.v.controls=!!t},s.addTextTrack=function(i,s,e){return this.featuresNativeTextTracks?this.v.addTextTrack(i,s,e):t.prototype.addTextTrack.call(this,i,s,e)},s.createRemoteTextTrack=function(i){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,i);var s=is.createElement("track");return i.kind&&(s.kind=i.kind),i.label&&(s.label=i.label),(i.language||i.srclang)&&(s.srclang=i.language||i.srclang),i.default&&(s.default=i.default),i.id&&(s.id=i.id),i.src&&(s.src=i.src),s},s.addRemoteTextTrack=function(i,s){var e=t.prototype.addRemoteTextTrack.call(this,i,s);return this.featuresNativeTextTracks&&this.el().appendChild(e),e},s.removeRemoteTextTrack=function(i){if(t.prototype.removeRemoteTextTrack.call(this,i),this.featuresNativeTextTracks)for(var s=this.$$("track"),e=s.length;e--;)i!==s[e]&&i!==s[e].track||this.el().removeChild(s[e])},s.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),ts.performance&&"function"==typeof ts.performance.now?t.creationTime=ts.performance.now():ts.performance&&ts.performance.timing&&"number"==typeof ts.performance.timing.navigationStart&&(t.creationTime=ts.Date.now()-ts.performance.timing.navigationStart),t},i}(yh);ws()&&(e.TEST_VID=is.createElement("video"),(Ro=is.createElement("track")).kind="captions",Ro.srclang="en",Ro.label="English",e.TEST_VID.appendChild(Ro)),e.isSupported=function(){try{e.TEST_VID.volume=.5}catch(t){return!1}return!(!e.TEST_VID||!e.TEST_VID.canPlayType)},e.canControlVolume=function(){try{var t=e.TEST_VID.volume;return e.TEST_VID.volume=t/2+.1,t!==e.TEST_VID.volume}catch(t){return!1}},e.canControlPlaybackRate=function(){if(ie&&oe&&ae<58)return!1;try{var t=e.TEST_VID.playbackRate;return e.TEST_VID.playbackRate=t/2+.1,t!==e.TEST_VID.playbackRate}catch(t){return!1}},e.supportsNativeTextTracks=function(){return fe},e.supportsNativeVideoTracks=function(){return!(!e.TEST_VID||!e.TEST_VID.videoTracks)},e.supportsNativeAudioTracks=function(){return!(!e.TEST_VID||!e.TEST_VID.audioTracks)},e.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],e.prototype.featuresVolumeControl=e.canControlVolume(),e.prototype.featuresPlaybackRate=e.canControlPlaybackRate(),e.prototype.movingMediaElementInDOM=!Zs,e.prototype.featuresFullscreenResize=!0,e.prototype.featuresProgressEvents=!0,e.prototype.featuresTimeupdateEvents=!0,e.prototype.featuresNativeTextTracks=e.supportsNativeTextTracks(),e.prototype.featuresNativeVideoTracks=e.supportsNativeVideoTracks(),e.prototype.featuresNativeAudioTracks=e.supportsNativeAudioTracks();var Oo=e.TEST_VID&&e.TEST_VID.constructor.prototype.canPlayType,Vo=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,Uo=/^video\/mp4/i;e.patchCanPlayType=function(){se>=4&&!re?e.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Vo.test(t)?"maybe":Oo.call(this,t)}:ee&&(e.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Uo.test(t)?"maybe":Oo.call(this,t)})},e.unpatchCanPlayType=function(){var t=e.TEST_VID.constructor.prototype.canPlayType;return e.TEST_VID.constructor.prototype.canPlayType=Oo,t},e.patchCanPlayType(),e.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){}}()}}},e.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){e.prototype[t]=function(){return this.v[t]||this.v.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){e.prototype["set"+Ee(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){e.prototype[t]=function(){return this.v[t]}})),["volume","src","poster","preload","playbackRate"].forEach((function(t){e.prototype["set"+Ee(t)]=function(i){this.v[t]=i}})),["pause","load"].forEach((function(t){e.prototype[t]=function(){return this.v[t]()}})),yh.withSourceHandlers(e),e.nativeSourceHandler={},e.nativeSourceHandler.canPlayType=function(t){try{return e.TEST_VID.canPlayType(t)}catch(t){return""}},e.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return e.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 e.nativeSourceHandler.canPlayType("video/"+s)}return""},e.nativeSourceHandler.handleSource=function(t,i,s){i.setSrc(t.src)},e.nativeSourceHandler.dispose=function(){},e.registerSourceHandler(e.nativeSourceHandler),Ne.registerComponent("Html5",e),yh.registerTech("Html5",e);var Lo=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],Ho=function(t){function i(s,e,n){var r;if(s.id=s.id||["vjs_video",ns()].join("_"),(e=us(i.getTagSettings(s),e)).initChildren=!1,e.createEl=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof s.closest){var h=s.closest("[lang]");h&&(e.language=h.getAttribute("lang"))}else for(var o=s;o&&1===o.nodeType;){if(Bs(o).hasOwnProperty("lang")){e.language=o.getAttribute("lang");break}o=o.parentNode}if(!(r=t.call(this,null,e,n)||this).h||!r.h.techOrder||!r.h.techOrder.length)throw new v("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(r.tag=s,r.tagAttributes=s&&Bs(s),r.language(r.h.language),e.languages){var a={};g.getOwnPropertyNames(e.languages).forEach((function(t){a[t.toLowerCase()]=e.languages[t]})),r.vi=a}else r.vi=i.prototype.h.languages;r.pi={},r.mi=e.poster||"",r.gi=!!e.controls,s.controls=!1,r.yi=!1,r.v=r.createEl();var u=De(r.h);if(e.plugins){var c=e.plugins;g.getOwnPropertyNames(c).forEach((function(t){"function"==typeof this[t]?this[t](c[t]):ds.error("Unable to find plugin:",t)}),Be(r))}r.h.playerOptions=u,r.initChildren(),r.isAudio("audio"===s.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"),Zs||r.addClass("vjs-workinghover"),i.players[r.o]=Be(r);var l="5.20.6-opentelly.14".split(".")[0];return r.addClass("vjs-v"+l),r.userActive(!0),r.reportUserActivity(),r.wi(),r.on("fullscreenchange",r.ki),r.on("stageclick",r._i),r}Re(i,t);var s=i.prototype;return s.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.ji&&this.ji.parentNode&&this.ji.parentNode.removeChild(this.ji),i.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(),t.prototype.dispose.call(this)},s.createEl=function(){var i,s=this.tag,e=this.xi=s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player");i=this.v=e?s.parentNode:t.prototype.createEl.call(this,"div"),s.setAttribute("tabindex","-1"),s.removeAttribute("width"),s.removeAttribute("height");var n=Bs(s);if(g.getOwnPropertyNames(n).forEach((function(t){"class"===t?i.className+=" "+n[t]:i.setAttribute(t,n[t])})),s.playerId=s.id,s.id+="Si",s.className="vjs-tech",s.player=i.player=this,this.addClass("vjs-paused"),!0!==ts.VIDEOJS_NO_DYNAMIC_STYLE){this.ji=Me("vjs-styles-dimensions");var r=Ws(".vjs-styles-defaults"),h=Ws("head");h.insertBefore(this.ji,r?r.nextSibling:h.firstChild)}this.width(this.h.width),this.height(this.h.height),this.fluid(this.h.fluid),this.aspectRatio(this.h.aspectRatio);for(var o=s.getElementsByTagName("a"),a=0;a<o.length;a++){var u=o.item(a);Es(u,"vjs-hidden"),u.setAttribute("hidden","hidden")}return s.Kt=s.networkState,s.parentNode&&!e&&s.parentNode.insertBefore(i,s),Ss(s,i),this.m.unshift(s),this.v=i,i},s.width=function(t){return this.dimension("width",t)},s.height=function(t){return this.dimension("height",t)},s.dimension=function(t,i){var s="width"===t?"Ti":"Ci";if(void 0===i)return this[s]||0;if(""===i)this[s]=void 0;else{var e=_(i);if(j(e))return ds.error('Improper value "'+i+'" supplied for for '+t),this;this[s]=e}return this.Pi(),this},s.fluid=function(t){if(void 0===t)return!!this.Mi;this.Mi=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.Pi()},s.aspectRatio=function(t){if(void 0===t)return this.Ai;if(!/^\d+\:\d+$/.test(t))throw new v("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.Ai=t,this.fluid(!0),this.Pi()},s.Pi=function(){if(!0!==ts.VIDEOJS_NO_DYNAMIC_STYLE){var t,i,s,e=(void 0!==this.Ai&&"auto"!==this.Ai?this.Ai:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),n=e[1]/e[0];t=void 0!==this.Ti?this.Ti:void 0!==this.Ci?this.Ci/n:this.videoWidth()||300,i=void 0!==this.Ci?this.Ci:t*n,s=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(s),Ae(this.ji,"\n ."+s+" {\n width: "+t+"px;\n height: "+i+"px;\n }\n\n ."+s+".vjs-fluid {\n padding-top: "+100*n+"%;\n }\n ")}else{var r="number"==typeof this.Ti?this.Ti:this.h.width,h="number"==typeof this.Ci?this.Ci:this.h.height,o=this.H&&this.H.el();o&&(r>=0&&(o.width=r),h>=0&&(o.height=h))}},s._t=function(t,i){var s=this;this.H&&this.Ii(),"Html5"!==t&&this.tag&&(yh.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Ei=t,this.T=!1;var e=us({source:i,nativeControlsForTouch:this.h.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Di",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.xi||!1,"vtt.js":this.h["vtt.js"]},this.h[t.toLowerCase()]);this.tag&&(e.tag=this.tag),i&&(this.Ni=i.type,i.src===this.pi.src&&this.pi.currentTime>0&&(e.startTime=this.pi.currentTime),this.pi.sources=null,this.pi.source=i,this.pi.src=i.src);var n=yh.getTech(t);n||(n=Ne.getComponent(t)),this.H=new n(e),this.H.ready(Ie(this,this.Fi),!0),tn(this.Bi||[],this.H),Lo.forEach((function(t){s.on(s.H,t,s["handleTech"+Ee(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.Li),this.on(this.H,"seeking",this.Hi),this.on(this.H,"seeked",this.zi),this.on(this.H,"play",this.Wi),this.on(this.H,"firstplay",this.qi),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.Pi),this.on(this.H,"resize",this.Pi),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||Ss(this.H.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},s.Ii=function(){this.rt=this.videoTracks(),this.nt=this.textTracks(),this.ht=this.audioTracks(),this.Bi=Ze(this.H),this.T=!1,this.H.dispose(),this.H=!1},s.tech=function(t){if(t&&t.IWillNotUseThisInPlugins)return this.H;var i="\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n ";throw ts.alert(i),new v(i)},s.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)},s.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)},s.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){ds("deleting tag.poster throws in some browsers",t)}this.play()}},s.$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"))},s.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},s.Wi=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},s.Ri=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return t.removeClass("vjs-waiting")}))},s.Oi=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},s.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},s.Ui=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},s.Hi=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},s.zi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},s.qi=function(){this.h.starttime&&(ds.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")},s.Gi=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},s.Li=function(){this.addClass("vjs-ended"),this.h.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},s.Xi=function(){this.duration(this.Zi("duration"))},s.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()))},s.os=function(){this.userActive(!this.userActive())},s.ns=function(){this.userWasActive=this.userActive()},s.rs=function(){this.userWasActive&&this.reportUserActivity()},s.hs=function(t){t.cancelable&&t.preventDefault()},s.ki=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},s._i=function(){this.reportUserActivity()},s.Ji=function(t,i){i&&(this.toggleClass("vjs-ios-native-fs",!(!i.nativeIOSFullscreen||!i.isFullscreen)),this.isFullscreen(i.isFullscreen)),this.trigger("fullscreenchange")},s.Qi=function(){var t=this.H.error();this.error(t)},s.Ki=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},s.getCache=function(){return this.pi},s.us=function(t,i){if(this.H&&!this.H.T)this.H.ready((function(){this[t](i)}),!0);else try{this.H&&this.H[t](i)}catch(t){throw ds(t),t}},s.Zi=function(t){if(this.H&&this.H.T)try{return this.H[t]()}catch(i){throw void 0===this.H[t]?ds("Video.js: "+t+" method not defined for "+this.Ei+" playback technology.",i):"TypeError"===i.name?(ds("Video.js: "+t+" unavailable on "+this.Ei+" playback technology element.",i),this.H.T=!1):ds(i),i}},s.play=function(){return this.src()||this.currentSrc()?this.us("play"):this.H.one("loadstart",(function(){this.play()})),this},s.pause=function(){return this.us("pause"),this},s.paused=function(){return!1!==this.Zi("paused")},s.scrubbing=function(t){return void 0!==t?(this.yi=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.yi},s.currentTime=function(t){return void 0!==t?(this.us("setCurrentTime",t),this):(this.pi.currentTime=this.Zi("currentTime")||0,this.pi.currentTime)},s.duration=function(t){return void 0===t?void 0!==this.pi.duration?this.pi.duration:NaN:((t=_(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)},s.remainingTime=function(){return this.duration()-this.currentTime()},s.buffered=function(){var t=this.Zi("buffered");return t&&t.length||(t=Ue(0,0)),t},s.bufferedPercent=function(){return Le(this.buffered(),this.duration())},s.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),s=t.end(t.length-1);return s>i&&(s=i),s},s.volume=function(t){var i;return void 0!==t?(i=w.max(0,w.min(1,_(t))),this.pi.volume=i,this.us("setVolume",i),this):(i=_(this.Zi("volume")),j(i)?1:i)},s.muted=function(t){return void 0!==t?(this.us("setMuted",t),this):this.Zi("muted")||!1},s.supportsFullScreen=function(){return this.Zi("supportsFullScreen")||!1},s.isFullscreen=function(t){return void 0!==t?(this.cs=!!t,this):!!this.cs},s.requestFullscreen=function(t){var i,s=Ge;return this.isFullscreen(!0),s.requestFullscreen?(ke(is,s.fullscreenchange,Ie(this,(function t(i){this.isFullscreen(is[s.fullscreenElement]),!1===this.isFullscreen()&&_e(is,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},s.exitFullscreen=function(){var t=Ge;return this.isFullscreen(!1),t.requestFullscreen?is[t.exitFullscreen]():this.H.supportsFullScreen()?this.us("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},s.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=is.documentElement.style.overflow,ke(is,"keydown",Ie(this,this.fullWindowOnEscKey)),is.documentElement.style.overflow="hidden",Es(is.body,"vjs-full-window"),this.trigger("enterFullWindow")},s.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},s.exitFullWindow=function(){this.isFullWindow=!1,_e(is,"keydown",this.fullWindowOnEscKey),is.documentElement.style.overflow=this.docOrigOverflow,Ds(is.body,"vjs-full-window"),this.trigger("exitFullWindow")},s.canPlayType=function(t){for(var i,s=0,e=this.h.techOrder;s<e.length;s++){var n=Ee(e[s]),r=yh.getTech(n);if(r||(r=Ne.getComponent(n)),r){if(r.isSupported()&&(i=r.canPlayType(t)))return i}else ds.error('The "'+n+'" tech is undefined. Skipped browser support check for that tech.')}return""},s.selectSource=function(t){var i,s=this,e=this.h.techOrder.map(Ee).map((function(t){return[t,yh.getTech(t)||Ne.getComponent(t)]})).filter((function(t){var i=t[0],s=t[1];return s?s.isSupported():(ds.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),n=function(t,i,s){var e;return t.some((function(t){return i.some((function(i){if(e=s(t,i))return!0}))})),e},r=function(t,i){var e=t[0];if(t[1].canPlaySource(i,s.h[e.toLowerCase()]))return{source:i,tech:e}};return(this.h.sourceOrder?n(t,e,(i=r,function(t,s){return i(s,t)})):n(e,t,r))||!1},s.src=function(t){if(void 0===t)return this.Zi("src");var i=yh.getTech(this.Ei);return i||(i=Ne.getComponent(this.Ei)),Array.isArray(t)?this.ls(t):"string"==typeof t?this.src({src:t}):t instanceof g&&(t.type&&!i.canPlaySource(t,this.h[this.Ei.toLowerCase()])?this.ls([t]):(this.pi.sources=null,this.pi.source=t,this.pi.src=t.src,this.Ni=t.type||"",this.ready((function(){i.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},s.ls=function(t){var i=this.selectSource(t);i?(i.tech===this.Ei?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())},s.load=function(){return this.us("load"),this},s.reset=function(){return this._t(Ee(this.h.techOrder[0]),null),this.us("reset"),this},s.currentSources=function(){var t=this.currentSource(),i=[];return 0!==g.keys(t).length&&i.push(t),this.pi.sources||i},s.currentSource=function(){var t={},i=this.currentSrc();return i&&(t.src=i),this.pi.source||t},s.currentSrc=function(){return this.Zi("currentSrc")||this.pi.src||""},s.currentType=function(){return this.Ni||""},s.preload=function(t){return void 0!==t?(this.us("setPreload",t),this.h.preload=t,this):this.Zi("preload")},s.autoplay=function(t){return void 0!==t?(this.us("setAutoplay",t),this.h.autoplay=t,this):this.Zi("autoplay",t)},s.playsinline=function(t){return void 0!==t?(this.us("setPlaysinline",t),this.h.playsinline=t,this):this.Zi("playsinline")},s.loop=function(t){return void 0!==t?(this.us("setLoop",t),this.h.loop=t,this):this.Zi("loop")},s.poster=function(t){return void 0===t?this.mi:(t||(t=""),this.mi=t,this.us("setPoster",t),this.trigger("posterchange"),this)},s.Yi=function(){!this.mi&&this.H&&this.H.poster&&(this.mi=this.H.poster()||"",this.trigger("posterchange"))},s.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},s.usingNativeControls=function(t){return void 0!==t?(t=!!t,this.fs!==t&&(this.fs=t,t?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):!!this.fs},s.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 Qe(t),this.addClass("vjs-error"),ds.error("(CODE:"+this.lt.code+" "+Qe.errorTypes[this.lt.code]+")",this.lt.message,this.lt),this.trigger("error"),this)},s.reportUserActivity=function(t){this.ds=!0},s.userActive=function(t){return void 0!==t?((t=!!t)!==this.vs&&(this.vs=t,t?(this.ds=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.ds=!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},s.wi=function(){var t,i,s,e,n=Ie(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.ds){this.ds=!1,this.userActive(!0),this.clearTimeout(e);var t=this.h.inactivityTimeout;t>0&&(e=this.setTimeout((function(){this.ds||this.userActive(!1)}),t))}}),250)},s.playbackRate=function(t){return void 0!==t?(this.us("setPlaybackRate",t),this):this.H&&this.H.featuresPlaybackRate?this.Zi("playbackRate"):1},s.isAudio=function(t){return void 0!==t?(this.ps=!!t,this):!!this.ps},s.videoTracks=function(){return this.H?this.H.videoTracks():(this.rt=this.rt||new vh,this.rt)},s.audioTracks=function(){return this.H?this.H.audioTracks():(this.ht=this.ht||new mh,this.ht)},s.textTracks=function(){if(this.H)return this.H.textTracks()},s.remoteTextTracks=function(){if(this.H)return this.H.remoteTextTracks()},s.remoteTextTrackEls=function(){if(this.H)return this.H.remoteTextTrackEls()},s.addTextTrack=function(t,i,s){if(this.H)return this.H.addTextTrack(t,i,s)},s.addRemoteTextTrack=function(t,i){if(this.H)return this.H.addRemoteTextTrack(t,i)},s.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)},s.getVideoPlaybackQuality=function(){return this.Zi("getVideoPlaybackQuality")},s.videoWidth=function(){return this.H&&this.H.videoWidth&&this.H.videoWidth()||0},s.videoHeight=function(){return this.H&&this.H.videoHeight&&this.H.videoHeight()||0},s.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)},s.languages=function(){return De(i.prototype.h.languages,this.vi)},s.toJSON=function(){var t=De(this.h),i=t.tracks;t.tracks=[];for(var s=0;s<i.length;s++){var e=i[s];(e=De(e)).player=void 0,t.tracks[s]=e}return t},s.createModal=function(t,i){var s=this;(i=i||{}).content=t||"";var e=new en(this,i);return this.addChild(e),e.on("dispose",(function(){s.removeChild(e)})),e.open()},i.getTagSettings=function(t){var i={sources:[],tracks:[]},s=Bs(t),e=s["data-setup"];if(Is(t,"vjs-fluid")&&(s.fluid=!0),null!==e){var n=Ye(e||"{}"),r=n[0],h=n[1];r&&ds.error(r),us(s,h)}if(us(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(Bs(c)):"track"===l&&i.tracks.push(Bs(c))}return i},s.bi=function(){var t=is.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},i}(Ne);Ho.players={};var zo=ts.navigator;Ho.prototype.h={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:zo&&(zo.languages&&zo.languages[0]||zo.userLanguage||zo.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreenOptions:{navigationUI:"hide"}},["ended","seeking","seekable","networkState","readyState"].forEach((function(t){Ho.prototype[t]=function(){return this.Zi(t)}})),Lo.forEach((function(t){Ho.prototype["handleTech"+Ee(t)+"_"]=function(){return this.trigger(t)}})),Ne.registerComponent("Player",Ho);var Wo,qo,Go=function(t){function i(s){var e;void 0===s&&(s={});var n=De(s,{kind:hn[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(ue)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return g.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.q=!0,r||Be(e)}return Re(i,t),i}(un),Xo=function(t){function i(s){var e;void 0===s&&(s={});var n=De(s,{kind:rn[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(ue)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return g.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||Be(e)}return Re(i,t),i}(un);function Jo(t,i,s){var e;if("string"==typeof t){if(0===t.indexOf("#")&&(t=t.slice(1)),Jo.getPlayers()[t])return i&&ds.warn('Player "'+t+'" is already initialised. Options will not be applied.'),s&&Jo.getPlayers()[t].ready(s),Jo.getPlayers()[t];e=function(t){return 0===t.indexOf("#")&&(t=t.slice(1)),is.getElementById(t)}(t)}else e=t;if(!e||!e.nodeName)throw new p("The element or ID supplied is not valid. (videojs)");if(e.player||Ho.players[e.playerId])return e.player||Ho.players[e.playerId];i=i||{},Jo.hooks("beforesetup").forEach((function(t){var s=t(e,De(i));cs(s)&&!Array.isArray(s)?i=De(i,s):ds.error("please return an object in beforesetup hooks")}));var n=new(Ne.getComponent("Player"))(e,i,s);return Jo.hooks("setup").forEach((function(t){return t(n)})),n}"undefined"==typeof HTMLVideoElement&&ws()&&(is.createElement("video"),is.createElement("audio"),is.createElement("track")),Jo.ys={},Jo.hooks=function(t,i){return Jo.ys[t]=Jo.ys[t]||[],i&&(Jo.ys[t]=Jo.ys[t].concat(i)),Jo.ys[t]},Jo.hook=function(t,i){Jo.hooks(t,i)},Jo.removeHook=function(t,i){var s=Jo.hooks(t).indexOf(i);return!(s<=-1)&&(Jo.ys[t]=Jo.ys[t].slice(),Jo.ys[t].splice(s,1),!0)},!0!==ts.VIDEOJS_NO_DYNAMIC_STYLE&&ws()&&((Wo=Ws(".vjs-styles-defaults"))||(Wo=Me("vjs-styles-defaults"),(qo=Ws("head"))&&qo.insertBefore(Wo,qo.firstChild),Ae(Wo,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n "))),Pe(1,Jo),Jo.VERSION="5.20.6-opentelly.14",Jo.options=Ho.prototype.h,Jo.getPlayers=function(){return Ho.players},Jo.players=Ho.players,Jo.getComponent=Ne.getComponent,Jo.registerComponent=function(t,i){yh.isTech(i)&&ds.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Ne.registerComponent.call(Ne,t,i)},Jo.getTech=yh.getTech,Jo.registerTech=yh.registerTech,Jo.browser=pe,Jo.TOUCH_ENABLED=de,Jo.extend=function(t,i){void 0===i&&(i={});var s=function(){t.apply(this,arguments)},e={};for(var n in cs(i)?("function"==typeof i.init&&(ds.warn("Constructor logic via init() is deprecated; please use constructor() instead."),i.constructor=i.init),i.constructor!==g.prototype.constructor&&(s=i.constructor),e=i):"function"==typeof i&&(s=i),function(t,i){if("function"!=typeof i&&null!==i)throw new p("Super expression must either be null or a function, not "+typeof i);t.prototype=g.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},Jo.mergeOptions=De,Jo.bind=Ie,Jo.plugin=function(t,i){Ho.prototype[t]=i},Jo.addLanguage=function(t,i){var s;return t=(""+t).toLowerCase(),Jo.options.languages=De(Jo.options.languages,((s={})[t]=i,s)),Jo.options.languages[t]},Jo.log=ds,Jo.createTimeRange=Jo.createTimeRanges=Ue,Jo.formatTime=Eh,Jo.parseUrl=cn,Jo.isCrossOrigin=ln,Jo.EventTarget=Fe,Jo.on=ke,Jo.one=xe,Jo.off=_e,Jo.trigger=je,Jo.xhr=sh,Jo.TextTrack=oh,Jo.AudioTrack=Go,Jo.VideoTrack=Xo,Jo.isEl=ks,Jo.isTextNode=Us,Jo.createEl=js,Jo.hasClass=Is,Jo.addClass=Es,Jo.removeClass=Ds,Jo.toggleClass=Ns,Jo.setAttributes=Fs,Jo.getAttributes=Bs,Jo.emptyEl=Ls,Jo.appendContent=Hs,Jo.insertContent=zs,Jo.computedStyle=Oh,Bt(),Bt();var Qo=10;function Yo(t){const i=t.duration;if(j(i)){var s;const i=null==(s=t.source)?void 0:s.streamType;return"live"===i||"dvr"===i}return i===1/0}function Ko(t){return t.scrubbing()?t.getCache().currentTime:t.currentTime()}function Zo(t){const i=sa(t);return Yo(t)?i.end(i.length-1):i.start(0)}function ta(t){return sa(t).start(0)}function ia(t){const i=sa(t);return i.end(i.length-1)-i.start(0)}function sa(t){const i=t.seekable;if(i&&i.length)return i;let s=t.duration;return s=isFinite(s)?s:0,new vi([0,s]).ws()}function ea(t,i){void 0===i&&(i=t);let s=t<0?"-":"";t=w.abs(t);let e=w.floor(t%60),n=w.floor(t/60%60),r=w.floor(t/3600);const h=w.floor(i/60%60),o=w.floor(i/3600);return(j(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 na(t){return class extends t{get ks(){var t;return null!=(t=this._s)?t:this._s=ra(this.player())}dispose(){this._s=void 0,super.dispose()}constructor(...t){super(...t),this._s=void 0}}}function ra(t){return t.tech({IWillNotUseThisInPlugins:!0}).theoplayer()}function ha(t){const i=ra(t),s=()=>{const s=Ko(t);t.toggleClass("theo-at-live",function(t,i){if(Yo(t)){let s=t.seekable;return 0===s.length||s.end(s.length-1)-i<Qo}return!1}(i,s)),t.toggleClass("vjs-live",Yo(i)),t.toggleClass("theo-dvr",function(t){var i;return"dvr"===M(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)}Bt(),Bt();var oa="theo-ad-playing",aa="theo-dai-ad-playing";function ua(t,i,s){t.toggleClass(oa,i),t.toggleClass(aa,i&&s)}function ca(){this.userActive(!1)}Bt(),Bt(),Bt();var la=class{constructor(t,i){this.type=t.type,this.target=i,this.playerEvent=t}};Bt();var fa=function(t){return t.js="unavailable",t.xs="available",t.Ss="presenting",t}({});Bt(),Bt(),Bt();var da=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],va=Jo.getTech("Tech"),pa=Jo.getTech("Html5"),ma=class extends va{Ts(){var t;for(const t of da)this.ks.addEventListener(t,this.Cs);this.ks.addEventListener("error",this.Ps),this.ks.addEventListener("contentprotectionerror",this.Ps),this.ks.addEventListener("sourcechange",this.Ms),this.ks.addEventListener("loadstart",this.As),null==(t=this.ks.presentation)||t.addEventListener(gt.MODE_CHANGE,this.Is),this.ks.textTracks.addEventListener("addtrack",this.Es),this.ks.textTracks.addEventListener("removetrack",this.Ds),this.ks.textTracks.addEventListener("change",this.Ns),this.ks.audioTracks.addEventListener("addtrack",this.Fs),this.ks.audioTracks.addEventListener("removetrack",this.Bs),this.ks.audioTracks.addEventListener("change",this.$s)}Rs(){var t;for(const t of da)this.ks.removeEventListener(t,this.Cs);this.ks.removeEventListener("error",this.Ps),this.ks.removeEventListener("contentprotectionerror",this.Ps),this.ks.removeEventListener("sourcechange",this.Ms),this.ks.removeEventListener("loadstart",this.As),null==(t=this.ks.presentation)||t.removeEventListener(gt.MODE_CHANGE,this.Is),this.ks.textTracks.removeEventListener("addtrack",this.Es),this.ks.textTracks.removeEventListener("removetrack",this.Ds),this.ks.textTracks.removeEventListener("change",this.Ns),this.ks.audioTracks.removeEventListener("addtrack",this.Fs),this.ks.audioTracks.removeEventListener("removetrack",this.Bs),this.ks.audioTracks.removeEventListener("change",this.$s)}Os(t){this.trigger(new la(t,this))}createEl(){let t=this.h,i=t.player;if(!i)throw new v(this.localize('Missing required tech option "player"'));let s=i.element;return Jo.setAttributes(s,{id:t.techId}),s}theoplayer(){return this.ks}addTextTrack(t,i,s){return super.addTextTrack(t,i,s)}buffered(){return this.ks.buffered}played(){return this.ks.played}reset(){this.ks.stop()}play(){this.ks.play()}pause(){this.ks.pause()}paused(){return this.ks.paused}currentTime(){return this.ks.currentTime}setCurrentTime(t){this.ks.currentTime=t}duration(){return this.ks.duration}volume(){return this.ks.volume}setVolume(t){this.ks.volume=t}muted(){return this.ks.muted}setMuted(t){this.ks.muted=t}src(t){if(void 0!==t)this.setSrc(t);else{if(this.ks.src)return this.ks.src;if(this.ks.source){if(!G(this.ks.source.ads))return this.ks.source.ads[0].sources;if(function(t){return!!t.sources&&(Wt(t.sources)?t.sources.some(wi):wi(t.sources))}(this.ks.source))return"This source is managed by the Uplynk integration extension.";if(function(t){if(t.sources)if(Wt(t.sources)){for(const i of t.sources)if(gi(i))return!0}else if(Xt(t.sources))return gi(t.sources);return!1}(this.ks.source))return"This source is managed by the DAI integration extension.";if(ji(this.ks.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.ks.src}load(){this.setPreload("auto")}preload(){return this.ks.preload}setPreload(t){this.ks.preload=t}autoplay(){return this.ks.autoplay}setAutoplay(t){this.ks.autoplay=!!t}seeking(){return this.ks.seeking}seekable(){return this.ks.seekable}ended(){return this.ks.ended}playbackRate(){return this.ks.playbackRate}setPlaybackRate(t){this.ks.playbackRate=t}readyState(){return this.ks.readyState}networkState(){return 0}controls(){return!1}videoHeight(){return this.ks.videoHeight}videoWidth(){return this.ks.videoWidth}supportsFullScreen(){return this.ks.presentation.supportsMode(P.FULLSCREEN)}enterFullScreen(){this.ks.presentation.requestMode(P.FULLSCREEN)}exitFullScreen(){this.ks.presentation.requestMode(P.INLINE)}Vs(){let t=this.ks.ads;if(t&&t.playing)return!0;let i=this.ks.vr;return!(!i||i.state===fa.js)}initTextTrackListeners(){return this.on("touchend",(t=>{this.Vs()&&(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.Rs(),this.ks=null,super.dispose()}static isSupported(){return!0}static canPlayType(){return"maybe"}static canPlaySource(t){return"maybe"}get featuresVolumeControl(){return $i}constructor(t={},i){super(t,i),this.Cs=t=>this.Os(t),this.Us=!1,this.Ms=()=>{void 0===this.ks.errorObject&&(this.Os(new Ti(this.ks.currentTime,this.ks.readyState)),this.Os(new Et),this.Os(new Fi(this.ks.duration)))},this.As=()=>{this.Os(new Ht(this.ks.currentTime))},this.Es=t=>{this.textTracks().tt(t.track)},this.Fs=t=>{this.audioTracks().tt(t.track)},this.Ds=t=>{this.textTracks().it(t.track)},this.Bs=t=>{this.audioTracks().it(t.track)},this.Ns=()=>{let t=this.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.$s=()=>{let t=this.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Is=()=>{if(!this.supportsFullScreen())return;let t=this.Us,i=this.ks.presentation.currentMode===P.FULLSCREEN;t!==i&&(this.Us=i,this.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))},this.Ps=()=>{const t=this.ks.errorObject,i=t&&mt(t.code)||-1,s=t&&t.message||"An unknown error occurred.";this.error({code:i,message:this.localize(s)})},this.ks=this.h.player,this.Ts();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()}};ma.prototype.featuresFullscreenResize=pa.prototype.featuresFullscreenResize,ma.prototype.featuresPlaybackRate=pa.prototype.featuresPlaybackRate,ma.prototype.featuresProgressEvents=!0,ma.prototype.featuresTimeupdateEvents=!0,ma.prototype.featuresNativeTextTracks=!0,Jo.registerTech("THEOplayer",ma),Bt(),Bt(),Bt(),Bt();var ga=class{constructor(t){this.Ls=t=>{r(this.Hs,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.zs=t=>{oi(this.Hs,"theo-mobile-button-hover")},this.Ws=t=>{this.Hs.blur()},this.Hs=t,t.addEventListener("touchstart",this.Ls),t.addEventListener("touchend",this.zs),t.addEventListener("focusin",this.Ws)}};Bt(),Bt(),Bt(),Bt();var ya=Jo.getComponent("Menu"),ba=class extends(na(ya)){get qs(){return this.player().el()}Gs(){r(this.qs,"theo-menu-opened")}Xs(){oi(this.qs,"theo-menu-opened")}constructor(t,i){super(t,i)}};Bt();var wa=Jo.getComponent("MenuItem"),ka=class extends(na(wa)){get parentMenu(){return this.Js}buildCSSClass(){return"theo-menu-item vjs-menu-item"}createEl(){let t=super.createEl("li",{className:this.buildCSSClass(),tabIndex:0},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){this.Qs||(this.parentMenu.Ys(this),"tap"!==t.type&&"keydown"!==t.type||(this.Qs=!0,this.trigger("click"),this.Qs=!1))}dispose(){_i.Zs.Ks&&(this.el().removeEventListener("touchstart",this.Ls),this.el().removeEventListener("touchend",this.zs)),super.dispose()}constructor(t,i,s){super(t,Vi({selectable:!0},i)),this.Qs=!1,this.Ls=t=>{r(this.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},this.zs=t=>{oi(this.el(),"theo-mobile-menu-item-hover")},this.Js=s,_i.Zs.Ks&&(this.el().addEventListener("touchstart",this.Ls),this.el().addEventListener("touchend",this.zs))}};Bt();var _a=Jo.getComponent("ClickableComponent"),ja=class extends _a{get parentMenu(){return this.Js}get te(){return this.ie}set te(t){this.ie=t,this.el().setAttribute("tabindex",this.te?"0":"-1"),this.se()}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.Qs&&this.te&&(this.Js.ee(),"tap"===t.type&&(this.Qs=!0,this.trigger("click"),this.Qs=!1))}se(){this.te?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.Qs=!1,this.ie=!1,this.Js=s,this.on(t,"languagechange",this.se)}},xa=class extends ba{get menuHeader(){return this.ne}get menuItems(){return this.children()}addMenuItem(t){t=Vi({playerOptions:this.h.playerOptions},t);let i=new ka(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.re(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"}Gs(){super.Gs(),a.removeEventListener("resize",this.he),a.addEventListener("resize",this.he),this.show()}oe(){let t=this.ae();if(!t)return;let i=t.getClientRects();_i.Zs.Ks?this.ue(t,i):this.ce(t,i)}ae(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0}ce(t,i){}ue(t,i){}Xs(){a.removeEventListener("resize",this.he),super.Xs(),this.hide(),_i.Zs.Ks&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=this.contentEl();r(i,"theo-menu-content");let s=new ja(this.player(),this.h,this);return i.parentNode.insertBefore(s.el(),i),this.ne=s,t}Ys(t){}show(){return this.oe(),super.show()}dispose(){this.ne&&this.ne.dispose(),super.dispose()}constructor(t,i){super(t,i),this.he=()=>this.oe(),this.le=this.player().el(),this.hide(),this.on("menuchange",this.oe)}},Sa=class extends xa{get fe(){return this.de}set fe(t){this.de&&this.de.ve(this),this.de=t,t&&t.pe(this)}me(t){this.fe.ge(t,"replace")}ye(t){t.fe.ge(this,"restore")}be(){oi(this.we,"vjs-hidden"),this.we.style.opacity="1",super.show()}ke(){r(this.we,"vjs-hidden")}Gs(){this.fe&&this.fe.Gs(),super.Gs()}Xs(){this.fe&&this.fe.Xs(),super.Xs(),r(this.we,"vjs-hidden")}ae(){if(this.fe&&this.fe._e)return this.fe._e.we}ce(t,i){if(i.length>0){let t=i[0].height,s=i[0].width;this.de.je.style.height=t+"px",this.de.je.style.width=s+"px"}super.ce(t,i)}constructor(t,i){super(t,i)}};Bt();var Ta=class{get je(){return this.Hs}get _e(){return this.xe}pe(t){t.ke(),this.Hs.appendChild(t.we)}ve(t){this.Hs.removeChild(t.we)}ge(t,i){if(t==this.xe)return;let s=this.xe;if(this.xe=t,this.xe.be(),this._e.focus(),_i.Zs.Ks)s.ke();else{const t="translateX(100%)",e="translateX(-100%)",n=ot("transform");s.we.style.opacity="0",s.we.style[n]="replace"===i?e:t,this.xe.we.style.opacity="1",this.xe.we.style[n]="",u((()=>{s.ke(),s.we.style[n]=""}),300)}}Gs(){this.Se(),this.xe.be(),this.Te()}Xs(){this.Se(),this.xe.ke(),this.Ce.ke(),this.xe=this.Ce,this.Te()}Te(){et((()=>{oi(this.Hs,"theo-no-transition"),oi(this.xe.we,"theo-no-transition")}))}Se(){r(this.Hs,"theo-no-transition"),r(this.xe.we,"theo-no-transition")}constructor(t){this.Ce=this.xe=t,this.Hs=h.createElement("div"),this.Hs.className="theo-tertiary-background theo-menu-animation-container",this.Hs.appendChild(this.Ce.we),this.le=this.xe.player().el()}};Bt(),Bt();var Ca=class extends Sa{get we(){return this.el()}get parentMenu(){return this.Pe}re(t,i){let s=new Pa(t,i,this);return s.subMenu.fe=this.fe,s}ee(){this.Me()}Ys(t){super.Ys(t),this.Me()}Me(){this.parentMenu.ye(this)}buildCSSClass(){return"theo-submenu "+(this.Ae?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+super.buildCSSClass()}addSubMenuItem(t){this.Ae=!0;let i=super.addSubMenuItem(t);return this.removeClass("theo-leaf-submenu"),i}constructor(t,i,s){super(t,i),this.Ae=!1,this.Pe=s,this.menuHeader.te=!0}},Pa=class extends ka{get subMenu(){return this.Ie}handleClick(t){this.parentMenu.me(this.subMenu)}constructor(t,i,s){super(t,Vi({selectable:!1},i),s),this.Ie=new Ca(t,i,s)}},Ma=class extends Sa{get menuButton(){return this.Ee}createEl(){let t=Jo.createEl("div",{className:this.buildCSSClass()});return this.De=super.createEl(),this.De.className=super.buildCSSClass(),r(this.De,"theo-menu-content-animatable"),t.appendChild(this.De),this.fe=new Ta(this),t.appendChild(this.fe.je),t}buildCSSClass(){return"theo-menu-animatable "+super.buildCSSClass()}re(t,i){let s=new Pa(t,i,this);return s.subMenu.fe=this.fe,s}ce(t,i){super.ce(t,i);let s=this.le.getClientRects(),e=s.length>0?s[0]:void 0,n=_(getComputedStyle(this.el()).fontSize);ri(this.el(),this.Ee.el(),e,n)}get we(){return this.De}ee(){this.Ee.closeMenu()}dispose(){this.Ne||(this.Ne=!0,super.dispose())}constructor(t,i,s){super(t,i),this.Ne=!1,this.Ee=s}};Bt();var Aa=class{set Fe(t){this.Be.innerHTML=this.$e.localize(t),this.Re()&&this.Oe(),mi(this.$e.el())}get Fe(){return this.Be.textContent||""}Re(){return!ei(this.Be,"vjs-hidden")}Ve(){this.$e.off("mouseover",this.Oe),this.$e.off("mouseout",this.Ue),this.$e.off("dispose",this.Le),Yt(this.Be)}constructor(t,i){this.Oe=()=>{oi(this.Be,"vjs-hidden");let t=this.$e.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,s=_(getComputedStyle(this.Be).fontSize);ri(this.Be,this.$e.el(),i,s)},this.Ue=()=>{r(this.Be,"vjs-hidden")},this.Le=()=>this.Ve(),this.$e=t,mi(t.el()),bi(t.el()),this.Be=h.createElement("span"),this.Be.innerHTML=this.$e.localize(i),this.Be.className="theo-button-tooltip vjs-hidden",this.Be.setAttribute("aria-hidden","true"),this.$e.el().appendChild(this.Be),this.$e.on("mouseover",this.Oe),this.$e.on("mouseout",this.Ue),this.$e.on("dispose",this.Le)}},Ia=Jo.getComponent("Button"),Ea=class extends(na(Ia)){get He(){const t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}get menu(){return this.ze}isMenuOpen(){return this.We}openMenu(){this.qe&&!this.We&&(this.ze.Gs(),this.el().setAttribute("aria-expanded","true"),this.We=!0,this.ze.focus())}closeMenu(){this.qe&&this.We&&(this.ze.Xs(),this.el().setAttribute("aria-expanded","false"),this.We=!1)}set minimumMenuItems(t){this.Ge=t,this.Xe()}buildCSSClass(){return"theo-controlbar-button vjs-menu-button vjs-menu-button-popup "+super.buildCSSClass()}createEl(t,i,s){return super.createEl("button",{},{"aria-live":"off"})}handleClick(){this.We?this.closeMenu():this.openMenu()}enable(){return this.qe=!0,super.enable()}disable(){return this.closeMenu(),this.qe=!1,super.disable()}se(){this.Be.Fe=this.controlText()}dispose(){this.player().removeChild(this.ze),this.ze.dispose(),this.Be.Ve(),this.ks.removeEventListener("seeking",this.Je),super.dispose()}constructor(t,i){super(t,i),this.We=!1,this.Ge=1,this.qe=!0,this.Qe=t=>{let i=this.el().contains(t.target),s=this.ze.el().contains(t.target),e=!1;var n;_i.Zs.Ks&&this.He&&(e=(null==(n=this.el().parentElement)?void 0:n.querySelector(".theo-mobile-menu-background"))===t.target);i||s||!this.We||(e&&t.preventDefault(),this.closeMenu())},this.Ye=t=>{27===t.which&&(this.closeMenu(),this.focus())},this.Je=()=>{this.We&&this.closeMenu()},this.Xe=()=>{this.ze.menuItems.length>=this.Ge?this.show():(this.closeMenu(),this.hide())},this.ze=new Ma(t,i,this),this.player().getChild("controlBarMenuContainer").addChild(this.ze),this.Be=new Aa(this,this.controlText()),this.el().setAttribute("aria-haspopup","true"),_i.Zs.Ke?(this.on(h,"touchend",this.Qe),new ga(this.el())):(this.on(h,"click",this.Qe),this.on(h,"keydown",this.Ye),dt&&this.on(h,dt.Ze,this.closeMenu)),this.ks.addEventListener("seeking",this.Je),this.on(this.ze,"menuchange",this.Xe),this.on(t,"languagechange",this.se),this.Xe()}},Da=Jo.getComponent("Component"),Na=class extends(Jo.getComponent("ControlBar")){addMenuButton(t){t=Vi({playerOptions:this.h.playerOptions},t);let i=new Ea(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)}};Jo.registerComponent("THEOControlBarShadow",class extends Da{createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-tertiary-color theo-control-bar-shadow"}}),Bt(),Bt();var Fa=Jo.getComponent("VolumeBar"),Ba=class extends Fa{handleFocus(t){super.handleFocus(t),this.tn.addClass("focus-within")}handleBlur(t){super.handleBlur(t),this.tn.removeClass("focus-within")}constructor(t,i){super(t,i),this.tn=i.sn}};Bt();var $a=Jo.getComponent("VolumeControl"),Ra=class extends $a{constructor(t,i){super(t,i),this.nn=new Ba(t,{sn:this}),this.addChild(this.nn)}};Ra.prototype.h=Vi({},$a.prototype.h,{children:[]}),Jo.registerComponent("VolumeControl",Ra);var Oa=class extends(na(Na)){rn(){this.hn(this.an())}un(){0===this.cn&&(this.cn=u(this.ln,100))}fn(t){"opacity"===t.propertyName&&(0!==this.cn&&(c(this.cn),this.cn=0),this.hn(!0))}dn(t){"opacity"===t.propertyName&&(this.an()||this.hn(!1))}an(){return"0"!==a.getComputedStyle(this.el()).opacity}hn(t){this.vn!==t&&(this.vn=t,t?this.pn():this.ks.textTrackStyle.marginBottom=void 0)}pn(){const t=this.el().getBoundingClientRect().height;this.ks.textTrackStyle.marginBottom!==t&&(this.ks.textTrackStyle.marginBottom=t)}dispose(){c(this.cn),this.cn=0,this.gn.mn(rt.yn,this.bn),this.gn.wn(),super.dispose()}constructor(t,i){super(t,i),this.vn=!1,this.cn=0,this.ln=()=>{0!==this.cn&&(this.cn=0,this.hn(this.an()))},this.bn=()=>{this.vn&&this.pn()},this.on(t,"ready",this.rn),this.on(t,"pause",this.rn),this.on(t,"useractive",this.rn),this.on(t,"firstplay",this.un),this.on(t,"play",this.un),this.on(t,"userinactive",this.un),this.on("transitionstart",this.fn),this.on("transitionend",this.dn),this.gn=new ut(this.el()),this.gn.kn(rt.yn,this.bn),this.gn._n(!0)}};Oa.prototype.h=Vi({},Na.prototype.h,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),Jo.registerComponent("ControlBar",Oa),Bt();var Va=class extends Na{buildCSSClass(){return"theo-top-controlbar "+super.buildCSSClass()}constructor(t,i){super(t,i),t.topControlBar=this}};Va.prototype.h=Vi({},Na.prototype.h,{children:[]}),Jo.registerComponent("TopControlBar",Va),Bt();var Ua=Jo.getComponent("CurrentTimeDisplay"),La=class extends(na(Ua)){updateContent(){const t=Ko(this.player()),i=this.ks,s=ta(i),e=this.localize("Current Time"),n=ea(w.max(0,t-s),ia(i));n!==this.Pt&&(this.Pt=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)}};Jo.registerComponent("CurrentTimeDisplay",La),Bt();var Ha=Jo.getComponent("DurationDisplay"),za=class extends(na(Ha)){updateContent(){const t=this.ks,i=j(t.duration)?NaN:ia(t),s=t.clip.endTime-t.clip.startTime,e=w.min(i,s)||0;if(this.ct!==e){this.ct=e;const t=this.localize("Duration Time"),i=ea(e);this.S.innerHTML='<span class="vjs-control-text">'+t+"</span> "+i}}dispose(){var t;null==(t=this.ks)||t.clip.removeEventListener("change",this.jn),super.dispose()}constructor(t,i){var s;super(t,i),this.jn=()=>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.ks)||s.clip.addEventListener("change",this.jn)}};Jo.registerComponent("DurationDisplay",za),Bt();var Wa=Jo.getComponent("Button"),qa=class extends(na(Wa)){buildCSSClass(){return"theo-live-control "+super.buildCSSClass()}createEl(){let t=super.createEl("button",{},{"aria-live":"off"});return this.xn=Jo.createEl("span",{className:"theo-live-control-indicator"}),ti(t,this.xn),t}createControlTextEl(t){let i=super.createControlTextEl(t);return Jo.removeClass(i,"vjs-control-text"),Jo.addClass(i,"theo-live-control-text"),i}handleClick(){var t;const i=this.ks;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{const t=this.player();t.currentTime(Zo(i)),t.play()}}Sn(){Yo(this.ks)?this.show():this.hide()}constructor(t,i){super(t,i),this.controlText("Live"),this.Sn(),this.on(t,"emptied",this.Sn),this.on(t,"durationchange",this.Sn),_i.Zs.Ke&&new ga(this.el())}};Jo.registerComponent("LiveDisplay",qa),Bt();var Ga=Jo.getComponent("LoadingSpinner");Jo.registerComponent("LoadingSpinner",class extends Ga{buildCSSClass(){return"theo-secondary-color vjs-loading-spinner "+super.buildCSSClass()}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=Jo.createEl("div",{className:"theo-loading-spinner-rotator"}),s=Jo.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=Jo.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)}}),Bt();var Xa=Jo.getComponent("LoadProgressBar"),Ja=class extends(na(Xa)){update(){let t=this.ks,i=vi.Tn(sa(t)),s=i.Cn(0),e=vi.Tn(t.buffered).Pn(i),n=i.Mn(0)-s,r=e.U&&e.Mn(e.U-1)||0;r=w.max(0,r-s);let o=this.el(),a=this.An;o.style.width=Qa(r,n);for(let t=0;t<e.U;t++){let i=e.Cn(t),n=e.Mn(t),u=a[t];u||(u=h.createElement("div"),a.push(u),o.appendChild(u)),u.style.left=Qa(i-s,r),u.style.width=Qa(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.An=[],this.on(t,"emptied",this.update)}};function Qa(t,i){let s=t/i||0;return 100*(s>=1?1:s)+"%"}Jo.registerComponent("LoadProgressBar",Ja),Bt();var Ya=Jo.getComponent("MouseTimeDisplay"),Ka=class extends(na(Ya)){handleMouseMove(t){let i=t,s=this.ks,e=ta(s)+this.calculateDistance(i)*ia(s),n=i.pageX-si(this.el().parentNode).left;this.update(e,n+"px")}handleTouchMove(t){let i=t,s=this.ks,e=ta(s)+this.calculateDistance(i)*ia(s),n=i.touches[0].pageX-si(this.el().parentNode).left;this.update(e,n+"px")}createEl(){let t=super.createEl();return this.In=Jo.createEl("span",{className:"theo-time-tooltip-text"}),t}update(t,i){this.En=t;let s=this.Dn(t);this.el().style.left=i,this.el().setAttribute("data-current-time",s),this.keepTooltipsInside&&(d(this.In,s),this.Nn())}Nn(){if(this.keepTooltipsInside&&this.tooltip.offsetParent){let t=this.player().contentEl(),i=t.getClientRects(),s=i.length>0?i[0]:void 0,e=_(getComputedStyle(t).fontSize);ri(this.tooltip,this.el(),s,e)}}Dn(t){const i=this.ks,s=t-Zo(i);return ea(Yo(i)?w.min(s,0):s,ia(i))}dispose(){var t;this.ks.removeEventListener("dimensionchange",this.Fn),null==(t=this.ks.presentation)||t.removeEventListener(gt.MODE_CHANGE,this.Fn),super.dispose()}constructor(t,i){var s;(super(t,i),this.En=NaN,this.Fn=()=>{let t=Ko(this.player());const i=this.ks;let s=(t-ta(i))/ia(i)||0;s=Ii(s,0,1),this.update(t,100*s+"%")},this.keepTooltipsInside&&(Jo.addClass(this.tooltip,"theo-secondary-color"),this.tooltip.appendChild(this.In)),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"mouseenter",this.handleMouseMove)})),Ot.Ks)&&(this.on(t,"firstplay",this.Fn),this.on(t,"play",this.Fn),this.on(t,"seeking",this.Fn),this.on(t,"seeked",this.Fn),this.on(t,"timeupdate",this.Fn),this.ks.addEventListener("dimensionchange",this.Fn),null==(s=this.ks.presentation)||s.addEventListener(gt.MODE_CHANGE,this.Fn),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"touchstart",this.handleTouchMove),this.on(t.controlBar.progressControl,"touchmove",Pi((t=>this.handleTouchMove(t)),25)),this.Fn()})))}};Jo.registerComponent("MouseTimeDisplay",Ka),Bt();var Za=Jo.getComponent("PlayProgressBar"),tu=class extends(na(Za)){updateDataAttr(){let t=Ko(this.player());this.el().setAttribute("data-current-time",this.Dn(t))}Dn(t){let i=this.ks;return ea(t-Zo(i),ia(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)}};Jo.registerComponent("PlayProgressBar",tu),Bt();var iu=Jo.getComponent("RemainingTimeDisplay"),su=class extends(na(iu)){updateContent(){const t=this.ks,i=ia(t);if(i){const s=sa(t).end(0),e=this.localize("Remaining Time"),n=ea(w.max(0,s-this.player().currentTime()),i);n!==this.Pt&&(this.Pt=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)}};Jo.registerComponent("RemainingTimeDisplay",su),Bt(),Bt();var eu=class{get ks(){var t;return null!=(t=this._s)?t:this._s=ra(this.Bn)}$n(){const t=this.Rn;if(!t)return;const i=this.ks;if(0===i.seekable.length)return;const s=t.cues.slice();this.Vn.On(s);for(let t=0;t<s.length;t++){let e=s[t],n=s[t+1],r=!n||e.endTime!==n.startTime,h=new nu(e,i,r);this.Un.push(h),this.Ln.appendChild(h.je)}}Hn(){this.ks.addEventListener("loadedmetadata",this.zn),this.ks.addEventListener("loadeddata",this.zn),this.ks.addEventListener("sourcechange",this.zn),this.ks.addEventListener("durationchange",this.Wn),this.ks.clip.addEventListener("change",this.Wn),this.ks.textTracks.addEventListener("addtrack",this.qn),this.ks.textTracks.addEventListener("removetrack",this.Gn),this.ks.textTracks.addEventListener("change",this.zn)}Xn(){this.ks.removeEventListener("loadedmetadata",this.zn),this.ks.removeEventListener("loadeddata",this.zn),this.ks.removeEventListener("sourcechange",this.zn),this.ks.removeEventListener("durationchange",this.Wn),this.ks.clip.removeEventListener("change",this.Wn),this.ks.textTracks.removeEventListener("addtrack",this.qn),this.ks.textTracks.removeEventListener("removetrack",this.Gn),this.ks.textTracks.removeEventListener("change",this.zn)}Jn(){if(!(this.ks.readyState<Nt.Qn))for(let t of this.ks.textTracks)if(t.kind===xt.Yn&&t.mode===wt.Kn&&t.cues.length>0&&t.readyState!==yt.ERROR)return t}Zn(t){const i=this.Rn;t!==i&&(i&&(this.tr(),i.removeEventListener("cuechange",this.ir)),this.Rn=t,t&&(t.addEventListener("cuechange",this.ir),this.Wn()))}sr(t){this.Vn.er(t)}nr(){this.Vn.be()}rr(){this.Vn.ke()}tr(){for(let t of this.Un)t.Ve();this.Vn.hr(),this.Un=[],this.ar=void 0}Ve(){this.Xn(),this.ur.removeEventListener("mousemove",this.cr),this.ur.removeEventListener("mouseenter",this.lr),this.ur.removeEventListener("mouseleave",this.dr),this.Zn(void 0),this.Vn.Ve(),this._s=void 0}constructor(t,i){this.Bn=i,this.Un=[],this._s=void 0,this.zn=()=>{this.Zn(this.Jn())},this.qn=t=>{let i=t.track;i.kind===xt.Yn&&(i.addEventListener("addcue",this.zn),i.addEventListener("removecue",this.zn),i.addEventListener("readystatechange",this.zn)),this.zn()},this.Gn=t=>{let i=t.track;i.kind===xt.Yn&&(i.removeEventListener("addcue",this.zn),i.removeEventListener("removecue",this.zn),i.removeEventListener("readystatechange",this.zn)),this.zn()},this.cr=t=>{let i=this.ks,s=function(t,i){let s,e,n=si(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=Ii((o-s+h)/h,0,1),c=Ii((e-a)/r,0,1);return{x:c,y:u}}(this.Ln,t),e=ta(i)+s.x*ia(i);e===i.duration&&(e-=.1),this.sr(e)},this.dr=()=>{this.Vn.ke()},this.lr=()=>{this.Vn.be()},this.Wn=()=>{this.Rn&&(this.tr(),this.$n(),this.ir())},this.ir=()=>{var t,i,s;const e=null==(i=this.Rn)||null==(t=i.activeCues)?void 0:t[0],n=C(this.Un,(t=>t.pr===e));n!==this.ar&&(null==(s=this.ar)||s.mr(),this.ar=n,null==n||n.gr())},this.ur=t,this.Vn=new ru,this.Bn.contentEl().appendChild(this.Vn.je),this.Ln=h.createElement("div"),r(this.Ln,"theoplayer-chapterbar"),this.ur.appendChild(this.Ln),this.ur.addEventListener("mousemove",this.cr),this.ur.addEventListener("mouseenter",this.lr),this.ur.addEventListener("mouseleave",this.dr),this.Hn()}},nu=class{get je(){return this.Hs}gr(){r(this.Hs,"theoplayer-chapter-indicator-active")}mr(){oi(this.Hs,"theoplayer-chapter-indicator-active")}yr(t,i){let s=t.seekable.start(0),e=t.seekable.end(t.seekable.length-1),n=e-s,o=this.pr.startTime,a=this.pr.endTime,u=a>=s&&o<=e,c=Ii(o-s,0,n),l=Ii(a-s,0,n),f=w.max(0,l-c),d=h.createElement("div");r(d,"theoplayer-chapter-indicator");let v=h.createElement("div");r(v,"theoplayer-chapter-indicator-highlight"),d.appendChild(v),i&&r(d,"theoplayer-chapter-indicator-discontinuous");let p=c/n*100,m=f/n*100;return d.style.display=u?"":"none",d.style.width=m+"%",d.style.left=p+"%",d}Ve(){Yt(this.Hs)}constructor(t,i,s){this.pr=t,this.Hs=this.yr(i,s)}},ru=class{ke(){this.br--,0===this.br&&oi(this.je,"theoplayer-chapter-hovering")}On(t){this.wr=t||[],this.wr.length>0&&(this.je.style.display="")}kr(t){d(this._r,t.content)}hr(){this.wr=[],d(this._r,""),this.je.style.display="none"}be(){this.br++,this.br>0&&r(this.je,"theoplayer-chapter-hovering")}er(t){for(let i of this.wr)if(hu(i,t)){this.kr(i);break}}Ve(){Yt(this.je)}constructor(){this.wr=[],this.br=0,this.je=h.createElement("div"),r(this.je,"theoplayer-chaptertitle"),this.je.style.display="none",this._r=h.createElement("p"),this.je.appendChild(this._r)}};function hu(t,i){return new vi([t.startTime,t.endTime]).jr(i)}var ou=Jo.getComponent("SeekBar"),au=class extends(na(ou)){updateAriaAttributes(t){const i=Ko(this.player()),s=this.ks;t.setAttribute("aria-valuenow",(100*this.Sr(i)).toFixed(2)),t.setAttribute("aria-valuetext",ea(i-Zo(s),ia(s)))}getPercent(){return this.Sr(this.player().currentTime())}handleMouseMove(t){if(this.ks&&this.ks.ads&&this.ks.ads.playing)return;const i=this.ks;let s=ta(i)+this.calculateDistance(t)*ia(i);s>=i.duration&&(s=i.duration-.1),this.Ln.sr(s),this.player().currentTime(s)}handleMouseDown(t){this.playingStates.push(!this.player().paused()),this.Ln.nr(),super.handleMouseDown(t)}handleMouseUp(t){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.Ln.rr(),super.handleMouseUp(t)}Sr(t){let i=this.ks,s=(t-ta(i))/ia(i);return Ii(s,0,1)}dispose(){this.Ln.Ve(),B(this.playingStates)}constructor(t,i){super(t,i),this.playingStates=[],this.on(t,"emptied",this.update),this.on(t,"seeking",this.update),this.Ln=new eu(this.el(),t)}};Jo.registerComponent("SeekBar",au),Bt();var uu=Jo.getComponent("ProgressControl");_i.Zs.Ks&&Jo.registerComponent("ProgressControl",class extends uu{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"])}}),Bt();var cu=Jo.getComponent("TooltipProgressBar"),lu=class extends(na(cu)){updateDataAttr(){let t=Ko(this.player()),i=this.Dn(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i}Dn(t){const i=this.ks;return ea(t-Zo(i),ia(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 fu(t){for(const i of t)if(i.enabled)return i}function du(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:vu(t),description:pu(t),hd:!!t.height&&t.height>=720}}function vu(t){return t.height?t.height+"p":t.bandwidth?pu(t):""}function pu(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":""}Jo.registerComponent("TooltipProgressBar",lu),Bt(),Bt(),Bt(),Bt(),Bt();var mu=class{get Tr(){return this.Cr}set Tr(t){let i=this.Cr;for(let s=i.length-1;s>=0;s--){let e=i[s];D(t,e)||this.Pr(e)}for(let i of t)this.Mr(i);this.Ar.oe()}get Ir(){return this.Ar.menuItems}Er(t){let i=this.Ir;if(i)for(let s of i)if(s.Dr===t)return s}Nr(t){let i=this.Ar.addMenuItem();return i.Dr=t,i.on("click",(()=>this.Fr(i))),i.el().setAttribute("role","menuitemradio"),i}Br(t){t.dispose()}$r(t){return!0}Mr(t){if(this.$r(t)){D(this.Cr,t)||this.Cr.push(t);let i=this.Er(t)||this.Nr(t);return this.Rr(i),i}this.Pr(t)}Pr(t){let i=this.Er(t);i&&(this.Ar.removeMenuItem(i),this.Br(i)),A(this.Cr,t)}Ve(){const t=[];for(let i of this.Cr)t.push(i);for(let i of t)this.Pr(i);B(t)}constructor(t){this.Cr=[],this.Ar=t}},gu=class extends mu{Or(){return this.Vr=h.createElement("span"),this.Vr.className="theo-settings-control-menu-item-title",d(this.Vr,this.Ur.localize("Quality")),this.Vr}Lr(){return this.Hr=h.createElement("span"),this.Hr.className="theo-settings-control-menu-quality-automatic",d(this.Hr,this.Ur.localize("Automatic")),this.Hr}zr(){return this.Wr=h.createElement("span"),d(this.Wr,this.Ur.localize("Automatic")),this.Wr}qr(){return this.Gr=h.createElement("span"),this.Gr.className="theo-primary-color theo-settings-control-menu-item-hd-label",d(this.Gr,this.Ur.localize("HD")),this.Gr}Xr(){let t=h.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.Hr),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Wr),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Gr),this.Jr.el().appendChild(this.Vr),this.Jr.el().appendChild(t),this.Jr.el().setAttribute("aria-label",this.Ur.localize("Open the video quality settings menu"))}Qr(){let t=this.Yr,i=t&&xu(t.targetQuality),s=t&&t.activeQuality,e=du(this.Kr(i||s))||{name:this.Ur.localize("Automatic")};d(this.Wr,e.name),ci(this.Hr,"vjs-hidden",!!i),ci(this.Gr,"vjs-hidden",!e.hd)}Rr(t){let i=du(t.Dr)||{name:this.Ur.localize("Automatic")},s=i.name;i.hd&&(s+='<span class="theo-primary-color theo-settings-control-menu-item-hd-label">'+this.Ur.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.Ur.localize("Set video quality to ")+i.name),t.Dr?t.selected(t.Dr===this.Zr):t.selected(!this.Zr)}Fr(t){this.Yr&&(this.Yr.targetQuality=t.Dr&&t.Dr.videoQualities)}Kr(t,i){const s=i||this.Tr;for(let i of s)if(t&&i&&-1!==i.videoQualities.indexOf(t))return i}Ve(){this._s.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.th),this.Ur.off("languagechange",this.se),this.Yr&&(this.Yr.removeEventListener("activequalitychanged",this.ih),this.Yr.removeEventListener("targetqualitychanged",this.sh),this.Yr.removeEventListener("update",this.eh)),super.Ve()}constructor(t,i,s){super(t.subMenu),this.Yr=void 0,this.Zr=void 0,this.th=()=>{let t=fu(this._s.videoTracks);if(t===this.Yr)return;let i=[];if(this.Yr&&(this.Yr.removeEventListener("activequalitychanged",this.ih),this.Yr.removeEventListener("targetqualitychanged",this.sh),this.Yr.removeEventListener("update",this.eh)),this.Yr=t,t){t.addEventListener("activequalitychanged",this.ih),t.addEventListener("targetqualitychanged",this.sh),t.addEventListener("update",this.eh);const s=bu(_u(t.qualities.filter((t=>t.available))));i=s.length>1?[void 0,...s]:[void 0]}this.Tr=i,this.sh(),this.ih()},this.eh=t=>{const i=t.track;if(i!==this.Yr)return;const s=bu(_u(i.qualities.filter((t=>t.available)))),e=i&&xu(i.targetQuality);let n;this.Zr=this.Kr(e,s),n=s.length>1?[void 0,...s]:[void 0],this.Tr=n,this.Qr()},this.ih=()=>{this.Mr(void 0),this.Qr()},this.sh=()=>{let t=fu(this._s.videoTracks),i=t&&xu(t.targetQuality),s=this.Kr(i),e=this.Zr;s!==e&&(this.Zr=s,s&&e||this.Mr(void 0),e&&D(this.Tr,e)&&this.Mr(e),i&&this.Mr(s),this.Qr())},this.se=()=>{d(this.Ar.menuHeader.el(),this.Ur.localize("Quality")),d(this.Vr,this.Ur.localize("Quality")),d(this.Hr,this.Ur.localize("Automatic")),d(this.Wr,this.Ur.localize("Automatic")),d(this.Gr,this.Ur.localize("HD")),this.Jr.el().setAttribute("aria-label",this.Ur.localize("Open the video quality settings menu"));for(const t of this.Ir)this.Rr(t);this.Qr()},this.Jr=t,this._s=i,this.Ur=s,this.Vr=this.Or(),this.Hr=this.Lr(),this.Wr=this.zr(),this.Gr=this.qr(),this.Xr(),d(this.Ar.menuHeader.el(),this.Ur.localize("Quality")),this.Tr=[void 0],this._s.videoTracks.addEventListener(["addtrack","removetrack","change"],this.th),this.Ur.on("languagechange",this.se),this.th()}},yu=class{get height(){return this.nh[0].height}get bandwidth(){return this.nh[0].bandwidth}get videoQualities(){return this.nh}get label(){return this.nh[0].label}add(t){this.nh.push(t)}constructor(t){this.nh=t}};function bu(t){let i=[];for(let s of t){let t=s,e=!1;for(let s of i)if(ju(s,t)){s.add(t),e=!0;break}e||i.push(new yu([t]))}return i}function wu(t,i){return t&&i?Ji(t,i):qi.rh}function ku(t,i){return t===i?qi.rh:wu(t.height,i.height)||wu(t.width,i.width)||wu(t.bandwidth,i.bandwidth)}function _u(t){return Hi(t,ku).reverse()}function ju(t,i){return t.label&&i.label&&t.label===i.label||ct(du(t),du(i))}function xu(t){return Wt(t)?1===t.length?t[0]:void 0:t}function Su(t){return 1===t?"Normal":""+w.round(100*t)/100}Bt();var Tu=class extends mu{Or(){return this.Vr=h.createElement("span"),this.Vr.className="theo-settings-control-menu-item-title",d(this.Vr,this.Ur.localize("Speed")),this.Vr}Xr(){const t=h.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Jr.el().appendChild(this.Vr),this.Jr.el().appendChild(t),this.Jr.el().setAttribute("aria-label",this.Ur.localize("Open the video speed settings menu")),t}Nr(t){let i=super.Nr(t);return this.Rr(i),i}Rr(t){const i=t.Dr,s=this.Ur.localize(Su(i));d(t.el(),s),t.el().setAttribute("aria-label",this.Ur.localize("Set video speed to ")+s),t.selected(t.Dr===this._s.playbackRate)}Fr(t){this._s.playbackRate=t.Dr}Ve(){this._s.removeEventListener("ratechange",this.hh),this.Ur.off("languagechange",this.se),super.Ve()}constructor(t,i,s,e){super(t.subMenu),this.oh=void 0,this.hh=()=>{this.oh&&this.Mr(this.oh);let t=this._s.playbackRate;this.oh=t,d(this.ah,this.Ur.localize(Su(t))),t&&this.Mr(t)},this.se=()=>{d(this.Ar.menuHeader.el(),this.Ur.localize("Speed")),d(this.Vr,this.Ur.localize("Speed")),this.Jr.el().setAttribute("aria-label",this.Ur.localize("Open the video speed settings menu"));for(const t of this.Ir)this.Rr(t);this.hh()},this.Jr=t,this._s=i,this.Ur=s,this.Vr=this.Or(),this.ah=this.Xr(),d(this.Ar.menuHeader.el(),this.Ur.localize("Speed")),this.Tr=e,this._s.addEventListener("ratechange",this.hh),this.Ur.on("languagechange",this.se),this.hh()}};Jo.registerComponent("SettingsButton",class extends Ea{createEl(){let t=super.createEl();return this.uh=Jo.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),d(this.uh,this.localize("HD")),t.appendChild(this.uh),t}buildCSSClass(){return"vjs-icon-cog theo-settings-control-button "+super.buildCSSClass()}se(){super.se(),d(this.uh,this.localize("HD")),d(this.menu.menuHeader.el(),this.localize("Settings"))}dispose(){this.Yr&&(this.Yr.removeEventListener("activequalitychanged",this.ih),this.Yr=void 0),this.ks.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.lh),this.fh.Ve(),this.dh.Ve(),super.dispose()}constructor(t,i){var s,e;super(t,i),this.Yr=void 0,this.lh=()=>{let t=fu(this.ks.videoTracks);t!==this.Yr&&(this.Yr&&this.Yr.removeEventListener("activequalitychanged",this.ih),this.Yr=t,t&&t.addEventListener("activequalitychanged",this.ih),this.ih())},this.ih=()=>{var t;const i=null==(t=this.Yr)?void 0:t.activeQuality,s=!!(i&&i.height>=720);this.player().toggleClass("theo-hd",s)},r(this.menu.el(),"theo-settings-control-menu"),d(this.menu.menuHeader.el(),t.localize("Settings")),this.controlText("Settings"),this.Be.Fe=this.controlText(),this.ph=this.menu.addSubMenuItem({name:"QualityMenuItem"}),this.fh=new gu(this.ph,this.ks,t);let n=null!=(e=null==i||null==(s=i.playerOptions)?void 0:s.playbackRates)?e:[];this.mh=this.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),this.dh=new Tu(this.mh,this.ks,t,n),this.ks.videoTracks.addEventListener(["addtrack","removetrack","change"],this.lh),this.lh()}}),Bt(),Bt(),Bt();var Cu=class extends mu{gh(t){let i=t.label;if(i)return i;let s=t.language;if(s){let t=Wi(s);if(t)return t.yh}return s||""}bh(){this.Tr=this.wh}Ve(){this.wh.removeEventListener("addtrack",this.kh),this.wh.removeEventListener("removetrack",this._h),this.wh.removeEventListener("change",this.jh),super.Ve()}constructor(t,i){super(t),this.kh=t=>{const i=t.track;this.Mr(i),i.addEventListener("update",this.xh)},this._h=t=>{const i=t.track;this.Pr(i),i.removeEventListener("update",this.xh)},this.jh=t=>this.bh(),this.xh=()=>{for(const t of this.Tr)this.Mr(t)},this.wh=i,this.wh.addEventListener("addtrack",this.kh),this.wh.addEventListener("removetrack",this._h),this.wh.addEventListener("change",this.jh),this.bh()}},Pu=class extends Cu{Rr(t){let i=t.Dr,s=this.Ur.localize(this.gh(i));d(t.el(),s),t.el().setAttribute("aria-label",this.Ur.localize("Set the audio language to")+" "+s),t.selected(i.enabled)}Fr(t){let i=t.Dr;for(let t of this.ks.audioTracks)t!==i&&(t.enabled=!1);i.enabled=!0}Ve(){this.Ur.off("languagechange",this.se),super.Ve()}constructor(t,i,s){super(t,i.audioTracks),this.se=()=>{d(this.Ar.menuHeader.el(),this.Ur.localize("Language"));for(const t of this.Ir)this.Rr(t)},this.ks=i,this.Ur=s,d(this.Ar.menuHeader.el(),this.Ur.localize("Language")),this.Ur.on("languagechange",this.se)}};Jo.registerComponent("audioTrackButton",class extends Ea{buildCSSClass(){return"vjs-icon-audio theo-audio-track-control-button "+super.buildCSSClass()}dispose(){this.Sh.Ve(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=2,this.Sh=new Pu(this.menu,this.ks,t),this.controlText("Language"),this.Be.Fe=this.controlText()}}),Bt(),Bt();var Mu=class extends Cu{$r(t){return!!super.$r(t)&&(!t.forced&&Pt(t.kind))}Nr(t){let i=super.Nr(t);r(i.el(),"theo-text-track-menu-item");let s=h.createElement("span");i.Th=s;let e=h.createElement("div");e.className="theo-text-track-menu-item-toggle",i.Ch=e;let n=t=>this.Ph(t,i);i.Mh=n,e.addEventListener("click",n);let o=h.createElement("div");return o.className="theo-text-track-menu-item-toggle-slider",e.appendChild(o),i.el().appendChild(s),i.el().appendChild(e),i}Rr(t){let i=t,s=i.Dr,e=this.Ur.localize(this.gh(s));d(i.Th,e),i.el().setAttribute("aria-label",this.Ur.localize("Set the subtitle language to")+" "+e),i.el().setAttribute("role","menuitemcheckbox"),i.selected(s.mode===wt.Kn)}Br(t){let i=t;i.Ch.removeEventListener("click",i.Mh),super.Br(t)}Fr(t){let i=t.Dr;for(let t of this.ks.textTracks)t!==i&&Tt(t.kind,i.kind)&&(t.mode=wt.Ah);i.mode!==wt.Kn?i.mode=wt.Kn:i.mode=wt.Ah}Ph(t,i){t.stopImmediatePropagation(),this.Fr(i)}Ve(){this.Ur.off("languagechange",this.se),super.Ve()}constructor(t,i,s){super(t,i.textTracks),this.se=()=>{d(this.Ar.menuHeader.el(),this.Ur.localize("Subtitles"));for(const t of this.Ir)this.Rr(t)},this.ks=i,this.Ur=s,d(this.Ar.menuHeader.el(),s.localize("Subtitles")),this.Ur.on("languagechange",this.se)}};Jo.registerComponent("subtitlesButton",class extends Ea{buildCSSClass(){return"vjs-icon-subtitles theo-text-track-control-button "+super.buildCSSClass()}dispose(){this.Sh.Ve(),super.dispose()}constructor(t,i){super(t,i),this.Sh=new Mu(this.menu,this.ks,t),this.controlText("Subtitles"),this.Be.Fe=this.controlText()}}),Bt();var Au=Jo.getComponent("playToggle"),Iu=class extends(na(Au)){handleClick(t){this.ks.muted||this.ks.prepareWithUserAction(),super.handleClick(t)}handlePlay(t){super.handlePlay(t),this.controlText("Pause"),this.Be.Fe=this.controlText()}handlePause(t){this.ks.ended||(super.handlePause(t),this.controlText("Play"),this.Be.Fe=this.controlText())}se(){this.Be.Fe=this.controlText()}dispose(){this.Be.Ve(),this.ks.removeEventListener("ended",this.Ih),super.dispose()}constructor(t,i){super(t,i),this.Ih=()=>{this.controlText("Replay"),this.Be.Fe=this.controlText()},this.controlText("Play"),this.Be=new Aa(this,this.controlText()),this.ks.addEventListener("ended",this.Ih),this.on(t,"languagechange",this.se),_i.Zs.Ke&&new ga(this.el())}};Jo.registerComponent("playToggle",Iu),Bt();var Eu=Jo.getComponent("fullscreenToggle"),Du=class extends(na(Eu)){handleClick(t){this.ks.prepareWithUserAction(),super.handleClick(t)}handleFullscreenChange(t){super.handleFullscreenChange(t),this.updateContent()}updateContent(){const t=this.player().isFullscreen()?"Exit fullscreen":"Fullscreen";this.controlText(t),this.Be.Fe=this.controlText()}dispose(){this.Be.Ve(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Fullscreen"),this.Be=new Aa(this,this.controlText()),_i.Zs.Ke&&new ga(this.el()),this.on(t,"languagechange",this.updateContent)}};Jo.registerComponent("fullscreenToggle",Du),Bt();var Nu=Jo.getComponent("muteToggle"),Fu=class extends(na(Nu)){handleClick(t){this.ks.muted&&!this.ks.paused&&this.ks.prepareWithUserAction(),super.handleClick(t)}update(t){super.update(t),this.se()}se(){const t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.Be.Fe=this.controlText()}dispose(){this.Be.Ve(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Mute"),this.Be=new Aa(this,this.controlText()),_i.Zs.Ke&&new ga(this.el()),this.on(t,"languagechange",this.se),Ni&&(this.removeClass("vjs-hidden"),this.on(t,"loadstart",(()=>{this.removeClass("vjs-hidden")})))}};Jo.registerComponent("muteToggle",Fu),Bt();var Bu=Jo.getComponent("BigPlayButton"),$u=class extends(na(Bu)){createEl(){let t=super.createEl(),i=Jo.createEl("div",{className:"theo-big-play-button-svg-container"});return i.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150" fill="currentColor">\n <circle cx="75" cy="75" r="73" fill="#000" fill-opacity="0.2"></circle>\n <circle cx="75" cy="75" r="73" class="theo-play-svg-circle" stroke-width="4" stroke="currentColor" fill="none" transform="rotate(-90,75,75)"></circle>\n <g transform="translate(85,75) scale(0.5625) translate(-75,-75)">\n <path d="m 123.89639,85.432 c -12.865,9.167 -29.482997,19.402 -49.848997,30.7 -19.634,11.035 -36.851,19.7 -51.65,26 l -16.3990002,6.099 c -1.033,-4.433 -2,-11.002 -2.9,-19.7 -2.033,-17.333 -3.04999998,-36.466 -3.04999998,-57.399 0,-19.167 1.38199998,-37.081 4.14799998,-53.75 l 4.0019995,-19.1499994 17.3990007,5.849 c 15.068,5.9999994 31.401,14.5169994 49,25.5509994 18.631,11.666 34.616997,22.766 47.948997,33.3 6.663,5.3 11.463,9.383 14.396,12.25 l -13.046,10.25"></path>\n </g>\n</svg>',t.appendChild(i),t}buildCSSClass(){return"theo-primary-color "+super.buildCSSClass()}handleClick(t){this.ks.muted||this.ks.prepareWithUserAction(),super.handleClick(t),void 0!==this.ks.vr&&"unavailable"!==this.ks.vr.state&&(this.ks.vr.useDeviceMotionControls=!0)}};Jo.registerComponent("BigPlayButton",$u),Bt();var Ru=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;Jo.registerComponent("MouseTimeDisplay",class extends Ka{Eh(t){const i=t.track;"metadata"===i.kind&&"thumbnails"===i.label&&void 0===this.Dh&&(this.Dh=i,this.Nh=i.src?_i.Fh(i.src).href:void 0,this.Dh.addEventListener(["addcue","removecue"],this.Bh),this.$h())}Rh(t){t.track===this.Dh&&this.Oh()}createEl(){const t=super.createEl();return this.Vh=Jo.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.Uh=Jo.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.Dh&&this.Dh.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.Dh.cues,t);i=s&&s.content}if(i===this.Hh)return;if(this.Hh=i,Jo.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",!!i),!i)return void this.zh();const s=i.match(Ru);if(s){let[,t,i,e,n,r]=s;t=this.Wh(t);const h={qh:+i,Gh:+e,Ti:+n,Ci:+r};this.Xh(t,h)}else{const t=this.Wh(i);this.Xh(t)}}$h(){j(this.En)||this.Lh(this.En)}Wh(t){return this.Dh&&this.Nh?_i.Fh(t,this.Nh).href:t}Xh(t,i){this.Vh&&(this.Vh.src!==t?(this.Vh.onload=()=>{this.Jh(i)},this.Vh.src="",this.Vh.src=t):this.Jh(i))}Jh(t){if(!this.Uh||!this.Vh)return;const i=this.Uh.getContext("2d");i&&(null!=t||(t={qh:0,Gh:0,Ti:this.Vh.naturalWidth,Ci:this.Vh.naturalHeight}),this.Uh.width=t.Ti,this.Uh.height=t.Ci,i.drawImage(this.Vh,t.qh,t.Gh,t.Ti,t.Ci,0,0,t.Ti,t.Ci),this.Qh(this.Uh))}Qh(t){this.Yh||(ti(this.tooltip,t),this.Yh=t),this.Nn()}zh(){this.Yh&&(this.tooltip.removeChild(this.Yh),this.Yh=void 0,this.Nn())}Oh(){void 0!==this.Dh&&(this.Dh.removeEventListener(["addcue","removecue"],this.Bh),this.Dh=void 0),this.Nh=void 0,this.zh(),this.Hh=void 0}dispose(){this.Oh(),super.dispose()}constructor(t,i){super(t,i),this.Yh=void 0,this.Dh=void 0,this.Nh=void 0,this.Kh=t=>this.Eh(t),this.Zh=t=>this.Rh(t),this.Bh=t=>this.$h(),this.showThumbnails=()=>{this.Yh&&this.Yh.hidden&&(this.Yh.hidden=!1,this.Nn())},this.hideThumbnails=()=>{!this.Yh||this.Yh.hidden||this.player().scrubbing()||(this.Yh.hidden=!0,this.Nn())},this.on(this.player().textTracks(),"addtrack",this.Kh),this.on(this.player().textTracks(),"removetrack",this.Zh),Ot.Ks&&(this.on(t,"seeking",this.showThumbnails),this.on(t,"seeked",this.hideThumbnails))}}),Bt();var Ou=Jo.getComponent("VolumeLevel");Jo.registerComponent("VolumeLevel",class extends Ou{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-volume-level "+super.buildCSSClass()}}),Bt(),Bt();var Vu=Jo.getComponent("Component"),Uu=class extends Vu{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-menu-container "+super.buildCSSClass()}};Uu.prototype.h=Vi({},Uu.prototype.h,{children:[]}),Jo.registerComponent("controlBarMenuContainer",Uu);var Lu=Jo.getComponent("Player"),Hu=class extends Lu{dispose(){const t=this.el(),i=this.contentEl(),s=t.parentNode,e=t.nextSibling;super.dispose(),Yt(i),this.xi&&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)}};Hu.prototype.h=Vi({},Lu.prototype.h,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","upcomingAdNotificationText","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),Jo.registerComponent("Player",Hu),Bt(),Bt();var zu=Jo.getComponent("Player"),Wu=zu.prototype.es;zu.prototype.es=function(t){if(!(this.H&&this.H.Vs&&this.H.Vs()))return Wu.call(this,t)};var qu=zu.prototype.createEl;function Gu(t,i,s,e){let n=Vi({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},s);n.controlBar=Vi({progressControl:{keepTooltipsInside:!0}},n.controlBar);let h=n.techOrder||(n.techOrder=[]);-1===h.indexOf("THEOplayer")&&h.unshift("THEOplayer"),(n.theoplayer||(n.theoplayer={})).player=t,s&&Xt(s.language)&&(n.languages=Vi({},n.languages,{[Li]:s.language}),n.language=Li),i.setAttribute("data-vjs-player","");let o=i.getAttribute("style"),a=Jo(t.element,n,e);return a.ready((()=>{ha(a),function(t,i){if(i){if(i.ads){const s=i=>{const s="adbreakbegin"===i.type,e=i.adBreak.integration===Yi.io;ua(t,s,e)};i.ads.addEventListener("adbreakbegin",s),i.ads.addEventListener("adbreakend",s)}if(i.uplynk){var s;const e=i=>{const s="adbreakbegin"===i.type;ua(t,s,!1)};null==(s=i.uplynk)||s.ads.adBreaks.addEventListener("addadbreak",(t=>{t.adBreak.addEventListener("adbreakbegin",e),t.adBreak.addEventListener("adbreakend",e)}))}i.addEventListener("sourcechange",(()=>{ua(t,!1,!1)}))}}(a,t),function(t){t.on("mouseleave",ca)}(a)})),i.removeAttribute("data-vjs-player"),o?i.setAttribute("style",o):i.removeAttribute("style"),_i.Zs.Ks&&(r(i,"theo-mobile"),Xu(i)),function(t){t.on("seeking",(()=>{ei(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()}))}(a),a}function Xu(t){a.outerHeight>a.outerWidth?(oi(t,"theo-mobile-landscape"),r(t,"theo-mobile-portrait")):(oi(t,"theo-mobile-portrait"),r(t,"theo-mobile-landscape"))}zu.prototype.createEl=function(){let t=qu.call(this),i=Jo.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.S=i,t},Bt(),Bt(),Bt(),Bt();var Ju=Jo.getComponent("Button");var Qu="THEOPiPCloseButton";Jo.registerComponent(Qu,class extends Ju{buildCSSClass(){return"theo-close-button theo-pip-close"}handleClick(){this.eo.so()}constructor(t,i){if(super(t,i),this.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.eo)}(i))throw new v("Invalid Picture-in-picture options.");this.eo=i.eo}});var Yu=class extends z{get no(){return this.ro}get ho(){return this.t.cs()}oo(){this.t.kn(X.ao,this.uo),this.co||this.t.kn(X.lo,this.fo),this.t.do.on("languagechange",this.se)}vo(){var t;return"theo-pip-"+(null!=(t=this.po)?t:"bottom-right")}mo(t){let i=this.yo;i&&!this.ho&&(this.bo||this.wo(),this.ko(),r(i,"theo-pip"),r(i,this.vo()),this.ro=!0,this._o=t,this.jo=!1,this.xo(new bt(P.PICTURE_IN_PICTURE)))}So(t){let i=this.yo;i&&(this.To(),oi(i,"theo-pip"),oi(i,this.vo()),this.ro=!1,this.jo=t,this.Co=this._o,this._o=!1,this.xo(new bt(P.INLINE)))}wo(){if(!this.bo){let t=this.t.do;t.addChild(Qu,{eo:this});let i=h.createElement("div");i.className="theo-pip-overlay",this.Po=h.createElement("div"),this.Po.className="theo-pip-overlay-text",d(this.Po,t.localize("Video playing in Picture-in-Picture mode")),i.appendChild(this.Po),ti(t.el(),i),this.Mo=i,this.bo=!0}}Ao(){this.Io&&!this.Eo&&this.t.Do&&(this.No=this.t.Do.Fo(ui,this.Bo),this.Eo=!0)}$o(){this.No&&this.t.Do&&(this.t.Do.Ro(this.No),this.Eo=!1)}ko(){let t=this.t.do.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"}To(){let t=this.t.do.contentEl();t.style.top="",t.style.bottom="",t.style.right="",t.style.left="",t.style.width="",t.style.height="",t.style.position=""}Oo(){oi(this.yo,"theo-pip"),this.no&&this.po&&oi(this.yo,"theo-pip-"+this.po),this.Mo&&(Yt(this.Mo),this.Mo=void 0)}wn(){this.Oo(),this.$o(),this.Vo(),this.t.mn(X.ao,this.uo),this.t.mn(X.lo,this.fo),this.t.do.off("languagechange",this.se),this.t=void 0}constructor(t,i,s){super(),this.Uo=!1,this.ro=!1,this.jo=!1,this._o=!1,this.bo=!1,this.Eo=!1,this.Co=!1,this.uo=()=>{this.Uo=!0,this.Io&&!this.no&&this.No&&this.Lo&&this.No.Ho<=this.Lo&&this.mo(!1)},this.fo=()=>{this.co||(this.Uo=!1,this.so(),this.So(!1))},this.se=()=>{if(this.Po){const t=this.t.do;d(this.Po,t.localize("Video playing in Picture-in-Picture mode"))}},this.Bo=t=>{!this._o&&this.Io&&(j(t)||(this.Lo&&t<=this.Lo||this.Co?this.ro||this.jo||this.mo(!1):this.ro?this.So(!1):this.jo=!1))},this.Lo=i.visibility,this.po=i.position,this.co=i.retainPresentationModeOnSourceChange,this.Io=void 0!==this.Lo,this.t=t,this.yo=t.zo,this.so=s,this.oo()}},Ku=class extends kt{Wo(){let t=super.Wo();return t===P.INLINE&&this.qo.no?P.PICTURE_IN_PICTURE:t}Go(t){return t===P.PICTURE_IN_PICTURE||super.Go(t)}Xo(t){this.Jo=this.Qo,t===P.FULLSCREEN||t===P.NATIVE_PICTURE_IN_PICTURE?this.qo.$o():this.qo.Ao(),super.Xo(t)}Yo(t){super.Yo(t),t===P.PICTURE_IN_PICTURE?L(this.Zo.Ko((t=>this.ta(t)))):t===P.FULLSCREEN?this.qo.So(!1):this.qo.So(!0)}async ta(t){R(t),await Promise.all([this.ia(),this.sa.So()]).catch(Si),R(t),this.qo.mo(!this.ea),this.xo(new bt(this.Qo)),this.ea=!1,this.na=!1}ki(){this.na||(this.qo.no&&this.ra.cs?this.Xo(P.FULLSCREEN):this.Jo!==P.PICTURE_IN_PICTURE||this.ra.cs?super.ki():(this.ea=!0,this.Xo(P.PICTURE_IN_PICTURE)))}wn(){super.wn(),this.qo.wn(),this.ha.mn(X.ao,this.oa),this.ha=void 0}constructor(t,i,s,e){super(i,s),this.Jo=P.INLINE,this.ea=!1,this.so=()=>{this.Qo===P.PICTURE_IN_PICTURE&&this.Xo(P.INLINE)},this.aa=t=>{this.na||(this.Qo!==P.PICTURE_IN_PICTURE||this.qo.no?this.Qo!==P.PICTURE_IN_PICTURE&&this.qo.no&&(this.ea=!0,this.Xo(P.PICTURE_IN_PICTURE)):this.Xo(P.INLINE))},this.oa=()=>{this.Wo()!==P.PICTURE_IN_PICTURE&&this.Wo()!==P.INLINE||this.qo.Ao(),this.ha.mn(X.ao,this.oa)},this.ha=t,this.qo=new Yu(t,e.pip,this.so),this.qo.kn(gt.MODE_CHANGE,this.aa),this.ha.kn(X.ao,this.oa)}};Bt();var Zu,tc=class extends z{get ua(){return pt.ca(this.do.el())||this.do.supportsFullScreen()}get cs(){return this.do.isFullscreen()||this.la}mo(){this.do.requestFullscreen()}So(){this.do.exitFullscreen(),this.fa.So()}wn(){this.Vo(),this.do.off("fullscreenchange",this.da),this.fa.mn(H.va,this.da),this.fa.mn(H.pa,this.Os),this.do.isFullWindow&&this.do.exitFullscreen()}constructor(t,i){super(),this.Us=!1,this.la=!1,this.ma=!1,this.da=()=>{if(this.ma)return;const t=this.Us,i=this.cs;t!==i&&(this.Us=i,this.xo(new lt))},this.ga=()=>{this.la=this.fa.cs,this.da()},this.ya=()=>{this.ma||(this.do.isFullWindow&&this.do.supportsFullScreen()||this.la&&!this.do.supportsFullScreen())&&(this.ma=!0,this.do.exitFullscreen(),this.do.requestFullscreen(),this.ma=!1,this.da())},this.do=t,this.fa=i,this.do.on("fullscreenchange",this.da),this.fa.kn(H.va,this.ga),this.fa.kn(H.ba,this.ya),this.fa.kn(H.pa,this.Os),this.da()}};function ic(t){return class extends t{get Do(){return this.wa}cs(){return this.ka.Wo()===P.FULLSCREEN}_a(){return function(t,i){let s=g.create(t);const e=i.do;return at(s,{get controls(){return e.controls()},set controls(t){e.controls(ft(t))},get presentation(){return i.ka.ja},get presentationMode(){return i.ka.Wo()},set presentationMode(t){const s=$(t);s&&i.ka.Xo(s)},get ui(){return e},get visibility(){return i.Do.ja}})}(this.xa,this)}wn(){super.wn(),this.ka.wn(),this.Sa.wn(),this.do.dispose(),this.wa.wn()}Ta(t){this.do.src(""),super.Ta(t)}constructor(t,i,s){super(i,s),this.zo=t,this.wa=new fi(t),this.xa=super._a(),g.defineProperty(this.xa,"constructor",{value:xi}),this.do=Gu(this.xa,this.zo,s.ui),this.Sa=new tc(this.do,this.Ca),this.ka=new Ku(this,this.Sa,this.Ma.Pa(),s),this.ka.kn(gt.MODE_CHANGE,this.Os)}}}function sc(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(Lt(t)&&!j(t))return Ii(t,0,1)}(t.visibility),t.retainPresentationModeOnSourceChange=ft(t.retainPresentationModeOnSourceChange),t}function ec(t){const i=N(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=sc(i.pip),i}function nc(){return Zu||(Zu=function(t){let i=t;for(const t of Ki)i=t(i);return i}(Zu=ic(ki()))),Zu}function rc(t,i){const s=ec(i),e=h.createElement("div");di(e),t.appendChild(e);const n=new(nc())(t,e,s);n.Aa=n;let r=n.ja;return n.Ia(),n.Ea(pi),g.defineProperty(r,"constructor",{value:rc}),r=ht(r),hi(n),function(t){for(const i of Zi)i(t)}(n),r}Bt(),Bt(),Bt(),Bt(),Bt();var hc="theo-cast-",oc=Jo.getComponent("Button"),ac=class extends(na(oc)){get Da(){throw new v("Na")}get Fa(){return this.h.Fa}get Ba(){return this.h.Ba}buildCSSClass(){return hc+"button theo-"+this.Ba+"-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=hc+"svg-container",r.innerHTML=this.Fa,e.appendChild(n),e.appendChild(r),e}handleClick(t){var i;if(super.handleClick(t),this.$a===W.AVAILABLE)null==(i=this.Da)||i.start();else if(this.$a===W.CONNECTED||this.$a===W.CONNECTING){var s;null==(s=this.Da)||s.stop()}}Ra(t){oi(this.yo,"theo-"+this.Ba+"-"+this.$a),this.$a=t,r(this.yo,"theo-"+this.Ba+"-"+this.$a),this.se()}se(){this.Oa(this.$a),this.Be.Fe=this.controlText()}Oa(t){t===W.CONNECTED?this.controlText("Stop Casting"):t===W.AVAILABLE?this.controlText("Start Casting"):t===W.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")}constructor(t,i){var s;super(t,i),this.yo=t.el(),this.$a=W.UNAVAILABLE,this.controlText("Unavailable"),this.Be=new Aa(this,this.controlText()),null==(s=this.Da)||s.addEventListener("statechange",(t=>{const i=t;this.Ra(i.state)})),_i.Zs.Ke&&(this.Va=new ga(this.el())),this.Ra(this.Da?this.Da.state:W.UNAVAILABLE),this.on(t,"languagechange",this.se)}},uc=0;function cc(){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-'+uc+'">\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-'+uc+')">\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 uc++,t}Jo.registerComponent("chromecastButton",class extends ac{get Da(){var t;return null==(t=this.ks.cast)?void 0:t.chromecast}constructor(t,i){super(t,Vi({},i,{Ba:"chromecast",Fa:cc()}))}}),Bt();var lc="theo-chromecast-",fc=Jo.getComponent("Component"),dc=class t extends(na(fc)){buildCSSClass(){return lc+"overlay "+super.buildCSSClass()}createEl(){const i=super.createEl();r(i,lc+"overlay");const s=Jo.createEl("div",{className:lc+"status-icon",innerHTML:t.ICON_SVG}),e=Jo.createEl("div",{className:lc+"status-info"});d(e,"Playing on");const n=Jo.createEl("div",{className:lc+"status-title"}),h=Jo.createEl("div",{className:lc+"status"});return this._r=n,h.appendChild(s),h.appendChild(e),h.appendChild(n),i.appendChild(h),i}dispose(){var t;null==(t=this.Ua)||t.removeEventListener("statechange",this.update),this.Ua=void 0,this.ks.removeEventListener("play",this.update),super.dispose()}constructor(t,i){var s,e;super(t,i),this.update=()=>{this.Ua?(this._r&&d(this._r,this.Ua.receiverName||""),this.Ua.state===W.CONNECTED?this.show():this.hide()):this.hide()},this.Ua=null==(s=this.ks.cast)?void 0:s.chromecast,null==(e=this.Ua)||e.addEventListener("statechange",this.update),this.ks.addEventListener("play",this.update),this.update()}};dc.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>',Jo.registerComponent("chromecastOverlay",dc),Bt(),Bt();Jo.registerComponent("airplayButton",class extends ac{dispose(){var t,i;null==(t=this.ks.ads)||t.removeEventListener("adbreakbegin",this.La),null==(i=this.ks.ads)||i.removeEventListener("adbreakend",this.Ha),this.ks.removeEventListener("currentsourcechange",this.Ha),super.dispose()}get Da(){var t;return null==(t=this.ks.cast)?void 0:t.airplay}constructor(t,i){var s,e;super(t,Vi({},i,{Ba:"airplay",Fa:'\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.Ha=()=>{this.enable()},this.La=()=>{this.disable()},null==(s=this.ks.ads)||s.addEventListener("adbreakbegin",this.La),null==(e=this.ks.ads)||e.addEventListener("adbreakend",this.Ha),this.ks.addEventListener("currentsourcechange",this.Ha)}}),Bt(),Bt(),Bt(),Bt();var vc={Default:"","Monospaced Serif":Rt.za,"Proportional Serif":Rt.Wa,"Monospaced Sans-Serif":Rt.qa,"Proportional Sans-Serif":Rt.Ga},pc={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},mc=[50,75,100,150,200];function gc(t){return{label:t+"%",value:t}}function yc(t){return g.keys(t).map((i=>({label:i,value:t[i]})))}mc.map((function(t){return{label:t+"%",value:t/100+"em"}}));var bc=mc.map((function(t){return{label:t+"%",value:t+"%"}})),wc=[25,50,75,100].map(gc),kc=[0,25,50,75,100].map(gc),_c=yc(pc),jc=yc(vc),xc=yc({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),Sc=100,Tc="#000000",Cc="#FFFFFF",Pc="#000000";Bt();var Mc=class extends mu{Xa(){let t=this.Ur.localize(this.Ja);d(this.Qa.subMenu.menuHeader.el(),t),this.Vr=h.createElement("span"),this.Vr.className="theo-settings-control-menu-item-title",d(this.Vr,t);let i=h.createElement("span");return i.className="theo-primary-color theo-settings-control-menu-item-value",r(this.Qa.el(),"theo-subtitle-options-menu-item"),this.Qa.el().appendChild(this.Vr),this.Qa.el().appendChild(i),i}Ya(t){const i=this.Er(t);i&&this.Ka(i)}Za(){return this.Tr}Fr(t){this.tu(t.Dr)}Ka(t){for(let t of this.Ar.menuItems)t.selected(!1);t?(t.selected(!0),this.iu(t.Dr.label)):this.iu("Custom")}iu(t){this.su=t,d(this.eu,this.Ur.localize(t)),this.Qa.parentMenu.oe()}Nr(t){let i=super.Nr(t);return r(i.el(),"theo-subtitle-options-menu-item"),this.Rr(i),i}Rr(t){const i=this.Ur.localize(t.Dr.label);d(t.el(),i);const s=this.Ur.localize("Set "+this.Ja+" to ")+i;t.el().setAttribute("aria-label",s)}Ve(){this.Ur.off("languagechange",this.se),super.Ve()}constructor(t,i,s,e){super(t.subMenu),this.Qa=t,this.Ur=e,this.su="",this.se=()=>{let t=this.Ur.localize(this.Ja);d(this.Qa.subMenu.menuHeader.el(),t),d(this.Vr,t),this.iu(this.su);for(const t of this.Ir)this.Rr(t)},this.Ja=i,this.tu=s.nu,this.eu=this.Xa(),this.Tr=s.ru,this.Ur.on("languagechange",this.se)}};Bt();var Ac=class t{static hu(t,i,s,e){if(void 0===t&&void 0===i)return;return Zt(void 0===t?s:t,void 0===i?e:i)}constructor(i){this.ou=i,this.au=t=>{this.ou.fontFamily=t.value},this.uu=t=>{this.ou.fontSize=t.value},this.cu=i=>{this.lu=i.value,this.ou.fontColor=t.hu(this.fu,this.lu,Cc,Sc)},this.du=i=>{this.fu=i.value,this.ou.fontColor=t.hu(this.fu,this.lu,Cc,Sc)},this.vu=i=>{this.pu=i.value,this.ou.backgroundColor=t.hu(this.pu,this.mu,Tc,Sc)},this.gu=i=>{this.mu=i.value,this.ou.backgroundColor=t.hu(this.pu,this.mu,Tc,Sc)},this.yu=i=>{this.bu=i.value,this.ou.windowColor=t.hu(this.bu,this.wu,Pc,Sc)},this.ku=i=>{this.wu=i.value,this.ou.windowColor=t.hu(this.bu,this.wu,Pc,Sc)},this._u=t=>{this.ou.edgeStyle=t.value}}};Bt();var Ic=class{ju(t,i){const s=this.xu(t,i.Za());s&&i.Ya(s)}xu(t,i){return C(i,(i=>i.value===t))}Su(t,i,s){let e,n;if(void 0===t)e=this.xu(void 0,i.Za()),n=this.xu(void 0,s.Za());else if(t){let r=function(t){let i=Qt(t);i||(i=Qt(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=Ut(zt(t),1));if(!i){let s=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=Ut(zt(pc[s]),1)}return i}(t);if(r){let t=Gt(r),h=100*r.Tu;e=this.xu(t,i.Za()),n=this.xu(h,s.Za())}}e&&i.Ya(e),n&&s.Ya(n)}constructor(t,i){this.ou=t,this.Cu=i,this.Pu=()=>{let t=this.ou.fontFamily;this.ju(t,this.Cu["Font family"]);let i=this.ou.fontColor;this.Su(i,this.Cu["Font color"],this.Cu["Font opacity"]);let s=this.ou.fontSize;this.ju(s,this.Cu["Font size"]);let e=this.ou.backgroundColor;this.Su(e,this.Cu["Background color"],this.Cu["Background opacity"]);let n=this.ou.windowColor;this.Su(n,this.Cu["Window color"],this.Cu["Window opacity"]);let r=this.ou.edgeStyle;this.ju(r,this.Cu["Character edge style"])},this.ou.addEventListener("change",this.Pu),this.Pu()}};var Ec=class extends mu{Mu(){return{"Font family":{ru:Dc(jc),nu:this.Au.au},"Font color":{ru:Dc(_c),nu:this.Au.du},"Font opacity":{ru:Dc(wc),nu:this.Au.cu},"Font size":{ru:Dc(bc),nu:this.Au.uu},"Background color":{ru:Dc(_c),nu:this.Au.vu},"Background opacity":{ru:Dc(kc),nu:this.Au.gu},"Window color":{ru:Dc(_c),nu:this.Au.yu},"Window opacity":{ru:Dc(kc),nu:this.Au.ku},"Character edge style":{ru:Dc(xc),nu:this.Au._u}}}Iu(){this.Vr=h.createElement("span"),this.Vr.className="theo-settings-control-menu-item-title",this.Eu=h.createElement("span"),this.Eu.className="theo-primary-color theo-settings-control-menu-item-value",this.Jr.el().appendChild(this.Vr),this.Jr.el().appendChild(this.Eu),this.se()}Nr(t){let i=this.Ar.addSubMenuItem();return i.Dr=t,this.Cu[t]=new Mc(i,t,this.Du[t],this.Ur),i}Rr(t){}Fr(t){}Ve(){this.Ur.off("languagechange",this.se),this.Nu.removeEventListener(["addtrack","removetrack"],this.Fu),super.Ve()}constructor(t,i,s,e){super(t.subMenu),this.Jr=t,this.Nu=i,this.Ur=e,this.Cu={},this.Fu=()=>{this.Nu.some((t=>Pt(t.kind)))?this.Jr.show():this.Jr.hide()},this.se=()=>{d(this.Ar.menuHeader.el(),this.Ur.localize("Subtitle Options")),d(this.Vr,this.Ur.localize("Subtitle")),d(this.Eu,this.Ur.localize("Options")),this.Jr.el().setAttribute("aria-label",this.Ur.localize("Open the subtitle options menu"))},this.Au=new Ac(s),this.Du=this.Mu(),this.Tr=g.keys(this.Du),this.Iu(),this.Bu=new Ic(s,this.Cu),this.Ur.on("languagechange",this.se),this.Nu.addEventListener(["addtrack","removetrack"],this.Fu),this.Fu()}};function Dc(t){let i=[{label:"Default",value:void 0}];for(let s of t)"Default"!==s.label&&i.push(s);return i}!function(t){Zi.push(t)}((function(t){const i=t.do.controlBar.getChild("SettingsButton").menu,s=i.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),e=new Ec(s,t.nt.ja,t.$u.ja,t.do);t.do.on("dispose",(()=>{i.removeMenuItem(s),s.dispose(),e.Ve(),i.dispose()}))})),Bt(),Bt(),Bt(),Bt(),Bt(),Bt();var Nc=.02,Fc=class{Ru(t){const i=t-this.Vu.Ou-20,s=t-this.Vu.Ou+20;if(0===this.Vu.po)return;const e=this.Vu.t.currentProgramDateTime.valueOf();e>s?this.Uu(this.Lu):e<i?this.Uu(this.Hu):this.Uu(this.zu)}Wu(t){const i=t-this.Vu.Ou/1e3-Nc,s=t-this.Vu.Ou/1e3+Nc;if(0===this.Vu.po)return;const e=this.Vu.t.currentTime;e>s?this.Uu(this.Lu):e<i?this.Uu(this.Hu):this.Uu(this.zu)}qu(){this.zu=this.ha.Gu,this.Lu=this.ha.Gu-.05,this.Hu=this.ha.Gu+.05}Uu(t){const i=this.Vu.t;if(i.playbackRate!==t&&0!==i.playbackRate){t>=.2&&t<=2.05?i.playbackRate=t:this.ha.Xu(this.Vu)}}Ju(){this.ha.mn(X.Qu,this.Yu),this.ha.mn(X.Ku,this.Zu)}constructor(t,i){this.zu=1,this.Lu=1.05,this.Hu=.95,this.Yu=()=>{this.qu()},this.Zu=()=>{if(!this.ha.tc)return;const t=this.ha.tc.Ou,i=this.ha.ic,s=this.ha.sc;null!==s?this.Ru(s.valueOf()+t):this.Wu(i+t/1e3)},this.Vu=t,this.ha=i,this.ha.kn(X.Qu,this.Yu),this.ha.kn(X.Ku,this.Zu)}},Bc=class{get t(){return this.ha}get ja(){var t;return null!=(t=this.ec)?t:this.ec=function(t){return{get label(){return t.Th},get position(){return t.po},set position(i){t.po=i},get muted(){return t.nc},set muted(i){t.nc=i},get canResize(){return t.rc},get x(){return t.qh},set x(i){t.qh=i},get y(){return t.Gh},set y(i){t.Gh=i},get width(){return t.Ti},set width(i){t.Ti=i},get height(){return t.Ci},set height(i){t.Ci=i},get enabled(){return t.Rt},set enabled(i){t.Rt=i},get offset(){return t.Ou},set offset(i){t.Ou=i},remove(){t.hc()}}}(this)}get Th(){return this.oc}get po(){return this.uc.ac.indexOf(this)}set po(t){this.uc.cc(this,t)}get nc(){return this.ha.muted}set nc(t){this.Rt&&(this.uc.lc=this,this.fc(t))}get rc(){return 0!==this.po&&this.uc.dc===Kc.OVERLAY}get qh(){return this.vc}set qh(t){this.rc&&(this.mc||(this.mc=!0),this.vc=t>1-this.Ti?1-this.Ti:w.max(t,0),this.t.element.style.setProperty("left",100*this.vc+"%"))}get Gh(){return this.gc}set Gh(t){this.rc&&(this.mc||(this.mc=!0),this.gc=t>1-this.Ci?1-this.Ci:w.max(t,0),this.t.element.style.setProperty("top",100*this.gc+"%"))}get Ti(){return this.yc}set Ti(t){this.rc&&this.bc(t)}get Ci(){return this.wc}set Ci(t){this.rc&&this.bc(t)}get Rt(){return this.qe}set Rt(t){t!==this.qe&&0!==this.po&&(t?(L(this.uc.Xu(this)),this.uc.kc(this),this.t.element.style.setProperty("display","block")):(this.t.pause(),this.t.element.style.setProperty("display","none")),this.qe=t,this.uc._c(this))}get jc(){return this.mc}set jc(t){this.mc=t}get xc(){return this.Sc}set xc(t){this.Sc=t}get Ou(){return this.Tc}set Ou(t){this.Tc=t,this.Cc(this.uc.ic,this.uc.sc)}Pc(t,i,s,e,n){!this.mc&&n&&(this.mc=!0),this.vc=t,this.gc=i,this.yc=s,this.wc=e}fc(t){this.ha.muted=t}hc(){0!==this.po&&this.uc.Mc(this)}Ac(){this.t.element.style.setProperty("top",100*this.gc+"%"),this.t.element.style.setProperty("left",100*this.vc+"%"),this.t.element.style.setProperty("width",100*this.yc+"%")}bc(t){const i=this.vc+this.yc,s=w.min(t,i),e=.9-this.gc,n=w.min(t,e),r=w.max(w.min(s,n),.1),h=this.yc-r;this.yc=r,this.wc=r,this.qh+=h,this.t.element.style.setProperty("width",100*r+"%")}Cc(t,i){if(null!==i){const t=i.valueOf()-this.Ou;this.ha.currentProgramDateTime=new Date(t)}else this.ha.currentTime=t-this.Ou/1e3}Ic(t){const i=this.t.element.getElementsByClassName(qc)[0],s=t?Xc:Gc;oi(i,t?Gc:Xc),r(i,s)}Ju(){this.Ec.Ju(),this.ha.element.remove(),this.ha.destroy()}constructor(t,i,s,e){this.qe=!0,this.mc=!1,this.Sc=0,this.oc=t,this.ha=i,this.uc=s,this.Ec=new Fc(this,s),this.Tc=null!=e?e:0,this.yc=.2,this.wc=.2,this.vc=.76,this.gc=0}};Bt();var $c=class{get multiViewPlayer(){return this.uc}get abr(){}get audioTracks(){return this.Dc}get autoplay(){return this.uc.autoplay}set autoplay(t){this.uc.autoplay=t}get buffered(){return this.uc.buffered}get canvas(){}get clip(){return this.Nc.ja}get currentProgramDateTime(){return null}get currentTime(){return this.uc.currentTime}set currentTime(t){this.uc.currentTime=t}get duration(){return this.uc.duration}get element(){return this.Hs}get ended(){return this.uc.ended}get error(){}get errorObject(){return this.uc.errorObject}get latency(){}get loop(){return!1}get metrics(){}get muted(){return this.uc.muted}set muted(t){this.uc.muted=t}get network(){}get paused(){return this.uc.paused}get playbackRate(){return this.uc.playbackRate}set playbackRate(t){this.uc.playbackRate=t}get played(){return this.uc.played}get poster(){return""}get preload(){return""}get presentation(){}get readyState(){return this.uc.readyState}get seekable(){return this.uc.seekable}get seeking(){return this.uc.seeking}get source(){}get src(){return"dummySource"}get textTrackStyle(){return this.Fc}get textTracks(){return this.Bc}addTextTrack(t){throw v("Not implemented")}get uid(){return 0}get videoHeight(){return 0}get videoTracks(){return this.Dc}get videoWidth(){return 0}get volume(){return this.uc.volume}set volume(t){this.uc.volume=t}get views(){return this.uc.views}get visibility(){}get layout(){return this.uc.layout}set layout(t){this.uc.layout=t}play(){this.uc.play()}pause(){this.uc.pause()}stop(){this.uc.stop()}destroy(){this.uc.destroy()}prepareWithUserAction(){this.uc.prepareWithUserAction()}addEventListener(t,i){this.$c.kn(t,i)}removeEventListener(t,i){this.$c.mn(t,i)}setSource(t){}constructor(t,i){this.$c=new z,this.uc=t,this.Hs=i,this.Nc=new jt,this.Dc=(new ai).ja,this.Bc=(new li).ja,this.Fc=(new Mt).ja,this.uc.addEventListener(["play","pause","seeking","seeked","timeupdate","ended","playing","waiting","sourcechange","readystatechange","loadedmetadata","loadeddata","canplay","canplaythrough","loadstart","progress","durationchange","volumechange","ratechange","error"],this.$c.Os)}};Bt();var Rc=class extends q{constructor(t){super(Yc.Rc),this.view=t}};Bt();var Oc=class extends q{constructor(t,i){super(Yc.VIEW_POSITION_CHANGE),this.oldPosition=t,this.newPosition=i}};Bt();var Vc=class extends q{constructor(t){super(Yc.Oc),this.view=t}};Bt();var Uc=class extends q{constructor(t){super(Yc.VIEW_CHANGE),this.view=t}};Bt();var Lc=class extends q{constructor(t){super(Yc.Vc),this.layout=t}};Bt();var Hc=class extends z{get ic(){return this.ha.ic}get Uc(){return this.ha.Uc}get lt(){return this.ha.Lc}get Hc(){return this.ha.Hc}get zc(){return this.ha.zc}get Wc(){return this.ha.Wc}get qc(){return!1}get Gc(){return!1}Ju(){this.Vo()}constructor(t){super(),this.Xc=t=>{this.Os(new yi(t.source))},this.Jc=t=>{this.Os(new Ei(t.currentTime))},this.Qc=t=>{this.Os(new Mi(t.currentTime))},this.Yc=t=>{this.Os(new zi(t.currentTime))},this.Kc=t=>{this.Os(new Gi(t.currentTime))},this.Zc=t=>{this.Os(new nt(t.currentTime,t.currentProgramDateTime))},this.tl=t=>{this.Os(new Ui(t.currentTime))},this.il=t=>{this.Os(new Kt(t.currentTime))},this.sl=t=>{this.Os(new Ht(t.currentTime))},this.nl=t=>{this.Os(new It(t.currentTime,t.readyState))},this.rl=t=>{this.Os(new $t(t.currentTime,this.zc))},this.hl=t=>{this.Os(new Vt(t.currentTime,this.zc))},this.ol=t=>{this.Os(new qt(t.currentTime,this.zc))},this.al=t=>{this.Os(new Jt(t.currentTime,this.zc))},this.cl=()=>{this.Os(new Et)},this.ll=t=>{this.Os(new T(t.currentTime))},this.fl=t=>{this.Os(new Fi(t.duration))},this.dl=t=>{this.Os(new Qi(this.ic,t.volume))},this.vl=t=>{this.Os(new Ri(this.ic,t.playbackRate))},this.pl=t=>{this.Os(new Xi(t.errorObject))},this.ml=()=>{this.Os(new lt)},this.ha=t,this.ha.kn("sourcechange",this.Xc),this.ha.kn("play",this.Jc),this.ha.kn("pause",this.Qc),this.ha.kn("seeking",this.Yc),this.ha.kn("seeked",this.Kc),this.ha.kn("timeupdate",this.Zc),this.ha.kn("ended",this.tl),this.ha.kn("playing",this.il),this.ha.kn("waiting",this.sl),this.ha.kn("readystatechange",this.nl),this.ha.kn("loadedmetadata",this.rl),this.ha.kn("loadeddata",this.hl),this.ha.kn("canplay",this.ol),this.ha.kn("canplaythrough",this.al),this.ha.kn("loadstart",this.cl),this.ha.kn("progress",this.ll),this.ha.kn("durationchange",this.fl),this.ha.kn("volumechange",this.dl),this.ha.kn("ratechange",this.vl),this.ha.kn("error",this.pl),this.ha.kn("fullscreenchange",this.ml)}};Bt();var zc=class{async gl(){const t=this.ha;if(!t.yl||!t.Hc)return;const i=this.bl.mutedAutoplay;switch(await this.kl.wl(t.nc)){case"all":t.nc||t._l(),t.jl();break;case"muted":(t.nc||i===I.ALL)&&(t.nc=!0,t.jl())}}wn(){this.kl.wn(),this.gn.wn()}constructor(t,i,s){this.ha=t,this.bl=s,this.Fc=new Mt,this.gn=new ut(i);const e=new O(this.gn,this.Fc,1,[vt.xl]);this.kl=new U(e)}},Wc=[S.Sl,S.Tl,S.Cl,S.Pl],qc="theo-switch-audio-button",Gc="vjs-icon-volume-mute",Xc="vjs-icon-volume-high",Jc="theo-main-view",Qc="theo-layout-",Yc=function(t){return t.Rc="addview",t.Oc="removeview",t.VIEW_CHANGE="viewchange",t.VIEW_POSITION_CHANGE="viewpositionchange",t.Vc="layoutchange",t}({}),Kc=function(t){return t.GALLERY="gallery",t.OVERLAY="overlay",t.SPOTLIGHT="spotlight",t}({}),Zc=class extends z{get ja(){var t;return null!=(t=this.ec)?t:this.ec=function(t){return{load:(i,s,e,n)=>t.On(i,s,e,n),get views(){return t.ac.map((t=>t.ja))},get mainVideoView(){var i;return null==(i=t.tc)?void 0:i.ja},get mainAudioView(){var i;return null==(i=t.lc)?void 0:i.ja},get ui(){return t.do},get layout(){return t.dc},set layout(i){t.dc=i},get buffered(){return t.Ml},get currentTime(){return t.ic},set currentTime(i){t.ic=i},get autoplay(){return t.yl},set autoplay(i){t.yl=i},get duration(){return t.ct},get ended(){return t.Uc},get errorObject(){return t.Lc},get muted(){return t.nc},set muted(i){t.nc=i},get paused(){return t.Hc},get playbackRate(){return t.Gu},set playbackRate(i){t.Gu=i},get played(){return t.Al},get readyState(){return t.zc},get seekable(){return t.Il},get seeking(){return t.Wc},get volume(){return t.El},set volume(i){t.El=i},play(){t.jl()},pause(){t.Dl()},stop(){t.Nl()},destroy(){t.Ju(),t=null},requestFullscreen(i){t.Fl(i)},exitFullscreen(){t.ia()},prepareWithUserAction(){t._l()},addEventListener(i,s){t.kn(i,s)},removeEventListener(i,s){t.mn(i,s)}}}(this)}get do(){return this.Bl}get ac(){return this.$l}get tc(){return this.Rl}get lc(){var t;return null!=(t=this.Ol)?t:this.Rl}set lc(t){if(this.Ol===t)return;const i=this.lc,s=null!=t?t:this.tc;i.t.removeEventListener(X.Vl,this.Ul),i.Ic(!1),i.nc||(i.fc(!0),s.fc(!1)),s.t.addEventListener(X.Vl,this.Ul),s.Ic(!0),this.Ol=t}get dc(){return this.Ll}set dc(t){if(t!==this.Ll){if("overlay"===this.dc)for(const t of this.ac)t.t.element.style.setProperty("left","auto"),t.t.element.style.setProperty("top","auto"),t.t.element.style.removeProperty("z-index");oi(this.Hs,Qc+this.Ll),this.Ll=t,r(this.Hs,Qc+this.Ll),this.Ac(),this.xo(new Lc(t))}}get Ml(){if(0===this.ac.length)return vi.Hl().ws();return this.zl().reduce(((t,i)=>t.Pn(vi.Tn(i.t.buffered))),new vi([0,1/0])).ws()}get ic(){return this.Rl&&this.Wl?this.Rl.t.currentTime+this.Rl.Ou/1e3:0}set ic(t){this.ql();const i=this.zl();let s=null;if(null!==this.sc){s=this.sc;const i=t-this.ic;s.setSeconds(s.getSeconds()+i)}for(const e of i)e.Cc(t,s)}get sc(){if(!this.Rl)return null;return this.ac.every((t=>null!==t.t.currentProgramDateTime))?new Date(this.Rl.t.currentProgramDateTime.valueOf()+this.Rl.Ou):null}get yl(){return this.Gl}set yl(t){this.Gl=t,this.Xl.gl()}get ct(){if(0===this.ac.length)return NaN;let t=1/0;for(const i of this.zl())t=w.min(i.t.duration,t);return t}get Uc(){return this.ac.some((t=>t.t.ended))}get lt(){return this.Lc}get Lc(){if(this.Jl)return this.Jl;for(const t of this.ac){const i=t.t.errorObject;if(void 0!==i)return i}}get nc(){var t,i;return null!=(i=null==(t=this.lc)?void 0:t.nc)&&i}set nc(t){this.lc&&this.lc.fc(t),this.Ul()}get Hc(){if(!this.ac.length)return!0;return this.zl().some((t=>t.t.paused))}get Gu(){var t,i,s;return null!=(s=null!=(i=this.Ql)?i:null==(t=this.Rl)?void 0:t.t.playbackRate)?s:1}set Gu(t){if(void 0!==this.Ql)this.Ql=t;else for(const i of this.ac)i.t.playbackRate=t;this.Yl()}get Al(){return this.ac.reduce(((t,i)=>t.Kl(vi.Tn(i.t.played))),vi.Hl()).ws()}get zc(){if(0===this.ac.length)return Nt.Zl;let t=Nt.tf;for(const i of this.zl())i.t.readyState<t&&(t=i.t.readyState);return t}get Il(){if(0===this.ac.length)return vi.Hl().ws();return this.zl().reduce(((t,i)=>t.Pn(vi.Tn(i.t.seekable))),new vi([0,1/0])).ws()}get Wc(){return this.ac.some((t=>t.t.seeking))}get El(){var t,i;return null!=(i=null==(t=this.lc)?void 0:t.t.volume)?i:1}set El(t){for(const i of this.ac)i.t.volume=t;this.Ul()}On(t,i,s,e){if(this.if)throw this.Jl;const n=this.ac.filter((i=>i.Th===t))[0];return n?n.ja:this.sf(t,i,s,e)}jl(){if(!this.Rl||!this.Hc)return;this.ql();const t=this.zl();for(const i of t)i.t.play()}Dl(){const t=this.zl();for(const i of t)i.t.pause()}Nl(){for(let t=this.ac.length-1;t>=0;t--)this.Mc(this.ac[t]);this.Rl=void 0,this.Ol=void 0,this.Jl=void 0,this.ef&&(this.ef.nf(),this.ef=void 0),this.rf=!0,this.hf=!1,this.af=!1,this.uf=-1,this.cf=Nt.Zl,this.lf=!1,this.Ql=void 0,this.ff=!1,this.df=-1,this.vf=!1,this.pf=-1,this.Wl=!1,this.mf.hr(),this.xo(new yi(void 0))}Ju(){for(let t=this.ac.length-1;t>=0;t--)this.Mc(this.ac[t]);this.Vo(),this.mf.wn(),this.gf.Ju(),this.yf.Ju(),this.Xl.wn(),this.do.dispose()}Fl(t){this.xo(new lt),this.Hs.requestFullscreen(t).catch(Si)}ia(){this.xo(new lt),h.exitFullscreen().catch(Si)}_l(){for(const t of this.ac)t.t.prepareWithUserAction()}sf(t,i,s,e){const n=h.createElement("div");r(n,"theo-view"),this.Hs.appendChild(n);const o=new(ki())(n,this.bl).ja;o.source=i;const a=new Bc(t,o,this,e);if(s){const t=h.createElement("div");t.className="theo-view-description";const i=h.createElement("span");i.textContent=s,t.appendChild(i),n.appendChild(t),a.t.addEventListener("dimensionchange",(()=>{this.bf(t)}))}return this.wf(a),this.ac.push(a),1===this.ac.length?(this.Rl=a,this.kf(this.Rl),r(this.Rl.t.element,Jc)):(this._f(o),0!==this.ic&&L(this.Xu(a,!0))),this.Ac(),this.xo(new Rc(a.ja)),a.ja}zl(){return this.ac.filter((t=>t.Rt))}jf(){return this.ac.filter((t=>t.Rt&&t!==this.Rl))}_f(t){t.volume=this.Rl.t.volume,t.muted=!0,t.playbackRate=this.Rl.t.playbackRate}wf(t){t.xc=this.ac.length;const i=t.t.element;i.addEventListener("dblclick",(()=>{this.xf(t)})),i.addEventListener("touchend",(i=>{this.Sf>=i.timeStamp?(i.preventDefault(),this.xf(t),this.Sf=0):this.Sf=i.timeStamp+500}));const s=h.createElement("div"),e=0===this.ac.length?Xc:Gc;s.className="theo-primary-color "+qc+" "+e,s.addEventListener("click",(()=>{this.lc=t})),s.addEventListener("touchend",(()=>{this.lc=t})),i.appendChild(s);const n=h.createElement("div");n.className="theo-primary-color theo-disable-button vjs-icon-close",n.addEventListener("click",(()=>{t.Rt=!1})),n.addEventListener("touchend",(()=>{t.Rt=!1})),i.appendChild(n),this.Tf(t,i),this.Cf(t),this.Pf(t)}Tf(t,i){const s=h.createElement("div");let e=0;const n=i=>{if(this.Mf=!0,this.kc(t),i.preventDefault(),"touchstart"===i.type){e=i.changedTouches[0].clientX,h.addEventListener("touchmove",r),h.addEventListener("touchend",o),h.addEventListener("touchcancel",o)}else{e=i.x,h.addEventListener("mousemove",r),h.addEventListener("mouseup",o)}},r=i=>{let s;if("touchmove"===i.type){s=i.changedTouches[0].clientX}else{s=i.x}const n=e-s,r=t.t.element.parentElement.clientWidth,h=(t.t.element.clientWidth+n)/r;t.Ti=h,t.Ci=h,e=s},o=t=>{this.Mf=!1,"mouseup"===t.type?(h.removeEventListener("mousemove",r),h.removeEventListener("mouseup",o)):(h.removeEventListener("touchmove",r),h.removeEventListener("touchend",o),h.removeEventListener("touchcancel",o))};s.addEventListener("mousedown",n),s.addEventListener("touchstart",n),s.className="theo-resize-button theo-primary-color vjs-icon-resize-handle-sw",i.appendChild(s)}bf(t){const i=t.parentElement.clientWidth/100,s=w.min(40,5.23*i);t.style.fontSize=s+"px"}Cf(t){const i=t.t.element,s=i.parentElement;let e={x:0,y:0};const n=i=>{if(!this.Mf&&t.rc)if(this.kc(t),i.preventDefault(),"touchstart"===i.type){const t=i;e.x=t.changedTouches[0].clientX,e.y=t.changedTouches[0].clientY,h.addEventListener("touchmove",r),h.addEventListener("touchend",o),h.addEventListener("touchcancel",o)}else{const t=i;e.x=t.x,e.y=t.y,h.addEventListener("mousemove",r),h.addEventListener("mouseup",o)}},r=n=>{let r;if("touchmove"===n.type){const t=n;r={x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}}else{const t=n;r={x:t.x,y:t.y}}const h=r.x-e.x,o=r.y-e.y,a=i.offsetLeft,u=s.clientWidth;t.qh=(a+h)/u;const c=s.offsetHeight,l=i.offsetTop;t.Gh=(l+o)/c,e=r},o=t=>{"mouseup"===t.type?(h.removeEventListener("mouseup",o),h.removeEventListener("mousemove",r)):(h.removeEventListener("touchmove",r),h.removeEventListener("touchend",o),h.removeEventListener("touchcancel",o))};i.addEventListener("mousedown",n),i.addEventListener("touchstart",n)}kc(t){for(const i of this.ac)i.xc>t.xc&&(i.xc-=1,i.t.element.style.setProperty("z-index",""+i.xc));t.xc=this.ac.length,t.t.element.style.setProperty("z-index",""+t.xc)}ql(){if(void 0!==this.Ql)return;this.Ql=this.Gu;const t=this.zl();for(const i of t)i.t.playbackRate=0}Af(){if(void 0===this.Ql)return;if(this.Wc||this.zc<Nt.If){if(this.Rl&&!this.Wl){this.Wl=!0;for(const t of this.jf())this.Rl.Ou!==t.Ou&&t.Cc(this.ic,this.sc)}return}const t=this.zl();for(const i of t)i.t.playbackRate=this.Ql;this.Ql=void 0,this.Wl=!0}_c(t){t.Rt||t!==this.Ol||(this.lc=void 0),this.xo(new Uc(t.ja)),this.Ac()}async Xu(t,i){void 0===i&&(i=!1),this.ql();const s=t.t;i&&(this.ef=new Q,s.addEventListener(X.lo,this.Ms),await this.ef.Ef,s.removeEventListener(X.lo,this.Ms)),s.readyState===Nt.Zl&&(this.ff=!0,s.play()),this.Hc?s.pause():s.play(),t.Cc(this.ic,this.sc)}Ac(){const t=this.zl();if(!t.length)return;let i=0;switch(this.dc){case"spotlight":{t.length>1?this.Hs.style.gridTemplateColumns="80% 20%":this.Hs.style.gridTemplateColumns="100%";let s=1/0;for(const e of t)if(i>=s+1)e.Rt=!1;else if(e.t.element.style.setProperty("width","100%"),i++,2===i){const i=e.t.element.clientHeight,n=e.t.element.parentElement.clientHeight,r=w.floor(n/i);s=w.min(t.length-1,r),this.Hs.style.gridTemplateRows="repeat("+s+", 1fr)"}break}case"overlay":{let s=0;for(i=1;i<t.length;i++){const e=t[i];if(i>=5)e.Rt=!1;else{if(!e.jc){const t=.04+.24*s;e.Pc(e.qh,t,e.Ti,e.Ci,!1),this.kc(e),s++}e.t.element.style.setProperty("z-index",""+e.xc),e.Ac()}}break}case"gallery":{const s=t.length,e=w.ceil(w.sqrt(s));for(const s of t)i>=9?s.Rt=!1:(s.t.element.style.setProperty("width",100/e+"%"),i++);break}}}cc(t,i){const s=i>=0?w.min(w.floor(i),this.ac.length-1):0,e=t.po,n=w.min(e,s),r=w.max(e,s),h=0===n;if(!(!this.ac[n].Rt||!this.ac[r].Rt)||!h){if("overlay"===this.dc){const t=this.ac[r],i=this.ac[n],s=t.qh,e=t.Gh,h=t.Ti,o=t.Ci,a=i.jc||t.jc;t.Pc(i.qh,i.Gh,i.Ti,i.Ci,a),[this.ac[n],this.ac[r]]=[this.ac[r],this.ac[n]],i.Pc(s,e,h,o,a)}else[this.ac[n],this.ac[r]]=[this.ac[r],this.ac[n]];h&&this.Df(this.ac[0]),this.xo(new Oc(e,s))}}Mc(t){t===this.Ol&&(this.lc=void 0),t.Ju(),A(this.ac,t),this.Ac(),this.xo(new Vc(t.ja))}xf(t){this.Uc||0===this.Al.length||this.Rl===t||"gallery"===this.Ll||this.cc(t,0)}Df(t,i){void 0===i&&(i=!1);let s=!1;const e=this.Rl;this.Rl=t,t.jc=!1,this.Nf(e),oi(e.t.element,Jc),this.Ol||(s=e.nc,e.fc(!0),e.Ic(!1),t.Ic(!0),i&&!s?this.xo(new Qi(this.ic,0)):t.fc(s)),this.kc(e),r(this.Rl.t.element,Jc),this.kf(this.Rl),"overlay"===this.dc&&this.Ac()}Pf(t){t.t.addEventListener(X.Ff,this.Bf),t.t.addEventListener(X.$f,this.Ih),t.t.addEventListener(X.ao,this.Rf),t.t.addEventListener(X.Of,this.Vf),t.t.addEventListener(X.Uf,this.Je),t.t.addEventListener(X.Lf,this.Hf),t.t.addEventListener(X.zf,this.Wf),t.t.addEventListener(S.qf,this.Gf),t.t.addEventListener(_t.pa,this.Ps)}kf(t){t.t.addEventListener(X.Xf,this.Os),t.t.addEventListener(X.Qu,this.Yl),t.t.addEventListener(X.Ku,this.Jf),this.Ol||t.t.addEventListener(X.Vl,this.Ul)}Nf(t){t.t.removeEventListener(X.Xf,this.Os),t.t.removeEventListener(X.Qu,this.Yl),t.t.removeEventListener(X.Ku,this.Jf),this.Ol||t.t.removeEventListener(X.Vl,this.Ul)}constructor(t,i,s){super(),this.$l=[],this.Ll="gallery",this.Mf=!1,this.if=!1,this.rf=!0,this.hf=!1,this.af=!1,this.uf=-1,this.cf=Nt.Zl,this.lf=!1,this.Sf=0,this.Ql=void 0,this.ff=!1,this.Gl=!1,this.df=-1,this.vf=!1,this.pf=-1,this.Wl=!1,this.Qf=t=>{this.Af(),V((()=>this.Os(t)))},this.Yf=t=>{this.ql(),this.Os(t)},this.Ms=()=>{var t;null==(t=this.ef)||t.Kf(),this.ef=void 0},this.Yl=()=>{const t=this.Gu;this.pf!==t&&(this.pf=t,this.Os(new Ri(this.ic,t)))},this.Ul=()=>{const t=this.El,i=this.nc;this.df===t&&this.vf===i||(this.df=t,this.vf=i,this.Os(new Qi(this.ic,t)))},this.Jf=t=>{(this.zc>Nt.Zf||this.Wc)&&this.Os(t)},this.Bf=t=>{this.Af(),this.Wc||(this.hf=!1,this.Os(t))},this.Wf=t=>{const i=this.ct;this.uf!==i&&(this.uf=i,this.Os(t))},this.Ps=t=>{this.Os(t)},this.Rf=t=>{if(this.rf){if(this.ff)return void(this.ff=!1);this.rf=!1,this.af=!1,this.Os(t)}},this.Je=t=>{this.hf||(this.hf=!0,this.Os(t))},this.Vf=t=>{!this.rf&&this.Hc&&(this.rf=!0,this.Os(t))},this.Ih=t=>{this.af||(this.af=!0,this.Os(t))},this.Hf=t=>{this.lf||(this.lf=!0,this.Os(t))},this.Gf=t=>{const i=this.zc;this.cf!==i&&(this.cf=i,this.Os(t))},this.td=async()=>{try{await this.ed.sd([J.MULTIVIEW])}catch(t){this.Nl(),this.Jl=st(t,K.LICENSE_INVALID_FEATURE),this.if=!0,this.xo(new ni(this.Jl))}},this.nd=t,this.Hs=i,this.bl=s;const e=_i.rd,n=new Ct,h=new it("9.3.1",e,n),o=new Z(s.isEmbeddable,"9.3.1",Y());if(this.ed=new St(e,o,h,n,s,Y()),this.ed.od().then(this.td),this.ad=new $c(this.ja,this.Hs),this.Bl=Gu(this.ad,this.nd,s.ui),r(this.Hs,Qc+this.Ll),_i.Zs.Ks){const t=this.Bl.el();r(t,"theo-mobile"),Xu(t)}this.yf=new Hc(this),this.gf=new Ft(this.yf),this.gf.kn(S.ud,this.Qf),this.mf=new ii(this,!0),this.mf.kn(Wc,this.Os),this.mf.kn(S.ld,this.Yf),this.Xl=new zc(this,t,s)}};function tl(t,i){var s;const e=ec(Vi({},i||{},{allowNativeFullscreen:!1,ui:Vi({},(null==i?void 0:i.ui)||{},{userActions:Vi({},(null==i||null==(s=i.ui)?void 0:s.userActions)||{},{click:!1})}),abr:Vi({},(null==i?void 0:i.abr)||{},{restrictToPlayerSize:!0})})),n=h.createElement("div");di(n),t.appendChild(n);let r=new Zc(t,n,e).ja;return g.defineProperty(r,"constructor",{value:tl}),r=ht(r),r}Bt(),Bt();var il="vjs-selected",sl=class extends mu{Rr(t){const i=t.Dr,s=this.Ur.localize(i.label);d(t.Th,s),t.el().setAttribute("aria-label",this.Ur.localize("Enable/disable")+" "+s),t.el().setAttribute("role","menuitemcheckbox"),t.selected(i.enabled)}Nr(t){const i=super.Nr(t);r(i.el(),"theo-multi-view-menu-item"),2===this.Ir.length&&r(i.el(),"theo-multi-view-menu-item-position-zero");const s=h.createElement("span");i.Th=s;const e=h.createElement("div");e.className="theo-multi-view-menu-item-toggle",i.Ch=e;const n=t=>this.Ph(t,i);i.Mh=n,e.addEventListener("click",n);const o=h.createElement("div");return o.className="theo-multi-view-menu-item-toggle-slider",e.appendChild(o),i.el().appendChild(s),i.el().appendChild(e),this.fd.before(i.el()),i}dd(){const t=this.Ar.addMenuItem().el();r(t,"theo-multi-view-menu-item"),r(t,"theo-multi-view-menu-layout-select");const i=h.createElement("button");i.className="vjs-icon-view-grid",i.addEventListener("click",(()=>{this._s.layout=Kc.GALLERY})),t.appendChild(i),this.vd=i;const s=h.createElement("button");s.className="vjs-icon-view-spotlight",s.addEventListener("click",(()=>{this._s.layout=Kc.SPOTLIGHT})),t.appendChild(s),this.pd=s;const e=h.createElement("button");return e.className="vjs-icon-multi-view",e.addEventListener("click",(()=>{this._s.layout=Kc.OVERLAY})),t.appendChild(e),this.md=e,t}Ph(t,i){t.stopImmediatePropagation(),this.Fr(i)}Fr(t){const i=t.Dr;for(const t of this._s.views)t===i&&(t.enabled=!t.enabled);this.Rr(t)}Br(t){t.Ch.removeEventListener("click",t.Mh),super.Br(t)}constructor(t,i,s){super(t),this.gd=t=>{this.Mr(t.view)},this.yd=t=>{this.Pr(t.view)},this.bd=t=>{const i=t.oldPosition,s=t.newPosition,e=w.max(i,s),n=w.min(i,s),o=h.getElementsByClassName("theo-multi-view-menu-item");o[e].before(o[n]),o[n].before(o[e]),0===n&&(oi(o[e],"theo-multi-view-menu-item-position-zero"),r(o[n],"theo-multi-view-menu-item-position-zero"))},this.wd=()=>{const t=this._s.layout;ci(this.vd,il,t===Kc.GALLERY),ci(this.pd,il,t===Kc.SPOTLIGHT),ci(this.md,il,t===Kc.OVERLAY)},i.views&&(this._s=i,this.Ur=s,this._s.multiViewPlayer.addEventListener(Yc.Rc,this.gd),this._s.multiViewPlayer.addEventListener(Yc.Oc,this.yd),this._s.multiViewPlayer.addEventListener(Yc.VIEW_CHANGE,this.gd),this._s.multiViewPlayer.addEventListener(Yc.VIEW_POSITION_CHANGE,this.bd),this._s.multiViewPlayer.addEventListener(Yc.Vc,this.wd),d(this.Ar.menuHeader.el(),this.Ur.localize("MultiView")),this.fd=this.dd(),this.wd())}};Jo.registerComponent("multiViewButton",class extends Ea{buildCSSClass(){return"vjs-icon-view-grid "+super.buildCSSClass()}dispose(){this.Sh.Ve(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=3,this.Sh=new sl(this.menu,this.ks,t),this.controlText(t.localize("Views")),this.Be.Fe=this.controlText()}});export{xi as ChromelessPlayer,tt as ErrorCategory,K as ErrorCode,tl as MultiViewPlayer,rc as Player,F as cache,E as cast,Ai as features,Bi as players,Oi as registerContentProtectionIntegration,Ci as utils,Di as version,Jo as videojs};
|