PageSourceSearch

https://usatf.tv/chunk-FIBTJPCH.js

js usatf.tv collected 2026-09-24 20:02:54 UTC 1,165,098 bytes, 234 lines download raw bytes

1import{b as wv}from"./chunk-Y3P3SSVJ.js";import{a as Cv}from"./chunk-O32DKGLD.js";import"./chunk-66SWJSQS.js";import{a as xv,b as Ol,c as Nl,d as jl,e as Ml,f as Bl,g as ts,h as Fl,i as Ul,k as Vl}from"./chunk-JMO2H2LO.js";import"./chunk-S6DUGUKA.js";import{$ as ee,$a as fr,$b as fn,$e as es,A as ii,Aa as Ug,Ac as pr,B as Nn,Ba as Vg,Bd as cv,C as Rg,Ca as hn,Cb as Un,Cd as hv,D as jn,Da as qg,Dc as av,Ea as Hg,Fa as Gt,G as Og,Ga as X,Gd as fv,H as Wr,Hd as pv,I as _a,J as Ng,K as cr,Kb as Xg,L as qi,La as bl,M as Yr,Ma as Tl,Mc as Nc,Na as Sl,Nb as Jr,Ne as Bc,P as jg,Q as st,R as at,Ra as dt,Rb as Kg,Sa as Xe,Ta as ni,Tc as ov,Te as pn,U as Mg,Ua as Bn,Uc as lv,Ud as mv,Ue as Tv,Ve as Pl,W as hr,Wb as Qg,Xa as Al,Xd as gv,Y as Mn,Yb as Jg,Yd as vv,Zb as Zr,Ze as Ll,_ as Bg,_a as Xr,_e as Sv,aa as Ye,af as Rl,bf as Av,c as Vi,ca as Fg,cb as Wt,d as Cg,db as ki,de as _v,e as Rc,eb as Kr,ee as jc,f as ml,fb as yt,fe as Mc,g as wg,h as Dg,hb as $g,hf as Ev,ia as he,ib as zg,j as On,jb as ya,ka as J,kc as Zg,kd as uv,l as _t,la as yl,ld as dv,m as zr,nc as Dl,oa as fi,oc as Il,p as Ig,qb as El,qc as ev,r as kg,rb as Gg,rc as iv,s as Gr,sa as ne,sb as Fn,t as gl,ta as se,tb as xl,tc as nv,ua as ze,ub as Wg,uc as kl,v as Pg,va as Dt,vb as Yg,ve as yv,w as Oc,wa as It,we as bv,x as Lg,xa as $t,xb as Cl,y as vl,ya as zt,yb as Qr,yc as rv,z as _l,zb as wl,zc as sv}from"./chunk-WKPQEXE5.js";import{a as ti,b as Rn,c as Eg,d as ut,e as q,f as KC,g as et,h as Lc,j as xg}from"./chunk-NF2EONNU.js";var Pi=q((yB,Nv)=>{"use strict";var ba;typeof window<"u"?ba=window:typeof global<"u"?ba=global:typeof self<"u"?ba=self:ba={};Nv.exports=ba;});var Vc=q((bB,Mv)=>{"use strict";var jv=Array.prototype.slice;Mv.exports=lw;function lw(t,e){for(("length"in t)||(t=[t]),t=jv.call(t);t.length;){var i=t.shift(),n=e(i);if(n)return n;i.childNodes&&i.childNodes.length&&(t=jv.call(i.childNodes).concat(t));}}});var Fv=q((TB,Bv)=>{"use strict";Bv.exports=is;function is(t,e){if(!(this instanceof is))return new is(t,e);this.data=t,this.nodeValue=t,this.length=t.length,this.ownerDocument=e||null;}is.prototype.nodeType=8;is.prototype.nodeName="#comment";is.prototype.toString=function(){return"[object Comment]";};});var Vv=q((SB,Uv)=>{"use strict";Uv.exports=qn;function qn(t,e){if(!(this instanceof qn))return new qn(t);this.data=t||"",this.length=this.data.length,this.ownerDocument=e||null;}qn.prototype.type="DOMTextNode";qn.prototype.nodeType=3;qn.prototype.nodeName="#text";qn.prototype.toString=function(){return this.data;};qn.prototype.replaceData=function(e,i,n){var r=this.data,s=r.substring(0,e),a=r.substring(e+i,r.length);this.data=s+n+a,this.length=this.data.length;};});var qc=q((AB,qv)=>{"use strict";qv.exports=uw;function uw(t){var e=this,i=t.type;t.target||(t.target=e),e.listeners||(e.listeners={});var n=e.listeners[i];if(n)return n.forEach(function(r){t.currentTarget=e,typeof r=="function"?r(t):r.handleEvent(t);});e.parentNode&&e.parentNode.dispatchEvent(t);}});var Hc=q((EB,Hv)=>{"use strict";Hv.exports=dw;function dw(t,e){var i=this;i.listeners||(i.listeners={}),i.listeners[t]||(i.listeners[t]=[]),i.listeners[t].indexOf(e)===-1&&i.listeners[t].push(e);}});var $c=q((xB,$v)=>{"use strict";$v.exports=cw;function cw(t,e){var i=this;if(i.listeners&&i.listeners[t]){var n=i.listeners[t],r=n.indexOf(e);r!==-1&&n.splice(r,1);}}});var Yv=q((CB,Wv)=>{"use strict";Wv.exports=zv;var hw=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function zv(t){switch(t.nodeType){case 3:return zc(t.data);case 8:return"<!--"+t.data+"-->";default:return fw(t);}}function fw(t){var e=[],i=t.tagName;return t.namespaceURI==="http://www.w3.org/1999/xhtml"&&(i=i.toLowerCase()),e.push("<"+i+vw(t)+gw(t)),hw.indexOf(i)>-1?e.push(" />"):(e.push(">"),t.childNodes.length?e.push.apply(e,t.childNodes.map(zv)):t.textContent||t.innerText?e.push(zc(t.textContent||t.innerText)):t.innerHTML&&e.push(t.innerHTML),e.push("</"+i+">")),e.join("");}function pw(t,e){var i=typeof t[e];return e==="style"&&Object.keys(t.style).length>0?!0:t.hasOwnProperty(e)&&(i==="string"||i==="boolean"||i==="number")&&e!=="nodeName"&&e!=="className"&&e!=="tagName"&&e!=="textContent"&&e!=="innerText"&&e!=="namespaceURI"&&e!=="innerHTML";}function mw(t){if(typeof t=="string")return t;var e="";return Object.keys(t).forEach(function(i){var n=t[i];i=i.replace(/[A-Z]/g,function(r){return"-"+r.toLowerCase();}),e+=i+":"+n+";";}),e;}function gw(t){var e=t.dataset,i=[];for(var n in e)i.push({name:"data-"+n,value:e[n]});return i.length?Gv(i):"";}function Gv(t){var e=[];return t.forEach(function(i){var n=i.name,r=i.value;n==="style"&&(r=mw(r)),e.push(n+'="'+_w(r)+'"');}),e.length?" "+e.join(" "):"";}function vw(t){var e=[];for(var i in t)pw(t,i)&&e.push({name:i,value:t[i]});for(var n in t._attributes)for(var r in t._attributes[n]){var s=t._attributes[n][r],a=(s.prefix?s.prefix+":":"")+r;e.push({name:a,value:s.value});}return t.className&&e.push({name:"class",value:t.className}),e.length?Gv(e):"";}function zc(t){var e="";return typeof t=="string"?e=t:t&&(e=t.toString()),e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");}function _w(t){return zc(t).replace(/"/g,"&quot;");}});var Wc=q((wB,Kv)=>{"use strict";var Gc=Vc(),yw=qc(),bw=Hc(),Tw=$c(),Sw=Yv(),Xv="http://www.w3.org/1999/xhtml";
1Kv.exports=He;function He(t,e,i){if(!(this instanceof He))return new He(t);var n=i===void 0?Xv:i||null;this.tagName=n===Xv?String(t).toUpperCase():t,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=e||null,this.namespaceURI=n,this._attributes={},this.tagName==="INPUT"&&(this.type="text");}He.prototype.type="DOMElement";He.prototype.nodeType=1;He.prototype.appendChild=function(e){return e.parentNode&&e.parentNode.removeChild(e),this.childNodes.push(e),e.parentNode=this,e;};He.prototype.replaceChild=function(e,i){e.parentNode&&e.parentNode.removeChild(e);var n=this.childNodes.indexOf(i);return i.parentNode=null,this.childNodes[n]=e,e.parentNode=this,i;};He.prototype.removeChild=function(e){var i=this.childNodes.indexOf(e);return this.childNodes.splice(i,1),e.parentNode=null,e;};He.prototype.insertBefore=function(e,i){e.parentNode&&e.parentNode.removeChild(e);var n=i==null?-1:this.childNodes.indexOf(i);return n>-1?this.childNodes.splice(n,0,e):this.childNodes.push(e),e.parentNode=this,e;};He.prototype.setAttributeNS=function(e,i,n){var r=null,s=i,a=i.indexOf(":");if(a>-1&&(r=i.substr(0,a),s=i.substr(a+1)),this.tagName==="INPUT"&&i==="type")this.type=n;else{var o=this._attributes[e]||(this._attributes[e]={});o[s]={value:n,prefix:r};}};He.prototype.getAttributeNS=function(e,i){var n=this._attributes[e],r=n&&n[i]&&n[i].value;return this.tagName==="INPUT"&&i==="type"?this.type:typeof r!="string"?null:r;};He.prototype.removeAttributeNS=function(e,i){if(Object.prototype.hasOwnProperty.call(this._attributes,e)){var n=this._attributes[e];n&&Object.prototype.hasOwnProperty.call(n,i)&&delete n[i];}};He.prototype.hasAttributeNS=function(e,i){var n=this._attributes[e];return!!n&&i in n;};He.prototype.setAttribute=function(e,i){return this.setAttributeNS(null,e,i);};He.prototype.getAttribute=function(e){return this.getAttributeNS(null,e);};He.prototype.removeAttribute=function(e){return this.removeAttributeNS(null,e);};He.prototype.hasAttribute=function(e){return this.hasAttributeNS(null,e);};He.prototype.removeEventListener=Tw;He.prototype.addEventListener=bw;He.prototype.dispatchEvent=yw;He.prototype.focus=function(){};He.prototype.toString=function(){return Sw(this);};He.prototype.getElementsByClassName=function(e){var i=e.split(" "),n=[];return Gc(this,function(r){if(r.nodeType===1){var s=r.className||"",a=s.split(" ");i.every(function(o){return a.indexOf(o)!==-1;})&&n.push(r);}}),n;};He.prototype.getElementsByTagName=function(e){e=e.toLowerCase();var i=[];return Gc(this.childNodes,function(n){n.nodeType===1&&(e==="*"||n.tagName.toLowerCase()===e)&&i.push(n);}),i;};He.prototype.contains=function(e){return Gc(this,function(i){return e===i;})||!1;};});var Jv=q((DB,Qv)=>{"use strict";var Yc=Wc();Qv.exports=Hi;function Hi(t){if(!(this instanceof Hi))return new Hi();this.childNodes=[],this.parentNode=null,this.ownerDocument=t||null;}Hi.prototype.type="DocumentFragment";Hi.prototype.nodeType=11;Hi.prototype.nodeName="#document-fragment";Hi.prototype.appendChild=Yc.prototype.appendChild;Hi.prototype.replaceChild=Yc.prototype.replaceChild;Hi.prototype.removeChild=Yc.prototype.removeChild;Hi.prototype.toString=function(){return this.childNodes.map(function(e){return String(e);}).join("");};});var e0=q((IB,Zv)=>{"use strict";Zv.exports=Xc;function Xc(t){}Xc.prototype.initEvent=function(e,i,n){this.type=e,this.bubbles=i,this.cancelable=n;};Xc.prototype.preventDefault=function(){};});var i0=q((kB,t0)=>{"use strict";var Aw=Vc(),Ew=Fv(),xw=Vv(),Ta=Wc(),Cw=Jv(),ww=e0(),Dw=qc(),Iw=Hc(),kw=$c();t0.exports=zl;function zl(){if(!(this instanceof zl))return new zl();this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9;}var ri=zl.prototype;ri.createTextNode=function(e){return new xw(e,this);};ri.createElementNS=function(e,i){var n=e===null?null:String(e);return new Ta(i,this,n);};ri.createElement=function(e){return new Ta(e,this);};ri.createDocumentFragment=function(){return new Cw(this);};ri.createEvent=function(e){return new ww(e);};ri.createComment=function(e){return new Ew(e,this);};ri.getElementById=function(e){e=String(e);var i=Aw(this.childNodes,function(n){if(String(n.id)===e)return n;});return i||null;};ri.getElementsByClassName=Ta.prototype.getElementsByClassName;ri.getElementsByTagName=Ta.prototype.getElementsByTagName;ri.contains=Ta.prototype.contains;ri.removeEventListener=kw;ri.addEventListener=Iw;ri.dispatchEvent=Dw;});var r0=q((PB,n0)=>{"use strict";var Pw=i0();n0.exports=new Pw();});var Gl=q((LB,a0)=>{"use strict";var s0=typeof global<"u"?global:typeof window<"u"?window:{},Lw=r0(),Sa;typeof document<"u"?Sa=document:(Sa=s0["__GLOBAL_DOCUMENT_CACHE@4"],Sa||(Sa=s0["__GLOBAL_DOCUMENT_CACHE@4"]=Lw));a0.exports=Sa;});var o0=q((RB,mn)=>{"use strict";function Kc(){return mn.exports=Kc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n]);}return t;},mn.exports.__esModule=!0,mn.exports.default=mn.exports,Kc.apply(this,arguments);}mn.exports=Kc,mn.exports.__esModule=!0,mn.exports.default=mn.exports;});var u0=q((OB,l0)=>{"use strict";l0.exports=Ow;var Rw=Object.prototype.toString;function Ow(t){if(!t)return!1;var e=Rw.call(t);return e==="[object Function]"||typeof t=="function"&&e!=="[object RegExp]"||typeof window<"u"&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt);}});var h0=q((NB,c0)=>{"use strict";function Nw(t,e){var i=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=jw(t))||e&&t&&typeof t.length=="number"){i&&(t=i);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]};};}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);}function jw(t,e){if(t){if(typeof t=="string")return d0(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return d0(t,e);}}function d0(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n;}var Mw=function(){function t(){this.typeToInterceptorsMap_=new Map(),this.enabled_=!1;}var e=t.prototype;return e.getIsEnabled=function(){return this.enabled_;},e.enable=function(){this.enabled_=!0;},e.disable=function(){this.enabled_=!1;},e.reset=function(){this.typeToInterceptorsMap_=new Map(),this.enabled_=!1;},e.addInterceptor=function(n,r){this.typeToInterceptorsMap_.has(n)||this.typeToInterceptorsMap_.set(n,new Set());var s=this.typeToInterceptorsMap_.get(n);return s.has(r)?!1:(s.add(r),!0);},e.removeInterceptor=function(n,r){var s=this.typeToInterceptorsMap_.get(n);return s&&s.has(r)?(s.delete(r),!0):!1;}
2,e.clearInterceptorsByType=function(n){var r=this.typeToInterceptorsMap_.get(n);return r?(this.typeToInterceptorsMap_.delete(n),this.typeToInterceptorsMap_.set(n,new Set()),!0):!1;},e.clear=function(){return this.typeToInterceptorsMap_.size?(this.typeToInterceptorsMap_=new Map(),!0):!1;},e.getForType=function(n){return this.typeToInterceptorsMap_.get(n)||new Set();},e.execute=function(n,r){for(var s=this.getForType(n),a=Nw(s),o;!(o=a()).done;){var u=o.value;try{r=u(r);}catch{}}return r;},t;}();c0.exports=Mw;});var p0=q((jB,f0)=>{"use strict";var Bw=function(){function t(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1;}var e=t.prototype;return e.getIsEnabled=function(){return this.enabled_;},e.enable=function(){this.enabled_=!0;},e.disable=function(){this.enabled_=!1;},e.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1;},e.getMaxAttempts=function(){return this.maxAttempts_;},e.setMaxAttempts=function(n){this.maxAttempts_=n;},e.getDelayFactor=function(){return this.delayFactor_;},e.setDelayFactor=function(n){this.delayFactor_=n;},e.getFuzzFactor=function(){return this.fuzzFactor_;},e.setFuzzFactor=function(n){this.fuzzFactor_=n;},e.getInitialDelay=function(){return this.initialDelay_;},e.setInitialDelay=function(n){this.initialDelay_=n;},e.createRetry=function(n){var r=n===void 0?{}:n,s=r.maxAttempts,a=r.delayFactor,o=r.fuzzFactor,u=r.initialDelay;return new Fw({maxAttempts:s||this.maxAttempts_,delayFactor:a||this.delayFactor_,fuzzFactor:o||this.fuzzFactor_,initialDelay:u||this.initialDelay_});},t;}(),Fw=function(){function t(i){this.maxAttempts_=i.maxAttempts,this.delayFactor_=i.delayFactor,this.fuzzFactor_=i.fuzzFactor,this.currentDelay_=i.initialDelay,this.currentAttempt_=1;}var e=t.prototype;return e.moveToNextAttempt=function(){this.currentAttempt_++;var n=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+n;},e.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_;},e.getCurrentDelay=function(){return this.currentDelay_;},e.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_;},e.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_;},e.getCurrentFuzzedDelay=function(){var n=this.getCurrentMinPossibleDelay(),r=this.getCurrentMaxPossibleDelay();return n+Math.random()*(r-n);},t;}();f0.exports=Bw;});var g0=q((MB,m0)=>{"use strict";var Uw=Pi(),Vw=function(e,i){return i===void 0&&(i=!1),function(n,r,s){if(n){e(n);return;}if(r.statusCode>=400&&r.statusCode<=599){var a=s;if(i)if(Uw.TextDecoder){var o=qw(r.headers&&r.headers["content-type"]);try{a=new TextDecoder(o).decode(s);}catch{}}else a=String.fromCharCode.apply(null,new Uint8Array(s));e({cause:a});return;}e(null,s);};};function qw(t){return t===void 0&&(t=""),t.toLowerCase().split(";").reduce(function(e,i){var n=i.split("="),r=n[0],s=n[1];return r.trim()==="charset"?s.trim():e;},"utf-8");}m0.exports=Vw;});var b0=q((BB,Jc)=>{"use strict";var v0=Pi(),Hw=o0(),$w=u0(),_0=h0(),zw=p0();nt.httpHandler=g0();nt.requestInterceptorsStorage=new _0();nt.responseInterceptorsStorage=new _0();nt.retryManager=new zw();var Gw=function(e){var i={};return e&&e.trim().split(`
3`).forEach(function(n){var r=n.indexOf(":"),s=n.slice(0,r).trim().toLowerCase(),a=n.slice(r+1).trim();typeof i[s]>"u"?i[s]=a:Array.isArray(i[s])?i[s].push(a):i[s]=[i[s],a];}),i;};Jc.exports=nt;Jc.exports.default=nt;nt.XMLHttpRequest=v0.XMLHttpRequest||Kw;nt.XDomainRequest="withCredentials"in new nt.XMLHttpRequest()?nt.XMLHttpRequest:v0.XDomainRequest;Ww(["get","put","post","patch","head","delete"],function(t){nt[t==="delete"?"del":t]=function(e,i,n){return i=y0(e,i,n),i.method=t.toUpperCase(),Qc(i);};});function Ww(t,e){for(var i=0;i<t.length;i++)e(t[i]);}function Yw(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0;}function y0(t,e,i){var n=t;return $w(e)?(i=e,typeof t=="string"&&(n={uri:t})):n=Hw({},e,{uri:t}),n.callback=i,n;}function nt(t,e,i){return e=y0(t,e,i),Qc(e);}function Qc(t){if(typeof t.callback>"u")throw new Error("callback argument missing");if(t.requestType&&nt.requestInterceptorsStorage.getIsEnabled()){var e={uri:t.uri||t.url,headers:t.headers||{},body:t.body,metadata:t.metadata||{},retry:t.retry,timeout:t.timeout},i=nt.requestInterceptorsStorage.execute(t.requestType,e);t.uri=i.uri,t.headers=i.headers,t.body=i.body,t.metadata=i.metadata,t.retry=i.retry,t.timeout=i.timeout;}var n=!1,r=function(C,R,I){n||(n=!0,t.callback(C,R,I));};function s(){c.readyState===4&&!nt.responseInterceptorsStorage.getIsEnabled()&&setTimeout(u,0);}function a(){var A=void 0;if(c.response?A=c.response:A=c.responseText||Xw(c),S)try{A=JSON.parse(A);}catch{}return A;}function o(A){if(clearTimeout(P),clearTimeout(t.retryTimeout),A instanceof Error||(A=new Error(""+(A||"Unknown XMLHttpRequest Error"))),A.statusCode=0,!_&&nt.retryM
3anager.getIsEnabled()&&t.retry&&t.retry.shouldRetry()){t.retryTimeout=setTimeout(function(){t.retry.moveToNextAttempt(),t.xhr=c,Qc(t);},t.retry.getCurrentFuzzedDelay());return;}if(t.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var C={headers:D.headers||{},body:D.body,responseUrl:c.responseURL,responseType:c.responseType},R=nt.responseInterceptorsStorage.execute(t.requestType,C);D.body=R.body,D.headers=R.headers;}return r(A,D);}function u(){if(!_){var A;clearTimeout(P),clearTimeout(t.retryTimeout),t.useXDR&&c.status===void 0?A=200:A=c.status===1223?204:c.status;var C=D,R=null;if(A!==0?(C={body:a(),statusCode:A,method:y,headers:{},url:T,rawRequest:c},c.getAllResponseHeaders&&(C.headers=Gw(c.getAllResponseHeaders()))):R=new Error("Internal XMLHttpRequest Error"),t.requestType&&nt.responseInterceptorsStorage.getIsEnabled()){var I={headers:C.headers||{},body:C.body,responseUrl:c.responseURL,responseType:c.responseType},M=nt.responseInterceptorsStorage.execute(t.requestType,I);C.body=M.body,C.headers=M.headers;}return r(R,C,C.body);}}var c=t.xhr||null;c||(t.cors||t.useXDR?c=new nt.XDomainRequest():c=new nt.XMLHttpRequest());var p,_,T=c.url=t.uri||t.url,y=c.method=t.method||"GET",b=t.body||t.data,g=c.headers=t.headers||{},E=!!t.sync,S=!1,P,D={body:void 0,headers:{},statusCode:0,method:y,url:T,rawRequest:c};if("json"in t&&t.json!==!1&&(S=!0,g.accept||g.Accept||(g.Accept="application/json"),y!=="GET"&&y!=="HEAD"&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),b=JSON.stringify(t.json===!0?b:t.json))),c.onreadystatechange=s,c.onload=u,c.onerror=o,c.onprogress=function(){},c.onabort=function(){_=!0,clearTimeout(t.retryTimeout);},c.ontimeout=o,c.open(y,T,!E,t.username,t.password),E||(c.withCredentials=!!t.withCredentials),!E&&t.timeout>0&&(P=setTimeout(function(){if(!_){_=!0,c.abort("timeout");var A=new Error("XMLHttpRequest timeout");A.code="ETIMEDOUT",o(A);}},t.timeout)),c.setRequestHeader)for(p in g)g.hasOwnProperty(p)&&c.setRequestHeader(p,g[p]);else if(t.headers&&!Yw(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(c.responseType=t.responseType),"beforeSend"in t&&typeof t.beforeSend=="function"&&t.beforeSend(c),c.send(b||null),c;}function Xw(t){try{if(t.responseType==="document")return t.responseXML;var e=t.responseXML&&t.responseXML.documentElement.nodeName==="parsererror";if(t.responseType===""&&!e)return t.responseXML;}catch{}return null;}function Kw(){}});var w0=q((FB,C0)=>{"use strict";var T0=Gl(),eh=Object.create||function(){function t(){}return function(e){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return t.prototype=e,new t();};}();function si(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message;}si.prototype=eh(Error.prototype);si.prototype.constructor=si;si.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function th(t){function e(n,r,s,a){return(n|0)*3600+(r|0)*60+(s|0)+(a|0)/1e3;}var i=t.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return i?i[3]?e(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?e(i[1],i[2],0,i[4]):e(0,i[1],i[2],i[4]):null;}function Ea(){this.values=eh(null);}Ea.prototype={set:function(t,e){!this.get(t)&&e!==""&&(this.values[t]=e);},get:function(t,e,i){return i?this.has(t)?this.values[t]:e[i]:this.has(t)?this.values[t]:e;},has:function(t){return t in this.values;},alt:function(t,e,i){for(var n=0;n<i.length;++n)if(e===i[n]){this.set(t,e);break;}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10));},percent:function(t,e){var i;return(i=e.match(/^([\d]{1,3})(\.[\d]*)?%$/))&&(e=parseFloat(e),e>=0&&e<=100)?(this.set(t,e),!0):!1;}};
3function Aa(t,e,i,n){var r=n?t.split(n):[t];for(var s in r)if(typeof r[s]=="string"){var a=r[s].split(i);if(a.length===2){var o=a[0].trim(),u=a[1].trim();e(o,u);}}}function Qw(t,e,i){var n=t;function r(){var o=th(t);if(o===null)throw new si(si.Errors.BadTimeStamp,"Malformed timestamp: "+n);return t=t.replace(/^[^\sa-zA-Z-]+/,""),o;}function s(o,u){var c=new Ea();Aa(o,function(p,_){switch(p){case"region":for(var T=i.length-1;T>=0;T--)if(i[T].id===_){c.set(p,i[T].region);break;}break;case"vertical":c.alt(p,_,["rl","lr"]);break;case"line":var y=_.split(","),b=y[0];c.integer(p,b),c.percent(p,b)&&c.set("snapToLines",!1),c.alt(p,b,["auto"]),y.length===2&&c.alt("lineAlign",y[1],["start","center","end"]);break;case"position":y=_.split(","),c.percent(p,y[0]),y.length===2&&c.alt("positionAlign",y[1],["start","center","end"]);break;case"size":c.percent(p,_);break;case"align":c.alt(p,_,["start","center","end","left","right"]);break;}},/:/,/\s/),u.region=c.get("region",null),u.vertical=c.get("vertical","");try{u.line=c.get("line","auto");}catch{}u.lineAlign=c.get("lineAlign","start"),u.snapToLines=c.get("snapToLines",!0),u.size=c.get("size",100);try{u.align=c.get("align","center");}catch{u.align=c.get("align","middle");}try{u.position=c.get("position","auto");}catch{u.position=c.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},u.align);}u.positionAlign=c.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},u.align);}function a(){t=t.replace(/^\s+/,"");}if(a(),e.startTime=r(),a(),t.substr(0,3)!=="-->")throw new si(si.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+n);t=t.substr(3),a(),e.endTime=r(),a(),s(t,e);}var Zc=T0.createElement&&T0.createElement("textarea"),Jw={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},S0={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},Zw={v:"title",lang:"lang"},A0={rt:"ruby"};function x0(t,e){function i(){if(!e)return null;function b(E){return e=e.substr(E.length),E;}var g=e.match(/^([^<]*)(<[^>]*>?)?/);return b(g[1]?g[1]:g[2]);}function n(b){return Zc.innerHTML=b,b=Zc.textContent,Zc.textContent="",b;}function r(b,g){return!A0[g.localName]||A0[g.localName]===b.localName;}function s(b,g){var E=Jw[b];if(!E)return null;var S=t.document.createElement(E),P=Zw[b];return P&&g&&(S[P]=g.trim()),S;}for(var a=t.document.createElement("div"),o=a,u,c=[];(u=i())!==null;){if(u[0]==="<"){if(u[1]==="/"){c.length&&c[c.length-1]===u.substr(2).replace(">","")&&(c.pop(),o=o.parentNode);continue;}var p=th(u.substr(1,u.length-2)),_;if(p){_=t.document.createProcessingInstruction("timestamp",p),o.appendChild(_);continue;}var T=u.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!T||(_=s(T[1],T[3]),!_)||!r(o,_))continue;if(T[2]){var y=T[2].split(".");y.forEach(function(b){var g=/^bg_/.test(b),E=g?b.slice(3):b;if(S0.hasOwnProperty(E)){var S=g?"background-color":"color",P=S0[E];_.style[S]=P;}}),_.className=y.join(" ");}c.push(T[1]),o.appendChild(_),o=_;continue;}o.appendChild(t.document.createTextNode(n(u)));}return a;}var E0=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551
3],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function eD(t){for(var e=0;e<E0.length;e++){var i=E0[e];if(t>=i[0]&&t<=i[1])return!0;}return!1;}function tD(t){var e=[],i="",n;if(!t||!t.childNodes)return"ltr";function r(o,u){for(var c=u.childNodes.length-1;c>=0;c--)o.push(u.childNodes[c]);}function s(o){if(!o||!o.length)return null;var u=o.pop(),c=u.textContent||u.innerText;if(c){var p=c.match(/^.*(\n|\r)/);return p?(o.length=0,p[0]):c;}if(u.tagName==="ruby")return s(o);if(u.childNodes)return r(o,u),s(o);}for(r(e,t);i=s(e);)for(var a=0;a<i.length;a++)if(n=i.charCodeAt(a),eD(n))return"rtl";return"ltr";}function iD(t){if(typeof t.line=="number"&&(t.snapToLines||t.line>=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,i=e.textTrackList,n=0,r=0;r<i.length&&i[r]!==e;r++)i[r].mode==="showing"&&n++;return++n*-1;}function Yl(){}Yl.prototype.applyStyles=function(t,e){e=e||this.div;for(var i in t)t.hasOwnProperty(i)&&(e.style[i]=t[i]);};Yl.prototype.formatStyle=function(t,e){return t===0?0:t+e;};function Wl(t,e,i){Yl.call(this),this.cue=e,this.cueDiv=x0(t,e.text);var n={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:e.vertical===""?"horizontal-tb":e.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=t.document.createElement("div"),n={direction:tD(this.cueDiv),writingMode:e.vertical===""?"horizontal-tb":e.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:e.align==="middle"?"center":e.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var r=0;switch(e.positionAlign){case"start":case"line-left":r=e.position;break;case"center":r=e.position-e.size/2;break;case"end":case"line-right":r=e.position-e.size;break;}e.vertical===""?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(s){this.applyStyles({top:this.formatStyle(s.top,"px"),bottom:this.formatStyle(s.bottom,"px"),left:this.formatStyle(s.left,"px"),right:this.formatStyle(s.right,"px"),height:this.formatStyle(s.height,"px"),width:this.formatStyle(s.width,"px")});};}Wl.prototype=eh(Yl.prototype);Wl.prototype.constructor=Wl;function kt(t){var e,i,n,r;if(t.div){i=t.div.offsetHeight,n=t.div.offsetWidth,r=t.div.offsetTop;var s=(s=t.div.childNodes)&&(s=s[0])&&s.getClientRects&&s.getClientRects();t=t.div.getBoundingClientRect(),e=s?Math.max(s[0]&&s[0].height||0,t.height/s.length):0;}this.left=t.left,this.right=t.right,this.top=t.top||r,this.height=t.height||i,this.bottom=t.bottom||r+(t.height||i),this.width=t.width||n,this.lineHeight=e!==void 0?e:t.lineHeight;}kt.prototype.move=function(t,e){switch(e=e!==void 0?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e;break;}};kt.prototype.overlaps=function(t){return this.left<t.right&&this.right>t.left&&this.top<t.bottom&&this.bottom>t.top;};kt.prototype.overlapsAny=function(t){for(var e=0;e<t.length;e++)if(this.overlaps(t[e]))return!0;return!1;};kt.prototype.within=function(t){return this.top>=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right;};kt.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.left<t.left;case"-x":return this.right>t.right;case"+y":return this.top<t.top;case"-y":return this.bottom>t.bottom;}};kt.prototype.intersectPercentage=function(t){var e=Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left)),i=Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top)),n=e*i;return n/(this.height*this.width);};kt.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width};};kt.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,i=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,n=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t;var r={left:t.left,right:t.right,top:t.top||n,height:t.height||e,bottom:t.bottom||n+(t.height||e),width:t.width||i};return r;};function nD(t,e,i,n){function r(E,S){for(var P,D=new kt(E),A=1,C=0;C<S.length;C++){for(;E.overlapsOppositeAxis(i,S[C])||E.within(i)&&E.overlapsAny(n);)E.move(S[C]);if(E.within(i))return E;var R=E.intersectPercentage(i);A>R&&(P=new kt(E),A=R),E=new kt(D);}return P||D;}var s=new kt(e),a=e.cue,o=iD(a),u=[];
3if(a.snapToLines){var c;switch(a.vertical){case"":u=["+y","-y"],c="height";break;case"rl":u=["+x","-x"],c="width";break;case"lr":u=["-x","+x"],c="width";break;}var p=s.lineHeight,_=p*Math.round(o),T=i[c]+p,y=u[0];Math.abs(_)>T&&(_=_<0?-1:1,_*=Math.ceil(T/p)*p),o<0&&(_+=a.vertical===""?i.height:i.width,u=u.reverse()),s.move(y,_);}else{var b=s.lineHeight/i.height*100;switch(a.lineAlign){case"center":o-=b/2;break;case"end":o-=b;break;}switch(a.vertical){case"":e.applyStyles({top:e.formatStyle(o,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(o,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(o,"%")});break;}u=["+y","-x","+x","-y"],s=new kt(e);}var g=r(s,u);e.move(g.toCSSCompatValues(i));}function ns(){}ns.StringDecoder=function(){return{decode:function(t){if(!t)return"";if(typeof t!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t));}};};ns.convertCueToDOMTree=function(t,e){return!t||!e?null:x0(t,e);};var rD=.05,sD="sans-serif",aD="1.5%";ns.processCues=function(t,e,i){if(!t||!e||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var n=t.document.createElement("div");n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin=aD,i.appendChild(n);function r(p){for(var _=0;_<p.length;_++)if(p[_].hasBeenReset||!p[_].displayState)return!0;return!1;}if(!r(e)){for(var s=0;s<e.length;s++)n.appendChild(e[s].displayState);return;}var a=[],o=kt.getSimpleBoxPosition(n),u=Math.round(o.height*rD*100)/100,c={font:u+"px "+sD};(function(){for(var p,_,T=0;T<e.length;T++)_=e[T],p=new Wl(t,_,c),n.appendChild(p.div),nD(t,p,o,a),_.displayState=p.div,a.push(kt.getSimpleBoxPosition(p));})();};ns.Parser=function(t,e,i){i||(i=e,e={}),e||(e={}),this.window=t,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[];};ns.Parser.prototype={reportOrThrowError:function(t){if(t instanceof si)this.onparsingerror&&this.onparsingerror(t);else throw t;},parse:function(t){var e=this;t&&(e.buffer+=e.decoder.decode(t,{stream:!0}));function i(){for(var p=e.buffer,_=0;_<p.length&&p[_]!=="\r"&&p[_]!==`
4`;)++_;var T=p.substr(0,_);return p[_]==="\r"&&++_,p[_]===`
5`&&++_,e.buffer=p.substr(_),T;}function n(p){var _=new Ea();if(Aa(p,function(y,b){switch(y){case"id":_.set(y,b);break;case"width":_.percent(y,b);break;case"lines":_.integer(y,b);break;case"regionanchor":case"viewportanchor":var g=b.split(",");if(g.length!==2)break;var E=new Ea();if(E.percent("x",g[0]),E.percent("y",g[1]),!E.has("x")||!E.has("y"))break;_.set(y+"X",E.get("x")),_.set(y+"Y",E.get("y"));break;case"scroll":_.alt(y,b,["up"]);break;}},/=/,/\s/),_.has("id")){var T=new(e.vttjs.VTTRegion||e.window.VTTRegion)();T.width=_.get("width",100),T.lines=_.get("lines",3),T.regionAnchorX=_.get("regionanchorX",0),T.regionAnchorY=_.get("regionanchorY",100),T.viewportAnchorX=_.get("viewportanchorX",0),T.viewportAnchorY=_.get("viewportanchorY",100),T.scroll=_.get("scroll",""),e.onregion&&e.onregion(T),e.regionList.push({id:_.get("id"),region:T});}}function r(p){var _=new Ea();Aa(p,function(T,y){switch(T){case"MPEGT":_.integer(T+"S",y);break;case"LOCA":_.set(T+"L",th(y));break;}},/[^\d]:/,/,/),e.ontimestampmap&&e.ontimestampmap({MPEGTS:_.get("MPEGTS"),LOCAL:_.get("LOCAL")});}function s(p){p.match(/X-TIMESTAMP-MAP/)?Aa(p,function(_,T){switch(_){case"X-TIMESTAMP-MAP":r(T);break;}},/=/):Aa(p,function(_,T){switch(_){case"Region":n(T);break;}},/:/);}try{var a;if(e.state==="INITIAL"){if(!/\r\n|\n/.test(e.buffer))return this;a=i();var o=a.match(/^WEBVTT([ \t].*)?$/);if(!o||!o[0])throw new si(si.Errors.BadSignature);e.state="HEADER";}for(var u=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(u?u=!1:a=i(),e.state){case"HEADER":/:/.test(a)?s(a):a||(e.state="ID");continue;case"NOTE":a||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(a)){e.state="NOTE";break;}if(!a)continue;e.cue=new(e.vttjs.VTTCue||e.window.VTTCue)(0,0,"");try{e.cue.align="center";}catch{e.cue.align="middle";}if(e.state="CUE",a.indexOf("-->")===-1){e.cue.id=a;continue;}case"CUE":try{Qw(a,e.cue,e.regionList);}catch(p){e.reportOrThrowError(p),e.cue=null,e.state="BADCUE";continue;}e.state="CUETEXT";continue;case"CUETEXT":var c=a.indexOf("-->")!==-1;if(!a||c&&(u=!0)){e.oncue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue;}e.cue.text&&(e.cue.text+=`
6`),e.cue.text+=a.replace(/\u2028/g,`
7`).replace(/u2029/g,`
8`);continue;case"BADCUE":a||(e.state="ID");continue;}}}catch(p){e.reportOrThrowError(p),e.state==="CUETEXT"&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state=e.state==="INITIAL"?"BADWEBVTT":"BADCUE";}return this;},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),(t.cue||t.state==="HEADER")&&(t.buffer+=`
9
10`,t.parse()),t.state==="INITIAL")throw new si(si.Errors.BadSignature);}catch(e){t.reportOrThrowError(e);}return t.onflush&&t.onflush(),this;}};C0.exports=ns;});var k0=q((UB,I0)=>{"use strict";
10var oD="auto",lD={"":1,lr:1,rl:1},uD={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function dD(t){if(typeof t!="string")return!1;var e=lD[t.toLowerCase()];return e?t.toLowerCase():!1;}function ih(t){if(typeof t!="string")return!1;var e=uD[t.toLowerCase()];return e?t.toLowerCase():!1;}function D0(t,e,i){this.hasBeenReset=!1;var n="",r=!1,s=t,a=e,o=i,u=null,c="",p=!0,_="auto",T="start",y="auto",b="auto",g=100,E="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return n;},set:function(S){n=""+S;}},pauseOnExit:{enumerable:!0,get:function(){return r;},set:function(S){r=!!S;}},startTime:{enumerable:!0,get:function(){return s;},set:function(S){if(typeof S!="number")throw new TypeError("Start time must be set to a number.");s=S,this.hasBeenReset=!0;}},endTime:{enumerable:!0,get:function(){return a;},set:function(S){if(typeof S!="number")throw new TypeError("End time must be set to a number.");a=S,this.hasBeenReset=!0;}},text:{enumerable:!0,get:function(){return o;},set:function(S){o=""+S,this.hasBeenReset=!0;}},region:{enumerable:!0,get:function(){return u;},set:function(S){u=S,this.hasBeenReset=!0;}},vertical:{enumerable:!0,get:function(){return c;},set:function(S){var P=dD(S);if(P===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");c=P,this.hasBeenReset=!0;}},snapToLines:{enumerable:!0,get:function(){return p;},set:function(S){p=!!S,this.hasBeenReset=!0;}},line:{enumerable:!0,get:function(){return _;},set:function(S){if(typeof S!="number"&&S!==oD)throw new SyntaxError("Line: an invalid number or illegal string was specified.");_=S,this.hasBeenReset=!0;}},lineAlign:{enumerable:!0,get:function(){return T;},set:function(S){var P=ih(S);P?(T=P,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.");}},position:{enumerable:!0,get:function(){return y;},set:function(S){if(S<0||S>100)throw new Error("Position must be between 0 and 100.");y=S,this.hasBeenReset=!0;}},positionAlign:{enumerable:!0,get:function(){return b;},set:function(S){var P=ih(S);P?(b=P,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.");}},size:{enumerable:!0,get:function(){return g;},set:function(S){if(S<0||S>100)throw new Error("Size must be between 0 and 100.");g=S,this.hasBeenReset=!0;}},align:{enumerable:!0,get:function(){return E;},set:function(S){var P=ih(S);if(!P)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");E=P,this.hasBeenReset=!0;}}}),this.displayState=void 0;}D0.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text);};I0.exports=D0;});var L0=q((VB,P0)=>{"use strict";var cD={"":!0,up:!0};function hD(t){if(typeof t!="string")return!1;var e=cD[t.toLowerCase()];return e?t.toLowerCase():!1;}function xa(t){return typeof t=="number"&&t>=0&&t<=100;}function fD(){var t=100,e=3,i=0,n=100,r=0,s=100,a="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t;},set:function(o){if(!xa(o))throw new Error("Width must be between 0 and 100.");t=o;}},lines:{enumerable:!0,get:function(){return e;},set:function(o){if(typeof o!="number")throw new TypeError("Lines must be set to a number.");e=o;}},regionAnchorY:{enumerable:!0,get:function(){return n;},set:function(o){if(!xa(o))throw new Error("RegionAnchorX must be between 0 and 100.");n=o;}},regionAnchorX:{enumerable:!0,get:function(){return i;},set:function(o){if(!xa(o))throw new Error("RegionAnchorY must be between 0 and 100.");i=o;}},viewportAnchorY:{enumerable:!0,get:function(){return s;},set:function(o){if(!xa(o))throw new Error("ViewportAnchorY must be between 0 and 100.");s=o;}},viewportAnchorX:{enumerable:!0,get:function(){return r;},set:function(o){if(!xa(o))throw new Error("ViewportAnchorX must be between 0 and 100.");r=o;}},scroll:{enumerable:!0,get:function(){return a;},set:function(o){var u=hD(o);u===!1?console.warn("Scroll: an invalid or illegal string was specified."):a=u;}}});}P0.exports=fD;});var O0=q((qB,R0)=>{"use strict";var gn=Pi(),mr=R0.exports={WebVTT:w0(),VTTCue:k0(),VTTRegion:L0()};gn.vttjs=mr;gn.WebVTT=mr.WebVTT;var pD=mr.VTTCue,mD=mr.VTTRegion,gD=gn.VTTCue,vD=gn.VTTRegion;mr.shim=function(){gn.VTTCue=pD,gn.VTTRegion=mD;};mr.restore=function(){gn.VTTCue=gD,gn.VTTRegion=vD;};gn.VTTCue||mr.shim();});function Ge(){return Ge=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n]);}return t;},Ge.apply(this,arguments);}var nh=ut(()=>{"use strict";});var rs,N0,_D,ss,rh=ut(()=>{"use strict";rs=et(Pi()),N0="https://example.com",_D=function(e,i){if(/^[a-z]+:/i.test(i))return i;/^data:/.test(e)&&(e=rs.default.location&&rs.default.location.href||"");var n=/^\/\//.test(e),r=!rs.default.location&&!/\/\//i.test(e);e=new rs.default.URL(e,rs.default.location||N0);var s=new URL(i,e);return r?s.href.slice(N0.length):n?s.href.slice(s.protocol.length):s.href;},ss=_D;});var Xl,j0=ut(()=>{"use strict";Xl=function(){function t(){this.listeners={};}var e=t.prototype;return e.on=function(n,r){this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push(r);},e.off=function(n,r){if(!this.listeners[n])return!1;var s=this.listeners[n].indexOf(r);return this.listeners[n]=this.listeners[n].slice(0),this.listeners[n].splice(s,1),s>-1;},e.trigger=function(n){var r=this.listeners[n];if(r)if(arguments.length===2)for(var s=r.length,a=0;a<s;++a)r[a].call(this,arguments[1]);
10else for(var o=Array.prototype.slice.call(arguments,1),u=r.length,c=0;c<u;++c)r[c].apply(this,o);},e.dispose=function(){this.listeners={};},e.pipe=function(n){this.on("data",function(r){n.push(r);});},t;}();});function Ca(t){for(var e=yD(t),i=new Uint8Array(e.length),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i;}var sh,yD,ah=ut(()=>{"use strict";sh=et(Pi()),yD=function(e){return sh.default.atob?sh.default.atob(e):Buffer.from(e,"base64").toString("binary");};});var uh,bD,oh,TD,Pt,M0,dh,SD,Hn,lh,Kl,B0=ut(()=>{"use strict";j0();nh();ah();uh=class extends Xl{constructor(){super(),this.buffer="";}push(e){let i;for(this.buffer+=e,i=this.buffer.indexOf(`
11`);i>-1;i=this.buffer.indexOf(`
12`))this.trigger("data",this.buffer.substring(0,i)),this.buffer=this.buffer.substring(i+1);}},bD="	",oh=function(t){let e=/([0-9.]*)?@?([0-9.]*)?/.exec(t||""),i={};return e[1]&&(i.length=parseInt(e[1],10)),e[2]&&(i.offset=parseInt(e[2],10)),i;},TD=function(){let i="(?:"+"[^=]*"+")=(?:"+'"[^"]*"|[^,]*'+")";return new RegExp("(?:^|,)("+i+")");},Pt=function(t){let e={};if(!t)return e;let i=t.split(TD()),n=i.length,r;for(;n--;)i[n]!==""&&(r=/([^=]*)=(.*)/.exec(i[n]).slice(1),r[0]=r[0].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^['"](.*)['"]$/g,"$1"),e[r[0]]=r[1]);return e;},M0=t=>{let e=t.split("x"),i={};return e[0]&&(i.width=parseInt(e[0],10)),e[1]&&(i.height=parseInt(e[1],10)),i;},dh=class extends Xl{constructor(){super(),this.customParsers=[],this.tagMappers=[];}push(e){let i,n;if(e=e.trim(),e.length===0)return;if(e[0]!=="#"){this.trigger("data",{type:"uri",uri:e});return;}this.tagMappers.reduce((s,a)=>{let o=a(e);return o===e?s:s.concat([o]);},[e]).forEach(s=>{for(let a=0;a<this.customParsers.length;a++)if(this.customParsers[a].call(this,s))return;if(s.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:s.slice(1)});return;}if(s=s.replace("\r",""),i=/^#EXTM3U/.exec(s),i){this.trigger("data",{type:"tag",tagType:"m3u"});return;}if(i=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(s),i){n={type:"tag",tagType:"inf"},i[1]&&(n.duration=parseFloat(i[1])),i[2]&&(n.title=i[2]),this.trigger("data",n);return;}if(i=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(s),i){n={type:"tag",tagType:"targetduration"},i[1]&&(n.duration=parseInt(i[1],10)),this.trigger("data",n);return;}if(i=/^#EXT-X-VERSION:([0-9.]*)?/.exec(s),i){n={type:"tag",tagType:"version"},i[1]&&(n.version=parseInt(i[1],10)),this.trigger("data",n);return;}if(i=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(s),i){n={type:"tag",tagType:"media-sequence"},i[1]&&(n.number=parseInt(i[1],10)),this.trigger("data",n);return;}if(i=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(s),i){n={type:"tag",tagType:"discontinuity-sequence"},i[1]&&(n.number=parseInt(i[1],10)),this.trigger("data",n);return;}if(i=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(s),i){n={type:"tag",tagType:"playlist-type"},i[1]&&(n.playlistType=i[1]),this.trigger("data",n);return;}if(i=/^#EXT-X-BYTERANGE:(.*)?$/.exec(s),i){n=Ge(oh(i[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",n);return;}if(i=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(s),i){n={type:"tag",tagType:"allow-cache"},i[1]&&(n.allowed=!/NO/.test(i[1])),this.trigger("data",n);return;}if(i=/^#EXT-X-MAP:(.*)$/.exec(s),i){if(n={type:"tag",tagType:"map"},i[1]){let a=Pt(i[1]);a.URI&&(n.uri=a.URI),a.BYTERANGE&&(n.byterange=oh(a.BYTERANGE));}this.trigger("data",n);return;}if(i=/^#EXT-X-STREAM-INF:(.*)$/.exec(s),i){n={type:"tag",tagType:"stream-inf"},i[1]&&(n.attributes=Pt(i[1]),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=M0(n.attributes.RESOLUTION)),n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))),this.trigger("data",n);return;}if(i=/^#EXT-X-MEDIA:(.*)$/.exec(s),i){n={type:"tag",tagType:"media"},i[1]&&(n.attributes=Pt(i[1])),this.trigger("data",n);return;}if(i=/^#EXT-X-ENDLIST/.exec(s),i){this.trigger("data",{type:"tag",tagType:"endlist"});return;}if(i=/^#EXT-X-DISCONTINUITY/.exec(s),i){this.trigger("data",{type:"tag",tagType:"discontinuity"});return;}if(i=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(s),i){n={type:"tag",tagType:"program-date-time"}
12,i[1]&&(n.dateTimeString=i[1],n.dateTimeObject=new Date(i[1])),this.trigger("data",n);return;}if(i=/^#EXT-X-KEY:(.*)$/.exec(s),i){n={type:"tag",tagType:"key"},i[1]&&(n.attributes=Pt(i[1]),n.attributes.IV&&(n.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),this.trigger("data",n);return;}if(i=/^#EXT-X-START:(.*)$/.exec(s),i){n={type:"tag",tagType:"start"},i[1]&&(n.attributes=Pt(i[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),this.trigger("data",n);return;}if(i=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(s),i){n={type:"tag",tagType:"cue-out-cont"},i[1]?n.data=i[1]:n.data="",this.trigger("data",n);return;}if(i=/^#EXT-X-CUE-OUT:(.*)?$/.exec(s),i){n={type:"tag",tagType:"cue-out"},i[1]?n.data=i[1]:n.data="",this.trigger("data",n);return;}if(i=/^#EXT-X-CUE-IN:?(.*)?$/.exec(s),i){n={type:"tag",tagType:"cue-in"},i[1]?n.data=i[1]:n.data="",this.trigger("data",n);return;}if(i=/^#EXT-X-SKIP:(.*)$/.exec(s),i&&i[1]){n={type:"tag",tagType:"skip"},n.attributes=Pt(i[1]),n.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(n.attributes["SKIPPED-SEGMENTS"]=parseInt(n.attributes["SKIPPED-SEGMENTS"],10)),n.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(n.attributes["RECENTLY-REMOVED-DATERANGES"]=n.attributes["RECENTLY-REMOVED-DATERANGES"].split(bD)),this.trigger("data",n);return;}if(i=/^#EXT-X-PART:(.*)$/.exec(s),i&&i[1]){n={type:"tag",tagType:"part"},n.attributes=Pt(i[1]),["DURATION"].forEach(function(a){n.attributes.hasOwnProperty(a)&&(n.attributes[a]=parseFloat(n.attributes[a]));}),["INDEPENDENT","GAP"].forEach(function(a){n.attributes.hasOwnProperty(a)&&(n.attributes[a]=/YES/.test(n.attributes[a]));}),n.attributes.hasOwnProperty("BYTERANGE")&&(n.attributes.byterange=oh(n.attributes.BYTERANGE)),this.trigger("data",n);return;}if(i=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(s),i&&i[1]){n={type:"tag",tagType:"server-control"},n.attributes=Pt(i[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(a){n.attributes.hasOwnProperty(a)&&(n.attributes[a]=parseFloat(n.attributes[a]));}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(a){n.attributes.hasOwnProperty(a)&&(n.attributes[a]=/YES/.test(n.attributes[a]));}),this.trigger("data",n);return;}if(i=/^#EXT-X-PART-INF:(.*)$/.exec(s),i&&i[1]){n={type:"tag",tagType:"part-inf"},n.attributes=Pt(i[1]),["PART-TARGET"].forEach(function(a){n.attributes.hasOwnProperty(a)&&(n.attributes[a]=parseFloat(n.attributes[a]));}),this.trigger("data",n);return;}if(i=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(s),i&&i[1]){n={type:"tag",tagType:"preload-hint"},n.attributes=Pt(i[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(a){if(n.attributes.hasOwnProperty(a)){n.attributes[a]=parseInt(n.attributes[a],10);let o=a==="BYTERANGE-LENGTH"?"length":"offset";n.attributes.byterange=n.attributes.byterange||{},n.attributes.byterange[o]=n.attributes[a],delete n.attributes[a];}}),this.trigger("data",n);return;}if(i=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(s),i&&i[1]){n={type:"tag",tagType:"rendition-report"},n.attributes=Pt(i[1]),["LAST-MSN","LAST-PART"].forEach(function(a){n.attributes.hasOwnProperty(a)&&(n.attributes[a]=parseInt(n.attributes[a],10));}),this.trigger("data",n);return;}if(i=/^#EXT-X-DATERANGE:(.*)$/.exec(s),i&&i[1]){n={type:"tag",tagType:"daterange"},n.attributes=Pt(i[1]),["ID","CLASS"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=String(n.attributes[o]));}),["START-DATE","END-DATE"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=new Date(n.attributes[o]));}),["DURATION","PLANNED-DURATION"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=parseFloat(n.attributes[o]));}),["END-ON-NEXT"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=/YES/i.test(n.attributes[o]));}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=n.attributes[o].toString(16));});let a=/^X-([A-Z]+-)+[A-Z]+$/;
12for(let o in n.attributes){if(!a.test(o))continue;let u=/[0-9A-Fa-f]{6}/g.test(n.attributes[o]),c=/^\d+(\.\d+)?$/.test(n.attributes[o]);n.attributes[o]=u?n.attributes[o].toString(16):c?parseFloat(n.attributes[o]):String(n.attributes[o]);}this.trigger("data",n);return;}if(i=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(s),i){this.trigger("data",{type:"tag",tagType:"independent-segments"});return;}if(i=/^#EXT-X-I-FRAMES-ONLY/.exec(s),i){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return;}if(i=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(s),i){n={type:"tag",tagType:"content-steering"},n.attributes=Pt(i[1]),this.trigger("data",n);return;}if(i=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(s),i){n={type:"tag",tagType:"i-frame-playlist"},n.attributes=Pt(i[1]),n.attributes.URI&&(n.uri=n.attributes.URI),n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=M0(n.attributes.RESOLUTION)),n.attributes["AVERAGE-BANDWIDTH"]&&(n.attributes["AVERAGE-BANDWIDTH"]=parseInt(n.attributes["AVERAGE-BANDWIDTH"],10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),this.trigger("data",n);return;}if(i=/^#EXT-X-DEFINE:(.*)$/.exec(s),i){n={type:"tag",tagType:"define"},n.attributes=Pt(i[1]),this.trigger("data",n);return;}this.trigger("data",{type:"tag",data:s.slice(4)});});}addParser({expression:e,customType:i,dataParser:n,segment:r}){typeof n!="function"&&(n=s=>s),this.customParsers.push(s=>{if(e.exec(s))return this.trigger("data",{type:"custom",data:n(s),customType:i,segment:r}),!0;});}addTagMapper({expression:e,map:i}){let n=r=>e.test(r)?i(r):r;this.tagMappers.push(n);}},SD=t=>t.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),Hn=function(t){let e={};return Object.keys(t).forEach(function(i){e[SD(i)]=t[i];}),e;},lh=function(t){let{serverControl:e,targetDuration:i,partTargetDuration:n}=t;if(!e)return;let r="#EXT-X-SERVER-CONTROL",s="holdBack",a="partHoldBack",o=i&&i*3,u=n&&n*2;i&&!e.hasOwnProperty(s)&&(e[s]=o,this.trigger("info",{message:`${r} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&e[s]<o&&(this.trigger("warn",{message:`${r} clamping HOLD-BACK (${e[s]}) to targetDuration * 3 (${o})`}),e[s]=o),n&&!e.hasOwnProperty(a)&&(e[a]=n*3,this.trigger("info",{message:`${r} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${e[a]}).`})),n&&e[a]<u&&(this.trigger("warn",{message:`${r} clamping PART-HOLD-BACK (${e[a]}) to partTargetDuration * 2 (${u}).`}),e[a]=u);},Kl=class extends Xl{constructor(e={}){super(),this.lineStream=new uh(),this.parseStream=new dh(),this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;let i=this,n=[],r={},s,a,o=!1,u=function(){},c={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},p="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",_=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let T=0,y=0,b={};this.on("end",()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&a&&(r.key=a),!r.timeline&&typeof _=="number"&&(r.timeline=_),this.manifest.preloadSegment=r);}),this.parseStream.on("data",function(g){let E,S;if(i.manifest.definitions){for(let P in i.manifest.definitions)if(g.uri&&(g.uri=g.uri.replace(`{$${P}}`,i.manifest.definitions[P])),g.attributes)for(let D in g.attributes)typeof g.attributes[D]=="string"&&(g.attributes[D]=g.attributes[D].replace(`{$${P}}`,i.manifest.definitions[P]));}({tag(){(({version(){g.version&&(this.manifest.version=g.version);},"allow-cache"(){this.manifest.allowCache=g.allowed,"allowed"in g||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0);},byterange(){let P={};"length"in g&&(r.byterange=P,P.length=g.length,"offset"in g||(g.offset=T)),"offset"in g&&(r.byterange=P,P.offset=g.offset),T=P.offset+P.length;},endlist(){this.manifest.endList=!0;},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),g.title&&(r.title=g.title),g.duration>0&&(r.duration=g.duration),g.duration===0&&(r.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=n;},key(){if(!g.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return;}if(g.attributes.METHOD==="NONE"){a=null;return;}if(!g.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return;}if(g.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:g.attributes};return;}if(g.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:g.attributes.URI};return;}if(g.attributes.KEYFORMAT===p){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(g.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return;}if(g.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),g.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return;}if(!(g.attributes.KEYID&&g.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return;}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:g.attributes.KEYFORMAT,keyId:g.attributes.KEYID.substring(2)},pssh:Ca(g.attributes.URI.split(",")[1])};return;}g.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),a={method:g.attributes.METHOD||"AES-128",uri:g.attributes.URI},typeof g.attributes.IV<"u"&&(a.iv=g.attributes.IV);},"media-sequence"(){if(!isFinite(g.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+g.number});return;}this.manifest.mediaSequence=g.number;},"discontinuity-sequence"(){if(!isFinite(g.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+g.number});return;}this.manifest.discontinuitySequence=g.number,_=g.number;},"playlist-type"(){if(!/VOD|EVENT/.test(g.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+g.playlist});return;}this.manifest.playlistType=g.playlistType;},map(){s={},g.uri&&(s.uri=g.uri),g.byterange&&(s.byterange=g.byterange),a&&(s.key=a);}
12,"stream-inf"(){if(this.manifest.playlists=n,this.manifest.mediaGroups=this.manifest.mediaGroups||c,!g.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return;}r.attributes||(r.attributes={}),Ge(r.attributes,g.attributes);},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||c,!(g.attributes&&g.attributes.TYPE&&g.attributes["GROUP-ID"]&&g.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return;}let P=this.manifest.mediaGroups[g.attributes.TYPE];P[g.attributes["GROUP-ID"]]=P[g.attributes["GROUP-ID"]]||{},E=P[g.attributes["GROUP-ID"]],S={default:/yes/i.test(g.attributes.DEFAULT)},S.default?S.autoselect=!0:S.autoselect=/yes/i.test(g.attributes.AUTOSELECT),g.attributes.LANGUAGE&&(S.language=g.attributes.LANGUAGE),g.attributes.URI&&(S.uri=g.attributes.URI),g.attributes["INSTREAM-ID"]&&(S.instreamId=g.attributes["INSTREAM-ID"]),g.attributes.CHARACTERISTICS&&(S.characteristics=g.attributes.CHARACTERISTICS),g.attributes.FORCED&&(S.forced=/yes/i.test(g.attributes.FORCED)),E[g.attributes.NAME]=S;},discontinuity(){_+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(n.length);},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=g.dateTimeString,this.manifest.dateTimeObject=g.dateTimeObject),r.dateTimeString=g.dateTimeString,r.dateTimeObject=g.dateTimeObject;let{lastProgramDateTime:P}=this;this.lastProgramDateTime=new Date(g.dateTimeString).getTime(),P===null&&this.manifest.segments.reduceRight((D,A)=>(A.programDateTime=D-A.duration*1e3,A.programDateTime),this.lastProgramDateTime);},targetduration(){if(!isFinite(g.duration)||g.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+g.duration});return;}this.manifest.targetDuration=g.duration,lh.call(this,this.manifest);}
12,start(){if(!g.attributes||isNaN(g.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return;}this.manifest.start={timeOffset:g.attributes["TIME-OFFSET"],precise:g.attributes.PRECISE};},"cue-out"(){r.cueOut=g.data;},"cue-out-cont"(){r.cueOutCont=g.data;},"cue-in"(){r.cueIn=g.data;},skip(){this.manifest.skip=Hn(g.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",g.attributes,["SKIPPED-SEGMENTS"]);},part(){o=!0;let P=this.manifest.segments.length,D=Hn(g.attributes);r.parts=r.parts||[],r.parts.push(D),D.byterange&&(D.byterange.hasOwnProperty("offset")||(D.byterange.offset=y),y=D.byterange.offset+D.byterange.length);let A=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${A} for segment #${P}`,g.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((C,R)=>{C.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${R} lacks required attribute(s): LAST-PART`});});},"server-control"(){let P=this.manifest.serverControl=Hn(g.attributes);P.hasOwnProperty("canBlockReload")||(P.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),lh.call(this,this.manifest),P.canSkipDateranges&&!P.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"});},"preload-hint"(){let P=this.manifest.segments.length,D=Hn(g.attributes),A=D.type&&D.type==="PART";r.preloadHints=r.preloadHints||[],r.preloadHints.push(D),D.byterange&&(D.byterange.hasOwnProperty("offset")||(D.byterange.offset=A?y:0,A&&(y=D.byterange.offset+D.byterange.length)));let C=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${C} for segment #${P}`,g.attributes,["TYPE","URI"]),!!D.type)for(let R=0;R<r.preloadHints.length-1;R++){let I=r.preloadHints[R];I.type&&I.type===D.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${C} for segment #${P} has the same TYPE ${D.type} as preload hint #${R}`});}},"rendition-report"(){let P=Hn(g.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(P);let D=this.manifest.renditionReports.length-1,A=["LAST-MSN","URI"];o&&A.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${D}`,g.attributes,A);},"part-inf"(){this.manifest.partInf=Hn(g.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",g.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),lh.call(this,this.manifest);},daterange(){this.manifest.dateRanges.push(Hn(g.attributes));let P=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${P}`,g.attributes,["ID","START-DATE"]);let D=this.manifest.dateRanges[P];D.endDate&&D.startDate&&new Date(D.endDate)<new Date(D.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),D.duration&&D.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),D.plannedDuration&&D.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});let A=!!D.endOnNext;if(A&&!D.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),A&&(D.duration||D.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),D.duration&&D.endDate){let R=D.startDate.getTime()+D.duration*1e3;this.manifest.dateRanges[P].endDate=new Date(R);}if(!b[D.id])b[D.id]=D;else{for(let R in b[D.id])if(D[R]&&JSON.stringify(b[D.id][R])!==JSON.stringify(D[R])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break;}let C=this.manifest.dateRanges.findIndex(R=>R.id===D.id);this.manifest.dateRanges[C]=Ge(this.manifest.dateRanges[C],D),b[D.id]=Ge(b[D.id],D),this.manifest.dateRanges.pop();}},"independent-segments"(){this.manifest.independentSegments=!0;},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4);},"content-steering"(){this.manifest.contentSteering=Hn(g.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",g.attributes,["SERVER-URI"]);},define(){this.manifest.definitions=this.manifest.definitions||{};let P=(D,A)=>{if(D in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${D}`});return;}this.manifest.definitions[D]=A;};
12if("QUERYPARAM"in g.attributes){if("NAME"in g.attributes||"IMPORT"in g.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return;}let D=this.params.get(g.attributes.QUERYPARAM);if(!D){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${g.attributes.QUERYPARAM}`});return;}P(g.attributes.QUERYPARAM,decodeURIComponent(D));return;}if("NAME"in g.attributes){if("IMPORT"in g.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return;}if(!("VALUE"in g.attributes)||typeof g.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${g.attributes.NAME}`});return;}P(g.attributes.NAME,g.attributes.VALUE);return;}if("IMPORT"in g.attributes){if(!this.mainDefinitions[g.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${g.attributes.IMPORT} to import, or IMPORT used on main playlist`});return;}P(g.attributes.IMPORT,this.mainDefinitions[g.attributes.IMPORT]);return;}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"});},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:g.attributes,uri:g.uri,timeline:_}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",g.attributes,["BANDWIDTH","URI"]);}})[g.tagType]||u).call(i);},uri(){r.uri=g.uri,n.push(r),this.manifest.targetDuration&&!("duration"in r)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),r.duration=this.manifest.targetDuration),a&&(r.key=a),r.timeline=_,s&&(r.map=s),y=0,this.lastProgramDateTime!==null&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=r.duration*1e3),r={};},comment(){},custom(){g.segment?(r.custom=r.custom||{},r.custom[g.customType]=g.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[g.customType]=g.data);}})[g.type].call(i);});}requiredCompatibilityversion(e,i){(e<i||!e)&&this.trigger("warn",{message:`manifest must be at least version ${i}`});}warnOnMissingAttributes_(e,i,n){let r=[];n.forEach(function(s){i.hasOwnProperty(s)||r.push(s);}),r.length&&this.trigger("warn",{message:`${e} lacks required attribute(s): ${r.join(", ")}`});}push(e){this.lineStream.push(e);}end(){this.lineStream.push(`
13`),this.manifest.dateRanges.length&&this.lastProgramDateTime===null&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end");}addParser(e){this.parseStream.addParser(e);}addTagMapper(e){this.parseStream.addTagMapper(e);}};});var gr,vr,AD,F0,ch,Li,U0,hh,ED,_r,as,Ql,fh,V0,q0=ut(()=>{"use strict";gr=et(Pi()),vr={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},AD=["video","audio","text"],F0=["Video","Audio","Text"],ch=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(i,n,r){var s=("00"+Number(n).toString(16)).slice(-2),a=("00"+Number(r).toString(16)).slice(-2);return"avc1."+s+"00"+a;});},Li=function(e){e===void 0&&(e="");var i=e.split(","),n=[];return i.forEach(function(r){r=r.trim();var s;AD.forEach(function(a){var o=vr[a].exec(r.toLowerCase());if(!(!o||o.length<=1)){s=a;var u=r.substring(0,o[1].length),c=r.replace(u,"");n.push({type:u,details:c,mediaType:a});}}),s||n.push({type:r,details:"",mediaType:"unknown"});}),n;},U0=function(e,i){if(!e.mediaGroups.AUDIO||!i)return null;var n=e.mediaGroups.AUDIO[i];if(!n)return null;for(var r in n){var s=n[r];if(s.default&&s.playlists)return Li(s.playlists[0].attributes.CODECS);}return null;},hh=function(e){return e===void 0&&(e=""),vr.audio.test(e.trim().toLowerCase());},ED=function(e){return e===void 0&&(e=""),vr.text.test(e.trim().toLowerCase());},_r=function(e){if(!(!e||typeof e!="string")){var i=e.toLowerCase().split(",").map(function(s){return ch(s.trim());}),n="video";i.length===1&&hh(i[0])?n="audio":i.length===1&&ED(i[0])&&(n="application");var r="mp4";return i.every(function(s){return vr.mp4.test(s);})?r="mp4":i.every(function(s){return vr.webm.test(s);})?r="webm":i.every(function(s){return vr.ogg.test(s);})&&(r="ogg"),n+"/"+r+';codecs="'+e+'"';}},as=function(e,i){return e===void 0&&(e=""),i===void 0&&(i=!1),gr.default.MediaSource&&gr.default.MediaSource.isTypeSupp
13orted&&gr.default.MediaSource.isTypeSupported(_r(e))||i&&gr.default.ManagedMediaSource&&gr.default.ManagedMediaSource.isTypeSupported&&gr.default.ManagedMediaSource.isTypeSupported(_r(e))||!1;},Ql=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(i){i=i.trim();for(var n=0;n<F0.length;n++){var r=F0[n];if(vr["muxer"+r].test(i))return!0;}return!1;});},fh="mp4a.40.2",V0="avc1.4d400d";});var xD,CD,ph,H0=ut(()=>{"use strict";xD=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,CD=/^application\/dash\+xml/i,ph=function(e){return xD.test(e)?"hls":CD.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null;};});var $0,wD,DD,gh,ID,ie,bt,mh,ZB,vh,z0,_h,Jl,G0,Ce,$n=ut(()=>{"use strict";$0=et(Pi()),wD=function(e){return e.toString(2).length;},DD=function(e){return Math.ceil(wD(e)/8);},gh=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer;},ID=function(e){return gh(e);},ie=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!ID(e)&&!(e instanceof ArrayBuffer)&&(typeof e!="number"||typeof e=="number"&&e!==e?e=0:e=[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0));},bt=$0.default.BigInt||Number,mh=[bt("0x1"),bt("0x100"),bt("0x10000"),bt("0x1000000"),bt("0x100000000"),bt("0x10000000000"),bt("0x1000000000000"),bt("0x100000000000000"),bt("0x10000000000000000")],ZB=function(){var t=new Uint16Array([65484]),e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);return e[0]===255?"big":e[0]===204?"little":"unknown";}(),vh=function(e,i){var n=i===void 0?{}:i,r=n.signed,s=r===void 0?!1:r,a=n.le,o=a===void 0?!1:a;e=ie(e);var u=o?"reduce":"reduceRight",c=e[u]?e[u]:Array.prototype[u],p=c.call(e,function(T,y,b){var g=o?b:Math.abs(b+1-e.length);return T+bt(y)*mh[g];},bt(0));if(s){var _=mh[e.length]/bt(2)-bt(1);p=bt(p),p>_&&(p-=_,p-=_,p-=bt(2));}return Number(p);},z0=function(e,i){var n=i===void 0?{}:i,r=n.le,s=r===void 0?!1:r;(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&e!==e)&&(e=0),e=bt(e);for(var a=DD(e),o=new Uint8Array(new ArrayBuffer(a)),u=0;u<a;u++){var c=s?u:Math.abs(u+1-o.length);o[c]=Number(e/mh[u]&bt(255)),e<0&&(o[c]=Math.abs(~o[c]),o[c]-=u===0?1:2);}return o;},_h=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var i=String.fromCharCode.apply(null,ie(e));try{return decodeURIComponent(escape(i));}catch{}return i;},Jl=function(e,i){if(typeof e!="string"&&e&&typeof e.toString=="function"&&(e=e.toString()),typeof e!="string")return new Uint8Array();i||(e=unescape(encodeURIComponent(e)));for(var n=new Uint8Array(e.length),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n;},G0=function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];if(i=i.filter(function(o){return o&&(o.byteLength||o.length)&&typeof o!="string";}),i.length<=1)return ie(i[0]);var r=i.reduce(function(o,u,c){return o+(u.byteLength||u.length);},0),s=new Uint8Array(r),a=0;return i.forEach(function(o){o=ie(o),s.set(o,a),a+=o.byteLength;}),s;},Ce=function(e,i,n){var r=n===void 0?{}:n,s=r.offset,a=s===void 0?0:s,o=r.mask,u=o===void 0?[]:o;e=ie(e),i=ie(i);var c=i.every?i.every:Array.prototype.every;return i.length&&e.length-a>=i.length&&c.call(i,function(p,_){var T=u[_]?u[_]&e[a+_]:e[a+_];return p===T;});};});var W0,Y0=ut(()=>{"use strict";W0=function(e,i,n){i.forEach(function(r){for(var s in e.mediaGroups[r])for(var a in e.mediaGroups[r][s]){var o=e.mediaGroups[r][s][a];n(o,r,s,a);}});};});var wa=q(os=>{"use strict";function kD(t,e,i){if(i===void 0&&(i=Array.prototype),t&&typeof i.find=="function")return i.find.call(t,e);for(var n=0;n<t.length;n++)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];if(e.call(void 0,r,n,t))return r;}}function yh(t,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(t):t;}function PD(t,e){if(t===null||typeof t!="object")throw new TypeError("target is not an object");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t;}var X0=yh({HTML:"text/html",isHTML:function(t){return t===X0.HTML;},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),K0=yh({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(t){return t===K0.HTML;},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});os.assign=PD;os.find=kD;os.freeze=yh;os.MIME_TYPE=X0;os.NAMESPACE=K0;});var Ph=q(bn=>{"use strict";var r_=wa(),$i=r_.find,Da=r_.NAMESPACE;function LD(t){return t!=="";}function RD(t){return t?t.split(/[\t\n\f\r ]+/).filter(LD):[];}function OD(t,e){return t.hasOwnProperty(e)||(t[e]=!0),t;}function Q0(t){if(!t)return[];var e=RD(t);return Object.keys(e.reduce(OD,{}));}function ND(t){return function(e){return t&&t.indexOf(e)!==-1;};}function ka(t,e){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);}function Xt(t,e){var i=t.prototype;if(!(i instanceof e)){let r=function(){};var n=r;r.prototype=e.prototype,r=new r(),ka(i,r),t.prototype=i=r;}i.constructor!=t&&(typeof t!="function"&&console.error("unknown Class:"+t),i.constructor=t);}var Kt={},pi=Kt.ELEMENT_NODE=1,us=Kt.ATTRIBUTE_NODE=2,eu=Kt.TEXT_NODE=3,s_=Kt.CDATA_SECTION_NODE=4,a_=Kt.ENTITY_REFERENCE_NODE=5,jD=Kt.ENTITY_NODE=6,bh=Kt.PROCESSING_INSTRUCTION_NODE=7,Th=Kt.COMMENT_NODE=8,o_=Kt.DOCUMENT_NODE=9,l_=Kt.DOCUMENT_TYPE_NODE=10,vn=Kt.DOCUMENT_FRAGMENT_NODE=11,MD=Kt.NOTATION_NODE=12,St={},ht={},n8=St.INDEX_SIZE_ERR=(ht[1]="Index size error",1),r8=St.DOMSTRING_SIZE_ERR=(ht[2]="DOMString size error",2),Yt=St.HIERARCHY_REQUEST_ERR=(ht[3]="Hierarchy request error",3),s8=St.WRONG_DOCUMENT_ERR=(ht[4]="Wrong document",4),BD=St.INVALID_CHARACTER_ERR=(ht[5]="Invalid character",5),a8=St.NO_DATA_ALLOWED_ER
13R=(ht[6]="No data allowed",6),o8=St.NO_MODIFICATION_ALLOWED_ERR=(ht[7]="No modification allowed",7),u_=St.NOT_FOUND_ERR=(ht[8]="Not found",8),l8=St.NOT_SUPPORTED_ERR=(ht[9]="Not supported",9),J0=St.INUSE_ATTRIBUTE_ERR=(ht[10]="Attribute in use",10),ls=St.INVALID_STATE_ERR=(ht[11]="Invalid state",11),u8=St.SYNTAX_ERR=(ht[12]="Syntax error",12),d8=St.INVALID_MODIFICATION_ERR=(ht[13]="Invalid modification",13),c8=St.NAMESPACE_ERR=(ht[14]="Invalid namespace",14),h8=St.INVALID_ACCESS_ERR=(ht[15]="Invalid access",15);function Le(t,e){if(e instanceof Error)var i=e;else i=this,Error.call(this,ht[t]),this.message=ht[t],Error.captureStackTrace&&Error.captureStackTrace(this,Le);return i.code=t,e&&(this.message=this.message+": "+e),i;}Le.prototype=Error.prototype;ka(St,Le);function _n(){}_n.prototype={length:0,item:function(t){return t>=0&&t<this.length?this[t]:null;},toString:function(t,e,i){for(var n=!!i&&!!i.requireWellFormed,r=[],s=0;s<this.length;s++)kh(this[s],r,t,e,null,n);return r.join("");},filter:function(t){return Array.prototype.filter.call(this,t);},indexOf:function(t){return Array.prototype.indexOf.call(this,t);}};function ds(t,e){this._node=t,this._refresh=e,Sh(this);}function Sh(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!==e){var i=t._refresh(t._node);if(T_(t,"length",i.length),!t.$$length||i.length<t.$$length)for(var n=i.length;(n in t);n++)Object.prototype.hasOwnProperty.call(t,n)&&delete t[n];ka(i,t),t._inc=e;}}ds.prototype.item=function(t){return Sh(this),this[t]||null;};Xt(ds,_n);function tu(){}function d_(t,e){for(var i=t.length;i--;)if(t[i]===e)return i;}function Z0(t,e,i,n){if(n?e[d_(e,n)]=i:e[e.length++]=i,t){i.ownerElement=t;var r=t.ownerDocument;r&&(n&&f_(r,t,n),FD(r,t,i));}}function e_(t,e,i){var n=d_(e,i);if(n>=0){for(var r=e.length-1;n<r;)e[n]=e[++n];if(e.length=r,t){var s=t.ownerDocument;s&&(f_(s,t,i),i.ownerElement=null);}}else throw new Le(u_,new Error(t.tagName+"@"+i));}tu.prototype={length:0,item:_n.prototype.item,getNamedItem:function(t){for(var e=this.length;e--;){var i=this[e];if(i.nodeName==t)return i;}},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!=this._ownerElement)throw new Le(J0);var i=this.getNamedItem(t.nodeName);return Z0(this._ownerElement,this,t,i),i;},setNamedItemNS:function(t){var e=t.ownerElement,i;if(e&&e!=this._ownerElement)throw new Le(J0);return i=this.getNamedItemNS(t.namespaceURI,t.localName),Z0(this._ownerElement,this,t,i),i;},removeNamedItem:function(t){var e=this.getNamedItem(t);return e_(this._ownerElement,this,e),e;},removeNamedItemNS:function(t,e){var i=this.getNamedItemNS(t,e);return e_(this._ownerElement,this,i),i;},getNamedItemNS:function(t,e){for(var i=this.length;i--;){var n=this[i];if(n.localName==e&&n.namespaceURI==t)return n;}return null;}};function c_(){}c_.prototype={hasFeature:function(t,e){return!0;},createDocument:function(t,e,i){var n=new Pa();if(n.implementation=this,n.childNodes=new _n(),n.doctype=i||null,i&&n.appendChild(i),e){var r=n.createElementNS(t,e);n.appendChild(r);}return n;},createDocumentType:function(t,e,i){var n=new su();return n.name=t,n.nodeName=t,n.publicId=e||"",n.systemId=i||"",n;}};function we(){}we.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(t,e){return nu(this,t,e);},replaceChild:function(t,e){nu(this,t,e,m_),e&&this.removeChild(e);},removeChild:function(t){return p_(this,t);},appendChild:function(t){return this.insertBefore(t,null);},hasChildNodes:function(){return this.firstChild!=null;},cloneNode:function(t){return b_(this.ownerDocument||this,this,t);},normalize:function(){ct(this,null,{enter:function(t){for(var e=t.firstChild;e;){var i=e.nextSibling;i!==null&&i.nodeType===eu&&e.nodeType===eu?(t.removeChild(i),e.appendData(i.data)):e=i;}return!0;}});},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e);},hasAttributes:function(){return this.attributes.length>0;},lookupPrefix:function(t){for(var e=this;e;){var i=e._nsMap;if(i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&i[n]===t)return n;}e=e.nodeType==us?e.ownerDocument:e.parentNode;}return null;},lookupNamespaceURI:function(t){for(var e=this;e;){var i=e._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,t))return i[t];e=e.nodeType==us?e.ownerDocument:e.parentNode;}return null;},isDefaultNamespace:function(t){var e=this.lookupPrefix(t);return e==null;}};function h_(t){return t=="<"&&"&lt;"||t==">"&&"&gt;"||t=="&"&&"&amp;"||t=='"'&&"&quot;"||"&#"+t.charCodeAt()+";";}ka(Kt,we);ka(Kt,we.prototype);function iu(t,e){return ct(t,null,{enter:function(i){return e(i)?ct.STOP:!0;}})===ct.STOP;}function ct(t,e,i){for(var n=[{node:t,context:e,phase:ct.ENTER}];n.length>0;){var r=n.pop();if(r.phase===ct.ENTER){var s=i.enter(r.node,r.context);if(s===ct.STOP)return ct.STOP;if(n.push({node:r.node,context:s,phase:ct.EXIT}),s==null)continue;for(var a=r.node.lastChild;a;)n.push({node:a,context:s,phase:ct.ENTER}),a=a.previousSibling;}else i.exit&&i.exit(r.node,r.context);}}ct.STOP=Symbol("walkDOM.STOP");ct.ENTER=0;ct.EXIT=1;function Pa(){this.ownerDocument=this;}function FD(t,e,i){t&&t._inc++;var n=i.namespaceURI;n===Da.XMLNS&&(e._nsMap[i.prefix?i.localName:""]=i.value);}function f_(t,e,i,n){t&&t._inc++;var r=i.namespaceURI;r===Da.XMLNS&&delete e._nsMap[i.prefix?i.localName:""];}function Ah(t,e,i){if(t&&t._inc){t._inc++;var n=e.childNodes;if(i)n[n.length++]=i;else{for(var r=e.firstChild,s=0;r;)n[s++]=r,r=r.nextSibling;n.length=s,delete n[n.length];}}}function p_(t,e){var i=e.previousSibling,n=e.nextSibling;return i?i.nextSibling=n:t.firstChild=n,n?n.previousSibling=i:t.lastChild=i,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,Ah(t.ownerDocument,t),e;}function UD(t){return t&&(t.nodeType===we.DOCUMENT_NODE||t.nodeType===we.DOCUMENT_FRAGMENT_NODE||t.nodeType===we.ELEMENT_NODE);}function VD(t){return t&&(zi(t)||Eh(t)||yn(t)||t.nodeType===we.DOCUMENT_FRAGMENT_NODE||t.nodeType===we.COMMENT_NODE||t.nodeType===we.PROCESSING_INSTRUCTION_NODE);}function yn(t){return t&&t.nodeType===we.DOCUMENT_TYPE_NODE;}function zi(t){return t&&t.nodeType===we.ELEMENT_NODE;}function Eh(t){return t&&t.nodeType===we.TEXT_NODE;}function t_(t,e){var i=t.childNodes||[];if($i(i,zi)||yn(e))return!1;var n=$i(i,yn);return!(e&&n&&i.indexOf(n)>i.indexOf(e));}function i_(t,e){var i=t.childNodes||[];function n(s){return zi(s)&&s!==e;}if($i(i,n))return!1;var r=$i(i,yn);return!(e&&r&&i.indexOf(r)>i.indexOf(e));}
13function qD(t,e,i){if(!UD(t))throw new Le(Yt,"Unexpected parent node type "+t.nodeType);if(i&&i.parentNode!==t)throw new Le(u_,"child not in parent");if(!VD(e)||yn(e)&&t.nodeType!==we.DOCUMENT_NODE)throw new Le(Yt,"Unexpected node type "+e.nodeType+" for parent node type "+t.nodeType);}function HD(t,e,i){var n=t.childNodes||[],r=e.childNodes||[];if(e.nodeType===we.DOCUMENT_FRAGMENT_NODE){var s=r.filter(zi);if(s.length>1||$i(r,Eh))throw new Le(Yt,"More than one element or text in fragment");if(s.length===1&&!t_(t,i))throw new Le(Yt,"Element in fragment can not be inserted before doctype");}if(zi(e)&&!t_(t,i))throw new Le(Yt,"Only one element can be added and only after doctype");if(yn(e)){if($i(n,yn))throw new Le(Yt,"Only one doctype is allowed");var a=$i(n,zi);if(i&&n.indexOf(a)<n.indexOf(i))throw new Le(Yt,"Doctype can only be inserted before an element");if(!i&&a)throw new Le(Yt,"Doctype can not be appended since element is present");}}function m_(t,e,i){var n=t.childNodes||[],r=e.childNodes||[];if(e.nodeType===we.DOCUMENT_FRAGMENT_NODE){var s=r.filter(zi);if(s.length>1||$i(r,Eh))throw new Le(Yt,"More than one element or text in fragment");if(s.length===1&&!i_(t,i))throw new Le(Yt,"Element in fragment can not be inserted before doctype");}if(zi(e)&&!i_(t,i))throw new Le(Yt,"Only one element can be added and only after doctype");if(yn(e)){let u=function(c){return yn(c)&&c!==i;};var o=u;if($i(n,u))throw new Le(Yt,"Only one doctype is allowed");var a=$i(n,zi);if(i&&n.indexOf(a)<n.indexOf(i))throw new Le(Yt,"Doctype can only be inserted before an element");}}function nu(t,e,i,n){qD(t,e,i),t.nodeType===we.DOCUMENT_NODE&&(n||HD)(t,e,i);var r=e.parentNode;if(r&&r.removeChild(e),e.nodeType===vn){var s=e.firstChild;if(s==null)return e;var a=e.lastChild;}else s=a=e;var o=i?i.previousSibling:t.lastChild;s.previousSibling=o,a.nextSibling=i,o?o.nextSibling=s:t.firstChild=s,i==null?t.lastChild=a:i.previousSibling=a;do{s.parentNode=t;var u=t.ownerDocument||t;Ia(s,u);}while(s!==a&&(s=s.nextSibling));return Ah(t.ownerDocument||t,t),e.nodeType==vn&&(e.firstChild=e.lastChild=null),e;}function Ia(t,e){if(t.ownerDocument!==e){if(t.ownerDocument=e,t.nodeType===pi&&t.attributes)for(var i=0;i<t.attributes.length;i++){var n=t.attributes.item(i);n&&(n.ownerDocument=e);}for(var r=t.firstChild;r;)Ia(r,e),r=r.nextSibling;}}function $D(t,e){e.parentNode&&e.parentNode.removeChild(e),e.parentNode=t,e.previousSibling=t.lastChild,e.nextSibling=null,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,t.lastChild=e,Ah(t.ownerDocument,t,e);var i=t.ownerDocument||t;return Ia(e,i),e;}Pa.prototype={nodeName:"#document",nodeType:o_,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==vn){for(var i=t.firstChild;i;){var n=i.nextSibling;this.insertBefore(i,e),i=n;}return t;}return nu(this,t,e),Ia(t,this),this.documentElement===null&&t.nodeType===pi&&(this.documentElement=t),t;},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),p_(this,t);},replaceChild:function(t,e){nu(this,t,e,m_),Ia(t,this),e&&this.removeChild(e),zi(t)&&(this.documentElement=t);},importNode:function(t,e){return zD(this,t,e);},getElementById:function(t){var e=null;return iu(this.documentElement,function(i){if(i.nodeType==pi&&i.getAttribute("id")==t)return e=i,!0;}),e;},getElementsByClassName:function(t){var e=Q0(t);return new ds(this,function(i){var n=[];return e.length>0&&iu(i.documentElement,function(r){if(r!==i&&r.nodeType===pi){var s=r.getAttribute("class");if(s){var a=t===s;if(!a){var o=Q0(s);a=e.every(ND(o));}a&&n.push(r);}}}),n;});},createElement:function(t){var e=new yr();e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new _n();var i=e.attributes=new tu();return i._ownerElement=e,e;},createDocumentFragment:function(){var t=new au();return t.ownerDocument=this,t.childNodes=new _n(),t;},createTextNode:function(t){var e=new xh();return e.ownerDocument=this,e.appendData(t),e;},createComment:function(t){var e=new Ch();return e.ownerDocument=this,e.appendData(t),e;},createCDATASection:function(t){if(t.indexOf("]]>")!==-1)throw new Le(BD,'data contains "]]>"');var e=new wh();return e.ownerDocument=this,e.appendData(t),e;},createProcessingInstruction:function(t,e){var i=new Ih();return i.ownerDocument=this,i.tagName=i.nodeName=i.target=t,i.nodeValue=i.data=e,i;},createAttribute:function(t){var e=new ru();return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.
13specified=!0,e;},createEntityReference:function(t){var e=new Dh();return e.ownerDocument=this,e.nodeName=t,e;},createElementNS:function(t,e){var i=new yr(),n=e.split(":"),r=i.attributes=new tu();return i.childNodes=new _n(),i.ownerDocument=this,i.nodeName=e,i.tagName=e,i.namespaceURI=t,n.length==2?(i.prefix=n[0],i.localName=n[1]):i.localName=e,r._ownerElement=i,i;},createAttributeNS:function(t,e){var i=new ru(),n=e.split(":");return i.ownerDocument=this,i.nodeName=e,i.name=e,i.namespaceURI=t,i.specified=!0,n.length==2?(i.prefix=n[0],i.localName=n[1]):i.localName=e,i;}};Xt(Pa,we);function yr(){this._nsMap={};}yr.prototype={nodeType:pi,hasAttribute:function(t){return this.getAttributeNode(t)!=null;},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||"";},getAttributeNode:function(t){return this.attributes.getNamedItem(t);},setAttribute:function(t,e){var i=this.ownerDocument.createAttribute(t);i.value=i.nodeValue=""+e,this.setAttributeNode(i);},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e);},appendChild:function(t){return t.nodeType===vn?this.insertBefore(t,null):$D(this,t);},setAttributeNode:function(t){return this.attributes.setNamedItem(t);},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t);},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName);},removeAttributeNS:function(t,e){var i=this.getAttributeNodeNS(t,e);i&&this.removeAttributeNode(i);},hasAttributeNS:function(t,e){return this.getAttributeNodeNS(t,e)!=null;},getAttributeNS:function(t,e){var i=this.getAttributeNodeNS(t,e);return i&&i.value||"";},setAttributeNS:function(t,e,i){var n=this.ownerDocument.createAttributeNS(t,e);n.value=n.nodeValue=""+i,this.setAttributeNode(n);},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e);},getElementsByTagName:function(t){return new ds(this,function(e){var i=[];return iu(e,function(n){n!==e&&n.nodeType==pi&&(t==="*"||n.tagName==t)&&i.push(n);}),i;});},getElementsByTagNameNS:function(t,e){return new ds(this,function(i){var n=[];return iu(i,function(r){r!==i&&r.nodeType===pi&&(t==="*"||r.namespaceURI===t)&&(e==="*"||r.localName==e)&&n.push(r);}),n;});}};Pa.prototype.getElementsByTagName=yr.prototype.getElementsByTagName;Pa.prototype.getElementsByTagNameNS=yr.prototype.getElementsByTagNameNS;Xt(yr,we);function ru(){}ru.prototype.nodeType=us;Xt(ru,we);function La(){}La.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e);},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length;},insertData:function(t,e){this.replaceData(t,0,e);},appendChild:function(t){throw new Error(ht[Yt]);},deleteData:function(t,e){this.replaceData(t,e,"");},replaceData:function(t,e,i){var n=this.data.substring(0,t),r=this.data.substring(t+e);i=n+i+r,this.nodeValue=this.data=i,this.length=i.length;}};Xt(La,we);function xh(){}xh.prototype={nodeName:"#text",nodeType:eu,splitText:function(t){var e=this.data,i=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n;}};Xt(xh,La);function Ch(){}Ch.prototype={nodeName:"#comment",nodeType:Th};Xt(Ch,La);function wh(){}wh.prototype={nodeName:"#cdata-section",nodeType:s_};Xt(wh,La);function su(){}su.prototype.nodeType=l_;Xt(su,we);function g_(){}g_.prototype.nodeType=MD;Xt(g_,we);function v_(){}v_.prototype.nodeType=jD;Xt(v_,we);function Dh(){}Dh.prototype.nodeType=a_;Xt(Dh,we);function au(){}au.prototype.nodeName="#document-fragment";au.prototype.nodeType=vn;Xt(au,we);function Ih(){}Ih.prototype.nodeType=bh;Xt(Ih,we);function __(){}__.prototype.serializeToString=function(t,e,i,n){return y_.call(t,e,i,n);};we.prototype.toString=y_;function y_(t,e,i){var n=!!i&&!!i.requireWellFormed,r=[],s=this.nodeType==9&&this.documentElement||this,a=s.prefix,o=s.namespaceURI;if(o&&a==null){var a=s.lookupPrefix(o);if(a==null)var u=[{namespace:o,prefix:null}];}return kh(this,r,t,e,u,n),r.join("");}function n_(t,e,i){var n=t.prefix||"",r=t.namespaceURI;if(!r||n==="xml"&&r===Da.XML||r===Da.XMLNS)return!1;for(var s=i.length;s--;){var a=i[s];if(a.prefix===n)return a.namespace!==r;}return!0;}function Zl(t,e,i){t.push(" ",e,'="',i.replace(/[<>&"\t\n\r]/g,h_),'"');}function kh(t,e,i,n,r,s){r||(r=[]),ct(t,{ns:r,isHTML:i}
13,{enter:function(a,o){var u=o.ns,c=o.isHTML;if(n)if(a=n(a),a){if(typeof a=="string")return e.push(a),null;}else return null;switch(a.nodeType){case pi:var p=a.attributes,_=p.length,T=a.tagName;c=Da.isHTML(a.namespaceURI)||c;var y=T;if(!c&&!a.prefix&&a.namespaceURI){for(var b,g=0;g<p.length;g++)if(p.item(g).name==="xmlns"){b=p.item(g).value;break;}if(!b)for(var E=u.length-1;E>=0;E--){var S=u[E];if(S.prefix===""&&S.namespace===a.namespaceURI){b=S.namespace;break;}}if(b!==a.namespaceURI)for(var E=u.length-1;E>=0;E--){var S=u[E];if(S.namespace===a.namespaceURI){S.prefix&&(y=S.prefix+":"+T);break;}}}e.push("<",y);for(var P=u.slice(),D=0;D<_;D++){var A=p.item(D);A.prefix=="xmlns"?P.push({prefix:A.localName,namespace:A.value}):A.nodeName=="xmlns"&&P.push({prefix:"",namespace:A.value});}for(var D=0;D<_;D++){var A=p.item(D);if(n_(A,c,P)){var C=A.prefix||"",R=A.namespaceURI;Zl(e,C?"xmlns:"+C:"xmlns",R),P.push({prefix:C,namespace:R});}var I=n?n(A):A;I&&(typeof I=="string"?e.push(I):Zl(e,I.name,I.value));}if(T===y&&n_(a,c,P)){var M=a.prefix||"",R=a.namespaceURI;Zl(e,M?"xmlns:"+M:"xmlns",R),P.push({prefix:M,namespace:R});}var F=a.firstChild;if(F||c&&!/^(?:meta|link|img|br|hr|input)$/i.test(T)){if(e.push(">"),c&&/^script$/i.test(T)){for(;F;)F.data?e.push(F.data):kh(F,e,c,n,P.slice(),s),F=F.nextSibling;return e.push("</",T,">"),null;}return{ns:P,isHTML:c,tag:y};}else return e.push("/>"),null;case o_:case vn:return{ns:u.slice(),isHTML:c,tag:null};case us:return Zl(e,a.name,a.value),null;case eu:return e.push(a.data.replace(/[<&>]/g,h_)),null;case s_:if(s&&a.data.indexOf("]]>")!==-1)throw new Le(ls,'The CDATASection data contains "]]>"');return e.push("<![CDATA[",a.data.replace(/]]>/g,"]]]]><![CDATA[>"),"]]>"),null;case Th:if(s&&a.data.indexOf("-->")!==-1)throw new Le(ls,'The comment node data contains "-->"');return e.push("<!--",a.data,"-->"),null;case l_:if(s){if(a.publicId&&!/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(a.publicId))throw new Le(ls,"DocumentType publicId is not a valid PubidLiteral");if(a.systemId&&!/^("[^"]*"|'[^']*')$/.test(a.systemId))throw new Le(ls,"DocumentType systemId is not a valid SystemLiteral");if(a.internalSubset&&a.internalSubset.indexOf("]>")!==-1)throw new Le(ls,'DocumentType internalSubset contains "]>"');}var U=a.publicId,k=a.systemId;if(e.push("<!DOCTYPE ",a.name),U)e.push(" PUBLIC ",U),k&&k!="."&&e.push(" ",k),e.push(">");else if(k&&k!=".")e.push(" SYSTEM ",k,">");else{var G=a.internalSubset;G&&e.push(" [",G,"]"),e.push(">");}return null;case bh:if(s&&a.data.indexOf("?>")!==-1)throw new Le(ls,'The ProcessingInstruction data contains "?>"');return e.push("<?",a.target," ",a.data,"?>"),null;case a_:return e.push("&",a.nodeName,";"),null;default:return e.push("??",a.nodeName),null;}},exit:function(a,o){o&&o.tag&&e.push("</",o.tag,">");}});}function zD(t,e,i){var n;return ct(e,null,{enter:function(r,s){var a=r.cloneNode(!1);a.ownerDocument=t,a.parentNode=null,s===null?n=a:s.appendChild(a);var o=r.nodeType===us||i;return o?a:null;}}),n;}function b_(t,e,i){var n;return ct(e,null,{enter:function(r,s){var a=new r.constructor();for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o)){var u=r[o];typeof u!="object"&&u!=a[o]&&(a[o]=u);}r.childNodes&&(a.childNodes=new _n()),a.ownerDocument=t;var c=i;switch(a.nodeType){case pi:var p=r.attributes,_=a.attributes=new tu(),T=p.length;_._ownerElement=a;for(var y=0;y<T;y++)a.setAttributeNode(b_(t,p.item(y),!0));break;case us:c=!0;}return s!==null?s.appendChild(a):n=a,c?a:null;}}),n;}function T_(t,e,i){t[e]=i;}try{Object.defineProperty&&(Object.defineProperty(ds.prototype,"length",{get:function(){return Sh(this),this.$$length;}}),Object.defineProperty(we.prototype,"textContent",{get:function(){if(this.nodeType===pi||this.nodeType===vn){var t=[];return ct(this,null,{enter:function(e){if(e.nodeType===pi||e.nodeType===vn)return!0;if(e.nodeType===bh||e.nodeType===Th)return null;t.push(e.nodeValue);}}),t.join("");}return this.nodeValue;},set:function(t){switch(this.nodeType){case pi:case vn:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t;}}}
13),T_=function(t,e,i){t["$$"+e]=i;});}catch{}bn.DocumentType=su;bn.DOMException=Le;bn.DOMImplementation=c_;bn.Element=yr;bn.Node=we;bn.NodeList=_n;bn.walkDOM=ct;bn.XMLSerializer=__;});var A_=q(Ra=>{"use strict";var S_=wa().freeze;Ra.XML_ENTITIES=S_({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});Ra.HTML_ENTITIES=S_
vendor: 35,739 bytes, lines 13-14
13({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
14`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:"	",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"})
14;Ra.entityMap=Ra.HTML_ENTITIES;});var P_=q(Rh=>{"use strict";var Ma=wa().NAMESPACE,Lh=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,E_=new RegExp("[\\-\\.0-9"+Lh.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),x_=new RegExp("^"+Lh.source+E_.source+"*(?::"+Lh.source+E_.source+"*)?$"),Oa=0,zn=1,cs=2,Na=3,hs=4,fs=5,ja=6,ou=7;function ps(t,e){this.message=t,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,ps);}ps.prototype=new Error();ps.prototype.name=ps.name;function D_(){}D_.prototype={parse:function(t,e,i){var n=this.domBuilder;n.startDocument(),I_(e,e={}),GD(t,e,i,n,this.errorHandler),n.endDocument();}};function GD(t,e,i,n,r){function s(oe){if(oe>65535){oe-=65536;var pe=55296+(oe>>10),be=56320+(oe&1023);return String.fromCharCode(pe,be);}else return String.fromCharCode(oe);}function a(oe){var pe=oe.slice(1,-1);return Object.hasOwnProperty.call(i,pe)?i[pe]:pe.charAt(0)==="#"?s(parseInt(pe.substr(1).replace("x","0x"))):(r.error("entity not found:"+oe),oe);}function o(oe){if(oe>g){var pe=t.substring(g,oe).replace(/&#?\w+;/g,a);T&&u(g),n.characters(pe,0,oe-g),g=oe;}}function u(oe,pe){for(;oe>=p&&(pe=_.exec(t));)c=pe.index,p=c+pe[0].length,T.lineNumber++;T.columnNumber=oe-c+1;}for(var c=0,p=0,_=/.*(?:\r\n?|\n)|.*$/g,T=n.locator,y=[{currentNSMap:e}],b={},g=0;;){try{var E=t.indexOf("<",g);if(E<0){if(!t.substr(g).match(/^\s*$/)){var S=n.doc,P=S.createTextNode(t.substr(g));S.appendChild(P),n.currentElement=P;}return;}switch(E>g&&o(E),t.charAt(E+1)){case"/":var k=t.indexOf(">",E+3),D=t.substring(E+2,k).replace(/[ \t\n\r]+$/g,""),A=y.pop();k<0?(D=t.substring(E+2).replace(/[\s<].*/,""),r.error("end tag name: "+D+" is not complete:"+A.tagName),k=E+1+D.length):D.match(/\s</)&&(D=D.replace(/[\s<].*/,""),r.error("end tag name: "+D+" maybe not complete"),k=E+1+D.length);var C=A.localNSMap,R=A.tagName==D,I=R||A.tagName&&A.tagName.toLowerCase()==D.toLowerCase();if(I){if(n.endElement(A.uri,A.localName,D),C)for(var M in C)Object.prototype.hasOwnProperty.call(C,M)&&n.endPrefixMapping(M);R||r.fatalError("end tag name: "+D+" is not match the current start tagName:"+A.tagName);}else y.push(A);k++;break;case"?":T&&u(E),k=QD(t,E,n);break;case"!":T&&u(E),k=KD(t,E,n,r);break;default:T&&u(E);var F=new k_(),U=y[y.length-1].currentNSMap,k=WD(t,E,F,U,a,r),G=F.length;if(!F.closed&&XD(t,k,F.tagName,b)&&(F.closed=!0,i.nbsp||r.warning("unclosed xml attribute")),T&&G){for(var V=C_(T,{}),Y=0;Y<G;Y++){var ae=F[Y];u(ae.offset),ae.locator=C_(T,{});}n.locator=V,w_(F,n,U)&&y.push(F),n.locator=T;}else w_(F,n,U)&&y.push(F);Ma.isHTML(F.uri)&&!F.closed?k=YD(t,k,F.tagName,a,n):k++;}}catch(oe){if(oe instanceof ps)throw oe;r.error("element parse error: "+oe),k=-1;}k>g?g=k:o(Math.max(E,g)+1);}}function C_(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e;}function WD(t,e,i,n,r,s){function a(y,b,g){i.attributeNames.hasOwnProperty(y)&&s.fatalError("Attribute "+y+" redefined"),i.addValue(y,b.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,r),g);}for(var o,u,c=++e,p=Oa;;){var _=t.charAt(c);switch(_){case"=":if(p===zn)o=t.slice(e,c),p=Na;else if(p===cs)p=Na;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(p===Na||p===zn){if(p===zn&&(s.warning('attribute value must after "="'),o=t.slice(e,c)),e=c+1,c=t.indexOf(_,e),c>0)u=t.slice(e,c),a(o,u,e-1),p=fs;else throw new Error("attribute value no end '"+_+"' match");}else if(p==hs)u=t.slice(e,c),a(o,u,e),s.warning('attribute "'+o+'" missed start quot('+_+")!!"),e=c+1,p=fs;else throw new Error('attribute value must after "="');break;case"/":switch(p){case Oa:i.setTagName(t.slice(e,c));case fs:case ja:case ou:p=ou,i.closed=!0;case hs:case zn:break;case cs:i.closed=!0;break;default:throw new Error("attribute invalid close char('/')");}break;case"":return s.error("unexpected end of input"),p==Oa&&i.setTagName(t.slice(e,c)),c;case">":switch(p){case Oa:i.setTagName(t.slice(e,c));case fs:case ja:case ou:break;case hs:case zn:u=t.slice(e,c),u.slice(-1)==="/"&&(i.closed=!0,u=u.slice(0,-1));case cs:p===cs&&(u=o),p==hs?(s.warning('attribute "'+u+'" missed quot(")!'),a(o,u,e)):((!Ma.isHTML(n[""])||!u.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+u+'" missed value!! "'+u+'" instead!!'),a(u,u,e));break;case Na:throw new Error("attribute value missed!!");}return c;case"\x80":_=" ";default:if(_<=" ")switch(p){case Oa:i.setTagName(t.slice(e,c)),p=ja;break;case zn:o=t.slice(e,c),p=cs;break;case hs:var u=t.slice(e,c);s.warning('attribute "'+u+'" missed quot(")!!'),a(o,u,e);case fs:p=ja;break;}else switch(p){case cs:var T=i.tagName;(!Ma.isHTML(n[""])||!o.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),a(o,o,e),e=c,p=zn;break;case fs:s.warning('attribute space is required"'+o+'"!!');case ja:p=zn,e=c;break;case Na:p=hs,e=c;break;case ou:throw new Error("elements closed character '/' and '>' must be connected to");}}c++;}}function w_(t,e,i){for(var n=t.tagName,r=null,_=t.length;_--;){var s=t[_],a=s.qName,o=s.value,T=a.indexOf(":");if(T>0)var u=s.prefix=a.slice(0,T),c=a.slice(T+1),p=u==="xmlns"&&c;else c=a,u=null,p=a==="xmlns"&&"";s.localName=c,p!==!1&&(r==null&&(r={},I_(i,i={})),i[p]=r[p]=o,s.uri=Ma.XMLNS,e.startPrefixMapping(p,o));}for(var _=t.length;_--;){s=t[_];var u=s.prefix;u&&(u==="xml"&&(s.uri=Ma.XML),u!=="xmlns"&&(s.uri=i[u||""]));}var T=n.indexOf(":");T>0?(u=t.prefix=n.slice(0,T),c=t.localName=n.slice(T+1)):(u=null,c=t.localName=n);var y=t.uri=i[u||""];if(e.startElement(y,c,n,t),t.closed){if(e.endElement(y,c,n),r)for(u in r)Object.prototype.hasOwnProperty.call(r,u)&&e.endPrefixMapping(u);}else return t.currentNSMap=i,t.localNSMap=r,!0;}
14function YD(t,e,i,n,r){if(/^(?:script|textarea)$/i.test(i)){var s=t.indexOf("</"+i+">",e),a=t.substring(e+1,s);if(/[&<]/.test(a))return /^script$/i.test(i)?(r.characters(a,0,a.length),s):(a=a.replace(/&#?\w+;/g,n),r.characters(a,0,a.length),s);}return e+1;}function XD(t,e,i,n){var r=n[i];return r==null&&(r=t.lastIndexOf("</"+i+">"),r<e&&(r=t.lastIndexOf("</"+i)),n[i]=r),r<e;}function I_(t,e){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);}function KD(t,e,i,n){var r=t.charAt(e+2);switch(r){case"-":if(t.charAt(e+3)==="-"){var s=t.indexOf("-->",e+4);return s>e?(i.comment(t,e+4,s-e-4),s+3):(n.error("Unclosed comment"),-1);}else return-1;default:if(t.substr(e+3,6)=="CDATA["){var s=t.indexOf("]]>",e+9);return i.startCDATA(),i.characters(t,e+9,s-e-9),i.endCDATA(),s+3;}var a=JD(t,e),o=a.length;if(o>1&&/!doctype/i.test(a[0][0])){var u=a[1][0],c=!1,p=!1;o>3&&(/^public$/i.test(a[2][0])?(c=a[3][0],p=o>4&&a[4][0]):/^system$/i.test(a[2][0])&&(p=a[3][0]));var _=a[o-1];return i.startDTD(u,c,p),i.endDTD(),_.index+_[0].length;}}return-1;}function QD(t,e,i){var n=t.indexOf("?>",e);if(n){var r=t.substring(e,n).match(/^<\?(\S*)\s*([\s\S]*?)$/);if(r){var s=r[0].length;return i.processingInstruction(r[1],r[2]),n+2;}else return-1;}return-1;}function k_(){this.attributeNames={};}k_.prototype={setTagName:function(t){if(!x_.test(t))throw new Error("invalid tagName:"+t);this.tagName=t;},addValue:function(t,e,i){if(!x_.test(t))throw new Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:e,offset:i};},length:0,getLocalName:function(t){return this[t].localName;},getLocator:function(t){return this[t].locator;},getQName:function(t){return this[t].qName;},getURI:function(t){return this[t].uri;},getValue:function(t){return this[t].value;}};function JD(t,e){var i,n=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(r.lastIndex=e,r.exec(t);i=r.exec(t);)if(n.push(i),i[1])return n;}Rh.XMLReader=D_;Rh.ParseError=ps;});var B_=q(uu=>{"use strict";var ZD=wa(),eI=Ph(),L_=A_(),N_=P_(),tI=eI.DOMImplementation,R_=ZD.NAMESPACE,iI=N_.ParseError,nI=N_.XMLReader;function j_(t){return t.replace(/\r[\n\u0085]/g,`
15`).replace(/[\r\u0085\u2028]/g,`
16`);}function M_(t){this.options=t||{locator:{}};}M_.prototype.parseFromString=function(t,e){var i=this.options,n=new nI(),r=i.domBuilder||new Ba(),s=i.errorHandler,a=i.locator,o=i.xmlns||{},u=/\/x?html?$/.test(e),c=u?L_.HTML_ENTITIES:L_.XML_ENTITIES;a&&r.setDocumentLocator(a),n.errorHandler=rI(s,r,a),n.domBuilder=i.domBuilder||r,u&&(o[""]=R_.HTML),o.xml=o.xml||R_.XML;var p=i.normalizeLineEndings||j_;return t&&typeof t=="string"?n.parse(p(t),o,c):n.errorHandler.error("invalid doc source"),r.doc;};function rI(t,e,i){if(!t){if(e instanceof Ba)return e;t=e;}var n={},r=t instanceof Function;i=i||{};function s(a){var o=t[a];!o&&r&&(o=t.length==2?function(u){t(a,u);}:t),n[a]=o&&function(u){o("[xmldom "+a+"]	"+u+Oh(i));}||function(){};}return s("warning"),s("error"),s("fatalError"),n;}function Ba(){this.cdata=!1;}function ms(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber;}Ba.prototype={startDocument:function(){this.doc=new tI().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId);},startElement:function(t,e,i,n){var r=this.doc,s=r.createElementNS(t,i||e),a=n.length;lu(this,s),this.currentElement=s,this.locator&&ms(this.locator,s);for(var o=0;o<a;o++){var t=n.getURI(o),u=n.getValue(o),i=n.getQName(o),c=r.createAttributeNS(t,i);this.locator&&ms(n.getLocator(o),c),c.value=c.nodeValue=u,s.setAttributeNode(c);}},endElement:function(t,e,i){var n=this.currentElement,r=n.tagName;this.currentElement=n.parentNode;},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var i=this.doc.createProcessingInstruction(t,e);this.locator&&ms(this.locator,i),lu(this,i);},ignorableWhitespace:function(t,e,i){},characters:function(t,e,i){if(t=O_.apply(this,arguments),t){if(this.cdata)var n=this.doc.createCDATASection(t);else var n=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(t)&&this.doc.appendChild(n),this.locator&&ms(this.locator,n);}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize();},setDocumentLocator:function(t){(this.locator=t)&&(t.lineNumber=0);}
16,comment:function(t,e,i){t=O_.apply(this,arguments);var n=this.doc.createComment(t);this.locator&&ms(this.locator,n),lu(this,n);},startCDATA:function(){this.cdata=!0;},endCDATA:function(){this.cdata=!1;},startDTD:function(t,e,i){var n=this.doc.implementation;if(n&&n.createDocumentType){var r=n.createDocumentType(t,e,i);this.locator&&ms(this.locator,r),lu(this,r),this.doc.doctype=r;}},warning:function(t){console.warn("[xmldom warning]	"+t,Oh(this.locator));},error:function(t){console.error("[xmldom error]	"+t,Oh(this.locator));},fatalError:function(t){throw new iI(t,this.locator);}};function Oh(t){if(t)return`
17@`+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]";}function O_(t,e,i){return typeof t=="string"?t.substr(e,i):t.length>=e+i||e?new java.lang.String(t,e,i)+"":t;}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(t){Ba.prototype[t]=function(){return null;};});function lu(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e);}uu.__DOMHandler=Ba;uu.normalizeLineEndings=j_;uu.DOMParser=M_;});var U_=q(du=>{"use strict";var F_=Ph();du.DOMImplementation=F_.DOMImplementation;du.XMLSerializer=F_.XMLSerializer;du.DOMParser=B_().DOMParser;});var Lt,Y_,V_,ft,X_,sI,vs,K_,aI,oI,_s,Fa,lI,q_,uI,dI,jh,Q_,cu,cI,hI,J_,fI,H_,$_,pI,mI,Ua,Nh,Mh,gI,vI,_I,yI,bI,TI,SI,AI,EI,xI,CI,z_,wI,DI,Z_,II,kI,G_,PI,LI,RI,OI,NI,jI,We,Va,MI,gs,BI,W_,ot,FI,hu,Bh,UI,VI,qI,HI,$I,zI,GI,WI,YI,ey,XI,ty,iy,ny=ut(()=>{"use strict";rh();Lt=et(Pi());Y0();ah();Y_=et(U_());V_=t=>!!t&&typeof t=="object",ft=(...t)=>t.reduce((e,i)=>
17(typeof i!="object"||Object.keys(i).forEach(n=>{Array.isArray(e[n])&&Array.isArray(i[n])?e[n]=e[n].concat(i[n]):V_(e[n])&&V_(i[n])?e[n]=ft(e[n],i[n]):e[n]=i[n];}),e),{}),X_=t=>Object.keys(t).map(e=>t[e]),sI=(t,e)=>{let i=[];for(let n=t;n<e;n++)i.push(n);return i;},vs=t=>t.reduce((e,i)=>e.concat(i),[]),K_=t=>{if(!t.length)return[];let e=[];for(let i=0;i<t.length;i++)e.push(t[i]);return e;},aI=(t,e)=>t.reduce((i,n,r)=>(n[e]&&i.push(r),i),[]),oI=(t,e)=>X_(t.reduce((i,n)=>(n.forEach(r=>{i[e(r)]=r;}),i),{})),_s={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",INVALID_NUMBER_OF_CONTENT_STEERING:"INVALID_NUMBER_OF_CONTENT_STEERING",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"},Fa=({baseUrl:t="",source:e="",range:i="",indexRange:n=""})=>{let r={uri:e,resolvedUri:ss(t||"",e)};if(i||n){let a=(i||n).split("-"),o=Lt.default.BigInt?Lt.default.BigInt(a[0]):parseInt(a[0],10),u=Lt.default.BigInt?Lt.default.BigInt(a[1]):parseInt(a[1],10);o<Number.MAX_SAFE_INTEGER&&typeof o=="bigint"&&(o=Number(o)),u<Number.MAX_SAFE_INTEGER&&typeof u=="bigint"&&(u=Number(u));let c;typeof u=="bigint"||typeof o=="bigint"?c=Lt.default.BigInt(u)-Lt.default.BigInt(o)+Lt.default.BigInt(1):c=u-o+1,typeof c=="bigint"&&c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),r.byterange={length:c,offset:o};}return r;},lI=t=>{let e;return typeof t.offset=="bigint"||typeof t.length=="bigint"?e=Lt.default.BigInt(t.offset)+Lt.default.BigInt(t.length)-Lt.default.BigInt(1):e=t.offset+t.length-1,`${t.offset}-${e}`;},q_=t=>(t&&typeof t!="number"&&(t=parseInt(t,10)),isNaN(t)?null:t),uI={static(t){let{duration:e,timescale:i=1,sourceDuration:n,periodDuration:r}=t,s=q_(t.endNumber),a=e/i;return typeof s=="number"?{start:0,end:s}:typeof r=="number"?{start:0,end:r/a}:{start:0,end:n/a};},dynamic(t){let{NOW:e,clientOffset:i,availabilityStartTime:n,timescale:r=1,duration:s,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:u=1/0}=t,c=q_(t.endNumber),p=(e+i)/1e3,_=n+a,y=p+o-_,b=Math.ceil(y*r/s),g=Math.floor((p-_-u)*r/s),E=Math.floor((p-_)*r/s);return{start:Math.max(0,g),end:typeof c=="number"?c:Math.min(b,E)};}},dI=t=>e=>{let{duration:i,timescale:n=1,periodStart:r,startNumber:s=1}=t;return{number:s+e,duration:i/n,timeline:r,time:e*i};},jh=t=>{let{type:e,duration:i,timescale:n=1,periodDuration:r,sourceDuration:s}=t,{start:a,end:o}=uI[e](t),u=sI(a,o).map(dI(t));if(e==="static"){let c=u.length-1,p=typeof r=="number"?r:s;u[c].duration=p-i/n*c;}return u;},Q_=t=>{let{baseUrl:e,initialization:i={},sourceDuration:n,indexRange:r="",periodStart:s,presentationTime:a,number:o=0,duration:u}=t;if(!e)throw new Error(_s.NO_BASE_URL);let c=Fa({baseUrl:e,source:i.sourceURL,range:i.range}),p=Fa({baseUrl:e,source:e,indexRange:r});if(p.map=c,u){let _=jh(t);_.length&&(p.duration=_[0].duration,p.timeline=_[0].timeline);}else n&&(p.duration=n,p.timeline=s);return p.presentationTime=a||s,p.number=o,[p];},cu=(t,e,i)=>{let n=t.sidx.map?t.sidx.map:null,r=t.sidx.duration,s=t.timeline||0,a=t.sidx.byterange,o=a.offset+a.length,u=e.timescale,c=e.references.filter(E=>E.referenceType!==1),p=[],_=t.endList?"static":"dynamic",T=t.sidx.timeline,y=T,b=t.mediaSequence||0,g;typeof e.firstOffset=="bigint"?g=Lt.default.BigInt(o)+e.firstOffset:g=o+e.firstOffset;for(let E=0;E<c.length;E++){let S=e.references[E],P=S.referencedSize,D=S.subsegmentDuration,A;typeof g=="bigint"?A=g+Lt.default.BigInt(P)-Lt.default.BigInt(1):A=g+P-1;let C=`${g}-${A}`,I=Q_({baseUrl:i,timescale:u,timeline:s,periodStart:T,presentationTime:y,number:b,duration:D,sourceDuration:r,indexRange:C,type:_})[0];n&&(I.map=n),p.push(I),typeof g=="bigint"?g+=Lt.default.BigInt(P):g+=P,y+=D/u,b++;}return t.segments=p,t;},cI=["AUDIO","SUBTITLES"],hI=1/60,J_=t=>oI(t,({timeline:e})=>e).sort((e,i)=>e.timeline>i.timeline?1:-1),fI=(t,e)=>{for(let i=0;i<t.length;i++)if(t[i].attributes.NAME===e)return t[i];return null;},H_=t=>{let e=[];return W0(t,cI,(i,n,r,s)=>{e=e.concat(i.playlists||[]);}),e;},$_=({playlist:t,mediaSequence:e})=>
17{t.mediaSequence=e,t.segments.forEach((i,n)=>{i.number=t.mediaSequence+n;});},pI=({oldPlaylists:t,newPlaylists:e,timelineStarts:i})=>{e.forEach(n=>{n.discontinuitySequence=i.findIndex(function({timeline:u}){return u===n.timeline;});let r=fI(t,n.attributes.NAME);if(!r||n.sidx)return;let s=n.segments[0],a=r.segments.findIndex(function(u){return Math.abs(u.presentationTime-s.presentationTime)<hI;});if(a===-1){$_({playlist:n,mediaSequence:r.mediaSequence+r.segments.length}),n.segments[0].discontinuity=!0,n.discontinuityStarts.unshift(0),(!r.segments.length&&n.timeline>r.timeline||r.segments.length&&n.timeline>r.segments[r.segments.length-1].timeline)&&n.discontinuitySequence--;return;}r.segments[a].discontinuity&&!s.discontinuity&&(s.discontinuity=!0,n.discontinuityStarts.unshift(0),n.discontinuitySequence--),$_({playlist:n,mediaSequence:r.segments[a].number});});},mI=({oldManifest:t,newManifest:e})=>{let i=t.playlists.concat(H_(t)),n=e.playlists.concat(H_(e));return e.timelineStarts=J_([t.timelineStarts,e.timelineStarts]),pI({oldPlaylists:i,newPlaylists:n,timelineStarts:e.timelineStarts}),e;},Ua=t=>t&&t.uri+"-"+lI(t.byterange),Nh=t=>{let e=t.reduce(function(n,r){return n[r.attributes.baseUrl]||(n[r.attributes.baseUrl]=[]),n[r.attributes.baseUrl].push(r),n;},{}),i=[];return Object.values(e).forEach(n=>{let r=X_(n.reduce((s,a)=>{let o=a.attributes.id+(a.attributes.lang||"");return s[o]?(a.segments&&(a.segments[0]&&(a.segments[0].discontinuity=!0),s[o].segments.push(...a.segments)),a.attributes.contentProtection&&(s[o].attributes.contentProtection=a.attributes.contentProtection)):(s[o]=a,s[o].attributes.timelineStarts=[]),s[o].attributes.timelineStarts.push({start:a.attributes.periodStart,timeline:a.attributes.periodStart}),s;},{}));i=i.concat(r);}),i.map(n=>(n.discontinuityStarts=aI(n.segments||[],"discontinuity"),n));},Mh=(t,e)=>{let i=Ua(t.sidx),n=i&&e[i]&&e[i].sidx;return n&&cu(t,n,t.sidx.resolvedUri),t;},gI=(t,e={})=>{if(!Object.keys(e).length)return t;for(let i in t)t[i]=Mh(t[i],e);return t;},vI=({attributes:t,segments:e,sidx:i,mediaSequence:n,discontinuitySequence:r,discontinuityStarts:s},a)=>{let o={attributes:{NAME:t.id,BANDWIDTH:t.bandwidth,CODECS:t.codecs,"PROGRAM-ID":1},uri:"",endList:t.type==="static",timeline:t.periodStart,resolvedUri:t.baseUrl||"",targetDuration:t.duration,discontinuitySequence:r,discontinuityStarts:s,timelineStarts:t.timelineStarts,mediaSequence:n,segments:e};return t.contentProtection&&(o.contentProtection=t.contentProtection),t.serviceLocation&&(o.attributes.serviceLocation=t.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO="audio",o.attributes.SUBTITLES="subs"),o;},_I=({attributes:t,segments:e,mediaSequence:i,discontinuityStarts:n,discontinuitySequence:r})=>{typeof e>"u"&&(e=[{uri:t.baseUrl,timeline:t.periodStart,resolvedUri:t.baseUrl||"",duration:t.sourceDuration,number:0}],t.duration=t.sourceDuration);let s={NAME:t.id,BANDWIDTH:t.bandwidth,"PROGRAM-ID":1};t.codecs&&(s.CODECS=t.codecs);let a={attributes:s,uri:"",endList:t.type==="static",timeline:t.periodStart,resolvedUri:t.baseUrl||"",targetDuration:t.duration,timelineStarts:t.timelineStarts,discontinuityStarts:n,discontinuitySequence:r,mediaSequence:i,segments:e};return t.serviceLocation&&(a.attributes.serviceLocation=t.serviceLocation),a;},yI=(t,e={},i=!1)=>{let n,r=t.reduce((s,a)=>{let o=a.attributes.role&&a.attributes.role.value||"",u=a.attributes.lang||"",c=a.attributes.label||"main";if(u&&!a.attributes.label){let _=o?` (${o})`:"";c=`${a.attributes.lang}${_}`;}s[c]||(s[c]={language:u,autoselect:!0,default:o==="main",playlists:[],uri:""});let p=Mh(vI(a,i),e);return s[c].playlists.push(p),typeof n>"u"&&o==="main"&&(n=a,n.default=!0),s;},{});if(!n){let s=Object.keys(r)[0];r[s].default=!0;}return r;},bI=(t,e={})=>t.reduce((i,n)=>{let r=n.attributes.label||n.attributes.lang||"text",s=n.attributes.lang||"und";return i[r]||(i[r]={language:s,default:!1,autoselect:!1,playlists:[],uri:""}),i[r].playlists.push(Mh(_I(n),e)),i;},{}),TI=t=>t.reduce((e,i)=>(i&&i.forEach(n=>{let{channel:r,language:s}=n;e[s]={autoselect:!1,default:!1,instreamId:r,language:s}
17,n.hasOwnProperty("aspectRatio")&&(e[s].aspectRatio=n.aspectRatio),n.hasOwnProperty("easyReader")&&(e[s].easyReader=n.easyReader),n.hasOwnProperty("3D")&&(e[s]["3D"]=n["3D"]);}),e),{}),SI=({attributes:t,segments:e,sidx:i,discontinuityStarts:n})=>{let r={attributes:{NAME:t.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:t.width,height:t.height},CODECS:t.codecs,BANDWIDTH:t.bandwidth,"PROGRAM-ID":1},uri:"",endList:t.type==="static",timeline:t.periodStart,resolvedUri:t.baseUrl||"",targetDuration:t.duration,discontinuityStarts:n,timelineStarts:t.timelineStarts,segments:e};return t.frameRate&&(r.attributes["FRAME-RATE"]=t.frameRate),t.contentProtection&&(r.contentProtection=t.contentProtection),t.serviceLocation&&(r.attributes.serviceLocation=t.serviceLocation),i&&(r.sidx=i),r;},AI=({attributes:t})=>t.mimeType==="video/mp4"||t.mimeType==="video/webm"||t.contentType==="video",EI=({attributes:t})=>t.mimeType==="audio/mp4"||t.mimeType==="audio/webm"||t.contentType==="audio",xI=({attributes:t})=>t.mimeType==="text/vtt"||t.contentType==="text",CI=(t,e)=>{t.forEach(i=>{i.mediaSequence=0,i.discontinuitySequence=e.findIndex(function({timeline:n}){return n===i.timeline;}),i.segments&&i.segments.forEach((n,r)=>{n.number=r;});});},z_=t=>t?Object.keys(t).reduce((e,i)=>{let n=t[i];return e.concat(n.playlists);},[]):[],wI=({dashPlaylists:t,locations:e,contentSteering:i,sidxMapping:n={},previousManifest:r,eventStream:s})=>{if(!t.length)return{};let{sourceDuration:a,type:o,suggestedPresentationDelay:u,minimumUpdatePeriod:c}=t[0].attributes,p=Nh(t.filter(AI)).map(SI),_=Nh(t.filter(EI)),T=Nh(t.filter(xI)),y=t.map(A=>A.attributes.captionServices).filter(Boolean),b={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:a,playlists:gI(p,n)};c>=0&&(b.minimumUpdatePeriod=c*1e3),e&&(b.locations=e),i&&(b.contentSteering=i),o==="dynamic"&&(b.suggestedPresentationDelay=u),s&&s.length>0&&(b.eventStream=s);let g=b.playlists.length===0,E=_.length?yI(_,n,g):null,S=T.length?bI(T,n):null,P=p.concat(z_(E),z_(S)),D=P.map(({timelineStarts:A})=>A);return b.timelineStarts=J_(D),CI(P,b.timelineStarts),E&&(b.mediaGroups.AUDIO.audio=E),S&&(b.mediaGroups.SUBTITLES.subs=S),y.length&&(b.mediaGroups["CLOSED-CAPTIONS"].cc=TI(y)),r?mI({oldManifest:r,newManifest:b}):b;},DI=(t,e,i)=>{let{NOW:n,clientOffset:r,availabilityStartTime:s,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:u=0}=t,c=(n+r)/1e3,p=s+o,T=c+u-p;return Math.ceil((T*a-e)/i);},Z_=(t,e)=>{let{type:i,minimumUpdatePeriod:n=0,media:r="",sourceDuration:s,timescale:a=1,startNumber:o=1,periodStart:u}=t,c=[],p=-1;for(let _=0;_<e.length;_++){let T=e[_],y=T.d,b=T.r||0,g=T.t||0;p<0&&(p=g),g&&g>p&&(p=g);let E;if(b<0){let D=_+1;D===e.length?i==="dynamic"&&n>0&&r.indexOf("$Number$")>0?E=DI(t,p,y):E=(s*a-p)/y:E=(e[D].t-p)/y;}else E=b+1;let S=o+c.length+E,P=o+c.length;for(;P<S;)c.push({number:P,duration:y/a,time:p,timeline:u}),p+=y,P++;}return c;},II=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,kI=t=>(e,i,n,r)=>{if(e==="$$")return"$";if(typeof t[i]>"u")return e;let s=""+t[i];return i==="RepresentationID"||(n?r=parseInt(r,10):r=1,s.length>=r)?s:`${new Array(r-s.length+1).join("0")}${s}`;},G_=(t,e)=>t.replace(II,kI(e)),PI=(t,e)=>!t.duration&&!e?[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodStart}]:t.duration?jh(t):Z_(t,e),LI=(t,e)=>{let i={RepresentationID:t.id,Bandwidth:t.bandwidth||0},{initialization:n={sourceURL:"",range:""}}
17=t,r=Fa({baseUrl:t.baseUrl,source:G_(n.sourceURL,i),range:n.range});return PI(t,e).map(a=>{i.Number=a.number,i.Time=a.time;let o=G_(t.media||"",i),u=t.timescale||1,c=t.presentationTimeOffset||0,p=t.periodStart+(a.time-c)/u;return{uri:o,timeline:a.timeline,duration:a.duration,resolvedUri:ss(t.baseUrl||"",o),map:r,number:a.number,presentationTime:p};});},RI=(t,e)=>{let{baseUrl:i,initialization:n={}}=t,r=Fa({baseUrl:i,source:n.sourceURL,range:n.range}),s=Fa({baseUrl:i,source:e.media,range:e.mediaRange});return s.map=r,s;},OI=(t,e)=>{let{duration:i,segmentUrls:n=[],periodStart:r}=t;if(!i&&!e||i&&e)throw new Error(_s.SEGMENT_TIME_UNSPECIFIED);let s=n.map(u=>RI(t,u)),a;return i&&(a=jh(t)),e&&(a=Z_(t,e)),a.map((u,c)=>{if(s[c]){let p=s[c],_=t.timescale||1,T=t.presentationTimeOffset||0;return p.timeline=u.timeline,p.duration=u.duration,p.number=u.number,p.presentationTime=r+(u.time-T)/_,p;}}).filter(u=>u);},NI=({attributes:t,segmentInfo:e})=>{let i,n;e.template?(n=LI,i=ft(t,e.template)):e.base?(n=Q_,i=ft(t,e.base)):e.list&&(n=OI,i=ft(t,e.list));let r={attributes:t};if(!n)return r;let s=n(i,e.segmentTimeline);if(i.duration){let{duration:a,timescale:o=1}=i;i.duration=a/o;}else s.length?i.duration=s.reduce((a,o)=>Math.max(a,Math.ceil(o.duration)),0):i.duration=0;return r.attributes=i,r.segments=s,e.base&&i.indexRange&&(r.sidx=s[0],r.segments=[]),r;},jI=t=>t.map(NI),We=(t,e)=>K_(t.childNodes).filter(({tagName:i})=>i===e),Va=t=>t.textContent.trim(),MI=t=>parseFloat(t.split("/").reduce((e,i)=>e/i)),gs=t=>{let o=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(t);if(!o)return 0;let[u,c,p,_,T,y]=o.slice(1);return parseFloat(u||0)*31536e3+parseFloat(c||0)*2592e3+parseFloat(p||0)*86400+parseFloat(_||0)*3600+parseFloat(T||0)*60+parseFloat(y||0);},BI=t=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t)&&(t+="Z"),Date.parse(t)),W_={mediaPresentationDuration(t){return gs(t);},availabilityStartTime(t){return BI(t)/1e3;},minimumUpdatePeriod(t){return gs(t);},suggestedPresentationDelay(t){return gs(t);},type(t){return t;},timeShiftBufferDepth(t){return gs(t);},start(t){return gs(t);},width(t){return parseInt(t,10);},height(t){return parseInt(t,10);},bandwidth(t){return parseInt(t,10);},frameRate(t){return MI(t);},startNumber(t){return parseInt(t,10);},timescale(t){return parseInt(t,10);},presentationTimeOffset(t){return parseInt(t,10);},duration(t){let e=parseInt(t,10);return isNaN(e)?gs(t):e;},d(t){return parseInt(t,10);},t(t){return parseInt(t,10);},r(t){return parseInt(t,10);},presentationTime(t){return parseInt(t,10);},DEFAULT(t){return t;}},ot=t=>t&&t.attributes?K_(t.attributes).reduce((e,i)=>{let n=W_[i.name]||W_.DEFAULT;return e[i.name]=n(i.value),e;},{}):{},FI={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},hu=(t,e)=>e.length?vs(t.map(function(i){return e.map(function(n){let r=Va(n),s=ss(i.baseUrl,r),a=ft(ot(n),{baseUrl:s});return s!==r&&!a.serviceLocation&&i.serviceLocation&&(a.serviceLocation=i.serviceLocation),a;});})):t,Bh=t=>{let e=We(t,"SegmentTemplate")[0],i=We(t,"SegmentList")[0],n=i&&We(i,"SegmentURL").map(_=>ft({tag:"SegmentURL"},ot(_))),r=We(t,"SegmentBase")[0],s=i||e,a=s&&We(s,"SegmentTimeline")[0],o=i||r||e,u=o&&We(o,"Initialization")[0],c=e&&ot(e);c&&u?c.initialization=u&&ot(u):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});let p={template:c,segmentTimeline:a&&We(a,"S").map(_=>ot(_)),list:i&&ft(ot(i),{segmentUrls:n,initialization:ot(u)}),base:r&&ft(ot(r),{initialization:ot(u)})};return Object.keys(p).forEach(_=>{p[_]||delete p[_];}),p;},UI=(t,e,i)=>n=>{let r=We(n,"BaseURL"),s=hu(e,r),a=ft(t,ot(n)),o=Bh(n);return s.map(u=>({segmentInfo:ft(i,o),attributes:ft(a,u)}));},VI=t=>t.reduce((e,i)=>{let n=ot(i);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());let r=FI[n.schemeIdUri];if(r){e[r]={attributes:n};let s=We(i,"cenc:pssh")[0];if(s){let a=Va(s);e[r].pssh=a&&Ca(a);}}return e;},{}),qI=t=>
17{if(t.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof t.value!="string"?[]:t.value.split(";")).map(i=>{let n,r;return r=i,/^CC\d=/.test(i)?[n,r]=i.split("="):/^CC\d$/.test(i)&&(n=i),{channel:n,language:r};});if(t.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof t.value!="string"?[]:t.value.split(";")).map(i=>{let n={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(i)){let[r,s=""]=i.split("=");n.channel=r,n.language=i,s.split(",").forEach(a=>{let[o,u]=a.split(":");o==="lang"?n.language=u:o==="er"?n.easyReader=Number(u):o==="war"?n.aspectRatio=Number(u):o==="3D"&&(n["3D"]=Number(u));});}else n.language=i;return n.channel&&(n.channel="SERVICE"+n.channel),n;});},HI=t=>vs(We(t.node,"EventStream").map(e=>{let i=ot(e),n=i.schemeIdUri;return We(e,"Event").map(r=>{let s=ot(r),a=s.presentationTime||0,o=i.timescale||1,u=s.duration||0,c=a/o+t.attributes.start;return{schemeIdUri:n,value:i.value,id:s.id,start:c,end:c+u/o,messageData:Va(r)||s.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0};});})),$I=(t,e,i)=>n=>{let r=ot(n),s=hu(e,We(n,"BaseURL")),a=We(n,"Role")[0],o={role:ot(a)},u=ft(t,r,o),c=We(n,"Accessibility")[0],p=qI(ot(c));p&&(u=ft(u,{captionServices:p}));let _=We(n,"Label")[0];if(_&&_.childNodes.length){let E=_.childNodes[0].nodeValue.trim();u=ft(u,{label:E});}let T=VI(We(n,"ContentProtection"));Object.keys(T).length&&(u=ft(u,{contentProtection:T}));let y=Bh(n),b=We(n,"Representation"),g=ft(i,y);return vs(b.map(UI(u,s,g)));},zI=(t,e)=>(i,n)=>{let r=hu(e,We(i.node,"BaseURL")),s=ft(t,{periodStart:i.attributes.start});typeof i.attributes.duration=="number"&&(s.periodDuration=i.attributes.duration);let a=We(i.node,"AdaptationSet"),o=Bh(i.node);return vs(a.map($I(s,r,o)));},GI=(t,e)=>{if(t.length>1&&e({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!t.length)return null;let i=ft({serverURL:Va(t[0])},ot(t[0]));return i.queryBeforeStart=i.queryBeforeStart==="true",i;},WI=({attributes:t,priorPeriodAttributes:e,mpdType:i})=>typeof t.start=="number"?t.start:e&&typeof e.start=="number"&&typeof e.duration=="number"?e.start+e.duration:!e&&i==="static"?0:null,YI=(t,e={})=>{let{manifestUri:i="",NOW:n=Date.now(),clientOffset:r=0,eventHandler:s=function(){}}=e,a=We(t,"Period");if(!a.length)throw new Error(_s.INVALID_NUMBER_OF_PERIOD);let o=We(t,"Location"),u=ot(t),c=hu([{baseUrl:i}],We(t,"BaseURL")),p=We(t,"ContentSteering");u.type=u.type||"static",u.sourceDuration=u.mediaPresentationDuration||0,u.NOW=n,u.clientOffset=r,o.length&&(u.locations=o.map(Va));let _=[];return a.forEach((T,y)=>{let b=ot(T),g=_[y-1];b.start=WI({attributes:b,priorPeriodAttributes:g?g.attributes:null,mpdType:u.type}),_.push({node:T,attributes:b});}),{locations:u.locations,contentSteeringInfo:GI(p,s),representationInfo:vs(_.map(zI(u,c))),eventStream:vs(_.map(HI))};},ey=t=>{if(t==="")throw new Error(_s.DASH_EMPTY_MANIFEST);let e=new Y_.DOMParser(),i,n;try{i=e.parseFromString(t,"application/xml"),n=i&&i.documentElement.tagName==="MPD"?i.documentElement:null;}catch{}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(_s.DASH_INVALID_XML);return n;},XI=t=>{let e=We(t,"UTCTiming")[0];if(!e)return null;let i=ot(e);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(_s.UNSUPPORTED_UTC_TIMING_SCHEME);}return i;},ty=(t,e={})=>{let i=YI(ey(t),e),n=jI(i.representationInfo);return wI({dashPlaylists:n,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:i.eventStream});},iy=t=>XI(ey(t));});var ay=q((S8,sy)=>{"use strict";var ry=Math.pow(2,32),KI=function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i;return e.getBigUint64?(i=e.getBigUint64(0),i<Number.MAX_SAFE_INTEGER?
17Number(i):i):e.getUint32(0)*ry+e.getUint32(4);};sy.exports={getUint64:KI,MAX_UINT32:ry};});var uy=q((A8,ly)=>{"use strict";var oy=ay().getUint64,QI=function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:e.getUint32(4),timescale:e.getUint32(8)},n=12;i.version===0?(i.earliestPresentationTime=e.getUint32(n),i.firstOffset=e.getUint32(n+4),n+=8):(i.earliestPresentationTime=oy(t.subarray(n)),i.firstOffset=oy(t.subarray(n+8)),n+=16),n+=2;var r=e.getUint16(n);for(n+=2;r>0;n+=12,r--)i.references.push({referenceType:(t[n]&128)>>>7,referencedSize:e.getUint32(n)&2147483647,subsegmentDuration:e.getUint32(n+4),startsWithSap:!!(t[n+8]&128),sapType:(t[n+8]&112)>>>4,sapDeltaTime:e.getUint32(n+8)&268435455});return i;};ly.exports=QI;});var JI,ZI,br,Fh=ut(()=>{"use strict";$n();JI=ie([73,68,51]),ZI=function(e,i){i===void 0&&(i=0),e=ie(e);var n=e[i+5],r=e[i+6]<<21|e[i+7]<<14|e[i+8]<<7|e[i+9],s=(n&16)>>4;return s?r+20:r+10;},br=function t(e,i){return i===void 0&&(i=0),e=ie(e),e.length-i<10||!Ce(e,JI,{offset:i})?i:(i+=ZI(e,i),t(e,i));};});var Uh=ut(()=>{"use strict";$n();});var I8,cy=ut(()=>{"use strict";
17I8=new Uint8Array([79,112,117,115,72,101,97,100]);});var hy,rk,Vh,fy,py,my=ut(()=>{"use strict";$n();Uh();cy();hy=function(e){return typeof e=="string"?Jl(e):e;},rk=function(e){return Array.isArray(e)?e.map(function(i){return hy(i);}):[hy(e)];},fy=function(e){e=ie(e);for(var i=[],n=0;e.length>n;){var r=e[n],s=0,a=0;a++;var o=e[a];for(a++;o&128;)s=(o&127)<<7,o=e[a],a++;s+=o&127;for(var u=0;u<Vh.length;u++){var c=Vh[u],p=c.id,_=c.parser;if(r===p){i.push(_(e.subarray(a,a+s)));break;}}n+=s+a;}return i;};Vh=[{id:3,parser:function(e){var i={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(i.flags&128&&(i.dependsOnEsId=e[i.size]<<8|e[i.size+1],i.size+=2),i.flags&64){var n=e[i.size];i.url=_h(e.subarray(i.size+1,i.size+1+n)),i.size+=n;}return i.flags&32&&(i.ocrEsId=e[i.size]<<8|e[i.size+1],i.size+=2),i.descriptors=fy(e.subarray(i.size))||[],i;}},{id:4,parser:function(e){var i={tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:fy(e.subarray(13))};return i;}},{id:5,parser:function(e){return{tag:5,bytes:e};}},{id:6,parser:function(e){return{tag:6,bytes:e};}}];py=function t(e,i,n){n===void 0&&(n=!1),i=rk(i),e=ie(e);var r=[];if(!i.length)return r;for(var s=0;s<e.length;){var a=(e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3])>>>0,o=e.subarray(s+4,s+8);if(a===0)break;var u=s+a;if(u>e.length){if(n)break;u=e.length;}var c=e.subarray(s+8,u);Ce(o,i[0])&&(i.length===1?r.push(c):r.push.apply(r,t(c,i.slice(1),n))),s=u;}return r;};});var qa,qh,sk,fu,gy,ak,ok,Hh,vy=ut(()=>{"use strict";$n();Uh();qa={EBML:ie([26,69,223,163]),DocType:ie([66,130]),Segment:ie([24,83,128,103]),SegmentInfo:ie([21,73,169,102]),Tracks:ie([22,84,174,107]),Track:ie([174]),TrackNumber:ie([215]),DefaultDuration:ie([35,227,131]),TrackEntry:ie([174]),TrackType:ie([131]),FlagDefault:ie([136]),CodecID:ie([134]),CodecPrivate:ie([99,162]),VideoTrack:ie([224]),AudioTrack:ie([225]),Cluster:ie([31,67,182,117]),Timestamp:ie([231]),TimestampScale:ie([42,215,177]),BlockGroup:ie([160]),BlockDuration:ie([155]),Block:ie([161]),SimpleBlock:ie([163])},qh=[128,64,32,16,8,4,2,1],sk=function(e){for(var i=1,n=0;n<qh.length&&!(e&qh[n]);n++)i++;return i;},fu=function(e,i,n,r){n===void 0&&(n=!0),r===void 0&&(r=!1);var s=sk(e[i]),a=e.subarray(i,i+s);return n&&(a=Array.prototype.slice.call(e,i,i+s),a[0]^=qh[s-1]),{length:s,value:vh(a,{signed:r}),bytes:a};},gy=function t(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(i){return t(i);}):typeof e=="number"?z0(e):e;},ak=function(e){return Array.isArray(e)?e.map(function(i){return gy(i);}):[gy(e)];},ok=function t(e,i,n){if(n>=i.length)return i.length;var r=fu(i,n,!1);if(Ce(e.bytes,r.bytes))return n;var s=fu(i,n+r.length);return t(e,i,n+s.length+s.value+r.length);},Hh=function t(e,i){i=ak(i),e=ie(e);var n=[];if(!i.length)return n;for(var r=0;r<e.length;){var s=fu(e,r,!1),a=fu(e,r+s.length),o=r+s.length+a.length;a.value===127&&(a.value=ok(s,e,o),a.value!==e.length&&(a.value-=o));var u=o+a.value>e.length?e.length:o+a.value,c=e.subarray(o,u);Ce(i[0],s.bytes)&&(i.length===1?n.push(c):n=n.concat(t(c,i.slice(1))));var p=s.length+a.length+c.length;r+=p;}return n;};});var lk,uk,dk,ck,_y,yy,by,Ty=ut(()=>{"use strict";$n();lk=ie([0,0,0,1]),uk=ie([0,0,1]),dk=ie([0,0,3]),ck=function(e){for(var i=[],n=1;n<e.length-2;)Ce(e.subarray(n,n+3),dk)&&(i.push(n+2),n++),n++;if(i.length===0)return e;var r=e.length-i.length,s=new Uint8Array(r),a=0;for(n=0;n<r;a++,n++)a===i[0]&&(a++,i.shift()),s[n]=e[a];return s;},_y=function(e,i,n,r){r===void 0&&(r=1/0),e=ie(e),n=[].concat(n);for(var s=0,a,o=0;s<e.length&&(o<r||a);){var u=void 0;if(Ce(e.subarray(s),lk)?u=4:Ce(e.subarray(s),uk)&&(u=3),!u){s++;continue;}if(o++,a)return ck(e.subarray(a,s));var c=void 0;i==="h264"?c=e[s+u]&31:i==="h265"&&(c=e[s+u]>>1&63),n.indexOf(c)!==-1&&(a=s+u),s+=u+(i==="h264"?1:2);}return e.subarray(0,0);},yy=function(e,i,n){return _y(e,"h264",i,n);},by=function(e,i,n){return _y(e,"h265",i,n);};});var Rt,ys,$h,hk,pu,Sy,Ay=ut(()=>{"use strict";$n();my();vy();Fh();Ty();Rt={webm:ie([119,101,98,109]),matroska:ie([109,97,116,114,111,115,107,97]),flac:ie([102,76,97,67]),ogg:ie([79,103,103,83]),ac3:ie([11,119]),riff:ie([82,73,70,70]),avi:ie([65,86,73]),wav:ie([87,65,86,69]),"3gp":ie([102,116,121,112,51,103]),mp4:ie([102,116,121,112]),fmp4:ie([115,116,121,112]),mov:ie([102,116,121,112,113,116]),moov:ie([109,111,111,118]),moof:ie([109,111,111,102])},ys={aac:function(e){var i=br(e);return Ce(e,[255,16],{offset:i,mask:[255,22]});},mp3:function(e){var i=br(e);return Ce(e,[255,2],{offset:i,mask:[255,6]});},webm:function(e){var i=Hh(e,[qa.EBML,qa.DocType])[0];return Ce(i,Rt.webm);},mkv:function(e){var i=Hh(e,[qa.EBML,qa.DocType])[0];return Ce(i,Rt.matroska);},mp4:function(e){if(ys["3gp"](e)||ys.mov(e))return!1;if(Ce(e,Rt.mp4,{offset:4})||Ce(e,Rt.fmp4,{offset:4})||Ce(e,Rt.moof,{offset:4})||Ce(e,Rt.moov,{offset:4}))return!0;},mov:function(e){return Ce(e,Rt.mov,{offset:4});},"3gp":function(e){return Ce(e,Rt["3gp"],{offset:4});},ac3:function(e){var i=br(e);return Ce(e,Rt.ac3,{offset:i});},ts:function(e){if(e.length<189&&e.length>=1)return e[0]===71;for(var i=0;i+188<e.length&&i<188;){if(e[i]===71&&e[i+188]===71)return!0;
17i+=1;}return!1;},flac:function(e){var i=br(e);return Ce(e,Rt.flac,{offset:i});},ogg:function(e){return Ce(e,Rt.ogg);},avi:function(e){return Ce(e,Rt.riff)&&Ce(e,Rt.avi,{offset:8});},wav:function(e){return Ce(e,Rt.riff)&&Ce(e,Rt.wav,{offset:8});},h264:function(e){return yy(e,7,3).length;},h265:function(e){return by(e,[32,33],3).length;}},$h=Object.keys(ys).filter(function(t){return t!=="ts"&&t!=="h264"&&t!=="h265";}).concat(["ts","h264","h265"]);$h.forEach(function(t){var e=ys[t];ys[t]=function(i){return e(ie(i));};});hk=ys,pu=function(e){e=ie(e);for(var i=0;i<$h.length;i++){var n=$h[i];if(hk[n](e))return n;}return"";},Sy=function(e){return py(e,["moof"]).length>0;};});var Dy=q((W8,wy)=>{"use strict";var zh=9e4,Gh,Wh,mu,Yh,Ey,xy,Cy;Gh=function(t){return t*zh;};Wh=function(t,e){return t*e;};mu=function(t){return t/zh;};Yh=function(t,e){return t/e;};Ey=function(t,e){return Gh(Yh(t,e));};xy=function(t,e){return Wh(mu(t),e);};Cy=function(t,e,i){return mu(i?t:t-e);};wy.exports={ONE_SECOND_IN_TS:zh,secondsToVideoTs:Gh,secondsToAudioTs:Wh,videoTsToSeconds:mu,audioTsToSeconds:Yh,audioTsToVideoTs:Ey,videoTsToAudioTs:xy,metadataTsToSeconds:Cy};});var Ud={};KC(Ud,{default:()=>N});function ff(t,e=":",i=""){let n="info",r;function s(...a){r("log",n,a);}return r=mk(t,s,i),s.createLogger=(a,o,u)=>{let c=o!==void 0?o:e,p=u!==void 0?u:i,_=`${t} ${c} ${a}`;return ff(_,c,p);},s.createNewLogger=(a,o,u)=>ff(a,o,u),s.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},s.level=a=>{if(typeof a=="string"){if(!s.levels.hasOwnProperty(a))throw new Error(`"${a}" in not a valid log level`);n=a;}return n;},s.history=()=>Qt?[].concat(Qt):[],s.history.filter=a=>(Qt||[]).filter(o=>new RegExp(`.*${a}.*`).test(o[0])),s.history.clear=()=>{Qt&&(Qt.length=0);},s.history.disable=()=>{Qt!==null&&(Qt.length=0,Qt=null);},s.history.enable=()=>{Qt===null&&(Qt=[]);},s.error=(...a)=>r("error",n,a),s.warn=(...a)=>r("warn",n,a),s.debug=(...a)=>r("debug",n,a),s;}function Es(t,e){Tb(t).forEach(i=>e(t[i],i));}function Sb(t,e,i=0){return Tb(t).reduce((n,r)=>e(n,t[r],r),i);}function Ji(t){return!!t&&typeof t=="object";}function Rs(t){return Ji(t)&&gk.call(t)==="[object Object]"&&t.constructor===Object;}function Re(...t){let e={};return t.forEach(i=>{i&&Es(i,(n,r)=>{if(!Rs(n)){e[r]=n;return;}Rs(e[r])||(e[r]={}),e[r]=Re(e[r],n);});}),e;}function Ab(t={}){let e=[];for(let i in t)if(t.hasOwnProperty(i)){let n=t[i];e.push(n);}return e;}function Cd(t,e,i,n=!0){let r=a=>Object.defineProperty(t,e,{value:a,enumerable:!0,writable:!0}),s={configurable:!0,enumerable:!0,get(){let a=i();return r(a),a;}};return n&&(s.set=r),Object.defineProperty(t,e,s);}function ky(t){return typeof t=="string"&&!!t.trim();}function yk(t){if(t.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters");}function Vs(){return W.default===j.default.document;}function qs(t){return Ji(t)&&t.nodeType===1;}function Ib(){try{return j.default.parent!==j.default.self;}catch{return!0;}}function kb(t){return function(e,i){if(!ky(e))return W.default[t](null);ky(i)&&(i=W.default.querySelector(i));let n=qs(i)?i:W.default;return n[t]&&n[t](e);};}function ue(t="div",e={},i={},n){let r=W.default.createElement(t);return Object.getOwnPropertyNames(e).forEach(function(s){let a=e[s];s==="textContent"?ar(r,a):(r[s]!==a||s==="tabIndex")&&(r[s]=a);}),Object.getOwnPropertyNames(i).forEach(function(s){r.setAttribute(s,i[s]);}),n&&dp(r,n),r;}function ar(t,e){return typeof t.textContent>"u"?t.innerText=e:t.textContent=e,t;}function pf(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t);}function Ya(t,e){return yk(e),t.classList.contains(e);}function xr(t,...e){return t.classList.add(...e.reduce((i,n)=>i.concat(n.split(/\s+/)),[])),t;}function Pd(t,...e){return t?(t.classList.remove(...e.reduce((i,n)=>i.concat(n.split(/\s+/)),[])),t):(_e.warn("removeClass was called with an element that doesn't exist"),null);}function Pb(t,e,i){return typeof i=="function"&&(i=i(t,e)),typeof i!="boolean"&&(i=void 0),e.split(/\s+/).forEach(n=>t.classList.toggle(n,i)),t;}
17function Lb(t,e){Object.getOwnPropertyNames(e).forEach(function(i){let n=e[i];n===null||typeof n>"u"||n===!1?t.removeAttribute(i):t.setAttribute(i,n===!0?"":n);});}function Xn(t){let e={},i=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(t&&t.attributes&&t.attributes.length>0){let n=t.attributes;for(let r=n.length-1;r>=0;r--){let s=n[r].name,a=n[r].value;i.includes(s)&&(a=a!==null),e[s]=a;}}return e;}function Rb(t,e){return t.getAttribute(e);}function Os(t,e,i){t.setAttribute(e,i);}function Ld(t,e){t.removeAttribute(e);}function Ob(){W.default.body.focus(),W.default.onselectstart=function(){return!1;};}function Nb(){W.default.onselectstart=function(){return!0;};}function Ns(t){if(t&&t.getBoundingClientRect&&t.parentNode){let e=t.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(n=>{e[n]!==void 0&&(i[n]=e[n]);}),i.height||(i.height=parseFloat(js(t,"height"))),i.width||(i.width=parseFloat(js(t,"width"))),i;}}function eo(t){if(!t||t&&!t.offsetParent)return{left:0,top:0,width:0,height:0};let e=t.offsetWidth,i=t.offsetHeight,n=0,r=0;for(;t.offsetParent&&t!==W.default[Eu.fullscreenElement];)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{left:n,top:r,width:e,height:i};}function Rd(t,e){let i={x:0,y:0};if(At){let p=t;for(;p&&p.nodeName.toLowerCase()!=="html";){let _=js(p,"transform");
17if(/^matrix/.test(_)){let T=_.slice(7,-1).split(/,\s/).map(Number);i.x+=T[4],i.y+=T[5];}else if(/^matrix3d/.test(_)){let T=_.slice(9,-1).split(/,\s/).map(Number);i.x+=T[12],i.y+=T[13];}if(p.assignedSlot&&p.assignedSlot.parentElement&&j.default.WebKitCSSMatrix){let T=j.default.getComputedStyle(p.assignedSlot.parentElement).transform,y=new j.default.WebKitCSSMatrix(T);i.x+=y.m41,i.y+=y.m42;}p=p.parentNode||p.host;}}let n={},r=eo(e.target),s=eo(t),a=s.width,o=s.height,u=e.offsetY-(s.top-r.top),c=e.offsetX-(s.left-r.left);return e.changedTouches&&(c=e.changedTouches[0].pageX-s.left,u=e.changedTouches[0].pageY+s.top,At&&(c-=i.x,u-=i.y)),n.y=1-Math.max(0,Math.min(1,u/o)),n.x=Math.max(0,Math.min(1,c/a)),n;}function jb(t){return Ji(t)&&t.nodeType===3;}function Od(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t;}function Mb(t){return typeof t=="function"&&(t=t()),(Array.isArray(t)?t:[t]).map(e=>{if(typeof e=="function"&&(e=e()),qs(e)||jb(e))return e;if(typeof e=="string"&&/\S/.test(e))return W.default.createTextNode(e);}).filter(e=>e);}function dp(t,e){return Mb(e).forEach(i=>t.appendChild(i)),t;}function Bb(t,e){return dp(Od(t),e);}function to(t){return t.button===void 0&&t.buttons===void 0||t.button===0&&t.buttons===void 0||t.type==="mouseup"&&t.button===0&&t.buttons===0||t.type==="mousedown"&&t.button===0&&t.buttons===0?!0:!(t.button!==0||t.buttons!==1);}function js(t,e){if(!t||!e)return"";if(typeof j.default.getComputedStyle=="function"){let i;try{i=j.default.getComputedStyle(t);}catch{return"";}return i?i.getPropertyValue(e)||i[e]:"";}return"";}function Ub(t){[...W.default.styleSheets].forEach(e=>{try{let i=[...e.cssRules].map(r=>r.cssText).join(""),n=W.default.createElement("style");n.textContent=i,t.document.head.appendChild(n);}catch{let n=W.default.createElement("link");n.rel="stylesheet",n.type=e.type,n.media=e.media.mediaText,n.href=e.href,t.document.head.appendChild(n);}});}function gf(t,e){Vs()&&(e&&(mf=e),j.default.setTimeout(bk,t));}function vf(){qb=!0,j.default.removeEventListener("load",vf);}function vi(){return Sk++;}function Py(t,e){if(!Nt.has(t))return;let i=Nt.get(t);i.handlers[e].length===0&&(delete i.handlers[e],t.removeEventListener?t.removeEventListener(e,i.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),Object.getOwnPropertyNames(i).length===0&&Nt.delete(t);}function cp(t,e,i,n){i.forEach(function(r){t(e,r,n);});}function Nd(t){if(t.fixed_)return t;function e(){return!0;}function i(){return!1;}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){let n=t||j.default.event;t={};let r=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(let s in n)r.includes(s)||s==="returnValue"&&n.preventDefault||(t[s]=n[s]);if(t.target||(t.target=t.srcElement||W.default),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){n.preventDefault&&n.preventDefault(),t.returnValue=!1,n.returnValue=!1,t.defaultPrevented=!0;},t.defaultPrevented=!1,t.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),t.cancelBubble=!0,n.cancelBubble=!0,t.isPropagationStopped=e;},t.isPropagationStopped=i,t.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation();},t.isImmediatePropagationStopped=i,t.clientX!==null&&t.clientX!==void 0){let s=W.default.documentElement,a=W.default.body;t.pageX=t.clientX+(s&&s.scrollLeft||a&&a.scrollLeft||0)-(s&&s.clientLeft||a&&a.clientLeft||0),t.pageY=t.clientY+(s&&s.scrollTop||a&&a.scrollTop||0)-(s&&s.clientTop||a&&a.clientTop||0);}t.which=t.charCode||t.keyCode,t.button!==null&&t.button!==void 0&&(t.button=t.button&1?0:t.button&4?1:t.button&2?2:0);}return t.fixed_=!0,t;}function li(t,e,i){if(Array.isArray(e))return cp(li,t,e,i);Nt.has(t)||Nt.set(t,{});let n=Nt.get(t);if(n.handlers||(n.handlers={}),n.handlers[e]||(n.handlers[e]=[]),i.guid||(i.guid=vi()),n.handlers[e].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(r,s){if(n.disabled)return;r=Nd(r);let a=n.handlers[r.type];if(a){let o=a.slice(0);for(let u=0,c=o.length;u<c&&!r.isImmediatePropagationStopped();u++)try{o[u].call(t,r,s);}catch(p){_e.error(p);}}}),n.handlers[e].length===1)if(t.addEventListener){let r=!1;Ak()&&Ek.indexOf(e)>-1&&(r={passive:!0}),t.addEventListener(e,n.dispatcher,r);}else t.attachEvent&&t.attachEvent("on"+e,n.dispatcher);}function Et(t,e,i){if(!Nt.has(t))return;let n=Nt.get(t);if(!n.handlers)return;if(Array.isArray(e))return cp(Et,t,e,i);let r=function(a,o){n.handlers[o]=[],Py(a,o);};if(e===void 0){for(let a in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},a)&&r(t,a);return;}let s=n.handlers[e];if(s){if(!i){r(t,e);return;}if(i.guid)for(let a=0;a<s.length;a++)s[a].guid===i.guid&&s.splice(a--,1);Py(t,e);}}function Hs(t,e,i){let n=Nt.has(t)?Nt.get(t):{},r=t.parentNode||t.ownerDocument;if(typeof e=="string"?e={type:e,target:t}:e.target||(e.target=t),e=Nd(e),n.dispatcher&&n.dispatcher.call(t,e,i),r&&!e.isPropagationStopped()&&e.bubbles===!0)Hs.call(null,r,e,i);else if(!r&&!e.defaultPrevented&&e.target&&e.target[e.type]){Nt.has(e.target)||Nt.set(e.target,{});let s=Nt.get(e.target);e.target[e.type]&&(s.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),s.disabled=!1);}return!e.defaultPrevented;}
17function jd(t,e,i){if(Array.isArray(e))return cp(jd,t,e,i);let n=function(){Et(t,e,n),i.apply(this,arguments);};n.guid=i.guid=i.guid||vi(),li(t,e,n);}function hp(t,e,i){let n=function(){Et(t,e,n),i.apply(this,arguments);};n.guid=i.guid=i.guid||vi(),li(t,e,n);}function fp(t,e={}){let{eventBusKey:i}=e;if(i){if(!t[i].nodeName)throw new Error(`The eventBusKey "${i}" does not refer to an element.`);t.eventBusEl_=t[i];}else t.eventBusEl_=ue("span",{className:"vjs-event-bus"});return Object.assign(t,Dk),t.eventedCallbacks&&t.eventedCallbacks.forEach(n=>{n();}),t.on("dispose",()=>{t.off(),[t,t.el_,t.eventBusEl_].forEach(function(n){n&&Nt.has(n)&&Nt.delete(n);}),j.default.setTimeout(()=>{t.eventBusEl_=null;},0);}),t;}function Yb(t,e){return Object.assign(t,Ik),t.state=Object.assign({},t.state,e),typeof t.handleStateChanged=="function"&&An(t)&&t.on("statechanged",t.handleStateChanged),t;}function Pk(t,e,i){if(typeof e!="number"||e<0||e>i)throw new Error(`Failed to execute '${t}' on 'TimeRanges': The index provided (${e}) is non-numeric or out of bounds (0-${i}).`);}function Ly(t,e,i,n){return Pk(t,n,i.length-1),i[n][e];}function Kh(t){let e;return t===void 0||t.length===0?e={length:0,start(){throw new Error("This TimeRanges object is empty");},end(){throw new Error("This TimeRanges object is empty");}}:e={length:t.length,start:Ly.bind(null,"start",0,t),end:Ly.bind(null,"end",1,t)},j.default.Symbol&&j.default.Symbol.iterator&&(e[j.default.Symbol.iterator]=()=>(t||[]).values()),e;}function Ri(t,e){return Array.isArray(t)?Kh(t):t===void 0||e===void 0?Kh():Kh([[t,e]]);}function Qb(t){pp=t;}function Jb(){pp=Kb;}function Dr(t,e=t){return pp(t,e);}function Zb(t,e){let i=0,n,r;if(!e)return 0;(!t||!t.length)&&(t=Ri(0,0));for(let s=0;s<t.length;s++)n=t.start(s),r=t.end(s),r>e&&(r=e),i+=r-n;return i/e;}function Qe(t){if(t instanceof Qe)return t;typeof t=="number"?this.code=t:typeof t=="string"?this.message=t:Ji(t)&&(typeof t.code=="number"&&(this.code=t.code),Object.assign(this,t)),this.message||(this.message=Qe.defaultMessages[this.code]||"");}function Ka(t){return t!=null&&typeof t.then=="function";}function Yi(t){Ka(t)&&t.then(null,e=>{});}function Fk(t,e,i,n,r={}){let s=t.textTracks();r.kind=e,i&&(r.label=i),n&&(r.language=n),r.tech=t;let a=new Ot.text.TrackClass(r);return s.addTrack(a),a;}function Uk(t,e){Cr[t]=Cr[t]||[],Cr[t].push(e);}function Vk(t,e,i){t.setTimeout(()=>Sr(e,Cr[e.type],i,t),1);}function qk(t,e){t.forEach(i=>i.setTech&&i.setTech(e));}function Hk(t,e,i){return t.reduceRight(vp(i),e[i]());}function $k(t,e,i,n){return e[i](t.reduce(vp(i),n));}function jy(t,e,i,n=null){let r="call"+tt(i),s=t.reduce(vp(r),n),a=s===Mu,o=a?null:e[i](s);return Wk(t,i,o,a),o;}function vp(t){return(e,i)=>e===Mu?Mu:i[t]?i[t](e):e;}function Wk(t,e,i,n){for(let r=t.length-1;r>=0;r--){let s=t[r];s[e]&&s[e](n,i);}}function Yk(t){ju.hasOwnProperty(t.id())&&delete ju[t.id()];}function Xk(t,e){let i=ju[t.id()],n=null;if(i==null)return n=e(t),ju[t.id()]=[[e,n]],n;for(let r=0;r<i.length;r++){let[s,a]=i[r];s===e&&(n=a);}return n===null&&(n=e(t),i.push([e,n])),n;}function Sr(t={},e=[],i,n,r=[],s=!1){let[a,...o]=e;if(typeof a=="string")Sr(t,Cr[a],i,n,r,s);else if(a){let u=Xk(n,a);if(!u.setSource)return r.push(u),Sr(t,o,i,n,r,s);u.setSource(Object.assign({},t),function(c,p){if(c)return Sr(t,o,i,n,r,s);r.push(u),Sr(p,t.type===p.type?o:Cr[p.type],i,n,r,s);});}else o.length?Sr(t,o,i,n,r,s):s?i(t,r):Sr(t,Cr["*"],i,n,r,!0);}function By(t){if(!t.type){let e=Bu(t.src);e&&(t.type=e);}return t;}function ef(t,e){let i;if(t.length===4)i=t[1]+t[1]+t[2]+t[2]+t[3]+t[3];else if(t.length===7)i=t.slice(1);else throw new Error("Invalid color code provided, "+t+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+e+")";}function Gi(t,e,i){try{t.style[e]=i;}catch{return;}}function qy(t){return t?`${t}px`:"";}function Ao(t,e,i){return t=Number(t),Math.min(i,Math.max(e,isNaN(t)?e:t));}function iT(t,e){if(e&&(t=e(t)),t&&t!=="none")return t;}function nP(t,e){let i=t.options[t.options.selectedIndex].value;return iT(i,e);}function rP(t,e,i){if(e){for(let n=0;n<t.options.length;n++)if(iT(t.options[n].value,i)===e){t.selectedIndex=n;break;}}}function pP(t,e){let i=!1;return function(...n){return i||_e.warn(t),i=!0,e.apply(this,n);};}
17function Ni(t,e,i,n){return pP(`${e} is deprecated and will be removed in ${t}.0; please use ${i} instead.`,n);}function N(t,e,i){let n=N.getPlayer(t);if(n)return e&&_e.warn(`Player "${t}" is already initialised. Options will not be applied.`),i&&n.ready(i),n;let r=typeof t=="string"?er("#"+aT(t)):t;if(!qs(r))throw new TypeError("The element or ID supplied is not valid. (videojs)");let a=("getRootNode"in r?r.getRootNode()instanceof j.default.ShadowRoot:!1)?r.getRootNode():r.ownerDocument.body;(!r.ownerDocument.defaultView||!a.contains(r))&&_e.warn("The element supplied is not included in the DOM"),e=e||{},e.restoreEl===!0&&(e.restoreEl=(r.parentNode&&r.parentNode.hasAttribute&&r.parentNode.hasAttribute("data-vjs-player")?r.parentNode:r).cloneNode(!0)),Zn("beforesetup").forEach(u=>{let c=u(r,Re(e));if(!Ji(c)||Array.isArray(c)){_e.error("please return an object in beforesetup hooks");return;}e=Re(e,c);});let o=z.getComponent("Player");return n=new o(r,e,i),Zn("setup").forEach(u=>u(n)),n;}function Ae(...t){let e=N.obj||N;return(e.merge||e.mergeOptions).apply(e,t);}function mt(...t){let e=N.time||N;return(e.createTimeRanges||e.createTimeRanges).apply(e,t);}function vP(t){if(t.length===0)return"Buffered Ranges are empty";let e=`Buffered Ranges: 
18`;for(let i=0;i<t.length;i++){let n=t.start(i),r=t.end(i);e+=`${n} --> ${r}. Duration (${r-n})
19`;}return e;}function YT(t){try{return new URL(t).pathname.split("/").slice(-2).join("/");}catch{return"";}}function Sn(){}var j,W,op,cf,_b,Qn,hf,Tn,Zn,fk,yb,pk,Eu,Tu,Iy,Ga,Qt,mk,_e,bb,gk,Tb,vk,lp,Eb,Oi,xb,Cb,xs,Cs,Zi,up,wd,_
19k,wb,xu,Dd,Cu,Id,wu,Du,Iu,Za,Gn,At,kd,Db,er,Fb,Vb,qb,mf,bk,Hb,$b,Nt,Tk,Sk,gu,Ak,Ek,xk,_i,Be,en,zb,Ck,Ha,jt,Md,An,wk,_f,ku,Gb,Wb,Xh,Tr,Dk,Ik,Xa,tt,Xb,kk,z,Kb,pp,Lk,yf,Rk,Ok,bf,Qh,tr,xn,Jh,Pu,Zh,Lu,io,Tf,Ru,Nk,jk,Mk,Ry,no,mp,eT,gp,Bd,Bk,Oy,Ny,Ir,Ou,Nu,ir,gi,Ms,Ot,De,Cr,ju,Mu,zk,Gk,My,Kk,Bu,Qk,tT,Jk,Fy,bs,Uy,Sf,Af,Bs,ro,mi,Vy,Zk,Ef,xf,gt,Fu,Cf,Uu,nr,so,ao,wf,oo,Df,Vu,eP,lo,tf,If,kf,uo,qu,Hu,$u,zu,Gu,tP,Pf,Lf,Wu,Fs,Yu,iP,Xu,Ku,Qu,Ju,Zu,co,ho,kr,Pr,ed,rr,td,fo,po,mo,go,vo,id,_o,nd,rd,yo,sd,ad,Rf,od,ld,ud,En,dd,cd,hd,nf,Hy,$y,zy,Gy,Wy,Yy,Xy,Ky,rf,sf,Qy,Kn,Of,Nf,sP,jf,Mf,aP,Bf,Ff,oP,nT,lP,Jy,uP,dP,cP,Z,rT,af,Uf,Su,hP,Fe,$a,Au,ws,Ss,fd,vu,sT,pd,fP,Zy,sr,mP,aT,Vf,Us,oT,gP,lT,Jt,md,yi,Xi,Ki,uT,As,_u,_P,yP,dT,bP,Er,TP,of,_p,yp,qf,cT,hT,fT,SP,AP,pT,mT,Qa,gT,EP,xP,vT,bp,Fd,CP,wP,_T,DP,Hf,Tp,eb,Eo,Zt,yT,Ds,bT,IP,$s,TT,kP,PP,LP,ST,gd,AT,wr,RP,ET,xT,OP,bo,tb,Ja,NP,jP,MP,BP,CT,wT,DT,$f,zf,ib,Jn,Gf,FP,UP,IT,VP,Wf,qP,HP,$P,kT,vd,PT,LT,zP,GP,WP,RT,YP,XP,KP,QP,JP,ZP,eL,OT,lf,tL,iL,nb,nL,rL,sL,aL,oL,rb,lL,To,pt,uL,NT,dL,jT,MT,BT,cL,hL,fL,pL,mL,FT,UT,sb,VT,gL,vL,qT,_L,uf,Is,Qi,HT,Yf,yL,bL,Sp,ab,TL,SL,$T,AL,EL,xL,zT,GT,CL,wL,DL,IL,kL,yu,ob,ks,Ps,Ap,PL,WT,lb,LL,RL,OL,NL,jL,ML,BL,FL,UL,VL,qL,ub,Wa,HL,$L,zL,GL,WL,YL,za,XL,db,bu,KL,QL,Ts,cb,JL,Xf,ZL,eR,Wn,tR,hb,iR,Ar,So,XT,nR,Kf,rR,Ls,KT,Wi,ai,oi,fb,_d,pb,sR,mb,Qf,Jf,aR,oR,yd,Zf,bd,Td,lR,df,ep,tp,uR,dR,cR,QT,ip,hR,fR,pR,Sd,gb,mR,JT,gR,vR,_R,yR,bR,Ad,np,TR,SR,Yn,AR,ER,xR,rp,CR,sp,wR,vb,ap,DR,ZT,IR,eS,kR,PR,LR,RR,Ke,tS,iS,OR,NR,jR,MR,BR,nS,FR,UR,rS,sS,aS,oS,VR,Ed,xd,qR,Lr=ut(()=>{"use strict";j=et(Pi()),W=et(Gl()),op=et(b0()),cf=et(O0());nh();rh();B0();q0();H0();$n();ny();_b=et(uy());Fh();Ay();Qn=et(Dy());hf="8.23.3",Tn={},Zn=function(t,e){return Tn[t]=Tn[t]||[],e&&(Tn[t]=Tn[t].concat(e)),Tn[t];},fk=function(t,e){Zn(t,e);},yb=function(t,e){let i=Zn(t).indexOf(e);return i<=-1?!1:(Tn[t]=Tn[t].slice(),Tn[t].splice(i,1),!0);},pk=function(t,e){Zn(t,[].concat(e).map(i=>{let n=(...r)=>(yb(t,n),i(...r));return n;}));},Eu={prefixed:!0},Tu=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],Iy=Tu[0];for(let t=0;t<Tu.length;t++)if(Tu[t][1]in W.default){Ga=Tu[t];break;}if(Ga){for(let t=0;t<Ga.length;t++)Eu[Iy[t]]=Ga[t];Eu.prefixed=Ga[0]!==Iy[0];}Qt=[],mk=(t,e,i)=>(n,r,s)=>{let a=e.levels[r],o=new RegExp(`^(${a})$`),u=t;if(n!=="log"&&s.unshift(n.toUpperCase()+":"),i&&(u=`%c${t}`,s.unshift(i)),s.unshift(u+":"),Qt){Qt.push([].concat(s));let p=Qt.length-1e3;Qt.splice(0,p>0?p:0);}if(!j.default.console)return;let c=j.default.console[n];!c&&n==="debug"&&(c=j.default.console.info||j.default.console.log),!(!c||!a||!o.test(n))&&c[Array.isArray(s)?"apply":"call"](j.default.console,s);};_e=ff("VIDEOJS"),bb=_e.createLogger,gk=Object.prototype.toString,Tb=function(t){return Ji(t)?Object.keys(t):[];};vk=Object.freeze({__proto__:null,each:Es,reduce:Sb,isObject:Ji,isPlain:Rs,merge:Re,values:Ab,defineLazyProperty:Cd}),lp=!1,Eb=null,Oi=!1,Cb=!1,xs=!1,Cs=!1,Zi=!1,up=null,wd=null,_k=!!(j.default.cast&&j.default.cast.framework&&j.default.cast.framework.CastReceiverContext),wb=null,xu=!1,Dd=!1,Cu=!1,Id=!1,wu=!1,Du
19=!1,Iu=!1,Za=!!(Vs()&&("ontouchstart"in j.default||j.default.navigator.maxTouchPoints||j.default.DocumentTouch&&j.default.document instanceof j.default.DocumentTouch)),Gn=j.default.navigator&&j.default.navigator.userAgentData;Gn&&Gn.platform&&Gn.brands&&(Oi=Gn.platform==="Android",xs=!!Gn.brands.find(t=>t.brand==="Microsoft Edge"),Cs=!!Gn.brands.find(t=>t.brand==="Chromium"),Zi=!xs&&Cs,up=wd=(Gn.brands.find(t=>t.brand==="Chromium")||{}).version||null,Dd=Gn.platform==="Windows");if(!Cs){let t=j.default.navigator&&j.default.navigator.userAgent||"";lp=/iPod/i.test(t),Eb=function(){let e=t.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null;}(),Oi=/Android/i.test(t),xb=function(){let e=t.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;let i=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return i&&n?parseFloat(e[1]+"."+e[2]):i||null;}(),Cb=/Firefox/i.test(t),xs=/Edg/i.test(t),Cs=/Chrome/i.test(t)||/CriOS/i.test(t),Zi=!xs&&Cs,up=wd=function(){let e=t.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null;}(),wb=function(){let e=/MSIE\s(\d+)\.\d/.exec(t),i=e&&parseFloat(e[1]);return!i&&/Trident\/7.0/i.test(t)&&/rv:11.0/.test(t)&&(i=11),i;}(),wu=/Tizen/i.test(t),Du=/Web0S/i.test(t),Iu=wu||Du,xu=/Safari/i.test(t)&&!Zi&&!Oi&&!xs&&!Iu,Dd=/Windows/i.test(t),Cu=/iPad/i.test(t)||xu&&Za&&!/iPhone/i.test(t),Id=/iPhone/i.test(t)&&!Cu;}At=Id||Cu||lp,kd=(xu||At)&&!Zi,Db=Object.freeze({__proto__:null,get IS_IPOD(){return lp;},get IOS_VERSION(){return Eb;},get IS_ANDROID(){return Oi;},get ANDROID_VERSION(){return xb;},get IS_FIREFOX(){return Cb;},get IS_EDGE(){return xs;},get IS_CHROMIUM(){return Cs;},get IS_CHROME(){return Zi;},get CHROMIUM_VERSION(){return up;},get CHROME_VERSION(){return wd;},IS_CHROMECAST_RECEIVER:_k,get IE_VERSION(){return wb;},get IS_SAFARI(){return xu;},get IS_WINDOWS(){return Dd;},get IS_IPAD(){return Cu;},get IS_IPHONE(){return Id;},get IS_TIZEN(){return wu;},get IS_WEBOS(){return Du;},get IS_SMART_TV(){return Iu;},TOUCH_ENABLED:Za,IS_IOS:At,IS_ANY_SAFARI:kd});er=kb("querySelector"),Fb=kb("querySelectorAll");Vb=Object.freeze({__proto__:null,isReal:Vs,isEl:qs,isInFrame:Ib,createEl:ue,textContent:ar,prependTo:pf,hasClass:Ya,addClass:xr,removeClass:Pd,toggleClass:Pb,setAttributes:Lb,getAttributes:Xn,getAttribute:Rb,setAttribute:Os,removeAttribute:Ld,blockTextSelection:Ob,unblockTextSelection:Nb,getBoundingClientRect:Ns,findPosition:eo,getPointerPosition:Rd,isTextNode:jb,emptyEl:Od,normalizeContent:Mb,appendContent:dp,insertContent:Bb,isSingleLeftClick:to,$:er,$$:Fb,computedStyle:js,copyStyleSheetsToWindow:Ub}),qb=!1,bk=function(){if(mf.options.autoSetup===!1)return;let t=Array.prototype.slice.call(W.default.getElementsByTagName("video")),e=Array.prototype.slice.call(W.default.getElementsByTagName("audio")),i=Array.prototype.slice.call(W.default.getElementsByTagName("video-js")),n=t.concat(e,i);if(n&&n.length>0)for(let r=0,s=n.length;r<s;r++){let a=n[r];if(a&&a.getAttribute)a.player===void 0&&a.getAttribute("data-setup")!==null&&mf(a);else{gf(1);break;}}else qb||gf(1);};Vs()&&(W.default.readyState==="complete"?vf():j.default.addEventListener("load",vf));Hb=function(t){let e=W.default.createElement("style");return e.className=t,e;},$b=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e;},Nt=new WeakMap(),Tk=3,Sk=Tk;Ak=function(){if(typeof gu!="boolean"){gu=!1;try{let t=Object.defineProperty({},"passive",{get(){gu=!0;}});j.default.addEventListener("test",null,t),j.default.removeEventListener("test",null,t);}catch{}}return gu;},Ek=["touchstart","touchmove"];xk=Object.freeze({__proto__:null,fixEvent:Nd,on:li,off:Et,trigger:Hs,one:jd,any:hp}),_i=30,Be=function(t,e,i){e.guid||(e.guid=vi());let n=e.bind(t);return n.guid=i?i+"_"+e.guid:e.guid,n;},en=function(t,e){let i=j.default.performance.now();return function(...r){let s=j.default.performance.now();s-i>=e&&(t(...r),i=s);};},zb=function(t,e,i,n=j.default){let r,s=()=>{n.clearTimeout(r),r=null;},a=function(){let o=this,u=arguments,c=function(){r=null,c=null,i||t.apply(o,u);};!r&&i&&t.apply(o,u),n.clearTimeout(r),r=n.setTimeout(c,e);};return a.cancel=s,a;},Ck=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:_i,bind_:Be,throttle:en,debounce:zb}),jt=class{on(e,i){let n=this.addEventListener;this.addEventListener=()=>{},li(this,e,i),this.addEventListener=n;}off(e,i){Et(this,e,i);}one(e,i){let n=this.addEventListener;this.addEventListener=()=>{},jd(this,e,i),this.addEventListener=n;}any(e,i){let n=this.addEventListener;this.addEventListener=()=>{},hp(this,e,i),this.addEventListener=n;}trigger(e){let i=e.type||e;typeof e=="string"&&(e={type:i}),e=Nd(e),this.allowedEvents_[i]&&this["on"+i]&&this["on"+i](e),Hs(this,e);}queueTrigger(e){Ha||(Ha=new Map());let i=e.type||e,n=Ha.get(this);n||(n=new Map(),Ha.set(this,n));let r=n.get(i);n.delete(i),j.default.clearTimeout(r);let s=j.default.setTimeout(()=>{n.delete(i),n.size===0&&(n=null,Ha.delete(this)),this.trigger(e);},0);n.set(i,s);}};jt.prototype.allowedEvents_={};jt.prototype.addEventListener=jt.prototype.on;jt.prototype.removeEventListener=jt.prototype.off;jt.prototype.dispatchEvent=jt.prototype.trigger;Md=t=>typeof t.name=="function"?t.name():typeof t.name=="string"?t.name:t.name_?t.name_:t.constructor&&t.constructor.name?t.constructor.name:typeof t,An=t=>t instanceof jt||!!t.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof t[e]=="function"),wk=(t,e)=>{An(t)?e():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(e));},_f=t=>typeof t=="string"&&/\S/.test(t)||Array.isArray(t)&&!!t.length,ku=(t,e,i)=>{if(!t||!t.nodeName&&!An(t))throw new Error(`Invalid target for ${Md(e)}#${i}; must be a DOM node or evented object.`);},Gb=(t,e,i)=>{if(!_f(t))throw new Error(`Invalid event type for ${Md(e)}#${i}; must be a non-empty string or array.`);},Wb=(t,e,i)=>{if(typeof t!="function")throw new Error(`Invalid listener for ${Md(e)}#${i}; must be a function.`);},Xh=(t,e,i)=>{let n=e.length<3||e[0]===t||e[0]===t.eventBusEl_,r,s,a;return n?(r=t.eventBusEl_,e.length>=3&&e.shift(),[s,a]=e):(r=e[0],s=e[1],a=e[2]),ku(r,t,i),Gb(s,t,i),Wb(a,t,i),a=Be(t,a),{isTargetingSelf:n,target:r,type:s,listener:a};},Tr=(t,e,i,n)=>{ku(t,t,e),t.nodeName?xk[e](t,i,n):t[e](i,n);},Dk={on(...t){let{isTargetingSelf:e,target:i,type:n,listener:r}=Xh(this,t,"on");
19if(Tr(i,"on",n,r),!e){let s=()=>this.off(i,n,r);s.guid=r.guid;let a=()=>this.off("dispose",s);a.guid=r.guid,Tr(this,"on","dispose",s),Tr(i,"on","dispose",a);}},one(...t){let{isTargetingSelf:e,target:i,type:n,listener:r}=Xh(this,t,"one");if(e)Tr(i,"one",n,r);else{let s=(...a)=>{this.off(i,n,s),r.apply(null,a);};s.guid=r.guid,Tr(i,"one",n,s);}},any(...t){let{isTargetingSelf:e,target:i,type:n,listener:r}=Xh(this,t,"any");if(e)Tr(i,"any",n,r);else{let s=(...a)=>{this.off(i,n,s),r.apply(null,a);};s.guid=r.guid,Tr(i,"any",n,s);}},off(t,e,i){if(!t||_f(t))Et(this.eventBusEl_,t,e);else{let n=t,r=e;ku(n,this,"off"),Gb(r,this,"off"),Wb(i,this,"off"),i=Be(this,i),this.off("dispose",i),n.nodeName?(Et(n,r,i),Et(n,"dispose",i)):An(n)&&(n.off(r,i),n.off("dispose",i));}},trigger(t,e){ku(this.eventBusEl_,this,"trigger");let i=t&&typeof t!="string"?t.type:t;if(!_f(i))throw new Error(`Invalid event type for ${Md(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return Hs(this.eventBusEl_,t,e);}};Ik={state:{},setState(t){typeof t=="function"&&(t=t());let e;return Es(t,(i,n)=>{this.state[n]!==i&&(e=e||{},e[n]={from:this.state[n],to:i}),this.state[n]=i;}),e&&An(this)&&this.trigger({changes:e,type:"statechanged"}),e;}};Xa=function(t){return typeof t!="string"?t:t.replace(/./,e=>e.toLowerCase());},tt=function(t){return typeof t!="string"?t:t.replace(/./,e=>e.toUpperCase());},Xb=function(t,e){return tt(t)===tt(e);},kk=Object.freeze({__proto__:null,toLowerCase:Xa,toTitleCase:tt,titleCaseEquals:Xb}),z=class t{constructor(e,i,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Re({},this.options_),i=this.options_=Re(this.options_,i),this.id_=i.id||i.el&&i.el.id,!this.id_){let r=e&&e.id&&e.id()||"no_player";this.id_=`${r}_component_${vi()}`;}this.name_=i.name||null,i.el?this.el_=i.el:i.createEl!==!1&&(this.el_=this.createEl()),i.className&&this.el_&&i.className.split(" ").forEach(r=>this.addClass(r)),["on","off","one","any","trigger"].forEach(r=>{this[r]=void 0;}),i.evented!==!1&&(fp(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Yb(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set(),this.setIntervalIds_=new Set(),this.rafIds_=new Set(),this.namedRafs_=new Map(),this.clearingTimersOnDispose_=!1,i.initChildren!==!1&&this.initChildren(),this.ready(n),i.reportTouchActivity!==!1&&this.enableTouchActivity();}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let i=this.children_.length-1;i>=0;i--)this.children_[i].dispose&&this.children_[i].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null;}}isDisposed(){return!!this.isDisposed_;}player(){return this.player_;}options(e){return e?(this.options_=Re(this.options_,e),this.options_):this.options_;}el(){return this.el_;}createEl(e,i,n){return ue(e,i,n);}localize(e,i,n=e){let r=this.player_.language&&this.player_.language(),s=this.player_.languages&&this.player_.languages(),a=s&&s[r],o=r&&r.split("-")[0],u=s&&s[o],c=n;return a&&a[e]?c=a[e]:u&&u[e]&&(c=u[e]),i&&(c=c.replace(/\{(\d+)\}/g,function(p,_){let T=i[_-1],y=T;return typeof T>"u"&&(y=p),y;})),c;}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_;}id(){return this.id_;}name(){return this.name_;}children(){return this.children_;}getChildById(e){return this.childIndex_[e];}getChild(e){if(e)return this.childNameIndex_[e];}getDescendant(...e){e=e.reduce((n,r)=>n.concat(r),[]);let i=this;for(let n=0;n<e.length;n++)if(i=i.getChild(e[n]),!i||!i.getChild)return;return i;}setIcon(e,i=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;let n="http://www.w3.org/2000/svg",r=ue("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),s=W.default.createElementNS(n,"svg");s.setAttributeNS(null,"viewBox","0 0 512 512");let a=W.default.createElementNS(n,"use");return s.appendChild(a),a.setAttributeNS(null,"href",`#vjs-icon-${e}`),r.appendChild(s),this.iconIsSet_?i.replaceChild(r,i.querySelector(".vjs-icon-placeholder")):i.appendChild(r),this.iconIsSet_=!0,r;}addChild(e,i={},n=this.children_.length){let r,s;if(typeof e=="string"){s=tt(e);let a=i.componentClass||s;i.name=s;let o=t.getComponent(a);if(!o)throw new Error(`Component ${a} does not exist`);if(typeof o!="function")return null;r=new o(this.player_||this,i);}else r=e;if(r.parentComponent_&&r.parentComponent_.removeChild(r),this.children_.splice(n,0,r),r.parentComponent_=this,typeof r.id=="function"&&(this.childIndex_[r.id()]=r),s=s||r.name&&tt(r.name()),s&&(this.childNameIndex_[s]=r,this.childNameIndex_[Xa(s)]=r),typeof r.el=="function"&&r.el()){let a=null;this.children_[n+1]&&(this.children_[n+1].el_?a=this.children_[n+1].el_:qs(this.children_[n+1])&&(a=this.children_[n+1])),this.contentEl().insertBefore(r.el(),a);}return r;}removeChild(e){if(typeof e=="string"&&(e=this.getChild(e)),!e||!this.children_)return;let i=!1;for(let r=this.children_.length-1;r>=0;r--)if(this.children_[r]===e){i=!0,this.children_.splice(r,1);break;}if(!i)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[tt(e.name())]=null,this.childNameIndex_[Xa(e.name())]=null;let n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el());}initChildren(){let e=this.options_.children;if(e){let i=this.options_,n=a=>{let o=a.name,u=a.opts;if(i[o]!==void 0&&(u=i[o]),u===!1)return;u===!0&&(u={}),u.playerOptions=this.options_.playerOptions;let c=this.addChild(o,u);c&&(this[o]=c);},r,s=t.getComponent("Tech");Array.isArray(e)?r=e:r=Object.keys(e),r.concat(Object.keys(this.options_).filter(function(a){return!r.some(function(o){return typeof o=="str
19ing"?a===o:a===o.name;});})).map(a=>{let o,u;return typeof a=="string"?(o=a,u=e[o]||this.options_[o]||{}):(o=a.name,u=a),{name:o,opts:u};}).filter(a=>{let o=t.getComponent(a.opts.componentClass||tt(a.name));return o&&!s.isTech(o);}).forEach(n);}}buildCSSClass(){return"";}ready(e,i=!1){if(e){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e);return;}i?e.call(this):this.setTimeout(e,1);}}triggerReady(){this.isReady_=!0,this.setTimeout(function(){let e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(i){i.call(this);},this),this.trigger("ready");},1);}$(e,i){return er(e,i||this.contentEl());}$$(e,i){return Fb(e,i||this.contentEl());}hasClass(e){return Ya(this.el_,e);}addClass(...e){xr(this.el_,...e);}removeClass(...e){Pd(this.el_,...e);}toggleClass(e,i){Pb(this.el_,e,i);}show(){this.removeClass("vjs-hidden");}hide(){this.addClass("vjs-hidden");}lockShowing(){this.addClass("vjs-lock-showing");}unlockShowing(){this.removeClass("vjs-lock-showing");}getAttribute(e){return Rb(this.el_,e);}setAttribute(e,i){Os(this.el_,e,i);}removeAttribute(e){Ld(this.el_,e);}width(e,i){return this.dimension("width",e,i);}height(e,i){return this.dimension("height",e,i);}dimensions(e,i){this.width(e,!0),this.height(i);}dimension(e,i,n){if(i!==void 0){(i===null||i!==i)&&(i=0),(""+i).indexOf("%")!==-1||(""+i).indexOf("px")!==-1?this.el_.style[e]=i:i==="auto"?this.el_.style[e]="":this.el_.style[e]=i+"px",n||this.trigger("componentresize");return;}if(!this.el_)return 0;let r=this.el_.style[e],s=r.indexOf("px");return parseInt(s!==-1?r.slice(0,s):this.el_["offset"+tt(e)],10);}currentDimension(e){let i=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(i=js(this.el_,e),i=parseFloat(i),i===0||isNaN(i)){let n=`offset${tt(e)}`;i=this.el_[n];}return i;}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")};}currentWidth(){return this.currentDimension("width");}currentHeight(){return this.currentDimension("height");}getPositions(){let e=this.el_.getBoundingClientRect(),i={x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},n={x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2};return{boundingClientRect:i,center:n};}focus(){this.el_.focus();}blur(){this.el_.blur();}handleKeyDown(e){this.player_&&(e.key!=="Tab"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)&&e.stopPropagation(),this.player_.handleKeyDown(e));}handleKeyPress(e){this.handleKeyDown(e);}emitTapEvents(){let e=0,i=null,n=10,r=200,s;this.on("touchstart",function(o){o.touches.length===1&&(i={pageX:o.touches[0].pageX,pageY:o.touches[0].pageY},e=j.default.performance.now(),s=!0);}),this.on("touchmove",function(o){if(o.touches.length>1)s=!1;else if(i){let u=o.touches[0].pageX-i.pageX,c=o.touches[0].pageY-i.pageY;Math.sqrt(u*u+c*c)>n&&(s=!1);}});let a=function(){s=!1;};this.on("touchleave",a),this.on("touchcancel",a),this.on("touchend",function(o){i=null,s===!0&&j.default.performance.now()-e<r&&(o.preventDefault(),this.trigger("tap"));});}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;let e=Be(this.player(),this.player().reportUserActivity),i;this.on("touchstart",function(){e(),this.clearInterval(i),i=this.setInterval(e,250);});let n=function(r){e(),this.clearInterval(i);};this.on("touchmove",e),this.on("touchend",n),this.on("touchcancel",n);}setTimeout(e,i){var n;return e=Be(this,e),this.clearTimersOnDispose_(),n=j.default.setTimeout(()=>{this.setTimeoutIds_.has(n)&&this.setTimeoutIds_.delete(n),e();},i),this.setTimeoutIds_.add(n),n;}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),j.default.clearTimeout(e)),e;}setInterval(e,i){e=Be(this,e),this.clearTimersOnDispose_();let n=j.default.setInterval(e,i);return this.setIntervalIds_.add(n),n;}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),j.default.clearInterval(e)),e;}requestAnimationFrame(e){this.clearTimersOnDispose_();var i;return e=Be(this,e),i=j.default.requestAnimationFrame(()=>{this.rafIds_.has(i)&&this.rafIds_.delete(i),e();}),this.rafIds_.add(i),i;}requestNamedAnimationFrame(e,i){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),i=Be(this,i);let n=this.requestAnimationFrame(()=>{i(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e);});return this.namedRafs_.set(e,n),e;}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e));}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),j.default.cancelAnimationFrame(e)),e;}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEac
19h(([e,i])=>{this[e].forEach((n,r)=>this[i](r));}),this.clearingTimersOnDispose_=!1;}));}getIsDisabled(){return!!this.el_.disabled;}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert;}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert());}getIsAvailableToBeFocused(e){function i(s){let a=j.default.getComputedStyle(s,null),o=a.getPropertyValue("visibility");return a.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(o);}function n(s){return!(!i(s.parentElement)||!i(s)||s.style.opacity==="0"||j.default.getComputedStyle(s).height==="0px"||j.default.getComputedStyle(s).width==="0px");}function r(s){if(s.offsetWidth+s.offsetHeight+s.getBoundingClientRect().height+s.getBoundingClientRect().width===0)return!1;let a={x:s.getBoundingClientRect().left+s.offsetWidth/2,y:s.getBoundingClientRect().top+s.offsetHeight/2};if(a.x<0||a.x>(W.default.documentElement.clientWidth||j.default.innerWidth)||a.y<0||a.y>(W.default.documentElement.clientHeight||j.default.innerHeight))return!1;let o=W.default.elementFromPoint(a.x,a.y);for(;o;){if(o===s)return!0;if(o.parentNode)o=o.parentNode;else return!1;}}return e||(e=this.el()),!!(r(e)&&n(e)&&(!e.parentElement||e.tabIndex>=0));}static registerComponent(e,i){if(typeof e!="string"||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);let n=t.getComponent("Tech"),r=n&&n.isTech(i),s=t===i||t.prototype.isPrototypeOf(i.prototype);if(r||!s){let o;throw r?o="techs must be registered using Tech.registerTech()":o="must be a Component subclass",new Error(`Illegal component, "${e}"; ${o}.`);}e=tt(e),t.components_||(t.components_={});let a=t.getComponent("Player");if(e==="Player"&&a&&a.players){let o=a.players,u=Object.keys(o);if(o&&u.length>0){for(let c=0;c<u.length;c++)if(o[u[c]]!==null)throw new Error("Can not register Player component after player has been created.");}}return t.components_[e]=i,t.components_[Xa(e)]=i,i;}static getComponent(e){if(!(!e||!t.components_))return t.components_[e];}};z.registerComponent("Component",z);Kb=function(t,e){t=t<0?0:t;let i=Math.floor(t%60),n=Math.floor(t/60%60),r=Math.floor(t/3600),s=Math.floor(e/60%60),a=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(r=n=i="-"),r=r>0||a>0?r+":":"",n=((r||s>=10)&&n<10?"0"+n:n)+":",i=i<10?"0"+i:i,r+n+i;},pp=Kb;Lk=Object.freeze({__proto__:null,createTimeRanges:Ri,createTimeRange:Ri,setFormatTime:Qb,resetFormatTime:Jb,formatTime:Dr});Qe.prototype.code=0;Qe.prototype.message="";Qe.prototype.status=null;Qe.prototype.metadata=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.MEDIA_ERR_CUSTOM=0;Qe.prototype.MEDIA_ERR_CUSTOM=0;Qe.MEDIA_ERR_ABORTED=1;Qe.prototype.MEDIA_ERR_ABORTED=1;Qe.MEDIA_ERR_NETWORK=2;Qe.prototype.MEDIA_ERR_NETWORK=2;Qe.MEDIA_ERR_DECODE=3;Qe.prototype.MEDIA_ERR_DECODE=3;Qe.MEDIA_ERR_SRC_NOT_SUPPORTED=4;Qe.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;Qe.MEDIA_ERR_ENCRYPTED=5;Qe.prototype.MEDIA_ERR_ENCRYPTED=5;yf=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((i,n,r)=>(t[n]&&(i[n]=t[n]),i),{cues:t.cues&&Array.prototype.map.call(t.cues,function(i){return{startTime:i.startTime,endTime:i.endTime,text:i.text,id:i.id};})});},Rk=function(t){let e=t.$$("track"),i=Array.prototype.map.call(e,r=>r.track);return Array.prototype.map.call(e,function(r){let s=yf(r.track);return r.src&&(s.src=r.src),s;}).concat(Array.prototype.filter.call(t.textTracks(),function(r){return i.indexOf(r)===-1;}).map(yf));},Ok=function(t,e){return t.forEach(function(i){let n=e.addRemoteTextTrack(i).track;
19!i.src&&i.cues&&i.cues.forEach(r=>n.addCue(r));}),e.textTracks();},bf={textTracksToJson:Rk,jsonToTextTracks:Ok,trackToJson:yf},Qh="vjs-modal-dialog",tr=class extends z{constructor(e,i){super(e,i),this.handleKeyDown_=n=>this.handleKeyDown(n),this.close_=n=>this.close(n),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=ue("div",{className:`${Qh}-content`},{role:"document"}),this.descEl_=ue("p",{className:`${Qh}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),ar(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_);}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"});}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose();}buildCSSClass(){return`${Qh} vjs-hidden ${super.buildCSSClass()}`;}label(){return this.localize(this.options_.label||"Modal Window");}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e;}open(){if(this.opened_){this.options_.fillAlways&&this.fill();return;}let e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0;}opened(e){return typeof e=="boolean"&&this[e?"open":"close"](),this.opened_;}close(){if(!this.opened_)return;let e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose();}closeable(e){if(typeof e=="boolean"){let i=this.closeable_=!!e,n=this.getChild("closeButton");if(i&&!n){let r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close_);}!i&&n&&(this.off(n,"close",this.close_),this.removeChild(n),n.dispose());}return this.closeable_;}fill(){this.fillWith(this.content());}fillWith(e){let i=this.contentEl(),n=i.parentNode,r=i.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(i),this.empty(),Bb(i,e),this.trigger("modalfill"),r?n.insertBefore(i,r):n.appendChild(i);let s=this.getChild("closeButton");s&&n.appendChild(s.el_),this.trigger("aftermodalfill");}empty(){this.trigger("beforemodalempty"),Od(this.contentEl()),this.trigger("modalempty");}content(e){return typeof e<"u"&&(this.content_=e),this.content_;}conditionalFocus_(){let e=W.default.activeElement,i=this.player_.el_;this.previouslyActiveEl_=null,(i.contains(e)||i===e)&&(this.previouslyActiveEl_=e,this.focus());}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null);}handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),e.key==="Escape"&&this.closeable()){e.preventDefault(),this.close();return;}if(e.key!=="Tab")return;let i=this.focusableEls_(),n=this.el_.querySelector(":focus"),r;for(let s=0;s<i.length;s++)if(n===i[s]){r=s;break;}W.default.activeElement===this.el_&&(r=0),e.shiftKey&&r===0?(i[i.length-1].focus(),e.preventDefault()):!e.shiftKey&&r===i.length-1&&(i[0].focus(),e.preventDefault());}focusableEls_(){let e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,i=>(i instanceof j.default.HTMLAnchorElement||i instanceof j.default.HTMLAreaElement)&&i.hasAttribute("href")||(i instanceof j.default.HTMLInputElement||i instanceof j.default.HTMLSelectElement||i instanceof j.default.HTMLTextAreaElement||i instanceof j.default.HTMLButtonElement)&&!i.hasAttribute("disabled")||i instanceof j.default.HTMLIFrameElement||i instanceof j.default.HTMLObjectElement||i instanceof j.default.HTMLEmbedElement||i.hasAttribute("tabindex")&&i.getAttribute("tabindex")!==-1||i.hasAttribute("contenteditable"));}};
19tr.prototype.options_={pauseOnOpen:!0,temporary:!0};z.registerComponent("ModalDialog",tr);xn=class extends jt{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length;}});for(let i=0;i<e.length;i++)this.addTrack(e[i]);}addTrack(e){let i=this.tracks_.length;""+i in this||Object.defineProperty(this,i,{get(){return this.tracks_[i];}}),this.tracks_.indexOf(e)===-1&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this});},An(e)&&e.addEventListener("labelchange",e.labelchange_);}removeTrack(e){let i;for(let n=0,r=this.length;n<r;n++)if(this[n]===e){i=this[n],i.off&&i.off(),this.tracks_.splice(n,1);break;}i&&this.trigger({track:i,type:"removetrack",target:this});}getTrackById(e){let i=null;for(let n=0,r=this.length;n<r;n++){let s=this[n];if(s.id===e){i=s;break;}}return i;}};xn.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(let t in xn.prototype.allowedEvents_)xn.prototype["on"+t]=null;Jh=function(t,e){for(let i=0;i<t.length;
19i++)!Object.keys(t[i]).length||e.id===t[i].id||(t[i].enabled=!1);},Pu=class extends xn{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].enabled){Jh(e,e[i]);break;}super(e),this.changing_=!1;}addTrack(e){e.enabled&&Jh(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Jh(this,e),this.changing_=!1,this.trigger("change"));},e.addEventListener("enabledchange",e.enabledChange_));}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null);}},Zh=function(t,e){for(let i=0;i<t.length;i++)!Object.keys(t[i]).length||e.id===t[i].id||(t[i].selected=!1);},Lu=class extends xn{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].selected){Zh(e,e[i]);break;}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let i=0;i<this.length;i++)if(this[i].selected)return i;return-1;},set(){}});}addTrack(e){e.selected&&Zh(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Zh(this,e),this.changing_=!1,this.trigger("change"));},e.addEventListener("selectedchange",e.selectedChange_));}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null);}},io=class extends xn{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_),["metadata","chapters"].indexOf(e.kind)===-1&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_);}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_));}toJSON(){return this.tracks_.map(e=>e.toJSON());}},Tf=class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length;}});for(let i=0,n=e.length;i<n;i++)this.addTrackElement_(e[i]);}addTrackElement_(e){let i=this.trackElements_.length;""+i in this||Object.defineProperty(this,i,{get(){return this.trackElements_[i];}}),this.trackElements_.indexOf(e)===-1&&this.trackElements_.push(e);}getTrackElementByTrack_(e){let i;for(let n=0,r=this.trackElements_.length;n<r;n++)if(e===this.trackElements_[n].track){i=this.trackElements_[n];break;}return i;}removeTrackElement_(e){for(let i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i]){this.trackElements_[i].track&&typeof this.trackElements_[i].track.off=="function"&&this.trackElements_[i].track.off(),typeof this.trackElements_[i].off=="function"&&this.trackElements_[i].off(),this.trackElements_.splice(i,1);break;}}},Ru=class t{constructor(e){t.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_;}});}setCues_(e){let i=this.length||0,n=0,r=e.length;this.cues_=e,this.length_=e.length;let s=function(a){""+a in this||Object.defineProperty(this,""+a,{get(){return this.cues_[a];}});};if(i<r)for(n=i;n<r;n++)s.call(this,n);}getCueById(e){let i=null;for(let n=0,r=this.length;n<r;n++){let s=this[n];if(s.id===e){i=s;break;}}return i;}},Nk={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},jk={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Mk={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Ry={disabled:"disabled",hidden:"hidden",showing:"showing"},no=class extends jt{constructor(e={}){super();let i={id:e.id||"vjs_track_"+vi(),kind:e.kind||"",language:e.language||""},n=e.label||"";for(let r in i)Object.defineProperty(this,r,{get(){return i[r];},set(){}});Object.defineProperty(this,"label",{get(){return n;},set(r){r!==n&&(n=r,this.trigger("labelchange"));}});}},mp=function(t){return new URL(t,W.default.baseURI);},eT=function(t){return new URL(t,W.default.baseURI).href;},gp=function(t){if(typeof t=="string"){let i=t.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return i?i[1].toLowerCase():"";}return"";},Bd=function(t,e=j.default.location){return mp(t).origin!==e.origin;},Bk=Object.freeze({__proto__:null,parseUrl:mp,getAbsoluteURL:eT,getFileExtension:gp,isCrossOrigin:Bd}),Oy=function(t,e){let i=new j.default.WebVTT.Parser(j.default,j.default.vttjs,j.default.WebVTT.StringDecoder()),n=[];i.oncue=function(r){e.addCue(r);},i.onparsingerror=function(r){n.push(r);},i.onflush=function(){e.trigger({type:"loadeddata",target:e});},i.parse(t),n.length>0&&(j.default.console&&j.default.console.groupCollapsed&&j.default.console.groupCollapsed(`Text Track parsing errors for ${e.src}
19`),n.forEach(r=>_e.error(r)),j.default.console&&j.default.console.groupEnd&&j.default.console.groupEnd()),i.flush();},Ny=function(t,e){let i={uri:t},n=Bd(t);n&&(i.cors=n);let r=e.tech_.crossOrigin()==="use-credentials";r&&(i.withCredentials=r),(0,op.default)(i,Be(this,function(s,a,o){if(s)return _e.error(s,a);e.loaded_=!0,typeof j.default.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],u=>{if(u.type==="vttjserror"){_e.error(`vttjs failed to load, stopping trying to process ${e.src}`);return;}return Oy(o,e);}):Oy(o,e);}));},Ir=class extends no{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");let i=Re(e,{kind:Mk[e.kind]||"subtitles",language:e.language||e.srclang||""}),n=Ry[i.mode]||"disabled",r=i.default;(i.kind==="metadata"||i.kind==="chapters")&&(n="hidden"),super(i),this.tech_=i.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;let s=new Ru(this.cues_),a=new Ru(this.activeCues_),o=!1;this.timeupdateHandler=Be(this,function(c={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){c.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return;}this.activeCues=this.activeCues,o&&(this.trigger("cuechange"),o=!1),c.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));}});let u=()=>{this.stopTracking();};this.tech_.one("dispose",u),n!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return r;},set(){}},mode:{get(){return n;},set(c){Ry[c]&&n!==c&&(n=c,!this.preload_&&n!=="disabled"&&this.cues.length===0&&Ny(this.src,this),this.stopTracking(),n!=="disabled"&&this.startTracking(),this.trigger("modechange"));}},cues:{get(){return this.loaded_?s:null;},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return a;let c=this.tech_.currentTime(),p=[];for(let _=0,T=this.cues.length;_<T;_++){let y=this.cues[_];y.startTime<=c&&y.endTime>=c&&p.push(y);}if(o=!1,p.length!==this.activeCues_.length)o=!0;else for(let _=0;_<p.length;_++)this.activeCues_.indexOf(p[_])===-1&&(o=!0);return this.activeCues_=p,a.setCues_(this.activeCues_),a;},set(){}}}),i.src?(this.src=i.src,this.preload_||(this.loaded_=!0),(this.preload_||i.kind!=="subtitles"&&i.kind!=="captions")&&Ny(this.src,this)):this.loaded_=!0;}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler);}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler);}addCue(e){let i=e;if(!("getCueAsHTML"in i)){i=new j.default.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(let r in e)r in i||(i[r]=e[r]);i.id=e.id,i.originalCue_=e;}let n=this.tech_.textTracks();for(let r=0;r<n.length;r++)n[r]!==this&&n[r].removeCue(i);this.cues_.push(i),this.cues.setCues_(this.cues_);}toJSON(){return bf.trackToJson(this);}removeCue(e){let i=this.cues_.length;for(;i--;){let n=this.cues_[i];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(i,1),this.cues.setCues_(this.cues_);break;}}}};Ir.prototype.allowedEvents_={cuechange:"cuechange"};Ou=class extends no{constructor(e={}){let i=Re(e,{kind:jk[e.kind]||""});super(i);let n=!1;Object.defineProperty(this,"enabled",{get(){return n;},set(r){typeof r!="boolean"||r===n||(n=r,this.trigger("enabledchange"));}}),i.enabled&&(this.enabled=i.enabled),this.loaded_=!0;}},Nu=class extends no{constructor(e={}){let i=Re(e,{kind:Nk[e.kind]||""});super(i);let n=!1;Object.defineProperty(this,"selected",{get(){return n;},set(r){typeof r!="boolean"||r===n||(n=r,this.trigger("selectedchange"));}}),i.selected&&(this.selected=i.selected);}},ir=class t extends jt{constructor(e={}){super();let i,n=new Ir(e);this.kind=n.kind,this.src=n.src,this.srclang=n.language,this.label=n.label,this.default=n.default,Object.defineProperties(this,{readyState:{get(){return i;}},track:{get(){return n;}}}),i=t.NONE,n.addEventListener("loadeddata",()=>{i=t.LOADED,this.trigger({type:"load",target:this});});}};ir.prototype.allowedEvents_={load:"load"};ir.NONE=0;ir.LOADING=1;ir.LOADED=2;ir.ERROR=3;
19gi={audio:{ListClass:Pu,TrackClass:Ou,capitalName:"Audio"},video:{ListClass:Lu,TrackClass:Nu,capitalName:"Video"},text:{ListClass:io,TrackClass:Ir,capitalName:"Text"}};Object.keys(gi).forEach(function(t){gi[t].getterName=`${t}Tracks`,gi[t].privateName=`${t}Tracks_`;});Ms={remoteText:{ListClass:io,TrackClass:Ir,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Tf,TrackClass:ir,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Ot=Object.assign({},gi,Ms);Ms.names=Object.keys(Ms);gi.names=Object.keys(gi);Ot.names=[].concat(Ms.names).concat(gi.names);De=class t extends z{constructor(e={},i=function(){}){e.reportTouchActivity=!1,super(null,e,i),this.onDurationChange_=n=>this.onDurationChange(n),this.trackProgress_=n=>this.trackProgress(n),this.trackCurrentTime_=n=>this.trackCurrentTime(n),this.stopTrackingCurrentTime_=n=>this.stopTrackingCurrentTime(n),this.disposeSourceHandler_=n=>this.disposeSourceHandler(n),this.queuedHanders_=new Set(),this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0;}),this.on("loadstart",function(){this.hasStarted_=!1;}),Ot.names.forEach(n=>{let r=Ot[n];e&&e[r.getterName]&&(this[r.privateName]=e[r.getterName]);}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(n=>{e[`native${n}Tracks`]===!1&&(this[`featuresNative${n}Tracks`]=!1);}),e.nativeCaptions===!1||e.nativeTextTracks===!1?this.featuresNativeTextTracks=!1:(e.nativeCaptions===!0||e.nativeTextTracks===!0)&&(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=e.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new Ot.text.ListClass(),this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech");}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"});}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_);}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_);}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Be(this,function(){let i=this.bufferedPercent();this.bufferedPercent_!==i&&this.trigger("progress"),this.bufferedPercent_=i,i===1&&this.stopTrackingProgress();}),500);}onDurationChange(e){this.duration_=this.duration();}buffered(){return Ri(0,0);}bufferedPercent(){return Zb(this.buffered(),this.duration_);}stopTrackingProgress(){this.clearInterval(this.progressInterval);}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_);}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_);}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0});},250);}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0});}dispose(){this.clearTracks(gi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose();}clearTracks(e){e=[].concat(e),e.forEach(i=>{let n=this[`${i}Tracks`]()||[],r=n.length;for(;r--;){let s=n[r];i==="text"&&this.removeRemoteTextTrack(s),n.removeTrack(s);}});}cleanupAutoTextTracks(){let e=this.autoRemoteTextTracks_||[],i=e.length;for(;i--;){let n=e[i];this.removeRemoteTextTrack(n);}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return e!==void 0&&(this.error_=new Qe(e),this.trigger("error")),this.error_;}played(){return this.hasStarted_?Ri(0,0):Ri();}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0});}
19initTrackListeners(){gi.names.forEach(e=>{let i=gi[e],n=()=>{this.trigger(`${e}trackchange`);},r=this[i.getterName]();r.addEventListener("removetrack",n),r.addEventListener("addtrack",n),this.on("dispose",()=>{r.removeEventListener("removetrack",n),r.removeEventListener("addtrack",n);});});}addWebVttScript_(){if(!j.default.WebVTT)if(W.default.body.contains(this.el())){if(!this.options_["vtt.js"]&&Rs(cf.default)&&Object.keys(cf.default).length>0){this.trigger("vttjsloaded");return;}let e=W.default.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded");},e.onerror=()=>{this.trigger("vttjserror");},this.on("dispose",()=>{e.onload=null,e.onerror=null;}),j.default.WebVTT=!0,this.el().parentNode.appendChild(e);}else this.ready(this.addWebVttScript_);}emulateTextTracks(){let e=this.textTracks(),i=this.remoteTextTracks(),n=o=>e.addTrack(o.track),r=o=>e.removeTrack(o.track);i.on("addtrack",n),i.on("removetrack",r),this.addWebVttScript_();let s=()=>this.trigger("texttrackchange"),a=()=>{s();for(let o=0;o<e.length;o++){let u=e[o];u.removeEventListener("cuechange",s),u.mode==="showing"&&u.addEventListener("cuechange",s);}};a(),e.addEventListener("change",a),e.addEventListener("addtrack",a),e.addEventListener("removetrack",a),this.on("dispose",function(){i.off("addtrack",n),i.off("removetrack",r),e.removeEventListener("change",a),e.removeEventListener("addtrack",a),e.removeEventListener("removetrack",a);for(let o=0;o<e.length;o++)e[o].removeEventListener("cuechange",s);});}addTextTrack(e,i,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return Fk(this,e,i,n);}createRemoteTextTrack(e){let i=Re(e,{tech:this});return new Ms.remoteTextEl.TrackClass(i);}addRemoteTextTrack(e={},i){let n=this.createRemoteTextTrack(e);return typeof i!="boolean"&&(i=!1),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),i===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(n.track)),n;}removeRemoteTextTrack(e){let i=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(i),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e);}getVideoPlaybackQuality(){return{};}requestPictureInPicture(){return Promise.reject();}disablePictureInPicture(){return!0;}setDisablePictureInPicture(){}requestVideoFrameCallback(e){let i=vi();return!this.isReady_||this.paused()?(this.queuedHanders_.add(i),this.one("playing",()=>{this.queuedHanders_.has(i)&&(this.queuedHanders_.delete(i),e());})):this.requestNamedAnimationFrame(i,e),i;}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e);}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return"";}static canPlayType(e){return"";}static canPlaySource(e,i){return t.canPlayType(e.type);}static isTech(e){return e.prototype instanceof t||e instanceof t||e===t;}static registerTech(e,i){if(t.techs_||(t.techs_={}),!t.isTech(i))throw new Error(`Tech ${e} must be a Tech`);if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=tt(e),t.techs_[e]=i,t.techs_[Xa(e)]=i,e!=="Tech"&&t.defaultTechOrder_.push(e),i;}static getTech(e){if(e){if(t.techs_&&t.techs_[e])return t.techs_[e];if(e=tt(e),j.default&&j.default.videojs&&j.default.videojs[e])return _e.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),j.default.videojs[e];}}};Ot.names.forEach(function(t){let e=Ot[t];De.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass(),this[e.privateName];};});De.prototype.featuresVolumeControl=!0;De.prototype.featuresMuteControl=!0;De.prototype.featuresFullscreenResize=!1;De.prototype.featuresPlaybackRate=!1;De.prototype.featuresProgressEvents=!1;De.prototype.featuresSourceset=!1;De.prototype.featuresTimeupdateEvents=!1;De.prototype.featuresNativeTextTracks=!1;De.prototype.featuresVideoFrameCallback=!1;De.withSourceHandlers=function(t){t.registerSourceHandler=function(i,n){let r=t.sourceHandlers;r||(r=t.sourceHandlers=[]),n===void 0&&(n=r.length),r.splice(n,0,i);},t.canPlayType=function(i){let n=t.sourceHandlers||[],r;for(let s=0;s<n.length;s++)if(r=n[s].canPlayType(i),r)return r;return"";},t.selectSourceHandler=function(i,n){let r=t.sourceHandlers||[],s;for(let a=0;a<r.length;a++)if(s=r[a].canHandleSource(i,n),s)return r[a];return null;},t.canPlaySource=function(i,n){let r=t.selectSourceHandler(i,n);return r?r.canHandleSource(i,n):"";},["seekable","seeking","duration"].forEach(function(i){let n=this[i];typeof n=="function"&&(this[i]=function(){return this.sourceHandler_&&this.sourceHandler_[i]?this.sourceHandler_[i].apply(this.sourceHandler_,arguments):n.apply(this,arguments);});},t.prototype),t.prototype.setSource=function(i){let n=t.selectSourceHandler(i,this.options_);n||(t.nativeSourceHandler?n=t.nativeSourceHandler:_e.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==t.nativeSourceHandler&&(this.currentSource_=i),this.sourceHandler_=n.handleSource(i,this,this.options_),this.one("dispose",this.disposeSourceHandler_);},t.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null);};};z.registerComponent("Tech",De);De.registerTech("Tech",De);De.defaultTechOrder_=[];Cr={},ju={},Mu={};zk={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Gk={setCurrentTime:1,setMuted:1,setVolume:1},My={play:1,pause:1};Kk={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/d
19ash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Bu=function(t=""){let e=gp(t);return Kk[e.toLowerCase()]||"";},Qk=(t,e)=>{if(!e)return"";if(t.cache_.source.src===e&&t.cache_.source.type)return t.cache_.source.type;let i=t.cache_.sources.filter(r=>r.src===e);if(i.length)return i[0].type;let n=t.$$("source");for(let r=0;r<n.length;r++){let s=n[r];if(s.type&&s.src&&s.src===e)return s.type;}return Bu(e);},tT=function(t){if(Array.isArray(t)){let e=[];t.forEach(function(i){i=tT(i),Array.isArray(i)?e=e.concat(i):Ji(i)&&e.push(i);}),t=e;}else typeof t=="string"&&t.trim()?t=[By({src:t})]:Ji(t)&&typeof t.src=="string"&&t.src&&t.src.trim()?t=[By(t)]:t=[];return t;};Jk=`<svg xmlns="http://www.w3.org/2000/svg">
20  <defs>
21    <symbol viewBox="0 0 48 48" id="vjs-icon-play">
22      <path d="M16 10v28l22-14z"></path>
23    </symbol>
24    <symbol viewBox="0 0 48 48" id="vjs-icon-pause">
25      <path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"></path>
26    </symbol>
27    <symbol viewBox="0 0 48 48" id="vjs-icon-audio">
28      <path d="M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z"></path>
29    </symbol>
30    <symbol viewBox="0 0 48 48" id="vjs-icon-captions">
31      <path d="M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z"></path>
32    </symbol>
33    <symbol viewBox="0 0 48 48" id="vjs-icon-subtitles">
34      <path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"></path>
35    </symbol>
36    <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-enter">
37      <path d="M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"></path>
38    </symbol>
39    <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-exit">
40      <path d="M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"></path>
41    </symbol>
42    <symbol viewBox="0 0 48 48" id="vjs-icon-play-circle">
43      <path d="M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
44    </symbol>
45    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-mute">
46      <path d="M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z"></path>
47    </symbol>
48    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-low">
49      <path d="M14 18v12h8l10 10V8L22 18h-8z"></path>
50    </symbol>
51    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-medium">
52      <path d="M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z"></path>
53    </symbol>
54    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-high">
55      <path d="M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z"></path>
56    </symbol>
57    <symbol viewBox="0 0 48 48" id="vjs-icon-spinner">
58      <path d="M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z"></path>
59    </symbol>
60    <symbol viewBox="0 0 24 24" id="vjs-icon-hd">
61      <path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6
61h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"></path>
62    </symbol>
63    <symbol viewBox="0 0 48 48" id="vjs-icon-chapters">
64      <path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"></path>
65    </symbol>
66    <symbol viewBox="0 0 40 40" id="vjs-icon-downloading">
67      <path d="M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z"></path>
68    </symbol>
69    <symbol viewBox="0 0 48 48" id="vjs-icon-file-download">
70      <path d="M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z"></path>
71    </symbol>
72    <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-done">
73      <path d="M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z"></path>
74    </symbol>
75    <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-off">
76      <path d="M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z"></path>
77    </symbol>
78    <symbol viewBox="0 0 48 48" id="vjs-icon-share">
79      <path d="M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z"></path>
80    </symbol>
81    <symbol viewBox="0 0 48 48" id="vjs-icon-cog">
82      <path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path>
83    </symbol>
84    <symbol viewBox="0 0 48 48" id="vjs-icon-square">
85      <path d="M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z"></path>
86    </symbol>
87    <symbol viewBox="0 0 48 48" id="vjs-icon-circle">
88      <circle cx="24" cy="24" r="20"></circle>
89    </symbol>
90    <symbol viewBox="0 0 48 48" id="vjs-icon-circle-outline">
91      <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
92    </symbol>
93    <symbol viewBox="0 0 48 48" id="vjs-icon-circle-inner-circle">
94      <path d="M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z"></path>
95    </symbol>
96    <symbol viewBox="0 0 48 48" id="vjs-icon-cancel">
97      <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>
98    </symbol>
99    <symbol viewBox="0 0 48 48" id="vjs-icon-replay">
100      <path d="M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-
1007.16 16-16-7.16-16-16-16z"></path>
101    </symbol>
102    <symbol viewBox="0 0 48 48" id="vjs-icon-repeat">
103      <path d="M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"></path>
104    </symbol>
105    <symbol viewBox="0 96 48 48" id="vjs-icon-replay-5">
106      <path d="M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z"></path>
107    </symbol>
108    <symbol viewBox="0 96 48 48" id="vjs-icon-replay-10">
109      <path d="M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z"></path>
110    </symbol>
111    <symbol viewBox="0 96 48 48" id="vjs-icon-replay-30">
112      <path d="M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z"></path>
113    </symbol>
114    <symbol viewBox="0 96 48 48" id="vjs-icon-forward-5">
115      <path d="M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z"></path>
116    </symbol>
117    <symbol viewBox="0 96 48 48" id="vjs-icon-forward-10">
118      <path d="M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z"></path>
119    </symbol>
120    <symbol viewBox="0 96 48 48" id="vjs-icon-forward-30">
121      <path d="M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z"></path>
122    </symbol>
123    <symbol viewBox="0 0 512 512" id="vjs-icon-audio-description">
124      <g fill-rule="evenodd"><path d="M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57"></path><path d="M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z"></path></g>
125    </symbol>
126    <symbol viewBox="0 0 48 48" id="vjs-icon-next-item">
127      <path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"></path>
128    </symbol>
129    <symbol viewBox="0 0 48 48" id="vjs-icon-previous-item">
130      <path d="M12 12h4v24h-4zm7 12l17 12V12z"></path>
131    </symbol>
132    <symbol viewBox="0 0 48 48" id="vjs-icon-shuffle">
133      <path d="M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z"></path>
134    </symbol>
135    <symbol viewBox="0 0 48 48" id="vjs-icon-cast">
136      <path d="M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z"></path>
137    </symbol>
138    <symbol viewBox="0 0 48 48" id="vjs-icon-picture-in-picture-enter">
139      <path d="M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z"></path>
140    </symbol>
141    <symbol viewBox="0 0 22 18" id="vjs-icon-picture-in-picture-exit">
142      <path d="M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z"></path>
143      <path fill="none" d="M-1-3h24v24H-1z"></path>
144    </symbol>
145    <symbol viewBox="0 0 1792 1792" id="vjs-icon-facebook">
146      <path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"></path>
147    </symbol>
148    <symbol viewBox="0 0 1792 1792" id="vjs-icon-linkedin">
149      <path d="M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z"></path>
150    </symbol>
151    <symbol viewBox="0 0 1200 1227" id="vjs-icon-twitter">
152      <path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/>
153    </symbol>
154    <symbol viewBox="0 0 1792 1792" id="vjs-icon-tumblr">
155      <path d="M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z"></path>
156    </symbol>
157    <symbol viewBox="0 0 1792 1792" id="vjs-icon-pinterest">
158      <path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>
159    </symbol>
160  </defs>
161</svg>`,Fy=wu?10009:Du?461:8,bs={codes:{play:415,pause:19,ff:417,rw:412,back:Fy},names:{415:"play",19:"pause",417:"ff",412:"rw",[Fy]:"back"},isEventKey(t,e){return e=e.toLowerCase(),!!(this.names[t.keyCode]&&this.names[t.keyCode]===e);},getEventName(t){if(this.names[t.keyCode])return this.names[t.keyCode];if(this.codes[t.code]){let e=this.codes[t.code];return this.names[e];}return null;}},Uy=5,Sf=class extends jt{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null;}start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",()=>{this.focus(this.updateFocusableComponents()[0]);}),this.player_.on("modalclose",()=>{this.refocusComponent();}),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus());}));}stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1;}onKeyDown_(e){let i=e.originalEvent?e.originalEvent:e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(i.key)){if(this.isPaused_)return;i.preventDefault();let n=i.key.substring(5).toLowerCase();this.move(n);}else if(bs.isEventKey(i,"play")||bs.isEventKey(i,"pause")||bs.isEventKey(i,"ff")||bs.isEventKey(i,"rw")){i.preventDefault();let n=bs.getEventName(i);this.performMediaAction_(n);}else bs.isEventKey(i,"Back")&&e.target&&typeof e.target.closeable=="function"&&e.target.closeable()&&(i.preventDefault(),e.target.close());}performMediaAction_(e){if(this.player_)switch(e){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+Uy);break;case"rw":this.userSeek_(this.player_.currentTime()-Uy);break;}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e);}pause(){this.isPaused_=!0;}resume(){this.isPaused_=!1;}handlePlayerBlur_(e){let i=e.relatedTarget,n=null,r=this.getCurrentComponent(e.target);i&&(n=!!i.closest(".video-js"),i.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(!e.currentTarget.contains(e.relatedTarget)&&!n||!i)&&(r&&r.name()==="CloseButton"?this.refocusComponent():(this.pause(),r&&r.el()&&(this.lastFocusedComponent_=r)));}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsF
161ocusable()&&this.resume();}updateFocusableComponents(){let e=this.player_,i=[];function n(r){for(let s of r)s.hasOwnProperty("el_")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&i.push(s),s.hasOwnProperty("children_")&&s.children_.length>0&&n(s.children_);}return e.children_.forEach(r=>{if(r.hasOwnProperty("el_"))if(r.getIsFocusable&&r.getIsAvailableToBeFocused&&r.getIsFocusable()&&r.getIsAvailableToBeFocused(r.el())){i.push(r);return;}else r.hasOwnProperty("children_")&&r.children_.length>0?n(r.children_):r.hasOwnProperty("items")&&r.items.length>0?n(r.items):this.findSuitableDOMChild(r)&&i.push(r);if(r.name_==="ErrorDisplay"&&r.opened_){let s=r.el_.querySelector(".vjs-errors-ok-button-container");s&&s.querySelectorAll("button").forEach((o,u)=>{i.push({name:()=>"ModalButton"+(u+1),el:()=>o,getPositions:()=>{let c=o.getBoundingClientRect(),p={x:c.x,y:c.y,width:c.width,height:c.height,top:c.top,right:c.right,bottom:c.bottom,left:c.left},_={x:c.left+c.width/2,y:c.top+c.height/2,width:0,height:0,top:c.top+c.height/2,right:c.left+c.width/2,bottom:c.top+c.height/2,left:c.left+c.width/2};return{boundingClientRect:p,center:_};},getIsAvailableToBeFocused:()=>!0,getIsFocusable:c=>!0,focus:()=>o.focus()});});}}),this.focusableComponents=i,this.focusableComponents;}findSuitableDOMChild(e){function i(n){if(e.getIsFocusable(n)&&e.getIsAvailableToBeFocused(n))return n;for(let r=0;r<n.children.length;r++){let s=n.children[r],a=i(s);if(a)return a;}return null;}return e.el()?i(e.el()):null;}getCurrentComponent(e){this.updateFocusableComponents();let i=e||document.activeElement;if(this.focusableComponents.length){for(let n of this.focusableComponents)if(n.el()===i)return n;}}add(e){let i=[...this.focusableComponents];e.hasOwnProperty("el_")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&i.push(e),this.focusableComponents=i,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents});}remove(e){for(let i=0;i<this.focusableComponents.length;i++)if(this.focusableComponents[i].name()===e.name()){this.focusableComponents.splice(i,1),this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents});return;}}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}));}move(e){let i=this.getCurrentComponent();if(!i)return;let n=i.getPositions(),r=this.focusableComponents.filter(a=>a!==i&&this.isInDirection_(n.boundingClientRect,a.getPositions().boundingClientRect,e)),s=this.findBestCandidate_(n.center,r,e);s?this.focus(s):this.trigger({type:"endOfFocusableComponents",direction:e,focu
161sedComponent:i});}findBestCandidate_(e,i,n){let r=1/0,s=null;for(let a of i){let o=a.getPositions().center,u=this.calculateDistance_(e,o,n);u<r&&(r=u,s=a);}return s;}isInDirection_(e,i,n){switch(n){case"right":return i.left>=e.right;case"left":return i.right<=e.left;case"down":return i.top>=e.bottom;case"up":return i.bottom<=e.top;default:return!1;}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name()){this.focus(this.focusableComponents[e]);return;}}else this.focus(this.updateFocusableComponents()[0]);}focus(e){typeof e=="object"&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus());}calculateDistance_(e,i,n){let r=Math.abs(e.x-i.x),s=Math.abs(e.y-i.y),a;switch(n){case"right":case"left":a=r+s*100;break;case"up":a=s*2+r*.5;break;case"down":a=s*5+r;break;default:a=r+s;}return a;}searchForTrackSelect_(){let e=this;for(let i of e.updateFocusableComponents())if(i.constructor.name==="TextTrackSelect"){e.focus(i);break;}}},Af=class extends z{constructor(e,i,n){let r=Re({createEl:!1},i);if(super(e,r,n),!i.playerOptions.sources||i.playerOptions.sources.length===0)for(let s=0,a=i.playerOptions.techOrder;s<a.length;s++){let o=tt(a[s]),u=De.getTech(o);if(o||(u=z.getComponent(o)),u&&u.isSupported()){e.loadTech_(o);break;}}else e.src(i.playerOptions.sources);}};z.registerComponent("MediaLoader",Af);Bs=class extends z{constructor(e,i){super(e,i),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=n=>this.handleMouseOver(n),this.handleMouseOut_=n=>this.handleMouseOut(n),this.handleClick_=n=>this.handleClick(n),this.handleKeyDown_=n=>this.handleKeyDown(n),this.emitTapEvents(),this.enable();}createEl(e="div",i={},n={}){i=Object.assign({className:this.buildCSSClass(),tabIndex:0},i),e==="button"&&_e.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),n=Object.assign({role:"button"},n),this.tabIndex_=i.tabIndex;let r=ue(e,i,n);return this.player_.options_.experimentalSvgIcons||r.appendChild(ue("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(r),r;}dispose(){this.controlTextEl_=null,super.dispose();}createControlTextEl(e){return this.controlTextEl_=ue("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_;}controlText(e,i=this.el()){if(e===void 0)return this.controlText_||"Need Text";let n=this.localize(e);this.controlText_=e,ar(this.controlTextEl_,n),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&i.setAttribute("title",n);}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`;}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_));}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_);}handleLanguagechange(){this.controlText(this.controlText_);}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments);}handleKeyDown(e){e.key===" "||e.key==="Enter"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e);}};z.registerComponent("ClickableComponent",Bs);ro=class extends Bs{constructor(e,i){super(e,i),this.update(),this.update_=n=>this.update(n),e.on("posterchange",this.update_);}dispose(){this.player().off("posterchange",this.update_),super.dispose();}createEl(){return ue("div",{className:"vjs-poster"});}crossOrigin(e){if(typeof e>"u")return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){this.player_.log.warn(`crossOrigin must be null,  "anonymous" or "use-credentials", given "${e}"`);return;}this.$("img")&&(this.$("img").crossOrigin=e);}update(e){let i=this.player().poster();this.setSrc(i),i?this.show():this.hide();}setSrc(e){if(!e){this.el_.textContent="";return;}this.$("img")||this.el_.appendChild(ue("picture",{className:"vjs-poster",tabIndex:-1},{},ue("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e;}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Yi(this.player_.play()):this.player_.pause());}};ro.prototype.crossorigin=ro.prototype.crossOrigin;z.registerComponent("PosterImage",ro);mi="#222",Vy="#ccc",Zk={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',
161script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};Ef=class extends z{constructor(e,i,n){super(e,i,n);let r=a=>this.updateDisplay(a),s=a=>{this.updateDisplayOverlay(),this.updateDisplay(a);};e.on("loadstart",a=>this.toggleDisplay(a)),e.on("useractive",r),e.on("userinactive",r),e.on("texttrackchange",r),e.on("loadedmetadata",a=>{this.updateDisplayOverlay(),this.preselectTrack(a);}),e.ready(Be(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks){this.hide();return;}e.on("fullscreenchange",s),e.on("playerresize",s);let a=j.default.screen.orientation||j.default,o=j.default.screen.orientation?"change":"orientationchange";a.addEventListener(o,s),e.on("dispose",()=>a.removeEventListener(o,s));let u=this.options_.playerOptions.tracks||[];for(let c=0;c<u.length;c++)this.player_.addRemoteTextTrack(u[c],!0);this.preselectTrack();}));}preselectTrack(){let e={captions:1,subtitles:1},i=this.player_.textTracks(),n=this.player_.cache_.selectedLanguage,r,s,a;for(let o=0;o<i.length;o++){let u=i[o];n&&n.enabled&&n.language&&n.language===u.language&&u.kind in e?u.kind===n.kind?a=u:a||(a=u):n&&!n.enabled?(a=null,r=null,s=null):u.default&&(u.kind==="descriptions"&&!r?r=u:u.kind in e&&!s&&(s=u));}a?a.mode="showing":s?s.mode="showing":r&&(r.mode="showing");}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show();}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"});}clearDisplay(){typeof j.default.WebVTT=="function"&&j.default.WebVTT.processCues(j.default,[],this.el_);}updateDisplay(){let e=this.player_.textTracks(),i=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),i){let a=[];for(let o=0;o<e.length;++o){let u=e[o];u.mode==="showing"&&a.push(u);}this.updateForTrack(a);return;}let n=null,r=null,s=e.length;for(;s--;){let a=e[s];a.mode==="showing"&&(a.kind==="descriptions"?n=a:r=a);}if(r?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(r)):n&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(n)),!j.default.CSS.supports("inset","10px")){let a=this.el_,o=a.querySelectorAll(".vjs-text-track-cue"),u=this.player_.controlBar.el_.getBoundingClientRect().height,c=this.player_.el_.getBoundingClientRect().height;a.style="",Gi(a,"position","relative"),Gi(a,"height",c-u+"px"),Gi(a,"top","unset"),Iu?Gi(a,"bottom",c+"px"):Gi(a,"bottom","0px"),o.length>0&&o.forEach(p=>{if(p.style.inset){let _=p.style.inset.split(" ");_.length===3&&Object.assign(p.style,{top:_[0],right:_[1],bottom:_[2],left:"unset"});}});}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!j.default.CSS.supports("inset-inline: 10px"))return;let e=this.player_.currentWidth(),i=this.player_.currentHeight(),n=e/i,r=this.player_.videoWidth()/this.player_.videoHeight(),s=0,a=0;Math.abs(n-r)>.1&&(n>r?s=Math.round((e-i*r)/2):a=Math.round((i-e/r)/2)),Gi(this.el_,"insetInline",qy(s)),Gi(this.el_,"insetBlock",qy(a));}updateDisplayState(e){let i=this.player_.textTrackSettings.getValues(),n=e.activeCues,r=n.length;for(;r--;){let s=n[r];if(!s)continue;let a=s.displayState;if(i.color&&(a.firstChild.style.color=i.color),i.textOpacity&&Gi(a.firstChild,"color",ef(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(a.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&Gi(a.firstChild,"backgroundColor",ef(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?Gi(a,"backgroundColor",ef(i.windowColor,i.windowOpacity)):a.style.backgroundColor=i.windowColor),i.edgeStyle&&(i.edgeStyle==="dropshadow"?a.firstChild.style.textShadow=`2px 2px 3px ${mi}, 2px 2px 4px ${mi}, 2px 2px 5px ${mi}`:i.edgeStyle==="raised"?a.firstChild.style.textShadow=`1px 1px ${mi}, 2px 2px ${mi}, 3px 3px ${mi}`:i.edgeStyle==="depressed"?a.firstChild.style.textShadow=`1px 1px ${Vy}, 0 1px ${Vy}, -1px -1px ${mi}, 0 -1px ${mi}`:i.edgeStyle==="uniform"&&(a.firstChild.style.textShadow=`0 0 4px ${mi}, 0 0 4px ${mi}, 0 0 4px ${mi}, 0 0 4px ${mi}`)),i.fontPercent&&i.fontPercent!==1){let o=j.default.parseFloat(a.style.fontSize);a.style.fontSize=o*i.fontPercent+"px",a.style.height="auto",a.style.top="auto";}i.fontFamily&&i.fontFamily!=="default"&&(i.fontFamily==="small-caps"?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=Zk[i.fontFamily]);}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),typeof j.default.WebVTT!="function"||e.every(n=>!n.activeCues))return;let i=[];for(let n=0;n<e.length;++n){let r=e[n];for(let s=0;s<r.activeCues.length;++s)i.push(r.activeCues[s]);}j.default.WebVTT.processCues(j.default,i,this.el_);for(let n=0;n<e.length;++n){let r=e[n];for(let s=0;s<r.activeCues.length;++s){let a=r.activeCues[s].displayState;xr(a,"vjs-text-track-cue","vjs-text-track-cue-"+(r.language?r.language:n)),r.language&&Os(a,"lang",r.language);}this.player_.textTrackSettings&&this.updateDisplayState(r);}}};z.registerComponent("TextTrackDisplay",Ef);xf=class extends z{createEl(){let e=this.player_.isAudio(),i=this.localize(e?"Audio Player":"
161Video Player"),n=ue("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[i])}),r=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(n),r;}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"]);}};z.registerComponent("LoadingSpinner",xf);gt=class extends Bs{createEl(e,i={},n={}){e="button",i=Object.assign({className:this.buildCSSClass()},i),n=Object.assign({type:"button"},n);let r=ue(e,i,n);return this.player_.options_.experimentalSvgIcons||r.appendChild(ue("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(r),r;}addChild(e,i={}){let n=this.constructor.name;return _e.warn(`Adding an actionable (user controllable) child to a Button (${n}) is not supported; use a ClickableComponent instead.`),z.prototype.addChild.call(this,e,i);}enable(){super.enable(),this.el_.removeAttribute("disabled");}disable(){super.disable(),this.el_.setAttribute("disabled","disabled");}handleKeyDown(e){if(e.key===" "||e.key==="Enter"){e.stopPropagation();return;}super.handleKeyDown(e);}};z.registerComponent("Button",gt);Fu=class extends gt{constructor(e,i){super(e,i),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",n=>this.handleMouseDown(n));}buildCSSClass(){return"vjs-big-play-button";}handleClick(e){let i=this.player_.play();if(e.type==="tap"||this.mouseused_&&"clientX"in e&&"clientY"in e){Yi(i),this.player_.tech(!0)&&this.player_.tech(!0).focus();return;}let n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(!r){this.player_.tech(!0).focus();return;}let s=()=>r.focus();Ka(i)?i.then(s,()=>{}):this.setTimeout(s,1);}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e);}handleMouseDown(e){this.mouseused_=!0;}};Fu.prototype.controlText_="Play Video";z.registerComponent("BigPlayButton",Fu);Cf=class extends gt{constructor(e,i){super(e,i),this.setIcon("cancel"),this.controlText(i&&i.controlText||this.localize("Close"));}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`;}handleClick(e){this.trigger({type:"close",bubbles:!1});}handleKeyDown(e){e.key==="Escape"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e);}};z.registerComponent("CloseButton",Cf);Uu=class extends gt{constructor(e,i={}){super(e,i),i.replay=i.replay===void 0||i.replay,this.setIcon("play"),this.on(e,"play",n=>this.handlePlay(n)),this.on(e,"pause",n=>this.handlePause(n)),i.replay&&this.on(e,"ended",n=>this.handleEnded(n));}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`;}handleClick(e){this.player_.paused()?Yi(this.player_.play()):this.player_.pause();}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e);}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause");}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play");}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",i=>this.handleSeeked(i));}};Uu.prototype.controlText_="Play";z.registerComponent("PlayToggle",Uu);nr=class extends z{constructor(e,i){super(e,i),this.on(e,["timeupdate","ended","seeking"],n=>this.update(n)),this.updateTextNode_();}createEl(){let e=this.buildCSSClass(),i=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),n=ue("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)}\xA0`},{role:"presentation"});return i.appendChild(n),this.contentEl_=ue("span",{className:`${e}-display`},{role:"presentation"}),i.appendChild(this.contentEl_),i;}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose();}update(e){!this.player_.options_.enableSmoothSeeking&&e.type==="seeking"||this.updateContent(e);}updateTextNode_(e=0){e=Dr(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let i=this.textNode_;i&&this.contentEl_.firstChild!==i&&(i=null,_e.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=W.default.createTextNode(this.formattedTime_),this.textNode_&&(i?this.contentEl_.replaceChild(this.textNode_,i):this.contentEl_.appendChild(this.textNode_));}));}updateContent(e){}};nr.prototype.labelText_="Time";nr.prototype.controlText_="Time";z.registerComponent("TimeDisplay",nr);so=class extends nr{buildCSSClass(){return"vjs-current-time";}updateContent(e){let i;this.player_.ended()?i=this.player_.duration():e&&e.target&&typeof e.target.pendingSeekTime=="function"?i=e.target.pendingSeekTime():i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(i);}};so.prototype.labelText_="Current Time";so.prototype.controlText_="Current Time";z.registerComponent("CurrentTimeDisplay",so);ao=class extends nr{constructor(e,i){super(e,i);let n=r=>this.updateContent(r);this.on(e,"durationchange",n),this.on(e,"loadstart",n),this.on(e,"loadedmetadata",n);}buildCSSClass(){return"vjs-duration";}updateContent(e){let i=this.player_.duration();this.updateTextNode_(i);}};ao.prototype.labelText_="Duration";ao.prototype.controlText_="Duration";z.registerComponent("DurationDisplay",ao);wf=class extends z{createEl(){let e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),i=super.createEl("div"),n=super.createEl("span",{textContent:"/"});return i.appendChild(n),e.appendChild(i),e;}};z.registerComponent("TimeDivider",wf);oo=class extends nr{constructor(e,i){super(e,i),this.on(e,"durationchange",n=>this.updateContent(n));}buildCSSClass(){return"vjs-remaining-time";}createEl(){let e=super.createEl();return this.options_.displayNegative!==!1&&e.insertBefore(ue("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e;}updateContent(e){if(typeof this.player_.duration()!="number")return;let i;this.player_.ended()?i=0:this.player_.remainingTimeDisplay?i=this.player_.remainingTimeDisplay():i=this.player_.remainingTime(),this.updateTextNode_(i);}};oo.prototype.labelText_="Remaining Time";oo.prototype.controlText_="Remaining Time";z.registerComponent("RemainingTimeDisplay",oo);Df=class extends z{constructor(e,i){super(e,i),this.updateShowing(),this.on(this.player(),"durationchange",n=>this.updateShowing(n));}createEl(){let e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=ue("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(ue("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")}\xA0`})),this.contentEl_.appendChild(W.default.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e;}dispose(){this.contentEl_=null,super.dispose();}updateShowing(e){this.player().duration()===1/0?this.show():this.hide();}};z.registerComponent("LiveDisplay",Df);Vu=class extends gt{constructor(e,i){super(e,i),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=n=>this.updateLiveEdgeStatus(n),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_));}createEl(){let e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=ue("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e;}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"));}handleClick(){this.player_.liveTracker.seekToLiveEdge();}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose();}};Vu.prototype.controlText_="Seek to live, currently playing live";z.registerComponent("SeekToLive",Vu);eP=Object.freeze({__proto__:null,clamp:Ao}),lo=class extends z{constructor(e,i){super(e,i),this.handleMouseDown_=n=>this.handleMouseDown(n),this.handleMouseUp_=n=>this.handleMouseUp(n),this.handleKeyDown_=n=>this.handleKeyDown(n),this.handleClick_=n=>this.handleClick(n),this.handleMouseMove_=n=>this.handleMouseMove(n),this.update_=n=>this.update(n),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable();}enabled(){return this.enabled_;}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0);}disable(){if(!this.enabled())return;let e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1;}createEl(e,i={},n={}){return i.className=i.className+" vjs-slider",i=Object.assign({tabIndex:0},i),n=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},n),super.createEl(e,i,n);}handleMouseDown(e){let i=this.bar.el_.ownerDocument;e.type==="mousedown"&&e.preventDefault(),e.type==="touchstart"&&!Zi&&e.preventDefault(),Ob(),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(e,!0);}handleMouseMove(e){}handleMouseUp(e){let i=this.bar.el_.ownerDocument;Nb(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(i,"mousemove",this.handleMouseMove_),this.off(i,"mouseup",this.handleMouseUp_),this.off(i,"touchmove",this.handleMouseMove_),this.off(i,"touchend",this.handleMouseUp_),this.update();}update(){if(!this.el_||!this.bar)return;let e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",()=>{let i=this.vertical()?"height":"width";this.bar.el().style[i]=(e*100).toFixed(2)+"%";})),e;}getProgress(){return Number(Ao(this.getPercent(),0,1).toFixed(4));}calculateDistance(e){let i=Rd(this.el_,e);return this.vertical()?i.y:i.x;}handleKeyDown(e){let i=this.options_.playerOptions.spatialNavigation,n=i&&i.enabled,r=i&&i.horizontalSeek;n?r&&e.key==="ArrowLeft"||!r&&e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):r&&e.key==="ArrowRight"||!r&&e.key==="ArrowUp"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):e.key==="ArrowUp"||e.key==="ArrowRight"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e);}handleClick(e){e.stopPropagation(),e.preventDefault();}vertical(e){if(e===void 0)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal");}};z.registerComponent("Slider",lo);tf=(t,e)=>Ao(t/e*100,0,100).toFixed(2)+"%",If=class extends z{constructor(e,i){super(e,i),this.partEls_=[],this.on(e,"progress",n=>this.update(n));}createEl(){let e=super.createEl("div",{className:"vjs-load-progress"}),i=ue("span",{className:"vjs-control-text"}),n=ue("span",{textContent:this.localize("Loaded")}),r=W.default.createTextNode(": ");return this.percentageEl_=ue("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(i),i.appendChild(n),i.appendChild(r),i.appendChild(this.percentageEl_),e;}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose();}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{let i=this.player_.liveTracker,n=this.player_.buffered(),r=i&&i.isLive
161()?i.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),a=this.partEls_,o=tf(s,r);this.percent_!==o&&(this.el_.style.width=o,ar(this.percentageEl_,o),this.percent_=o);for(let u=0;u<n.length;u++){let c=n.start(u),p=n.end(u),_=a[u];_||(_=this.el_.appendChild(ue()),a[u]=_),!(_.dataset.start===c&&_.dataset.end===p)&&(_.dataset.start=c,_.dataset.end=p,_.style.left=tf(c,s),_.style.width=tf(p-c,s));}for(let u=a.length;u>n.length;u--)this.el_.removeChild(a[u-1]);a.length=n.length;});}};z.registerComponent("LoadProgressBar",If);kf=class extends z{constructor(e,i){super(e,i),this.update=en(Be(this,this.update),_i);}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"});}update(e,i,n){let r=eo(this.el_),s=Ns(this.player_.el()),a=e.width*i;if(!s||!r)return;let o=e.left-s.left+a,u=e.width-a+(s.right-e.right);u||(u=e.width-a,o=a);let c=r.width/2;o<c?c+=c-o:u<c&&(c=u),c<0?c=0:c>r.width&&(c=r.width),c=Math.round(c),this.el_.style.right=`-${c}px`,this.write(n);}write(e){ar(this.el_,e);}updateTime(e,i,n,r){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let s,a=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){let o=this.player_.liveTracker.liveWindow(),u=o-i*o;s=(u<1?"":"-")+Dr(u,o);}else s=Dr(n,a);this.update(e,i,s),r&&r();});}};z.registerComponent("TimeTooltip",kf);uo=class extends z{constructor(e,i){super(e,i),this.setIcon("circle"),this.update=en(Be(this,this.update),_i);}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"});}update(e,i,n){let r=this.getChild("timeTooltip");if(!r)return;let s=n&&n.target&&typeof n.target.pendingSeekTime=="function"?n.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();r.updateTime(e,i,s);}};uo.prototype.options_={children:[]};!At&&!Oi&&uo.prototype.options_.children.push("timeTooltip");z.registerComponent("PlayProgressBar",uo);qu=class extends z{constructor(e,i){super(e,i),this.update=en(Be(this,this.update),_i);}createEl(){return super.createEl("div",{className:"vjs-mouse-display"});}update(e,i){let n=i*this.player_.duration();this.getChild("timeTooltip").updateTime(e,i,n,()=>{this.el_.style.left=`${e.width*i}px`;});}};qu.prototype.options_={children:["timeTooltip"]};z.registerComponent("MouseTimeDisplay",qu);Hu=class t extends lo{constructor(e,i){i=Re(t.prototype.options_,i),i.children=[...i.children];let n=e.options_.disableSeekWhileScrubbingOnMobile&&(At||Oi)||e.options_.disableSeekWhileScrubbingOnSTV;(!At&&!Oi||n)&&i.children.splice(1,0,"mouseTimeDisplay"),super(e,i),this.shouldDisableSeekWhileScrubbing_=n,this.pendingSeekTime_=null,this.setEventHandlers_();}setEventHandlers_(){this.update_=Be(this,this.update),this.update=en(this.update_,_i),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in W.default&&"visibilityState"in W.default&&this.on(W.default,"visibilitychange",this.toggleVisibility_);}toggleVisibility_(e){W.default.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update());}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,_i));}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&e.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null);}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")});}update(e){if(W.default.visibilityState==="hidden")return;
161let i=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{let n=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),r=this.player_.liveTracker,s=this.player_.duration();r&&r.isLive()&&(s=this.player_.liveTracker.liveCurrentTime()),this.percent_!==i&&(this.el_.setAttribute("aria-valuenow",(i*100).toFixed(2)),this.percent_=i),(this.currentTime_!==n||this.duration_!==s)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Dr(n,s),Dr(s,s)],"{1} of {2}")),this.currentTime_=n,this.duration_=s),this.bar&&this.bar.update(Ns(this.el()),this.getProgress(),e);}),i;}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e);}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();}pendingSeekTime(e){if(e!==void 0)if(e!==null){let i=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,i));}else this.pendingSeekTime_=null;return this.pendingSeekTime_;}getPercent(){if(this.pendingSeekTime()!==null)return this.pendingSeekTime()/this.player_.duration();let e=this.getCurrentTime_(),i,n=this.player_.liveTracker;return n&&n.isLive()?(i=(e-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(i=1)):i=e/this.player_.duration(),i;}handleMouseDown(e){to(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e));}handleMouseMove(e,i=!1){if(!to(e)||isNaN(this.player_.duration()))return;!i&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let n,r=this.calculateDistance(e),s=this.player_.liveTracker;if(!s||!s.isLive())n=r*this.player_.duration(),n===this.player_.duration()&&(n=n-.1);else{if(r>=.99){s.seekToLiveEdge();return;}let a=s.seekableStart(),o=s.liveCurrentTime();if(n=a+r*s.liveWindow(),n>=o&&(n=o),n<=a&&(n=a+.1),n===1/0)return;}this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(n):this.userSeek_(n),this.player_.options_.enableSmoothSeeking&&this.update();}enable(){super.enable();let e=this.getChild("mouseTimeDisplay");e&&e.show();}disable(){super.disable();let e=this.getChild("mouseTimeDisplay");e&&e.hide();}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Yi(this.player_.play()):this.update_();}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();let i=this.pendingSeekTime()!==null?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(i+e),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0});}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds);}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds);}handleAction(e){this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause();}handleKeyDown(e){let i=this.player_.liveTracker;if(e.key===" "||e.key==="Enter")e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(e.key==="Home")e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(e.key==="End")e.preventDefault(),e.stopPropagation(),i&&i.isLive()?this.userSeek_(i.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();let n=parseInt(e.key,10)*.1;i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*n):this.userSeek_(this.player_.duration()*n);}else e.key==="PageDown"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):e.key==="PageUp"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e);}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in W.default&&"visibilityState"in W.default&&this.off(W.default,"visibilitychange",this.toggleVisibility_),super.dispose();}};Hu.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12};z.registerComponent("SeekBar",Hu);$u=class extends z{constructor(e,i){super(e,i),this.handleMouseMove=en(Be(this,this.handleMouseMove),_i),this.throttledHandleMouseSeek=en(Be(this,this.handleMouseSeek),_i),this.handleMouseUpHandler_=n=>this.handleMouseUp(n),this.handleMouseDownHandler_=n=>this.handleMouseDown(n),this.enable();}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"});}handleMouseMove(e){let i=this.getChild("seekBar");if(!i)return;let n=i.getChild("playProgressBar"),r=i.getChild("mouseTimeDisplay");if(!n&&!r)return;let s=i.el(),a=eo(s),o=Rd(s,e).x;o=Ao(o,0,1),r&&r.update(a,o),n&&n.update(a,i.getProgress());}handleMouseSeek(e){let i=this.getChild("seekBar");i&&i.handleMouseMove(e);}enabled(){return this.enabled_;}
161disable(){if(this.children().forEach(e=>e.disable&&e.disable()),!!this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){let e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Yi(this.player_.play());}}enable(){this.children().forEach(e=>e.enable&&e.enable()),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0);}removeListenersAddedOnMousedownAndTouchstart(){let e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_);}handleMouseDown(e){let i=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(i,"mousemove",this.throttledHandleMouseSeek),this.on(i,"touchmove",this.throttledHandleMouseSeek),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_);}handleMouseUp(e){let i=this.getChild("seekBar");i&&i.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart();}};$u.prototype.options_={children:["seekBar"]};z.registerComponent("ProgressControl",$u);zu=class extends gt{constructor(e,i){super(e,i),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],n=>this.handlePictureInPictureChange(n)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],n=>this.handlePictureInPictureEnabledChange(n)),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable();}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`;}handlePictureInPictureAudioModeChange(){if(!(this.player_.currentType().substring(0,5)==="audio"||this.player_.audioPosterMode()||this.player_.audioOnlyMode())){this.show();return;}this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide();}handlePictureInPictureEnabledChange(){W.default.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in j.default?this.enable():this.disable();}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange();}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture();}show(){typeof W.default.exitPictureInPicture=="function"&&super.show();}};zu.prototype.controlText_="Picture-in-Picture";z.registerComponent("PictureInPictureToggle",zu);Gu=class extends gt{constructor(e,i){super(e,i),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",n=>this.handleFullscreenChange(n)),W.default[e.fsApi_.fullscreenEnabled]===!1&&this.disable();}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`;}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"));}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen();}};Gu.prototype.controlText_="Fullscreen";z.registerComponent("FullscreenToggle",Gu);tP=function(t,e){e.tech_&&!e.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden");});},Pf=class extends z{createEl(){let e=super.createEl("div",{className:"vjs-volume-level"});
161return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e;}};z.registerComponent("VolumeLevel",Pf);Lf=class extends z{constructor(e,i){super(e,i),this.update=en(Be(this,this.update),_i);}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"});}update(e,i,n,r){if(!n){let s=Ns(this.el_),a=Ns(this.player_.el()),o=e.width*i;if(!a||!s)return;let u=e.left-a.left+o,c=e.width-o+(a.right-e.right),p=s.width/2;u<p?p+=p-u:c<p&&(p=c),p<0?p=0:p>s.width&&(p=s.width),this.el_.style.right=`-${p}px`;}this.write(`${r}%`);}write(e){ar(this.el_,e);}updateVolume(e,i,n,r,s){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,i,n,r.toFixed(0)),s&&s();});}};z.registerComponent("VolumeLevelTooltip",Lf);Wu=class extends z{constructor(e,i){super(e,i),this.update=en(Be(this,this.update),_i);}createEl(){return super.createEl("div",{className:"vjs-mouse-display"});}update(e,i,n){let r=100*i;this.getChild("volumeLevelTooltip").updateVolume(e,i,n,r,()=>{n?this.el_.style.bottom=`${e.height*i}px`:this.el_.style.left=`${e.width*i}px`;});}};Wu.prototype.options_={children:["volumeLevelTooltip"]};z.registerComponent("MouseVolumeLevelDisplay",Wu);Fs=class extends lo{constructor(e,i){super(e,i),this.on("slideractive",n=>this.updateLastVolume_(n)),this.on(e,"volumechange",n=>this.updateARIAAttributes(n)),e.ready(()=>this.updateARIAAttributes());}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"});}handleMouseDown(e){to(e)&&super.handleMouseDown(e);}handleMouseMove(e){let i=this.getChild("mouseVolumeLevelDisplay");if(i){let n=this.el(),r=Ns(n),s=this.vertical(),a=Rd(n,e);a=s?a.y:a.x,a=Ao(a,0,1),i.update(r,a,s);}to(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)));}checkMuted(){this.player_.muted()&&this.player_.muted(!1);}getPercent(){return this.player_.muted()?0:this.player_.volume();}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1);}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1);}updateARIAAttributes(e){let i=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",i),this.el_.setAttribute("aria-valuetext",i+"%");}volumeAsPercentage_(){return Math.round(this.player_.volume()*100);}updateLastVolume_(){let e=this.player_.volume();this.one("sliderinactive",()=>{this.player_.volume()===0&&this.player_.lastVolume_(e);});}};Fs.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};!At&&!Oi&&Fs.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay");Fs.prototype.playerEvent="volumechange";z.registerComponent("VolumeBar",Fs);Yu=class extends z{constructor(e,i={}){i.vertical=i.vertical||!1,(typeof i.volumeBar>"u"||Rs(i.volumeBar))&&(i.volumeBar=i.volumeBar||{},i.volumeBar.vertical=i.vertical),super(e,i),tP(this,e),this.throttledHandleMouseMove=en(Be(this,this.handleMouseMove),_i),this.handleMouseUpHandler_=n=>this.handleMouseUp(n),this.on("mousedown",n=>this.handleMouseDown(n)),this.on("touchstart",n=>this.handleMouseDown(n)),this.on("mousemove",n=>this.handleMouseMove(n)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive");}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive");});}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${e}`});}handleMouseDown(e){let i=this.el_.ownerDocument;this.on(i,"mousemove",this.throttledHandleMouseMove),this.on(i,"touchmove",this.throttledHandleMouseMove),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_);}handleMouseUp(e){let i=this.el_.ownerDocument;this.off(i,"mousemove",this.throttledHandleMouseMove),this.off(i,"touchmove",this.throttledHandleMouseMove),this.off(i,"mouseup",this.handleMouseUpHandler_),this.off(i,"touchend",this.handleMouseUpHandler_);}handleMouseMove(e){this.volumeBar.handleMouseMove(e);}};Yu.prototype.options_={children:["volumeBar"]};
161z.registerComponent("VolumeControl",Yu);iP=function(t,e){e.tech_&&!e.tech_.featuresMuteControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",function(){e.tech_.featuresMuteControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden");});},Xu=class extends gt{constructor(e,i){super(e,i),iP(this,e),this.on(e,["loadstart","volumechange"],n=>this.update(n));}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`;}handleClick(e){let i=this.player_.volume(),n=this.player_.lastVolume_();if(i===0){let r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1);}else this.player_.muted(!this.player_.muted());}update(e){this.updateIcon_(),this.updateControlText_();}updateIcon_(){let e=this.player_.volume(),i=3;this.setIcon("volume-high"),At&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),e===0||this.player_.muted()?(this.setIcon("volume-mute"),i=0):e<.33?(this.setIcon("volume-low"),i=1):e<.67&&(this.setIcon("volume-medium"),i=2),Pd(this.el_,[0,1,2,3].reduce((n,r)=>n+`${r?" ":""}vjs-vol-${r}`,"")),xr(this.el_,`vjs-vol-${i}`);}updateControlText_(){let i=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==i&&this.controlText(i);}};Xu.prototype.controlText_="Mute";z.registerComponent("MuteToggle",Xu);Ku=class extends z{constructor(e,i={}){typeof i.inline<"u"?i.inline=i.inline:i.inline=!0,(typeof i.volumeControl>"u"||Rs(i.volumeControl))&&(i.volumeControl=i.volumeControl||{},i.volumeControl.vertical=!i.inline),super(e,i),this.handleKeyPressHandler_=n=>this.handleKeyPress(n),this.on(e,["loadstart"],n=>this.volumePanelState_(n)),this.on(this.muteToggle,"keyup",n=>this.handleKeyPress(n)),this.on(this.volumeControl,"keyup",n=>this.handleVolumeControlKeyUp(n)),this.on("keydown",n=>this.handleKeyPress(n)),this.on("mouseover",n=>this.handleMouseOver(n)),this.on("mouseout",n=>this.handleMouseOut(n)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_);}sliderActive_(){this.addClass("vjs-slider-active");}sliderInactive_(){this.removeClass("vjs-slider-active");}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only");}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${e}`});}dispose(){this.handleMouseOut(),super.dispose();}handleVolumeControlKeyUp(e){e.key==="Escape"&&this.muteToggle.focus();}handleMouseOver(e){this.addClass("vjs-hover"),li(W.default,"keyup",this.handleKeyPressHandler_);}handleMouseOut(e){this.removeClass("vjs-hover"),Et(W.default,"keyup",this.handleKeyPressHandler_);}handleKeyPress(e){e.key==="Escape"&&this.handleMouseOut();}};Ku.prototype.options_={children:["muteToggle","volumeControl"]};z.registerComponent("VolumePanel",Ku);Qu=class extends gt{constructor(e,i){super(e,i),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide();}getSkipForwardTime(){let e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward;}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`;}handleClick(e){if(isNaN(this.player_.duration()))return;let i=this.player_.currentTime(),n=this.player_.liveTracker,r=n&&n.isLive()?n.seekableEnd():this.player_.duration(),s;i+this.skipTime<=r?s=i+this.skipTime:s=r,this.player_.currentTime(s);}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]));}};Qu.prototype.controlText_="Skip Forward";z.registerComponent("SkipForward",Qu);Ju=class extends gt{constructor(e,i){super(e,i),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1}
161 seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide();}getSkipBackwardTime(){let e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward;}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`;}handleClick(e){let i=this.player_.currentTime(),n=this.player_.liveTracker,r=n&&n.isLive()&&n.seekableStart(),s;r&&i-this.skipTime<=r?s=r:i>=this.skipTime?s=i-this.skipTime:s=0,this.player_.currentTime(s);}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]));}};Ju.prototype.controlText_="Skip Backward";z.registerComponent("SkipBackward",Ju);Zu=class extends z{constructor(e,i){super(e,i),i&&(this.menuButton_=i.menuButton),this.focusedChild_=-1,this.on("keydown",n=>this.handleKeyDown(n)),this.boundHandleBlur_=n=>this.handleBlur(n),this.boundHandleTapClick_=n=>this.handleTapClick(n);}addEventListenerForItem(e){e instanceof z&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_));}removeEventListenerForItem(e){e instanceof z&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_));}removeChild(e){typeof e=="string"&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e);}addItem(e){let i=this.addChild(e);i&&this.addEventListenerForItem(i);}createEl(){let e=this.options_.contentElType||"ul";this.contentEl_=ue(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");let i=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),li(i,"click",function(n){n.preventDefault(),n.stopImmediatePropagation();}),i;}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose();}handleBlur(e){let i=e.relatedTarget||W.default.activeElement;if(!this.children().some(n=>n.el()===i)){let n=this.menuButton_;n&&n.buttonPressed_&&i!==n.el().firstChild&&n.unpressButton();}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();let i=this.children();if(!Array.isArray(i))return;let n=i.filter(r=>r.el()===e.target)[0];if(!n)return;n.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus();}}handleKeyDown(e){e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(e.key==="ArrowRight"||e.key==="ArrowUp")&&(e.preventDefault(),e.stopPropagation(),this.stepBack());}stepForward(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_+1),this.focus(e);}stepBack(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_-1),this.focus(e);}focus(e=0){let i=this.children().slice();i.length&&i[0].hasClass("vjs-menu-title")&&i.shift(),i.length>0&&(e<0?e=0:e>=i.length&&(e=i.length-1),this.focusedChild_=e,i[e].el_.focus());}};z.registerComponent("Menu",Zu);co=class extends z{constructor(e,i={}){super(e,i),this.menuButton_=new gt(e,i),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");let n=gt.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+n,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;let r=s=>this.handleClick(s);this.handleMenuKeyUp_=s=>this.handleMenuKeyUp(s),this.on(this.menuButton_,"tap",r),this.on(this.menuButton_,"click",r),this.on(this.menuButton_,"keydown",s=>this.handleKeyDown(s)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),li(W.default,"keyup",this.handleMenuKeyUp_);}),this.on("mouseleave",s=>this.handleMouseLeave(s)),this.on("keydown",s=>this.handleSubmenuKeyDown(s));}update(){let e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"));}createMenu(){let e=new Zu(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){let i=ue("li",{className:"vjs-menu-title",textContent:tt(this.options_.title),tabIndex:-1}),n=new z(this.player_,{el:i});e.addItem(n);}if(this.items=this.createItems(),this.items)for(let i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e;}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{});}setIcon(e){super.setIcon(e,this.menuButton_.el_);}buildWrapperCSSClass(){let e="vjs-menu-button";this.options_.inline===!0?e+="-inline":e+="-popup";let i=gt.prototype.buildCSSClass();return`vjs-menu-button ${e} ${i} ${super.buildCSSClass()}`;}buildCSSClass(){let e="vjs-menu-button";return this.options_.inline===!0?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${super.buildCSSClass()}`;}controlText(e,i=this.menuButton_.el()){return this.menuButton_.controlText(e,i);}dispose(){this.handleMouseLeave(),super.dispose();}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton();}handleMouseLeave(e){this.removeClass("vjs-hover"),Et(W.default,"keyup",this.handleMenuKeyUp_);}focus(){this.menuButton_.focus();}blur(){this.menuButton_.blur();}handleKeyDown(e){e.key==="Escape"||e.key==="Tab"?(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus())):(e.key==="Up"||e.key==="Down"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()));}handleMenuKeyUp(e){(e.key==="Escape"||e.key==="Tab")&&this.removeClass("vjs-hover");}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e);}handleSubmenuKeyDown(e){(e.key==="Escape"||e.key==="Tab")&&(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus()));}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),At&&Ib())return;this.menu.focus();}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","fal
161se"));}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable();}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable();}};z.registerComponent("MenuButton",co);ho=class extends co{constructor(e,i){let n=i.tracks;if(super(e,i),this.items.length<=1&&this.hide(),!n)return;let r=Be(this,this.update);n.addEventListener("removetrack",r),n.addEventListener("addtrack",r),n.addEventListener("labelchange",r),this.player_.on("ready",r),this.player_.on("dispose",function(){n.removeEventListener("removetrack",r),n.removeEventListener("addtrack",r),n.removeEventListener("labelchange",r);});}};z.registerComponent("TrackButton",ho);kr=class extends Bs{constructor(e,i){super(e,i),this.selectable=i.selectable,this.isSelected_=i.selected||!1,this.multiSelectable=i.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem");}createEl(e,i,n){this.nonIconControl=!0;let r=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},i),n),s=ue("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?r.appendChild(s):r.replaceChild(s,r.querySelector(".vjs-icon-placeholder")),r;}handleKeyDown(e){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e.key)||super.handleKeyDown(e);}handleClick(e){this.selected(!0);}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1));}};z.registerComponent("MenuItem",kr);Pr=class extends kr{constructor(e,i){let n=i.track,r=e.textTracks();i.label=n.label||n.language||"Unknown",i.selected=n.mode==="showing",super(e,i),this.track=n,this.kinds=(i.kinds||[i.kind||this.track.kind]).filter(Boolean);let s=(...o)=>{this.handleTracksChange.apply(this,o);},a=(...o)=>{this.handleSelectedLanguageChange.apply(this,o);};if(e.on(["loadstart","texttrackchange"],s),r.addEventListener("change",s),r.addEventListener("selectedlanguagechange",a),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],s),r.removeEventListener("change",s),r.removeEventListener("selectedlanguagechange",a);}),r.onchange===void 0){let o;this.on(["tap","click"],function(){if(typeof j.default.Event!="object")try{o=new j.default.Event("change");}catch{}o||(o=W.default.createEvent("Event"),o.initEvent("change",!0,!0)),r.dispatchEvent(o);});}this.handleTracksChange();}handleClick(e){let i=this.track,n=this.player_.textTracks();if(super.handleClick(e),!!n)for(let r=0;r<n.length;r++){let s=n[r];this.kinds.indexOf(s.kind)!==-1&&(s===i?s.mode!=="showing"&&(s.mode="showing"):s.mode!=="disabled"&&(s.mode="disabled"));}}handleTracksChange(e){let i=this.track.mode==="showing";i!==this.isSelected_&&this.selected(i);}handleSelectedLanguageChange(e){if(this.track.mode==="showing"){let i=this.player_.cache_.selectedLanguage;if(i&&i.enabled&&i.language===this.track.language&&i.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind};}}dispose(){this.track=null,super.dispose();}};z.registerComponent("TextTrackMenuItem",Pr);ed=class extends Pr{constructor(e,i){i.track={player:e,kind:i.kind,kinds:i.kinds,default:!1,mode:"disabled"},i.kinds||(i.kinds=[i.kind]),i.label?i.track.label=i.label:i.track.label=i.kinds.join(" and ")+" off",i.selectable=!0,i.multiSelectable=!1,super(e,i);}handleTracksChange(e){let i=this.player().textTracks(),n=!0;for(let r=0,s=i.length;r<s;r++){let a=i[r];if(this.options_.kinds.indexOf(a.kind)>-1&&a.mode==="showing"){n=!1;break;}}n!==this.isSelected_&&this.selected(n);}handleSelectedLanguageChange(e){let i=this.player().textTracks(),n=!0;for(let r=0,s=i.length;r<s;r++){let a=i[r];if(["captions","descriptions","subtitles"].indexOf(a.kind)>-1&&a.mode==="showing"){n=!1;break;}}n&&(this.player_.cache_.selectedLanguage={enabled:!1});}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange();}};z.registerComponent("OffTextTrackMenuItem",ed);rr=class extends ho{constructor(e,i={}){i.tracks=e.textTracks(),super(e,i);}createItems(e=[],i=Pr){let n;this.label_&&(n=`${this.label_} off`),e.push(new ed(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;let r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let s=0;s<r.length;s++){let a=r[s];if(this.kinds_.indexOf(a.kind)>-1){let o=new i(this.player_,{track:a,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});o.addClass(`vjs-${a.kind}-menu-item`),e.push(o);}}
161return e;}};z.registerComponent("TextTrackButton",rr);td=class extends kr{constructor(e,i){let n=i.track,r=i.cue,s=e.currentTime();i.selectable=!0,i.multiSelectable=!1,i.label=r.text,i.selected=r.startTime<=s&&s<r.endTime,super(e,i),this.track=n,this.cue=r;}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime);}};z.registerComponent("ChaptersTrackMenuItem",td);fo=class extends rr{constructor(e,i,n){super(e,i,n),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach(r=>{r.selected(this.track_.activeCues[0]===r.cue);});};}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`;}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`;}update(e){if(e&&e.track&&e.track.kind!=="chapters")return;let i=this.findChaptersTrack();i!==this.track_?(this.setTrack(i),super.update()):(!this.items||i&&i.cues&&i.cues.length!==this.items.length)&&super.update();}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){let i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null;}if(this.track_=e,this.track_){this.track_.mode="hidden";let i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_);}}}findChaptersTrack(){let e=this.player_.textTracks()||[];for(let i=e.length-1;i>=0;i--){let n=e[i];if(n.kind===this.kind_)return n;}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(tt(this.kind_));}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu();}createItems(){let e=[];
161if(!this.track_)return e;let i=this.track_.cues;if(!i)return e;for(let n=0,r=i.length;n<r;n++){let s=i[n],a=new td(this.player_,{track:this.track_,cue:s});e.push(a);}return e;}};fo.prototype.kind_="chapters";fo.prototype.controlText_="Chapters";z.registerComponent("ChaptersButton",fo);po=class extends rr{constructor(e,i,n){super(e,i,n),this.setIcon("audio-description");let r=e.textTracks(),s=Be(this,this.handleTracksChange);r.addEventListener("change",s),this.on("dispose",function(){r.removeEventListener("change",s);});}handleTracksChange(e){let i=this.player().textTracks(),n=!1;for(let r=0,s=i.length;r<s;r++){let a=i[r];if(a.kind!==this.kind_&&a.mode==="showing"){n=!0;break;}}n?this.disable():this.enable();}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`;}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`;}};po.prototype.kind_="descriptions";po.prototype.controlText_="Descriptions";z.registerComponent("DescriptionsButton",po);mo=class extends rr{constructor(e,i,n){super(e,i,n),this.setIcon("subtitles");}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`;}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`;}};mo.prototype.kind_="subtitles";mo.prototype.controlText_="Subtitles";z.registerComponent("SubtitlesButton",mo);go=class extends Pr{constructor(e,i){i.track={player:e,kind:i.kind,label:i.kind+" settings",selectable:!1,default:!1,mode:"disabled"},i.selectable=!1,i.name="CaptionSettingsMenuItem",super(e,i),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+i.kind+" settings dialog");}handleClick(e){this.player().getChild("textTrackSettings").open();}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange();}};z.registerComponent("CaptionSettingsMenuItem",go);vo=class extends rr{constructor(e,i,n){super(e,i,n),this.setIcon("captions");}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`;}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`;}createItems(){let e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new go(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e);}};vo.prototype.kind_="captions";vo.prototype.controlText_="Captions";z.registerComponent("CaptionsButton",vo);id=class extends Pr{createEl(e,i,n){let r=super.createEl(e,i,n),s=r.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",r):s.appendChild(ue("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(ue("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),r;}};z.registerComponent("SubsCapsMenuItem",id);_o=class extends rr{constructor(e,i={}){super(e,i),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(tt(this.label_));}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`;}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`;}createItems(){let e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new go(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,id),e;}};_o.prototype.kinds_=["captions","subtitles"];_o.prototype.controlText_="Subtitles";z.registerComponent("SubsCapsButton",_o);nd=class extends kr{constructor(e,i){let n=i.track,r=e.audioTracks();i.label=n.label||n.language||"Unknown",i.selected=n.enabled,super(e,i),this.track=n,this.addClass(`vjs-${n.kind}-menu-item`);let s=(...a)=>{this.handleTracksChange.apply(this,a);};r.addEventListener("change",s),this.on("dispose",()=>{r.removeEventListener("change",s);});}createEl(e,i,n){let r=super.createEl(e,i,n),s=r.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(s.appendChild(ue("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(ue("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),r;}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){let i=this.player_.audioTracks();for(let n=0;n<i.length;n++){let r=i[n];r!==this.track&&(r.enabled=r===this.track);}}}handleTracksChange(e){this.selected(this.track.enabled);}};z.registerComponent("AudioTrackMenuItem",nd);rd=class extends ho{constructor(e,i={}){i.tracks=e.audioTracks(),super(e,i),this.setIcon("audio");}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`;}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`;}createItems(e=[]){this.hideThreshold_=1;let i=this.player_.audioTracks();for(let n=0;n<i.length;n++){let r=i[n];e.push(new nd(this.player_,{track:r,selectable:!0,multiSelectable:!1}));}return e;}};rd.prototype.controlText_="Audio Track";z.registerComponent("AudioTrackButton",rd);yo=class extends kr{constructor(e,i){let n=i.rate,r=parseFloat(n,10);i.label=n,i.selected=r===e.playbackRate(),i.selectable=!0,i.multiSelectable=!1,super(e,i),this.label=n,this.rate=r,this.on(e,"ratechange",s=>this.update(s));}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate);}update(e){this.selected(this.player().playbackRate()===this.rate);}};yo.prototype.contentElType="button";z.registerComponent("PlaybackRateMenuItem",yo);sd=class extends co{constructor(e,i){super(e,i),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",n=>this.updateVisibility(n)),this.on(e,"ratechange",n=>this.updateLabel(n)),this.on(e,"playbackrateschange",n=>this.handlePlaybackRateschange(n));}createEl(){let e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=ue("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e;}dispose(){this.labelEl_=null,super.dispose();}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`;}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`;}createItems(){let e=this.playbackRates(),i=[];for(let n=e.length-1;n>=0;n--)i.push(new yo(this.player(),{rate:e[n]+"x"}));return i;}handlePlaybackRateschange(e){this.update();}playbackRates(){let e=this.player();return e.playbackRates&&e.playbackRates()||[];}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0;}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden");}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x");}};sd.prototype.controlText_="Playback Rate";z.registerComponent("PlaybackRateMenuButton",sd);ad=class extends z{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`;}createEl(e="div",i={},n={}){return i.className||(i.className=this.buildCSSClass()),super.createEl(e,i,n);}};z.registerComponent("Spacer",ad);Rf=class extends ad{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`;}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:"\xA0"});}};z.registerComponent("CustomControlSpacer",Rf);od=class extends z{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"});}};od.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]};z.registerComponent("ControlBar",od);ld=class extends tr{constructor(e,i){super(e,i),this.on(e,"error",n=>{this.open(n);});}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`;}content(){let e=this.player().error();return e?this.localize(e.message):"";}};ld.prototype.options_=Object.assign({}
161,tr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});z.registerComponent("ErrorDisplay",ld);ud=class extends z{constructor(e,i={}){super(e,i),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds);}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),ue("select",{id:this.options_.id},{},this.options_.SelectOptions.map(i=>{let n=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${vi()}`)+"-"+i[1].replace(/\W+/g,""),r=ue("option",{id:n,value:this.localize(i[0]),textContent:this.localize(i[1])});return r.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${n}`),r;}));}};z.registerComponent("TextTrackSelect",ud);En=class extends z{constructor(e,i={}){super(e,i);let n=ue("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(n);let r=this.options_.selects;for(let s of r){let a=this.options_.selectConfigs[s],o=a.className,u=a.id.replace("%s",this.options_.id_),c=null,p=`vjs_select_${vi()}`;if(this.options_.type==="colors"){c=ue("span",{className:o});let T=ue("label",{id:u,className:"vjs-label",textContent:this.localize(a.label)});T.setAttribute("for",p),c.appendChild(T);}let _=new ud(e,{SelectOptions:a.options,legendId:this.options_.legendId,id:p,labelId:u});this.addChild(_),this.options_.type==="colors"&&(c.appendChild(_.el()),this.el().appendChild(c));}}createEl(){return ue("fieldset",{className:this.options_.className});}};z.registerComponent("TextTrackFieldset",En);dd=class extends z{constructor(e,i={}){super(e,i);let n=this.options_.textTrackComponentid,r=new En(e,{id_:n,legendId:`captions-text-legend-${n}`,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(r);let s=new En(e,{id_:n,legendId:`captions-background-${n}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(s);let a=new En(e,{id_:n,legendId:`captions-window-${n}`,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(a);}createEl(){return ue("div",{className:"vjs-track-settings-colors"});}};z.registerComponent("TextTrackSettingsColors",dd);cd=class extends z{constructor(e,i={}){super(e,i);let n=this.options_.textTrackComponentid,r=new En(e,{id_:n,legendId:`captions-font-size-${n}`,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(r);let s=new En(e,{id_:n,legendId:`captions-edge-style-${n}`,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(s);let a=new En(e,{id_:n,legendId:`captions-font-family-${n}`,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(a);}createEl(){return ue("div",{className:"vjs-track-settings-font"});}};z.registerComponent("TextTrackSettingsFont",cd);hd=class extends z{constructor(e,i={}){super(e,i);let n=new gt(e,{controlText:this.localize("restore all settings to the default values"),className:"vjs-default-button"});n.el().classList.remove("vjs-control","vjs-button"),n.el().textContent=this.localize("Reset"),this.addChild(n);let r=this.localize("Done"),s=new gt(e,{controlText:r,className:"vjs-done-button"});s.el().classList.remove("vjs-control","vjs-button"),s.el().textContent=r,this.addChild(s);}createEl(){return ue("div",{className:"vjs-track-settings-controls"});}};z.registerComponent("TrackSettingsControls",hd);nf="vjs-text-track-settings",Hy=["#000","Black"],$y=["#00F","Blue"],zy=["#0FF","Cyan"],Gy=["#0F0","Green"],Wy=["#F0F","Magenta"],Yy=["#F00","Red"],Xy=["#FFF","White"],Ky=["#FF0","Yellow"],rf=["1","Opaque"],sf=["0.5","Semi-Transparent"],Qy=["0","Transparent"],Kn={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Hy,Xy,Yy,Gy,$y,Ky,Wy,zy],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[rf,sf,Qy],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Xy,Hy,Yy,Gy,$y,Ky,Wy,zy],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",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:"",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:t=>t==="1.00"?null:Number(t)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[rf,sf],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[Qy,sf,rf],className:"vjs-window-opacity vjs-opacity"}};Kn.windowColor.options=Kn.backgroundColor.options;Of=class extends tr{constructor(e,i){i.temporary=!1,super(e,i),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=ue("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),i.persistTextTrackSettings===void 0&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings();}renderModalComponents(e){let i=new dd(e,{textTrackComponentid:this.id_,selectConfigs:Kn,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(i);let n=new cd(e,{textTrackComponentid:this.id_,selectConfigs:Kn,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(n);let r=new hd(e);this.addChild(r);}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],()=>{this.saveSettings(),this.close();}),this.on(this.$(".vjs-default-button"),["click","tap"],()=>{this.setDefaults(),this.updateDisplay();}),Es(Kn,e=>{this.on(this.$(e.selector),"change",this.updateDisplay);});}dispose(){this.endDialog=null,super.dispose();}label(){return this.localize("Caption Settings Dialog");}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.");}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings";}getValues(){return Sb(Kn,(e,i,n)=>{let r=nP(this.$(i.selector),i.parser);return r!==void 0&&(e[n]=r),e;},{});}setValues(e){Es(Kn,(i,n)=>{rP(this.$(i.selector),e[n],i.parser);});}setDefaults(){Es(Kn,e=>{let i=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=i;});}restoreSettings(){let e;try{e=JSON.parse(j.default.localStorage.getItem(nf));}catch(i){_e.warn(i);}e&&this.setValues(e);}saveSettings(){if(!this.options_.persistTextTrackSettings)return;let e=this.getValues();try{Object.keys(e).length?j.default.localStorage.setItem(nf,JSON.stringify(e)):j.default.localStorage.removeItem(nf);}catch(i){_e.warn(i);}}updateDisplay(){let e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay();}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons();}};z.registerComponent("TextTrackSettings",Of);Nf=class extends z{constructor(e,i){let n=i.ResizeObserver||j.default.ResizeObserver;i.ResizeObserver===null&&(n=!1);let r=Re({createEl:!n,reportTouchActivity:!1},i);super(e,r),this.ResizeObserver=i.ResizeObserver||j.default.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=zb(()=>{this.resizeHandler();},100,!1,this),n?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el(
161))):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;let s=this.debouncedHandler_,a=this.unloadListener_=function(){Et(this,"resize",s),Et(this,"unload",a),a=null;};li(this.el_.contentWindow,"unload",a),li(this.el_.contentWindow,"resize",s);},this.one("load",this.loadListener_));}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"});}resizeHandler(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize");}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose();}};z.registerComponent("ResizeManager",Nf);sP={trackingThreshold:20,liveTolerance:15},jf=class extends z{constructor(e,i){let n=Re(sP,i,{createEl:!1});super(e,n),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=r=>this.handlePlay(r),this.handleFirstTimeupdate_=r=>this.handleFirstTimeupdate(r),this.handleSeeked_=r=>this.handleSeeked(r),this.seekToLiveEdge_=r=>this.seekToLiveEdge(r),this.reset_(),this.on(this.player_,"durationchange",r=>this.handleDurationchange(r)),this.on(this.player_,"canplay",()=>this.toggleTracking());}trackLive_(){let e=this.player_.seekable();if(!e||!e.length)return;let i=Number(j.default.performance.now().toFixed(4)),n=this.lastTime_===-1?0:(i-this.lastTime_)/1e3;this.lastTime_=i,this.pastSeekEnd_=this.pastSeekEnd()+n;let r=this.liveCurrentTime(),s=this.player_.currentTime(),a=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-s)>this.options_.liveTolerance;(!this.timeupdateSeen_||r===1/0)&&(a=!1),a!==this.behindLiveEdge_&&(this.behindLiveEdge_=a,this.trigger("liveedgechange"));}handleDurationchange(){this.toggleTracking();}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking());}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,_i),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)));}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_);}handleSeeked(){let e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_();}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_);}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_);}nextSeekedFromUser(){this.nextSeekedFromUser_=!0;}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"));}seekableEnd(){let e=this.player_.seekable(),i=[],n=e?e.length:0;for(;n--;)i.push(e.end(n));return i.length?i.sort()[i.length-1]:1/0;}seekableStart(){let e=this.player_.seekable(),i=[],n=e?e.length:0;for(;n--;)i.push(e.start(n));return i.length?i.sort()[0]:0;}liveWindow(){let e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart();}isLive(){return this.isTracking();}atLiveEdge(){return!this.behindLiveEdge();}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd();}pastSeekEnd(){let e=this.seekableEnd();return this.lastSeekEnd_!==-1&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_;}behindLiveEdge(){return this.behindLiveEdge_;}isTracking(){return typeof this.trackingInterval_=="number";}seekToLiveEdge(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()));}dispose(){this.stopTracking(),super.dispose();}};z.registerComponent("LiveTracker",jf);Mf=class extends z{constructor(e,i){super(e,i),this.on("statechanged",n=>this.updateDom_()),this.updateDom_();}createEl(){return this.els={title:ue("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${vi()}`}),description:ue("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${vi()}`})},ue("div",{className:"vjs-title-bar"},{},Ab(this.els));}updateDom_(){let e=this.player_.tech_,i=e&&e.el_,n={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(r=>{let s=this.state[r],a=this.els[r],o=n[r];Od(a),s&&ar(a,s),i&&(i.removeAttribute(o),s&&i.setAttribute(o,a.id));}),this.state.title||this.state.description?this.show():this.hide();}update(e){this.setState(e);}dispose(){let e=this.player_.tech_,i=e&&e.el_;i&&(i.removeAttribute("aria-labelledby"),i.removeAttribute("aria-describedby")),super.dispose(),this.els=null;}};z.registerComponent("TitleBar",Mf);aP={initialDisplay:4e3,position:[],takeFocus:!1},Bf=class extends gt{constructor(e,i){i=Re(aP,i),super(e,i),this.controlText(i.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],n=>{this.removeClass("force-display");});}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(" ")}`;}createEl(){let e=ue("button",{},{type:"button",class:this.buildCSSClass()},ue("span"));return this.controlTextEl_=e.querySelector("span"),e;}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass("force-display");},this.options_.initialDisplay);}hide(){this.removeClass("force-display"),super.hide();}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose();}};z.registerComponent("TransientButton",Bf);Ff=t=>{let e=t.el();if(e.hasAttribute("src"))return t.triggerSourceset(e.src),!0;let i=t.$$("source"),n=[],r="";if(!i.length)return!1;for(let s=0;s<i.length;s++){let a=i[s].src;a&&n.indexOf(a)===-1&&n.push(a);}return n.length?(n.length===1&&(r=n[0]),t.triggerSourceset(r),!0):!1;},oP=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML;},set(t){let e=W.default.createElement(this.nodeName.toLowerCase());e.innerHTML=t;let i=W.default.createDocumentFragment();for(;e.childNodes.length;)i.appendChild(e.childNodes[0]);return this.innerText="",j.default.Element.prototype.appendChild.call(this,i),this.innerHTML;}}),nT=(t,e)=>{let i={};for(let n=0;n<t.length&&(i=Object.getOwnPropertyDescriptor(t[n],e),!(i&&i.set&&i.get));n++);return i.enumerable=!0,i.configurable=!0,i;},lP=t=>nT([t.el(),j.default.HTMLMediaElement.prototype,j.default.Element.prototype,oP],"innerHTML"),Jy=function(t){let e=t.el();if(e.resetSourceWatch_)return;let i={},n=lP(t),r=s=>(...a)=>{let o=s.apply(e,a);return Ff(t),o;};["append","appendChild","insertAdjacentHTML"].forEach(s=>{e[s]&&(i[s]=e[s],e[s]=r(i[s]));}),Object.defineProperty(e,"innerHTML",Re(n,{set:r(n.set)})),e.resetSourceWatch_=()=>
161{e.resetSourceWatch_=null,Object.keys(i).forEach(s=>{e[s]=i[s];}),Object.defineProperty(e,"innerHTML",n);},t.one("sourceset",e.resetSourceWatch_);},uP=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?eT(j.default.Element.prototype.getAttribute.call(this,"src")):"";},set(t){return j.default.Element.prototype.setAttribute.call(this,"src",t),t;}}),dP=t=>nT([t.el(),j.default.HTMLMediaElement.prototype,uP],"src"),cP=function(t){if(!t.featuresSourceset)return;let e=t.el();if(e.resetSourceset_)return;let i=dP(t),n=e.setAttribute,r=e.load;Object.defineProperty(e,"src",Re(i,{set:s=>{let a=i.set.call(e,s);return t.triggerSourceset(e.src),a;}})),e.setAttribute=(s,a)=>{let o=n.call(e,s,a);return /src/i.test(s)&&t.triggerSourceset(e.src),o;},e.load=()=>{let s=r.call(e);return Ff(t)||(t.triggerSourceset(""),Jy(t)),s;},e.currentSrc?t.triggerSourceset(e.currentSrc):Ff(t)||Jy(t),e.resetSourceset_=()=>{e.resetSourceset_=null,e.load=r,e.setAttribute=n,Object.defineProperty(e,"src",i),e.resetSourceWatch_&&e.resetSourceWatch_();};},Z=class t extends De{constructor(e,i){super(e,i);let n=e.source,r=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&this.el_.tagName==="VIDEO",n&&(this.el_.currentSrc!==n.src||e.tag&&e.tag.initNetworkState_===3)?this.setSource(n):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){let s=this.el_.childNodes,a=s.length,o=[];for(;a--;){let u=s[a];u.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(u),this.remoteTextTracks().addTrack(u.track),this.textTracks().addTrack(u.track),!r&&!this.el_.hasAttribute("crossorigin")&&Bd(u.src)&&(r=!0)):o.push(u));}for(let u=0;u<o.length;u++)this.el_.removeChild(o[u]);}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&r&&_e.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
162This may prevent text tracks from loading.`),this.restoreMetadataTracksInIOSNativePlayer_(),(Za||Id)&&e.nativeControlsForTouch===!0&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady();}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.dis
162poseMediaElement(this.el_),this.options_=null,super.dispose();}setupSourcesetHandling_(){cP(this);}restoreMetadataTracksInIOSNativePlayer_(){let e=this.textTracks(),i,n=()=>{i=[];for(let s=0;s<e.length;s++){let a=e[s];a.kind==="metadata"&&i.push({track:a,storedMode:a.mode});}};n(),e.addEventListener("change",n),this.on("dispose",()=>e.removeEventListener("change",n));let r=()=>{for(let s=0;s<i.length;s++){let a=i[s];a.track.mode==="disabled"&&a.track.mode!==a.storedMode&&(a.track.mode=a.storedMode);}e.removeEventListener("change",r);};this.on("webkitbeginfullscreen",()=>{e.removeEventListener("change",n),e.removeEventListener("change",r),e.addEventListener("change",r);}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",n),e.addEventListener("change",n),e.removeEventListener("change",r);});}overrideNative_(e,i){if(i!==this[`featuresNative${e}Tracks`])return;let n=e.toLowerCase();this[`${n}TracksListeners_`]&&Object.keys(this[`${n}TracksListeners_`]).forEach(r=>{this.el()[`${n}Tracks`].removeEventListener(r,this[`${n}TracksListeners_`][r]);}),this[`featuresNative${e}Tracks`]=!i,this[`${n}TracksListeners_`]=null,this.proxyNativeTracksForType_(n);}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e);}overrideNativeVideoTracks(e){this.overrideNative_("Video",e);}proxyNativeTracksForType_(e){let i=gi[e],n=this.el()[i.getterName],r=this[i.getterName]();if(!this[`featuresNative${i.capitalName}Tracks`]||!n||!n.addEventListener)return;let s={change:o=>{let u={type:"change",target:r,currentTarget:r,srcElement:r};r.trigger(u),e==="text"&&this[Ms.remoteText.getterName]().trigger(u);},addtrack(o){r.addTrack(o.track);},removetrack(o){r.removeTrack(o.track);}},a=function(){let o=[];for(let u=0;u<r.length;u++){let c=!1;for(let p=0;p<n.length;p++)if(n[p]===r[u]){c=!0;break;}c||o.push(r[u]);}for(;o.length;)r.removeTrack(o.shift());};this[i.getterName+"Listeners_"]=s,Object.keys(s).forEach(o=>{let u=s[o];n.addEventListener(o,u),this.on("dispose",c=>n.removeEventListener(o,u));}),this.on("loadstart",a),this.on("dispose",o=>this.off("loadstart",a));}proxyNativeTracks_(){gi.names.forEach(e=>{this.proxyNativeTracksForType_(e);});}createEl(){let e=this.options_.tag;if(!e||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(e){let n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),t.disposeMediaElement(e),e=n;}else{e=W.default.createElement("video");let n=this.options_.tag&&Xn(this.options_.tag),r=Re({},n);(!Za||this.options_.nativeControlsForTouch!==!0)&&delete r.controls,Lb(e,Object.assign(r,{id:this.options_.techId,class:"vjs-tech"}));}e.playerId=this.options_.playerId;}typeof this.options_.preload<"u"&&Os(e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);let i=["loop","muted","playsinline","autoplay"];for(let n=0;n<i.length;n++){let r=i[n],s=this.options_[r];typeof s<"u"&&(s?Os(e,r,r):Ld(e,r),e[r]=s);}return e;}handleLateInit_(e){if(e.networkState===0||e.networkState===3)return;if(e.readyState===0){let n=!1,r=function(){n=!0;};this.on("loadstart",r);let s=function(){n||this.trigger("loadstart");};this.on("loadedmetadata",s),this.ready(function(){this.off("loadstart",r),this.off("loadedmetadata",s),n||this.trigger("loadstart");});return;}let i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready(function(){i.forEach(function(n){this.trigger(n);},this);});}setScrubbing(e){this.isScrubbing_=e;}scrubbing(){return this.isScrubbing_;}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&kd?this.el_.fastSeek(e):this.el_.currentTime=e;}catch(i){_e(i,"Video is not ready. (Video.js)");}}duration(){if(this.el_.duration===1/0&&Oi&&Zi&&this.el_.currentTime===0){let e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e));};return this.on("timeupdate",e),NaN;}return this.el_.duration||NaN;}width(){return this.el_.offsetWidth;}height(){return this.el_.offsetHeight;}
162proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;let e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1);},i=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}));};this.on("webkitbeginfullscreen",i),this.on("dispose",()=>{this.off("webkitbeginfullscreen",i),this.off("webkitendfullscreen",e);});}supportsFullScreen(){return typeof this.el_.webkitEnterFullScreen=="function";}enterFullScreen(){let e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Yi(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen();}catch(i){this.trigger("fullscreenerror",i);}},0);else try{e.webkitEnterFullScreen();}catch(i){this.trigger("fullscreenerror",i);}}exitFullScreen(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return;}this.el_.webkitExitFullScreen();}requestPictureInPicture(){return this.el_.requestPictureInPicture();}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e);}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e);}src(e){if(e===void 0)return this.el_.src;this.setSrc(e);}addSourceElement(e,i){if(!e)return _e.error("Invalid source URL."),!1;let n={src:e};i&&(n.type=i);let r=ue("source",{},n);return this.el_.appendChild(r),!0;}removeSourceElement(e){if(!e)return _e.error("Source URL is required to remove the source element."),!1;let i=this.el_.querySelectorAll("source");for(let n of i)if(n.src===e)return this.el_.removeChild(n),!0;return _e.warn(`No matching source element found with src: ${e}`),!1;}reset(){t.resetMediaElement(this.el_);}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc;}setControls(e){this.el_.controls=!!e;}addTextTrack(e,i,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,i,n):super.addTextTrack(e,i,n);}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);let i=W.default.createElement("track");return e.kind&&(i.kind=e.kind),e.label&&(i.label=e.label),(e.language||e.srclang)&&(i.srclang=e.language||e.srclang),e.default&&(i.default=e.default),e.id&&(i.id=e.id),e.src&&(i.src=e.src),i;}addRemoteTextTrack(e,i){let n=super.addRemoteTextTrack(e,i);return this.featuresNativeTextTracks&&this.el().appendChild(n),n;}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){let i=this.$$("track"),n=i.length;for(;n--;)(e===i[n]||e===i[n].track)&&this.el().removeChild(i[n]);}}getVideoPlaybackQuality(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();let e={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),j.default.performance&&(e.creationTime=j.default.performance.now()),e;}};Cd(Z,"TEST_VID",function(){if(!Vs())return;let t=W.default.createElement("video"),e=W.default.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",t.appendChild(e),t;});Z.isSupported=function(){try{Z.TEST_VID.volume=.5;}catch{return!1;}return!!(Z.TEST_VID&&Z.TEST_VID.canPlayType);};Z.canPlayType=function(t){return Z.TEST_VID.canPlayType(t);};Z.canPlaySource=function(t,e){return Z.canPlayType(t.type);};Z.canControlVolume=function(){try{let t=Z.TEST_VID.volume;Z.TEST_VID.volume=t/2+.1;let e=t!==Z.TEST_VID.volume;return e&&At?(j.default.setTimeout(()=>{Z&&Z.prototype&&(Z.prototype.featuresVolumeControl=t!==Z.TEST_VID.volume);}),!1):e;}catch{return!1;}};Z.canMuteVolume=function(){try{let t=Z.TEST_VID.muted;return Z.TEST_VID.muted=!t,Z.TEST_VID.muted?Os(Z.TEST_VID,"muted","muted"):Ld(Z.TEST_VID,"muted","muted"),t!==Z.TEST_VID.muted;}catch{return!1;}};Z.canControlPlaybackRate=function(){if(Oi&&Zi&&wd<58)return!1;try{let t=Z.TEST_VID.playbackRate;return Z.TEST_VID.playbackRate=t/2+.1,t!==Z.TEST_VID.playbackRate;}catch{return!1;}};Z.canOverrideAttributes=function(){try{let t=()=>{};Object.defineProperty(W.default.createElement("video"),"src",{get:t,set:t}),Object.defineProperty(W.default.createElement("audio"),"src",{get:t,set:t}),Object.defineProperty(W.default.createElement("video"),"innerHTML",{get:t,set:t}),Object.defineProperty(W.default.createElement("audio"),"innerHTML",{get:t,set:t});}catch{return!1;}return!0;};Z.supportsNativeTextTracks=function(){return kd||At&&Zi;};Z.supportsNativeVideoTracks=function(){return!!(Z.TEST_VID&&Z.TEST_
162VID.videoTracks);};Z.supportsNativeAudioTracks=function(){return!!(Z.TEST_VID&&Z.TEST_VID.audioTracks);};Z.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function([t,e]){Cd(Z.prototype,t,()=>Z[e](),!0);});Z.prototype.featuresVolumeControl=Z.canControlVolume();Z.prototype.movingMediaElementInDOM=!At;Z.prototype.featuresFullscreenResize=!0;Z.prototype.featuresProgressEvents=!0;Z.prototype.featuresTimeupdateEvents=!0;Z.prototype.featuresVideoFrameCallback=!!(Z.TEST_VID&&Z.TEST_VID.requestVideoFrameCallback);Z.disposeMediaElement=function(t){if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),typeof t.load=="function"&&function(){try{t.load();}catch{}}();}};Z.resetMediaElement=function(t){if(!t)return;let e=t.querySelectorAll("source"),i=e.length;for(;i--;)t.removeChild(e[i]);t.removeAttribute("src"),typeof t.load=="function"&&function(){try{t.load();}catch{}}();};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(t){Z.prototype[t]=function(){return this.el_[t]||this.el_.hasAttribute(t);};});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(t){Z.prototype["set"+tt(t)]=function(e){this.el_[t]=e,e?this.el_.setAttribute(t,t):this.el_.removeAttribute(t);};});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(t){Z.prototype[t]=function(){return this.el_[t];};});["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(t){Z.prototype["set"+tt(t)]=function(e){this.el_[t]=e;};});["pause","load","play"].forEach(function(t){Z.prototype[t]=function(){return this.el_[t]();};});De.withSourceHandlers(Z);Z.nativeSourceHandler={};Z.nativeSourceHandler.canPlayType=function(t){try{return Z.TEST_VID.canPlayType(t);}catch{return"";}};Z.nativeSourceHandler.canHandleSource=function(t,e){if(t.type)return Z.nativeSourceHandler.canPlayType(t.type);if(t.src){let i=gp(t.src);return Z.nativeSourceHandler.canPlayType(`video/${i}`);}return"";};Z.nativeSourceHandler.handleSource=function(t,e,i){e.setSrc(t.src);};Z.nativeSourceHandler.dispose=function(){};Z.registerSourceHandler(Z.nativeSourceHandler);De.registerTech("Html5",Z);rT=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],af={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Uf=["tiny","xsmall","small","medium","large","xlarge","huge"],Su={};Uf.forEach(t=>{let e=t.charAt(0)==="x"?`x-${t.substring(1)}`:t;Su[t]=`vjs-layout-${e}`;});hP={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Fe=class t extends z{constructor(e,i,n){if(e.id=e.id||i.id||`vjs_video_${vi()}`,i=Object.assign(t.getTagSettings(e),i),i.initChildren=!1,i.createEl=!1,i.evented=!1,i.reportTouchActivity=!1,!i.language){let a=e.closest("[lang]");a&&(i.language=a.getAttribute("lang"));}if(super(null,i,n),this.boundDocumentFullscreenChange_=a=>this.documentFullscreenChange_(a),this.boundFullWindowOnEscKey_=a=>this.fullWindowOnEscKey(a),this.boundUpdateStyleEl_=a=>this.updateStyleEl_(a),this.boundApplyInitTime_=a=>this.applyInitTime_(a),this.boundUpdateCurrentBreakpoint_=a=>this.updateCurrentBreakpoint_(a),this.boundHandleTechClick_=a=>this.handleTechClick_(a),this.boundHandleTechDoubleClick_=a=>this.handleTechDoubleClick_(a),this.boundHandleTechTouchStart_=a=>this.handleTechTouchStart_(a),this.boundHandleTechTouchMove_=a=>this.handleTechTouchMove_(a),this.boundHandleTechTouchEnd_=a=>this.handleTechTouchEnd_(a),this.boundHandleTechTap_=a=>this.handleTechTap_(a),this.boundUpdatePlayerHeightOnAudioOnlyMode_=a=>this.updatePlayerHeightOnAudioOnlyMode_(a),this.isFullscreen_=!1,this.log=bb(this.id_),this.fsApi_=Eu,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHe
162ight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&Xn(e),this.language(this.options_.language),i.languages){let a={};Object.getOwnPropertyNames(i.languages).forEach(function(o){a[o.toLowerCase()]=i.languages[o];}),this.languages_=a;}else this.languages_=t.prototype.options_.languages;this.resetCache_(),this.poster_=i.poster||"",this.controls_=!!i.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),i.plugins&&Object.keys(i.plugins).forEach(a=>{if(typeof this[a]!="function")throw new Error(`plugin "${a}" does not exist`);}),this.scrubbing_=!1,this.el_=this.createEl(),fp(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(li(W.default,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);let r=Re(this.options_);if(i.plugins&&Object.keys(i.plugins).forEach(a=>{this[a](i.plugins[a]);}),i.debug&&this.debug(!0),this.options_.playerOptions=r,this.middleware_=[],this.playbackRates(i.playbackRates),i.experimentalSvgIcons){let o=new j.default.DOMParser().parseFromString(Jk,"image/svg+xml");if(o.querySelector("parsererror"))_e.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{let c=o.documentElement;c.style.display="none",this.el_.appendChild(c),this.addClass("vjs-svg-icons-enabled");}}this.initChildren(),this.isAudio(e.nodeName.toLowerCase()==="audio"),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),i.spatialNavigation&&i.spatialNavigation.enabled&&(this.spatialNavigation=new Sf(this),this.addClass("vjs-spatial-navigation-enabled")),Za&&this.addClass("vjs-touch-enabled"),At||this.addClass("vjs-workinghover"),t.players[this.id_]=this;let s=hf.split(".")[0];this.addClass(`vjs-v${s}`),this.userActive(!0),this.reportUserActivity(),this.one("play",a=>this.listenForUserActivity_(a)),this.on("keydown",a=>this.handleKeyDown(a)),this.on("languagechange",a=>this.handleLanguagechange(a)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode);});}dispose(){this.trigger("dispose"),this.off("dispose"),Et(W.default,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Et(W.default,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),Yk(this),Ot.names.forEach(e=>{let i=Ot[e],n=this[i.getterName]();n&&n.off&&n.off();}),super.dispose({restoreEl:this.options_.restoreEl});}createEl(){let e=this.tag,i,n=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player"),r=this.tag.tagName.toLowerCase()==="video-js";n?i=this.el_=e.parentNode:r||(i=this.el_=super.createEl("div"));let s=Xn(e);if(r){for(i=this.el_=e,e=this.tag=W.default.createElement("video");i.children.length;)e.appendChild(i.firstChild);Ya(i,"video-js")||xr(i,"video-js"),i.appendChild(e),n=this.playerElIngest_=i,Object.keys(i).forEac
162h(u=>{try{e[u]=i[u];}catch{}});}e.setAttribute("tabindex","-1"),s.tabindex="-1",Zi&&Dd&&(e.setAttribute("role","application"),s.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach(function(u){r&&u==="class"||i.setAttribute(u,s[u]),r&&e.setAttribute(u,s[u]);}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=i.player=this,this.addClass("vjs-paused");let a=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter(u=>Db[u]).map(u=>"vjs-device-"+u.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...a),j.default.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=Hb("vjs-styles-dimensions");let u=er(".vjs-styles-defaults"),c=er("head");c.insertBefore(this.styleEl_,u?u.nextSibling:c.firstChild);}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);let o=e.getElementsByTagName("a");for(let u=0;u<o.length;u++){let c=o.item(u);xr(c,"vjs-hidden"),c.setAttribute("hidden","hidden");}return e.initNetworkState_=e.networkState,e.parentNode&&!n&&e.parentNode.insertBefore(i,e),pf(e,i),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=i,i;}crossOrigin(e){if(typeof e>"u")return this.techGet_("crossOrigin");if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){_e.warn(`crossOrigin must be null,  "anonymous" or "use-credentials", given "${e}"`);return;}this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e);}width(e){return this.dimension("width",e);}height(e){return this.dimension("height",e);}dimension(e,i){let n=e+"_";if(i===void 0)return this[n]||0;if(i===""||i==="auto"){this[n]=void 0,this.updateStyleEl_();return;}let r=parseFloat(i);if(isNaN(r)){_e.error(`Improper value "${i}" supplied for for ${e}`);return;}this[n]=r,this.updateStyleEl_();}fluid(e){if(e===void 0)return!!this.fluid_;this.fluid_=!!e,An(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),wk(this,()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_);})):this.removeClass("vjs-fluid"),this.updateStyleEl_();}fill(e){if(e===void 0)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill");}aspectRatio(e){if(e===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_();}updateStyleEl_(){if(j.default.VIDEOJS_NO_DYNAMIC_STYLE===!0){let o=typeof this.width_=="number"?this.width_:this.options_.width,u=typeof this.height_=="number"?this.height_:this.options_.height,c=this.tech_&&this.tech_.el();c&&(o>=0&&(c.width=o),u>=0&&(c.height=u));return;}let e,i,n,r;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?n=this.aspectRatio_:this.videoWidth()>0?n=this.videoWidth()+":"+this.videoHeight():n="16:9";let s=n.split(":"),a=s[1]/s[0];this.width_!==void 0?e=this.width_:this.height_!==void 0?e=this.height_/a:e=this.videoWidth()||300,this.height_!==void 0?i=this.height_:i=e*a,/^[^a-zA-Z]/.test(this.id())?r="dimensions-"+this.id():r=this.id()+"-dimensions",this.addClass(r),$b(this.styleEl_,`
163      .${r} {
164        width: ${e}px;
165        height: ${i}px;
166      }
167
168      .${r}.vjs-fluid:not(.vjs-audio-only-mode) {
169        padding-top: ${a*100}%;
170      }
171    `);}loadTech_(e,i){this.tech_&&this.unloadTech_();let n=tt(e),r=e.charAt(0).toLowerCase()+e.slice(1);n!=="Html5"&&this.tag&&(De.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;let s=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(s=!1);let a={source:i,autoplay:s,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${r}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};
171Ot.names.forEach(u=>{let c=Ot[u];a[c.getterName]=this[c.privateName];}),Object.assign(a,this.options_[n]),Object.assign(a,this.options_[r]),Object.assign(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),i&&i.src===this.cache_.src&&this.cache_.currentTime>0&&(a.startTime=this.cache_.currentTime);let o=De.getTech(e);if(!o)throw new Error(`No Tech named '${n}' exists! '${n}' should be registered using videojs.registerTech()'`);this.tech_=new o(a),this.tech_.ready(Be(this,this.handleTechReady_),!0),bf.jsonToTextTracks(this.textTracksJson_||[],this.tech_),rT.forEach(u=>{this.on(this.tech_,u,c=>this[`handleTech${tt(u)}_`](c));}),Object.keys(af).forEach(u=>{this.on(this.tech_,u,c=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${af[u]}_`].bind(this),event:c});return;}this[`handleTech${af[u]}_`](c);});}),this.on(this.tech_,"loadstart",u=>this.handleTechLoadStart_(u)),this.on(this.tech_,"sourceset",u=>this.handleTechSourceset_(u)),this.on(this.tech_,"waiting",u=>this.handleTechWaiting_(u)),this.on(this.tech_,"ended",u=>this.handleTechEnded_(u)),this.on(this.tech_,"seeking",u=>this.handleTechSeeking_(u)),this.on(this.tech_,"play",u=>this.handleTechPlay_(u)),this.on(this.tech_,"pause",u=>this.handleTechPause_(u)),this.on(this.tech_,"durationchange",u=>this.handleTechDurationChange_(u)),this.on(this.tech_,"fullscreenchange",(u,c)=>this.handleTechFullscreenChange_(u,c)),this.on(this.tech_,"fullscreenerror",(u,c)=>this.handleTechFullscreenError_(u,c)),this.on(this.tech_,"enterpictureinpicture",u=>this.handleTechEnterPictureInPicture_(u)),this.on(this.tech_,"leavepictureinpicture",u=>this.handleTechLeavePictureInPicture_(u)),this.on(this.tech_,"error",u=>this.handleTechError_(u)),this.on(this.tech_,"posterchange",u=>this.handleTechPosterChange_(u)),this.on(this.tech_,"textdata",u=>this.handleTechTextData_(u)),this.on(this.tech_,"ratechange",u=>this.handleTechRateChange_(u)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(n!=="Html5"||!this.tag)&&pf(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null);}unloadTech_(){Ot.names.forEach(e=>{let i=Ot[e];this[i.privateName]=this[i.getterName]();}),this.textTracksJson_=bf.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1;}tech(e){return e===void 0&&_e.warn(`Using the tech directly can be dangerous. I hope you know 
171what you're doing.
172See https://github.com/videojs/video.js/issues/2617 for more info.
173`),this.tech_;}version(){return{"video.js":hf};}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_);}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_);}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_();}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay());}manualAutoplay_(e){if(!this.tech_||typeof e!="string")return;let i=()=>{let r=this.muted();this.muted(!0);let s=()=>{this.muted(r);};this.playTerminatedQueue_.push(s);let a=this.play();if(Ka(a))return a.catch(o=>{throw s(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${o||""}`);});},n;if(e==="any"&&!this.muted()?(n=this.play(),Ka(n)&&(n=n.catch(i))):e==="muted"&&!this.muted()?n=i():n=this.play(),!!Ka(n))return n.then(()=>{this.trigger({type:"autoplay-success",autoplay:e});}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e});});}updateSourceCaches_(e=""){let i=e,n="";typeof i!="string"&&(i=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],i&&!n&&(n=Qk(this,i)),this.cache_.source=Re({},e,{src:i,type:n});let r=this.cache_.sources.filter(u=>u.src&&u.src===i),s=[],a=this.$$("source"),o=[];for(let u=0;u<a.length;u++){let c=Xn(a[u]);s.push(c),c.src&&c.src===i&&o.push(c.src);}o.length&&!r.length?this.cache_.sources=s:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=i;}handleTechSourceset_(e){if(!this.changingSrc_){let i=s=>this.updateSourceCaches_(s),n=this.currentSource().src,r=e.src;n&&!/^blob:/.test(n)&&/^blob:/.test(r)&&(!this.lastSource_||this.lastSource_.tech!==r&&this.lastSource_.player!==n)&&(i=()=>{}),i(r),e.src||this.tech_.any(["sourceset","loadstart"],s=>{if(s.type==="sourceset")return;let a=this.techGet_("currentSrc");this.lastSource_.tech=a,this.updateSourceCaches_(a);});}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"});}hasStarted(e){if(e===void 0)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"));}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play");}handleTechRateChange_(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange");}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");let e=this.currentTime(),i=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",i));};this.on("timeupdate",i);}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay");}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough");}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing");}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking");}
173handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked");}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause");}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended");}handleTechDurationChange_(){this.duration(this.techGet_("duration"));}handleTechClick_(e){this.controls_&&(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.click===void 0||this.options_.userActions.click!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,e):this.paused()?Yi(this.play()):this.pause());}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),n=>n.contains(e.target))||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.doubleClick===void 0||this.options_.userActions.doubleClick!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!W.default.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen());}handleTechTap_(){this.userActive(!this.userActive());}handleTechTouchStart_(){this.userWasActive=this.userActive();}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity();}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault();}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen");}documentFullscreenChange_(e){let i=e.target.player;if(i&&i!==this)return;let n=this.el(),r=W.default[this.fsApi_.fullscreenElement]===n;!r&&n.matches&&(r=n.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(r);}handleTechFullscreenChange_(e,i){i&&(i.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs");})),this.isFullscreen(i.isFullscreen));}handleTechFullscreenError_(e,i){this.trigger("fullscreenerror",i);}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture");}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0);}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1);}handleTechError_(){let e=this.tech_.error();e&&this.error(e);}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e);}getCache(){return this.cache_;}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1};}techCall_(e,i){this.ready(function(){if(e in Gk)return $k(this.middleware_,this.tech_,e,i);if(e in My)return jy(this.middleware_,this.tech_,e,i);try{this.tech_&&this.tech_[e](i);}catch(n){throw _e(n),n;}},!0);}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in zk)return Hk(this.middleware_,this.tech_,e);if(e in My)return jy(this.middleware_,this.tech_,e);try{return this.tech_[e]();}catch(i){throw this.tech_[e]===void 0?(_e(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,i),i):i.name==="TypeError"?(_e(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,i),this.tech_.isReady_=!1,i):(_e(i),i);}}}play(){return new Promise(e=>{this.play_(e);});}play_(e=Yi){this.playCallbacks_.push(e);let i=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),n=!!(kd||At);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!i){this.waitToPlay_=a=>{this.play_();},this.one(["ready","loadstart"],this.waitToPlay_),!i&&n&&this.load();return;}let r=this.techGet_("play");n&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),r===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(r);}runPlayTerminatedQueue_(){let e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(i){i();});}runPlayCallbacks_(e){let i=this.playCallbacks_.slice(0);
173this.playCallbacks_=[],this.playTerminatedQueue_=[],i.forEach(function(n){n(e);});}pause(){this.techCall_("pause");}paused(){return this.techGet_("paused")!==!1;}played(){return this.techGet_("played")||Ri(0,0);}scrubbing(e){if(typeof e>"u")return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing");}currentTime(e){if(e===void 0)return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime;if(e<0&&(e=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return;}this.techCall_("setCurrentTime",e),this.cache_.initTime=0,isFinite(e)&&(this.cache_.currentTime=Number(e));}applyInitTime_(){this.currentTime(this.cache_.initTime);}duration(e){if(e===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"));}remainingTime(){return this.duration()-this.currentTime();}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime());}buffered(){let e=this.techGet_("buffered");return(!e||!e.length)&&(e=Ri(0,0)),e;}seekable(){let e=this.techGet_("seekable");return(!e||!e.length)&&(e=Ri(0,0)),e;}seeking(){return this.techGet_("seeking");}ended(){return this.techGet_("ended");}networkState(){return this.techGet_("networkState");}readyState(){return this.techGet_("readyState");}bufferedPercent(){return Zb(this.buffered(),this.duration());}bufferedEnd(){let e=this.buffered(),i=this.duration(),n=e.end(e.length-1);return n>i&&(n=i),n;}volume(e){let i;if(e!==void 0){i=Math.max(0,Math.min(1,e)),this.cache_.volume=i,this.techCall_("setVolume",i),i>0&&this.lastVolume_(i);return;}return i=parseFloat(this.techGet_("volume")),isNaN(i)?1:i;}muted(e){if(e!==void 0){this.techCall_("setMuted",e);return;}return this.techGet_("muted")||!1;}defaultMuted(e){return e!==void 0&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1;}lastVolume_(e){if(e!==void 0&&e!==0){this.cache_.lastVolume=e;return;}return this.cache_.lastVolume;}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1;}isFullscreen(e){if(e!==void 0){let i=this.isFullscreen_;this.isFullscreen_=!!e,this.isFullscreen_!==i&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return;}return this.isFullscreen_;}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();let i=this;return new Promise((n,r)=>{function s(){i.off("fullscreenerror",o),i.off("fullscreenchange",a);}function a(){s(),n();}function o(c,p){s(),r(p);}i.one("fullscreenchange",a),i.one("fullscreenerror",o);let u=i.requestFullscreenHelper_(e);u&&(u.then(s,s),u.then(n,r));});}requestFullscreenHelper_(e){let i;if(this.fsApi_.prefixed||(i=this.options_.fullscreen&&this.options_.fullscreen.options||{},e!==void 0&&(i=e)),this.fsApi_.requestFullscreen){let n=this.el_[this.fsApi_.requestFullscreen](i);return n&&n.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),n;}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow();}exitFullscreen(){let e=this;return new Promise((i,n)=>{function r(){e.off("fullscreenerror",a),e.off("fullscreenchange",s);}function s(){r(),i();}function a(u,c){r(),n(c);}e.one("fullscreenchange",s),e.one("fullscreenerror",a);let o=e.exitFullscreenHelper_();o&&(o.then(r,r),o.then(i,n));});}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){let e=W.default[this.fsApi_.exitFullscreen]();return e&&Yi(e.then(()=>this.isFullscreen(!1))),e;}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow();}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=W.default.documentElement.style.overflow,li(W.default,"keydown",this.boundFullWindowOnEscKey_),W.default.documentElement.style.overflow="hidden",xr(W.default.body,"vjs-full-window"),this.trigger("enterFullWindow");}fullWindowOnEscKey(e){e.key==="Escape"&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen());}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,Et(W.default,"keydown",this.boundFullWindowOnEscKey_),W.default.documentElement.style.overflow=this.docOrigOverflow,Pd(W.default.body,"vjs-full-window"),this.trigger("exitFullWindow");}disablePictureInPicture(e){if(e===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged");}isInPictureInPicture(e){if(e!==void 0){this.isInPictureInPicture_=!!e,this.togglePictureInPictureClass_();return;}return!!this.isInPictureInPicture_;}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&j.default.documentPictureInPicture){let e=W.default.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(ue("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),j.default.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(i=>(Ub(i),this.el_.parentNode.insertBefore(e,this.el_),i.document.body.appendChild(this.el_),i.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:i}),i.addEventListener("pagehide",n=>{let r=n.target.querySelector(".video-js");e.parentNode.replaceChild(r,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture");}),i));}return"pictureInPictureEnabled"in W.default&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available");}exitPictureInPicture(){if(j.default.documentPictureInPicture&&j.default.documentPictureInPicture.window)return j.default.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in W.default)return W.default.exitPictureInPicture();}handleKeyDown(e){let{userActions:i}=this.options_;!i||!i.hotkeys||(r=>{let s=r.tagName.toLowerCase();if(r.isContentEditable)return!0;let a=["button","checkbox","hidden","radio","reset","submit"];return s==="input"?a.indexOf(r.type)===-1:["textarea"].indexOf(s)!==-1;})(this.el_.ownerDocument.activeElement)||(typeof i.hotkeys=="function"?i.hotkeys.call(this,e):this.handleHotkeys(e));}handleHotkeys(e){let i=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:n=a=>e.key.toLowerCase()==="f",muteKey:r=a=>e.key.toLowerCase()==="m",playPauseKey:s=a=>e.key.toLowerCase()==="k"||e.key.toLowerCase()===" "}=i;if(n.call(this,e)){e.preventDefault(),e.stopPropagation();let a=z.getComponent("FullscreenToggle");W.default[this.fsApi_.fullscreenEnabled]!==!1&&a.prototype.handleClick.call(this,e);}else r.call(this,e)?(e.preventDefault(),e.stopPropagation(),z.getComponent("MuteToggle").prototype.handleClick.call(this,e)):s.call(this,e)&&(e.preventDefault(),e.stopPropagation(),z.getComponent("PlayToggle").prototype.handleClick.call(this,e));}canPlayType(e){let i;for(let n=0,r=this.options_.techOrder;n<r.length;n++){let s=r[n],a=De.getTech(s);if(a||(a=z.getComponent(s)),!a){_e.error(`The "${s}" tech is undefined. Skipped browser support check for that tech.`);continue;}if(a.isSupported()&&(i=a.canPlayType(e),i))return i;}return"";}selectSource(e){let i=this.options_.techOrder.map(o=>[o,De.getTech(o)]).filter(([o,u])=>u?u.isSupported():(_e.error(`The "${o}" tech is undefined. Skipped browser support check for that tech.`),!1)),n=function(o,u,c){let p;return o.some(_=>u.some(T=>{if(p=c(_,T),p)return!0;})),p;},r,s=o=>(u,c)=>o(c,u),a=([o,u],c)=>{if(u.canPlaySource(c,this.options_[o.toLowerCase()]))return{source:c,tech:o};};
173return this.options_.sourceOrder?r=n(e,i,s(a)):r=n(i,e,a),r||!1;}handleSrc_(e,i){if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();let n=tT(e);if(!n.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage});},0);return;}if(this.changingSrc_=!0,i||(this.cache_.sources=n),this.updateSourceCaches_(n[0]),Vk(this,n[0],(r,s)=>{if(this.middleware_=s,i||(this.cache_.sources=n),this.updateSourceCaches_(r),this.src_(r)){if(n.length>1)return this.handleSrc_(n.slice(1));this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage});},0),this.triggerReady();return;}qk(s,this.tech_);}),n.length>1){let r=()=>{this.error(null),this.handleSrc_(n.slice(1),!0);},s=()=>{this.off("error",r);};this.one("error",r),this.one("playing",s),this.resetRetryOnError_=()=>{this.off("error",r),this.off("playing",s);};}}src(e){return this.handleSrc_(e,!1);}src_(e){let i=this.selectSource([e]);return i?Xb(i.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1;},!0),!1):(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready(()=>{this.changingSrc_=!1;}),!1):!0;}addSourceElement(e,i){return this.tech_?this.tech_.addSourceElement(e,i):!1;}removeSourceElement(e){return this.tech_?this.tech_.removeSourceElement(e):!1;}load(){if(this.tech_&&this.tech_.vhs){this.src(this.currentSource());return;}this.techCall_("load");}reset(){if(this.paused())this.doReset_();else{let e=this.play();Yi(e.then(()=>this.doReset_()));}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),An(this)&&this.trigger("playerreset");}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_();}resetProgressBar_(){this.currentTime(0);let{currentTimeDisplay:e,durationDisplay:i,progressControl:n,remainingTimeDisplay:r}=this.controlBar||{},{seekBar:s}=n||{};e&&e.updateContent(),i&&i.updateContent(),r&&r.updateContent(),s&&(s.update(),s.loadProgressBar&&s.loadProgressBar.update());}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_();}resetVolumeBar_(){this.volume(1),this.trigger("volumechange");}currentSources(){let e=this.currentSource(),i=[];return Object.keys(e).length!==0&&i.push(e),this.cache_.sources||i;}currentSource(){return this.cache_.source||{};}currentSrc(){return this.currentSource()&&this.currentSource().src||"";}currentType(){return this.currentSource()&&this.currentSource().type||"";}preload(e){if(e!==void 0){this.techCall_("setPreload",e),this.options_.preload=e;return;}return this.techGet_("preload");}autoplay(e){if(e===void 0)return this.options_.autoplay||!1;let i;typeof e=="string"&&/(any|play|muted)/.test(e)||e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(typeof e=="string"?e:"play"),i=!1):e?this.options_.autoplay=!0:this.options_.autoplay=!1,i=typeof i>"u"?this.options_.autoplay:i,this.tech_&&this.techCall_("setAutoplay",i);}playsinline(e){return e!==void 0&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline");}loop(e){if(e!==void 0){this.techCall_("setLoop",e),this.options_.loop=e;return;}return this.techGet_("loop");}poster(e){if(e===void 0)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"));}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){let e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"));}}controls(e){if(e===void 0)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControl
173sListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()));}usingNativeControls(e){if(e===void 0)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")));}error(e){if(e===void 0)return this.error_||null;if(Zn("beforeerror").forEach(i=>{let n=i(this,e);if(!(Ji(n)&&!Array.isArray(n)||typeof n=="string"||typeof n=="number"||n===null)){this.log.error("please return a value that MediaError expects in beforeerror hooks");return;}e=n;}),this.options_.suppressNotSupportedError&&e&&e.code===4){let i=function(){this.error(e);};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],i),this.one("loadstart",function(){this.off(["click","touchstart"],i);});return;}if(e===null){this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return;}this.error_=new Qe(e),this.addClass("vjs-error"),_e.error(`(CODE:${this.error_.code} ${Qe.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),Zn("error").forEach(i=>i(this,this.error_));}reportUserActivity(e){this.userActivity_=!0;}userActive(e){if(e===void 0)return this.userActive_;if(e=!!e,e!==this.userActive_){if(this.userActive_=e,this.userActive_){this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");return;}this.tech_&&this.tech_.one("mousemove",function(i){i.stopPropagation(),i.preventDefault();}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive");}}listenForUserActivity_(){let e,i,n,r=Be(this,this.reportUserActivity),s=function(_){(_.screenX!==i||_.screenY!==n)&&(i=_.screenX,n=_.screenY,r());},a=function(){r(),this.clearInterval(e),e=this.setInterval(r,250);},o=function(_){r(),this.clearInterval(e);};this.on("mousedown",a),this.on("mousemove",s),this.on("mouseup",o),this.on("mouseleave",o);let u=this.getChild("controlBar");u&&!At&&!Oi&&(u.on("mouseenter",function(_){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0;}),u.on("mouseleave",function(_){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout;})),this.on("keydown",r),this.on("keyup",r);let c,p=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(c);let _=this.options_.inactivityTimeout;_<=0||(c=this.setTimeout(function(){this.userActivity_||this.userActive(!1);},_));};this.setInterval(p,250);}playbackRate(e){if(e!==void 0){this.techCall_("setPlaybackRate",e);return;}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;}defaultPlaybackRate(e){return e!==void 0?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1;}isAudio(e){if(e!==void 0){this.isAudio_=!!e;return;}return!!this.isAudio_;}updatePlayerHeightOnAudioOnlyMode_(){let e=this.getChild("ControlBar");!e||this.audioOnlyCache_.controlBarHeight===e.currentHeight()||(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight));}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");let e=this.children(),i=this.getChild("ControlBar"),n=i&&i.currentHeight();e.forEach(r=>{r!==i&&r.el_&&!r.hasClass("vjs-hidden")&&(r.hide(),this.audioOnlyCache_.hiddenChildren.push(r));}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=n,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(n),this.trigger("audioonlymodechange");}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEac
173h(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange");}audioOnlyMode(e){if(typeof e!="boolean"||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){let i=[];return this.isInPictureInPicture()&&i.push(this.exitPictureInPicture()),this.isFullscreen()&&i.push(this.exitFullscreen()),this.audioPosterMode()&&i.push(this.audioPosterMode(!1)),Promise.all(i).then(()=>this.enableAudioOnlyUI_());}return Promise.resolve().then(()=>this.disableAudioOnlyUI_());}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange");}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange");}audioPosterMode(e){return typeof e!="boolean"||e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=e,e?this.audioOnlyMode()?this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_();}):Promise.resolve().then(()=>{this.enablePosterModeUI_();}):Promise.resolve().then(()=>{this.disablePosterModeUI_();}));}addTextTrack(e,i,n){if(this.tech_)return this.tech_.addTextTrack(e,i,n);}addRemoteTextTrack(e,i){if(this.tech_)return this.tech_.addRemoteTextTrack(e,i);}removeRemoteTextTrack(e={}){let{track:i}=e;if(i||(i=e),this.tech_)return this.tech_.removeRemoteTextTrack(i);}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality");}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0;}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0;}language(e){if(e===void 0)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),An(this)&&this.trigger("languagechange"));}languages(){return Re(t.prototype.options_.languages,this.languages_);}toJSON(){let e=Re(this.options_),i=e.tracks;e.tracks=[];for(let n=0;n<i.length;n++){let r=i[n];r=Re(r),r.player=void 0,e.tracks[n]=r;}return e;}createModal(e,i){i=i||{},i.content=e||"";let n=new tr(this,i);return this.addChild(n),n.on("dispose",()=>{this.removeChild(n);}),n.open(),n;}updateCurrentBreakpoint_(){if(!this.responsive())return;let e=this.currentBreakpoint(),i=this.currentWidth();for(let n=0;n<Uf.length;n++){let r=Uf[n],s=this.breakpoints_[r];if(i<=s){if(e===r)return;e&&this.removeClass(Su[e]),this.addClass(Su[r]),this.breakpoint_=r;break;}}}removeCurrentBreakpoint_(){let e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e);}breakpoints(e){return e===void 0?Object.assign(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=Object.assign({},hP,e),this.updateCurrentBreakpoint_(),Object.assign(this.breakpoints_));}responsive(e){if(e===void 0)return this.responsive_;e=!!e;let i=this.responsive_;if(e!==i)return this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e;}currentBreakpoint(){return this.breakpoint_;}currentBreakpointClass(){return Su[this.breakpoint_]||"";}loadMedia(e,i){if(!e||typeof e!="object")return;let n=this.crossOrigin();this.reset(),this.cache_.media=Re(e);let{artist:r,artwork:s,description:a,poster:o,src:u,textTracks:c,title:p}=this.cache_.media;!s&&o&&(this.cache_.media.artwork=[{src:o,type:Bu(o)}]),n&&this.crossOrigin(n),u&&this.src(u),o&&this.poster(o),Array.isArray(c)&&c.forEach(_=>this.addRemoteTextTrack(_,!1)),this.titleBar&&this.titleBar.update({title:p,description:a||r||""}),this.ready(i);}getMedia(){if(!this.cache_.media){let e=this.poster(),i=this.currentSources(),n=Array.prototype.map.call(this.remoteTextTracks(),s=>({kind:s.kind,label:s.label,language:s.language,src:s.src})),r={src:i,textTracks:n};return e&&(r.poster=e,r.artwork=[{src:r.poster,type:Bu(r.poster)}]),r;}return Re(this.cache_.media);}static getTagSettings(e){let i={sources:[],tracks:[]},n=Xn(e),r=n["data-setup"];if(Ya(e,"vjs-fill")&&(n.fill=!0),Ya(e,"vjs-fluid")&&(n.fluid=!0),r!==null)try{Object.assign(n,JSON.parse(r||"{}"));}catch(s){_e.error("data-setup",s);}if(Object.assign(i,n),e.hasChildNodes()){let s=e.childNodes;for(let a=0,o=s.length;a<o;a++){let u=s[a],c=u.nodeName.toLowerCase();c==="source"?i.sources.push(Xn(u)):c==="track"&&i.tracks.push(Xn(u));}}return i;}debug(e){if(e===void 0)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1);}playbackRates(e){if(e===void 0)return this.cache_.playbackRates;Array.isArray(e)&&e.every(i=>typeof i=="number")&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"));}};Fe.prototype.videoTracks=()=>{};Fe.prototype.audioTracks=()=>{};Fe.prototype.textTracks=()=>{};Fe.prototype.remoteTextTracks=()=>{};Fe.prototype.remoteTextTrackEls=()=>{};
173Ot.names.forEach(function(t){let e=Ot[t];Fe.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass(),this[e.privateName]);};});Fe.prototype.crossorigin=Fe.prototype.crossOrigin;Fe.players={};$a=j.default.navigator;Fe.prototype.options_={techOrder:De.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:$a&&($a.languages&&$a.languages[0]||$a.userLanguage||$a.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1};rT.forEach(function(t){Fe.prototype[`handleTech${tt(t)}_`]=function(){return this.trigger(t);};});z.registerComponent("Player",Fe);Au="plugin",ws="activePlugins_",Ss={},fd=t=>Ss.hasOwnProperty(t),vu=t=>fd(t)?Ss[t]:void 0,sT=(t,e)=>{t[ws]=t[ws]||{},t[ws][e]=!0;},pd=(t,e,i)=>{let n=(i?"before":"")+"pluginsetup";t.trigger(n,e),t.trigger(n+":"+e.name,e);},fP=function(t,e){let i=function(){pd(this,{name:t,plugin:e,instance:null},!0);let n=e.apply(this,arguments);return sT(this,t),pd(this,{name:t,plugin:e,instance:n}),n;};return Object.keys(e).forEach(function(n){i[n]=e[n];}),i;},Zy=(t,e)=>(e.prototype.name=t,function(...i){pd(this,{name:t,plugin:e,instance:null},!0);let n=new e(this,...i);return this[t]=()=>n,pd(this,n.getEventHash()),n;}),sr=(()=>{class t{constructor(i){if(this.constructor===t)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=i,this.log||(this.log=this.player.log.createLogger(this.name)),fp(this),delete this.trigger,Yb(this,this.constructor.defaultState),sT(i,this.name),this.dispose=this.dispose.bind(this),i.on("dispose",this.dispose);}version(){return this.constructor.VERSION;}getEventHash(i={}){return i.name=this.name,i.plugin=this.constructor,i.instance=this,i;}trigger(i,n={}){return Hs(this.eventBusEl_,i,this.getEventHash(n));}handleStateChanged(i){}dispose(){let{name:i,player:n}=this;this.trigger("dispose"),this.off(),n.off("dispose",this.dispose),n[ws][i]=!1,this.player=this.state=null,n[i]=Zy(i,Ss[i]);}static isBasic(i){let n=typeof i=="string"?vu(i):i;return typeof n=="function"&&!t.prototype.isPrototypeOf(n.prototype);}static registerPlugin(i,n){if(typeof i!="string")throw new Error(`Illegal plugin name, "${i}", must be a string, was ${typeof i}.`);if(fd(i))_e.warn(`A plugin named "${i}" already exists. You may want to avoid re-registering plugins!`);else if(Fe.prototype.hasOwnProperty(i))throw new Error(`Illegal plugin name, "${i}", cannot share a name with an existing player method!`);if(typeof n!="function")throw new Error(`Illegal plugin for "${i}", must be a function, was ${typeof n}.`);return Ss[i]=n,i!==Au&&(t.isBasic(n)?Fe.prototype[i]=fP(i,n):Fe.prototype[i]=Zy(i,n)),n;}static deregisterPlugin(i){if(i===Au)throw new Error("Cannot de-register base plugin.");fd(i)&&(delete Ss[i],delete Fe.prototype[i]);}static getPlugins(i=Object.keys(Ss)){let n;return i.forEach(r=>{let s=vu(r);s&&(n=n||{},n[r]=s);}),n;}static getPluginVersion(i){let n=vu(i);return n&&n.VERSION||"";}}return t.getPlugin=vu,t.BASE_PLUGIN_NAME=Au,t;})();sr.registerPlugin(Au,sr);Fe.prototype.usingPlugin=function(t){return!!this[ws]&&this[ws][t]===!0;};Fe.prototype.hasPlugin=function(t){return!!fd(t);};mP={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"},aT=t=>t.indexOf("#")===0?t.slice(1):t;N.hooks_=Tn;N.hooks=Zn;N.hook=fk;N.hookOnce=pk;N.removeHook=yb;if(j.default.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&Vs()){let t=er(".vjs-styles-defaults");if(!t){t=Hb("vjs-styles-defaults");let e=er("head");
173e&&e.insertBefore(t,e.firstChild),$b(t,`
174      .video-js {
175        width: 300px;
176        height: 150px;
177      }
178
179      .vjs-fluid:not(.vjs-audio-only-mode) {
180        padding-top: 56.25%
181      }
182    `);}}gf(1,N);N.VERSION=hf;N.options=Fe.prototype.options_;N.getPlayers=()=>Fe.players;N.getPlayer=t=>{let e=Fe.players,i;if(typeof t=="string"){let n=aT(t),r=e[n];if(r)return r;i=er("#"+n);}else i=t;if(qs(i)){let{player:n,playerId:r}=i;if(n||e[r])return n||e[r];}};N.getAllPlayers=()=>Object.keys(Fe.players).map(t=>Fe.players[t]).filter(Boolean);N.players=Fe.players;N.getComponent=z.getComponent;N.registerComponent=(t,e)=>(De.isTech(e)&&_e.warn(`The ${t} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),z.registerComponent.call(z,t,e));N.getTech=De.getTech;N.registerTech=De.registerTech;N.use=Uk;Object.defineProperty(N,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(N.middleware,"TERMINATOR",{value:Mu,writeable:!1,enumerable:!0});N.browser=Db;N.obj=vk;N.mergeOptions=Ni(9,"videojs.mergeOptions","videojs.obj.merge",Re);N.defineLazyProperty=Ni(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",Cd);N.bind=Ni(9,"videojs.bind","native Function.prototype.bind",Be);N.registerPlugin=sr.registerPlugin;N.deregisterPlugin=sr.deregisterPlugin;N.plugin=(t,e)=>(_e.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),sr.registerPlugin(t,e));N.getPlugins=sr.getPlugins;N.getPlugin=sr.getPlugin;N.getPluginVersion=sr.getPluginVersion;N.addLanguage=function(t,e){return t=(""+t).toLowerCase(),N.options.languages=Re(N.options.languages,{[t]:e}),N.options.languages[t];};N.log=_e;N.createLogger=bb;N.time=Lk;N.createTimeRange=Ni(9,"videojs.createTimeRange","videojs.time.createTimeRanges",Ri);N.createTimeRanges=Ni(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",Ri);N.formatTime=Ni(9,"videojs.formatTime","videojs.time.formatTime",Dr);N.setFormatTime=Ni(9,"videojs.setFormatTime","videojs.time.setFormatTime",Qb);N.resetFormatTime=Ni(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",Jb);N.parseUrl=Ni(9,"videojs.parseUrl","videojs.url.parseUrl",mp);N.isCrossOrigin=Ni(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",Bd);N.EventTarget=jt;N.any=hp;N.on=li;N.one=jd;N.off=Et;N.trigger=Hs;N.xhr=op.default;N.TrackList=xn;N.TextTrack=Ir;N.TextTrackList=io;N.AudioTrack=Ou;N.AudioTrackList=Pu;N.VideoTrack=Nu;N.VideoTrackList=Lu;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(t=>{N[t]=function(){return _e.warn(`videojs.${t}() is deprecated; use videojs.dom.${t}() instead`),Vb[t].apply(null,arguments);};});N.computedStyle=Ni(9,"videojs.computedStyle","videojs.dom.computedStyle",js);N.dom=Vb;N.fn=Ck;N.num=eP;N.str=kk;N.url=Bk;N.Error=mP;Vf=class{constructor(e){let i=this;return i.id=e.id,i.label=i.id,i.width=e.width,i.height=e.height,i.bitrate=e.bandwidth,i.frameRate=e.frameRate,i.enabled_=e.enabled,Object.defineProperty(i,"enabled",{get(){return i.enabled_();},set(n){i.enabled_(n);}}),i;}},Us=class extends N.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_;}}),Object.defineProperty(e,"length",{get(){return e.levels_.length;}}),e[Symbol.iterator]=()=>e.levels_.values(),e;}addQualityLevel(e){let i=this.getQualityLevelById(e.id);if(i)return i;let n=this.levels_.length;return i=new Vf(e),""+n in this||Object.defineProperty(this,n,{get(){return this.levels_[n];}}),this.levels_.push(i),this.trigger({qualityLevel:i,type:"addqualitylevel"}),i;}removeQualityLevel(e){let i=null;for(let n=0,r=this.length;n<r;n++)if(this[n]===e){i=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break;}return i&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),i;}getQualityLevelById(e){for(let i=0,n=this.length;i<n;i++){let r=this[i];if(r.id===e)return r;}return null;}dispose(){this.selectedIndex_=-1,this.levels_.length=0;}};Us.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(let t in Us.prototype.allowedEvents_)Us.prototype["on"+t]=null;oT="4.1.0",gP=function(t,e){let i=t.qualityLevels,n=new Us(),r=function(){n.dispose(),t.qualityLevels=i,t.off("dispose",r);};return t.on("dispose",r),t.qualityLevels=()=>n,t.qualityLevels.VERSION=oT,n;},lT=function(t){return gP(this,N.obj.merge({},t));};N.registerPlugin("qualityLevels",lT);lT.VERSION=oT;Jt=ss,md=(t,e)=>e&&e.responseURL&&t!==e.responseURL?e.responseURL:t,yi=t=>N.log.debug?N.log.debug.bind(N,"VHS:",`${t} >`):function(){};Xi=1/30,Ki=Xi*3,uT=function(t,e){let i=[],n;if(t&&t.length)for(n=0;n<t.length;
182n++)e(t.start(n),t.end(n))&&i.push([t.start(n),t.end(n)]);return mt(i);},As=function(t,e){return uT(t,function(i,n){return i-Ki<=e&&n+Ki>=e;});},_u=function(t,e){return uT(t,function(i){return i-Xi>=e;});},_P=function(t){if(t.length<2)return mt();let e=[];for(let i=1;i<t.length;i++){let n=t.end(i-1),r=t.start(i);e.push([n,r]);}return mt(e);},yP=function(t,e){let i=null,n=null,r=0,s=[],a=[];if(!t||!t.length||!e||!e.length)return mt();let o=t.length;for(;o--;)s.push({time:t.start(o),type:"start"}),s.push({time:t.end(o),type:"end"});for(o=e.length;o--;)s.push({time:e.start(o),type:"start"}),s.push({time:e.end(o),type:"end"});for(s.sort(function(u,c){return u.time-c.time;}),o=0;o<s.length;o++)s[o].type==="start"?(r++,r===2&&(i=s[o].time)):s[o].type==="end"&&(r--,r===1&&(n=s[o].time)),i!==null&&n!==null&&(a.push([i,n]),i=null,n=null);return mt(a);},dT=t=>{let e=[];if(!t||!t.length)return"";for(let i=0;i<t.length;i++)e.push(t.start(i)+" => "+t.end(i));return e.join(", ");},bP=function(t,e,i=1){return((t.length?t.end(t.length-1):0)-e)/i;},Er=t=>{let e=[];for(let i=0;i<t.length;i++)e.push({start:t.start(i),end:t.end(i)});return e;},TP=function(t,e){if(t===e)return!1;if(!t&&e||!e&&t||t.length!==e.length)return!0;for(let i=0;i<t.length;i++)if(t.start(i)!==e.start(i)||t.end(i)!==e.end(i))return!0;return!1;},of=function(t){if(!(!t||!t.length||!t.end))return t.end(t.length-1);},_p=function(t,e){let i=0;if(!t||!t.length)return i;for(let n=0;n<t.length;n++){let r=t.start(n),s=t.end(n);if(!(e>s)){if(e>r&&e<=s){i+=s-e;continue;}i+=s-r;}}return i;},yp=(t,e)=>{if(!e.preload)return e.duration;let i=0;return(e.parts||[]).forEach(function(n){i+=n.duration;}),(e.preloadHints||[]).forEach(function(n){n.type==="PART"&&(i+=t.partTargetDuration);}),i;},qf=t=>(t.segments||[]).reduce((e,i,n)=>(i.parts?i.parts.forEach(function(r,s){e.push({duration:r.duration,segmentIndex:n,partIndex:s,part:r,segment:i});}):e.push({duration:i.duration,segmentIndex:n,partIndex:null,segment:i,part:null}),e),[]),cT=t=>{let e=t.segments&&t.segments.length&&t.segments[t.segments.length-1];return e&&e.parts||[];},hT=({preloadSegment:t})=>{if(!t)return;let{parts:e,preloadHints:i}=t,n=(i||[]).reduce((r,s)=>r+(s.type==="PART"?1:0),0);return n+=e&&e.length?e.length:0,n;},fT=(t,e)=>{if(e.endList)return 0;if(t&&t.suggestedPresentationDelay)return t.suggestedPresentationDelay;let i=cT(e).length>0;return i&&e.serverControl&&e.serverControl.partHoldBack?e.serverControl.partHoldBack:i&&e.partTargetDuration?e.partTargetDuration*3:e.serverControl&&e.serverControl.holdBack?e.serverControl.holdBack:e.targetDuration?e.targetDuration*3:0;},SP=function(t,e){let i=0,n=e-t.mediaSequence,r=t.segments[n];if(r){if(typeof r.start<"u")return{result:r.start,precise:!0};if(typeof r.end<"u")return{result:r.end-r.duration,precise:!0};}for(;n--;){if(r=t.segments[n],typeof r.end<"u")return{result:i+r.end,precise:!0};if(i+=yp(t,r),typeof r.start<"u")return{result:i+r.start,precise:!0};}return{result:i,precise:!1};},AP=function(t,e){let i=0,n,r=e-t.mediaSequence;for(;r<t.segments.length;r++){if(n=t.segments[r],typeof n.start<"u")return{result:n.start-i,precise:!0};if(i+=yp(t,n),typeof n.end<"u")return{result:n.end-i,precise:!0};}return{result:-1,precise:!1};},pT=function(t,e,i){if(typeof e>"u"&&(e=t.mediaSequence+t.segments.length),e<t.mediaSequence)return 0;let n=SP(t,e);if(n.precise)return n.result;let r=AP(t,e);return r.precise?r.result:n.result+i;},mT=function(t,e,i){if(!t)return 0;if(typeof i!="number"&&(i=0),typeof e>"u"){if(t.totalDuration)return t.totalDuration;if(!t.endList)return j.default.Infinity;}return pT(t,e,i);},Qa=function({defaultDuration:t,durationList:e,startIndex:i,endIndex:n}){let r=0;if(i>n&&([i,n]=[n,i]),i<0){for(let s=i;s<Math.min(0,n);s++)r+=t;i=0;}for(let s=i;s<n;s++)r+=e[s].duration;return r;},gT=function(t,e,i,n){if(!t||!t.segments)return null;if(t.endList)return mT(t);if(e===null)return null;e=e||0;let r=pT(t,t.mediaSequence+t.segments.length,e);return i&&(n=typeof n=="number"?n:fT(null,t),r-=n),Math.max(0,r);},EP=function(t,e,i){let r=e||0,s=gT(t,e,!0,i);return s===null?mt():(s<r&&(s=r),mt(r,s));},xP=function({playlist:t,currentTime:e,startingSegmentIndex:i,startingPartIndex:n,startTime:r,exactManifestTimings:s}){let a=e-r,o=qf(t),u=0;for(let c=0;c<o.length;c++){let p=o[c];if(i===p.segmentIndex&&!(typeof n=="number"&&typeof p.partIndex=="number"&&n!==p.partIndex)){u=c;break;}}if(a<0){if(u>0)for(let c=u-1;c>=0;c--){let p=o[c];
182if(a+=p.duration,s){if(a<0)continue;}else if(a+Xi<=0)continue;return{partIndex:p.partIndex,segmentIndex:p.segmentIndex,startTime:r-Qa({defaultDuration:t.targetDuration,durationList:o,startIndex:u,endIndex:c})};}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:e};}if(u<0){for(let c=u;c<0;c++)if(a-=t.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:e};u=0;}for(let c=u;c<o.length;c++){let p=o[c];a-=p.duration;let _=p.duration>Xi,T=a===0,y=_&&a+Xi>=0;if(!((T||y)&&c!==o.length-1)){if(s){if(a>0)continue;}else if(a-Xi>=0)continue;return{partIndex:p.partIndex,segmentIndex:p.segmentIndex,startTime:r+Qa({defaultDuration:t.targetDuration,durationList:o,startIndex:u,endIndex:c})};}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:e};},vT=function(t){return t.excludeUntil&&t.excludeUntil>Date.now();},bp=function(t){return t.excludeUntil&&t.excludeUntil===1/0;},Fd=function(t){let e=vT(t);return!t.disabled&&!e;},CP=function(t){return t.disabled;},wP=function(t){for(let e=0;e<t.segments.length;e++)if(t.segments[e].key)return!0;return!1;},_T=function(t,e){return e.attributes&&e.attributes[t];},DP=function(t,e,i,n=0){return _T("BANDWIDTH",i)?(t*i.attributes.BANDWIDTH-n*8)/e:NaN;},Hf=(t,e)=>{if(t.playlists.length===1)return!0;let i=e.attributes.BANDWIDTH||Number.MAX_VALUE;return t.playlists.filter(n=>Fd(n)?(n.attributes.BANDWIDTH||0)<i:!1).length===0;},Tp=(t,e)=>!t&&!e||!t&&e||t&&!e?!1:!!(t===e||t.id&&e.id&&t.id===e.id||t.resolvedUri&&e.resolvedUri&&t.resolvedUri===e.resolvedUri||t.uri&&e.uri&&t.uri===e.uri),eb=function(t,e){let i=t&&t.mediaGroups&&t.mediaGroups.AUDIO||{},n=!1;for(let r in i){for(let s in i[r])if(n=e(i[r][s]),n)break;if(n)break;}return!!n;},Eo=t=>{if(!t||!t.playlists||!t.playlists.length)return eb(t,i=>i.playlists&&i.playlists.length||i.uri);for(let e=0;e<t.playlists.length;e++){let i=t.playlists[e],n=i.attributes&&i.attributes.CODECS;if(!(n&&n.split(",").every(s=>hh(s))||eb(t,s=>Tp(i,s))))return!1;}return!0;},Zt={liveEdgeDelay:fT,duration:mT,seekable:EP,getMediaInfoForTime:xP,isEnabled:Fd,isDisabled:CP,isExcluded:vT,isIncompatible:bp,playlistEnd:gT,isAes:wP,hasAttribute:_T,estimateSegmentRequestTime:DP,isLowestEnabledRendition:Hf,isAudioOnly:Eo,playlistMatch:Tp,segmentDurationWithParts:yp},({log:yT}=N),Ds=(t,e)=>`${t}-${e}`,bT=(t,e,i)=>`placeholder-uri-${t}-${e}-${i}`,IP=({onwarn:t,oninfo:e,manifestString:i,customTagParsers:n=[],customTagMappers:r=[],llhls:s})=>{let a=new Kl();t&&a.on("warn",t),e&&a.on("info",e),n.forEach(c=>a.addParser(c)),r.forEach(c=>a.addTagMapper(c)),a.push(i),a.end();let o=a.manifest;if(s||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(c){o.hasOwnProperty(c)&&delete o[c];}),o.segments&&o.segments.forEach(function(c){["parts","preloadHints"].forEach(function(p){c.hasOwnProperty(p)&&delete c[p];});})),!o.targetDuration){let c=10;o.segments&&o.segments.length&&(c=o.segments.reduce((p,_)=>Math.max(p,_.duration),0)),t&&t({message:`manifest has no targetDuration defaulting to ${c}`}),o.targetDuration=c;}let u=cT(o);if(u.length&&!o.partTargetDuration){let c=u.reduce((p,_)=>Math.max(p,_.duration),0);t&&(t({message:`manifest has no partTargetDuration defaulting to ${c}`}),yT.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),o.partTargetDuration=c;}return o;},$s=(t,e)=>{t.mediaGroups&&["AUDIO","SUBTITLES"].forEach(i=>{if(t.mediaGroups[i])for(let n in t.mediaGroups[i])for(let r in t.mediaGroups[i][n]){let s=t.mediaGroups[i][n][r];e(s,i,n,r);}});},TT=({playlist:t,uri:e,id:i})=>{t.id=i,t.playlistErrors_=0,e&&(t.uri=e),t.attributes=t.attributes||{};},kP=t=>{let e=t.playlists.length;for(;e--;){let i=t.playlists[e];TT({playlist:i,id:Ds(e,i.uri)}),i.resolvedUri=Jt(t.uri,i.uri),t.playlists[i.id]=i,t.playlists[i.uri]=i,i.attributes.BANDWIDTH||yT.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.");}},PP=t=>{$s(t,e=>{e.uri&&(e.resolvedUri=Jt(t.uri,e.uri));});},LP=(t,e)=>{let i=Ds(0,e),n={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:j.default.location.href,resolvedUri:j.default.location.href,playlists:[{uri:e,id:i,resolvedUri:e,attributes:{}}]};return n.playlists[i]=n.playlists[0],n.playlists[e]=n.playlists[0],n;},ST=(t,e,i=bT)=>
182{t.uri=e;for(let r=0;r<t.playlists.length;r++)if(!t.playlists[r].uri){let s=`placeholder-uri-${r}`;t.playlists[r].uri=s;}let n=Eo(t);$s(t,(r,s,a,o)=>{if(!r.playlists||!r.playlists.length){if(n&&s==="AUDIO"&&!r.uri)for(let u=0;u<t.playlists.length;u++){let c=t.playlists[u];if(c.attributes&&c.attributes.AUDIO&&c.attributes.AUDIO===a)return;}r.playlists=[Ge({},r)];}r.playlists.forEach(function(u,c){let p=i(s,a,o,u),_=Ds(c,p);u.uri?u.resolvedUri=u.resolvedUri||Jt(t.uri,u.uri):(u.uri=c===0?p:_,u.resolvedUri=u.uri),u.id=u.id||_,u.attributes=u.attributes||{},t.playlists[u.id]=u,t.playlists[u.uri]=u;});}),kP(t),PP(t);},gd=class{constructor(){this.offset_=null,this.pendingDateRanges_=new Map(),this.processedDateRanges_=new Map();}setOffset(e=[]){if(this.offset_!==null||!e.length)return;let[i]=e;i.programDateTime!==void 0&&(this.offset_=i.programDateTime/1e3);}setPendingDateRanges(e=[]){if(!e.length)return;let[i]=e,n=i.startDate.getTime();this.trimProcessedDateRanges_(n),this.pendingDateRanges_=e.reduce((r,s)=>(r.set(s.id,s),r),new Map());}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e);}getDateRangesToProcess(){if(this.offset_===null)return[];let e={},i=[];this.pendingDateRanges_.forEach((n,r)=>{if(!this.processedDateRanges_.has(r)&&(n.startTime=n.startDate.getTime()/1e3-this.offset_,n.processDateRange=()=>this.processDateRange(n),i.push(n),!!n.class))if(e[n.class]){let s=e[n.class].push(n);n.classListIndex=s-1;}else e[n.class]=[n],n.classListIndex=0;});for(let n of i){let r=e[n.class]||[];n.endDate?n.endTime=n.endDate.getTime()/1e3-this.offset_:n.endOnNext&&r[n.classListIndex+1]?n.endTime=r[n.classListIndex+1].startTime:n.duration?n.endTime=n.startTime+n.duration:n.plannedDuration?n.endTime=n.startTime+n.plannedDuration:n.endTime=n.startTime;}return i;}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((n,r)=>{n.startDate.getTime()<e&&this.processedDateRanges_.delete(r);});}},AT=22,wr=({requestType:t,request:e,error:i,parseFailure:n})=>{let r=e.status<200||e.status>299,s=e.status>=400&&e.status<=499,a={uri:e.uri,requestType:t},o=r&&!s||n;if(i&&s)a.error=Ge({},i),a.errorType=N.Error.NetworkRequestFailed;else if(e.aborted)a.errorType=N.Error.NetworkRequestAborted;else if(e.timedout)a.erroType=N.Error.NetworkRequestTimeout;else if(o){let u=n?N.Error.NetworkBodyParserFailed:N.Error.NetworkBadStatus;a.errorType=u,a.status=e.status,a.headers=e.headers;}return a;},RP=yi("CodecUtils"),ET=function(t){let e=t.attributes||{};if(e.CODECS)return Li(e.CODECS);},xT=(t,e)=>{let i=e.attributes||{};return t&&t.mediaGroups&&t.mediaGroups.AUDIO&&i.AUDIO&&t.mediaGroups.AUDIO[i.AUDIO];},OP=(t,e)=>{if(!xT(t,e))return!0;let i=e.attributes||{},n=t.mediaGroups.AUDIO[i.AUDIO];for(let r in n)if(!n[r].uri&&!n[r].playlists)return!0;return!1;},bo=function(t){let e={};return t.forEach(({mediaType:i,type:n,details:r})=>{e[i]=e[i]||[],e[i].push(ch(`${n}${r}`));}),Object.keys(e).forEach(function(i){if(e[i].length>1){RP(`multiple ${i} codecs found as attributes: ${e[i].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),e[i]=null;return;}e[i]=e[i][0];}),e;},tb=function(t){let e=0;return t.audio&&e++,t.video&&e++,e;},Ja=function(t,e){let i=e.attributes||{},n=bo(ET(e)||[]);if(xT(t,e)&&!n.audio&&!OP(t,e)){let r=bo(U0(t,i.AUDIO)||[]);r.audio&&(n.audio=r.audio);}return n;},({EventTarget:NP}=N),jP=(t,e)=>{if(e.endList||!e.serverControl)return t;let i={};if(e.serverControl.canBlockReload){let{preloadSegment:n}=e,r=e.mediaSequence+e.segments.length;if(n){let s=n.parts||[],a=hT(e)-1;a>-1&&a!==s.length-1&&(i._HLS_part=a),(a>-1||s.length)&&r--;}i._HLS_msn=r;}if(e.serverControl&&e.serverControl.canSkipUntil&&(i._HLS_skip=e.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){let n=new j.default.URL(t);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(r){i.hasOwnProperty(r)&&n.searchParams.set(r,i[r]);}),t=n.toString();}return t;},MP=(t,e)=>{if(!t)return e;let i=Ae(t,e);if(t.preloadHints&&!e.preloadHints&&delete i.preloadHints,t.parts&&!e.parts)delete i.parts;else if(t.parts&&e.parts)for(let n=0;n<e.parts.length;
182n++)t.parts&&t.parts[n]&&(i.parts[n]=Ae(t.parts[n],e.parts[n]));return!t.skipped&&e.skipped&&(i.skipped=!1),t.preload&&!e.preload&&(i.preload=!1),i;},BP=(t,e,i)=>{let n=t.slice(),r=e.slice();i=i||0;let s=[],a;for(let o=0;o<r.length;o++){let u=n[o+i],c=r[o];u?(a=u.map||a,s.push(MP(u,c))):(a&&!c.map&&(c.map=a),s.push(c));}return s;},CT=(t,e)=>{!t.resolvedUri&&t.uri&&(t.resolvedUri=Jt(e,t.uri)),t.key&&!t.key.resolvedUri&&(t.key.resolvedUri=Jt(e,t.key.uri)),t.map&&!t.map.resolvedUri&&(t.map.resolvedUri=Jt(e,t.map.uri)),t.map&&t.map.key&&!t.map.key.resolvedUri&&(t.map.key.resolvedUri=Jt(e,t.map.key.uri)),t.parts&&t.parts.length&&t.parts.forEach(i=>{i.resolvedUri||(i.resolvedUri=Jt(e,i.uri));}),t.preloadHints&&t.preloadHints.length&&t.preloadHints.forEach(i=>{i.resolvedUri||(i.resolvedUri=Jt(e,i.uri));});},wT=function(t){let e=t.segments||[],i=t.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints){for(let n=0;n<i.preloadHints.length;n++)if(i.preloadHints[n].type==="MAP")return e;}i.duration=t.targetDuration,i.preload=!0,e.push(i);}return e;},DT=(t,e)=>t===e||t.segments&&e.segments&&t.segments.length===e.segments.length&&t.endList===e.endList&&t.mediaSequence===e.mediaSequence&&t.preloadSegment===e.preloadSegment,$f=(t,e,i=DT)=>{let n=Ae(t,{}),r=n.playlists[e.id];if(!r||i(r,e))return null;e.segments=wT(e);let s=Ae(r,e);if(s.preloadSegment&&!e.preloadSegment&&delete s.preloadSegment,r.segments){if(e.skip){e.segments=e.segments||[];for(let a=0;a<e.skip.skippedSegments;a++)e.segments.unshift({skipped:!0});}s.segments=BP(r.segments,e.segments,e.mediaSequence-r.mediaSequence);}s.segments.forEach(a=>{CT(a,s.resolvedUri);});for(let a=0;a<n.playlists.length;a++)n.playlists[a].id===e.id&&(n.playlists[a]=s);return n.playlists[e.id]=s,n.playlists[e.uri]=s,$s(t,(a,o,u,c)=>{if(a.playlists)for(let p=0;p<a.playlists.length;p++)e.id===a.playlists[p].id&&(a.playlists[p]=s);}),n;},zf=(t,e)=>{let i=t.segments||[],n=i[i.length-1],r=n&&n.parts&&n.parts[n.parts.length-1],s=r&&r.duration||n&&n.duration;return e&&s?s*1e3:(t.partTargetDuration||t.targetDuration||10)*500;},ib=(t,e,i)=>{if(!t)return;let n=[];return t.forEach(r=>{if(!r.attributes)return;let{BANDWIDTH:s,RESOLUTION:a,CODECS:o}=r.attributes;n.push({id:r.id,bandwidth:s,resolution:a,codecs:o});}),{type:e,isLive:i,renditions:n};},Jn=class extends NP{constructor(e,i,n={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=yi("PlaylistLoader");let{withCredentials:r=!1}=n;this.src=e,this.vhs_=i,this.withCredentials=r,this.addDateRangesToTextTrack_=n.addDateRangesToTextTrack;let s=i.options_;this.customTagParsers=s&&s.customTagParsers||[],this.customTagMappers=s&&s.customTagMappers||[],this.llhls=s&&s.llhls,this.dateRangesStorage_=new gd(),this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this));}handleLoadedPlaylist_(){let e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);let i=this.dateRangesStorage_.getDateRangesToProcess();!i.length||!this.addDateRangesToTextTrack_||this.addDateRangesToTextTrack_(i);}handleMediaupdatetimeout_(){if(this.state!=="HAVE_METADATA")return;let e=this.media(),i=Jt(this.main.uri,e.uri);this.llhls&&(i=jP(i,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:i,withCredentials:this.withCredentials,requestType:"hls-playlist"},(n,r)=>{if(this.request){if(n)return this.playlistRequestError(this.request,this.media(),"HAVE_METADATA");this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id});}});}playlistRequestError(e,i,n){let{uri:r,id:s}=i;this.request=null,n&&(this.state=n),this.error={playlist:this.main.playlists[s],status:e.status,message:`HLS playlist request error at URL: ${r}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:wr({requestType:e.requestType,request:e,error:e.error})},this.trigger("error");}parseManifest_({url:e,manifestString:i}){try{let n=IP({onwarn:({message:r})=>this.logger_(`m3u8-parser warn for ${e}: ${r}`),oninfo:({message:r})=>this.logger_(`m3u8-parser info for ${e}: ${r}`),manifestString:i,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return!n.playlists||!n.playlists.length||this.excludeAudioOnlyVariants(n.playlists),n;}catch(n){this.error=n,this.error.metadata={errorType:N.Error.StreamingHlsPlaylistParserError,error:n};}}excludeAudioOnlyVariants(e){let i=n=>{let r=n.attributes||{},{width:s,height:a}=r.RESOLUTION||{};if(s&&a)return!0;let o=ET(n)||[];return!!bo(o).video;};
182e.some(i)&&e.forEach(n=>{i(n)||(n.excludeUntil=1/0);});}haveMetadata({playlistString:e,playlistObject:i,url:n,id:r}){this.request=null,this.state="HAVE_METADATA";let s={playlistInfo:{type:"media",uri:n}};this.trigger({type:"playlistparsestart",metadata:s});let a=i||this.parseManifest_({url:n,manifestString:e});a.lastRequest=Date.now(),TT({playlist:a,uri:n,id:r});let o=$f(this.main,a);this.targetDuration=a.partTargetDuration||a.targetDuration,this.pendingMedia_=null,o?(this.main=o,this.media_=this.main.playlists[r]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(zf(this.media(),!!o)),s.parsedPlaylist=ib(this.main.playlists,s.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:s}),this.trigger("loadedplaylist");}dispose(){this.trigger("dispose"),this.stopRequest(),j.default.clearTimeout(this.mediaUpdateTimeout),j.default.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new gd(),this.off();}stopRequest(){if(this.request){let e=this.request;this.request=null,e.onreadystatechange=null,e.abort();}}media(e,i){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof e=="string"){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e];}if(j.default.clearTimeout(this.finalRenditionTimeout),i){let o=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=j.default.setTimeout(this.media.bind(this,e,!1),o);return;}let n=this.state,r=!this.media_||e.id!==this.media_.id,s=this.main.playlists[e.id];if(s&&s.endList||e.endList&&e.segments.length){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,r&&(this.trigger("mediachanging"),n==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return;}if(this.updateMediaUpdateTimeout_(zf(e,!0)),!r)return;if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null;}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e;let a={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:a}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(o,u)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=md(e.resolvedUri,u),o)return this.playlistRequestError(this.request,e,n);this.trigger({type:"playlistrequestcomplete",metadata:a}),this.haveMetadata({playlistString:u.responseText,url:e.uri,id:e.id}),n==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange");}});}pause(){this.mediaUpdateTimeout&&(j.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA");}load(e){this.mediaUpdateTimeout&&(j.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);let i=this.media();if(e){let n=i?(i.partTargetDuration||i.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=j.default.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load();},n);return;}if(!this.started){this.start();return;}i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist");}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(j.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=j.default.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e);},e));}start(){if(this.started=!0,typeof this.src=="object"){this.src.uri||(this.src.uri=j.default.location.href),this.src.resolvedUri=this.src.uri,setTimeout(()=>{this.setupInitialPlaylist(this.src);},0);return;}
182let e={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},(i,n)=>{if(!this.request)return;if(this.request=null,i)return this.error={status:n.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:n.responseText,code:2,metadata:wr({requestType:n.requestType,request:n,error:i})},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=md(this.src,n),this.trigger({type:"playlistparsestart",metadata:e});let r=this.parseManifest_({manifestString:n.responseText,url:this.src});e.parsedPlaylist=ib(r.playlists,e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:e}),this.setupInitialPlaylist(r);});}srcUri(){return typeof this.src=="string"?this.src:this.src.uri;}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists){this.main=e,ST(this.main,this.srcUri()),e.playlists.forEac
182h(n=>{n.segments=wT(n),n.segments.forEach(r=>{CT(r,n.resolvedUri);});}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return;}let i=this.srcUri()||j.default.location.href;this.main=LP(e,i),this.haveMetadata({playlistObject:e,url:i,id:this.main.playlists[0].id}),this.trigger("loadedmetadata");}updateOrDeleteClone(e,i){let n=this.main,r=e.ID,s=n.playlists.length;for(;s--;){let a=n.playlists[s];if(a.attributes["PATHWAY-ID"]===r){let o=a.resolvedUri,u=a.id;if(i){let c=this.createCloneURI_(a.resolvedUri,e),p=Ds(r,c),_=this.createCloneAttributes_(r,a.attributes),T=this.createClonePlaylist_(a,p,e,_);n.playlists[s]=T,n.playlists[p]=T,n.playlists[c]=T;}else n.playlists.splice(s,1);delete n.playlists[u],delete n.playlists[o];}}this.updateOrDeleteCloneMedia(e,i);}updateOrDeleteCloneMedia(e,i){let n=this.main,r=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(s=>{if(!(!n.mediaGroups[s]||!n.mediaGroups[s][r])){for(let a in n.mediaGroups[s])if(a===r){for(let o in n.mediaGroups[s][a])n.mediaGroups[s][a][o].playlists.forEac
182h((c,p)=>{let _=n.playlists[c.id],T=_.id,y=_.resolvedUri;delete n.playlists[T],delete n.playlists[y];});delete n.mediaGroups[s][a];}}}),i&&this.createClonedMediaGroups_(e);}addClonePathway(e,i={}){let n=this.main,r=n.playlists.length,s=this.createCloneURI_(i.resolvedUri,e),a=Ds(e.ID,s),o=this.createCloneAttributes_(e.ID,i.attributes),u=this.createClonePlaylist_(i,a,e,o);n.playlists[r]=u,n.playlists[a]=u,n.playlists[s]=u,this.createClonedMediaGroups_(e);}createClonedMediaGroups_(e){let i=e.ID,n=e["BASE-ID"],r=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(s=>{if(!(!r.mediaGroups[s]||r.mediaGroups[s][i]))for(let a in r.mediaGroups[s]){if(a===n)r.mediaGroups[s][i]={};else continue;for(let o in r.mediaGroups[s][a]){let u=r.mediaGroups[s][a][o];r.mediaGroups[s][i][o]=Ge({},u);let c=r.mediaGroups[s][i][o],p=this.createCloneURI_(u.resolvedUri,e);c.resolvedUri=p,c.uri=p,c.playlists=[],u.playlists.forEach((_,T)=>{let y=r.playlists[_.id],b=bT(s,i,o),g=Ds(i,b);if(y&&!r.playlists[g]){let E=this.createClonePlaylist_(y,g,e),S=E.resolvedUri;r.playlists[g]=E,r.playlists[S]=E;}c.playlists[T]=this.createClonePlaylist_(_,g,e);});}}});}createClonePlaylist_(e,i,n,r){let s=this.createCloneURI_(e.resolvedUri,n),a={resolvedUri:s,uri:s,id:i};return e.segments&&(a.segments=[]),r&&(a.attributes=r),Ae(e,a);}createCloneURI_(e,i){let n=new URL(e);n.hostname=i["URI-REPLACEMENT"].HOST;let r=i["URI-REPLACEMENT"].PARAMS;for(let s of Object.keys(r))n.searchParams.set(s,r[s]);return n.href;}createCloneAttributes_(e,i){let n={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(r=>{i[r]&&(n[r]=e);}),n;}getKeyIdSet(e){if(e.contentProtection){let i=new Set();for(let n in e.contentProtection){let r=e.contentProtection[n].attributes.keyId;r&&i.add(r.toLowerCase());}return i;}}},Gf=function(t,e,i,n){let r=t.responseType==="arraybuffer"?t.response:t.responseText;!e&&r&&(t.responseTime=Date.now(),t.roundTripTime=t.responseTime-t.requestTime,t.bytesReceived=r.byteLength||r.length,t.bandwidth||(t.bandwidth=Math.floor(t.bytesReceived/t.roundTripTime*8*1e3))),i.headers&&(t.responseHeaders=i.headers),e&&e.code==="ETIMEDOUT"&&(t.timedout=!0),!e&&!t.aborted&&i.statusCode!==200&&i.statusCode!==206&&i.statusCode!==0&&(e=new Error("XHR Failed with a response of: "+(t&&(r||t.responseText)))),n(e,t);},FP=(t,e)=>{if(!t||!t.size)return;let i=e;return t.forEach(n=>{i=n(i);}),i;},UP=(t,e,i,n)=>{!t||!t.size||t.forEach(r=>{r(e,i,n);});},IT=function(){let t=function e(i,n){i=Ae({timeout:45e3},i);let r=e.beforeRequest||N.Vhs.xhr.beforeRequest,s=e._requestCallbackSet||N.Vhs.xhr._requestCallbackSet||new Set(),a=e._responseCallbackSet||N.Vhs.xhr._responseCallbackSet;r&&typeof r=="function"&&(N.log.warn("beforeRequest is deprecated, use onRequest instead."),s.add(r));let o=N.Vhs.xhr.original===!0?N.xhr:N.Vhs.xhr,u=FP(s,i);s.delete(r);let c=o(u||i,function(_,T){return UP(a,c,_,T),Gf(c,_,T,n);}),p=c.abort;return c.abort=function(){return c.aborted=!0,p.apply(c,arguments);},c.uri=i.uri,c.requestType=i.requestType,c.requestTime=Date.now(),c;};return t.original=!0,t;},VP=function(t){let e,i=t.offset;return typeof t.offset=="bigint"||typeof t.length=="bigint"?e=j.default.BigInt(t.offset)+j.default.BigInt(t.length)-j.default.BigInt(1):e=t.offset+t.length-1,"bytes="+i+"-"+e;},Wf=function(t){let e={};return t.byterange&&(e.Range=VP(t.byterange)),e;},qP=function(t,e){return t.start(e)+"-"+t.end(e);},HP=function(t,e){let i=t.toString(16);return"00".substring(0,2-i.length)+i+(e%2?" ":"");},$P=function(t){return t>=32&&t<126?String.fromCharCode(t):".";},kT=function(t){let e={};return Object.keys(t).forEach(i=>{let n=t[i];gh(n)?e[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:e[i]=n;}),e;},vd=function(t){let e=t.byterange||{length:1/0,offset:0};return[e.length,e.offset,t.resolvedUri].join(",");},PT=function(t){return t.resolvedUri;},LT=t=>{let e=Array.prototype.slice.call(t),i=16,n="",r,s;for(let a=0;a<e.length/i;a++)r=e.slice(a*i,a*i+i).map(HP).join(""),s=e.slice(a*i,a*i+i).map($P).join(""),n+=r+" "+s+`
183`;return n;},zP=({bytes:t})=>LT(t),GP=t=>{let e="",i;for(i=0;i<t.length;i++)e+=qP(t,i)+" ";return e;},WP=Object.freeze({__proto__:null,createTransferableMessage:kT,initSegmentId:vd,segmentKeyId:PT,hexDump:LT,tagDump:zP,textRanges:GP}),RT=.25,YP=(t,e)=>{if(!e.dateTimeObject)return null;let i=e.videoTimingInfo.transmuxerPrependedSeconds,r=e.videoTimingInfo.transmuxedPresentationStart+i,s=t-r;return new Date(e.dateTimeObject.getTime()+s*1e3);},XP=t=>t.transmuxedPresentationEnd-t.transmuxedPresentationStart-t.transmuxerPrependedSeconds,KP=(t,e)=>{let i;try{i=new Date(t);}catch{return null;}if(!e||!e.segments||e.segments.length===0)return null;let n=e.segments[0];if(i<new Date(n.dateTimeObject))return null;for(let u=0;u<e.segments.length-1;u++){n=e.segments[u];let c=new Date(e.segments[u+1].dateTimeObject);if(i<c)break;}let r=e.segments[e.segments.length-1],s=r.dateTimeObject,a=r.videoTimingInfo?XP(r.videoTimingInfo):r.duration+r.duration*RT,o=new Date(s.getTime()+a*1e3);return i>o?null:(i>new Date(s)&&(n=r),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:Zt.duration(e,e.mediaSequence+e.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"});},QP=(t,e)=>{if(!e||!e.segments||e.segments.length===0)return null;let i=0,n;for(let s=0;s<e.segments.length&&(n=e.segments[s],i=n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:i+n.duration,!(t<=i));s++);let r=e.segments[e.segments.length-1];if(r.videoTimingInfo&&r.videoTimingInfo.transmuxedPresentationEnd<t)return null;if(t>i){if(t>i+r.duration*RT)return null;n=r;}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:i-n.duration,type:n.videoTimingInfo?"accurate":"estimate"};},JP=(t,e)=>{let i,n;try{i=new Date(t),n=new Date(e);}catch{}let r=i.getTime();return(n.getTime()-r)/1e3;},ZP=t=>{if(!t.segments||t.segments.length===0)return!1;for(let e=0;e<t.segments.length;e++)if(!t.segments[e].dateTimeObject)return!1;return!0;},eL=({playlist:t,time:e=void 0,callback:i})=>{if(!i)throw new Error("getProgramTime: callback must be provided");
183if(!t||e===void 0)return i({message:"getProgramTime: playlist and time must be provided"});let n=QP(e,t);if(!n)return i({message:"valid programTime was not found"});if(n.type==="estimate")return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:n.estimatedStart});let r={mediaSeconds:e},s=YP(e,n.segment);return s&&(r.programDateTime=s.toISOString()),i(null,r);},OT=({programTime:t,playlist:e,retryCount:i=2,seekTo:n,pauseAfterSeek:r=!0,tech:s,callback:a})=>{if(!a)throw new Error("seekToProgramTime: callback must be provided");if(typeof t>"u"||!e||!n)return a({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!e.endList&&!s.hasStarted_)return a({message:"player must be playing a live stream to start buffering"});if(!ZP(e))return a({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});let o=KP(t,e);if(!o)return a({message:`${t} was not found in the stream`});let u=o.segment,c=JP(u.dateTimeObject,t);if(o.type==="estimate"){if(i===0)return a({message:`${t} is not buffered yet. Try again`});n(o.estimatedStart+c),s.one("seeked",()=>{OT({programTime:t,playlist:e,retryCount:i-1,seekTo:n,pauseAfterSeek:r,tech:s,callback:a});});return;}let p=u.start+c,_=()=>a(null,s.currentTime());s.one("seeked",_),r&&s.pause(),n(p);},lf=(t,e)=>{if(t.readyState===4)return e();},tL=(t,e,i,n)=>{let r=[],s,a=!1,o=function(_,T,y,b){return T.abort(),a=!0,i(_,T,y,b);},u=function(_,T){if(a)return;if(_)return _.metadata=wr({requestType:n,request:T,error:_}),o(_,T,"",r);let y=T.responseText.substring(r&&r.byteLength||0,T.responseText.length);if(r=G0(r,Jl(y,!0)),s=s||br(r),r.length<10||s&&r.length<s+2)return lf(T,()=>o(_,T,"",r));let b=pu(r);return b==="ts"&&r.length<188?lf(T,()=>o(_,T,"",r)):!b&&r.length<376?lf(T,()=>o(_,T,"",r)):o(null,T,b,r);},p=e({uri:t,beforeSend(_){_.overrideMimeType("text/plain; charset=x-user-defined"),_.addEventListener("progress",function({total:T,loaded:y}){return Gf(_,null,{statusCode:_.status},u);});}},function(_,T){return Gf(p,_,T,u);});return p;},({EventTarget:iL}=N),nb=function(t,e){if(!DT(t,e)||t.sidx&&e.sidx&&(t.sidx.offset!==e.sidx.offset||t.sidx.length!==e.sidx.length))return!1;if(!t.sidx&&e.sidx||t.sidx&&!e.sidx||t.segments&&!e.segments||!t.segments&&e.segments)return!1;if(!t.segments&&!e.segments)return!0;for(let i=0;i<t.segments.length;i++){let n=t.segments[i],r=e.segments[i];if(n.uri!==r.uri)return!1;if(!n.byterange&&!r.byterange)continue;let s=n.byterange,a=r.byterange;if(s&&!a||!s&&a||s.offset!==a.offset||s.length!==a.length)return!1;}return!0;},nL=(t,e,i,n)=>{let r=n.attributes.NAME||i;return`placeholder-uri-${t}-${e}-${r}`;},rL=({mainXml:t,srcUrl:e,clientOffset:i,sidxMapping:n,previousManifest:r})=>{let s=ty(t,{manifestUri:e,clientOffset:i,sidxMapping:n,previousManifest:r});return ST(s,e,nL),s;},sL=(t,e)=>{$s(t,(i,n,r,s)=>{(!e.mediaGroups[n][r]||!(s in e.mediaGroups[n][r]))&&delete t.mediaGroups[n][r][s];});},aL=(t,e,i)=>{let n=!0,r=Ae(t,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod,timelineStarts:e.timelineStarts});for(let s=0;s<e.playlists.length;s++){let a=e.playlists[s];if(a.sidx){let u=Ua(a.sidx);i&&i[u]&&i[u].sidx&&cu(a,i[u].sidx,a.sidx.resolvedUri);}let o=$f(r,a,nb);o&&(r=o,n=!1);}return $s(e,(s,a,o,u)=>{if(s.playlists&&s.playlists.length){let c=s.playlists[0].id,p=$f(r,s.playlists[0],nb);p&&(r=p,u in r.mediaGroups[a][o]||(r.mediaGroups[a][o][u]=s),r.mediaGroups[a][o][u].playlists[0]=r.playlists[c],n=!1);}}),sL(r,e),e.minimumUpdatePeriod!==t.minimumUpdatePeriod&&(n=!1),n?null:r;},oL=(t,e)=>(!t.map&&!e.map||!!(t.map&&e.map&&t.map.byterange.offset===e.map.byterange.offset&&t.map.byterange.length===e.map.byterange.length))&&t.uri===e.uri&&t.byterange.offset===e.byterange.offset&&t.byterange.length===e.byterange.length,rb=(t,e)=>{let i={};for(let n in t){let s=t[n].sidx;if(s){let a=Ua(s);if(!e[a])break;let o=e[a].sidxInfo;oL(o,s)&&(i[a]=e[a]);}}return i;},lL=(t,e)=>{let n=rb(t.playlists,e);return $s(t,(r,s,a,o)=>{if(r.playlists&&r.playlists.length){let u=r.playlists;n=Ae(n,rb(u,e));}}),n;},To=class extends iL{constructor(e,i,n={},r){super(),this.isPaused_=!0,this.mainPlaylistLoader_=r||this,r||(this.isMain_=!0);let{withCredentials:s=!1}=n;if(this.vhs_=i,this.withCredentials=s,this.addMetadataToTextTrack=n.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_();}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id);}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=yi("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e;}get isPaused(){return this.isPaused_;}requestErrored_(e,i,n){if(!this.request)return!0;
183if(this.request=null,e)return this.error=typeof e=="object"&&!(e instanceof Error)?e:{status:i.status,message:"DASH request error at URL: "+i.uri,response:i.response,code:2,metadata:e.metadata},n&&(this.state=n),this.trigger("error"),!0;}addSidxSegments_(e,i,n){let r=e.sidx&&Ua(e.sidx);if(!e.sidx||!r||this.mainPlaylistLoader_.sidxMapping_[r]){j.default.clearTimeout(this.mediaRequest_),this.mediaRequest_=j.default.setTimeout(()=>n(!1),0);return;}let s=md(e.sidx.resolvedUri),a=(u,c)=>{if(this.requestErrored_(u,c,i))return;let p=this.mainPlaylistLoader_.sidxMapping_,{requestType:_}=c,T;try{T=(0,_b.default)(ie(c.response).subarray(8));}catch(y){y.metadata=wr({requestType:_,request:c,parseFailure:!0}),this.requestErrored_(y,c,i);return;}return p[r]={sidxInfo:e.sidx,sidx:T},cu(e,T,e.sidx.resolvedUri),n(!0);},o="dash-sidx";this.request=tL(s,this.vhs_.xhr,(u,c,p,_)=>{if(u)return a(u,c);if(!p||p!=="mp4"){let b=p||"unknown";return a({status:c.status,message:`Unsupported ${b} container type for sidx segment at URL: ${s}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},c);}let{offset:T,length:y}=e.sidx.byterange;if(_.length>=y+T)return a(u,{response:_.subarray(T,T+y),status:c.status,uri:c.uri});this.request=this.vhs_.xhr({uri:s,responseType:"arraybuffer",requestType:"dash-sidx",headers:Wf({byterange:e.sidx.byterange})},a);},o);}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},j.default.clearTimeout(this.minimumUpdatePeriodTimeout_),j.default.clearTimeout(this.mediaRequest_),j.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off();}hasPendingRequest(){return this.request||this.mediaRequest_;}stopRequest(){if(this.request){let e=this.request;this.request=null,e.onreadystatechange=null,e.abort();}}media(e){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);let i=this.state;if(typeof e=="string"){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e];}let n=!this.media_||e.id!==this.media_.id;if(n&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList){this.state="HAVE_METADATA",this.media_=e,n&&(this.trigger("mediachanging"),this.trigger("mediachange"));return;}n&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,i,r=>{this.haveMetadata({startingState:i,playlist:e});}));}haveMetadata({startingState:e,playlist:i}){this.state="HAVE_METADATA",this.loadedPlaylists_[i.id]=i,j.default.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(i.id),e==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange");}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),j.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(j.default.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1);}load(e){this.isPaused_=!1,j.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;let i=this.media();if(e){let n=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=j.default.setTimeout(()=>this.load(),n);return;}if(!this.started){this.start();return;}i&&!i.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist");}start(){if(this.started=!0,!this.isMain_){j.default.clearTimeout(this.mediaRequest_),this.mediaRequest_=j.default.setTimeout(()=>this.haveMain_(),0);return;}this.requestMain_((e,i)=>{this.haveMain_(),!this.hasPendingRequest()&&!this.media_&&this.media(this.mainPlaylistLoader_.main.playlists[0]);});}requestMain_(e){let i={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:i}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},(n,r)=>{if(n){let{requestType:a}=r;n.metadata=wr({requestType:a,request:r,error:n});}if(this.requestErrored_(n,r)){this.state==="HAVE_NOTHING"&&(this.started=!1);return;}this.trigger({type:"manifestrequestcomplete",metadata:i});let s=r.responseText!==this.mainPlaylistLoader_.mainXml_;if(this.mainPlaylistLoader_.mainXml_=r.responseText,r.responseHeaders&&r.responseHeaders.date?this.mainLoaded_=Date.parse(r.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=md(this.mainPlaylistLoader_.srcUrl,r),s){this.handleMain_(),this.syncCl
183ientServerClock_(()=>e(r,s));return;}return e(r,s);});}syncClientServerClock_(e){let i=iy(this.mainPlaylistLoader_.mainXml_);if(i===null)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();if(i.method==="DIRECT")return this.mainPlaylistLoader_.clientOffset_=i.value-Date.now(),e();this.request=this.vhs_.xhr({uri:Jt(this.mainPlaylistLoader_.srcUrl,i.value),method:i.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(n,r)=>{if(!this.request)return;if(n){let{requestType:a}=r;return this.error.metadata=wr({requestType:a,request:r,error:n}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();}let s;i.method==="HEAD"?!r.responseHeaders||!r.responseHeaders.date?s=this.mainLoaded_:s=Date.parse(r.responseHeaders.date):s=Date.parse(r.responseText),this.mainPlaylistLoader_.clientOffset_=s-Date.now(),e();});}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_);}handleMain_(){j.default.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;let e=this.mainPlaylistLoader_.main,i={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:i});let n;try{n=rL({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e});}catch(s){this.error=s,this.error.metadata={errorType:N.Error.StreamingDashManifestParserError,error:s},this.trigger("error");}e&&(n=aL(e,n,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=n||e;let r=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(r&&r!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=r),(!e||n&&n.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(n),n){let{duration:s,endList:a}=n,o=[];
183n.playlists.forEach(c=>{o.push({id:c.id,bandwidth:c.attributes.BANDWIDTH,resolution:c.attributes.RESOLUTION,codecs:c.attributes.CODECS});});let u={duration:s,isLive:!a,renditions:o};i.parsedManifest=u,this.trigger({type:"manifestparsecomplete",metadata:i});}return!!n;}updateMinimumUpdatePeriodTimeout_(){let e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(j.default.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let i=e.main&&e.main.minimumUpdatePeriod;if(i===0&&(e.media()?i=e.media().targetDuration*1e3:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),typeof i!="number"||i<=0){i<0&&this.logger_(`found invalid minimumUpdatePeriod of ${i}, not setting a timeout`);return;}this.createMUPTimeout_(i);}createMUPTimeout_(e){let i=this.mainPlaylistLoader_;i.minimumUpdatePeriodTimeout_=j.default.setTimeout(()=>{i.minimumUpdatePeriodTimeout_=null,i.trigger("minimumUpdatePeriod"),i.createMUPTimeout_(e);},e);}refreshXml_(){this.requestMain_((e,i)=>{i&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=lL(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,n=>{this.refreshMedia_(this.media().id);}));});}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();let i=this.mainPlaylistLoader_.main.playlists,n=!this.media_||this.media_!==i[e];if(n?this.media_=i[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){let r=()=>{this.media().endList||(this.mediaUpdateTimeout=j.default.setTimeout(()=>{this.trigger("mediaupdatetimeout"),r();},zf(this.media(),!!n)));};r();}this.trigger("loadedplaylist");}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){let i=this.mainPlaylistLoader_.main.eventStream.map(n=>({cueTime:n.start,frames:[{data:n.messageData}]}));this.addMetadataToTextTrack("EventStream",i,this.mainPlaylistLoader_.main.duration);}}getKeyIdSet(e){if(e.contentProtection){let i=new Set();for(let n in e.contentProtection){let r=e.contentProtection[n].attributes["cenc:default_KID"];r&&i.add(r.replace(/-/g,"").toLowerCase());}return i;}}},pt={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},uL=t=>{let e=new Uint8Array(new ArrayBuffer(t.length));for(let i=0;i<t.length;i++)e[i]=t.charCodeAt(i);return e.buffer;},NT=function(t){return t.on=t.addEventListener,t.off=t.removeEventListener,t;},dL=function(t){try{return URL.createObjectURL(new Blob([t],{type:"application/javascript"}));}catch{let i=new BlobBuilder();return i.append(t),URL.createObjectURL(i.getBlob());}},jT=function(t){return function(){let e=dL(t),i=NT(new Worker(e));i.objURL=e;let n=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(e),n.call(this);},i;};},MT=function(t){return`var browserWorkerPolyFill = ${NT.toString()};
184browserWorkerPolyFill(self);
185`+t;},BT=function(t){return t.toString().replace(/^function.+?{/,"").slice(0,-1);},cL=MT(BT(function(){var t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=function(){this.init=function(){var l={};this.on=function(d,h){l[d]||(l[d]=[]),l[d]=l[d].concat(h);},this.off=function(d,h){var f;return l[d]?(f=l[d].indexOf(h),l[d]=l[d].slice(),l[d].splice(f,1),f>-1):!1;},this.trigger=function(d){var h,f,m,v;if(h=l[d],!!h)if(arguments.length===2)for(m=h.length,f=0;f<m;++f)h[f].call(this,arguments[1]);else{for(v=[],f=arguments.length,f=1;f<arguments.length;++f)v.push(arguments[f]);for(m=h.length,f=0;f<m;++f)h[f].apply(this,v);}},this.dispose=function(){l={};};};};e.prototype.pipe=function(l){return this.on("data",function(d){l.push(d);}),this.on("done",function(d){l.flush(d);}),this.on("partialdone",function(d){l.partialFlush(d);}),this.on("endedtimeline",function(d){l.endTimeline(d);}),this.on("reset",function(d){l.reset(d);}),l;},e.prototype.push=function(l){this.trigger("data",l);},e.prototype.flush=function(l){this.trigger("done",l);},e.prototype.partialFlush=function(l){this.trigger("partialdone",l);},e.prototype.endTimeline=function(l){this.trigger("endedtimeline",l);},e.prototype.reset=function(l){this.trigger("reset",l);};var i=e,n=Math.pow(2,32),r=function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength),h;return d.getBigUint64?(h=d.getBigUint64(0),h<Number.MAX_SAFE_INTEGER?
185Number(h):h):d.getUint32(0)*n+d.getUint32(4);},s={getUint64:r,MAX_UINT32:n},a=s.MAX_UINT32,o,u,c,p,_,T,y,b,g,E,S,P,D,A,C,R,I,M,F,U,k,G,V,Y,ae,oe,pe,be,Ee,Ft,Ut,Vt,Ci,Fr,de,le;(function(){var l;if(V={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(l in V)V.hasOwnProperty(l)&&(V[l]=[l.charCodeAt(0),l.charCodeAt(1),l.charCodeAt(2),l.charCodeAt(3)]);Y=new Uint8Array([105,115,111,109]),oe=new Uint8Array([97,118,99,49]),ae=new Uint8Array([0,0,0,1]),pe=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),be=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Ee={video:pe,audio:be},Vt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Ut=new Uint8Array([0,0,0,0,0,0,0,0]),Ci=new Uint8Array([0,0,0,0,0,0,0,0]),Fr=Ci,de=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),le=Ci,Ft=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]);}})(),o=function(l){var d=[],h=0,f,m,v;for(f=1;f<arguments.length;f++)d.push(arguments[f]);for(f=d.length;f--;)h+=d[f].byteLength;for(m=new Uint8Array(h+8),v=new DataView(m.buffer,m.byteOffset,m.byteLength),v.setUint32(0,m.byteLength),m.set(l,4),f=0,h=8;f<d.length;f++)m.set(d[f],h),h+=d[f].byteLength;return m;},u=function(){return o(V.dinf,o(V.dref,Vt));},c=function(l){return o(V.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,l.audioobjecttype<<3|l.samplingfrequencyindex>>>1,l.samplingfrequencyindex<<7|l.channelcount<<3,6,1,2]));},p=function(){return o(V.ftyp,Y,ae,Y,oe);},R=function(l){return o(V.hdlr,Ee[l]);},_=function(l){return o(V.mdat,l);},C=function(l){var d=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,l.duration>>>24&255,l.duration>>>16&255,l.duration>>>8&255,l.duration&255,85,196,0,0]);return l.samplerate&&(d[12]=l.samplerate>>>24&255,d[13]=l.samplerate>>>16&255,d[14]=l.samplerate>>>8&255,d[15]=l.samplerate&255),o(V.mdhd,d);},A=function(l){return o(V.mdia,C(l),R(l.type),y(l));},T=function(l){return o(V.mfhd,new Uint8Array([0,0,0,0,(l&4278190080)>>24,(l&16711680)>>16,(l&65280)>>8,l&255]));},y=function(l){return o(V.minf,l.type==="video"?o(V.vmhd,Ft):o(V.smhd,Ut),u(),M(l));},b=function(l,d){for(var h=[],f=d.length;f--;)h[f]=U(d[f]);return o.apply(null,[V.moof,T(l)].concat(h));},g=function(l){for(var d=l.length,h=[];d--;)h[d]=P(l[d]);return o.apply(null,[V.moov,S(4294967295)].concat(h).concat(E(l)));},E=function(l){for(var d=l.length,h=[];d--;)h[d]=k(l[d]);return o.apply(null,[V.mvex].concat(h));},S=function(l){var d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(l&4278190080)>>24,(l&16711680)>>16,(l&65280)>>8,l&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return o(V.mvhd,d);},I=function(l){var d=l.samples||[],h=new Uint8Array(4+d.length),f,m;for(m=0;m<d.length;m++)f=d[m].flags,h[m+4]=f.dependsOn<<4|f.isDependedOn<<2|f.hasRedundancy;return o(V.sdtp,h);},M=function(l){return o(V.stbl,F(l),o(V.stts,le),o(V.stsc,Fr),o(V.stsz,de),o(V.stco,Ci));},function(){var l,d;F=function(h){return o(V.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),h.type==="video"?l(h):d(h));},l=function(h){var f=h.sps||[],m=h.pps||[],v=[],x=[],w,L;for(w=0;w<f.length;w++)v.push((f[w].byteLength&65280)>>>8),v.push(f[w].byteLength&255),v=v.concat(Array.prototype.slice.call(f[w]));for(w=0;w<m.length;w++)x.push((m[w].byteLength&65280)>>>8),x.push(m[w].byteLength&255),x=x.concat(Array.prototype.slice.call(m[w]));if(L=[V.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(h.width&65280)>>8,h.width&255,(h.height&65280)>>8,h.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o(V.avcC,new Uint8Array([1,h.profileIdc,h.profileCompatibility,h.levelIdc,255].concat([f.length],v,[m.length],x))),o(V.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],h.sarRatio){var O=h.sarRatio[0],B=h.sarRatio[1];L.push(o(V.pasp,new Uint8Array([(O&4278190080)>>24,(O&16711680)>>16,(O&65280)>>8,O&255,(B&4278190080)>>24,(B&16711680)>>16,(B&65280)>>8,B&255])));}return o.apply(null,L);},d=function(h){return o(V.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(h.channelcount&65280)>>8,h.channelcount&255,(h.samplesize&65280)>>8,h.samplesize&255,0,0,0,0,(h.samplerate&65280)>>8,h.samplerate&255,0,0]),c(h));};}(),D=function(l){var d=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(l.id&4278190080)>>24,(l.id&16711680)>>16,(l.id&65280)>>8,l.id&255,0,0,0,0,(l.duration&4278190080)>>24,(l.duration&16711680)>>16,(l.duration&65280)>>8,l.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(l.width&65280)>>8,l.width&255,0,0,(l.height&65280)>>8,l.height&255,0,0]);return o(V.tkhd,d);},U=function(l){var d,h,f,m,v,x,w;return d=o(V.tfhd,new Uint8Array([0,0,0,58,(l.id&4278190080)>>24,(l.id&16711680)>>16,(l.id&65280)>>8,l.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),x=Math.floor(l.baseMediaDecodeTime/a),w=Math.floor(l.baseMediaDecodeTime%a),h=o(V.tfdt,new Uint8Array([1,0,0,0,x>>>24&255,x>>>16&255,x>>>
1858&255,x&255,w>>>24&255,w>>>16&255,w>>>8&255,w&255])),v=92,l.type==="audio"?(f=G(l,v),o(V.traf,d,h,f)):(m=I(l),f=G(l,m.length+v),o(V.traf,d,h,f,m));},P=function(l){return l.duration=l.duration||4294967295,o(V.trak,D(l),A(l));},k=function(l){var d=new Uint8Array([0,0,0,0,(l.id&4278190080)>>24,(l.id&16711680)>>16,(l.id&65280)>>8,l.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return l.type!=="video"&&(d[d.length-1]=0),o(V.trex,d);},function(){var l,d,h;h=function(f,m){var v=0,x=0,w=0,L=0;return f.length&&(f[0].duration!==void 0&&(v=1),f[0].size!==void 0&&(x=2),f[0].flags!==void 0&&(w=4),f[0].compositionTimeOffset!==void 0&&(L=8)),[0,0,v|x|w|L,1,(f.length&4278190080)>>>24,(f.length&16711680)>>>16,(f.length&65280)>>>8,f.length&255,(m&4278190080)>>>24,(m&16711680)>>>16,(m&65280)>>>8,m&255];},d=function(f,m){var v,x,w,L,O,B;for(L=f.samples||[],m+=20+16*L.length,w=h(L,m),x=new Uint8Array(w.length+L.length*16),x.set(w),v=w.length,B=0;B<L.length;B++)O=L[B],x[v++]=(O.duration&4278190080)>>>24,x[v++]=(O.duration&16711680)>>>16,x[v++]=(O.duration&65280)>>>
1858,x[v++]=O.duration&255,x[v++]=(O.size&4278190080)>>>24,x[v++]=(O.size&16711680)>>>16,x[v++]=(O.size&65280)>>>8,x[v++]=O.size&255,x[v++]=O.flags.isLeading<<2|O.flags.dependsOn,x[v++]=O.flags.isDependedOn<<6|O.flags.hasRedundancy<<4|O.flags.paddingValue<<1|O.flags.isNonSyncSample,x[v++]=O.flags.degradationPriority&61440,x[v++]=O.flags.degradationPriority&15,x[v++]=(O.compositionTimeOffset&4278190080)>>>24,x[v++]=(O.compositionTimeOffset&16711680)>>>16,x[v++]=(O.compositionTimeOffset&65280)>>>8,x[v++]=O.compositionTimeOffset&255;return o(V.trun,x);},l=function(f,m){var v,x,w,L,O,B;for(L=f.samples||[],m+=20+8*L.length,w=h(L,m),v=new Uint8Array(w.length+L.length*8),v.set(w),x=w.length,B=0;B<L.length;B++)O=L[B],v[x++]=(O.duration&4278190080)>>>24,v[x++]=(O.duration&16711680)>>>16,v[x++]=(O.duration&65280)>>>8,v[x++]=O.duration&255,v[x++]=(O.size&4278190080)>>>24,v[x++]=(O.size&16711680)>>>16,v[x++]=(O.size&65280)>>>8,v[x++]=O.size&255;return o(V.trun,v);},G=function(f,m){return f.type==="audio"?l(f,m):d(f,m);};}();var ye={ftyp:p,mdat:_,moof:b,moov:g,initSegment:function(l){var d=p(),h=g(l),f;return f=new Uint8Array(d.byteLength+h.byteLength),f.set(d),f.set(h,d.byteLength),f;}},Te=function(l){var d,h,f=[],m=[];for(m.byteLength=0,m.nalCount=0,m.duration=0,f.byteLength=0,d=0;d<l.length;d++)h=l[d],h.nalUnitType==="access_unit_delimiter_rbsp"?(f.length&&(f.duration=h.dts-f.dts,m.byteLength+=f.byteLength,m.nalCount+=f.length,m.duration+=f.duration,m.push(f)),f=[h],f.byteLength=h.data.byteLength,f.pts=h.pts,f.dts=h.dts):(h.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(f.keyFrame=!0),f.duration=h.dts-f.dts,f.byteLength+=h.data.byteLength,f.push(h));return m.length&&(!f.duration||f.duration<=0)&&(f.duration=m[m.length-1].duration),m.byteLength+=f.byteLength,m.nalCount+=f.length,m.duration+=f.duration,m.push(f),m;},Me=function(l){var d,h,f=[],m=[];for(f.byteLength=0,f.nalCount=0,f.duration=0,f.pts=l[0].pts,f.dts=l[0].dts,m.byteLength=0,m.nalCount=0,m.duration=0,m.pts=l[0].pts,m.dts=l[0].dts,d=0;d<l.length;d++)h=l[d],h.keyFrame?(f.length&&(m.push(f),m.byteLength+=f.byteLength,m.nalCount+=f.nalCount,m.duration+=f.duration),f=[h],f.nalCount=h.length,f.byteLength=h.byteLength,f.pts=h.pts,f.dts=h.dts,f.duration=h.duration):(f.duration+=h.duration,f.nalCount+=h.length,f.byteLength+=h.byteLength,f.push(h));return m.length&&f.duration<=0&&(f.duration=m[m.length-1].duration),m.byteLength+=f.byteLength,m.nalCount+=f.nalCount,m.duration+=f.duration,m.push(f),m;},Ze=function(l){var d;return!l[0][0].keyFrame&&l.length>1&&(d=l.shift(),l.byteLength-=d.byteLength,l.nalCount-=d.nalCount,l[0][0].dts=d.dts,l[0][0].pts=d.pts,l[0][0].duration+=d.duration),l;},te=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};},ge=function(l,d){var h=te();return h.dataOffset=d,h.compositionTimeOffset=l.pts-l.dts,h.duration=l.duration,h.size=4*l.length,h.size+=l.byteLength,l.keyFrame&&(h.flags.dependsOn=2,h.flags.isNonSyncSample=0),h;},ve=function(l,d){var h,f,m,v,x,w=d||0,L=[];for(h=0;h<l.length;h++)for(v=l[h],f=0;f<v.length;f++)x=v[f],m=ge(x,w),w+=m.size,L.push(m);return L;},Ct=function(l){var d,h,f,m,v,x,w=0,L=l.byteLength,O=l.nalCount,B=L+4*O,H=new Uint8Array(B),K=new DataView(H.buffer);for(d=0;d<l.length;d++)for(m=l[d],h=0;h<m.length;h++)for(v=m[h],f=0;f<v.length;f++)x=v[f],K.setUint32(w,x.data.byteLength),w+=4,H.set(x.data,w),w+=x.data.byteLength;return H;},rt=function(l,d){var h,f=d||0,m=[];return h=ge(l,f),m.push(h),m;},ln=function(l){var d,h,f=0,m=l.byteLength,v=l.length,x=m+4*v,w=new Uint8Array(x),L=new DataView(w.buffer);for(d=0;d<l.length;d++)h=l[d],L.setUint32(f,h.data.byteLength),f+=4,w.set(h.data,f),f+=h.data.byteLength;return w;},or={groupNalsIntoFrames:Te,groupFramesIntoGops:Me,extendFirstKeyFrame:Ze,generateSampleTable:ve,concatenateNalData:Ct,generateSampleTableForFrame:rt,concatenateNalDataForFrame:ln},qt=[33,16,5,32,164,27],Ur=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Se=function(l){for(var d=[];l--;)d.push(0);return d;},ac=function(l){return Object.keys(l).reduce(function(d,h){return d[h]=new Uint8Array(l[h].reduce(function(f,m){return f.concat(m);},[])),d;},{});},un,jx=function(){if(!un){var l={96e3:[qt,[227,64],Se(154),[56]],88200:[qt,[231],Se(170),[56]],64e3:[qt,[248,192],Se(240),[56]],48e3:[qt,[255,192],Se(268),[55,148,128],Se(54),[112]],44100:[qt,[25
1855,192],Se(268),[55,163,128],Se(84),[112]],32e3:[qt,[255,192],Se(268),[55,234],Se(226),[112]],24e3:[qt,[255,192],Se(268),[55,255,128],Se(268),[111,112],Se(126),[224]],16e3:[qt,[255,192],Se(268),[55,255,128],Se(268),[111,255],Se(269),[223,108],Se(195),[1,192]],12e3:[Ur,Se(268),[3,127,248],Se(268),[6,255,240],Se(268),[13,255,224],Se(268),[27,253,128],Se(259),[56]],11025:[Ur,Se(268),[3,127,248],Se(268),[6,255,240],Se(268),[13,255,224],Se(268),[27,255,192],Se(268),[55,175,128],Se(108),[112]],8e3:[Ur,Se(268),[3,121,16],Se(47),[7]]};un=ac(l);}return un;},oc=9e4,lc,uc,qo,dc,Om,Nm,jm;lc=function(l){return l*oc;},uc=function(l,d){return l*d;},qo=function(l){return l/oc;},dc=function(l,d){return l/d;},Om=function(l,d){return lc(dc(l,d));},Nm=function(l,d){return uc(qo(l),d);},jm=function(l,d,h){return qo(h?l:l-d);};var Ve={ONE_SECOND_IN_TS:oc,secondsToVideoTs:lc,secondsToAudioTs:uc,videoTsToSeconds:qo,audioTsToSeconds:dc,audioTsToVideoTs:Om,videoTsToAudioTs:Nm,metadataTsToSeconds:jm},Mx=jx,Ho=Ve,Bx=function(l){var d,h,f=0;for(d=0;d<l.length;d++)h=l[d],f+=h.data.byteLength;return f;},Fx=function(l,d,h,f){var m,v=0,x=0,w=0,L=0,O,B,H;if(d.length&&(m=Ho.audioTsToVideoTs(l.baseMediaDecodeTime,l.samplerate),v=Math.ceil(Ho.ONE_SECOND_IN_TS/(l.samplerate/1024)),h&&f&&(x=m-Math.max(h,f),w=Math.floor(x/v),L=w*v),!(w<1||L>Ho.ONE_SECOND_IN_TS/2))){for(O=Mx()[l.samplerate],O||(O=d[0].data),B=0;B<w;B++)H=d[0],d.splice(0,0,{data:O,dts:H.dts-v,pts:H.pts-v});return l.baseMediaDecodeTime-=Math.floor(Ho.videoTsToAudioTs(L,l.samplerate)),L;}},Ux=function(l,d,h){return d.minSegmentDts>=h?l:(d.minSegmentDts=1/0,l.filter(function(f){return f.dts>=h?(d.minSegmentDts=Math.min(d.minSegmentDts,f.dts),d.minSegmentPts=d.minSegmentDts,!0):!1;}));},Vx=function(l){var d,h,f=[];for(d=0;d<l.length;
185d++)h=l[d],f.push({size:h.data.byteLength,duration:1024});return f;},qx=function(l){var d,h,f=0,m=new Uint8Array(Bx(l));for(d=0;d<l.length;d++)h=l[d],m.set(h.data,f),f+=h.data.byteLength;return m;},Hx={prefixWithSilence:Fx,trimAdtsFramesByEarliestDts:Ux,generateSampleTable:Vx,concatenateFrameData:qx},$x=Ve.ONE_SECOND_IN_TS,zx=function(l,d){typeof d.pts=="number"&&(l.timelineStartInfo.pts===void 0&&(l.timelineStartInfo.pts=d.pts),l.minSegmentPts===void 0?l.minSegmentPts=d.pts:l.minSegmentPts=Math.min(l.minSegmentPts,d.pts),l.maxSegmentPts===void 0?l.maxSegmentPts=d.pts:l.maxSegmentPts=Math.max(l.maxSegmentPts,d.pts)),typeof d.dts=="number"&&(l.timelineStartInfo.dts===void 0&&(l.timelineStartInfo.dts=d.dts),l.minSegmentDts===void 0?l.minSegmentDts=d.dts:l.minSegmentDts=Math.min(l.minSegmentDts,d.dts),l.maxSegmentDts===void 0?l.maxSegmentDts=d.dts:l.maxSegmentDts=Math.max(l.maxSegmentDts,d.dts));},Gx=function(l){delete l.minSegmentDts,delete l.maxSegmentDts,delete l.minSegmentPts,delete l.maxSegmentPts;},Wx=function(l,d){var h,f,m=l.minSegmentDts;return d||(m-=l.timelineStartInfo.dts),h=l.timelineStartInfo.baseMediaDecodeTime,h+=m,h=Math.max(0,h),l.type==="audio"&&(f=l.samplerate/$x,h*=f,h=Math.floor(h)),h;},Yx={clearDtsInfo:Gx,calculateTrackBaseMediaDecodeTime:Wx,collectDtsInfo:zx},Mm=4,Xx=128,Kx=function(l){for(var d=0,h={payloadType:-1,payloadSize:0},f=0,m=0;d<l.byteLength&&l[d]!==Xx;){for(;l[d]===255;)f+=255,d++;for(f+=l[d++];l[d]===255;)m+=255,d++;if(m+=l[d++],!h.payload&&f===Mm){var v=String.fromCharCode(l[d+3],l[d+4],l[d+5],l[d+6]);if(v==="GA94"){h.payloadType=f,h.payloadSize=m,h.payload=l.subarray(d,d+m);break;}else h.payload=void 0;}d+=m,f=0,m=0;}return h;},Qx=function(l){return l.payload[0]!==181||(l.payload[1]<<8|l.payload[2])!==49||String.fromCharCode(l.payload[3],l.payload[4],l.payload[5],l.payload[6])!=="GA94"||l.payload[7]!==3?null:l.payload.subarray(8,l.payload.length-1);},Jx=function(l,d){var h=[],f,m,v,x;if(!(d[0]&64))return h;for(m=d[0]&31,f=0;f<m;f++)v=f*3,x={type:d[v+2]&3,pts:l},d[v+2]&4&&(x.ccData=d[v+3]<<8|d[v+4],h.push(x));return h;},Zx=function(l){for(var d=l.byteLength,h=[],f=1,m,v;f<d-2;)l[f]===0&&l[f+1]===0&&l[f+2]===3?(h.push(f+2),f+=2):f++;if(h.length===0)return l;m=d-h.length,v=new Uint8Array(m);var x=0;for(f=0;f<m;x++,f++)x===h[0]&&(x++,h.shift()),v[f]=l[x];return v;},Bm={parseSei:Kx,parseUserData:Qx,parseCaptionPackets:Jx,discardEmulationPreventionBytes:Zx,USER_DATA_REGISTERED_ITU_T_T35:Mm},cc=i,$o=Bm,Ht=function(l){l=l||{},Ht.prototype.init.call(this),this.parse708captions_=typeof l.parse708captions=="boolean"?l.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new $e(0,0),new $e(0,1),new $e(1,0),new $e(1,1)],this.parse708captions_&&(this.cc708Stream_=new je({captionServices:l.captionServices})),this.reset(),this.ccStreams_.forEach(function(d){d.on("data",this.trigger.bind(this,"data")),d.on("partialdone",this.trigger.bind(this,"partialdone")),d.on("done",this.trigger.bind(this,"done"));},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")));};Ht.prototype=new cc(),Ht.prototype.push=function(l){var d,h,f;if(l.nalUnitType==="sei_rbsp"&&(d=$o.parseSei(l.escapedRBSP),!!d.payload&&d.payloadType===$o.USER_DATA_REGISTERED_ITU_T_T35&&(h=$o.parseUserData(d),!!h))){if(l.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return;}else if(l.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return;}f=$o.parseCaptionPackets(l.pts,h),this.captionPackets_=this.captionPackets_.concat(f),this.latestDts_!==l.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=l.dts;}},Ht.prototype.flushCCStreams=function(l){this.ccStreams_.forEach(function(d){return l==="flush"?d.flush():d.partialFlush();},this);},Ht.prototype.flushStream=function(l){if(!this.captionPackets_.length){this.flushCCStreams(l);return;}this.captionPackets_.forEach(function(d,h){d.presortIndex=h;}),this.captionPackets_.sort(function(d,h){return d.pts===h.pts?d.presortIndex-h.presortIndex:d.pts-h.pts;}
185),this.captionPackets_.forEach(function(d){d.type<2?this.dispatchCea608Packet(d):this.dispatchCea708Packet(d);},this),this.captionPackets_.length=0,this.flushCCStreams(l);},Ht.prototype.flush=function(){return this.flushStream("flush");},Ht.prototype.partialFlush=function(){return this.flushStream("partialFlush");},Ht.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(l){l.reset();});},Ht.prototype.dispatchCea608Packet=function(l){this.setsTextOrXDSActive(l)?this.activeCea608Channel_[l.type]=null:this.setsChannel1Active(l)?this.activeCea608Channel_[l.type]=0:this.setsChannel2Active(l)&&(this.activeCea608Channel_[l.type]=1),this.activeCea608Channel_[l.type]!==null&&this.ccStreams_[(l.type<<1)+this.activeCea608Channel_[l.type]].push(l);},Ht.prototype.setsChannel1Active=function(l){return(l.ccData&30720)===4096;},Ht.prototype.setsChannel2Active=function(l){return(l.ccData&30720)===6144;},Ht.prototype.setsTextOrXDSActive=function(l){return(l.ccData&28928)===256||(l.ccData&30974)===4138||(l.ccData&30974)===6186;},Ht.prototype.dispatchCea708Packet=function(l){this.parse708captions_&&this.cc708Stream_.push(l);};var e2={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},t2=function(l){var d=e2[l]||l;return l&4096&&l===d?"":String.fromCharCode(d);},zo=function(l){return 32<=l&&l<=127||160<=l&&l<=255;},dn=function(l){this.windowNum=l,this.reset();};dn.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0;},dn.prototype.getText=function(){return this.rows.join(`
186`);},dn.prototype.clearText=function(){this.rows=[""],this.rowIdx=0;},dn.prototype.newLine=function(l){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(l),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--;},dn.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1;},dn.prototype.addText=function(l){this.rows[this.rowIdx]+=l;},dn.prototype.backspace=function(){if(!this.isEmpty()){var l=this.rows[this.rowIdx];this.rows[this.rowIdx]=l.substr(0,l.length-1);}};var Go=function(l,d,h){this.serviceNum=l,this.text="",this.currentWindow=new dn(-1),this.windows=[],this.stream=h,typeof d=="string"&&this.createTextDecoder(d);};Go.prototype.init=function(l,d){this.startPts=l;for(var h=0;h<8;h++)this.windows[h]=new dn(h),typeof d=="function"&&(this.windows[h].beforeRowOverflow=d);},Go.prototype.setCurrentWindow=function(l){this.currentWindow=this.windows[l];},Go.prototype.createTextDecoder=function(l){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(l);}catch(d){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+l+" encoding. "+d});}};var je=function(l){l=l||{},je.prototype.init.call(this);var d=this,h=l.captionServices||{},f={},m;Object.keys(h).forEach(v=>{m=h[v],/^SERVICE/.test(v)&&(f[v]=m.encoding);}),this.serviceEncodings=f,this.current708Packet=null,this.services={},this.push=function(v){v.type===3?(d.new708Packet(),d.add708Bytes(v)):(d.current708Packet===null&&d.new708Packet(),d.add708Bytes(v));};};je.prototype=new cc(),je.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]};},je.prototype.add708Bytes=function(l){var d=l.ccData,h=d>>>8,f=d&255;this.current708Packet.ptsVals.push(l.pts),this.current708Packet.data.push(h),this.current708Packet.data.push(f);},je.prototype.push708Packet=function(){var l=this.current708Packet,d=l.data,h=null,f=null,m=0,v=d[m++];for(l.seq=v>>6,l.sizeCode=v&63;m<d.length;m++)v=d[m++],h=v>>5,f=v&31,h===7&&f>0&&(v=d[m++],h=v),this.pushServiceBlock(h,m,f),f>0&&(m+=f-1);},je.prototype.pushServiceBlock=function(l,d,h){var f,m=d,v=this.current708Packet.data,x=this.services[l];for(x||(x=this.initService(l,m));m<d+h&&m<v.length;m++)f=v[m],zo(f)?m=this.handleText(m,x):f===24?m=this.multiByteCharacter(m,x):f===16?m=this.extendedCommands(m,x):128<=f&&f<=135?m=this.setCurrentWindow(m,x):152<=f&&f<=159?m=this.defineWindow(m,x):f===136?m=this.clearWindows(m,x):f===140?m=this.deleteWindows(m,x):f===137?m=this.displayWindows(m,x):f===138?m=this.hideWindows(m,x):f===139?m=this.toggleWindows(m,x):f===151?m=this.setWindowAttributes(m,x):f===144?m=this.setPenAttributes(m,x):f===145?m=this.setPenColor(m,x):f===146?m=this.setPenLocation(m,x):f===143?x=this.reset(m,x):f===8?x.currentWindow.backspace():f===12?x.currentWindow.clearText():f===13?x.currentWindow.pendingNewLine=!0:f===14?x.currentWindow.clearText():f===141&&m++;},je.prototype.extendedCommands=function(l,d){var h=this.current708Packet.data,f=h[++l];return zo(f)&&(l=this.handleText(l,d,{isExtended:!0})),l;},je.prototype.getPts=function(l){return this.current708Packet.ptsVals[Math.floor(l/2)];},je.prototype.initService=function(l,d){var f="SERVICE"+l,h=this,f,m;return f in this.serviceEncodings&&(m=this.serviceEncodings[f]),this.services[l]=new Go(l,m,h),this.services[l].init(this.getPts(d),function(v){h.flushDisplayed(v,h.services[l]);}),this.services[l];},je.prototype.handleText=function(l,d,h){var f=h&&h.isExtended,m=h&&h.isMultiByte,v=this.current708Packet.data,x=f?4096:0,w=v[l],L=v[l+1],O=d.currentWindow,B,H;function K($){return $.map(re=>("0"+(re&255).toString(16)).slice(-2)).join("");}if(m?(H=[w,L],l++):H=[w],d.textDecoder_&&!f)B=d.textDecoder_.decode(new Uint8Array(H));else if(m){let $=K(H);B=String.fromCharCode(parseInt($,16));}else B=t2(x|w);return O.pendingNewLine&&!O.isEmpty()&&O.newLine(this.getPts(l)),O.pendingNewLine=!1,O.addText(B),l;},je.prototype.multiByteCharacter=function(l,d){var h=this.current708Packet.data,f=h[l+1],m=h[l+2];return zo(f)&&zo(m)&&(l=this.handleText(++l,d,{isMultiByte:!0})),l;},je.prototype.setCurrentWindow=function(l,d){var h=this.current708Packet.data,f=h[l],m=f&7;return d.setCurrentWindow(m),l;},je.prototype.defineWindow=function(l,d){var h=this.current708Packet.data,f=h[l],m=f&7;d.setCurrentWindow(m);var v=d.currentWindow;return f=h[++l],v.visible=(f&32)>>5,v.rowLock=(f&16)>>4,v.columnLock=(f&8)>>3,v.priority=f&7,f=h[++l],v.relativePositioning=(f&128)>>7,v.anchorVertical=f&127,f=h[++l],v.anchorHorizontal=f,f=h[++l],v.anchorPoint=(f&240)>>4,v.rowCount=f&15,f=h[++l],v.columnCount=f&63,f=h[++l],v.windowStyle=(f&56)>>3,v.penStyle=f&7,v.virtualRowCount=v.rowCount+1,l;},je.prototype.setWindowAttributes=function(l,d){var h=this.current708Packet.data,f=h[l],m=d.currentWindow.winAttr;return f=h[++l],m.fillOpacity=(f&192)>>6,m.fillRed=(f&48)>>4,m.fillGreen=(f&12)>>2,m.fillBlue=f&3,f=h[++l],m.borderType=(f&192)>>6,m.borderRed=(f&48)>>4,m.borderGreen=(f&12)>>2,m.borderBlue=f&3,f=h[++l],m.borderType+=(f&128)>>5,m.wordWrap=(f&64)>>6,m.printDirection=(f&48)>>4,m.scrollDirection=(f&12)>>2,m.justify=f&3,f=h[++l],m.effectSpeed=(f&240)>>4,m.effectDirection=(f&12)>>2,m.displayEffect=f&3,l;},je.prototype.flushDisplayed=function(l,d){for(var h=[],f=0;f<8;f++)d.windows[f].visible&&!d.windows[f].isEmpty()&&h.push(d.windows[f].getText());d.endPts=l,d.text=h.join(`
187
188`),this.pushCaption(d),d.startPts=l;},je.prototype.pushCaption=function(l){l.text!==""&&(this.trigger("data",{startPts:l.startPts,endPts:l.endPts,text:l.text,stream
188:"cc708_"+l.serviceNum}),l.text="",l.startPts=l.endPts);},je.prototype.displayWindows=function(l,d){var h=this.current708Packet.data,f=h[++l],m=this.getPts(l);this.flushDisplayed(m,d);for(var v=0;v<8;v++)f&1<<v&&(d.windows[v].visible=1);return l;},je.prototype.hideWindows=function(l,d){var h=this.current708Packet.data,f=h[++l],m=this.getPts(l);this.flushDisplayed(m,d);for(var v=0;v<8;v++)f&1<<v&&(d.windows[v].visible=0);return l;},je.prototype.toggleWindows=function(l,d){var h=this.current708Packet.data,f=h[++l],m=this.getPts(l);this.flushDisplayed(m,d);for(var v=0;v<8;v++)f&1<<v&&(d.windows[v].visible^=1);return l;},je.prototype.clearWindows=function(l,d){var h=this.current708Packet.data,f=h[++l],m=this.getPts(l);this.flushDisplayed(m,d);for(var v=0;v<8;v++)f&1<<v&&d.windows[v].clearText();return l;},je.prototype.deleteWindows=function(l,d){var h=this.current708Packet.data,f=h[++l],m=this.getPts(l);this.flushDisplayed(m,d);for(var v=0;v<8;v++)f&1<<v&&d.windows[v].reset();return l;},je.prototype.setPenAttributes=function(l,d){var h=this.current708Packet.data,f=h[l],m=d.currentWindow.penAttr;return f=h[++l],m.textTag=(f&240)>>4,m.offset=(f&12)>>2,m.penSize=f&3,f=h[++l],m.italics=(f&128)>>7,m.underline=(f&64)>>6,m.edgeType=(f&56)>>3,m.fontStyle=f&7,l;},je.prototype.setPenColor=function(l,d){var h=this.current708Packet.data,f=h[l],m=d.currentWindow.penColor;return f=h[++l],m.fgOpacity=(f&192)>>6,m.fgRed=(f&48)>>4,m.fgGreen=(f&12)>>2,m.fgBlue=f&3,f=h[++l],m.bgOpacity=(f&192)>>6,m.bgRed=(f&48)>>4,m.bgGreen=(f&12)>>2,m.bgBlue=f&3,f=h[++l],m.edgeRed=(f&48)>>4,m.edgeGreen=(f&12)>>2,m.edgeBlue=f&3,l;},je.prototype.setPenLocation=function(l,d){var h=this.current708Packet.data,f=h[l],m=d.currentWindow.penLoc;return d.currentWindow.pendingNewLine=!0,f=h[++l],m.row=f&15,f=h[++l],m.column=f&63,l;},je.prototype.reset=function(l,d){var h=this.getPts(l);return this.flushDisplayed(h,d),this.initService(d.serviceNum,l);};var i2={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Wo=function(l){return l===null?"":(l=i2[l]||l,String.fromCharCode(l));},Yo=14,n2=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],lr=function(){for(var l=[],d=Yo+1;d--;)l.push({text:"",indent:0,offset:0});return l;},$e=function(l,d){$e.prototype.init.call(this),this.field_=l||0,this.dataChannel_=d||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(h){var f,m,v,x,w;if(f=h.ccData&32639,f===this.lastControlCode_){this.lastControlCode_=null;return;}if((f&61440)===4096?this.lastControlCode_=f:f!==this.PADDING_&&(this.lastControlCode_=null),v=f>>>8,x=f&255,f!==this.PADDING_)if(f===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(f===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(h.pts),this.flushDisplayed(h.pts),m=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=m,this.startPts_=h.pts;else if(f===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(h.pts);else if(f===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(h.pts);else if(f===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(h.pts);else if(f===this.CARRIAGE_RETURN_)this.clearFormatting(h.pts),this.flushDisplayed(h.pts),this.shiftRowsUp_(),this.startPts_=h.pts;else if(f===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(f===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(h.pts),this.displayed_=lr();else if(f===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=lr();else if(f===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(h.pts),this.displayed_=lr()),this.mode_="paintOn",this.startPts_=h.pts;else if(this.isSpecialCharacter(v,x))v=(v&3)<<8,w=Wo(v|x),this[this.mode_](h.pts,w),this.column_++;else if(this.isExtCharacter(v,x))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),v=(v&3)<<8,w=Wo(v|x),this[this.mode_](h.pts,w),this.column_++;else if(this.isMidRowCode(v,x))this.clearFormatting(h.pts),this[this.mode_](h.pts," "),this.column_++,(x&14)===14&&this.addFormatting(h.pts,["i"]),(x&1)===1&&this.addFormatting(h.pts,["u"]);else if(this.isOffsetControlCode(v,x)){let O=x&3;this.nonDisplayed_[this.row_].offset=O,this.column_+=O;}else if(this.isPAC(v,x)){var L=n2.indexOf(f&7968);
188if(this.mode_==="rollUp"&&(L-this.rollUpRows_+1<0&&(L=this.rollUpRows_-1),this.setRollUp(h.pts,L)),L!==this.row_&&L>=0&&L<=14&&(this.clearFormatting(h.pts),this.row_=L),x&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(h.pts,["u"]),(f&16)===16){let O=(f&14)>>1;this.column_=O*4,this.nonDisplayed_[this.row_].indent+=O;}this.isColorPAC(x)&&(x&14)===14&&this.addFormatting(h.pts,["i"]);}else this.isNormalChar(v)&&(x===0&&(x=null),w=Wo(v),w+=Wo(x),this[this.mode_](h.pts,w),this.column_+=w.length);};};$e.prototype=new cc(),$e.prototype.flushDisplayed=function(l){let d=f=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+f+"."});},h=[];this.displayed_.forEach((f,m)=>{if(f&&f.text&&f.text.length){try{f.text=f.text.trim();}catch{d(m);}f.text.length&&h.push({text:f.text,line:m+1,position:10+Math.min(70,f.indent*10)+f.offset*2.5});}else f==null&&d(m);}),h.length&&this.trigger("data",{startPts:this.startPts_,endPts:l,content:h,stream:this.name_});},$e.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=lr(),this.nonDisplayed_=lr(),this.lastControlCode_=null,this.column_=0,this.row_=Yo,this.rollUpRows_=2,this.formatting_=[];},$e.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46;},$e.prototype.isSpecialCharacter=function(l,d){return l===this.EXT_&&d>=48&&d<=63;},$e.prototype.isExtCharacter=function(l,d){return(l===this.EXT_+1||l===this.EXT_+2)&&d>=32&&d<=63;},$e.prototype.isMidRowCode=function(l,d){return l===this.EXT_&&d>=32&&d<=47;},$e.prototype.isOffsetControlCode=function(l,d){return l===this.OFFSET_&&d>=33&&d<=35;},$e.prototype.isPAC=function(l,d){return l>=this.BASE_&&l<this.BASE_+8&&d>=64&&d<=127;},$e.prototype.isColorPAC=function(l){return l>=64&&l<=79||l>=96&&l<=127;},$e.prototype.isNormalChar=function(l){return l>=32&&l<=127;},$e.prototype.setRollUp=function(l,d){if(this.mode_!=="rollUp"&&(this.row_=Yo,this.mode_="rollUp",this.flushDisplayed(l),this.nonDisplayed_=lr(),this.displayed_=lr()),d!==void 0&&d!==this.row_)for(var h=0;h<this.rollUpRows_;h++)this.displayed_[d-h]=this.displayed_[this.row_-h],this.displayed_[this.row_-h]={text:"",indent:0,offset:0};d===void 0&&(d=this.row_),this.topRow_=d-this.rollUpRows_+1;},$e.prototype.addFormatting=function(l,d){this.formatting_=this.formatting_.concat(d);var h=d.reduce(function(f,m){return f+"<"+m+">";},"");this[this.mode_](l,h);},$e.prototype.clearFormatting=function(l){if(this.formatting_.length){var d=this.formatting_.reverse().reduce(function(h,f){return h+"</"+f+">";},"");this.formatting_=[],this[this.mode_](l,d);}},$e.prototype.popOn=function(l,d){var h=this.nonDisplayed_[this.row_].text;h+=d,this.nonDisplayed_[this.row_].text=h;},$e.prototype.rollUp=function(l,d){var h=this.displayed_[this.row_].text;h+=d,this.displayed_[this.row_].text=h;},$e.prototype.shiftRowsUp_=function(){var l;for(l=0;l<this.topRow_;l++)this.displayed_[l]={text:"",indent:0,offset:0};for(l=this.row_+1;l<Yo+1;l++)this.displayed_[l]={text:"",indent:0,offset:0};for(l=this.topRow_;l<this.row_;l++)this.displayed_[l]=this.displayed_[l+1];this.displayed_[this.row_]={text:"",indent:0,offset:0};},$e.prototype.paintOn=function(l,d){var h=this.displayed_[this.row_].text;h+=d,this.displayed_[this.row_].text=h;};var Fm={CaptionStream:Ht,Cea608Stream:$e,Cea708Stream:je},Xo={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},r2=i,s2=8589934592,a2=4294967296,Um="shared",hc=function(l,d){var h=1;for(l>d&&(h=-1);Math.abs(d-l)>a2;)l+=h*s2;return l;},fc=function(l){var d,h;fc.prototype.init.call(this),this.type_=l||Um,this.push=function(f){if(f.type==="metadata"){this.trigger("data",f);return;}this.type_!==Um&&f.type!==this.type_||(h===void 0&&(h=f.dts),f.dts=hc(f.dts,h),f.pts=hc(f.pts,h),d=f.dts,this.trigger("data",f));},this.flush=function(){h=d,this.trigger("done");},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline");},this.discontinuity=function(){h=void 0,d=void 0;},this.reset=function(){this.discontinuity(),this.trigger("reset");};};fc.prototype=new r2();var Vm={TimestampRolloverStream:fc,handleRollover:hc},o2=(l,d,h)=>{if(!l)return-1;for(var f=h;f<l.length;f++)if(l[f]===d)return f;return-1;},l2={typedArrayIndexOf:o2},Ko=l2.typedArrayIndexOf,Qo={Iso88591:0,Utf16:1,Utf16be:2,Utf8:3},qm=function(l,d,h){var f,m="";for(f=d;f<h;f++)m+="%"+("00"+l[f].toString(16)).slice(-2);return m;},ea=function(l,d,h){return decodeURIComponent(qm(l,d,h));},ta=function(l,d,h){return unescape(qm(l,d,h));},ia=function(l){return l[0]<<21|l[1]<<14|l[2]<<7|l[3];},na={APIC:function(l){var d=1,h,f,m="-->";l.data[0]===Qo.Utf8&&(h=Ko(l.data,0,d),!(h<0)&&(l.mimeType=ta(l.data,d,h),d=h+1,l.pictureType=l.data[d],d++,f=Ko(l.data,0,d),!(f<0)&&(l.description=ea(l.data,d,f),d=f+1,l.mimeType===m?l.url=ta(l.data,d,l.data.length):l.pictureData=l.data.subarray(d,l.data.length))));},"T*":function(l){l.data[0]===Qo.Utf8&&(l.value=ea(l.data,1,l.data.length).replace(/\0*$/,""),l.values=l.value.split("\0"));},TXXX:function(l){var d;l.data[0]===Qo.Utf8&&(d=Ko(l.data,0,1),d!==-1&&(l.description=ea(l.data,1,d),l.value=ea(l.data,d+1,l.data.length).replace(/\0*$/,""),l.data=l.value));},"W*":function(l){l.url=ta(l.data,0,l.data.length).replace(/\0.*$/,"");},WXXX:function(l){var d;l.data[0]===Qo.Utf8&&(d=Ko(l.data,0,1),d!==-1&&(l.description=ea(l.data,1,d),l.url=ta(l.data,d+1,l.data.length).replace(/\0.*$/,"")));},PRIV:function(l){var d;for(d=0;d<l.data.length;d++)if(l.data[d]===0){l.owner=ta(l.data,0,d);break;}l.privateData=l.data.subarray(d+1),l.data=l.privateData;}},u2=function(l){var d,h,f=10,m=0,v=[];
188if(!(l.length<10||l[0]!==73||l[1]!==68||l[2]!==51)){m=ia(l.subarray(6,10)),m+=10;var x=l[5]&64;x&&(f+=4,f+=ia(l.subarray(10,14)),m-=ia(l.subarray(16,20)));do{if(d=ia(l.subarray(f+4,f+8)),d<1)break;h=String.fromCharCode(l[f],l[f+1],l[f+2],l[f+3]);var w={id:h,data:l.subarray(f+10,f+d+10)};w.key=w.id,na[w.id]?na[w.id](w):w.id[0]==="T"?na["T*"](w):w.id[0]==="W"&&na["W*"](w),v.push(w),f+=10,f+=d;}while(f<m);return v;}},Hm={parseId3Frames:u2,parseSyncSafeInteger:ia,frameParsers:na},d2=i,c2=Xo,In=Hm,Jo;Jo=function(l){var d={descriptor:l&&l.descriptor},h=0,f=[],m=0,v;if(Jo.prototype.init.call(this),this.dispatchType=c2.METADATA_STREAM_TYPE.toString(16),d.descriptor)for(v=0;v<d.descriptor.length;v++)this.dispatchType+=("00"+d.descriptor[v].toString(16)).slice(-2);this.push=function(x){var w,L,O,B,H,K;if(x.type==="timed-metadata"){if(x.dataAlignmentIndicator&&(m=0,f.length=0),f.length===0&&(x.data.length<10||x.data[0]!==73||x.data[1]!==68||x.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return;}if(f.push(x),m+=x.data.byteLength,f.length===1&&(h=In.parseSyncSafeInteger(x.data.subarray(6,10)),h+=10),!(m<h)){for(w={data:new Uint8Array(h),frames:[],pts:f[0].pts,dts:f[0].dts},H=0;H<h;)w.data.set(f[0].data.subarray(0,h-H),H),H+=f[0].data.byteLength,m-=f[0].data.byteLength,f.shift();L=10,w.data[5]&64&&(L+=4,L+=In.parseSyncSafeInteger(w.data.subarray(10,14)),h-=In.parseSyncSafeInteger(w.data.subarray(16,20)));do{if(O=In.parseSyncSafeInteger(w.data.subarray(L+4,L+8)),O<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break;}if(K=String.fromCharCode(w.data[L],w.data[L+1],w.data[L+2],w.data[L+3]),B={id:K,data:w.data.subarray(L+10,L+O+10)},B.key=B.id,In.frameParsers[B.id]?In.frameParsers[B.id](B):B.id[0]==="T"?In.frameParsers["T*"](B):B.id[0]==="W"&&In.frameParsers["W*"](B),B.owner==="com.apple.streaming.transportStreamTimestamp"){var $=B.data,re=($[3]&1)<<30|$[4]<<22|$[5]<<14|$[6]<<6|$[7]>>>2;re*=4,re+=$[7]&3,B.timeStamp=re,w.pts===void 0&&w.dts===void 0&&(w.pts=B.timeStamp,w.dts=B.timeStamp),this.trigger("timestamp",B);}w.frames.push(B),L+=10,L+=O;}while(L<h);this.trigger("data",w);}}};},Jo.prototype=new d2();var h2=Jo,pc=i,mc=Fm,wi=Xo,f2=Vm.TimestampRolloverStream,Zo,ra,el,Vr=188,gc=71;Zo=function(){var l=new Uint8Array(Vr),d=0;Zo.prototype.init.call(this),this.push=function(h){var f=0,m=Vr,v;for(d?(v=new Uint8Array(h.byteLength+d),v.set(l.subarray(0,d)),v.set(h,d),d=0):v=h;m<v.byteLength;){if(v[f]===gc&&v[m]===gc){this.trigger("data",v.subarray(f,m)),f+=Vr,m+=Vr;continue;}f++,m++;}f<v.byteLength&&(l.set(v.subarray(f),0),d=v.byteLength-f);},this.flush=function(){d===Vr&&l[0]===gc&&(this.trigger("data",l),d=0),this.trigger("done");},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline");},this.reset=function(){d=0,this.trigger("reset");};},Zo.prototype=new pc(),ra=function(){var l,d,h,f;ra.prototype.init.call(this),f=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,l=function(m,v){var x=0;v.payloadUnitStartIndicator&&(x+=m[x]+1),v.type==="pat"?d(m.subarray(x),v):h(m.subarray(x),v);},d=function(m,v){v.section_number=m[7],v.last_section_number=m[8],f.pmtPid=(m[10]&31)<<8|m[11],v.pmtPid=f.pmtPid;},h=function(m,v){var x,w,L,O;if(m[5]&1){for(f.programMapTable={video:null,audio:null,"timed-metadata":{}},x=(m[1]&15)<<8|m[2],w=3+x-4,L=(m[10]&15)<<8|m[11],O=12+L;O<w;){var B=m[O],H=(m[O+1]&31)<<8|m[O+2];B===wi.H264_STREAM_TYPE&&f.programMapTable.video===null?f.programMapTable.video=H:B===wi.ADTS_STREAM_TYPE&&f.programMapTable.audio===null?f.programMapTable.audio=H:B===wi.METADATA_STREAM_TYPE&&(f.programMapTable["timed-metadata"][H]=B),O+=((m[O+3]&15)<<8|m[O+4])+5;}v.programMapTable=f.programMapTable;}},this.push=function(m){var v={},x=4;if(v.payloadUnitStartIndicator=!!(m[1]&64),v.pid=m[1]&31,v.pid<<=8,v.pid|=m[2],(m[3]&48)>>>4>1&&(x+=m[x]+1),v.pid===0)v.type="pat",l(m.subarray(x),v),this.trigger("data",v);else if(v.pid===this.pmtPid)for(v.type="pmt",l(m.subarray(x),v),this.trigger("data",v);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());
188else this.programMapTable===void 0?this.packetsWaitingForPmt.push([m,x,v]):this.processPes_(m,x,v);},this.processPes_=function(m,v,x){x.pid===this.programMapTable.video?x.streamType=wi.H264_STREAM_TYPE:x.pid===this.programMapTable.audio?x.streamType=wi.ADTS_STREAM_TYPE:x.streamType=this.programMapTable["timed-metadata"][x.pid],x.type="pes",x.data=m.subarray(v),this.trigger("data",x);};},ra.prototype=new pc(),ra.STREAM_TYPES={h264:27,adts:15},el=function(){var l=this,d=!1,h={data:[],size:0},f={data:[],size:0},m={data:[],size:0},v,x=function(L,O){var B;let H=L[0]<<16|L[1]<<8|L[2];O.data=new Uint8Array(),H===1&&(O.packetLength=6+(L[4]<<8|L[5]),O.dataAlignmentIndicator=(L[6]&4)!==0,B=L[7],B&192&&(O.pts=(L[9]&14)<<27|(L[10]&255)<<20|(L[11]&254)<<12|(L[12]&255)<<5|(L[13]&254)>>>3,O.pts*=4,O.pts+=(L[13]&6)>>>1,O.dts=O.pts,B&64&&(O.dts=(L[14]&14)<<27|(L[15]&255)<<20|(L[16]&254)<<12|(L[17]&255)<<5|(L[18]&254)>>>3,O.dts*=4,O.dts+=(L[18]&6)>>>1)),O.data=L.subarray(9+L[8]));},w=function(L,O,B){var H=new Uint8Array(L.size),K={type:O},$=0,re=0,ce=!1,lt;if(!(!L.data.length||L.size<9)){for(K.trackId=L.data[0].pid,$=0;$<L.data.length;$++)lt=L.data[$],H.set(lt.data,re),re+=lt.data.byteLength;x(H,K),ce=O==="video"||K.packetLength<=L.size,(B||ce)&&(L.size=0,L.data.length=0),ce&&l.trigger("data",K);}};el.prototype.init.call(this),this.push=function(L){({pat:function(){},pes:function(){var O,B;switch(L.streamType){case wi.H264_STREAM_TYPE:O=h,B="video";break;case wi.ADTS_STREAM_TYPE:O=f,B="audio";break;case wi.METADATA_STREAM_TYPE:O=m,B="timed-metadata";break;default:return;}L.payloadUnitStartIndicator&&w(O,B,!0),O.data.push(L),O.size+=L.data.byteLength;},pmt:function(){var O={type:"metadata",tracks:[]};v=L.programMapTable,v.video!==null&&O.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+v.video,codec:"avc",type:"video"}),v.audio!==null&&O.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+v.audio,codec:"adts",type:"audio"}),d=!0,l.trigger("data",O);}})[L.type]();},this.reset=function(){h.size=0,h.data.length=0,f.size=0,f.data.length=0,this.trigger("reset");},this.flushStreams_=function(){w(h,"video"),w(f,"audio"),w(m,"timed-metadata");},this.flush=function(){if(!d&&v){var L={type:"metadata",tracks:[]};v.video!==null&&L.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+v.video,codec:"avc",type:"video"}),v.audio!==null&&L.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+v.audio,codec:"adts",type:"audio"}),l.trigger("data",L);}d=!1,this.flushStreams_(),this.trigger("done");};},el.prototype=new pc();var $m={PAT_PID:0,MP2T_PACKET_LENGTH:Vr,TransportPacketStream:Zo,TransportParseStream:ra,ElementaryStream:el,TimestampRolloverStream:f2,CaptionStream:mc.CaptionStream,Cea608Stream:mc.Cea608Stream,Cea708Stream:mc.Cea708Stream,MetadataStream:h2};for(var vc in wi)wi.hasOwnProperty(vc)&&($m[vc]=wi[vc]);var p2=$m,m2=i,g2=Ve.ONE_SECOND_IN_TS,tl,zm=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];tl=function(l){var d,h=0;tl.prototype.init.call(this),this.skipWarn_=function(f,m){this.trigger("log",{level:"warn",message:`adts ski
188ping bytes ${f} to ${m} in frame ${h} outside syncword`});},this.push=function(f){var m=0,v,x,w,L,O;if(l||(h=0),f.type==="audio"){d&&d.length?(w=d,d=new Uint8Array(w.byteLength+f.data.byteLength),d.set(w),d.set(f.data,w.byteLength)):d=f.data;for(var B;m+7<d.length;){if(d[m]!==255||(d[m+1]&246)!==240){typeof B!="number"&&(B=m),m++;continue;}if(typeof B=="number"&&(this.skipWarn_(B,m),B=null),x=(~d[m+1]&1)*2,v=(d[m+3]&3)<<11|d[m+4]<<3|(d[m+5]&224)>>5,L=((d[m+6]&3)+1)*1024,O=L*g2/zm[(d[m+2]&60)>>>2],d.byteLength-m<v)break;this.trigger("data",{pts:f.pts+h*O,dts:f.dts+h*O,sampleCount:L,audioobjecttype:(d[m+2]>>>6&3)+1,channelcount:(d[m+2]&1)<<2|(d[m+3]&192)>>>6,samplerate:zm[(d[m+2]&60)>>>2],samplingfrequencyindex:(d[m+2]&60)>>>2,samplesize:16,data:d.subarray(m+7+x,m+v)}),h++,m+=v;}typeof B=="number"&&(this.skipWarn_(B,m),B=null),d=d.subarray(m);}},this.flush=function(){h=0,this.trigger("done");},this.reset=function(){d=void 0,this.trigger("reset");},this.endTimeline=function(){d=void 0,this.trigger("endedtimeline");};},tl.prototype=new m2();var v2=tl,Gm;Gm=function(l){var d=l.byteLength,h=0,f=0;this.length=function(){return 8*d;},this.bitsAvailable=function(){return 8*d+f;},this.loadWord=function(){var m=l.byteLength-d,v=new Uint8Array(4),x=Math.min(4,d);if(x===0)throw new Error("no bytes available");v.set(l.subarray(m,m+x)),h=new DataView(v.buffer).getUint32(0),f=x*8,d-=x;},this.skipBits=function(m){var v;f>m?(h<<=m,f-=m):(m-=f,v=Math.floor(m/8),m-=v*8,d-=v,this.loadWord(),h<<=m,f-=m);},this.readBits=function(m){var v=Math.min(f,m),x=h>>>32-v;return f-=v,f>0?h<<=v:d>0&&this.loadWord(),v=m-v,v>0?x<<v|this.readBits(v):x;},this.skipLeadingZeros=function(){var m;for(m=0;m<f;++m)if(h&2147483648>>>m)return h<<=m,f-=m,m;return this.loadWord(),m+this.skipLeadingZeros();},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros());},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros());},this.readUnsignedExpGolomb=function(){var m=this.skipLeadingZeros();return this.readBits(m+1)-1;},this.readExpGolomb=function(){var m=this.readUnsignedExpGolomb();return 1&m?1+m>>>1:-1*(m>>>1);},this.readBoolean=function(){return this.readBits(1)===1;},this.readUnsignedByte=function(){return this.readBits(8);},this.loadWord();};var _2=Gm,Wm=i,y2=_2,il,sa,Ym;sa=function(){var l=0,d,h;sa.prototype.init.call(this),this.push=function(f){var m;h?(m=new Uint8Array(h.byteLength+f.data.byteLength),m.set(h),m.set(f.data,h.byteLength),h=m):h=f.data;for(var v=h.byteLength;l<v-3;l++)if(h[l+2]===1){d=l+5;break;}for(;d<v;)switch(h[d]){case 0:if(h[d-1]!==0){d+=2;break;}else if(h[d-2]!==0){d++;break;}l+3!==d-2&&this.trigger("data",h.subarray(l+3,d-2));do d++;while(h[d]!==1&&d<v);l=d-2,d+=3;break;case 1:if(h[d-1]!==0||h[d-2]!==0){d+=3;break;}this.trigger("data",h.subarray(l+3,d-2)),l=d-2,d+=3;break;default:d+=3;break;}h=h.subarray(l),d-=l,l=0;},this.reset=function(){h=null,l=0,this.trigger("reset");},this.flush=function(){h&&h.byteLength>3&&this.trigger("data",h.subarray(l+3)),h=null,l=0,this.trigger("done");},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline");};},sa.prototype=new Wm(),Ym={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},il=function(){var l=new sa(),d,h,f,m,v,x,w;il.prototype.init.call(this),d=this,this.push=function(L){L.type==="video"&&(h=L.trackId,f=L.pts,m=L.dts,l.push(L));},l.on("data",function(L){var O={trackId:h,pts:f,dts:m,data:L,nalUnitTypeCode:L[0]&31};switch(O.nalUnitTypeCode){case 5:O.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:O.nalUnitType="sei_rbsp",O.escapedRBSP=v(L.subarray(1));break;case 7:O.nalUnitType="seq_parameter_set_rbsp",O.escapedRBSP=v(L.subarray(1)),O.config=x(O.escapedRBSP);break;case 8:O.nalUnitType="pic_parameter_set_rbsp";break;case 9:O.nalUnitType="access_unit_delimiter_rbsp";break;}d.trigger("data",O);}),l.on("done",function(){d.trigger("done");}),l.on("partialdone",function(){d.trigger("partialdone");}),l.on("reset",function(){d.trigger("reset");}),l.on("endedtimeline",function(){d.trigger("endedtimeline");}),this.flush=function(){l.flush();},this.partialFlush=function(){l.partialFlush();},this.reset=function(){l.reset();},this.endTimeline=function(){l.endTimeline();},w=function(L,O){var B=8,H=8,K,$;for(K=0;K<L;K++)H!==0&&($=O.readExpGolomb(),H=(B+$+256)%256),B=H===0?B:H;},v=function(L){for(var O=L.byteLength,B=[],H=1,K,$;H<O-2;
188)L[H]===0&&L[H+1]===0&&L[H+2]===3?(B.push(H+2),H+=2):H++;if(B.length===0)return L;K=O-B.length,$=new Uint8Array(K);var re=0;for(H=0;H<K;re++,H++)re===B[0]&&(re++,B.shift()),$[H]=L[re];return $;},x=function(L){var O=0,B=0,H=0,K=0,$,re,ce,lt,ei,Ln,fa,pa,ma,ga,pl,qe=[1,1],va,Ii;if($=new y2(L),re=$.readUnsignedByte(),lt=$.readUnsignedByte(),ce=$.readUnsignedByte(),$.skipUnsignedExpGolomb(),Ym[re]&&(ei=$.readUnsignedExpGolomb(),ei===3&&$.skipBits(1),$.skipUnsignedExpGolomb(),$.skipUnsignedExpGolomb(),$.skipBits(1),$.readBoolean()))for(pl=ei!==3?8:12,Ii=0;Ii<pl;Ii++)$.readBoolean()&&(Ii<6?w(16,$):w(64,$));if($.skipUnsignedExpGolomb(),Ln=$.readUnsignedExpGolomb(),Ln===0)$.readUnsignedExpGolomb();else if(Ln===1)for($.skipBits(1),$.skipExpGolomb(),$.skipExpGolomb(),fa=$.readUnsignedExpGolomb(),Ii=0;Ii<fa;Ii++)$.skipExpGolomb();if($.skipUnsignedExpGolomb(),$.skipBits(1),pa=$.readUnsignedExpGolomb(),ma=$.readUnsignedExpGolomb(),ga=$.readBits(1),ga===0&&$.skipBits(1),$.skipBits(1),$.readBoolean()&&(O=$.readUnsignedExpGolomb(),B=$.readUnsignedExpGolomb(),H=$.readUnsignedExpGolomb(),K=$.readUnsignedExpGolomb()),$.readBoolean()&&$.readBoolean()){switch(va=$.readUnsignedByte(),va){case 1:qe=[1,1];break;case 2:qe=[12,11];break;case 3:qe=[10,11];break;case 4:qe=[16,11];break;case 5:qe=[40,33];break;case 6:qe=[24,11];break;case 7:qe=[20,11];break;case 8:qe=[32,11];break;case 9:qe=[80,33];break;case 10:qe=[18,11];break;case 11:qe=[15,11];break;case 12:qe=[64,33];break;case 13:qe=[160,99];break;case 14:qe=[4,3];break;case 15:qe=[3,2];break;case 16:qe=[2,1];break;case 255:{qe=[$.readUnsignedByte()<<8|$.readUnsignedByte(),$.readUnsignedByte()<<8|$.readUnsignedByte()];break;}}qe&&qe[0]/qe[1];}return{profileIdc:re,levelIdc:ce,profileCompatibility:lt,width:(pa+1)*16-O*2-B*2,height:(2-ga)*(ma+1)*16-H*2-K*2,sarRatio:qe};};},il.prototype=new Wm();var b2={H264Stream:il,NalByteStream:sa},T2=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Xm=function(l,d){var h=l[d+6]<<21|l[d+7]<<14|l[d+8]<<7|l[d+9],f=l[d+5],m=(f&16)>>4;return h=h>=0?h:0,m?h+20:h+10;},Km=function(l,d){return l.length-d<10||l[d]!==73||l[d+1]!==68||l[d+2]!==51?d:(d+=Xm(l,d),Km(l,d));},S2=function(l){var d=Km(l,0);return l.length>=d+2&&(l[d]&255)===255&&(l[d+1]&240)===240&&(l[d+1]&22)===16;},Qm=function(l){return l[0]<<21|l[1]<<14|l[2]<<7|l[3];},A2=function(l,d,h){var f,m="";for(f=d;f<h;f++)m+="%"+("00"+l[f].toString(16)).slice(-2);return m;},E2=function(l,d,h){return unescape(A2(l,d,h));},x2=function(l,d){var h=(l[d+5]&224)>>5,f=l[d+4]<<3,m=l[d+3]&6144;return m|f|h;},C2=function(l,d){return l[d]===73&&l[d+1]===68&&l[d+2]===51?"timed-metadata":l[d]&!0&&(l[d+1]&240)===240?"audio":null;},w2=function(l){for(var d=0;d+5<l.length;){if(l[d]!==255||(l[d+1]&246)!==240){d++;continue;}return T2[(l[d+2]&60)>>>2];}return null;},D2=function(l){var d,h,f,m;d=10,l[5]&64&&(d+=4,d+=Qm(l.subarray(10,14)));do{if(h=Qm(l.subarray(d+4,d+8)),h<1)return null;if(m=String.fromCharCode(l[d],l[d+1],l[d+2],l[d+3]),m==="PRIV"){f=l.subarray(d+10,d+h+10);for(var v=0;v<f.byteLength;v++)if(f[v]===0){var x=E2(f,0,v);if(x==="com.apple.streaming.transportStreamTimestamp"){var w=f.subarray(v+1),L=(w[3]&1)<<30|w[4]<<22|w[5]<<14|w[6]<<6|w[7]>>>2;return L*=4,L+=w[7]&3,L;}break;}}d+=10,d+=h;}while(d<l.byteLength);return null;},_c={isLikelyAacData:S2,parseId3TagSize:Xm,parseAdtsSize:x2,parseType:C2,parseSampleRate:w2,parseAacTimestamp:D2},I2=i,Jm=_c,nl;nl=function(){var l=new Uint8Array(),d=0;nl.prototype.init.call(this),this.setTimestamp=function(h){d=h;},this.push=function(h){var f=0,m=0,v,x,w,L;for(l.length?(L=l.length,l=new Uint8Array(h.byteLength+L),l.set(l.subarray(0,L)),l.set(h,L)):l=h;l.length-m>=3;){if(l[m]===73&&l[m+1]===68&&l[m+2]===51){if(l.length-m<10||(f=Jm.parseId3TagSize(l,m),m+f>l.length))break;x={type:"timed-metadata",data:l.subarray(m,m+f)},this.trigger("data",x),m+=f;continue;}else if((l[m]&255)===255&&(l[m+1]&240)===240){if(l.length-m<7||(f=Jm.parseAdtsSize(l,m),m+f>l.length))break;w={type:"audio",data:l.subarray(m,m+f),pts:d,dts:d},this.trigger("data",w),m+=f;continue;}m++;}v=l.length-m,v>
1880?l=l.subarray(m):l=new Uint8Array();},this.reset=function(){l=new Uint8Array(),this.trigger("reset");},this.endTimeline=function(){l=new Uint8Array(),this.trigger("endedtimeline");};},nl.prototype=new I2();var k2=nl,P2=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],L2=P2,R2=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],O2=R2,rl=i,aa=ye,oa=or,sl=Hx,Di=Yx,cn=p2,al=Ve,Zm=v2,N2=b2.H264Stream,j2=k2,M2=_c.isLikelyAacData,B2=Ve.ONE_SECOND_IN_TS,yc=L2,bc=O2,la,qr,ol,ur,F2=function(l,d){d.stream=l,this.trigger("log",d);},eg=function(l,d){for(var h=Object.keys(d),f=0;f<h.length;f++){var m=h[f];m==="headOfPipeline"||!d[m].on||d[m].on("log",F2.bind(l,m));}},tg=function(l,d){var h;if(l.length!==d.length)return!1;for(h=0;h<l.length;h++)if(l[h]!==d[h])return!1;return!0;},Tc=function(l,d,h,f,m,v){var x=h-d,w=f-d,L=m-h;return{start:{dts:l,pts:l+x},end:{dts:l+w,pts:l+L},prependedContentDuration:v,baseMediaDecodeTime:l};};qr=function(l,d){var h=[],f,m=0,v=0,x=1/0;d=d||{},f=d.firstSequenceNumber||0,qr.prototype.init.call(this),this.push=function(w){Di.collectDtsInfo(l,w),l&&yc.forEach(function(L){l[L]=w[L];}),h.push(w);},this.setEarliestDts=function(w){m=w;},this.setVideoBaseMediaDecodeTime=function(w){x=w;},this.setAudioAppendStart=function(w){v=w;},this.flush=function(){var w,L,O,B,H,K,$;if(h.length===0){this.trigger("done","AudioSegmentStream");return;}w=sl.trimAdtsFramesByEarliestDts(h,l,m),l.baseMediaDecodeTime=Di.calculateTrackBaseMediaDecodeTime(l,d.keepOriginalTimestamps),$=sl.prefixWithSilence(l,w,v,x),l.samples=sl.generateSampleTable(w),O=aa.mdat(sl.concatenateFrameData(w)),h=[],L=aa.moof(f,[l]),B=new Uint8Array(L.byteLength+O.byteLength),f++,B.set(L),B.set(O,L.byteLength),Di.clearDtsInfo(l),H=Math.ceil(B2*1024/l.samplerate),w.length&&(K=w.length*H,this.trigger("segmentTimingInfo",Tc(al.audioTsToVideoTs(l.baseMediaDecodeTime,l.samplerate),w[0].dts,w[0].pts,w[0].dts+K,w[0].pts+K,$||0)),this.trigger("timingInfo",{start:w[0].pts,end:w[0].pts+K})),this.trigger("data",{track:l,boxes:B}),this.trigger("done","AudioSegmentStream");},this.reset=function(){Di.clearDtsInfo(l),h=[],this.trigger("reset");};},qr.prototype=new rl(),la=function(l,d){var h,f=[],m=[],v,x;d=d||{},h=d.firstSequenceNumber||0,la.prototype.init.call(this),delete l.minPTS,this.gopCache_=[],this.push=function(w){Di.collectDtsInfo(l,w),w.nalUnitType==="seq_parameter_set_rbsp"&&!v&&(v=w.config,l.sps=[w.data],bc.forEach(function(L){l[L]=v[L];},this)),w.nalUnitType==="pic_parameter_set_rbsp"&&!x&&(x=w.data,l.pps=[w.data]),f.push(w);},this.flush=function(){for(var w,L,O,B,H,K,$=0,re,ce;f.length&&f[0].nalUnitType!=="access_unit_delimiter_rbsp";)f.shift();if(f.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return;}if(w=oa.groupNalsIntoFrames(f),O=oa.groupFramesIntoGops(w),O[0][0].keyFrame||(L=this.getGopForFusion_(f[0],l),L?($=L.duration,O.unshift(L),O.byteLength+=L.byteLength,O.nalCount+=L.nalCount,O.pts=L.pts,O.dts=L.dts,O.duration+=L.duration):O=oa.extendFirstKeyFrame(O)),m.length){var lt;if(d.alignGopsAtEnd?lt=this.alignGopsAtEnd_(O):lt=this.alignGopsAtStart_(O),!lt){this.gopCache_.unshift({gop:O.pop(),pps:l.pps,sps:l.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),f=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return;}Di.clearDtsInfo(l),O=lt;}Di.collectDtsInfo(l,O),l.samples=oa.generateSampleTable(O),H=aa.mdat(oa.concatenateNalData(O)),l.baseMediaDecodeTime=Di.calculateTrackBaseMediaDecodeTime(l,d.keepOriginalTimestamps),this.trigger("processedGopsInfo",O.map(function(ei){return{pts:ei.pts,dts:ei.dts,byteLength:ei.byteLength};})),re=O[0],ce=O[O.length-1],this.trigger("segmentTimingInfo",Tc(l.baseMediaDecodeTime,re.dts,re.pts,ce.dts+ce.duration,ce.pts+ce.duration,$)),this.trigger("timingInfo",{start:O[0].pts,end:O[O.length-1].pts+O[O.length-1].duration}),this.gopCache_.unshift({gop:O.pop(),pps:l.pps,sps:l.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),f=[],this.trigger("baseMediaDecodeTime",l.baseMediaDecodeTime),this.trigger("timelineStartInfo",l.timelineStartInfo),B=aa.moof(h,[l]),K=new Uint8Array(B.byteLength+H.byteLength),h++,K.set(B),K.set(H,B.byteLength),this.trigger("data",{track:l,boxes:K}
188),this.resetStream_(),this.trigger("done","VideoSegmentStream");},this.reset=function(){this.resetStream_(),f=[],this.gopCache_.length=0,m.length=0,this.trigger("reset");},this.resetStream_=function(){Di.clearDtsInfo(l),v=void 0,x=void 0;},this.getGopForFusion_=function(w){var L=45e3,O=1e4,B=1/0,H,K,$,re,ce;for(ce=0;ce<this.gopCache_.length;ce++)re=this.gopCache_[ce],$=re.gop,!(!(l.pps&&tg(l.pps[0],re.pps[0]))||!(l.sps&&tg(l.sps[0],re.sps[0])))&&($.dts<l.timelineStartInfo.dts||(H=w.dts-$.dts-$.duration,H>=-O&&H<=L&&(!K||B>H)&&(K=re,B=H)));return K?K.gop:null;},this.alignGopsAtStart_=function(w){var L,O,B,H,K,$,re,ce;for(K=w.byteLength,$=w.nalCount,re=w.duration,L=O=0;L<m.length&&O<w.length&&(B=m[L],H=w[O],B.pts!==H.pts);){if(H.pts>B.pts){L++;continue;}O++,K-=H.byteLength,$-=H.nalCount,re-=H.duration;}return O===0?w:O===w.length?null:(ce=w.slice(O),ce.byteLength=K,ce.duration=re,ce.nalCount=$,ce.pts=ce[0].pts,ce.dts=ce[0].dts,ce);},this.alignGopsAtEnd_=function(w){var L,O,B,H,K,$;for(L=m.length-1,O=w.length-1,K=null,$=!1;L>=0&&O>=0;){if(B=m[L],H=w[O],B.pts===H.pts){$=!0;break;}if(B.pts>H.pts){L--;continue;}L===m.length-1&&(K=O),O--;}if(!$&&K===null)return null;var re;if($?re=O:re=K,re===0)return w;var ce=w.slice(re),lt=ce.reduce(function(ei,Ln){return ei.byteLength+=Ln.byteLength,ei.duration+=Ln.duration,ei.nalCount+=Ln.nalCount,ei;},{byteLength:0,duration:0,nalCount:0});return ce.byteLength=lt.byteLength,ce.duration=lt.duration,ce.nalCount=lt.nalCount,ce.pts=ce[0].pts,ce.dts=ce[0].dts,ce;},this.alignGopsWith=function(w){m=w;};},la.prototype=new rl(),ur=function(l,d){this.numberOfTracks=0,this.metadataStream=d,l=l||{},typeof l.remux<"u"?this.remuxTracks=!!l.remux:this.remuxTracks=!0,typeof l.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=l.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,ur.prototype.init.call(this),this.push=function(h){if(h.content||h.text)return this.pendingCaptions.push(h);if(h.frames)return this.pendingMetadata.push(h);this.pendingTracks.push(h.track),this.pendingBytes+=h.boxes.byteLength,h.track.type==="video"&&(this.videoTrack=h.track,this.pendingBoxes.push(h.boxes)),h.track.type==="audio"&&(this.audioTrack=h.track,this.pendingBoxes.unshift(h.boxes));};},ur.prototype=new rl(),ur.prototype.flush=function(l){var d=0,h={captions:[],captionStreams:{},metadata:[],info:{}},f,m,v,x=0,w;if(this.pendingTracks.length<this.numberOfTracks){if(l!=="VideoSegmentStream"&&l!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++,this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return;}}if(this.videoTrack?(x=this.videoTrack.timelineStartInfo.pts,bc.forEach(function(L){h.info[L]=this.videoTrack[L];},this)):this.audioTrack&&(x=this.audioTrack.timelineStartInfo.pts,yc.forEach(function(L){h.info[L]=this.audioTrack[L];},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?h.type=this.pendingTracks[0].type:h.type="combined",this.emittedTracks+=this.pendingTracks.length,v=aa.initSegment(this.pendingTracks),h.initSegment=new Uint8Array(v.byteLength),h.initSegment.set(v),h.data=new Uint8Array(this.pendingBytes),w=0;w<this.pendingBoxes.length;w++)h.data.set(this.pendingBoxes[w],d),d+=this.pendingBoxes[w].byteLength;for(w=0;w<this.pendingCaptions.length;w++)f=this.pendingCaptions[w],f.startTime=al.metadataTsToSeconds(f.startPts,x,this.keepOriginalTimestamps),f.endTime=al.metadataTsToSeconds(f.endPts,x,this.keepOriginalTimestamps),h.captionStreams[f.stream]=!0,h.captions.push(f);for(w=0;w<this.pendingMetadata.length;w++)m=this.pendingMetadata[w],m.cueTime=al.metadataTsToSeconds(m.pts,x,this.keepOriginalTimestamps),h.metadata.push(m);for(h.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",h),w=0;w<h.captions.length;w++)f=h.captions[w],this.trigger("caption",f);for(w=0;w<h.metadata.length;w++)m=h.metadata[w],this.trigger("id3Frame",m);}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);},ur.prototype.setRemux=function(l){this.remuxTracks=l;},ol=function(l){var d=this,h=!0,f,m;ol.prototype.init.call(this),l=l||{},this.baseMediaDecodeTime=l.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var v={};this.transmuxPipeline_=v,v.type="aac",v.metadataStream=new cn.MetadataStream(),v.aacStream
188=new j2(),v.audioTimestampRolloverStream=new cn.TimestampRolloverStream("audio"),v.timedMetadataTimestampRolloverStream=new cn.TimestampRolloverStream("timed-metadata"),v.adtsStream=new Zm(),v.coalesceStream=new ur(l,v.metadataStream),v.headOfPipeline=v.aacStream,v.aacStream.pipe(v.audioTimestampRolloverStream).pipe(v.adtsStream),v.aacStream.pipe(v.timedMetadataTimestampRolloverStream).pipe(v.metadataStream).pipe(v.coalesceStream),v.metadataStream.on("timestamp",function(x){v.aacStream.setTimestamp(x.timeStamp);}),v.aacStream.on("data",function(x){x.type!=="timed-metadata"&&x.type!=="audio"||v.audioSegmentStream||(m=m||{timelineStartInfo:{baseMediaDecodeTime:d.baseMediaDecodeTime},codec:"adts",type:"audio"},v.coalesceStream.numberOfTracks++,v.audioSegmentStream=new qr(m,l),v.audioSegmentStream.on("log",d.getLogTrigger_("audioSegmentStream")),v.audioSegmentStream.on("timingInfo",d.trigger.bind(d,"audioTimingInfo")),v.adtsStream.pipe(v.audioSegmentStream).pipe(v.coalesceStream),d.trigger("trackinfo",{hasAudio:!!m,hasVideo:!!f}));}),v.coalesceStream.on("data",this.trigger.bind(this,"data")),v.coalesceStream.on("done",this.trigger.bind(this,"done")),eg(this,v);},this.setupTsPipeline=function(){var v={};this.transmuxPipeline_=v,v.type="ts",v.metadataStream=new cn.MetadataStream(),v.packetStream=new cn.TransportPacketStream(),v.parseStream=new cn.TransportParseStream(),v.elementaryStream=new cn.ElementaryStream(),v.timestampRolloverStream=new cn.TimestampRolloverStream(),v.adtsStream=new Zm(),v.h264Stream=new N2(),v.captionStream=new cn.CaptionStream(l),v.coalesceStream=new ur(l,v.metadataStream),v.headOfPipeline=v.packetStream,v.packetStream.pipe(v.parseStream).pipe(v.elementaryStream).pipe(v.timestampRolloverStream),v.timestampRolloverStream.pipe(v.h264Stream),v.timestampRolloverStream.pipe(v.adtsStream),v.timestampRolloverStream.pipe(v.metadataStream).pipe(v.coalesceStream),v.h264Stream.pipe(v.captionStream).pipe(v.coalesceStream),v.elementaryStream.on("data",function(x){var w;if(x.type==="metadata"){for(w=x.tracks.length;w--;)!f&&x.tracks[w].type==="video"?(f=x.tracks[w],f.timelineStartInfo.baseMediaDecodeTime=d.baseMediaDecodeTime):!m&&x.tracks[w].type==="audio"&&(m=x.tracks[w],m.timelineStartInfo.baseMediaDecodeTime=d.baseMediaDecodeTime);f&&!v.videoSegmentStream&&(v.coalesceStream.numberOfTracks++,v.videoSegmentStream=new la(f,l),v.videoSegmentStream.on("log",d.getLogTrigger_("videoSegmentStream")),v.videoSegmentStream.on("timelineStartInfo",function(L){m&&!l.keepOriginalTimestamps&&(m.timelineStartInfo=L,v.audioSegmentStream.setEarliestDts(L.dts-d.baseMediaDecodeTime));}),v.videoSegmentStream.on("processedGopsInfo",d.trigger.bind(d,"gopInfo")),v.videoSegmentStream.on("segmentTimingInfo",d.trigger.bind(d,"videoSegmentTimingInfo")),v.videoSegmentStream.on("baseMediaDecodeTime",function(L){m&&v.audioSegmentStream.setVideoBaseMediaDecodeTime(L);}),v.videoSegmentStream.on("timingInfo",d.trigger.bind(d,"videoTimingInfo")),v.h264Stream.pipe(v.videoSegmentStream).pipe(v.coalesceStream)),m&&!v.audioSegmentStream&&(v.coalesceStream.numberOfTracks++,v.audioSegmentStream=new qr(m,l),v.audioSegmentStream.on("log",d.getLogTrigger_("audioSegmentStream")),v.audioSegmentStream.on("timingInfo",d.trigger.bind(d,"audioTimingInfo")),v.audioSegmentStream.on("segmentTimingInfo",d.trigger.bind(d,"audioSegmentTimingInfo")),v.adtsStream.pipe(v.audioSegmentStream).pipe(v.coalesceStream)),d.trigger("trackinfo",{hasAudio:!!m,hasVideo:!!f});}}),v.coalesceStream.on("data",this.trigger.bind(this,"data")),v.coalesceStream.on("id3Frame",function(x){x.dispatchType=v.metadataStream.dispatchType,d.trigger("id3Frame",x);}),v.coalesceStream.on("caption",this.trigger.bind(this,"caption")),v.coalesceStream.on("done",this.trigger.bind(this,"done")),eg(this,v);},this.setBaseMediaDecodeTime=function(v){var x=this.transmuxPipeline_;l.keepOriginalTimestamps||(this.baseMediaDecodeTime=v),m&&(m.timelineStartInfo.dts=void 0,m.timelineStartInfo.pts=void 0,Di.clearDtsInfo(m),x.audioTimestampRolloverStream&&x.audioTimestampRolloverStream.discontinuity()),f&&(x.videoSegmentStream&&(x.videoSegmentStream.gopCache_=[]),f.timelineStartInfo.dts=void 0,f.timelineStartInfo.pts=void 0,Di.clearDtsInfo(f),x.captionStream.reset()),x.timestampRolloverStream&&x.timestampRolloverStream.discontinuity();},this.setAudioAppendStart=function(v){m&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(v);},this.setRemux=function(v){var x=this.transmuxPipeline_;l.remux=v,x&&x.coalesceStream&&x.coalesceStream.setRemux(v);},this.alignGopsWith=function(v){f&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(v);},this.getLogTrigger_=function(v){var x=this;
188return function(w){w.stream=v,x.trigger("log",w);};},this.push=function(v){if(h){var x=M2(v);x&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!x&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),h=!1;}this.transmuxPipeline_.headOfPipeline.push(v);},this.flush=function(){h=!0,this.transmuxPipeline_.headOfPipeline.flush();},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline();},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset();},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset();};},ol.prototype=new rl();var U2={Transmuxer:ol,VideoSegmentStream:la,AudioSegmentStream:qr,AUDIO_PROPERTIES:yc,VIDEO_PROPERTIES:bc,generateSegmentTimingInfo:Tc},V2=function(l){return l>>>0;},q2=function(l){return("00"+l.toString(16)).slice(-2);},ll={toUnsigned:V2,toHexString:q2},H2=function(l){var d="";return d+=String.fromCharCode(l[0]),d+=String.fromCharCode(l[1]),d+=String.fromCharCode(l[2]),d+=String.fromCharCode(l[3]),d;},Sc=H2,$2=ll.toUnsigned,z2=Sc,ig=function(l,d){var h=[],f,m,v,x,w;if(!d.length)return null;for(f=0;f<l.byteLength;)m=$2(l[f]<<24|l[f+1]<<16|l[f+2]<<8|l[f+3]),v=z2(l.subarray(f+4,f+8)),x=m>1?f+m:l.byteLength,v===d[0]&&(d.length===1?h.push(l.subarray(f+8,x)):(w=ig(l.subarray(f+8,x),d.slice(1)),w.length&&(h=h.concat(w)))),f=x;return h;},ul=ig,G2=ll.toUnsigned,W2=s.getUint64,Y2=function(l){var d={version:l[0],flags:new Uint8Array(l.subarray(1,4))};return d.version===1?d.baseMediaDecodeTime=W2(l.subarray(4)):d.baseMediaDecodeTime=G2(l[4]<<24|l[5]<<16|l[6]<<8|l[7]),d;},Ac=Y2,X2=function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength),h={version:l[0],flags:new Uint8Array(l.subarray(1,4)),trackId:d.getUint32(4)},f=h.flags[2]&1,m=h.flags[2]&2,v=h.flags[2]&8,x=h.flags[2]&16,w=h.flags[2]&32,L=h.flags[0]&65536,O=h.flags[0]&131072,B;return B=8,f&&(B+=4,h.baseDataOffset=d.getUint32(12),B+=4),m&&(h.sampleDescriptionIndex=d.getUint32(B),B+=4),v&&(h.defaultSampleDuration=d.getUint32(B),B+=4),x&&(h.defaultSampleSize=d.getUint32(B),B+=4),w&&(h.defaultSampleFlags=d.getUint32(B)),L&&(h.durationIsEmpty=!0),!f&&O&&(h.baseDataOffsetIsMoof=!0),h;},Ec=X2,ng=s.getUint64,K2=function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength),h={version:l[0],flags:new Uint8Array(l.subarray(1,4)),references:[],referenceId:d.getUint32(4),timescale:d.getUint32(8)},f=12;h.version===0?(h.earliestPresentationTime=d.getUint32(f),h.firstOffset=d.getUint32(f+4),f+=8):(h.earliestPresentationTime=ng(l.subarray(f)),h.firstOffset=ng(l.subarray(f+8)),f+=16),f+=2;var m=d.getUint16(f);for(f+=2;m>0;f+=12,m--)h.references.push({referenceType:(l[f]&128)>>>7,referencedSize:d.getUint32(f)&2147483647,subsegmentDuration:d.getUint32(f+4),startsWithSap:!!(l[f+8]&128),sapType:(l[f+8]&112)>>>4,sapDeltaTime:d.getUint32(f+8)&268435455});return h;},Q2=K2,J2=function(l){return{isLeading:(l[0]&12)>>>2,dependsOn:l[0]&3,isDependedOn:(l[1]&192)>>>6,hasRedundancy:(l[1]&48)>>>4,paddingValue:(l[1]&14)>>>1,isNonSyncSample:l[1]&1,degradationPriority:l[2]<<8|l[3]};},Z2=J2,rg=Z2,eC=function(l){var d={version:l[0],flags:new Uint8Array(l.subarray(1,4)),samples:[]},h=new DataView(l.buffer,l.byteOffset,l.byteLength),f=d.flags[2]&1,m=d.flags[2]&4,v=d.flags[1]&1,x=d.flags[1]&2,w=d.flags[1]&4,L=d.flags[1]&8,O=h.getUint32(4),B=8,H;for(f&&(d.dataOffset=h.getInt32(B),B+=4),m&&O&&(H={flags:rg(l.subarray(B,B+4))},B+=4,v&&(H.duration=h.getUint32(B),B+=4),x&&(H.size=h.getUint32(B),B+=4),L&&(d.version===1?H.compositionTimeOffset=h.getInt32(B):H.compositionTimeOffset=h.getUint32(B),B+=4),d.samples.push(H),O--);O--;)H={},v&&(H.duration=h.getUint32(B),B+=4),x&&(H.size=h.getUint32(B),B+=4),w&&(H.flags=rg(l.subarray(B,B+4)),B+=4),L&&(d.version===1?H.compositionTimeOffset=h.getInt32(B):H.compositionTimeOffset=h.getUint32(B),B+=4),d.samples.push(H);return d;},sg=eC,tC=s,ag=tC.getUint64,Tt,xc,hi=function(l){return new Date(l*1e3-20828448e5);},ua=Sc,iC=ul,nC=function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength),h=[],f,m;for(f=0;f+4<l.length;f+=m){if(m=d.getUint32(f),f+=4,m<=0){h.push("<span style='color:red;'>MALFORMED DATA</span>");continue;}switch(l[f]&31){case 1:h.push("slice_layer_without_partitioning_rbsp");break;case 5:h.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:h.push("sei_rbsp");break;case 7:h.push("seq_parameter_set_rbsp");break;case 8:h.push("pic_parameter_set_rbsp");break;case 9:h.push("access_unit_delimiter_rbsp");break;default:h.push("UNKNOWN NAL - "+l[f]&31);break;}}return h;},kn={avc1:function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength);return{dataReferenceIndex:d.getUint16(6),width:d.getUint16(24),height:d.getUint16(26),horizresolution:d.getUint16(28)+d.getUint16(30)/16,vertresolution:d.getUint16(32)+d.getUint16(34)/16,frameCount:d.getUint16(40),depth:d.getUint16(74),config:Tt(l.subarray(78,l.byteLength))};},avcC:function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength),h={configurationVersion:l[0],avcProfileIndication:l[1],profileCompatibility:l[2],avcLevelIndication:l[3],lengthSizeMinusOne:l[4]&3,sps:[],pps:[]},f=l[5]&31,m,v,x,w;for(x=6,w=0;w<f;w++)v=d.getUint16(x),x+=2,h.sps.push(new Uint8Array(l.subarray(x,x+v))),x+=v;for(m=l[x],x++,w=0;w<m;w++)v=d.getUint16(x),x+=2,h.pps.push(new Uint8Array(l.subarray(x,x+v))),x+=v;return h;},btrt:function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength);return{bufferSizeDB:d.getUint32(0),maxBitrate:d.getUint32(4),avgBitrate:d.getUint32(8)};},edts:function(d){return{boxes:Tt(d)};},elst:function(d){var h=new DataView(d.buffer,d.byteOffset,d.byteLength),f={version:h.getUint8(0),flags:new Uint8Array(d.subarray(1,4)),edits:[]},m=h.getUint32(4),v;for(v=8;m;m--)f.version===0?(f.edits.push({segmentDuration:h.getUint32(v),mediaTime:h.getInt32(v+4),mediaRate:h.getUint16(v+8)+h.getUint16(v+10)/(256*256)}),v+=12):(f.edits.push({segmentDuration:ag(d.subarray(v)),mediaTime:ag(d.subarray(v+8)),mediaRate:h.getUint16(v+16)+h.getUint16(v+18)/(256*256)}),v+=20);return f;},esds:function(l){return{version:l[0],flags:new Uint8Array(l.subarray(1,4)),esId:l[6]<<8|l[7],streamPriority:l[8]&31,decoderConfig:{objectProfileIndication:l[11],streamType:l[12]>>>2&63,bufferSize:l[13]<<16|l[14]<<8|l[15],maxBitrate:l[16]<<24|l[17]<<16|l[18]<<8|l[19],avgBitrate:l[20]<<24|l[21]<<16|l[22]<<8|l[23],decoderConfigDescriptor:{tag:l[24],length:l[25],audioObjectType:l[26]>>>3&31,samplingFrequencyIndex:(l[26]&7)<<1|l[27]>>>7&1,channelConfiguration:l[27]>>>3&15}}};},ftyp:function(l){for(var d=new DataView(l.buffer,l.byteOffset,l.byteLength),h={majorBrand:ua(l.subarray(0,4)),minorVersion:d.getUint32(4),compatibleBrands:[]},f=8;f<l.byteLength;)h.compatibleBrands.push(ua(l.subarray(f,f+4))),f+=4;return h;},dinf:function(l){return{boxes:Tt(l)};},dref:function(l){return{version:l[0],flags:new Uint8Array(l.subarray(1,4)),dataReferences:Tt(l.subarray(8))};},hdlr:function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength),h={version:d.getUint8(0),flags:new Uint8Array(l.subarray(1,4)),handlerType:ua(l.subarray(8,12)),name:""},f=8;for(f=24;f<l.byteLength;f++){if(l[f]===0){f++;break;}h.name+=String.fromCharCode(l[f]);}return h.name=decodeURIComponent(escape(h.name)),h;},mdat:function(l){return{byteLength:l.byteLength,nals:nC(l)};},mdhd:function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength),h=4,f,m={version:d.getUint8(0),flags:new Uint8Array(l.subarray(1,4)),language:""};return m.version===1?(h+=4,m.creationTime=hi(d.getUint32(h)),h+=8,m.modificationTime=hi(d.getUint32(h)),h+=4,m.timescale=d.getUint32(h),h+=8,m.duration=d.getUint32(h)):(m.creationTime=hi(d.getUint32(h)),h+=4,m.modificationTime=hi(d.getUint32(h)),h+=4,m.timescale=d.getUint32(h),h+=4,m.duration=d.getUint32(h)),h+=4,f=d.getUint16(h),m.language+=String.fromCharCode((f>>10)+96),m.language+=String.fromCharCode(((f&992)>>5)+96),m.language+=String.fromCharCode((f&31)+96),m;},mdia:function(l){return{boxes:Tt(l)};},mfhd:function(l){return{version:l[0],flags:new Uint8Array(l.subarray(1,4)),sequenceNumber:l[4]<<24|l[5]<<16|l[6]<<8|l[7]};},minf:function(l){return{boxes:Tt(l)};},mp4a:function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength),h={dataReferenceIndex:d.getUint16(6),channelcount:d.getUint16(16),samplesize:d.getUint16(18),samplerate:d.getUint16(24)+d.getUint16(26)/65536};return l.byteLength>28&&(h.streamDescriptor=Tt(l.subarray(28))[0]),h;},moof:function(l){return{boxes:Tt(l)};},moov:function(l){return{boxes:Tt(l)};},mvex:function(l){return{boxes:Tt(l)};},mvhd:function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength),h=4,f={version:d.getUint8(0),flags:new Uint8Array(l.subarray(1,4))};return f.version===1?(h+=4,f.creationTime=hi(d.getUint32(h)),h+=8,f.modificationTime=hi(d.getUint32(h)),h+=4,f.timescale=d.getUint32(h),h+=8,f.duration=d.getUint32(h)):(f.creationTime=hi(d.getUint32(h)),h+=4,f.modificationTime=hi(d.getUint32(h)),h+=4,f.timescale=d.getUint32(h),h+=4,f.duration=d.getUint32(h)),h+=4,f.rate=d.getUint16(h)+d.getUint16(h+2)/16,h+=4,f.volume=d.getUint8(h)+d.getUint8(h+1)/8,h+=2,h+=2,h+=2*4,f.matrix=new Uint32Array(l.subarray(h,h+9*4)),h+=9*4,h+=6*4,f.nextTrackId=d.getUint32(h),f;},pdin:function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength);return{version:d.getUint8(0),flags:new Uint8Array(l.subarray(1,4)),rate:d.getUint32(4),initialDelay:d.getUint32(8)};},sdtp:function(l){var d={version:l[0],flags:new Uint8Array(l.subarray(1,4)),samples:[]},h;for(h=4;h<l.byteLength;h++)d.samples.push({dependsOn:(l[h]&48)>>4,isDependedOn:(l[h]&12)>>2,hasRedundancy:l[h]&3});return d;},sidx:Q2,smhd:function(l){return{version:l[0],flags:new Uint8Array(l.subarray(1,4)),balance:l[4]+l[5]/256};},stbl:function(l){return{boxes:Tt(l)};},ctts:function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength),h={version:d.getUint8(0),flags:new Uint8Array(l.subarray(1,4)),compositionOffsets:[]},f=d.getUint32(4),m;
188for(m=8;f;m+=8,f--)h.compositionOffsets.push({sampleCount:d.getUint32(m),sampleOffset:d[h.version===0?"getUint32":"getInt32"](m+4)});return h;},stss:function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength),h={version:d.getUint8(0),flags:new Uint8Array(l.subarray(1,4)),syncSamples:[]},f=d.getUint32(4),m;for(m=8;f;m+=4,f--)h.syncSamples.push(d.getUint32(m));return h;},stco:function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength),h={version:l[0],flags:new Uint8Array(l.subarray(1,4)),chunkOffsets:[]},f=d.getUint32(4),m;for(m=8;f;m+=4,f--)h.chunkOffsets.push(d.getUint32(m));return h;},stsc:function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength),h=d.getUint32(4),f={version:l[0],flags:new Uint8Array(l.subarray(1,4)),sampleToChunks:[]},m;for(m=8;h;m+=12,h--)f.sampleToChunks.push({firstChunk:d.getUint32(m),samplesPerChunk:d.getUint32(m+4),sampleDescriptionIndex:d.getUint32(m+8)});return f;},stsd:function(l){return{version:l[0],flags:new Uint8Array(l.subarray(1,4)),sampleDescriptions:Tt(l.subarray(8))};},stsz:function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength),h={version:l[0],flags:new Uint8Array(l.subarray(1,4)),sampleSize:d.getUint32(4),entries:[]},f;for(f=12;f<l.byteLength;f+=4)h.entries.push(d.getUint32(f));return h;},stts:function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength),h={version:l[0],flags:new Uint8Array(l.subarray(1,4)),timeToSamples:[]},f=d.getUint32(4),m;for(m=8;f;m+=8,f--)h.timeToSamples.push({sampleCount:d.getUint32(m),sampleDelta:d.getUint32(m+4)});return h;},styp:function(l){return kn.ftyp(l);},tfdt:Ac,tfhd:Ec,tkhd:function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength),h=4,f={version:d.getUint8(0),flags:new Uint8Array(l.subarray(1,4))};return f.version===1?(h+=4,f.creationTime=hi(d.getUint32(h)),h+=8,f.modificationTime=hi(d.getUint32(h)),h+=4,f.trackId=d.getUint32(h),h+=4,h+=8,f.duration=d.getUint32(h)):(f.creationTime=hi(d.getUint32(h)),h+=4,f.modificationTime=hi(d.getUint32(h)),h+=4,f.trackId=d.getUint32(h),h+=4,h+=4,f.duration=d.getUint32(h)),h+=4,h+=2*4,f.layer=d.getUint16(h),h+=2,f.alternateGroup=d.getUint16(h),h+=2,f.volume=d.getUint8(h)+d.getUint8(h+1)/8,h+=2,h+=2,f.matrix=new Uint32Array(l.subarray(h,h+9*4)),h+=9*4,f.width=d.getUint16(h)+d.getUint16(h+2)/65536,h+=4,f.height=d.getUint16(h)+d.getUint16(h+2)/65536,f;},traf:function(l){return{boxes:Tt(l)};},trak:function(l){return{boxes:Tt(l)};},trex:function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength);return{version:l[0],flags:new Uint8Array(l.subarray(1,4)),trackId:d.getUint32(4),defaultSampleDescriptionIndex:d.getUint32(8),defaultSampleDuration:d.getUint32(12),defaultSampleSize:d.getUint32(16),sampleDependsOn:l[20]&3,sampleIsDependedOn:(l[21]&192)>>6,sampleHasRedundancy:(l[21]&48)>>4,samplePaddingValue:(l[21]&14)>>1,sampleIsDifferenceSample:!!(l[21]&1),sampleDegradationPriority:d.getUint16(22)};},trun:sg,"url ":function(l){return{version:l[0],flags:new Uint8Array(l.subarray(1,4))};},vmhd:function(l){var d=new DataView(l.buffer,l.byteOffset,l.byteLength);return{version:l[0],flags:new Uint8Array(l.subarray(1,4)),graphicsmode:d.getUint16(4),opcolor:new Uint16Array([d.getUint16(6),d.getUint16(8),d.getUint16(10)])};}};Tt=function(l){for(var d=0,h=[],f,m,v,x,w,L=new ArrayBuffer(l.length),O=new Uint8Array(L),B=0;B<l.length;++B)O[B]=l[B];for(f=new DataView(L);d<l.byteLength;)m=f.getUint32(d),v=ua(l.subarray(d+4,d+8)),x=m>1?d+m:l.byteLength,w=(kn[v]||function(H){return{data:H};})(l.subarray(d+8,x)),w.size=m,w.type=v,h.push(w),d=x;return h;},xc=function(l,d){var h;return d=d||0,h=new Array(d*2+1).join(" "),l.map(function(f,m){return h+f.type+`
189`+Object.keys(f).filter(function(v){return v!=="type"&&v!=="boxes";}).map(function(v){var x=h+"  "+v+": ",w=f[v];if(w instanceof Uint8Array||w instanceof Uint32Array){var L=Array.prototype.slice.call(new Uint8Array(w.buffer,w.byteOffset,w.byteLength)).map(function(O){return" "+("00"+O.toString(16)).slice(-2);}).join("").match(/.{1,24}/g);return L?L.length===1?x+"<"+L.join("").slice(1)+">":x+`<
190`+L.map(function(O){return h+"  "+O;}).join(`
191`)+`
192`+h+"  >":x+"<>";}return x+JSON.stringify(w,null,2).split(`
193`).map(function(O,B){return B===0?O:h+"  "+O;}).join(`
194`);}).join(`
195`)+(f.boxes?`
196`+xc(f.boxes,d+1):"");}).join(`
197`);};var og={inspect:Tt,textify:xc,parseType:ua,findBox:iC,parseTraf:kn.traf,parseTfdt:kn.tfdt,parseHdlr:kn.hdlr,parseTfhd:kn.tfhd,parseTrun:kn.trun,parseSidx:kn.sidx},rC=function(l){for(var d=0,h=String.fromCharCode(l[d]),f="";h!=="\0";)f+=h,d++,h=String.fromCharCode(l[d]);return f+=h,f;},sC={uint8ToCString:rC},dl=sC.uint8ToCString,aC=s.getUint64,oC=function(l){var d=4,h=l[0],f,m,v,x,w,L,O,B;if(h===0){f=dl(l.subarray(d)),d+=f.length,m=dl(l.subarray(d)),d+=m.length;var H=new DataView(l.buffer);v=H.getUint32(d),d+=4,w=H.getUint32(d),d+=4,L=H.getUint32(d),d+=4,O=H.getUint32(d),d+=4;}else if(h===1){var H=new DataView(l.buffer);v=H.getUint32(d),d+=4,x=aC(l.subarray(d)),d+=8,L=H.getUint32(d),d+=4,O=H.getUint32(d),d+=4,f=dl(l.subarray(d)),d+=f.length,m=dl(l.subarray(d)),d+=m.length;}B=new Uint8Array(l.subarray(d,l.byteLength));var K={scheme_id_uri:f,value:m,timescale:v||1,presentation_time:x,presentation_time_delta:w,event_duration:L,id:O,message_data:B};return uC(h,K)?K:void 0;},lC=function(l,d,h,f){return l||l===0?l/d:f+h/d;},uC=function(l,d){var h=d.scheme_id_uri!=="\0",f=l===0&&lg(d.presentation_time_delta)&&h,m=l===1&&lg(d.presentation_time)&&h;return!(l>1)&&f||m;},lg=function(l){return l!==void 0||l!==null;},dC={parseEmsgBox:oC,scaleTime:lC},da;typeof window<"u"?da=window:typeof t<"u"?da=t:typeof self<"u"?da=self:da={};var ug=da,cl=ll.toUnsigned,ca=ll.toHexString,it=ul,Hr=Sc,Cc=dC,cC=Ec,hC=sg,fC=Ac,pC=s.getUint64,dg,cg,hg,fg,pg,wc,mg,Dc=ug,mC=Hm.parseId3Frames;dg=function(l){var d={},h=it(l,["moov","trak"]);return h.reduce(function(f,m){var v,x,w,L,O;return v=it(m,["tkhd"])[0],!v||(x=v[0],w=x===0?12:20,L=cl(v[w]<<24|v[w+1]<<16|v[w+2]<<8|v[w+3]),O
197=it(m,["mdia","mdhd"])[0],!O)?null:(x=O[0],w=x===0?12:20,f[L]=cl(O[w]<<24|O[w+1]<<16|O[w+2]<<8|O[w+3]),f);},d);},cg=function(l,d){var h;h=it(d,["moof","traf"]);var f=h.reduce(function(m,v){var x=it(v,["tfhd"])[0],w=cl(x[4]<<24|x[5]<<16|x[6]<<8|x[7]),L=l[w]||9e4,O=it(v,["tfdt"])[0],B=new DataView(O.buffer,O.byteOffset,O.byteLength),H;O[0]===1?H=pC(O.subarray(4,12)):H=B.getUint32(4);let K;return typeof H=="bigint"?K=H/Dc.BigInt(L):typeof H=="number"&&!isNaN(H)&&(K=H/L),K<Number.MAX_SAFE_INTEGER&&(K=Number(K)),K<m&&(m=K),m;},1/0);return typeof f=="bigint"||isFinite(f)?f:0;},hg=function(l,d){var h=it(d,["moof","traf"]),f=0,m=0,v;if(h&&h.length){var x=it(h[0],["tfhd"])[0],w=it(h[0],["trun"])[0],L=it(h[0],["tfdt"])[0];if(x){var O=cC(x);v=O.trackId;}if(L){var B=fC(L);f=B.baseMediaDecodeTime;}if(w){var H=hC(w);H.samples&&H.samples.length&&(m=H.samples[0].compositionTimeOffset||0);}}var K=l[v]||9e4;typeof f=="bigint"&&(m=Dc.BigInt(m),K=Dc.BigInt(K));var $=(f+m)/K;return typeof $=="bigint"&&$<Number.MAX_SAFE_INTEGER&&($=Number($)),$;},fg=function(l){var d=it(l,["moov","trak"]),h=[];return d.forEach(function(f){var m=it(f,["mdia","hdlr"]),v=it(f,["tkhd"]);m.forEach(function(x,w){var L=Hr(x.subarray(8,12)),O=v[w],B,H,K;L==="vide"&&(B=new DataView(O.buffer,O.byteOffset,O.byteLength),H=B.getUint8(0),K=H===0?B.getUint32(12):B.getUint32(20),h.push(K));});}),h;},wc=function(l){var d=l[0],h=d===0?12:20;return cl(l[h]<<24|l[h+1]<<16|l[h+2]<<8|l[h+3]);},pg=function(l){var d=it(l,["moov","trak"]),h=[];return d.forEach(function(f){var m={},v=it(f,["tkhd"])[0],x,w;v&&(x=new DataView(v.buffer,v.byteOffset,v.byteLength),w=x.getUint8(0),m.id=w===0?x.getUint32(12):x.getUint32(20));var L=it(f,["mdia","hdlr"])[0];if(L){var O=Hr(L.subarray(8,12));O==="vide"?m.type="video":O==="soun"?m.type="audio":m.type=O;}var B=it(f,["mdia","minf","stbl","stsd"])[0];if(B){var H=B.subarray(8);m.codec=Hr(H.subarray(4,8));var K=it(H,[m.codec])[0],$,re;K&&(/^[asm]vc[1-9]$/i.test(m.codec)?($=K.subarray(78),re=Hr($.subarray(4,8)),re==="avcC"&&$.length>11?(m.codec+=".",m.codec+=ca($[9]),m.codec+=ca($[10]),m.codec+=ca($[11])):m.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(m.codec)?($=K.subarray(28),re=Hr($.subarray(4,8)),re==="esds"&&$.length>20&&$[19]!==0?(m.codec+="."+ca($[19]),m.codec+="."+ca($[20]>>>2&63).replace(/^0/,"")):m.codec="mp4a.40.2"):m.codec=m.codec.toLowerCase());}var ce=it(f,["mdia","mdhd"])[0];ce&&(m.timescale=wc(ce)),h.push(m);}),h;},mg=function(l,d=0){var h=it(l,["emsg"]);return h.map(f=>{var m=Cc.parseEmsgBox(new Uint8Array(f)),v=mC(m.message_data);return{cueTime:Cc.scaleTime(m.presentation_time,m.timescale,m.presentation_time_delta,d),duration:Cc.scaleTime(m.event_duration,m.timescale),frames:v};});};var ha={findBox:it,parseType:Hr,timescale:dg,startTime:cg,compositionStartTime:hg,videoTrackIds:fg,tracks:pg,getTimescaleFromMediaHeader:wc,getEmsgID3:mg};let{parseTrun:gC}=og,{findBox:gg}=ha;var vg=ug,vC=function(l){var d=gg(l,["moof","traf"]),h=gg(l,["mdat"]),f=[];return h.forEach(function(m,v){var x=d[v];f.push({mdat:m,traf:x});}),f;},_C=function(l,d,h){var f=d,m=h.defaultSampleDuration||0,v=h.defaultSampleSize||0,x=h.trackId,w=[];return l.forEach(function(L){var O=gC(L),B=O.samples;B.forEach(function(H){H.duration===void 0&&(H.duration=m),H.size===void 0&&(H.size=v),H.trackId=x,H.dts=f,H.compositionTimeOffset===void 0&&(H.compositionTimeOffset=0),typeof f=="bigint"?(H.pts=f+vg.BigInt(H.compositionTimeOffset),f+=vg.BigInt(H.duration)):(H.pts=f+H.compositionTimeOffset,f+=H.duration);}),w=w.concat(B);}),w;},_g={getMdatTrafPairs:vC,parseSamples:_C},yC=Bm.discardEmulationPreventionBytes,bC=Fm.CaptionStream,Ic=ul,TC=Ac,SC=Ec,{getMdatTrafPairs:AC,parseSamples:EC}=_g,xC=function(l,d){for(var h=l,f=0;f<d.length;f++){var m=d[f];if(h<m.size)return m;h-=m.size;}return null;},CC=function(l,d,h){var f=new DataView(l.buffer,l.byteOffset,l.byteLength),m={logs:[],seiNals:[]},v,x,w,L;for(x=0;x+4<l.length;x+=w)if(w=f.getUint32(x),x+=4,!(w<=0))switch(l[x]&31){case 6:var O=l.subarray(x+1,x+1+w),B=xC(x,d);if(v={nalUnitType:"sei_rbsp",size:w,data:O,escapedRBSP:yC(O),trackId:h},B)v.pts=B.pts,v.dts=B.dts,L=B;else if(L)v.pts=L.pts,v.dts=L.dts;else{m.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+x+" for trackId "+h+". See mux.js#223."});break;}m.seiNals.push(v);break;}return m;},wC=function(l,d){var h={},f=AC(l);return f.forEach(function(m){var v=m.mdat,x=m.traf,w=Ic(x,["tfhd"]),L=SC(w[0]),O=L.trackId,B=Ic(x,["tfdt"]),H=B.length>0?TC(B[0]).baseMediaDecodeTime:0,K=Ic(x,["trun"]),$,re;d===O&&K.length>0&&($=EC(K,H,L),re=CC(v,$,O),h[O]||(h[O]={seiNals:[],logs:[]}),h[O].seiNals=h[O].seiNals.concat(re.seiNals),h[O].logs=h[O].logs.concat(re.logs));}),h;},DC=function(l,d,h){var f;if(d===null)return null;f=wC(l,d);
197var m=f[d]||{};return{seiNals:m.seiNals,logs:m.logs,timescale:h};},IC=function(){var l=!1,d,h,f,m,v,x;this.isInitialized=function(){return l;},this.init=function(w){d=new bC(),l=!0,x=w?w.isPartial:!1,d.on("data",function(L){L.startTime=L.startPts/m,L.endTime=L.endPts/m,v.captions.push(L),v.captionStreams[L.stream]=!0;}),d.on("log",function(L){v.logs.push(L);});},this.isNewInit=function(w,L){return w&&w.length===0||L&&typeof L=="object"&&Object.keys(L).length===0?!1:f!==w[0]||m!==L[f];},this.parse=function(w,L,O){var B;if(this.isInitialized()){if(!L||!O)return null;if(this.isNewInit(L,O))f=L[0],m=O[f];else if(f===null||!m)return h.push(w),null;}else return null;for(;h.length>0;){var H=h.shift();this.parse(H,L,O);}return B=DC(w,f,m),B&&B.logs&&(v.logs=v.logs.concat(B.logs)),B===null||!B.seiNals?v.logs.length?{logs:v.logs,captions:[],captionStreams:[]}:null:(this.pushNals(B.seiNals),this.flushStream(),v);},this.pushNals=function(w){if(!this.isInitialized()||!w||w.length===0)return null;w.forEach(function(L){d.push(L);});},this.flushStream=function(){if(!this.isInitialized())return null;x?d.partialFlush():d.flush();},this.clearParsedCaptions=function(){v.captions=[],v.captionStreams={},v.logs=[];},this.resetCaptionStream=function(){if(!this.isInitialized())return null;d.reset();},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream();},this.reset=function(){h=[],f=null,m=null,v?this.clearParsedCaptions():v={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream();},this.reset();},kC=IC;let{parseTfdt:PC}=og,Pn=ul,{getTimescaleFromMediaHeader:LC}=ha,{parseSamples:RC,getMdatTrafPairs:OC}=_g;var yg=function(){let l=9e4;this.init=function(d){let h=Pn(d,["moov","trak","mdia","mdhd"])[0];h&&(l=LC(h));},this.parseSegment=function(d){let h=[],f=OC(d),m=0;return f.forEach(function(v){let x=v.mdat,w=v.traf,L=Pn(w,["tfdt"])[0],O=Pn(w,["tfhd"])[0],B=Pn(w,["trun"]);if(L&&(m=PC(L).baseMediaDecodeTime),B.length&&O){let H=RC(B,m,O),K=0;H.forEach(function($){let re="utf-8",ce=new TextDecoder(re),lt=x.slice(K,K+$.size);if(Pn(lt,["vtte"])[0]){K+=$.size;return;}Pn(lt,["vttc"]).forEach(function(fa){let pa=Pn(fa,["payl"])[0],ma=Pn(fa,["sttg"])[0],ga=$.pts/l,pl=($.pts+$.duration)/l,qe,va;if(pa)try{qe=ce.decode(pa);}catch(Ii){console.error(Ii);}if(ma)try{va=ce.decode(ma);}catch(Ii){console.error(Ii);}$.duration&&qe&&h.push({cueText:qe,start:ga,end:pl,settings:va});}),K+=$.size;});}}),h;};},kc=Xo,bg=function(l){var d=l[1]&31;return d<<=8,d|=l[2],d;},hl=function(l){return!!(l[1]&64);},fl=function(l){var d=0;return(l[3]&48)>>>4>1&&(d+=l[4]+1),d;},NC=function(l,d){var h=bg(l);return h===0?"pat":h===d?"pmt":d?"pes":null;},jC=function(l){var d=hl(l),h=4+fl(l);return d&&(h+=l[h]+1),(l[h+10]&31)<<8|l[h+11];},MC=function(l){var d={},h=hl(l),f=4+fl(l);if(h&&(f+=l[f]+1),!!(l[f+5]&1)){var m,v,x;m=(l[f+1]&15)<<8|l[f+2],v=3+m-4,x=(l[f+10]&15)<<8|l[f+11];for(var w=12+x;w<v;){var L=f+w;d[(l[L+1]&31)<<8|l[L+2]]=l[L],w+=((l[L+3]&15)<<8|l[L+4])+5;}return d;}},BC=function(l,d){var h=bg(l),f=d[h];switch(f){case kc.H264_STREAM_TYPE:return"video";case kc.ADTS_STREAM_TYPE:return"audio";case kc.METADATA_STREAM_TYPE:return"timed-metadata";default:return null;}},FC=function(l){var d=hl(l);if(!d)return null;var h=4+fl(l);if(h>=l.byteLength)return null;var f=null,m;return m=l[h+7],m&192&&(f={},f.pts=(l[h+9]&14)<<27|(l[h+10]&255)<<20|(l[h+11]&254)<<12|(l[h+12]&255)<<5|(l[h+13]&254)>>>3,f.pts*=4,f.pts+=(l[h+13]&6)>>>1,f.dts=f.pts,m&64&&(f.dts=(l[h+14]&14)<<27|(l[h+15]&255)<<20|(l[h+16]&254)<<12|(l[h+17]&255)<<5|(l[h+18]&254)>>>3,f.dts*=4,f.dts+=(l[h+18]&6)>>>1)),f;},Pc=function(l){switch(l){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null;}},UC=function(l){for(var d=4+fl(l),h=l.subarray(d),f=0,m=0,v=!1,x;m<h.byteLength-3;m++)if(h[m+2]===1){f=m+5;break;}for(;f<h.byteLength;)switch(h[f]){case 0:if(h[f-1]!==0){f+=2;break;}else if(h[f-2]!==0){f++;break;}m+3!==f-2&&(x=Pc(h[m+3]&31),x==="slice_layer_without_partitioning_rbsp_idr"&&(v=!0));do f++;while(h[f]!==1&&f<h.length);m=f-2,f+=3;break;case 1:if(h[f-1]!==0||h[f-2]!==0){f+=3;break;}x=Pc(h[m+3]&31),x==="slice_layer_without_partitioning_rbsp_idr"&&(v=!0),m=f-2,f+=3;break;default:f+=3;break;}return h=h.subarray(m),f-=m,m=0,h&&h.byteLength>3&&(x=Pc(h[m+3]&31),x==="slice_layer_without_partitioning_rbsp_idr"&&(v=!0)),v;},VC={parseType:NC,parsePat:jC,parsePmt:MC,parsePayloadUnitStartIndicator:hl,parsePesType:BC,parsePesTime:FC,videoPacketContainsKeyFrame:UC},Tg=Xo,$r=Vm.handleRollover,xe={};xe.ts=VC,xe.aac=_c;var dr=Ve.ONE_SECOND_IN_TS,wt=188,Ui=71,qC=function(l,d){for(var h=0,f=wt,m,v;f<l.byteLength;){if(l[h]===Ui&&l[f]===Ui){switch(m=l.subarray(h,f),v=xe.ts.parseType(m,d.pid),v){case"pat":d.pid=xe.ts.parsePat(m);break;case"pmt":var x=xe.ts.parsePmt(m);d.table=d.table||{}
197,Object.keys(x).forEach(function(w){d.table[w]=x[w];});break;}h+=wt,f+=wt;continue;}h++,f++;}},Sg=function(l,d,h){for(var f=0,m=wt,v,x,w,L,O,B=!1;m<=l.byteLength;){if(l[f]===Ui&&(l[m]===Ui||m===l.byteLength)){switch(v=l.subarray(f,m),x=xe.ts.parseType(v,d.pid),x){case"pes":w=xe.ts.parsePesType(v,d.table),L=xe.ts.parsePayloadUnitStartIndicator(v),w==="audio"&&L&&(O=xe.ts.parsePesTime(v),O&&(O.type="audio",h.audio.push(O),B=!0));break;}if(B)break;f+=wt,m+=wt;continue;}f++,m++;}for(m=l.byteLength,f=m-wt,B=!1;f>=0;){if(l[f]===Ui&&(l[m]===Ui||m===l.byteLength)){switch(v=l.subarray(f,m),x=xe.ts.parseType(v,d.pid),x){case"pes":w=xe.ts.parsePesType(v,d.table),L=xe.ts.parsePayloadUnitStartIndicator(v),w==="audio"&&L&&(O=xe.ts.parsePesTime(v),O&&(O.type="audio",h.audio.push(O),B=!0));break;}if(B)break;f-=wt,m-=wt;continue;}f--,m--;}},HC=function(l,d,h){for(var f=0,m=wt,v,x,w,L,O,B,H,K,$=!1,re={data:[],size:0};m<l.byteLength;){if(l[f]===Ui&&l[m]===Ui){switch(v=l.subarray(f,m),x=xe.ts.parseType(v,d.pid),x){case"pes":if(w=xe.ts.parsePesType(v,d.table),L=xe.ts.parsePayloadUnitStartIndicator(v),w==="video"&&(L&&!$&&(O=xe.ts.parsePesTime(v),O&&(O.type="video",h.video.push(O),$=!0)),!h.firstKeyFrame)){if(L&&re.size!==0){for(B=new Uint8Array(re.size),H=0;re.data.length;)K=re.data.shift(),B.set(K,H),H+=K.byteLength;if(xe.ts.videoPacketContainsKeyFrame(B)){var ce=xe.ts.parsePesTime(B);ce?(h.firstKeyFrame=ce,h.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.");}re.size=0;}re.data.push(v),re.size+=v.byteLength;}break;}if($&&h.firstKeyFrame)break;f+=wt,m+=wt;continue;}f++,m++;}for(m=l.byteLength,f=m-wt,$=!1;f>=0;){if(l[f]===Ui&&l[m]===Ui){switch(v=l.subarray(f,m),x=xe.ts.parseType(v,d.pid),x){case"pes":w=xe.ts.parsePesType(v,d.table),L=xe.ts.parsePayloadUnitStartIndicator(v),w==="video"&&L&&(O=xe.ts.parsePesTime(v),O&&(O.type="video",h.video.push(O),$=!0));break;}if($)break;f-=wt,m-=wt;continue;}f--,m--;}},$C=function(l,d){if(l.audio&&l.audio.length){var h=d;(typeof h>"u"||isNaN(h))&&(h=l.audio[0].dts),l.audio.forEach(function(v){v.dts=$r(v.dts,h),v.pts=$r(v.pts,h),v.dtsTime=v.dts/dr,v.ptsTime=v.pts/dr;});}if(l.video&&l.video.length){var f=d;if((typeof f>"u"||isNaN(f))&&(f=l.video[0].dts),l.video.forEach(function(v){v.dts=$r(v.dts,f),v.pts=$r(v.pts,f),v.dtsTime=v.dts/dr,v.ptsTime=v.pts/dr;}),l.firstKeyFrame){var m=l.firstKeyFrame;m.dts=$r(m.dts,f),m.pts=$r(m.pts,f),m.dtsTime=m.dts/dr,m.ptsTime=m.pts/dr;}}},zC=function(l){for(var d=!1,h=0,f=null,m=null,v=0,x=0,w;l.length-x>=3;){var L=xe.aac.parseType(l,x);switch(L){case"timed-metadata":if(l.length-x<10){d=!0;break;}if(v=xe.aac.parseId3TagSize(l,x),v>l.length){d=!0;break;}m===null&&(w=l.subarray(x,x+v),m=xe.aac.parseAacTimestamp(w)),x+=v;break;case"audio":if(l.length-x<7){d=!0;break;}if(v=xe.aac.parseAdtsSize(l,x),v>l.length){d=!0;break;}f===null&&(w=l.subarray(x,x+v),f=xe.aac.parseSampleRate(w)),h++,x+=v;break;default:x++;break;}if(d)return null;}if(f===null||m===null)return null;var O=dr/f,B={audio:[{type:"audio",dts:m,pts:m},{type:"audio",dts:m+h*1024*O,pts:m+h*1024*O}]};return B;},GC=function(l){var d={pid:null,table:null},h={};qC(l,d);for(var f in d.table)if(d.table.hasOwnProperty(f)){var m=d.table[f];switch(m){case Tg.H264_STREAM_TYPE:h.video=[],HC(l,d,h),h.video.length===0&&delete h.video;break;case Tg.ADTS_STREAM_TYPE:h.audio=[],Sg(l,d,h),h.audio.length===0&&delete h.audio;break;}}return h;},WC=function(l,d){var h=xe.aac.isLikelyAacData(l),f;return h?f=zC(l):f=GC(l),!f||!f.audio&&!f.video?null:($C(f,d),f);},YC={inspect:WC,parseAudioPes_:Sg};let XC=function(l,d){d.on("data",function(h){let f=h.initSegment;h.initSegment={data:f.buffer,byteOffset:f.byteOffset,byteLength:f.byteLength};let m=h.data;h.data=m.buffer,l.postMessage({action:"data",segment:h,byteOffset:m.byteOffset,byteLength:m.byteLength},[h.data]);}),d.on("done",function(h){l.postMessage({action:"done"});}),d.on("gopInfo",function(h){l.postMessage({action:"gopInfo",gopInfo:h});}),d.on("videoSegmentTimingInfo",function(h){let f={start:{decode:Ve.videoTsToSeconds(h.start.dts),presentation:Ve.videoTsToSeconds(h.start.pts)},end:{decode:Ve.videoTsToSeconds(h.end.dts),presentation:Ve.videoTsToSeconds(h.end.pts)},baseMediaDecodeTime:Ve.videoTsToSeconds(h.baseMediaDecodeTime)};
197h.prependedContentDuration&&(f.prependedContentDuration=Ve.videoTsToSeconds(h.prependedContentDuration)),l.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:f});}),d.on("audioSegmentTimingInfo",function(h){let f={start:{decode:Ve.videoTsToSeconds(h.start.dts),presentation:Ve.videoTsToSeconds(h.start.pts)},end:{decode:Ve.videoTsToSeconds(h.end.dts),presentation:Ve.videoTsToSeconds(h.end.pts)},baseMediaDecodeTime:Ve.videoTsToSeconds(h.baseMediaDecodeTime)};h.prependedContentDuration&&(f.prependedContentDuration=Ve.videoTsToSeconds(h.prependedContentDuration)),l.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:f});}),d.on("id3Frame",function(h){l.postMessage({action:"id3Frame",id3Frame:h});}),d.on("caption",function(h){l.postMessage({action:"caption",caption:h});}),d.on("trackinfo",function(h){l.postMessage({action:"trackinfo",trackInfo:h});}),d.on("audioTimingInfo",function(h){l.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Ve.videoTsToSeconds(h.start),end:Ve.videoTsToSeconds(h.end)}});}),d.on("videoTimingInfo",function(h){l.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Ve.videoTsToSeconds(h.start),end:Ve.videoTsToSeconds(h.end)}});}),d.on("log",function(h){l.postMessage({action:"log",log:h});});};class Ag{constructor(d,h){this.options=h||{},this.self=d,this.init();}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new U2.Transmuxer(this.options),XC(this.self,this.transmuxer);}pushMp4Captions(d){this.captionParser||(this.captionParser=new kC(),this.captionParser.init());let h=new Uint8Array(d.data,d.byteOffset,d.byteLength),f=this.captionParser.parse(h,d.trackIds,d.timescales);this.self.postMessage({action:"mp4Captions",captions:f&&f.captions||[],logs:f&&f.logs||[],data:h.buffer},[h.buffer]);}initMp4WebVttParser(d){this.webVttParser||(this.webVttParser=new yg());let h=new Uint8Array(d.data,d.byteOffset,d.byteLength);this.webVttParser.init(h);}getMp4WebVttText(d){this.webVttParser||(this.webVttParser=new yg());let h=new Uint8Array(d.data,d.byteOffset,d.byteLength),f=this.webVttParser.parseSegment(h);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:f||[],data:h.buffer},[h.buffer]);}probeMp4StartTime({timescales:d,data:h}){let f=ha.startTime(d,h);this.self.postMessage({action:"probeMp4StartTime",startTime:f,data:h},[h.buffer]);}probeMp4Tracks({data:d}){let h=ha.tracks(d);this.self.postMessage({action:"probeMp4Tracks",tracks:h,data:d},[d.buffer]);}probeEmsgID3({data:d,offset:h}){let f=ha.getEmsgID3(d,h);this.self.postMessage({action:"probeEmsgID3",id3Frames:f,emsgData:d},[d.buffer]);}probeTs({data:d,baseStartTime:h}){let f=typeof h=="number"&&!isNaN(h)?h*Ve.ONE_SECOND_IN_TS:void 0,m=YC.inspect(d,f),v=null;m&&(v={hasVideo:m.video&&m.video.length===2||!1,hasAudio:m.audio&&m.audio.length===2||!1},v.hasVideo&&(v.videoStart=m.video[0].ptsTime),v.hasAudio&&(v.audioStart=m.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:v,data:d},[d.buffer]);}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions();}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions();}push(d){let h=new Uint8Array(d.data,d.byteOffset,d.byteLength);this.transmuxer.push(h);}reset(){this.transmuxer.reset();}setTimestampOffset(d){let h=d.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(Ve.secondsToVideoTs(h)));}setAudioAppendStart(d){this.transmuxer.setAudioAppendStart(Math.ceil(Ve.secondsToVideoTs(d.appendStart)));}setRemux(d){this.transmuxer.setRemux(d.remux);}flush(d){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"});}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"});}alignGopsWith(d){this.transmuxer.alignGopsWith(d.gopsToAlignWith.slice());}}self.onmessage=function(l){if(l.data.action==="init"&&l.data.options){this.messageHandlers=new Ag(self,l.data.options);return;}this.messageHandlers||(this.messageHandlers=new Ag(self)),l.data&&l.data.action&&l.data.action!=="init"&&this.messageHandlers[l.data.action]&&this.messageHandlers[l.data.action](l.data);};}
197)),hL=jT(cL),fL=(t,e,i)=>{let{type:n,initSegment:r,captions:s,captionStreams:a,metadata:o,videoFrameDtsTime:u,videoFramePtsTime:c}=t.data.segment;e.buffer.push({captions:s,captionStreams:a,metadata:o});let p=t.data.segment.boxes||{data:t.data.segment.data},_={type:n,data:new Uint8Array(p.data,p.data.byteOffset,p.data.byteLength),initSegment:new Uint8Array(r.data,r.byteOffset,r.byteLength)};typeof u<"u"&&(_.videoFrameDtsTime=u),typeof c<"u"&&(_.videoFramePtsTime=c),i(_);},pL=({transmuxedData:t,callback:e})=>{t.buffer=[],e(t);},mL=(t,e)=>{e.gopInfo=t.data.gopInfo;},FT=t=>{let{transmuxer:e,bytes:i,audioAppendStart:n,gopsToAlignWith:r,remux:s,onData:a,onTrackInfo:o,onAudioTimingInfo:u,onVideoTimingInfo:c,onVideoSegmentTimingInfo:p,onAudioSegmentTimingInfo:_,onId3:T,onCaptions:y,onDone:b,onEndedTimeline:g,onTransmuxerLog:E,isEndOfTimeline:S,segment:P,triggerSegmentEventFn:D}=t,A={buffer:[]},C=S,R=M=>{e.currentTransmux===t&&(M.data.action==="data"&&fL(M,A,a),M.data.action==="trackinfo"&&o(M.data.trackInfo),M.data.action==="gopInfo"&&mL(M,A),M.data.action==="audioTimingInfo"&&u(M.data.audioTimingInfo),M.data.action==="videoTimingInfo"&&c(M.data.videoTimingInfo),M.data.action==="videoSegmentTimingInfo"&&p(M.data.videoSegmentTimingInfo),M.data.action==="audioSegmentTimingInfo"&&_(M.data.audioSegmentTimingInfo),M.data.action==="id3Frame"&&T([M.data.id3Frame],M.data.id3Frame.dispatchType),M.data.action==="caption"&&y(M.data.caption),M.data.action==="endedtimeline"&&(C=!1,g()),M.data.action==="log"&&E(M.data.log),M.data.type==="transmuxed"&&(C||(e.onmessage=null,pL({transmuxedData:A,callback:b}),UT(e))));},I=()=>{let M={message:"Received an error message from the transmuxer worker",metadata:{errorType:N.Error.StreamingFailedToTransmuxSegment,segmentInfo:Ar({segment:P})}};b(null,M);};if(e.onmessage=R,e.onerror=I,n&&e.postMessage({action:"setAudioAppendStart",appendStart:n}),Array.isArray(r)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),typeof s<"u"&&e.postMessage({action:"setRemux",remux:s}),i.byteLength){let M=i instanceof ArrayBuffer?i:i.buffer,F=i instanceof ArrayBuffer?0:i.byteOffset;D({type:"segmenttransmuxingstart",segment:P}),e.postMessage({action:"push",data:M,byteOffset:F,byteLength:i.byteLength},[M]);}S&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"});},UT=t=>{t.currentTransmux=null,t.transmuxQueue.length&&(t.currentTransmux=t.transmuxQueue.shift(),typeof t.currentTransmux=="function"?t.currentTransmux():FT(t.currentTransmux));},sb=(t,e)=>{t.postMessage({action:e}),UT(t);},VT=(t,e)=>{if(!e.currentTransmux){e.currentTransmux=t,sb(e,t);return;}e.transmuxQueue.push(sb.bind(null,e,t));},gL=t=>{VT("reset",t);},vL=t=>{VT("endTimeline",t);},qT=t=>{if(!t.transmuxer.currentTransmux){t.transmuxer.currentTransmux=t,FT(t);return;}t.transmuxer.transmuxQueue.push(t);},_L=t=>{let e=new hL();e.currentTransmux=null,e.transmuxQueue=[];let i=e.terminate;return e.terminate=()=>(e.currentTransmux=null,e.transmuxQueue.length=0,i.call(e)),e.postMessage({action:"init",options:t}),e;},uf={reset:gL,endTimeline:vL,transmux:qT,createTransmuxer:_L},Is=function(t){let e=t.transmuxer,i=t.endAction||t.action,n=t.callback,r=Ge({},t,{endAction:null,transmuxer:null,callback:null}),s=a=>{a.data.action===i&&(e.removeEventListener("message",s),a.data.data&&(a.data.data=new Uint8Array(a.data.data,t.byteOffset||0,t.byteLength||a.data.data.byteLength),t.data&&(t.data=a.data.data)),n(a.data));};if(e.addEventListener("message",s),t.data){let a=t.data instanceof ArrayBuffer;r.byteOffset=a?0:t.data.byteOffset,r.byteLength=t.data.byteLength;let o=[a?t.data:t.data.buffer];e.postMessage(r,o);}else e.postMessage(r);},Qi={FAILURE:2,TIMEOUT:-101,ABORTED:-102},HT="wvtt",Yf=t=>{t.forEach(e=>{e.abort();});},yL=t=>({bandwidth:t.bandwidth,bytesReceived:t.bytesReceived||0,roundTripTime:t.roundTripTime||0}),bL=t=>{let e=t.target,n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return n.bytesReceived=t.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n;},Sp=(t,e)=>{let{requestType:i}=e,n=wr({requestType:i,request:e,error:t});return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:Qi.TIMEOUT,xhr:e,metadata:n}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:Qi.ABORTED,xhr:e,metadata:n}:t?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:Qi.FAILURE,xhr:e,metadata:n}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:Qi.FAILURE,xhr:e,metadata:n}:null;},ab=(t,e,i,n)=>(r,s)=>{let a=s.response,o=Sp(r,s);if(o)return i(o,t);
197if(a.byteLength!==16)return i({status:s.status,message:"Invalid HLS key at URL: "+s.uri,code:Qi.FAILURE,xhr:s},t);let u=new DataView(a),c=new Uint32Array([u.getUint32(0),u.getUint32(4),u.getUint32(8),u.getUint32(12)]);for(let _=0;_<e.length;_++)e[_].bytes=c;let p={uri:s.uri};return n({type:"segmentkeyloadcomplete",segment:t,keyInfo:p}),i(null,t);},TL=(t,e)=>{e===HT&&t.transmuxer.postMessage({action:"initMp4WebVttParser",data:t.map.bytes});},SL=(t,e,i)=>{e===HT&&Is({action:"getMp4WebVttText",data:t.bytes,transmuxer:t.transmuxer,callback:({data:n,mp4VttCues:r})=>{t.bytes=n,i(null,t,{mp4VttCues:r});}});},$T=(t,e)=>{let i=pu(t.map.bytes);if(i!=="mp4"){let n=t.map.resolvedUri||t.map.uri,r=i||"unknown";return e({internal:!0,message:`Found unsupported ${r} container for initialization segment at URL: ${n}`,code:Qi.FAILURE,metadata:{mediaType:r}});}Is({action:"probeMp4Tracks",data:t.map.bytes,transmuxer:t.transmuxer,callback:({tracks:n,data:r})=>(t.map.bytes=r,n.forEach(function(s){t.map.tracks=t.map.tracks||{},!t.map.tracks[s.type]&&(t.map.tracks[s.type]=s,typeof s.id=="number"&&s.timescale&&(t.map.timescales=t.map.timescales||{},t.map.timescales[s.id]=s.timescale),s.type==="text"&&TL(t,s.codec));}),e(null))});},AL=({segment:t,finishProcessingFn:e,triggerSegmentEventFn:i})=>(n,r)=>{let s=Sp(n,r);if(s)return e(s,t);let a=new Uint8Array(r.response);if(i({type:"segmentloaded",segment:t}),t.map.key)return t.map.encryptedBytes=a,e(null,t);t.map.bytes=a,$T(t,function(o){if(o)return o.xhr=r,o.status=r.status,e(o,t);e(null,t);});},EL=({segment:t,finishProcessingFn:e,responseType:i,triggerSegmentEventFn:n})=>(r,s)=>{let a=Sp(r,s);if(a)return e(a,t);n({type:"segmentloaded",segment:t});let o=i==="arraybuffer"||!s.responseText?s.response:uL(s.responseText.substring(t.lastReachedChar||0));return t.stats=yL(s),t.key?t.encryptedBytes=new Uint8Array(o):t.bytes=new Uint8Array(o),e(null,t);},xL=({segment:t,bytes:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:u,endedTimelineFn:c,dataFn:p,doneFn:_,onTransmuxerLog:T,triggerSegmentEventFn:y})=>{let b=t.map&&t.map.tracks||{},g=!!(b.audio&&b.video),E=n.bind(null,t,"audio","start"),S=n.bind(null,t,"audio","end"),P=n.bind(null,t,"video","start"),D=n.bind(null,t,"video","end"),A=()=>qT({bytes:e,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,remux:g,onData:C=>{C.type=C.type==="combined"?"video":C.type,p(t,C);},onTrackInfo:C=>{i&&(g&&(C.isMuxed=!0),i(t,C));},onAudioTimingInfo:C=>{E&&typeof C.start<"u"&&(E(C.start),E=null),S&&typeof C.end<"u"&&S(C.end);},onVideoTimingInfo:C=>{P&&typeof C.start<"u"&&(P(C.start),P=null),D&&typeof C.end<"u"&&D(C.end);},onVideoSegmentTimingInfo:C=>{let R={pts:{start:C.start.presentation,end:C.end.presentation},dts:{start:C.start.decode,end:C.end.decode}};y({type:"segmenttransmuxingtiminginfoavailable",segment:t,timingInfo:R}),r(C);},onAudioSegmentTimingInfo:C=>{let R={pts:{start:C.start.pts,end:C.end.pts},dts:{start:C.start.dts,end:C.end.dts}};y({type:"segmenttransmuxingtiminginfoavailable",segment:t,timingInfo:R}),s(C);},onId3:(C,R)=>{a(t,C,R);},onCaptions:C=>{o(t,[C]);},isEndOfTimeline:u,onEndedTimeline:()=>{c();},onTransmuxerLog:T,onDone:(C,R)=>{_&&(C.type=C.type==="combined"?"video":C.type,y({type:"segmenttransmuxingcomplete",segment:t}),_(R,t,C));},segment:t,triggerSegmentEventFn:y});Is({action:"probeTs",transmuxer:t.transmuxer,data:e,baseStartTime:t.baseStartTime,callback:C=>{t.bytes=e=C.data;let R=C.result;R&&(i(t,{hasAudio:R.hasAudio,hasVideo:R.hasVideo,isMuxed:g}),i=null),A();}});},zT=({segment:t,bytes:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:u,endedTimelineFn:c,dataFn:p,doneFn:_,onTransmuxerLog:T,triggerSegmentEventFn:y})=>{let b=new Uint8Array(e);if(Sy(b)){t.isFmp4=!0;let{tracks:g}=t.map;if(g.text&&(!g.audio||!g.video)){p(t,{data:b,type:"text"}),SL(t,g.text.codec,_);return;}let S={isFmp4:!0,hasVideo:!!g.video,hasAudio:!!g.audio};g.audio&&g.audio.codec&&g.audio.codec!=="enca"&&(S.audioCodec=g.audio.codec),g.video&&g.video.codec&&g.video.codec!=="encv"&&(S.videoCodec=g.video.codec),g.video&&g.audio&&(S.isMuxed=!0),i(t,S);let P=(D,A)=>{p(t,{data:b,type:S.hasAudio&&!S.isMuxed?"audio":"video"}),A&&A.length&&a(t,A),D&&D.length&&o(t,D),_(null,t,{});};Is({action:"probeMp4StartTime",timescales:t.map.timescales,data:b,transmuxer:t.transmuxer,callback:({data:D,startTime:A})=>{e=D.buffer,t.bytes=b=D,S.hasAudio&&!S.isMuxed&&n(t,"audio","start",A),S.hasVideo&&n(t,"video","start",A),Is({action:"probeEmsgID3",data:b,transmuxer:t.transmuxer,offset:A,callback:({emsgData:C,id3Frames:R})=>{if(e=C.buffer,t.bytes=b=C,!g.video||!C.byteLength||!t.transmuxer){P(void 0,R);return;}Is({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:b,timescales:t.map.timescales,trackIds:[g.video.id],callback:I=>
197{e=I.data.buffer,t.bytes=b=I.data,I.logs.forEach(function(M){T(Ae(M,{stream:"mp4CaptionParser"}));}),P(I.captions,R);}});}});}});return;}if(!t.transmuxer){_(null,t,{});return;}if(typeof t.container>"u"&&(t.container=pu(b)),t.container!=="ts"&&t.container!=="aac"){i(t,{hasAudio:!1,hasVideo:!1}),_(null,t,{});return;}xL({segment:t,bytes:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:u,endedTimelineFn:c,dataFn:p,doneFn:_,onTransmuxerLog:T,triggerSegmentEventFn:y});},GT=function({id:t,key:e,encryptedBytes:i,decryptionWorker:n,segment:r,doneFn:s},a){let o=c=>{if(c.data.source===t){n.removeEventListener("message",o);let p=c.data.decrypted;a(new Uint8Array(p.bytes,p.byteOffset,p.byteLength));}};n.onerror=()=>{let c="An error occurred in the decryption worker",p=Ar({segment:r}),_={message:c,metadata:{error:new Error(c),errorType:N.Error.StreamingFailedToDecryptSegment,segmentInfo:p,keyInfo:{uri:r.key.resolvedUri||r.map.key.resolvedUri}}};s(_,r);},n.addEventListener("message",o);let u;e.bytes.slice?u=e.bytes.slice():u=new Uint32Array(Array.prototype.slice.call(e.bytes)),n.postMessage(kT({source:t,encrypted:i,key:u,iv:e.iv}),[i.buffer,u.buffer]);},CL=({decryptionWorker:t,segment:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:u,endedTimelineFn:c,dataFn:p,doneFn:_,onTransmuxerLog:T,triggerSegmentEventFn:y})=>{y({type:"segmentdecryptionstart"}),GT({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:t,segment:e,doneFn:_},b=>{e.bytes=b,y({type:"segmentdecryptioncomplete",segment:e}),zT({segment:e,bytes:e.bytes,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:u,endedTimelineFn:c,dataFn:p,doneFn:_,onTransmuxerLog:T,triggerSegmentEventFn:y});});},wL=({activeXhrs:t,decryptionWorker:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:u,endedTimelineFn:c,dataFn:p,doneFn:_,onTransmuxerLog:T,triggerSegmentEventFn:y})=>{let b=0,g=!1;return(E,S)=>{if(!g){if(E)return g=!0,Yf(t),_(E,S);if(b+=1,b===t.length){let P=function(){if(S.encryptedBytes)return CL({decryptionWorker:e,segment:S,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:u,endedTimelineFn:c,dataFn:p,doneFn:_,onTransmuxerLog:T,triggerSegmentEventFn:y});zT({segment:S,bytes:S.bytes,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:u,endedTimelineFn:c,dataFn:p,doneFn:_,onTransmuxerLog:T,triggerSegmentEventFn:y});};if(S.endOfAllRequests=Date.now(),S.map&&S.map.encryptedBytes&&!S.map.bytes)return y({type:"segmentdecryptionstart",segment:S}),GT({decryptionWorker:e,id:S.requestId+"-init",encryptedBytes:S.map.encryptedBytes,key:S.map.key,segment:S,doneFn:_},D=>{S.map.bytes=D,y({type:"segmentdecryptioncomplete",segment:S}),$T(S,A=>{if(A)return Yf(t),_(A,S);P();});});P();}}};},DL=({loadendState:t,abortFn:e})=>i=>{i.target.aborted&&e&&!t.calledAbortFn&&(e(),t.calledAbortFn=!0);},IL=({segment:t,progressFn:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:a,captionsFn:o,isEndOfTimeline:u,endedTimelineFn:c,dataFn:p})=>_=>{if(!_.target.aborted)return t.stats=Ae(t.stats,bL(_)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),e(_,t);},kL=({xhr:t,xhrOptions:e,decryptionWorker:i,segment:n,abortFn:r,progressFn:s,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:u,audioSegmentTimingInfoFn:c,id3Fn:p,captionsFn:_,isEndOfTimeline:T,endedTimelineFn:y,dataFn:b,doneFn:g,onTransmuxerLog:E,triggerSegmentEventFn:S})=>{let P=[],D=wL({activeXhrs:P,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:u,audioSegmentTimingInfoFn:c,id3Fn:p,captionsFn:_,isEndOfTimeline:T,endedTimelineFn:y,dataFn:b,doneFn:g,onTransmuxerLog:E,triggerSegmentEventFn:S});if(n.key&&!n.key.bytes){let M=[n.key];n.map&&!n.map.bytes&&n.map.key&&n.map.key.resolvedUri===n.key.resolvedUri&&M.push(n.map.
197key);let F=Ae(e,{uri:n.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),U=ab(n,M,D,S),k={uri:n.key.resolvedUri};S({type:"segmentkeyloadstart",segment:n,keyInfo:k});let G=t(F,U);P.push(G);}if(n.map&&!n.map.bytes){if(n.map.key&&(!n.key||n.key.resolvedUri!==n.map.key.resolvedUri)){let G=Ae(e,{uri:n.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),V=ab(n,[n.map.key],D,S),Y={uri:n.map.key.resolvedUri};S({type:"segmentkeyloadstart",segment:n,keyInfo:Y});let ae=t(G,V);P.push(ae);}let F=Ae(e,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:Wf(n.map),requestType:"segment-media-initialization"}),U=AL({segment:n,finishProcessingFn:D,triggerSegmentEventFn:S});S({type:"segmentloadstart",segment:n});let k=t(F,U);P.push(k);}let A=Ae(e,{uri:n.part&&n.part.resolvedUri||n.resolvedUri,responseType:"arraybuffer",headers:Wf(n),requestType:"segment"}),C=EL({segment:n,finishProcessingFn:D,responseType:A.responseType,triggerSegmentEventFn:S});S({type:"segmentloadstart",segment:n});let R=t(A,C);R.addEventListener("progress",IL({segment:n,progressFn:s,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:u,audioSegmentTimingInfoFn:c,id3Fn:p,captionsFn:_,isEndOfTimeline:T,endedTimelineFn:y,dataFn:b})),P.push(R);let I={};return P.forEach(M=>{M.addEventListener("loadend",DL({loadendState:I,abortFn:r}));}),()=>Yf(P);},yu=yi("PlaylistSelector"),ob=function(t){if(!t||!t.playlist)return;let e=t.playlist;return JSON.stringify({id:e.id,bandwidth:t.bandwidth,width:t.width,height:t.height,codecs:e.attributes&&e.attributes.CODECS||""});},ks=function(t,e){if(!t)return"";let i=j.default.getComputedStyle(t);return i?i[e]:"";},Ps=function(t,e){let i=t.slice();t.sort(function(n,r){let s=e(n,r);return s===0?i.indexOf(n)-i.indexOf(r):s;});},Ap=function(t,e){let i,n;return t.attributes.BANDWIDTH&&(i=t.attributes.BANDWIDTH),i=i||j.default.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||j.default.Number.MAX_VALUE,i-n;},PL=function(t,e){let i,n;return t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(i=t.attributes.RESOLUTION.width),i=i||j.default.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||j.default.Number.MAX_VALUE,i===n&&t.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?t.attributes.BANDWIDTH-e.attributes.BANDWIDTH:i-n;},WT=function(t){let{main:e,bandwidth:i,playerWidth:n,playerHeight:r,playerObjectFit:s,limitRenditionByPlayerDimensions:a,playlistController:o}=t;if(!e)return;let u={bandwidth:i,width:n,height:r,limitRenditionByPlayerDimensions:a},c=e.playlists;Zt.isAudioOnly(e)&&(c=o.getAudioTrackPlaylists_(),u.audioOnly=!0);let p=c.map(I=>{let M,F=I.attributes&&I.attributes.RESOLUTION&&I.attributes.RESOLUTION.width,U=I.attributes&&I.attributes.RESOLUTION&&I.attributes.RESOLUTION.height;return M=I.attributes&&I.attributes.BANDWIDTH,M=M||j.default.Number.MAX_VALUE,{bandwidth:M,width:F,height:U,playlist:I};});Ps(p,(I,M)=>I.bandwidth-M.bandwidth),p=p.filter(I=>!Zt.isIncompatible(I.playlist));let _=p.filter(I=>Zt.isEnabled(I.playlist));_.length||(_=p.filter(I=>!Zt.isDisabled(I.playlist)));let T=_.filter(I=>I.bandwidth*pt.BANDWIDTH_VARIANCE<i),y=T[T.length-1],b=T.filter(I=>I.bandwidth===y.bandwidth)[0];if(a===!1){let I=b||_[0]||p[0];if(I&&I.playlist){let M="sortedPlaylistReps";return b&&(M="bandwidthBestRep"),_[0]&&(M="enabledPlaylistReps"),yu(`choosing ${ob(I)} using ${M} with options`,u),I.playlist;}return yu("could not choose a playlist with options",u),null;}let g=T.filter(I=>I.width&&I.height);Ps(g,(I,M)=>I.width-M.width);let E=g.filter(I=>I.width===n&&I.height===r);y=E[E.length-1];let S=E.filter(I=>I.bandwidth===y.bandwidth)[0],P,D,A;S||(P=g.filter(I=>s==="cover"?I.width>n&&I.height>r:I.width>n||I.height>r),D=P.filter(I=>I.width===P[0].width&&I.height===P[0].height),y=D[D.length-1],A=D.filter(I=>I.bandwidth===y.bandwidth)[0]);let C;if(o.leastPixelDiffSelector){let I=g.map(M=>(M.pixelDiff=Math.abs(M.width-n)+Math.abs(M.height-r),M));Ps(I,(M,F)=>M.pixelDiff===F.pixelDiff?F.bandwidth-M.bandwidth:M.pixelDiff-F.pixelDiff),C=I[0];}let R=C||A||S||b||_[0]||p[0];if(R&&R.playlist){let I="sortedPlaylistReps";return C?I="leastPixelDiffRep":A?I="resolutionPlusOneRep":S?I="resolutionBestRep":b?I="bandwidthBestRep":_[0]&&(I="enabledPlaylistReps"),yu(`choosing ${ob(R)} using ${I} with options`,u),R.playlist;}return yu("could not choose a playlist with options",u),null;},lb=function(){let t=this.useDevicePixelRatio&&j.default.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(t=this.customPixelRatio),WT({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(ks(this.tech_.el(),"width"),10)*t,playerHe
197ight:parseInt(ks(this.tech_.el(),"height"),10)*t,playerObjectFit:this.usePlayerObjectFit?ks(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_});},LL=function(t){let e=-1,i=-1;if(t<0||t>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let n=this.useDevicePixelRatio&&j.default.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(n=this.customPixelRatio),e<0&&(e=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(e=t*this.systemBandwidth+(1-t)*e,i=this.systemBandwidth),WT({main:this.playlists.main,bandwidth:e,playerWidth:parseInt(ks(this.tech_.el(),"width"),10)*n,playerHeight:parseInt(ks(this.tech_.el(),"height"),10)*n,playerObjectFit:this.usePlayerObjectFit?ks(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_});};},RL=function(t){let{main:e,currentTime:i,bandwidth:n,duration:r,segmentDuration:s,timeUntilRebuffer:a,currentTimeline:o,syncController:u}=t,c=e.playlists.filter(b=>!Zt.isIncompatible(b)),p=c.filter(Zt.isEnabled);p.length||(p=c.filter(b=>!Zt.isDisabled(b)));let T=p.filter(Zt.hasAttribute.bind(null,"BANDWIDTH")).map(b=>{let E=u.getSyncPoint(b,r,o,i)?1:2,P=Zt.estimateSegmentRequestTime(s,n,b)*E-a;return{playlist:b,rebufferingImpact:P};}),y=T.filter(b=>b.rebufferingImpact<=0);return Ps(y,(b,g)=>Ap(g.playlist,b.playlist)),y.length?y[0]:(Ps(T,(b,g)=>b.rebufferingImpact-g.rebufferingImpact),T[0]||null);},OL=function(){let t=this.playlists.main.playlists.filter(Zt.isEnabled);return Ps(t,(i,n)=>Ap(i,n)),t.filter(i=>!!Ja(this.playlists.main,i).video)[0]||null;},NL=t=>{let e=0,i;return t.bytes&&(i=new Uint8Array(t.bytes),t.segments.forEach(n=>{i.set(n,e),e+=n.byteLength;})),i;};jL=function(t,e,i){if(!t[i]){e.trigger({type:"usage",name:"vhs-608"});let n=i;/^cc708_/.test(i)&&(n="SERVICE"+i.split("_")[1]);let r=e.textTracks().getTrackById(n);if(r)t[i]=r;else{let s=e.options_.vhs&&e.options_.vhs.captionServices||{},a=i,o=i,u=!1,c=s[n];c&&(a=c.label,o=c.language,u=c.default),t[i]=e.addRemoteTextTrack({kind:"captions",id:n,default:u,label:a,language:o},!1).track;}}},ML=function({inbandTextTracks:t,captionArray:e,timestampOffset:i}){if(!e)return;let n=j.default.WebKitDataCue||j.default.VTTCue;e.forEach(r=>{let s=r.stream;r.content?r.content.forEach(a=>{let o=new n(r.startTime+i,r.endTime+i,a.text);o.line=a.line,o.align="left",o.position=a.position,o.positionAlign="line-left",t[s].addCue(o);}):t[s].addCue(new n(r.startTime+i,r.endTime+i,r.text));});},BL=function(t){Object.defineProperties(t.frame,{id:{get(){return N.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),t.value.key;}},value:{get(){return N.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),t.value.data;}},privateData:{get(){return N.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),t.value.data;}}});},FL=({inbandTextTracks:t,metadataArray:e,timestampOffset:i,videoDuration:n})=>{if(!e)return;let r=j.default.WebKitDataCue||j.default.VTTCue,s=t.metadataTrack_;if(!s||(e.forEach(p=>{let _=p.cueTime+i;typeof _!="number"||j.default.isNaN(_)||_<0||!(_<1/0)||!p.frames||!p.frames.length||p.frames.forEach(T=>{let y=new r(_,_,T.value||T.url||T.data||"");y.frame=T,y.value=T,BL(y),s.addCue(y);});}),!s.cues||!s.cues.length))return;let a=s.cues,o=[];for(let p=0;p<a.length;p++)a[p]&&o.push(a[p]);let u=o.reduce((p,_)=>{let T=p[_.startTime]||[];return T.push(_),p[_.startTime]=T,p;},{}),c=Object.keys(u).sort((p,_)=>Number(p)-Number(_));c.forEach((p,_)=>{let T=u[p],y=isFinite(n)?n:p,b=Number(c[_+1])||y;T.forEach(g=>{g.endTime=b;});});},UL={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},VL=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),qL=({inbandTextTracks:t,dateRanges:e})=>{let i=t.metadataTrack_;if(!i)return;let n=j.default.WebKitDataCue||j.default.VTTCue;e.forEach(r=>{for(let s of Object.keys(r)){if(VL.has(s))continue;let a=new n(r.startTime,r.endTime,"");a.id=r.id,a.type="com.apple.quicktime.HLS",a.value={key:UL[s],data:r[s]},(s==="scte35Out"||s==="scte35In")&&(a.value.data=new Uint8Array(a.value.data.match(/[\da-f]{2}/gi)).buffer),i.addCue(a);}r.processDateRange();});},ub=(t,e,i)=>{t.metadataTrack_||(t.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,N.browser.IS_ANY_SAFARI||(t.metadataTrack_.inBandMetadataTrackDispatchType=e));}
197,Wa=function(t,e,i){let n,r;if(i&&i.cues)for(n=i.cues.length;n--;)r=i.cues[n],r.startTime>=t&&r.endTime<=e&&i.removeCue(r);},HL=function(t){let e=t.cues;if(!e)return;let i={};for(let n=e.length-1;n>=0;n--){let r=e[n],s=`${r.startTime}-${r.endTime}-${r.text}`;i[s]?t.removeCue(r):i[s]=r;}},$L=(t,e,i)=>{if(typeof e>"u"||e===null||!t.length)return[];let n=Math.ceil((e-i+3)*Qn.ONE_SECOND_IN_TS),r;for(r=0;r<t.length&&!(t[r].pts>n);r++);return t.slice(r);},zL=(t,e,i)=>{if(!e.length)return t;if(i)return e.slice();let n=e[0].pts,r=0;for(r;r<t.length&&!(t[r].pts>=n);r++);return t.slice(0,r).concat(e);},GL=(t,e,i,n)=>{let r=Math.ceil((e-n)*Qn.ONE_SECOND_IN_TS),s=Math.ceil((i-n)*Qn.ONE_SECOND_IN_TS),a=t.slice(),o=t.length;for(;o--&&!(t[o].pts<=s););if(o===-1)return a;let u=o+1;for(;u--&&!(t[u].pts<=r););return u=Math.max(u,0),a.splice(u,o-u+1),a;},WL=function(t,e){if(!t&&!e||!t&&e||t&&!e)return!1;if(t===e)return!0;let i=Object.keys(t).sort(),n=Object.keys(e).sort();if(i.length!==n.length)return!1;for(let r=0;r<i.length;r++){let s=i[r];if(s!==n[r]||t[s]!==e[s])return!1;}return!0;},YL=function(t,e,i){e=e||[];let n=[],r=0;for(let s=0;s<e.length;s++){let a=e[s];if(t===a.timeline&&(n.push(s),r+=a.duration,r>i))return s;}return n.length===0?0:n[n.length-1];},za=1,XL=500,db=t=>typeof t=="number"&&isFinite(t),bu=1/60,KL=(t,e,i)=>t!=="main"||!e||!i?null:!i.hasAudio&&!i.hasVideo?"Neither audio nor video found in segment.":e.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!e.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null,QL=(t,e,i)=>{let n=e-pt.BACK_BUFFER_LENGTH;t.length&&(n=Math.max(n,t.start(0)));let r=e-i;return Math.min(r,n);},Ts=t=>{let{startOfSegment:e,duration:i,segment:n,part:r,playlist:{mediaSequence:s,id:a,segments:o=[]},mediaIndex:u,partIndex:c,timeline:p}=t,_=o.length-1,T="mediaIndex/partIndex increment";t.getMediaInfoForTime?T=`getMediaInfoForTime (${t.getMediaInfoForTime})`:t.isSyncRequest&&(T="getSyncSegmentCandidate (isSyncRequest)"),t.independent&&(T+=` with independent ${t.independent}`);let y=typeof c=="number",b=t.segment.uri?"segment":"pre-segment",g=y?hT({preloadSegment:n})-1:0;return`${b} [${s+u}/${s+_}]`+(y?` part [${c}/${g}]`:"")+` segment start/end [${n.start} => ${n.end}]`+(y?` part start/end [${r.start} => ${r.end}]`:"")+` startOfSegment [${e}] duration [${i}] timeline [${p}] selected by [${T}] playlist [${a}]`;},cb=t=>`${t}TimingInfo`,JL=({segmentTimeline:t,currentTimeline:e,startOfSegment:i,buffered:n,overrideCheck:r})=>!r&&t===e?null:t<e?i:n.length?n.end(n.length-1):i,Xf=({timelineChangeController:t,currentTimeline:e,segmentTimeline:i,loaderType:n,audioDisabled:r})=>{if(e===i)return!1;if(n==="audio"){let s=t.lastTimelineChange({type:"main"});return!s||s.to!==i;}if(n==="main"&&r){let s=t.pendingTimelineChange({type:"audio"});return!(s&&s.to===i);}return!1;},ZL=t=>{if(!t)return!1;let e=t.pendingTimelineChange({type:"audio"}),i=t.pendingTimelineChange({type:"main"}),n=e&&i,r=n&&e.to!==i.to;return!!(n&&e.from!==-1&&i.from!==-1&&r);},eR=t=>{let e=t.timelineChangeController_.pendingTimelineChange({type:"audio"}),i=t.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&i&&e.to<i.to;},Wn=t=>{let e=t.pendingSegment_;if(!e)return;if(Xf({timelineChangeController:t.timelineChangeController_,currentTimeline:t.currentTimeline_,segmentTimeline:e.timeline,loaderType:t.loaderType_,audioDisabled:t.audioDisabled_})&&ZL(t.timelineChangeController_)){if(eR(t)){t.timelineChangeController_.trigger("audioTimelineBehind");return;}t.timelineChangeController_.trigger("fixBadTimelineChange");}},tR=t=>{let e=0;return["video","audio"].forEach(function(i){let n=t[`${i}TimingInfo`];if(!n)return;let{start:r,end:s}=n,a;typeof r=="bigint"||typeof s=="bigint"?a=j.default.BigInt(s)-j.default.BigInt(r):typeof r=="number"&&typeof s=="number"&&(a=s-r),typeof a<"u"&&a>e&&(e=a);}),typeof e=="bigint"&&e<Number.MAX_SAFE_INTEGER&&(e=Number(e)),e;},hb=({segmentDuration:t,maxDuration:e})=>t?Math.round(t)>e+Xi:!1,iR=(t,e)=>{if(e!=="hls")return null;let i=tR({audioTimingInfo:t.audioTimingInfo,videoTimingInfo:t.videoTimingInfo});if(!i)return null;
197let n=t.playlist.targetDuration,r=hb({segmentDuration:i,maxDuration:n*2}),s=hb({segmentDuration:i,maxDuration:n}),a=`Segment with index ${t.mediaIndex} from playlist ${t.playlist.id} has a duration of ${i} when the reported duration is ${t.duration} and the target duration is ${n}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return r||s?{severity:r?"warn":"info",message:a}:null;},Ar=({type:t,segment:e})=>{if(!e)return;let i=!!(e.key||e.map&&e.map.ke),n=!!(e.map&&!e.map.bytes),r=e.startOfSegment===void 0?e.start:e.startOfSegment;return{type:t||e.type,uri:e.resolvedUri||e.uri,start:r,duration:e.duration,isEncrypted:i,isMediaInitialization:n};},So=class extends N.EventTarget{constructor(e,i={}){if(super(),!e)throw new TypeError("Initialization settings are required");if(typeof e.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1);}),this.fetchAtBuffer_=!1,this.logger_=yi(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_;},set(n){n!==this.state_&&(this.logger_(`${this.state_} -> ${n}`),this.state_=n,this.trigger("statechange"));}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():Wn(this);}),this.sourceUpdater_.on("codecschange",n=>{this.trigger(Ge({type:"codecschange"},n));}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():Wn(this);}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",n=>{this.trigger(Ge({type:"timelinechange"},n)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():Wn(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():Wn(this);});}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_);}createTransmuxer_(){return uf.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_});}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0;}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&j.default.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off();}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_());}
197abort(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null),this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);return;}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_();}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,j.default.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null;}checkForAbort_(e){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==e;}error(e){return typeof e<"u"&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_;}endOfStream(){this.ended_=!0,this.transmuxer_&&uf.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended");}buffered_(){let e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return mt();if(this.loaderType_==="main"){let{hasAudio:i,hasVideo:n,isMuxed:r}=e;if(n&&i&&!this.audioDisabled_&&!r)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered();}return this.sourceUpdater_.audioBuffered();}initSegmentForMap(e,i=!1){if(!e)return null;let n=vd(e),r=this.initSegments_[n];return i&&!r&&e.bytes&&(this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),r||e;}segmentKey(e,i=!1){if(!e)return null;let n=PT(e),r=this.keyCache_[n];this.cacheEncryptionKeys_&&i&&!r&&e.bytes&&(this.keyCache_[n]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});let s={resolvedUri:(r||e).resolvedUri};return r&&(s.bytes=r.bytes),s;}couldBeginLoading_(){return this.playlist_&&!this.paused();}load(){if(this.monitorBuffer_(),!!this.playlist_){if(this.state==="INIT"&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY");}}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_();}playlist(e,i={}){if(!e||this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;let n=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=i,this.state==="INIT"&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(e));let s=null;if(n&&(n.id?s=n.id:n.uri&&(s=n.uri)),this.logger_(`playlist update [${s} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:
198currentTime: ${this.currentTime_()}
199bufferedEnd: ${of(this.buffered_())}
200`,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri){this.mediaIndex!==null&&(!e.endList&&typeof e.partTargetDuration=="number"?this.resetLoader():this.resyncLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate");return;}let a=e.mediaSequence-n.mediaSequence;if(this.logger_(`live window shift [${a}]`),this.mediaIndex!==null)if(this.mediaIndex-=a,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{let o=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!o.parts||!o.parts.length||!o.parts[this.partIndex])){let u=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=u;}}r&&(r.mediaIndex-=a,r.mediaIndex<0?(r.mediaIndex=null,r.partIndex=null):(r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex]),r.partIndex>=0&&r.segment.parts&&(r.part=r.segment.parts[r.partIndex]))),this.syncController_.saveExpiredSegmentInfo(n,e);}pause(){this.checkBufferTimeout_&&(j.default.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null);}paused(){return this.checkBufferTimeout_===null;}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}));}
200resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader();}resyncLoader(){this.transmuxer_&&uf.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;let e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;this.sourceType_==="hls"&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"});}remove(e,i,n=()=>{},r=!1){if(i===1/0&&(i=this.duration_()),i<=e){this.logger_("skipping remove because end ${end} is <= start ${start}");return;}if(!this.sourceUpdater_||!this.getMediaInfo_()){this.logger_("skipping remove because no source updater or starting media info");return;}let s=1,a=()=>{s--,s===0&&n();};(r||!this.audioDisabled_)&&(s++,this.sourceUpdater_.removeAudio(e,i,a)),(r||this.loaderType_==="main")&&(this.gopBuffer_=GL(this.gopBuffer_,e,i,this.timeMapping_),s++,this.sourceUpdater_.removeVideo(e,i,a));for(let o in this.inbandTextTracks_)Wa(e,i,this.inbandTextTracks_[o]);Wa(e,i,this.segmentMetadataTrack_),a();}monitorBuffer_(){this.checkBufferTimeout_&&j.default.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=j.default.setTimeout(this.monitorBufferTick_.bind(this),1);}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&j.default.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=j.default.setTimeout(this.monitorBufferTick_.bind(this),XL);}fillBuffer_(){if(this.sourceUpdater_.updating())return;let e=this.chooseNextRequest_();if(!e)return;let i={segmentInfo:Ar({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:i}),typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e);}isEndOfStream_(e=this.mediaIndex,i=this.playlist_,n=this.partIndex){if(!i||!this.mediaSource_)return!1;let r=typeof e=="number"&&i.segments[e],s=e+1===i.segments.length,a=!r||!r.parts||n+1===r.parts.length;return i.endList&&this.mediaSource_.readyState==="open"&&s&&a;}chooseNextRequest_(){let e=this.buffered_(),i=of(e)||0,n=_p(e,this.currentTime_()),r=!this.hasPlayed_()&&n>=1,s=n>=this.goalBufferLength_(),a=this.playlist_.segments;if(!a.length||r||s)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);let o={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(o.isSyncRequest)o.mediaIndex=YL(this.currentTimeline_,a,i),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${o.mediaIndex}`);else if(this.mediaIndex!==null){let T=a[this.mediaIndex],y=typeof this.partIndex=="number"?this.partIndex:-1;o.startOfSegment=T.end?T.end:i,T.parts&&T.parts[y+1]?(o.mediaIndex=this.mediaIndex,o.partIndex=y+1):o.mediaIndex=this.mediaIndex+1;}else{let T,y,b,g=this.fetchAtBuffer_?i:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
201For TargetTime: ${g}.
202CurrentTime: ${this.currentTime_()}
203BufferedEnd: ${i}
204Fetch At Buffer: ${this.fetchAtBuffer_}
205`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){let E=this.getSyncInfoFromMediaSequenceSync_(g);if(!E){let S="No sync info found while using media sequence sync";return this.error({message:S,metadata:{errorType:N.Error.StreamingFailedToSelectNextSegment,error:new Error(S)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null;}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${E.start} --> ${E.end})`),T=E.segmentIndex,y=E.partIndex,b=E.start;}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");let E=Zt.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:g,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});T=E.segmentIndex,y=E.partIndex,b=E.startTime;}o.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${g}`:`currentTime ${g}`,o.mediaIndex=T,o.startOfSegment=b,o.partIndex=y,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${o.mediaIndex} `);}let u=a[o.mediaIndex],c=u&&typeof o.partIndex=="number"&&u.parts&&u.parts[o.partIndex];if(!u||typeof o.partIndex=="number"&&!c)return null;typeof o.partIndex!="number"&&u.parts&&(o.partIndex=0,c=u.parts[0]);let p=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!n&&c&&!p&&!c.independent)if(o.partIndex===0){let T=a[o.mediaIndex-1],y=T.parts&&T.parts.length&&T.parts[T.parts.length-1];y&&y.independent&&(o.mediaIndex-=1,o.partIndex=T.parts.length-1,o.independent="previous segment");}else u.parts[o.partIndex-1].independent&&(o.partIndex-=1,o.independent="previous part");let _=this.mediaSource_&&this.mediaSource_.readyState==="ended";return o.mediaIndex>=a.length-1&&_&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,o.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(o));}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;let i=Math.max(e,this.mediaSequenceSync_.start);e!==i&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${i}`);let n=this.mediaSequenceSync_.getSyncInfoForTime(i);if(!n)return null;if(!n.isAppended)return n;let r=this.mediaSequenceSync_.getSyncInfoForTime(n.end);return r?(r.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),r):null;}generateSegmentInfo_(e){let{independent:i,playlist:n,mediaIndex:r,startOfSegment:s,isSyncRequest:a,partIndex:o,forceTimestampOffset:u,getMediaInfoForTime:c}=e,p=n.segments[r],_=typeof o=="number"&&p.parts[o],T={requestId:"segment-loader-"+Math.random(),uri:_&&_.resolvedUri||p.resolvedUri,mediaIndex:r,partIndex:_?o:null,isSyncRequest:a,startOfSegment:s,playlist:n,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:p.timeline,duration:_&&_.duration||p.duration,segment:p,part:_,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:c,independent:i},y=typeof u<"u"?u:this.isPendingTimestampOffset_;T.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:p.timeline,currentTimeline:this.currentTimeline_,startOfSegment:s,buffered:this.buffered_(),overrideCheck:y});
205let b=of(this.sourceUpdater_.audioBuffered());return typeof b=="number"&&(T.audioAppendStart=b-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(T.gopsToAlignWith=$L(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),T;}timestampOffsetForSegment_(e){return JL(e);}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;let i=this.currentTime_(),n=e.bandwidth,r=this.pendingSegment_.duration,s=Zt.estimateSegmentRequestTime(r,n,this.playlist_,e.bytesReceived),a=bP(this.buffered_(),i,this.vhs_.tech_.playbackRate())-1;if(s<=a)return;let o=RL({main:this.vhs_.playlists.main,currentTime:i,bandwidth:n,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!o)return;let c=s-a-o.rebufferingImpact,p=.5;a<=Xi&&(p=1),!(!o.playlist||o.playlist.uri===this.playlist_.uri||c<p)&&(this.bandwidth=o.playlist.attributes.BANDWIDTH*pt.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"));}handleAbort_(e){this.logger_(`Aborting ${Ts(e)}`),this.mediaRequestsAborted+=1;}handleProgress_(e,i){this.earlyAbortWhenNeeded_(i.stats),!this.checkForAbort_(i.requestId)&&this.trigger("progress");}handleTrackInfo_(e,i){let{hasAudio:n,hasVideo:r}=i,s={segmentInfo:Ar({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:n,hasVideo:r}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:s}),this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)&&(this.checkForIllegalMediaSwitch(i)||(i=i||{},WL(this.currentMediaInfo_,i)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=i,this.currentMediaInfo_=i,this.logger_("trackinfo update",i),this.trigger("trackinfo")),!this.checkForAbort_(e.requestId)&&(this.pendingSegment_.trackInfo=i,this.hasEnoughInfoToAppend_()?this.processCallQueue_():Wn(this))));}handleTimingInfo_(e,i,n,r){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;let s=this.pendingSegment_,a=cb(i);s[a]=s[a]||{},s[a][n]=r,this.logger_(`timinginfo: ${i} - ${n} - ${r}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():Wn(this);}handleCaptions_(e,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(i.length===0){this.logger_("SegmentLoader received no captions from a caption event");return;}if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,i));return;}let r=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};i.forEach(a=>{s[a.stream]=s[a.stream]||{startTime:1/0,captions:[],endTime:0};let o=s[a.stream];o.startTime=Math.min(o.startTime,a.startTime+r),o.endTime=Math.max(o.endTime,a.endTime+r),o.captions.push(a);}),Object.keys(s).forEach(a=>{let{startTime:o,endTime:u,captions:c}=s[a],p=this.inbandTextTracks_;this.logger_(`adding cues from ${o} -> ${u} for ${a}`),jL(p,this.vhs_.tech_,a),Wa(o,u,p[a]),ML({captionArray:c,inbandTextTracks:p,timestampOffset:r});}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"});}handleId3_(e,i,n){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,i,n));return;}this.addMetadataToTextTrack(n,i,this.duration_());}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[];}processCallQueue_(){let e=this.callQueue_;this.callQueue_=[],e.forEach(i=>i());}processLoadQueue_(){let e=this.loadQueue_;this.loadQueue_=[],e.forEach(i=>i());}hasEnoughInfoToLoad_(){if(this.loaderType_!=="audio")return!0;let e=this.pendingSegment_;return e?this.getCurrentMediaInfo_()?!Xf({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}):!0:!1;}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_;}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_;}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null;}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;let e=this.pendingSegment_,i=this.getCurrentMediaInfo_();if(!e||!i)return!1;let{hasAudio:n,hasVideo:r,isMuxed:s}=i;return!(r&&!e.videoTimingInfo||n&&!this.audioDisabled_&&!s&&!e.audioTimingInfo||Xf({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}));}
205handleData_(e,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){Wn(this),this.callQueue_.push(this.handleData_.bind(this,e,i));return;}let n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.part||n.segment),this.mediaSource_.readyState!=="closed"){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4)this.trigger("fmp4"),n.timingInfo.start=n[cb(i.type)].start;else{let r=this.getCurrentMediaInfo_(),s=this.loaderType_==="main"&&r&&r.hasVideo,a;s&&(a=n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:s,firstVideoFrameTimeForData:a,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo});}if(this.updateAppendInitSegmentStatus(n,i.type),this.updateSourceBufferTimestampOffset_(n),n.isSyncRequest){this.updateTimingInfoEnd_(n),this.syncController_.saveSegmentTimingInfo({segmentInfo:n,shouldSaveTimelineMapping:this.loaderType_==="main"});let r=this.chooseNextRequest_();if(r.mediaIndex!==n.mediaIndex||r.partIndex!==n.partIndex){this.logger_("sync segment was incorrect, not appending");return;}this.logger_("sync segment was correct, appending");}n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,i);}}updateAppendInitSegmentStatus(e,i){this.loaderType_==="main"&&typeof e.timestampOffset=="number"&&!e.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[i]!==e.playlist&&(this.appendInitSegment_[i]=!0);}getInitSegmentAndUpdateState_({type:e,initSegment:i,map:n,playlist:r}){if(n){let s=vd(n);if(this.activeInitSegmentId_===s)return null;i=this.initSegmentForMap(n,!0).bytes,this.activeInitSegmentId_=s;}return i&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=r,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,i):null;}handleQuotaExceededError_({segmentInfo:e,type:i,bytes:n},r){let s=this.sourceUpdater_.audioBuffered(),a=this.sourceUpdater_.videoBuffered();s.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Er(s).join(", ")),a.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Er(a).join(", "));let o=s.length?s.start(0):0,u=s.length?s.end(s.length-1):0,c=a.length?a.start(0):0,p=a.length?a.end(a.length-1):0;if(u-o<=za&&p-c<=za){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${n.byteLength}, audio buffer: ${Er(s).join(", ")}, video buffer: ${Er(a).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),this.trigger("error");return;}this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:i,bytes:n}));let T=this.currentTime_()-za;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${T}`),this.remove(0,T,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${za}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=j.default.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_();},za*1e3);},!0);}handleAppendError_({segmentInfo:e,type:i,bytes:n},r){if(r){if(r.code===AT){this.handleQuotaExceededError_({segmentInfo:e,type:i,bytes:n});return;}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",r),this.error({message:`${i} append of ${n.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:N.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror");}}appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:r,bytes:s}){if(!s){let o=[r],u=r.byteLength;n&&(o.unshift(n),u+=n.byteLength),s=NL({bytes:u,segments:o});}let a={segmentInfo:Ar({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:a}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:i,bytes:s},this.handleAppendError_.bind(this,{segmentInfo:e,type:i,bytes:s}));}handleSegmentTimingInfo_(e,i,n){if(!this.pendingSegment_||i!==this.pendingSegment_.requestId)return;let r=this.pendingSegment_.segment,s=`${e}TimingInfo`;r[s]||(r[s]={}),r[s].transmuxerPrependedSeconds=n.prependedContentDuration||0,r[s].transmuxedPresentationStart=n.start.presentation,r[s].transmuxedDecodeStart=n.start.decode,r[s].transmuxedPresentationEnd=n.end.presentation,r[s].transmuxedDecodeEnd=n.end.decode,r[s].baseMediaDecodeTime=n.baseMediaDecodeTime;}
205appendData_(e,i){let{type:n,data:r}=i;if(!r||!r.byteLength||n==="audio"&&this.audioDisabled_)return;let s=this.getInitSegmentAndUpdateState_({type:n,initSegment:i.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:s,data:r});}loadSegment_(e){if(this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),typeof e.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_()){Wn(this),this.loadQueue_.push(()=>{let i=Ge({},e,{forceTimestampOffset:!0});Ge(e,this.generateSegmentInfo_(i)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e);});return;}this.updateTransmuxerAndRequestSegment_(e);}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));let i=this.createSimplifiedSegmentObj_(e),n=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),r=this.mediaIndex!==null,s=e.timeline!==this.currentTimeline_&&e.timeline>0,a=n||r&&s;this.logger_(`Requesting
206${YT(e.uri)}
207${Ts(e)}`),i.map&&!i.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=kL({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:i,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:a,endedTimelineFn:()=>{this.logger_("received endedtimeline callback");},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:o,level:u,stream:c})=>{this.logger_(`${Ts(e)} logged from transmuxer stream ${c} as a ${u}: ${o}`);},triggerSegmentEventFn:({type:o,segment:u,keyInfo:c,trackInfo:p,timingInfo:_})=>{let y={segmentInfo:Ar({segment:u})};c&&(y.keyInfo=c),p&&(y.trackInfo=p),_&&(y.timingInfo=_),this.trigger({type:o,metadata:y});}});}trimBackBuffer_(e){let i=QL(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);i>0&&this.remove(0,i);}createSimplifiedSegmentObj_(e){let i=e.segment,n=e.part,r=e.segment.key||e.segment.map&&e.segment.map.key,s=e.segment.map&&!e.segment.map.bytes,a={resolvedUri:n?n.resolvedUri:i.resolvedUri,byterange:n?n.byterange:i.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:r,isMediaInitialization:s},o=e.playlist.segments[e.mediaIndex-1];if(o&&o.timeline===i.timeline&&(o.videoTimingInfo?a.baseStartTime=o.videoTimingInfo.transmuxedDecodeEnd:o.audioTimingInfo&&(a.baseStartTime=o.audioTimingInfo.transmuxedDecodeEnd)),i.key){let u=i.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);a.key=this.segmentKey(i.key),a.key.iv=u;}return i.map&&(a.map=this.initSegmentForMap(i.map)),a;}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime);}saveBandwidthRelatedStats_(e,i){if(this.pendingSegment_.byteLength=i.bytesReceived,e<bu){this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record ${bu}`);return;}let n={bandwidthInfo:{from:this.bandwidth,to:i.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:n}),this.bandwidth=i.bandwidth,this.roundTrip=i.roundTripTime;}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout");}segmentRequestFinished_(e,i,n){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,i,n));return;}if(this.saveTransferStats_(i.stats),!this.pendingSegment_||i.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Qi.ABORTED)return;if(this.pause(),e.code===Qi.TIMEOUT){this.handleTimeout_();return;}this.mediaRequestsErrored+=1,this.error(e),this.trigger("error");return;}let r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,i.stats),r.endOfAllRequests=i.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=zL(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(r);}setTimeMapping_(e){let i=this.syncController_.mappingForTimeline(e);i!==null&&(this.timeMapping_=i);}updateMediaSecondsLoaded_(e){typeof e.start=="number"&&typeof e.end=="number"?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration;}shouldUpdateTransmuxerTimestampOffset_(e){return e===null?!1:this.loaderType_==="main"&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset();}trueSegmentStart_({currentStart:e,playlist:i,mediaIndex:n,firstVideoFrameTimeForData:r,currentVideoTimestampOffset:s,useVideoTimingInfo:a,videoTimingInfo:o,audioTimingInfo:u}){if(typeof e<"u")return e;if(!a)return u.start;let c=i.segments[n-1];return n===0||!c||typeof c.start>"u"||c.end!==r+s?r:o.start;}waitForAppendsToComplete_(e){let i=this.getCurrentMediaInfo_(e);if(!i){this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),this.trigger("error");return;}let{hasAudio:n,hasVideo:r,isMuxed:s}=i,a=this.loaderType_==="main"&&r,o=!this.audioDisabled_&&n&&!s;if(e.waitingOnAppends=0,!e.hasAppendedData_){!e.timingInfo&&typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),this.checkAppendsDone_(e);return;}a&&e.waitingOnAppends++,o&&e.waitingOnAppends++,a&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),o&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e));}
207checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,e.waitingOnAppends===0&&this.handleAppendsDone_());}checkForIllegalMediaSwitch(e){let i=KL(this.loaderType_,this.getCurrentMediaInfo_(),e);return i?(this.error({message:i,playlistExclusionDuration:1/0}),this.trigger("error"),!0):!1;}updateSourceBufferTimestampOffset_(e){if(e.timestampOffset===null||typeof e.timingInfo.start!="number"||e.changedTimestampOffset||this.loaderType_!=="main")return;let i=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),i=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),i=!0),i&&this.trigger("timestampoffset");}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:i,timingInfo:n}){return this.useDtsForTimestampOffset_?e&&typeof e.transmuxedDecodeStart=="number"?e.transmuxedDecodeStart:i&&typeof i.transmuxedDecodeStart=="number"?i.transmuxedDecodeStart:n.start:n.start;}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};let i=this.getMediaInfo_(),r=this.loaderType_==="main"&&i&&i.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;r&&(e.timingInfo.end=typeof r.end=="number"?r.end:r.start+e.duration);}handleAppendsDone_(){if(this.pendingSegment_){let u={segmentInfo:Ar({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:u});}if(!this.pendingSegment_){this.state="READY",this.paused()||this.monitorBuffer_();return;}let e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:this.loaderType_==="main"});let i=iR(e,this.sourceType_);if(i&&(i.severity==="warn"?N.log.warn(i.message):this.logger_(i.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_)){this.logger_(`Throwing away un-appended sync request ${Ts(e)}`);return;}this.logger_(`Appended ${Ts(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),this.loaderType_==="main"&&!this.audioDisabled_&&this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");let n=e.segment,r=e.part,s=n.end&&this.currentTime_()-n.end>e.playlist.targetDuration*3,a=r&&r.end&&this.currentTime_()-r.end>e.playlist.partTargetDuration*3;if(s||a){this.logger_(`bad ${s?"segment":"part"} ${Ts(e)}`),this.resetEverything();return;}this.mediaIndex!==null&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_();}recordThroughput_(e){if(e.duration<bu){this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record ${bu}`);return;}let i=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(r-i)/++this.throughput.count;}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;let i=e.segment,n=i.start,r=i.end;if(!db(n)||!db(r))return;Wa(n,r,this.segmentMetadataTrack_);let s=j.default.WebKitDataCue||j.default.VTTCue,a={custom:i.custom,dateTimeObject:i.dateTimeObject,dateTimeString:i.dateTimeString,programDateTime:i.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.ur
207i,timeline:e.timeline,playlist:e.playlist.id,start:n,end:r},o=JSON.stringify(a),u=new s(n,r,o);u.value=a,this.segmentMetadataTrack_.addCue(u);}};XT=function(t){return typeof t!="string"?t:t.replace(/./,e=>e.toUpperCase());},nR=["video","audio"],Kf=(t,e)=>{let i=e[`${t}Buffer`];return i&&i.updating||e.queuePending[t];},rR=(t,e)=>{for(let i=0;i<e.length;i++){let n=e[i];if(n.type==="mediaSource")return null;if(n.type===t)return i;}return null;},Ls=(t,e)=>{if(e.queue.length===0)return;let i=0,n=e.queue[i];if(n.type==="mediaSource"){!e.updating()&&e.mediaSource.readyState!=="closed"&&(e.queue.shift(),n.action(e),n.doneFn&&n.doneFn(),Ls("audio",e),Ls("video",e));return;}if(t!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||Kf(t,e))){if(n.type!==t){if(i=rR(t,e.queue),i===null)return;n=e.queue[i];}if(e.queue.splice(i,1),e.queuePending[t]=n,n.action(t,e),!n.doneFn){e.queuePending[t]=null,Ls(t,e);return;}}},KT=(t,e)=>{let i=e[`${t}Buffer`],n=XT(t);i&&(i.removeEventListener("updateend",e[`on${n}UpdateEnd_`]),i.removeEventListener("error",e[`on${n}Error_`]),e.codecs[t]=null,e[`${t}Buffer`]=null);},Wi=(t,e)=>t&&e&&Array.prototype.indexOf.call(t.sourceBuffers,e)!==-1,ai={appendBuffer:(t,e,i)=>(n,r)=>{let s=r[`${n}Buffer`];if(Wi(r.mediaSource,s)){r.logger_(`Appending segment ${e.mediaIndex}'s ${t.length} bytes to ${n}Buffer`);try{s.appendBuffer(t);}catch(a){r.logger_(`Error with code ${a.code} `+(a.code===AT?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${e.mediaIndex} to ${n}Buffer`),r.queuePending[n]=null,i(a);}}},remove:(t,e)=>(i,n)=>{let r=n[`${i}Buffer`];if(Wi(n.mediaSource,r)){n.logger_(`Removing ${t} to ${e} from ${i}Buffer`);try{r.remove(t,e);}catch{n.logger_(`Remove ${t} to ${e} from ${i}Buffer failed`);}}},timestampOffset:t=>(e,i)=>{let n=i[`${e}Buffer`];Wi(i.mediaSource,n)&&(i.logger_(`Setting ${e}timestampOffset to ${t}`),n.timestampOffset=t);},callback:t=>(e,i)=>{t();},endOfStream:t=>e=>{if(e.mediaSource.readyState==="open"){e.logger_(`Calling mediaSource endOfStream(${t||""})`);try{e.mediaSource.endOfStream(t);}catch(i){N.log.warn("Failed to call media source endOfStream",i);}}},duration:t=>e=>{e.logger_(`Setting mediaSource duration to ${t}`);try{e.mediaSource.duration=t;}catch(i){N.log.warn("Failed to set media source duration",i);}},abort:()=>(t,e)=>{if(e.mediaSource.readyState!=="open")return;let i=e[`${t}Buffer`];if(Wi(e.mediaSource,i)){e.logger_(`calling abort on ${t}Buffer`);try{i.abort();}catch(n){N.log.warn(`Failed to abort on ${t}Buffer`,n);}}},addSourceBuffer:(t,e)=>i=>{let n=XT(t),r=_r(e);i.logger_(`Adding ${t}Buffer with codec ${e} to mediaSource`);let s=i.mediaSource.addSourceBuffer(r);s.addEventListener("updateend",i[`on${n}UpdateEnd_`]),s.addEventListener("error",i[`on${n}Error_`]),i.codecs[t]=e,i[`${t}Buffer`]=s;},removeSourceBuffer:t=>e=>{let i=e[`${t}Buffer`];if(KT(t,e),!!Wi(e.mediaSource,i)){e.logger_(`Removing ${t}Buffer with codec ${e.codecs[t]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(i);}catch(n){N.log.warn(`Failed to removeSourceBuffer ${t}Buffer`,n);}}},changeType:t=>(e,i)=>{let n=i[`${e}Buffer`],r=_r(t);if(!Wi(i.mediaSource,n))return;let s=t.substring(0,t.indexOf(".")),a=i.codecs[e];if(a.substring(0,a.indexOf("."))===s)return;let u={codecsChangeInfo:{from:a,to:t}};i.trigger({type:"codecschange",metadata:u}),i.logger_(`changing ${e}Buffer codec from ${a} to ${t}`);try{n.changeType(r),i.codecs[e]=t;}catch(c){u.errorType=N.Error.StreamingCodecsChangeError,u.error=c,c.metadata=u,i.error_=c,i.trigger("error"),N.log.warn(`Failed to changeType on ${e}Buffer`,c);}}},oi=({type:t,sourceUpdater:e,action:i,doneFn:n,name:r})=>{e.queue.push({type:t,action:i,doneFn:n,name:r}),Ls(t,e);},fb=(t,e)=>i=>{let n=e[`${t}Buffered`](),r=vP(n);if(e.logger_(`received "updateend" event for ${t} Source Buffer: `,r),e.queuePending[t]){let s=e.queuePending[t].doneFn;e.queuePending[t]=null,s&&s(e[`${t}Error_`]);}Ls(t,e);},_d=class extends N.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Ls("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=yi("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=fb("video",this),this.onAudioUpdateEnd_=fb("audio",this),this.onVideoError_=i=>{this.videoError_=i;},this.onAudioError_=i=>{this.audioError_=i;},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1;}initializedEme(){this.initializedEme_=!0,this.triggerReady();}hasCreatedSourceBuffers(){return this.createdSourceBuffers_;}hasInitializedAnyEme(){return this.initializedEme_;}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme();}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady());}
207triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"));}addSourceBuffer(e,i){oi({type:"mediaSource",sourceUpdater:this,action:ai.addSourceBuffer(e,i),name:"addSourceBuffer"});}abort(e){oi({type:e,sourceUpdater:this,action:ai.abort(e),name:"abort"});}removeSourceBuffer(e){if(!this.canRemoveSourceBuffer()){N.log.error("removeSourceBuffer is not supported!");return;}oi({type:"mediaSource",sourceUpdater:this,action:ai.removeSourceBuffer(e),name:"removeSourceBuffer"});}canRemoveSourceBuffer(){return!N.browser.IS_FIREFOX&&j.default.MediaSource&&j.default.MediaSource.prototype&&typeof j.default.MediaSource.prototype.removeSourceBuffer=="function";}static canChangeType(){return j.default.SourceBuffer&&j.default.SourceBuffer.prototype&&typeof j.default.SourceBuffer.prototype.changeType=="function";}canChangeType(){return this.constructor.canChangeType();}changeType(e,i){if(!this.canChangeType()){N.log.error("changeType is not supported!");return;}oi({type:e,sourceUpdater:this,action:ai.changeType(i),name:"changeType"});}addOrChangeSourceBuffers(e){if(!e||typeof e!="object"||Object.keys(e).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(i=>{let n=e[i];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(i,n);this.canChangeType()&&this.changeType(i,n);});}appendBuffer(e,i){let{segmentInfo:n,type:r,bytes:s}=e;if(this.processedAppend_=!0,r==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,i]),this.logger_(`delayed audio append of ${s.length} until video append`);return;}let a=i;if(oi({type:r,sourceUpdater:this,action:ai.appendBuffer(s,n||{mediaIndex:-1},a),doneFn:i,name:"appendBuffer"}),r==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;let o=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${o.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,o.forEach(u=>{this.appendBuffer.apply(this,u);});}}audioBuffered(){return Wi(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:mt();}videoBuffered(){return Wi(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:mt();}buffered(){let e=Wi(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,i=Wi(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return i&&!e?this.audioBuffered():e&&!i?this.videoBuffered():yP(this.audioBuffered(),this.videoBuffered());}setDuration(e,i=Sn){oi({type:"mediaSource",sourceUpdater:this,action:ai.duration(e),name:"duration",doneFn:i});}endOfStream(e=null,i=Sn){typeof e!="string"&&(e=void 0),oi({type:"mediaSource",sourceUpdater:this,action:ai.endOfStream(e),name:"endOfStream",doneFn:i});}removeAudio(e,i,n=Sn){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){n();return;}oi({type:"audio",sourceUpdater:this,action:ai.remove(e,i),doneFn:n,name:"remove"});}removeVideo(e,i,n=Sn){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){n();return;}oi({type:"video",sourceUpdater:this,action:ai.remove(e,i),doneFn:n,name:"remove"});}updating(){return!!(Kf("audio",this)||Kf("video",this));}audioTimestampOffset(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(oi({type:"audio",sourceUpdater:this,action:ai.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_;}videoTimestampOffset(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(oi({type:"video",sourceUpdater:this,action:ai.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_;}audioQueueCallback(e){this.audioBuffer&&oi({type:"audio",sourceUpdater:this,action:ai.callback(e),name:"callback"});}videoQueueCallback(e){this.videoBuffer&&oi({type:"video",sourceUpdater:this,action:ai.callback(e),name:"callback"});}dispose(){this.trigger("dispose"),nR.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>KT(e,this));}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off();}},pb=t=>decodeURIComponent(escape(String.fromCharCode.apply(null,t))),sR=t=>{let e=new Uint8Array(t);return Array.from(e).map(i=>i.toString(16).padStart(2,"0")).join("");},mb=new Uint8Array(`
208
209`.split("").map(t=>
209t.charCodeAt(0))),Qf=class extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.");}},Jf=class extends So{constructor(e,i={}){super(e,i),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1;}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return mt();let e=this.subtitlesTrack_.cues,i=e[0].startTime,n=e[e.length-1].startTime;return mt([[i,n]]);}initSegmentForMap(e,i=!1){if(!e)return null;let n=vd(e),r=this.initSegments_[n];if(i&&!r&&e.bytes){let s=mb.byteLength+e.bytes.byteLength,a=new Uint8Array(s);a.set(e.bytes),a.set(mb,e.bytes.byteLength),this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a};}return r||e;}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused();}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_();}track(e){return typeof e>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=e,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_);}remove(e,i){Wa(e,i,this.subtitlesTrack_);}fillBuffer_(){let e=this.chooseNextRequest_();if(e){if(this.syncController_.timestampOffsetForTimeline(e.timeline)===null){let i=()=>{this.state="READY",this.paused()||this.monitorBuffer_();};this.syncController_.one("timestampoffset",i),this.state="WAITING_ON_TIMELINE";return;}this.loadSegment_(e);}}timestampOffsetForSegment_(){return null;}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_());}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break;}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest});}return e;}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error");}segmentRequestFinished_(e,i,n){if(!this.subtitlesTrack_){this.state="READY";return;}if(this.saveTransferStats_(i.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return;}if(e){e.code===Qi.TIMEOUT&&this.handleTimeout_(),e.code===Qi.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return;}let r=this.pendingSegment_,s=n.mp4VttCues&&n.mp4VttCues.length;s&&(r.mp4VttCues=n.mp4VttCues),this.saveBandwidthRelatedStats_(r.duration,i.stats),i.key&&this.segmentKey(i.key,!0),this.state="APPENDING",this.trigger("appending");let a=r.segment;if(a.map&&(a.map.bytes=i.map.bytes),r.bytes=i.bytes,typeof j.default.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,i,n),()=>this.stopForError({message:"Error loading vtt.js"}));return;}a.requested=!0;try{this.parseVTTCues_(r);}catch(o){this.stopForError({message:o.message,metadata:{errorType:N.Error.StreamingVttParserError,error:o}});return;}if(s||this.updateTimeMapping_(r,this.syncController_.timelines[r.timeline],this.playlist_),r.cues.length?r.timingInfo={start:r.cues[0].startTime,end:r.cues[r.cues.length-1].endTime}:r.timingInfo={start:r.startOfSegment,end:r.startOfSegment+r.duration},r.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return;}r.byteLength=r.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,r.cues.forEach(o=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new j.default.VTTCue(o.startTime,o.endTime,o.text):o);}),HL(this.subtitlesTrack_),this.handleAppendsDone_();}handleData_(e,i){let n=e&&e.type==="vtt",r=i&&i.type==="text";n&&r&&super.handleData_(e,i);}updateTimingInfoEnd_(){}parseMp4VttCues_(e){let i=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(n=>{let r=n.start+i,s=n.end+i,a=new j.default.VTTCue(r,s,n.cueText);n.settings&&n.settings.split(" ").forEach(o=>{let u=o.split(":"),c=u[0],p=u[1];a[c]=isNaN(p)?p:Number(p);}),e.cues.push(a);});}
209parseVTTCues_(e){let i,n=!1;if(typeof j.default.WebVTT!="function")throw new Qf();if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues){this.parseMp4VttCues_(e);return;}typeof j.default.TextDecoder=="function"?i=new j.default.TextDecoder("utf8"):(i=j.default.WebVTT.StringDecoder(),n=!0);let r=new j.default.WebVTT.Parser(j.default,j.default.vttjs,i);if(r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=a=>{e.timestampmap=a;},r.onparsingerror=a=>{N.log.warn("Error encountered when parsing cues: "+a.message);},e.segment.map){let a=e.segment.map.bytes;n&&(a=pb(a)),r.parse(a);}let s=e.bytes;n&&(s=pb(s)),r.parse(s),r.flush();}updateTimeMapping_(e,i,n){let r=e.segment;if(!i)return;if(!e.cues.length){r.empty=!0;return;}let{MPEGTS:s,LOCAL:a}=e.timestampmap,u=s/Qn.ONE_SECOND_IN_TS-a+i.mapping;if(e.cues.forEach(c=>{let p=c.endTime-c.startTime,_=this.handleRollover_(c.startTime+u,i.time);c.startTime=Math.max(_,0),c.endTime=Math.max(_+p,0);}),!n.syncInfo){let c=e.cues[0].startTime,p=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(c,p-r.duration)};}}handleRollover_(e,i){if(i===null)return e;let n=e*Qn.ONE_SECOND_IN_TS,r=i*Qn.ONE_SECOND_IN_TS,s;for(r<n?s=-8589934592:s=8589934592;Math.abs(n-r)>4294967296;)n+=s;return n/Qn.ONE_SECOND_IN_TS;}},aR=function(t,e){let i=t.cues;for(let n=0;n<i.length;n++){let r=i[n];if(e>=r.adStartTime&&e<=r.adEndTime)return r;}return null;},oR=function(t,e,i=0){if(!t.segments)return;let n=i,r;for(let s=0;s<t.segments.length;s++){let a=t.segments[s];if(r||(r=aR(e,n+a.duration/2)),r){if("cueIn"in a){r.endTime=n,r.adEndTime=n,n+=a.duration,r=null;continue;}if(n<r.endTime){n+=a.duration;continue;}r.endTime+=a.duration;}else if("cueOut"in a&&(r=new j.default.VTTCue(n,n+a.duration,a.cueOut),r.adStartTime=n,r.adEndTime=n+parseFloat(a.cueOut),e.addCue(r)),"cueOutCont"in a){let[o,u]=a.cueOutCont.split("/").map(parseFloat);r=new j.default.VTTCue(n,n+a.duration,""),r.adStartTime=n-o,r.adEndTime=r.adStartTime+u,e.addCue(r);}n+=a.duration;}},yd=class{constructor({start:e,end:i,segmentIndex:n,partIndex:r=null,appended:s=!1}){this.start_=e,this.end_=i,this.segmentIndex_=n,this.partIndex_=r,this.appended_=s;}isInRange(e){return e>=this.start&&e<this.end;}markAppended(){this.appended_=!0;}resetAppendedStatus(){this.appended_=!1;}get isAppended(){return this.appended_;}get start(){return this.start_;}get end(){return this.end_;}get segmentIndex(){return this.segmentIndex_;}get partIndex(){return this.partIndex_;}},Zf=class{constructor(e,i=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=i;}get segmentSyncInfo(){return this.segmentSyncInfo_;}get partsSyncInfo(){return this.partsSyncInfo_;}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0;}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(e=>e.resetAppendedStatus());}}
209,bd=class{constructor(){this.storage_=new Map(),this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0;}get start(){return this.start_;}get end(){return this.end_;}get diagnostics(){return this.diagnostics_;}get isReliable(){return this.isReliable_;}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus());}update(e,i){let{mediaSequence:n,segments:r}=e;if(this.isReliable_=this.isReliablePlaylist_(n,r),!!this.isReliable_)return this.updateStorage_(r,n,this.calculateBaseTime_(n,r,i));}getSyncInfoForTime(e){for(let{segmentSyncInfo:i,partsSyncInfo:n}of this.storage_.values())if(n.length){for(let r of n)if(r.isInRange(e))return r;}else if(i.isInRange(e))return i;return null;}getSyncInfoForMediaSequence(e){return this.storage_.get(e);}updateStorage_(e,i,n){let r=new Map(),s=`
210`,a=n,o=i;this.start_=a,e.forEach((u,c)=>{let p=this.storage_.get(o),_=a,T=_+u.duration,y=!!(p&&p.segmentSyncInfo&&p.segmentSyncInfo.isAppended),b=new yd({start:_,end:T,appended:y,segmentIndex:c});u.syncInfo=b;let g=a,E=(u.parts||[]).map((S,P)=>{let D=g,A=g+S.duration,C=!!(p&&p.partsSyncInfo&&p.partsSyncInfo[P]&&p.partsSyncInfo[P].isAppended),R=new yd({start:D,end:A,appended:C,segmentIndex:c,partIndex:P});return g=A,s+=`Media Sequence: ${o}.${P} | Range: ${D} --> ${A} | Appended: ${C}
211`,S.syncInfo=R,R;});r.set(o,new Zf(b,E)),s+=`${YT(u.resolvedUri)} | Media Sequence: ${o} | Range: ${_} --> ${T} | Appended: ${y}
212`,o++,a=T;}),this.end_=a,this.storage_=r,this.diagnostics_=s;}calculateBaseTime_(e,i,n){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;let r=Math.min(...this.storage_.keys());if(e<r){let s=r-e,a=this.storage_.get(r).segmentSyncInfo.start;for(let o=0;o<s;o++){let u=i[o];a-=u.duration;}return a;}return n;}isReliablePlaylist_(e,i){return e!=null&&Array.isArray(i)&&i.length;}},Td=class extends bd{constructor(e){super(),this.parent_=e;}calculateBaseTime_(e,i,n){if(!this.storage_.size){let r=this.parent_.getSyncInfoForMediaSequence(e);return r?r.segmentSyncInfo.start:0;}return super.calculateBaseTime_(e,i,n);}},lR=86400,df=[{name:"VOD",run:(t,e,i,n,r)=>i!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(t,e,i,n,r,s)=>{let a=t.getMediaSequenceSync(s);if(!a||!a.isReliable)return null;let o=a.getSyncInfoForTime(r);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null;}},{name:"ProgramDateTime",run:(t,e,i,n,r)=>{if(!Object.keys(t.timelineToDatetimeMappings).length)return null;let s=null,a=null,o=qf(e);r=r||0;for(let u=0;u<o.length;u++){let c=e.endList||r===0?u:o.length-(u+1),p=o[c],_=p.segment,T=t.timelineToDatetimeMappings[_.timeline];if(!T||!_.dateTimeObject)continue;let b=_.dateTimeObject.getTime()/1e3+T;if(_.parts&&typeof p.partIndex=="number")for(let E=0;E<p.partIndex;E++)b+=_.parts[E].duration;let g=Math.abs(r-b);if(a!==null&&(g===0||a<g))break;a=g,s={time:b,segmentIndex:p.segmentIndex,partIndex:p.partIndex};}return s;}},{name:"Segment",run:(t,e,i,n,r)=>{let s=null,a=null;r=r||0;let o=qf(e);for(let u=0;u<o.length;u++){let c=e.endList||r===0?u:o.length-(u+1),p=o[c],_=p.segment,T=p.part&&p.part.start||_&&_.start;if(_.timeline===n&&typeof T<"u"){let y=Math.abs(r-T);if(a!==null&&a<y)break;(!s||a===null||a>=y)&&(a=y,s={time:T,segmentIndex:p.segmentIndex,partIndex:p.partIndex});}}return s;}},{name:"Discontinuity",run:(t,e,i,n,r)=>{let s=null;if(r=r||0,e.discontinuityStarts&&e.discontinuityStarts.length){let a=null;for(let o=0;o<e.discontinuityStarts.length;o++){let u=e.discontinuityStarts[o],c=e.discontinuitySequence+o+1,p=t.discontinuities[c];if(p){let _=Math.abs(r-p.time);if(a!==null&&a<_)break;(!s||a===null||a>=_)&&(a=_,s={time:p.time,segmentIndex:u,partIndex:null});}}}return s;}},{name:"Playlist",run:(t,e,i,n,r)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}],ep=class extends N.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};let i=new bd(),n=new Td(i),r=new Td(i);this.mediaSequenceStorage_={main:i,audio:n,vtt:r},this.logger_=yi("SyncController");}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null;}getSyncPoint(e,i,n,r,s){if(i!==1/0)return df.find(({name:u})=>u==="VOD").run(this,e,i);let a=this.runStrategies_(e,i,n,r,s);if(!a.length)return null;for(let o of a){let{syncPoint:u,strategy:c}=o,{segmentIndex:p,time:_}=u;if(p<0)continue;let T=e.segments[p],y=_,b=y+T.duration;if(this.logger_(`Strategy: ${c}. Current time: ${r}. selected segment: ${p}. Time: [${y} -> ${b}]}`),r>=y&&r<b)return this.logger_("Found sync point with exact match: ",u),u;}return this.selectSyncPoint_(a,{key:"time",value:r});}getExpiredTime(e,i){if(!e||!e.segments)return null;let n=this.runStrategies_(e,i,e.discontinuitySequence,0);if(!n.length)return null;let r=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+Qa({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:r.
212segmentIndex,endIndex:0}));}runStrategies_(e,i,n,r,s){let a=[];for(let o=0;o<df.length;o++){let u=df[o],c=u.run(this,e,i,n,r,s);c&&(c.strategy=u.name,a.push({strategy:u.name,syncPoint:c}));}return a;}selectSyncPoint_(e,i){let n=e[0].syncPoint,r=Math.abs(e[0].syncPoint[i.key]-i.value),s=e[0].strategy;for(let a=1;a<e.length;a++){let o=Math.abs(e[a].syncPoint[i.key]-i.value);o<r&&(r=o,n=e[a].syncPoint,s=e[a].strategy);}return this.logger_(`syncPoint for [${i.key}: ${i.value}] chosen with strategy [${s}]: [time:${n.time}, segmentIndex:${n.segmentIndex}`+(typeof n.partIndex=="number"?`,partIndex:${n.partIndex}`:"")+"]"),n;}saveExpiredSegmentInfo(e,i){let n=i.mediaSequence-e.mediaSequence;if(n>lR){N.log.warn(`Not saving expired segment info. Media sequence gap ${n} is too large.`);return;}for(let r=n-1;r>=0;r--){let s=e.segments[r];if(s&&typeof s.start<"u"){i.syncInfo={mediaSequence:e.mediaSequence+r,time:s.start},this.logger_(`playlist refresh sync: [time:${i.syncInfo.time}, mediaSequence: ${i.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break;}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){let i=e.segments[0],n=i.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[i.timeline]=-n;}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:i}){let n=this.calculateSegmentTimeMapping_(e,e.timingInfo,i),r=e.segment;n&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:r.start}));let s=r.dateTimeObject;r.discontinuity&&i&&s&&(this.timelineToDatetimeMappings[r.timeline]=-(s.getTime()/1e3));}timestampOffsetForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].time;}mappingForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].mapping;}calculateSegmentTimeMapping_(e,i,n){let r=e.segment,s=e.part,a=this.timelines[e.timeline],o,u;if(typeof e.timestampOffset=="number")a={time:e.startOfSegment,mapping:e.startOfSegment-i.start},n&&(this.timelines[e.timeline]=a,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${a.time}] [mapping: ${a.mapping}]`)),o=e.startOfSegment,u=i.end+a.mapping;else if(a)o=i.start+a.mapping,u=i.end+a.mapping;else return!1;return s&&(s.start=o,s.end=u),(!r.start||o<r.start)&&(r.start=o),r.end=u,!0;}saveDiscontinuitySyncInfo_(e){let i=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(i.discontinuityStarts&&i.discontinuityStarts.length)for(let r=0;r<i.discontinuityStarts.length;r++){let s=i.discontinuityStarts[r],a=i.discontinuitySequence+r+1,o=s-e.mediaIndex,u=Math.abs(o);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>u){let c;o<0?c=n.start-Qa({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex,endIndex:s}):c=n.end+Qa({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex+1,endIndex:s}),this.discontinuities[a]={time:c,accuracy:u};}}}dispose(){this.trigger("dispose"),this.off();}},tp=class extends N.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={};}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange");}pendingTimelineChange({type:e,from:i,to:n}){return typeof i=="number"&&typeof n=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:i,to:n},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e];}lastTimelineChange({type:e,from:i,to:n}){if(typeof i=="number"&&typeof n=="number"){this.lastTimelineChanges_[e]={type:e,from:i,to:n},delete this.pendingTimelineChanges_[e];let r={timelineChangeInfo:{from:i,to:n}};this.trigger({type:"timelinechange",metadata:r});}return this.lastTimelineChanges_[e];}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off();}},uR=MT(BT(function(){var t=function(){function g(){this.listeners={};}var E=g.prototype;return E.on=function(P,D){this.listeners[P]||(this.listeners[P]=[]),this.listeners[P].push(D);},E.off=function(P,D){if(!this.listeners[P])return!1;var A=this.listeners[P].indexOf(D);return this.listeners[P]=this.listeners[P].slice(0),this.listeners[P].splice(A,1),A>-1;},E.trigger=function(P){var D=this.listeners[P];if(D)if(arguments.length===2)for(var A=D.length,C=0;C<A;++C)D[C].call(this,arguments[1]);
212else for(var R=Array.prototype.slice.call(arguments,1),I=D.length,M=0;M<I;++M)D[M].apply(this,R);},E.dispose=function(){this.listeners={};},E.pipe=function(P){this.on("data",function(D){P.push(D);});},g;}();function e(g){return g.subarray(0,g.byteLength-g[g.byteLength-1]);}let i=function(){let g=[[[],[],[],[],[]],[[],[],[],[],[]]],E=g[0],S=g[1],P=E[4],D=S[4],A,C,R,I=[],M=[],F,U,k,G,V,Y;for(A=0;A<256;A++)M[(I[A]=A<<1^(A>>7)*283)^A]=A;for(C=R=0;!P[C];C^=F||1,R=M[R]||1)for(G=R^R<<1^R<<2^R<<3^R<<4,G=G>>8^G&255^99,P[C]=G,D[G]=C,k=I[U=I[F=I[C]]],Y=k*16843009^U*65537^F*257^C*16843008,V=I[G]*257^G*16843008,A=0;A<4;A++)E[A][C]=V=V<<24^V>>>8,S[A][G]=Y=Y<<24^Y>>>8;for(A=0;A<5;A++)E[A]=E[A].slice(0),S[A]=S[A].slice(0);return g;},n=null;class r{constructor(E){n||(n=i()),this._tables=[[n[0][0].slice(),n[0][1].slice(),n[0][2].slice(),n[0][3].slice(),n[0][4].slice()],[n[1][0].slice(),n[1][1].slice(),n[1][2].slice(),n[1][3].slice(),n[1][4].slice()]];let S,P,D,A=this._tables[0][4],C=this._tables[1],R=E.length,I=1;if(R!==4&&R!==6&&R!==8)throw new Error("Invalid aes key size");let M=E.slice(0),F=[];for(this._key=[M,F],S=R;S<4*R+28;S++)D=M[S-1],(S%R===0||R===8&&S%R===4)&&(D=A[D>>>24]<<24^A[D>>16&255]<<16^A[D>>8&255]<<8^A[D&255],S%R===0&&(D=D<<8^D>>>24^I<<24,I=I<<1^(I>>7)*283)),M[S]=M[S-R]^D;for(P=0;S;P++,S--)D=M[P&3?S:S-4],S<=4||P<4?F[P]=D:F[P]=C[0][A[D>>>24]]^C[1][A[D>>16&255]]^C[2][A[D>>8&255]]^C[3][A[D&255]];}decrypt(E,S,P,D,A,C){let R=this._key[1],I=E^R[0],M=D^R[1],F=P^R[2],U=S^R[3],k,G,V,Y=R.length/4-2,ae,oe=4,pe=this._tables[1],be=pe[0],Ee=pe[1],Ft=pe[2],Ut=pe[3],Vt=pe[4];for(ae=0;ae<Y;ae++)k=be[I>>>24]^Ee[M>>16&255]^Ft[F>>8&255]^Ut[U&255]^R[oe],G=be[M>>>24]^Ee[F>>16&255]^Ft[U>>8&255]^Ut[I&255]^R[oe+1],V=be[F>>>24]^Ee[U>>16&255]^Ft[I>>8&255]^Ut[M&255]^R[oe+2],U=be[U>>>24]^Ee[I>>16&255]^Ft[M>>8&255]^Ut[F&255]^R[oe+3],oe+=4,I=k,M=G,F=V;for(ae=0;ae<4;ae++)A[(3&-ae)+C]=Vt[I>>>24]<<24^Vt[M>>16&255]<<16^Vt[F>>8&255]<<8^Vt[U&255]^R[oe++],k=I,I=M,M=F,F=U,U=k;}}class s extends t{constructor(){super(t),this.jobs=[],this.delay=1,this.timeout_=null;}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null;}push(E){this.jobs.push(E),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay));}}let a=function(g){return g<<24|(g&65280)<<8|(g&16711680)>>8|g>>>24;},o=function(g,E,S){let P=new Int32Array(g.buffer,g.byteOffset,g.byteLength>>2),D=new r(Array.prototype.slice.call(E)),A=new Uint8Array(g.byteLength),C=new Int32Array(A.buffer),R,I,M,F,U,k,G,V,Y;for(R=S[0],I=S[1],M=S[2],F=S[3],Y=0;Y<P.length;Y+=4)U=a(P[Y]),k=a(P[Y+1]),G=a(P[Y+2]),V=a(P[Y+3]),D.decrypt(U,k,G,V,C,Y),C[Y]=a(C[Y]^R),C[Y+1]=a(C[Y+1]^I),C[Y+2]=a(C[Y+2]^M),C[Y+3]=a(C[Y+3]^F),R=U,I=k,M=G,F=V;return A;};class u{constructor(E,S,P,D){let A=u.STEP,C=new Int32Array(E.buffer),R=new Uint8Array(E.byteLength),I=0;for(this.asyncStream_=new s(),this.asyncStream_.push(this.decryptChunk_(C.subarray(I,I+A),S,P,R)),I=A;I<C.length;I+=A)P=new Uint32Array([a(C[I-4]),a(C[I-3]),a(C[I-2]),a(C[I-1])]),this.asyncStream_.push(this.decryptChunk_(C.subarray(I,I+A),S,P,R));this.asyncStream_.push(function(){D(null,e(R));});}static get STEP(){return 32e3;}decryptChunk_(E,S,P,D){return function(){let A=o(E,S,P);D.set(A,E.byteOffset);};}}var c=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},p;typeof window<"u"?p=window:typeof c<"u"?p=c:typeof self<"u"?p=self:p={};var _=p,T=function(E){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(E):E&&E.buffer instanceof ArrayBuffer;},y=_.BigInt||Number;y("0x1"),y("0x100"),y("0x10000"),y("0x1000000"),y("0x100000000"),y("0x10000000000"),y("0x1000000000000"),y("0x100000000000000"),y("0x10000000000000000"),function(){var g=new Uint16Array([65484]),E=new Uint8Array(g.buffer,g.byteOffset,g.byteLength);return E[0]===255?"big":E[0]===204?"little":"unknown";}();let b=function(g){let E={};return Object.keys(g).forEach(S=>{let P=g[S];T(P)?E[S]={bytes:P.buffer,byteOffset:P.byteOffset,byteLength:P.byteLength}:E[S]=P;}),E;};self.onmessage=function(g){let E=g.data,S=new Uint8Array(E.encrypted.bytes,E.encrypted.byteOffset,E.encrypted.byteLength),P=new Uint32Array(E.key.bytes,E.key.byteOffset,E.
212key.byteLength/4),D=new Uint32Array(E.iv.bytes,E.iv.byteOffset,E.iv.byteLength/4);new u(S,P,D,function(A,C){self.postMessage(b({source:E.source,decrypted:C}),[C.buffer]);});};})),dR=jT(uR),cR=t=>{let e=t.default?"main":"alternative";return t.characteristics&&t.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e;},QT=(t,e)=>{t.abort(),t.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null);},ip=(t,e)=>{e.activePlaylistLoader=t,t.load();},hR=(t,e)=>()=>{let{segmentLoaders:{[t]:i,main:n},mediaTypes:{[t]:r}}=e,s=r.activeTrack(),a=r.getActiveGroup(),o=r.activePlaylistLoader,u=r.lastGroup_;if(!(a&&u&&a.id===u.id)&&(r.lastGroup_=a,r.lastTrack_=s,QT(i,r),!(!a||a.isMainPlaylist))){if(!a.playlistLoader){o&&n.resetEverything();return;}i.resyncLoader(),ip(a.playlistLoader,r);}},fR=(t,e)=>()=>{let{segmentLoaders:{[t]:i},mediaTypes:{[t]:n}}=e;n.lastGroup_=null,i.abort(),i.pause();},pR=(t,e)=>()=>{let{mainPlaylistLoader:i,segmentLoaders:{[t]:n,main:r},mediaTypes:{[t]:s}}=e,a=s.activeTrack(),o=s.getActiveGroup(),u=s.activePlaylistLoader,c=s.lastTrack_;if(!(c&&a&&c.id===a.id)&&(s.lastGroup_=o,s.lastTrack_=a,QT(n,s),!!o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;let p=e.vhs.playlistController_,_=p.selectPlaylist();if(p.media()===_)return;s.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),r.resetEverything(),p.fastQualityChange_(_);return;}if(t==="AUDIO"){if(!o.playlistLoader){r.setAudio(!0),r.resetEverything();return;}n.setAudio(!0),r.setAudio(!1);}if(u===o.playlistLoader){ip(o.playlistLoader,s);return;}n.track&&n.track(a),n.resetEverything(),ip(o.playlistLoader,s);}},Sd={AUDIO:(t,e)=>()=>{let{mediaTypes:{[t]:i},excludePlaylist:n}=e,r=i.activeTrack(),s=i.activeGroup(),a=(s.filter(u=>u.default)[0]||s[0]).id,o=i.tracks[a];if(r===o){n({error:{message:"Problem encountered loading the default audio track."}});return;}N.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(let u in i.tracks)i.tracks[u].enabled=i.tracks[u]===o;i.onTrackChanged();},SUBTITLES:(t,e)=>()=>{let{mediaTypes:{[t]:i}}=e;N.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");let n=i.activeTrack();n&&(n.mode="disabled"),i.onTrackChanged();}},gb={AUDIO:(t,e,i)=>{if(!e)return;let{tech:n,requestOptions:r,segmentLoaders:{[t]:s}}=i;e.on("loadedmetadata",()=>{let a=e.media();s.playlist(a,r),(!n.paused()||a.endList&&n.preload()!=="none")&&s.load();}),e.on("loadedplaylist",()=>{s.playlist(e.media(),r),n.paused()||s.load();}),e.on("error",Sd[t](t,i));},SUBTITLES:(t,e,i)=>{let{tech:n,requestOptions:r,segmentLoaders:{[t]:s},mediaTypes:{[t]:a}}=i;e.on("loadedmetadata",()=>{let o=e.media();s.playlist(o,r),s.track(a.activeTrack()),(!n.paused()||o.endList&&n.preload()!=="none")&&s.load();}),e.on("loadedplaylist",()=>{s.playlist(e.media(),r),n.paused()||s.load();}),e.on("error",Sd[t](t,i));}},mR={AUDIO:(t,e)=>{let{vhs:i,sourceType:n,segmentLoaders:{[t]:r},requestOptions:s,main:{mediaGroups:a},mediaTypes:{[t]:{groups:o,tracks:u,logger_:c}},mainPlaylistLoader:p}=e,_=Eo(p.main);(!a[t]||Object.keys(a[t]).length===0)&&(a[t]={main:{default:{default:!0}}},_&&(a[t].main.default.playlists=p.main.playlists));for(let T in a[t]){o[T]||(o[T]=[]);for(let y in a[t][T]){let b=a[t][T][y],g;if(_?(c(`AUDIO group '${T}' label '${y}' is a main playlist`),b.isMainPlaylist=!0,g=null):n==="vhs-json"&&b.playlists?g=new Jn(b.playlists[0],i,s):b.resolvedUri?g=new Jn(b.resolvedUri,i,s):b.playlists&&n==="dash"?g=new To(b.playlists[0],i,s,p):g=null,b=Ae({id:y,playlistLoader:g},b),gb[t](t,b.playlistLoader,e),o[T].push(b),typeof u[y]>"u"){let E=new N.AudioTrack({id:y,kind:cR(b),enabled:!1,language:b.language,default:b.default,label:y});u[y]=E;}}}r.on("error",Sd[t](t,e));},SUBTITLES:(t,e)=>{let{tech:i,vhs:n,sourceType:r,segmentLoaders:{[t]:s},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[t]:{groups:u,tracks:c}},mainPlaylistLoader:p}=e;for(let _ in o[t]){u[_]||(u[_]=[]);for(let T in o[t][_]){if(!n.options_.useForcedSubtitles&&o[t][_][T].forced)continue;let y=o[t][_][T],b;if(r==="hls")b=new Jn(y.resolvedUri,n,a);else if(r==="dash"){if(!y.playlists.filter(E=>E.excludeUntil!==1/0).length)return;b=new To(y.playlists[0],n,a,p);}
212else r==="vhs-json"&&(b=new Jn(y.playlists?y.playlists[0]:y.resolvedUri,n,a));if(y=Ae({id:T,playlistLoader:b},y),gb[t](t,y.playlistLoader,e),u[_].push(y),typeof c[T]>"u"){let g=i.addRemoteTextTrack({id:T,kind:"subtitles",default:y.default&&y.autoselect,language:y.language,label:T},!1).track;c[T]=g;}}}s.on("error",Sd[t](t,e));},"CLOSED-CAPTIONS":(t,e)=>{let{tech:i,main:{mediaGroups:n},mediaTypes:{[t]:{groups:r,tracks:s}}}=e;for(let a in n[t]){r[a]||(r[a]=[]);for(let o in n[t][a]){let u=n[t][a][o];if(!/^(?:CC|SERVICE)/.test(u.instreamId))continue;let c=i.options_.vhs&&i.options_.vhs.captionServices||{},p={label:o,language:u.language,instreamId:u.instreamId,default:u.default&&u.autoselect};if(c[p.instreamId]&&(p=Ae(p,c[p.instreamId])),p.default===void 0&&delete p.default,r[a].push(Ae({id:o},u)),typeof s[o]>"u"){let _=i.addRemoteTextTrack({id:p.instreamId,kind:"captions",default:p.default,language:p.language,label:p.label},!1).track;s[o]=_;}}}}},JT=(t,e)=>{for(let i=0;i<t.length;i++)if(Tp(e,t[i])||t[i].playlists&&JT(t[i].playlists,e))return!0;return!1;},gR=(t,e)=>i=>{let{mainPlaylistLoader:n,mediaTypes:{[t]:{groups:r}}}=e,s=n.media();if(!s)return null;let a=null;s.attributes[t]&&(a=r[s.attributes[t]]);let o=Object.keys(r);if(!a)if(t==="AUDIO"&&o.length>1&&Eo(e.main))for(let u=0;u<o.length;u++){let c=r[o[u]];if(JT(c,s)){a=c;break;}}else r.main?a=r.main:o.length===1&&(a=r[o[0]]);return typeof i>"u"?a:i===null||!a?null:a.filter(u=>u.id===i.id)[0]||null;},vR={AUDIO:(t,e)=>()=>{let{mediaTypes:{[t]:{tracks:i}}}=e;for(let n in i)if(i[n].enabled)return i[n];return null;},SUBTITLES:(t,e)=>()=>{let{mediaTypes:{[t]:{tracks:i}}}=e;for(let n in i)if(i[n].mode==="showing"||i[n].mode==="hidden")return i[n];return null;}},_R=(t,{mediaTypes:e})=>()=>{let i=e[t].activeTrack();return i?e[t].activeGroup(i):null;},yR=t=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(c=>{mR[c](c,t);});let{mediaTypes:e,mainPlaylistLoader:i,tech:n,vhs:r,segmentLoaders:{["AUDIO"]:s,main:a}}=t;["AUDIO","SUBTITLES"].forEach(c=>{e[c].activeGroup=gR(c,t),e[c].activeTrack=vR[c](c,t),e[c].onGroupChanged=hR(c,t),e[c].onGroupChanging=fR(c,t),e[c].onTrackChanged=pR(c,t),e[c].getActiveGroup=_R(c,t);});let o=e.AUDIO.activeGroup();if(o){let c=(o.filter(_=>_.default)[0]||o[0]).id;e.AUDIO.tracks[c].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),s.setAudio(!0)):a.setAudio(!0);}i.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(c=>e[c].onGroupChanged());}),i.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(c=>e[c].onGroupChanging());});let u=()=>{e.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"vhs-audio-change"});};n.audioTracks().addEventListener("change",u),n.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),r.on("dispose",()=>{n.audioTracks().removeEventListener("change",u),n.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged);}),n.clearTracks("audio");for(let c in e.AUDIO.tracks)n.audioTracks().addTrack(e.AUDIO.tracks[c]);},bR=()=>{let t={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{t[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Sn,activeTrack:Sn,getActiveGroup:Sn,onGroupChanged:Sn,onTrackChanged:Sn,lastTrack_:null,logger_:yi(`MediaGroups[${e}]`)};}),t;},Ad=class{constructor(){this.priority_=[],this.pathwayClones_=new Map();}set version(e){e===1&&(this.version_=e);}set ttl(e){this.ttl_=e||300;}set reloadUri(e){e&&(this.reloadUri_=Jt(this.reloadUri_,e));}set priority(e){e&&e.length&&(this.priority_=e);}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(i=>[i.ID,i])));}get version(){return this.version_;}get ttl(){return this.ttl_;}get reloadUri(){return this.reloadUri_;}get priority(){return this.priority_;}get pathwayClones(){return this.pathwayClones_;}},np=class extends N.EventTarget{constructor(e,i){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set(),this.steeringManifest=new Ad(),this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map(),this.nextPathwayClones=new Map(),this.excludedSteeringManifestURLs=new Set(),this.logger_=yi("Content Steering"),this.xhr_=e,this.getBandwidth_=i;}assignTagProperties(e,i){this.manifestType_=i.serverUri?"HLS":"DASH";let n=i.serverUri||i.serverURL;if(!n){this.logger_(`steering manifest URL is ${n}, cannot request steering manifest.`),this.trigger("error");return;}if(n.startsWith("data:")){this.decodeDataUriManifest_(n.substring(n.indexOf(",")+1));return;}this.steeringManifest.reloadUri=Jt(e,n),this.defaultPathway=i.pathwayId||i.defaultServiceLocation,this.queryBeforeStart=i.queryBeforeStart,this.proxyServerUrl_=i.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering");}requestSteeringManifest(e){let i=this.steeringManifest.reloadUri;if(!i)return;let n=e?i:this.getRequestURI(i);if(!n){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return;}let r={contentSteeringInfo:{uri:n}};this.trigger({type:"contentsteeringloadstart",metadata:r}),this.request_=this.xhr_({uri:n,requestType:"content-steering-manifest"},(s,a)=>
212{if(s){if(a.status===410){this.logger_(`manifest request 410 ${s}.`),this.logger_(`There will be no more content steering requests to ${n} this session.`),this.excludedSteeringManifestURLs.add(n);return;}if(a.status===429){let c=a.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${s}.`),this.logger_(`content steering will retry in ${c} seconds.`),this.startTTLTimeout_(parseInt(c,10));return;}this.logger_(`manifest failed to load ${s}.`),this.startTTLTimeout_();return;}this.trigger({type:"contentsteeringloadcomplete",metadata:r});let o;try{o=JSON.parse(this.request_.responseText);}catch(c){let p={errorType:N.Error.StreamingContentSteeringParserError,error:c};this.trigger({type:"error",metadata:p});}this.assignSteeringProperties_(o);let u={contentSteeringInfo:r.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:u}),this.startTTLTimeout_();});}setProxyServerUrl_(e){let i=new j.default.URL(e),n=new j.default.URL(this.proxyServerUrl_);return n.searchParams.set("url",encodeURI(i.toString())),this.setSteeringParams_(n.toString());}decodeDataUriManifest_(e){let i=JSON.parse(j.default.atob(e));this.assignSteeringProperties_(i);}setSteeringParams_(e){let i=new j.default.URL(e),n=this.getPathway(),r=this.getBandwidth_();if(n){let s=`_${this.manifestType_}_pathway`;i.searchParams.set(s,n);}if(r){let s=`_${this.manifestType_}_throughput`;i.searchParams.set(s,r);}return i.toString();}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version){this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),this.trigger("error");return;}this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());let n=(r=>{for(let s of r)if(this.availablePathways_.has(s))return s;return[...this.availablePathways_][0];})(this.steeringManifest.priority);this.currentPathway!==n&&(this.currentPathway=n,this.trigger("content-steering"));}getPathway(){return this.currentPathway||this.defaultPathway;}getRequestURI(e){if(!e)return null;let i=r=>this.excludedSteeringManifestURLs.has(r);if(this.proxyServerUrl_){let r=this.setProxyServerUrl_(e);if(!i(r))return r;}let n=this.setSteeringParams_(e);return i(n)?null:n;}startTTLTimeout_(e=this.steeringManifest.ttl){let i=e*1e3;this.ttlTimeout_=j.default.setTimeout(()=>{this.requestSteeringManifest();},i);}clearTTLTimeout_(){j.default.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null;}abort(){this.request_&&this.request_.abort(),this.request_=null;}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set(),this.availablePathways_=new Set(),this.steeringManifest=new Ad();}addAvailablePathway(e){e&&this.availablePathways_.add(e);}clearAvailablePathways(){this.availablePathways_.clear();}excludePathway(e){return this.availablePathways_.delete(e);}didDASHTagChange(e,i){return!i&&this.steeringManifest.reloadUri||i&&(Jt(e,i.serverURL)!==this.steeringManifest.reloadUri||i.defaultServiceLocation!==this.defaultPathway||i.queryBeforeStart!==this.queryBeforeStart||i.proxyServerURL!==this.proxyServerUrl_);}getAvailablePathways(){return this.availablePathways_;}},TR=(t,e)=>{let i=null;return(...n)=>{clearTimeout(i),i=setTimeout(()=>{t.apply(null,n);},e);};},SR=10,AR=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],ER=function(t){return this.audioSegmentLoader_[t]+this.mainSegmentLoader_[t];},xR=function({currentPlaylist:t,buffered:e,currentTime:i,nextPlaylist:n,bufferLowWaterLine:r,bufferHighWaterLine:s,duration:a,bufferBasedABR:o,log:u}){if(!n)return N.log.warn("We received no playlist to switch to. Please check your stream."),!1;let c=`allowing switch ${t&&t.id||"null"} -> ${n.id}`;if(!t)return u(`${c} as current playlist is not set`),!0;if(n.id===t.id)return!1;let p=!!As(e,i).length;if(!t.endList)return!p&&typeof t.partTargetDuration=="number"?(u(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(u(`${c} as current playlist is live`),!0);let _=_p(e,i),T=o?pt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:pt.MAX_BUFFER_LOW_WATER_LINE;if(a<T)return u(`${c} as duration < max low water line (${a} < ${T})`),!0;let y=n.attributes.BANDWIDTH,b=t.attributes.BANDWIDTH;if(y<b&&(!o||_<s)){let g=`${c} as next bandwidth < current bandwidth (${y} < ${b})`;return o&&(g+=` and forwardBuffer < bufferHighWaterLine (${_} < ${s})`),u(g),!0;}if((!o||y>b)&&_>=r){let g=`${c} as forwardBuffer >= bufferLowWaterLine (${_} >= ${r})`;return o&&(g+=` and next bandwidth > current bandwidth (${y} > ${b})`),u(g),!0;}return u(`not ${c} as no switching criteria met`),!1;},rp=class extends N.EventTarget{constructor(e){super(),this.fastQualityChange_=TR(this.fastQualityChange_.bind(this),100);let{src:i,withCredentials:n,tech:r,bandwidth:s,externVhs:a,useCueTags:o,playlistExclusionDuration:u,enableLowInitialPlaylist:c,sourceType:p,cacheEncryptionKeys:_,bufferBasedABR:T,leastPixelDiffSelector:y,captionServices:b,experimentalUseMMS:g}=e;if(!i)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:E}=e;(E===null||typeof E>"u")&&(E=1/0),Yn=a,this.bufferBasedABR=!!T,this.leastPixelDiffSelector=!!y,this.withCredentials=n,this.tech_=r,this.vhs_=r.vhs,this.player_=e.player_,this.sourceType_=p,this.useCueTags_=o,this.playlistExclusionDuration=u,this.maxPlaylistRetries=E,this.enableLowInitialPlaylist=c,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:n,maxPlaylistRetries:E,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=bR(),g&&j.default.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new j.default.ManagedMediaSource(),this.usingManagedMediaSource_=!0,N.log("Using ManagedMediaSource")):j.default.MediaSource&&(this.mediaSource=new j.default.MediaSource()),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=mt(),this.hasPlayed_=!1,this.syncController_=new ep(e),this.segmentMetadataTrack_=r.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new dR(),this.sourceUpdater_=new _d(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new tp(),this.keyStatusMap_=new Map();let S={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:b,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:s,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:_,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new To(i,this.vhs_,Ae(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Jn(i,this.vhs_,Ae(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new So(Ae(S,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new So(Ae(S,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new Jf(Ae(S,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((A,C)=>{function R(){r.off("vttjserror",I),A();}function I(){r.off("vttjsloaded",R),C();}r.one("vttjsloaded",R),r.one("vttjserror",I),r.addWebVttScript_();})}),e);let P=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new np(this.vhs_.xhr,P),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),AR.forEach(A=>{this[A+"_"]=ER.bind(this,A);}),this.logger_=yi("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load();},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;let D=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(D,()=>{let A=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-A,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends;});});}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__;}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__;}appendsToLoadedData_(){let e=this.mainAppendsToLoadedData_(),i=this.audioAppendsToLoadedData_();return e===-1||i===-1?-1:e+i;}timeToLoadedData_(){return this.timeToLoadedData__;}checkABR_(e="abr"){let i=this.selectPlaylist();i&&this.shouldSwitchToMedia_(i)&&this.switchMedia_(i,e);}switchMedia_(e,i,n){let r=this.media(),s=r&&(r.id||r.uri),a=e&&(e.id||e.uri);if(s&&s!==a){this.logger_(`switch media ${s} -> ${a} from ${i}`);let o={renditionInfo:{id:a,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:i};this.trigger({type:"renditionselected",metadata:o}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${i}`});}this.mainPlaylistLoader_.media(e,n);}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e
212=>{let i=this.mediaTypes_[e],n=i?i.activeGroup():null,r=this.contentSteeringController_.getPathway();if(n&&r){let a=(n.length?n[0].playlists:n.playlists).filter(o=>o.attributes.serviceLocation===r);a.length&&this.mediaTypes_[e].activePlaylistLoader.media(a[0]);}});}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=j.default.setInterval(()=>this.checkABR_(),250);}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(j.default.clearInterval(this.abrTimer_),this.abrTimer_=null);}getAudioTrackPlaylists_(){let e=this.main(),i=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return i;let n=e.mediaGroups.AUDIO,r=Object.keys(n),s;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)s=this.mediaTypes_.AUDIO.activeTrack();else{let o=n.main||r.length&&n[r[0]];for(let u in o)if(o[u].default){s={label:u};break;}}if(!s)return i;let a=[];for(let o in n)if(n[o][s.label]){let u=n[o][s.label];if(u.playlists&&u.playlists.length)a.push.apply(a,u.playlists);else if(u.uri)a.push(u);else if(e.playlists.length)for(let c=0;c<e.playlists.length;c++){let p=e.playlists[c];p.attributes&&p.attributes.AUDIO&&p.attributes.AUDIO===o&&a.push(p);}}return a.length?a:i;}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{let i=this.mainPlaylistLoader_.media(),n=i.targetDuration*1.5*1e3;Hf(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=n,i.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(i,this.requestOptions_),this.mainSegmentLoader_.load()),yR({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),i),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia");});}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let i=this.mainPlaylistLoader_.media();if(!i){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let n;if(this.enableLowInitialPlaylist&&(n=this.selectInitialPlaylist()),n||(n=this.selectPlaylist()),!n||!this.shouldSwitchToMedia_(n)||(this.initialMedia_=n,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;i=this.initialMedia_;}this.handleUpdatedMediaPlaylist(i);}),this.mainPlaylistLoader_.on("error",()=>{let i=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:i.playlist,error:i});}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause();}),this.mainPlaylistLoader_.on("mediachange",()=>{let i=this.mainPlaylistLoader_.media(),n=i.targetDuration*1.5*1e3;Hf(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=n,this.sourceType_==="dash"&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(i,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0});}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{let i=this.mainPlaylistLoader_.media();if(i.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(i)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"));}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"});}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"});}),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(i=>
212{this.mainPlaylistLoader_.on(i,n=>{this.player_.trigger(Ge({},n));});});}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load());}triggerPresenceUsage_(e,i){let n=e.mediaGroups||{},r=!0,s=Object.keys(n.AUDIO);for(let a in n.AUDIO)for(let o in n.AUDIO[a])n.AUDIO[a][o].uri||(r=!1);r&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(n.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Yn.Playlist.isAes(i)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),s.length&&Object.keys(n.AUDIO[s[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"});}shouldSwitchToMedia_(e){let i=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,n=this.tech_.currentTime(),r=this.bufferLowWaterLine(),s=this.bufferHighWaterLine(),a=this.tech_.buffered();return xR({buffered:a,currentTime:n,currentPlaylist:i,nextPlaylist:e,bufferLowWaterLine:r,bufferHighWaterLine:s,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_});}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate");}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load();}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress");}),this.mainSegmentLoader_.on("error",()=>{let n=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:n.playlist,error:n});}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error");}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_();}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"});}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_();}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error");}),this.mainSegmentLoader_.on("ended",()=>
212{this.logger_("main segment loader ended"),this.onEndOfStream();}),this.timelineChangeController_.on("audioTimelineBehind",()=>{let n=this.audioSegmentLoader_.pendingSegment_;if(!n||!n.segment||!n.segment.syncInfo)return;let r=n.segment.syncInfo.end+.01;this.tech_.setCurrentTime(r);}),this.timelineChangeController_.on("fixBadTimelineChange",()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load();}),this.mainSegmentLoader_.on("earlyabort",n=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:SR}));});let e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();let n=this.getCodecsOrExclude_();n&&this.sourceUpdater_.addOrChangeSourceBuffers(n);};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0);}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0);}),this.audioSegmentLoader_.on("ended",()=>
212{this.logger_("audioSegmentLoader ended"),this.onEndOfStream();}),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(n=>{this.mainSegmentLoader_.on(n,r=>{this.player_.trigger(Ge({},r));}),this.audioSegmentLoader_.on(n,r=>{this.player_.trigger(Ge({},r));}),this.subtitleSegmentLoader_.on(n,r=>{this.player_.trigger(Ge({},r));});});}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded);}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load();}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause();}fastQualityChange_(e=this.selectPlaylist()){if(e&&e===this.mainPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return;}this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0;}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load();}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();let e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0))return this.tech_.setCurrentTime(e.end(e.length-1));}setupFirstPlay(){let e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){let i=this.seekable();if(!i.length)return!1;let n=i.end(0),r=n;if(e.start){let s=e.start.timeOffset;s<0?r=Math.max(n+s,i.start(0)):r=Math.min(n,s);}this.trigger("firstplay"),this.tech_.setCurrentTime(r);}return this.hasPlayed_=!0,this.load(),!0;}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){let e=this.tech_.play();typeof e<"u"&&typeof e.then=="function"&&e.then(null,i=>{});}this.trigger("sourceopen");}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;let e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;let i=this.duration();e[e.length-1].endTime=isNaN(i)||Math.abs(i)===1/0?Number.MAX_VALUE:i;}handleDurationChange_(){this.tech_.trigger("durationchange");}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){let i=this.mainSegmentLoader_.getCurrentMediaInfo_();!i||i.hasVideo?e=e&&this.audioSegmentLoader_.ended_:e=this.audioSegmentLoader_.ended_;}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream());}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;let n=this.syncController_.getExpiredTime(e,this.duration());if(n===null)return!1;let r=Yn.Playlist.playlistEnd(e,n),s=this.tech_.currentTime(),a=this.tech_.buffered();if(!a.length)return r-s<=Ki;let o=a.end(a.length-1);return o-s<=Ki&&r-o<=Ki;}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:i={},playlistExclusionDuration:n}){if(e=e||this.mainPlaylistLoader_.media(),n=n||i.playlistExclusionDuration||this.playlistExclusionDuration,!e){this.error=i,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return;}e.playlistErrors_++;let r=this.mainPlaylistLoader_.main.playlists,s=r.filter(Fd),a=s.length===1&&s[0]===e;if(r.length===1&&n!==1/0)return N.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(a);if(a){if(this.main().contentSteering){let b=this.pathwayAttribute_(e),g=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(b),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(b);},g);return;}let y=!1;r.forEach(b=>{if(b===e)return;let g=b.excludeUntil;typeof g<"u"&&g!==1/0&&(y=!0,delete b.excludeUntil);}),y&&(N.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"));}let o;e.playlistErrors_>this.maxPlaylistRetries?o=1/0:o=Date.now()+n*1e3,e.excludeUntil=o,i.reason&&(e.lastExcludeReason_=i.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});let u=this.selectPlaylist();if(!u){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return;}let c=i.internal?this.logger_:N.log.warn,p=i.message?" "+i.message:"";c(`${i.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${p} Switching to playlist ${u.id}.`),u.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),u.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);let _=u.targetDuration/2*1e3||5*1e3,T=typeof u.lastRequest=="number"&&Date.now()-u.lastRequest<=_;return this.switchMedia_(u,"exclude",a||T);}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_();}delegateLoaders_(e,i){let n=[],r=e==="all";(r||e==="main")&&n.push(this.mainPlaylistLoader_);let s=[];(r||e==="audio")&&s.push("AUDIO"),(r||e==="subtitle")&&(s.push("CLOSED-CAPTIONS"),s.push("SUBTITLES")),s.forEac
212h(a=>{let o=this.mediaTypes_[a]&&this.mediaTypes_[a].activePlaylistLoader;o&&n.push(o);}),["main","audio","subtitle"].forEach(a=>{let o=this[`${a}SegmentLoader_`];o&&(e===a||e==="all")&&n.push(o);}),n.forEach(a=>i.forEach(o=>{typeof a[o]=="function"&&a[o]();}));}setCurrentTime(e){let i=As(this.tech_.buffered(),e);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(i&&i.length)return e;this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load();}duration(){if(!this.mainPlaylistLoader_)return 0;let e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Yn.Playlist.duration(e):1/0:0;}seekable(){return this.seekable_;}getSeekableRange_(e,i){let n=e.media();if(!n)return null;let r=this.syncController_.getMediaSequenceSync(i);if(r&&r.isReliable){let o=r.start,u=r.end;if(!isFinite(o)||!isFinite(u))return null;let c=Yn.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n),p=Math.max(o,u-c);return mt([[o,p]]);}let s=this.syncController_.getExpiredTime(n,this.duration());if(s===null)return null;let a=Yn.Playlist.seekable(n,s,Yn.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n));return a.length?a:null;}computeFinalSeekable_(e,i){if(!i)return e;let n=e.start(0),r=e.end(0),s=i.start(0),a=i.end(0);return s>r||n>a?e:mt([[Math.max(n,s),Math.min(r,a)]]);}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;let e=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!e)return;let i;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(i=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!i))return;let n=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,i),!this.seekable_||n&&n.length&&this.seekable_.length&&n.start(0)===this.seekable_.start(0)&&n.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${dT(this.seekable_)}]`);let r={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:r}),this.tech_.trigger("seekablechanged");}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,e),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return;}if(e){let r=this.seekable();if(!r.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<r.end(r.length-1))&&this.sourceUpdater_.setDuration(r.end(r.length-1));return;}let i=this.tech_.buffered(),n=Yn.Playlist.duration(this.mainPlaylistLoader_.media());i.length>0&&(n=Math.max(n,i.end(i.length-1))),this.mediaSource.duration!==n&&this.sourceUpdater_.setDuration(n);}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{let i=this.mediaTypes_[e].groups;for(let n in i)i[n].forEach(r=>{r.playlistLoader&&r.playlistLoader.dispose();});}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off();}main(){return this.mainPlaylistLoader_.main;}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_;}areMediaTypesKnown_(){let e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,i=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),n=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!i||!n);}getCodecsOrExclude_(){let e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},i=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;let n=Ja(this.main(),i),r={},s=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(r.video=n.video||e.main.videoCodec||V0),e.main.isMuxed&&(r.video+=`,${n.audio||e.main.audioCodec||fh}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||s)&&(r.audio=n.audio||e.main.audioCodec||e.audio.audioCodec||fh,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!r.audio&&!r.video){this.excludePlaylist({playlistToExclude:i,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return;}let a=(c,p)=>c?as(p,this.usingManagedMediaSource_):Ql(p),o={},u;if(["video","audio"].forEach(function(c){if(r.hasOwnProperty(c)&&!a(e[c].isFmp4,r[c])){let p=e[c].isFmp4?"browser":"muxer";o[p]=o[p]||[],o[p].push(r[c]),c==="audio"&&(u=p);}}),s&&u&&i.attributes.AUDIO){let c=i.attributes.AUDIO;
212this.main().playlists.forEach(p=>{(p.attributes&&p.attributes.AUDIO)===c&&p!==i&&(p.excludeUntil=1/0);}),this.logger_(`excluding audio group ${c} as ${u} does not support codec(s): "${r.audio}"`);}if(Object.keys(o).length){let c=Object.keys(o).reduce((p,_)=>(p&&(p+=", "),p+=`${_} does not support codec(s): "${o[_].join(",")}"`,p),"")+".";this.excludePlaylist({playlistToExclude:i,error:{internal:!0,message:c},playlistExclusionDuration:1/0});return;}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){let c=[];if(["video","audio"].forEach(p=>{let _=(Li(this.sourceUpdater_.codecs[p]||"")[0]||{}).type,T=(Li(r[p]||"")[0]||{}).type;_&&T&&_.toLowerCase()!==T.toLowerCase()&&c.push(`"${this.sourceUpdater_.codecs[p]}" -> "${r[p]}"`);}),c.length){this.excludePlaylist({playlistToExclude:i,error:{message:`Codec switching not supported: ${c.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return;}}return r;}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;let e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);let i=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(i);}excludeUnsupportedVariants_(){let e=this.main().playlists,i=[];Object.keys(e).forEach(n=>{let r=e[n];if(i.indexOf(r.id)!==-1)return;i.push(r.id);let s=Ja(this.main,r),a=[];s.audio&&!Ql(s.audio)&&!as(s.audio,this.usingManagedMediaSource_)&&a.push(`audio codec ${s.audio}`),s.video&&!Ql(s.video)&&!as(s.video,this.usingManagedMediaSource_)&&a.push(`video codec ${s.video}`),s.text&&s.text==="stpp.ttml.im1t"&&a.push(`text codec ${s.text}`),a.length&&(r.excludeUntil=1/0,this.logger_(`excluding ${r.id} for unsupported: ${a.join(", ")}`));});}excludeIncompatibleVariants_(e){let i=[],n=this.main().playlists,r=bo(Li(e)),s=tb(r),a=r.video&&Li(r.video)[0]||null,o=r.audio&&Li(r.audio)[0]||null;Object.keys(n).forEach(u=>{let c=n[u];if(i.indexOf(c.id)!==-1||c.excludeUntil===1/0)return;i.push(c.id);let p=[],_=Ja(this.mainPlaylistLoader_.main,c),T=tb(_);if(!(!_.audio&&!_.video)){if(T!==s&&p.push(`codec count "${T}" !== "${s}"`),!this.sourceUpdater_.canChangeType()){let y=_.video&&Li(_.video)[0]||null,b=_.audio&&Li(_.audio)[0]||null;y&&a&&y.type.toLowerCase()!==a.type.toLowerCase()&&p.push(`video codec "${y.type}" !== "${a.type}"`),b&&o&&b.type.toLowerCase()!==o.type.toLowerCase()&&p.push(`audio codec "${b.type}" !== "${o.type}"`);}p.length&&(c.excludeUntil=1/0,this.logger_(`excluding ${c.id}: ${p.join(" && ")}`));}});}updateAdCues_(e){let i=0,n=this.seekable();n.length&&(i=n.start(0)),oR(e,this.cueTagsTrack_,i);}goalBufferLength(){let e=this.tech_.currentTime(),i=pt.GOAL_BUFFER_LENGTH,n=pt.GOAL_BUFFER_LENGTH_RATE,r=Math.max(i,pt.MAX_GOAL_BUFFER_LENGTH);return Math.min(i+e*n,r);}bufferLowWaterLine(){let e=this.tech_.currentTime(),i=pt.BUFFER_LOW_WATER_LINE,n=pt.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(i,pt.MAX_BUFFER_LOW_WATER_LINE),s=Math.max(i,pt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(i+e*n,this.bufferBasedABR?s:r);}bufferHighWaterLine(){return pt.BUFFER_HIGH_WATER_LINE;}addDateRangesToTextTrack_(e){ub(this.inbandTextTracks_,"com.apple.streaming",this.tech_),qL({inbandTextTracks:this.inbandTextTracks_,dateRanges:e});}addMetadataToTextTrack(e,i,n){let r=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();ub(this.inbandTextTracks_,e,this.tech_),FL({inbandTextTracks:this.inbandTextTracks_,metadataArray:i,timestampOffset:r,videoDuration:n});}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation;}initContentSteeringController_(){let e=this.main();if(e.contentSteering){for(let i of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(i));if(this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart){this.contentSteeringController_.requestSteeringManifest(!0);return;}this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest();});}}
212resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_();}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(i=>{this.contentSteeringController_.on(i,n=>{this.trigger(Ge({},n));});}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{let i=this.main();(this.contentSteeringController_.didDASHTagChange(i.uri,i.contentSteering)||(()=>{let s=this.contentSteeringController_.getAvailablePathways(),a=[];for(let o of i.playlists){let u=o.attributes.serviceLocation;if(u&&(a.push(u),!s.has(u)))return!0;}return!!(!a.length&&s.size);})())&&this.resetContentSteeringController_();});}excludeThenChangePathway_(){let e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();let n=this.main().playlists,r=new Set(),s=!1;Object.keys(n).forEach(a=>{let o=n[a],u=this.pathwayAttribute_(o),c=u&&e!==u;o.excludeUntil===1/0&&o.lastExcludeReason_==="content-steering"&&!c&&(delete o.excludeUntil,delete o.lastExcludeReason_,s=!0);let _=!o.excludeUntil&&o.excludeUntil!==1/0;!r.has(o.id)&&c&&_&&(r.add(o.id),o.excludeUntil=1/0,o.lastExcludeReason_="content-steering",this.logger_(`excluding ${o.id} for ${o.lastExcludeReason_}`));}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(a=>{let o=this.mediaTypes_[a];if(o.activePlaylistLoader){let u=o.activePlaylistLoader.media_;u&&u.attributes.serviceLocation!==e&&(s=!0);}}),s&&this.changeSegmentPathway_();}handlePathwayClones_(){let i=this.main().playlists,n=this.contentSteeringController_.currentPathwayClones,r=this.contentSteeringController_.nextPathwayClones;if(n&&n.size||r&&r.size){for(let[a,o]of n.entries())r.get(a)||(this.mainPlaylistLoader_.updateOrDeleteClone(o),this.contentSteeringController_.excludePathway(a));for(let[a,o]of r.entries()){let u=n.get(a);if(!u){i.filter(p=>
212p.attributes["PATHWAY-ID"]===o["BASE-ID"]).forEach(p=>{this.mainPlaylistLoader_.addClonePathway(o,p);}),this.contentSteeringController_.addAvailablePathway(a);continue;}this.equalPathwayClones_(u,o)||(this.mainPlaylistLoader_.updateOrDeleteClone(o,!0),this.contentSteeringController_.addAvailablePathway(a));}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...r])));}}equalPathwayClones_(e,i){if(e["BASE-ID"]!==i["BASE-ID"]||e.ID!==i.ID||e["URI-REPLACEMENT"].HOST!==i["URI-REPLACEMENT"].HOST)return!1;let n=e["URI-REPLACEMENT"].PARAMS,r=i["URI-REPLACEMENT"].PARAMS;for(let s in n)if(n[s]!==r[s])return!1;for(let s in r)if(n[s]!==r[s])return!1;return!0;}changeSegmentPathway_(){let e=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering");}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0,i="non-usable";
212this.mainPlaylistLoader_.main.playlists.forEach(n=>{let r=this.mainPlaylistLoader_.getKeyIdSet(n);!r||!r.size||r.forEach(s=>{let a="usable",o=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===a,u=n.lastExcludeReason_===i&&n.excludeUntil===1/0;o?o&&u&&(delete n.excludeUntil,delete n.lastExcludeReason_,this.logger_(`enabling playlist ${n.id} because key ID ${s} is ${a}`)):(n.excludeUntil!==1/0&&n.lastExcludeReason_!==i&&(n.excludeUntil=1/0,n.lastExcludeReason_=i,this.logger_(`excluding playlist ${n.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${a}`)),e++);});}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(n=>{let r=n&&n.attributes&&n.attributes.RESOLUTION&&n.attributes.RESOLUTION.height<720,s=n.excludeUntil===1/0&&n.lastExcludeReason_===i;r&&s&&(delete n.excludeUntil,N.log.warn(`enabling non-HD playlist ${n.id} because all playlists were excluded due to ${i} key IDs`));});}addKeyStatus_(e,i){let s=(typeof e=="string"?e:sR(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${i}' with key ID ${s} added to the keyStatusMap`),this.keyStatusMap_.set(s,i);}updatePlaylistByKeyStatus(e,i){this.addKeyStatus_(e,i),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this));}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_();}},CR=(t,e,i)=>n=>{let r=t.main.playlists[e],s=bp(r),a=Fd(r);if(typeof n>"u")return a;n?delete r.disabled:r.disabled=!0;let o={renditionInfo:{id:e,bandwidth:r.attributes.BANDWIDTH,resolution:r.attributes.RESOLUTION,codecs:r.attributes.CODECS},cause:"fast-quality"};return n!==a&&!s&&(n?(i(r),t.trigger({type:"renditionenabled",metadata:o})):t.trigger({type:"renditiondisabled",metadata:o})),n;},sp=class{constructor(e,i,n){let{playlistController_:r}=e,s=r.fastQualityChange_.bind(r);if(i.attributes){let a=i.attributes.RESOLUTION;this.width=a&&a.width,this.height=a&&a.height,this.bandwidth=i.attributes.BANDWIDTH,this.frameRate=i.attributes["FRAME-RATE"];}this.codecs=Ja(r.main(),i),this.playlist=i,this.id=n,this.enabled=CR(e.playlists,i.id,s);}},wR=function(t){t.representations=()=>{let e=t.playlistController_.main(),i=Eo(e)?t.playlistController_.getAudioTrackPlaylists_():e.playlists;return i?i.filter(n=>!bp(n)).map((n,r)=>new sp(t,n,n.id)):[];};},vb=["seeking","seeked","pause","playing","error"],ap=class extends N.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=yi("PlaybackWatcher"),this.logger_("initialize");let i=()=>this.monitorCurrentTime_(),n=()=>this.monitorCurrentTime_(),r=()=>this.techWaiting_(),s=()=>this.resetTimeUpdate_(),a=this.playlistController_,o=["main","subtitle","audio"],u={};o.forEach(p=>{u[p]={reset:()=>this.resetSegmentDownloads_(p),updateend:()=>this.checkSegmentDownloads_(p)},a[`${p}SegmentLoader_`].on("appendsdone",u[p].updateend),a[`${p}SegmentLoader_`].on("playlistupdate",u[p].reset),this.tech_.on(["seeked","seeking"],u[p].reset);});let c=p=>{["main","audio"].forEach(_=>{a[`${_}SegmentLoader_`][p]("appended",this.seekingAppendCheck_);});};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),c("off"));},this.clearSeekingAppendCheck_=()=>c("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),c("on");},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",r),this.tech_.on(vb,s),this.tech_.on("canplay",n),this.tech_.one("play",i),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",r),this.tech_.off(vb,s),this.tech_.off("canplay",n),this.tech_.off("play",i),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),o.forEach(p=>{a[`${p}SegmentLoader_`].off("appendsdone",u[p].updateend),a[`${p}SegmentLoader_`].off("playlistupdate",u[p].reset),this.tech_.off(["seeked","seeking"],u[p].reset);}),this.checkCurrentTimeTimeout_&&j.default.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_();};}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&j.default.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=j.default.setTimeout(this.monitorCurrentTime_.bind(this),250);}resetSegmentDownloads_(e){let i=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=i.buffered_();}checkSegmentDownloads_(e){let i=this.playlistController_,n=i[`${e}SegmentLoader_`],r=n.buffered_(),s=TP(this[`${e}Buffered_`],r);if(this[`${e}Buffered_`]=r,s){let a={bufferedRanges:r};i.trigger({type:"bufferedrangeschanged",metadata:a}),this.resetSegmentDownloads_(e);return;}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:n.playlist_&&n.playlist_.id,buffered:Er(r)}),!(this[`${e}StalledDownloads_`]<10)&&(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),e!=="subtitle"&&i.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}));}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;let e=this.tech_.currentTime(),i=this.tech_.buffered();if(this.lastRecordedTime===e&&(!i.length||e+Ki>=i.end(i.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(mt([this.lastRecordedTime,e]));let n={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:n}),this.consecutiveUpdates=0,this.lastRecordedTime=e;}}resetTimeUpdate_(){this.consecutiveUpdates=0;}
212fixesBadSeeks_(){if(!this.tech_.seeking())return!1;let i=this.seekable(),n=this.tech_.currentTime(),r=this.afterSeekableWindow_(i,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow),s;if(r&&(s=i.end(i.length-1)),this.beforeSeekableWindow_(i,n)){let b=i.start(0);s=b+(b===i.end(0)?0:Ki);}if(typeof s<"u")return this.logger_(`Trying to seek outside of seekable at time ${n} with seekable range ${dT(i)}. Seeking to ${s}.`),this.tech_.setCurrentTime(s),!0;let a=this.playlistController_.sourceUpdater_,o=this.tech_.buffered(),u=a.audioBuffer?a.audioBuffered():null,c=a.videoBuffer?a.videoBuffered():null,p=this.media(),_=p.partTargetDuration?p.partTargetDuration:(p.targetDuration-Xi)*2,T=[u,c];for(let b=0;b<T.length;b++){if(!T[b])continue;if(_p(T[b],n)<_)return!1;}let y=_u(o,n);return y.length===0?!1:(s=y.start(0)+Ki,this.logger_(`Buffered region starts (${y.start(0)})  just beyond seek point (${n}). Seeking to ${s}.`),this.tech_.setCurrentTime(s),!0);}waiting_(){if(this.techWaiting_())return;let e=this.tech_.currentTime(),i=this.tech_.buffered(),n=As(i,e);if(n.length&&e+3<=n.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${n.start(0)} -> ${n.end(0)}]. Attempting to resume playback by seeking to the current time.`),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});return;}}techWaiting_(){let e=this.seekable(),i=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,i)){let o=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${i}. Seeking to live point (seekable end) ${o}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(o),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0;}let n=this.tech_.vhs.playlistController_.sourceUpdater_,r=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:n.audioBuffered(),videoBuffered:n.videoBuffered(),currentTime:i}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;let a=_u(r,i);return a.length>0?(this.logger_(`Stopped at ${i} and seeking to ${a.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(i),!0):!1;}afterSeekableWindow_(e,i,n,r=!1){if(!e.length)return!1;let s=e.end(e.length-1)+Ki,a=!n.endList,o=typeof n.partTargetDuration=="number";return a&&(o||r)&&(s=e.end(e.length-1)+n.targetDuration*3),i>s;}beforeSeekableWindow_(e,i){return!!(e.length&&e.start(0)>0&&i<e.start(0)-this.liveRangeSafeTimeDelta);}videoUnderflow_({videoBuffered:e,audioBuffered:i,currentTime:n}){if(!e)return;let r;if(e.length&&i.length){let s=As(e,n-3),a=As(e,n),o=As(i,n);o.length&&!a.length&&s.length&&(r={start:s.end(0),end:o.end(0)});}else _u(e,n).length||(r=this.gapFromVideoUnderflow_(e,n));return r?(this.logger_(`Encountered a gap in video from ${r.start} to ${r.end}. Seeking to current time ${n}`),!0):!1;}skipTheGap_(e){let i=this.tech_.buffered(),n=this.tech_.currentTime(),r=_u(i,n);if(this.resetTimeUpdate_(),r.length===0||n!==e)return;this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+Xi);let s={gapInfo:{from:n,to:r.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:s}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"});}gapFromVideoUnderflow_(e,i){let n=_P(e);for(let r=0;r<n.length;r++){let s=n.start(r),a=n.end(r);if(i-s<4&&i-s>2)return{start:s,end:a};}return null;}},DR={errorInterval:30,getSource(t){let i=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return t(i);}},ZT=function(t,e){let i=0,n=0,r=Ae(DR,e);t.ready(()=>{t.trigger({type:"usage",name:"vhs-error-reload-initialized"});});let s=function(){n&&t.currentTime(n);},a=function(p){p!=null&&(n=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",s),t.src(p),t.trigger({type:"usage",name:"vhs-error-reload"}),t.play());},o=function(){if(Date.now()-i<r.errorInterval*1e3){t.trigger({type:"usage",name:"vhs-error-reload-canceled"});return;}if(!r.getSource||typeof r.getSource!="function"){N.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return;}return i=Date.now(),r.getSource.call(t,a);},u=function(){t.off("loadedmetadata",s),t.off("error",o),t.off("dispose",u);},c=function(p){u(),ZT(t,p);};t.on("error",o),t.on("dispose",u),t.reloadSourceOnError=c;},IR=function(t){ZT(this,t);},eS="3.17.0",kR="7.1.0",PR="1.3.1",LR="7.2.0",RR="4.0.2",Ke={PlaylistLoader:Jn,Playlist:Zt,utils:WP,STANDARD_PLAYLIST_SELECTOR:lb,INITIAL_PLAYLIST_SELECTOR:OL,lastBandwidthSelector:lb,movingAverageBandwidthSelector:LL,comparePlaylistBandwidth:Ap,comparePlaylistResolution:PL,xhr:IT()};Object.keys(pt).forEach(t=>{Object.defineProperty(Ke,t,{get(){return N.log.warn(`using Vhs.${t}
212 is UNSAFE be sure you know what you are doing`),pt[t];},set(e){if(N.log.warn(`using Vhs.${t} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){N.log.warn(`value of Vhs.${t} must be greater than or equal to 0`);return;}pt[t]=e;}});});tS="videojs-vhs",iS=function(t,e){let i=e.media(),n=-1;for(let r=0;r<t.length;r++)if(t[r].id===i.id){n=r;break;}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"});},OR=function(t,e){e.representations().forEach(i=>{t.addQualityLevel(i);}),iS(t,e.playlists);};Ke.canPlaySource=function(){return N.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.");};NR=(t,e,i)=>{if(!t)return t;let n={};e&&e.attributes&&e.attributes.CODECS&&(n=bo(Li(e.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(n.audio=i.attributes.CODECS);let r=_r(n.video),s=_r(n.audio),a={};for(let o in t)a[o]={},s&&(a[o].audioContentType=s),r&&(a[o].videoContentType=r),e.contentProtection&&e.contentProtection[o]&&e.contentProtection[o].pssh&&(a[o].pssh=e.contentProtection[o].pssh),typeof t[o]=="string"&&(a[o].url=t[o]);return Ae(t,a);},jR=(t,e)=>t.reduce((i,n)=>{if(!n.contentProtection)return i;let r=e.reduce((s,a)=>{let o=n.contentProtection[a];return o&&o.pssh&&(s[a]={pssh:o.pssh}),s;},{});return Object.keys(r).length&&i.push(r),i;},[]),MR=({player:t,sourceKeySystems:e,audioMedia:i,mainPlaylists:n})=>{if(!t.eme.initializeMediaKeys)return Promise.resolve();let r=i?n.concat([i]):n,s=jR(r,Object.keys(e)),a=[],o=[];return s.forEach(u=>{o.push(new Promise((c,p)=>{t.tech_.one("keysessioncreated",c);})),a.push(new Promise((c,p)=>{t.eme.initializeMediaKeys({keySystems:u},_=>{if(_){p(_);return;}c();});}));}),Promise.race([Promise.all(a),Promise.race(o)]);},BR=({player:t,sourceKeySystems:e,media:i,audioMedia:n})=>{let r=NR(e,i,n);return r?(t.currentSource().keySystems=r,r&&!t.eme?(N.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1;},nS=()=>{if(!j.default.localStorage)return null;let t=j.default.localStorage.getItem(tS);if(!t)return null;try{return JSON.parse(t);}catch{return null;}},FR=t=>{if(!j.default.localStorage)return!1;let e=nS();e=e?Ae(e,t):t;try{j.default.localStorage.setItem(tS,JSON.stringify(e));}catch{return!1;}return e;},UR=t=>t.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(t.substring(t.indexOf(",")+1)):t,rS=(t,e)=>{t._requestCallbackSet||(t._requestCallbackSet=new Set()),t._requestCallbackSet.add(e);},sS=(t,e)=>{t._responseCallbackSet||(t._responseCallbackSet=new Set()),t._responseCallbackSet.add(e);},aS=(t,e)=>{t._requestCallbackSet&&(t._requestCallbackSet.delete(e),t._requestCallbackSet.size||delete t._requestCallbackSet);},oS=(t,e)=>{t._responseCallbackSet&&(t._responseCallbackSet.delete(e),t._responseCallbackSet.size||delete t._responseCallbackSet);};Ke.supportsNativeHls=function(){if(!W.default||!W.default.createElement)return!1;let t=W.default.createElement("video");return N.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(i){return /maybe|probably/i.test(t.canPlayType(i));}):!1;}();Ke.supportsNativeDash=function(){return!W.default||!W.default.createElement||!N.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(W.default.createElement("video").canPlayType("application/dash+xml"));}();Ke.supportsTypeNatively=t=>t==="hls"?Ke.supportsNativeHls:t==="dash"?Ke.supportsNativeDash:!1;Ke.isSupported=function(){return N.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.");};Ke.xhr.onRequest=function(t){rS(Ke.xhr,t);};Ke.xhr.onResponse=function(t){sS(Ke.xhr,t);};Ke.xhr.offRequest=function(t){aS(Ke.xhr,t);};Ke.xhr.offResponse=function(t){oS(Ke.xhr,t);};VR=N.getComponent("Component"),Ed=class extends VR{constructor(e,i,n){if(super(i,n.vhs),typeof n.initialBandwidth=="number"&&(this.options_.bandwidth=n.initialBandwidth),this.logger_=yi("VhsHandler"),i.options_&&i.options_.playerId){let r=N.getPlayer(i.options_.playerId);this.player_=r;}if(this.tech_=i,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&i.overrideNativeAudioTracks&&i.overrideNativeVideoTracks)i.overrideNativeAudioTracks(!0),i.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(i.featuresNativeVideoTracks||i.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(W.default,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],r=>{let s=W.default.fullscreenElement||W.default.webkitFullscreenElement||W.default.mozFullScreenElement||W.default.msFullscreenElement;s&&s.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_();}),this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return;}this.setCurrentTime(this.tech_.currentTime());}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading();}),this.on(this.tech_,"play",this.play);}setOptions_(e={}){if(this.options_=Ae(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||
212!1,this.options_.useNetworkInformationApi=typeof this.options_.useNetworkInformationApi<"u"?this.options_.useNetworkInformationApi:!0,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){let n=nS();n&&n.bandwidth&&(this.options_.bandwidth=n.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),n&&n.throughput&&(this.options_.throughput=n.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}));}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=pt.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===pt.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(n=>{typeof this.source_[n]<"u"&&(this.options_[n]=this.source_[n]);}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;let i=this.options_.customPixelRatio;typeof i=="number"&&i>=0&&(this.customPixelRatio=i);}setOptions(e={}){this.setOptions_(e);}src(e,i){if(!e)return;this.setOptions_(),this.options_.src=UR(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Ke,this.options_.sourceType=ph(i),this.options_.seekTo=s=>{this.tech_.setCurrentTime(s);},this.options_.player_=this.player_,this.playlistController_=new rp(this.options_);let n=Ae({liveRangeSafeTimeDelta:Ki},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new ap(n),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{let s=N.players[this.tech_.options_.playerId],a=this.playlistController_.error;typeof a=="object"&&!a.code?a.code=3:typeof a=="string"&&(a={message:a,code:3}),s.error(a);});let r=this.options_.bufferBasedABR?Ke.movingAverageBandwidthSelector(.55):Ke.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):r.bind(this),this.playlistController_.selectInitialPlaylist=Ke.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist;},set(s){this.playlistController_.selectPlaylist=s.bind(this);}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate;},set(s){this.playlistController_.mainSegmentLoader_.throughput.rate=s,this.playlistController_.mainSegmentLoader_.throughput.count=1;}},bandwidth:{get(){let s=this.playlistController_.mainSegmentLoader_.bandwidth,a=j.default.navigator.connection||j.default.navigator.mozConnection||j.default.navigator.webkitConnection,o=1e7;if(this.options_.useNetworkInformationApi&&a){let u=a.downlink*1e3*1e3;u>=o&&s>=o?s=Math.max(s,u):s=u;}return s;},set(s){this.playlistController_.mainSegmentLoader_.bandwidth=s,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0};}},systemBandwidth:{get(){let s=1/(this.bandwidth||1),a;return this.throughput>0?a=1/this.throughput:a=0,Math.floor(1/(s+a));},set(){N.log.error('The "systemBandwidth" property is read-only');}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Er(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Er(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&FR({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)});}),this.playlistController_.on("selectedinitialmedia",()=>{wR(this);}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_();}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress");}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0;}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=j.default.URL.createObjectURL(this.playlistController_.mediaSource),(N.browser.IS_ANY_SAFARI||N.browser.IS_IOS)&&this.options_.overrideNative&&this.options_.sourceType==="hls"&&typeof this.tech_.addSourceElement=="function"?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_));}createKeySessions_(){let e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),MR({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme();}).catch(i=>{this.logger_("error while creating EME key session",i),this.player_.error({message:"Failed to initialize media ke
212ys for EME",code:3});});}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_();}setupEme_(){let e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,i=BR({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});if(this.player_.tech_.on("keystatuschange",n=>{this.playlistController_.updatePlaylistByKeyStatus(n.keyId,n.status);}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),!i){this.playlistController_.sourceUpdater_.initializedEme();return;}this.createKeySessions_();}setupQualityLevels_(){let e=N.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{OR(this.qualityLevels_,this);}),this.playlists.on("mediachange",()=>{iS(this.qualityLevels_,this.playlists);}));}static version(){return{"@videojs/http-streaming":eS,"mux.js":kR,"mpd-parser":PR,"m3u8-parser":LR,"aes-decrypter":RR};}version(){return this.constructor.version();}canChangeType(){return _d.canChangeType();}play(){this.playlistController_.play();}setCurrentTime(e){this.playlistController_.setCurrentTime(e);}duration(){return this.playlistController_.duration();}seekable(){return this.playlistController_.seekable();}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&j.default.URL.revokeObjectURL&&(j.default.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose();}convertToProgramTime(e,i){return eL({playlist:this.playlistController_.media(),time:e,callback:i});}seekToProgramTime(e,i,n=!0,r=2){return OT({programTime:e,playlist:this.playlistController_.media(),retryCount:r,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:i});}setupXhrHooks_(){this.xhr.onRequest=e=>{rS(this.xhr,e);},this.xhr.onResponse=e=>{sS(this.xhr,e);},this.xhr.offRequest=e=>{aS(this.xhr,e);},this.xhr.offResponse=e=>{oS(this.xhr,e);},this.player_.trigger("xhr-hooks-ready");}attachStreamingEventListeners_(){let e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],i=["gapjumped","playedrangeschanged"];e.forEach(n=>{this.playlistController_.on(n,r=>{this.player_.trigger(Ge({},r));});}),i.forEach(n=>{this.playbackWatcher_.on(n,r=>{this.player_.trigger(Ge({},r));});});}},xd={name:"videojs-http-streaming",VERSION:eS,canHandleSource(t,e={}){let i=Ae(N.options,e);return!i.vhs.experimentalUseMMS&&!as("avc1.4d400d,mp4a.40.2",!1)?!1:xd.canPlayType(t.type,i);},handleSource(t,e,i={}){let n=Ae(N.options,i);return e.vhs=new Ed(t,e,n),e.vhs.xhr=IT(),e.vhs.setupXhrHooks_(),e.vhs.src(t.src,t.type),e.vhs;},canPlayType(t,e){let i=ph(t);if(!i)return"";let n=xd.getOverrideNative(e);return!Ke.supportsTypeNatively(i)||n?"maybe":"";},getOverrideNative(t={}){let{vhs:e={}}=t,i=!(N.browser.IS_ANY_SAFARI||N.browser.IS_IOS),{overrideNative:n=i}=e;return n;}},qR=()=>as("avc1.4d400d,mp4a.40.2",!0);qR()&&N.getTech("Html5").registerSourceHandler(xd,0);N.VhsHandler=Ed;N.VhsSourceHandler=xd;N.Vhs=Ke;N.use||N.registerComponent("Vhs",Ke);N.options.vhs=N.options.vhs||{};(!N.getPlugin||!N.getPlugin("reloadSourceOnError"))&&N.registerPlugin("reloadSourceOnError",IR);});var uS=q((lS,Vd)=>{"use strict";(function(t,e){if(typeof window<"u"&&window.videojs)e(window.videojs);else if(typeof define=="function"&&define.amd)define("videojs-hotkeys",["video.js"],function(n){return e(n.default||n);});else if(typeof Vd<"u"&&Vd.exports){var i=(Lr(),Lc(Ud));Vd.exports=e(i.default||i);}})(lS,function(t){"use strict";typeof window<"u"&&(window.videojs_hotkeys={version:"0.2.30"});var e=function(n){var r=this,s=r.el(),a=document,o={volumeStep:.1,seekStep:5,enableMute:!0,enableVolumeScroll:!0,enableHoverScroll:!1,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1,captureDocumentHotkeys:!1,documentHotkeysFocusElementFilter:()=>!1,enableModifiersForNumbers:!0,enableInactiveFocus:!0,skipInitialFocus:!1,playPauseKey:Ut,rewindKey:Vt,forwardKey:Ci,volumeUpKey:Fr,volumeDownKey:de,muteKey:le,fullscreenKey:ye,customKeys:{}},u=1,c=2,p=3,_=4,T=5,y=6,b=7,g=t.obj?.merge||t.mergeOptions||t.util.mergeOptions;n=g(o,n||{});var E=n.volumeStep,S=n.seekStep,P=n.enableMute,D=n.enableVolumeScroll,A=n.enableHoverScroll,C=n.enableFullscreen,R=n.enableNumbers,I=n.enableJogStyle,M=n.alwaysCaptureHotkeys,F=n.captureDocumentHotkeys,U=n.documentHotkeysFocusElementFilter,k=n.enableModifiersForNumbers,G=n.enableInactiveFocus,V=n.skipInitialFocus,Y=t.VERSION;s.hasAttribute("tabIndex")||s.setAttribute("tabIndex","-1"),s.style.outline="none",(M||!r.autoplay())&&(V||r.one("play",()=>{s.focus();})),G&&r.on("userinactive",()=>{var te=()=>{clearTimeout(ge);},ge=setTimeout(()=>{r.off("useractive",te);var ve=a.activeElement,Ct=ve.parentElement,rt=s.querySelector(".vjs-control-bar");ve&&(rt==Ct||rt==Ct.parentElement)&&s.focus();},10);r.one("useractive",te);}),r.on("play",()=>{var te=s.querySelector(".iframeblocker");te&&te.style.display===""&&(te.style.display="block",te.style.bottom="39px");});var ae=function(ge){var ve=ge.which,Ct,rt,ln=ge.preventDefault.bind(ge),or=r.duration();if(r.controls()){var qt=a.activeElement;if(M||F&&U(qt)||qt==s||qt==s.querySelector(".vjs-tech")||qt==s.querySelector(".vjs-control-bar")||qt==s.querySelector(".iframeblocker"))switch(Ft(ge,r)){case u:ln(),(M||F)&&ge.stopPropagation(),r.paused()?Me(r.play()):r.pause();break;
212case c:Ct=!r.paused(),ln(),Ct&&r.pause(),rt=r.currentTime()-Te(ge),rt<=0&&(rt=0),r.currentTime(rt),Ct&&Me(r.play());break;case p:Ct=!r.paused(),ln(),Ct&&r.pause(),rt=r.currentTime()+Te(ge),rt>=or&&(rt=Ct?or-.001:or),r.currentTime(rt),Ct&&Me(r.play());break;case T:ln(),I?(rt=r.currentTime()-1,r.currentTime()<=1&&(rt=0),r.currentTime(rt)):r.volume(r.volume()-E);break;case _:ln(),I?(rt=r.currentTime()+1,rt>=or&&(rt=or),r.currentTime(rt)):r.volume(r.volume()+E);break;case y:P&&r.muted(!r.muted());break;case b:C&&(r.isFullscreen()?r.exitFullscreen():r.requestFullscreen());break;default:if((ve>47&&ve<59||ve>95&&ve<106)&&(k||!(ge.metaKey||ge.ctrlKey||ge.altKey))&&R){var Ur=48;ve>95&&(Ur=96);var Se=ve-Ur;ln(),r.currentTime(r.duration()*Se*.1);}for(var ac in n.customKeys){var un=n.customKeys[ac];un&&un.key&&un.handler&&un.key(ge)&&(ln(),un.handler(r,n,ge));}}}},oe=function(ge){if(Y!=null&&Y<="7.1.0"&&r.controls()){var ve=ge.relatedTarget||ge.toElement||a.activeElement;(ve==s||ve==s.querySelector(".vjs-tech")||ve==s.querySelector(".iframeblocker"))&&C&&(r.isFullscreen()?r.exitFullscreen():r.requestFullscreen());}},pe=!1,be=s.querySelector(".vjs-volume-menu-button")||s.querySelector(".vjs-volume-panel");be!=null&&(be.addEventListener("mouseover",()=>{pe=!0;}),be.addEventListener("mouseout",()=>{pe=!1;}));var Ee=function(ge){if(A)var ve=0;else var ve=a.activeElement;if(r.controls()&&(M||ve==s||ve==s.querySelector(".vjs-tech")||ve==s.querySelector(".iframeblocker")||ve==s.querySelector(".vjs-control-bar")||pe)&&D){ge=window.event||ge;var Ct=Math.max(-1,Math.min(1,ge.wheelDelta||-ge.detail));ge.preventDefault(),Ct==1?r.volume(r.volume()+E):Ct==-1&&r.volume(r.volume()-E);}},Ft=function(ge,ve){if(n.playPauseKey(ge,ve))return u;if(n.rewindKey(ge,ve))return c;if(n.forwardKey(ge,ve))return p;if(n.volumeUpKey(ge,ve))return _;if(n.volumeDownKey(ge,ve))return T;if(n.muteKey(ge,ve))return y;if(n.fullscreenKey(ge,ve))return b;};function Ut(te){return te.which===32||te.which===179;}function Vt(te){return te.which===37||te.which===177;}function Ci(te){return te.which===39||te.which===176;}function Fr(te){return te.which===38;}function de(te){return te.which===40;}function le(te){return te.which===77;}function ye(te){return te.which===70;}function Te(te){return typeof S=="function"?S(te):S;}function Me(te){te!=null&&typeof te.then=="function"&&te.then(null,function(ge){});}if(F){var Ze=function(te){ae(te);};document.addEventListener("keydown",Ze),this.dispose=()=>{document.removeEventListener("keydown",Ze);};}else r.on("keydown",ae);return r.on("dblclick",oe),r.on("mousewheel",Ee),r.on("DOMMouseScroll",Ee),this;},i=t.registerPlugin||t.plugin;i("hotkeys",e);});});var dS=q((Ep,xp)=>{"use strict";(function(t,e){typeof Ep=="object"&&typeof xp<"u"?xp.exports=e((Lr(),Lc(Ud))):typeof define=="function"&&define.amd?define(["video.js"],e):(t=typeof globalThis<"u"?globalThis:t||self,t.videojsContribQualityLevels=e(t.videojs));})(Ep,function(t){"use strict";function e(u){return u&&typeof u=="object"&&"default"in u?u:{default:u};}var i=e(t);class n{constructor(c){let p=this;return p.id=c.id,p.label=p.id,p.width=c.width,p.height=c.height,p.bitrate=c.bandwidth,p.frameRate=c.frameRate,p.enabled_=c.enabled,Object.defineProperty(p,"enabled",{get(){return p.enabled_();},set(_){p.enabled_(_);}}),p;}}class r extends i.default.EventTarget{constructor(){super();let c=this;return c.levels_=[],c.selectedIndex_=-1,Object.defineProperty(c,"selectedIndex",{get(){return c.selectedIndex_;}}),Object.defineProperty(c,"length",{get(){return c.levels_.length;}}),c[Symbol.iterator]=()=>c.levels_.values(),c;}addQualityLevel(c){let p=this.getQualityLevelById(c.id);if(p)return p;let _=this.levels_.length;return p=new n(c),""+_ in this||Object.defineProperty(this,_,{get(){return this.levels_[_];}}),this.levels_.push(p),this.trigger({qualityLevel:p,type:"addqualitylevel"}),p;}removeQualityLevel(c){let p=null;for(let _=0,T=this.length;_<T;_++)if(this[_]===c){p=this.levels_.splice(_,1)[0],this.selectedIndex_===_?this.selectedIndex_=-1:this.selectedIndex_>_&&this.selectedIndex_--;break;}return p&&this.trigger({qualityLevel:c,type:"removequalitylevel"}),p;}getQualityLevelById(c){for(let p=0,_=this.length;p<_;p++){let T=this[p];if(T.id===c)return T;}return null;}dispose(){this.selectedIndex_=-1,this.levels_.length=0;}}r.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(let u in r.prototype.allowedEvents_)r.prototype["on"+u]=null;var s="4.1.0";let a=function(u,c){let p=u.qualityLevels,_=new r(),T=function(){_.dispose(),u.qualityLevels=p,u.off("dispose",T);};return u.on("dispose",T),u.qualityLevels=()=>_,u.qualityLevels.VERSION=s,_;},o=function(u){return a(this,i.default.obj.merge({},u));};return i.default.registerPlugin("qualityLevels",o),o.VERSION=s,o;});});var cS=q((Cp,wp)=>{"use strict";(function(t,e){typeof Cp=="object"&&typeof wp<"u"?wp.exports=e((Lr(),Lc(Ud))):typeof define=="function"&&define.amd?define(["video.js"],e):(t=typeof globalThis<"u"?globalThis:t||self,t.videojsQualitySelectorHls=e(t.videojs));})(Cp,function(t){"use strict";function e(E){return E&&typeof E=="object"&&"default"in E?E:{default:E}
212;}var i=e(t),n="1.1.1";let r=i.default.getComponent("MenuButton"),s=i.default.getComponent("Menu"),a=i.default.getComponent("Component"),o=i.default.dom;function u(E){return typeof E!="string"?E:E.charAt(0).toUpperCase()+E.slice(1);}function c(E){return new r(E,{title:E.localize("Quality"),name:"QualityButton",createItems:()=>[],createMenu:()=>{let P=new s(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){let D=o.createEl("li",{className:"vjs-menu-title",innerHTML:u(this.options_.title),tabIndex:-1}),A=new a(this.player_,{el:D});this.hideThreshold_+=1,P.addItem(A);}if(this.items=this.createItems(),this.items)for(let D=0;D<this.items.length;D++)P.addItem(this.items[D]);return P;}});}let p=i.default.getComponent("MenuItem");function _(E,S,P,D){let A=new p(E,{label:S.label,selectable:!0,selected:S.selected||!1});return A.item=S,A.qualityButton=P,A.plugin=D,A.handleClick=function(){for(let C=0;C<this.qualityButton.items.length;++C)this.qualityButton.items[C].selected(!1);this.plugin.setQuality(this.item.value),this.selected(!0);},A;}let T={vjsIconClass:"vjs-icon-hd",displayCurrentQuality:!1,placementIndex:0};class y{constructor(S,P){this.player=S,this.config=i.default.obj.merge(T,P),S.ready(()=>{this.player.addClass("vjs-quality-selector-hls"),this.player.qualityLevels&&(this.createQualityButton(),this.bindPlayerEvents());});}getHls(){return this.player.tech({IWillNotUseThisInPlugins:!0}).hls;}bindPlayerEvents(){this.player.qualityLevels().on("addqualitylevel",this.onAddQualityLevel.bind(this));}createQualityButton(){let S=this.player;this._qualityButton=new c(S);let P=S.controlBar.children().length-2,D=S.controlBar.addChild(this._qualityButton,{componentClass:"qualitySelector"},this.config.placementIndex||P);if(D.addClass("vjs-quality-selector"),this.config.displayCurrentQuality)this.setButtonInnerText("auto");else{let A=` ${this.config.vjsIconClass||"vjs-icon-hd"}`;D.menuButton_.$(".vjs-icon-placeholder").className+=A;}D.removeClass("vjs-hidden");}setButtonInnerText(S){this._qualityButton.menuButton_.$(".vjs-icon-placeholder").innerHTML=S;}getQualityMenuItem(S){let P=this.player;return _(P,S,this._qualityButton,this);}onAddQualityLevel(){let S=this.player,D=S.qualityLevels().levels_||[],A=[];for(let C=0;C<D.length;++C){let{width:R,height:I}=D[C],M=R>I?I:R;if(M&&!A.filter(F=>F.item&&F.item.value===M).length){let F=this.getQualityMenuItem.call(this,{label:M+"p",value:M});A.push(F);}}A.sort((C,R)=>typeof C!="object"||typeof R!="object"||C.item.value<R.item.value?-1:C.item.value>R.item.value?1:0),A.push(this.getQualityMenuItem.call(this,{label:S.localize("Auto"),value:"auto",selected:!0})),this._qualityButton&&(this._qualityButton.createItems=function(){return A;},this._qualityButton.update());}setQuality(S){let P=this.player.qualityLevels();this._currentQuality=S,this.config.displayCurrentQuality&&this.setButtonInnerText(S==="auto"?S:`${S}p`);for(let D=0;D<P.length;++D){let{width:A,height:C}=P[D],R=A>C?C:A;P[D].enabled=R===S||S==="auto";}this._qualityButton.unpressButton();}getCurrentQuality(){return this._currentQuality||"auto";}}let b=function(E,S){let P=new y(E,S);return E.QualitySelectorHlsVjs=!0,P.defaultState={},P.VERSION=n,P;},g=function(E){return b(this,i.default.obj.merge({},E));};return i.default.registerPlugin("qualitySelectorHls",g),g;});});var IS=q((A5,eN)=>{eN.exports={name:"youboralib",type:"lib",tech:"js",author:"Nice People At Work",version:"6.8.54",built:"2024-04-05",repo:"https://bitbucket.org/npaw/lib-plugin-js.git"};});var xo=q((E5,kS)=>{"use strict";kS.exports=IS().version;});var LS=q((x5,PS)=>{"use strict";var tN=function(){Function.prototype.bind=Function.prototype.bind||function(t){var e=Array.prototype.slice,i=this,n=e.call(arguments,1);function r(){var s=i.prototype&&this instanceof i;return i.apply(!s&&t||this,n.concat(e.call(arguments)));}return r.prototype=i.prototype,r;},Array.prototype.forEach=Array.prototype.forEach||function(t,e){if(typeof t!="function")throw new TypeError(t+" is not a function!");for(var i=this.length,n=0;n<i;n++)t.call(e,this[n],n,this);},Math.trunc=Math.trunc||function(t){return isNaN(t)?NaN:t>0?Math.floor(t):Math.ceil(t);};};PS.exports=tN;});var jp=q((C5,RS)=>{"use strict";RS.exports=function(t){if(t==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r]);}return e;};});var jS=q((w5,NS)=>{"use strict";var OS=function(){};NS.exports=function(t){if(arguments.length>1)throw Error("Second argument not supported");if(t===null)throw Error("Cannot set a null [[Prototype]]");if(typeof t!="object")throw TypeError("Argument must be an object");return OS.prototype=t,new OS();};});var Ue=q((D5,BS)=>{"use strict";var MS=jp(),iN=jS(),Mp=function(){};Mp.prototype={constructor:function(){}};Mp.extend=function(t,e){var i=this,n;return t&&t.hasOwnProperty("constructor")?n=t.constructor:n=function(){return i.apply(this,arguments);},MS(n,i,e),n.prototype=iN(i.prototype),t&&MS(n.prototype,t),n.prototype.constructor=n,n.__super__=i.prototype,n;};BS.exports=Mp;});var zd=q((I5,FS)=>{"use strict";FS.exports=function(t){return Object.prototype.toString.call(t)==="[object Array]";};});var rn=q((k5,VS)=>{"use strict";var nN=Ue(),US=zd(),rN=nN.extend({on:function(t,e){if(this._listeners=this._listeners||{},typeof e=="function")return this._listeners[t]=this._listeners[t]||[],this._listeners[t].push(e),this;},off:function(t,e){if(this._listeners=this._listeners||{},this._listeners[t]){var i=this._listeners[t].indexOf(e);i!==-1&&this._listeners[t].splice(i,1);}return this;},emit:function(t,e){return this._listeners=this._listeners||{},e=e||{},US(this._listeners[t])&&this._listeners[t].forEach(this._eachCallback.bind(this,t,e)),US(this._listeners["*"])&&this._listeners["*"].forEach(this._eachCallback.bind(this,t,e)),this;}
212,_eachCallback:function(t,e,i){if(typeof i=="function"){var n={type:t,data:e,target:this};i(n);}}});VS.exports=rN;});var Ne=q((P5,qS)=>{"use strict";var sN=rn(),aN=zd(),Oe={_emitter:new sN(),on:function(){Oe._emitter.on.apply(Oe._emitter,arguments);},off:function(){Oe._emitter.off.apply(Oe._emitter,arguments);},emit:function(){Oe._emitter.emit.apply(Oe._emitter,arguments);},Level:{SILENT:6,ERROR:5,WARNING:4,NOTICE:3,DEBUG:2,VERBOSE:1},Event:{LOG:"log"},logLevel:5,plainLogs:!1,report:function(t,e,i){if(typeof console<"u"&&console.log&&typeof document<"u"){e=e||Oe.Level.NOTICE,i=i||"darkcyan";var n={5:"e",4:"w",3:"n",2:"d",1:"v"},r=n[e],s="[Youbora]"+Oe._getCurrentTime()+" "+r+":";if(this.emit("log",{level:e,msg:t,prefix:s}),Oe.logLevel<=e)if(Oe.plainLogs||document.documentMode)Oe._plainReport(t,s);else{var a;e===Oe.Level.ERROR&&console.error?a=console.error:e===Oe.Level.WARNING&&console.warn?a=console.warn:e===Oe.Level.DEBUG&&console.debug?a=console.debug:a=console.log,s="%c"+s,aN(t)?(t.splice(0,0,s,"color: "+i),a.apply(console,t)):a.call(console,s,"color: "+i,t);}}},_getCurrentTime:function(){var t=new Date(),e=("0"+t.getDate()).slice(-2),i=("0"+t.getMinutes()).slice(-2),n=("0"+t.getSeconds()).slice(-2),r=("00"+t.getMilliseconds()).slice(-3);return"["+e+":"+i+":"+n+"."+r+"]";},_plainReport:function(t,e){if(t instanceof Array)for(var i in t)Oe._plainReport(t[i],e);else typeof t=="string"?console.log(e+" "+t):(console.log(e+" <next line>"),console.log(t));},error:function(){Oe.report([].slice.call(arguments),Oe.Level.ERROR,"darkred");},warn:function(){Oe.report([].slice.call(arguments),Oe.Level.WARNING,"darkorange");},notice:function(){Oe.report([].slice.call(arguments),Oe.Level.NOTICE,"darkgreen");},debug:function(){Oe.report([].slice.call(arguments),Oe.Level.DEBUG,"indigo");},verbose:function(){Oe.report([].slice.call(arguments),Oe.Level.VERBOSE,"navy");},loadLevelFromUrl:function(){typeof window<"u"&&window.location&&this._parseLevelFromUrl(window.location.search);},_parseLevelFromUrl:function(t){if(t){var e=/\?.*&*youbora-debug=(.+)/i.exec(t);e!==null&&(Oe.logLevel=e[1]);var i=/\?.*&*youbora-debug=plain/i.exec(t);i!==null&&(Oe.plainLogs=!0);}}};qS.exports=Oe;});var xt=q((L5,HS)=>{"use strict";var Ws=Ne(),oN={stripProtocol:function(t){var e=t;try{e=t.replace(/^(.*?:\/\/|\/\/)/i,"");}catch(i){Ws.warn(i);}return e;},addProtocol:function(t,e){var i="http://localhost/";try{i="http://"+t,e||typeof window<"u"&&window.location.protocol.indexOf("https")===0?i="https://"+t:typeof window<"u"&&window.location.protocol.indexOf("http")===0&&(i="//"+t);}catch(n){Ws.warn(n);}return i;},parseNumber:function(t,e){return!isNaN(t)&&t>=0&&t!==1/0&&t!==-1/0&&t!==null&&typeof t<"u"?t:e;},logAllEvents:function(t,e,i){try{if(Ws.logLevel<=Ws.Level.DEBUG){i=i||function(s){Ws.debug("Event: "+s.type);};var n=["canplay","buffering","waiting","ended","play","playing","pause","resume","error","abort","seek","seeking","seeked","stalled","dispose","loadeddata","loadstart"];e&&(e[0]===null?(e.shift(),n=e):n=n.concat(e));for(var r=0;r<n.length;r++)typeof t=="function"?t.call(window,n[r],i):t.on?t.on(n[r],i):t.addEventListener&&t.addEventListener(n[r],i);}}catch(s){Ws.error(s);}},buildRenditionString:function(t,e,i){arguments.length===1&&(i=t,t=null,e=null);var n=null;return t&&e&&(n=t+"x"+e),typeof i=="number"&&!isNaN(i)&&i>=1&&(n?n+="@":n="",i<1e3?n+=Math.round(i)+"bps":i<1e6?(i=Math.round(i/1e3),n+=i+"Kbps"):(i=Math.round(i/1e4)/100,n+=i+"Mbps")),n;},buildErrorParams:function(t,e,i,n){var r={};return typeof t=="object"&&t!==null?r=t:(r.errorCode=t||"FAILURE",r.msg=e||r.errorCode,r.errorMetadata=i,r.errorLevel=n),r;},calculateAdViewability:function(t,e){var i=!0;if(typeof window<"u"&&t&&typeof t.getBoundingClientRect=="function"){var n=t.getBoundingClientRect();if(n.top>=window.innerHeight||n.bottom<=0||n.right<=0||n.left>=window.innerWidth)i=!1;else{var r=Math.trunc(n.height*n.width),s=n.top>0?n.top:0,a=n.bottom>window.innerHeight?window.innerHeight:n.bottom,o=n.left>0?n.left:0,u=n.right>window.innerWidth?window.innerWidth:n.right,c=(u-o)*(a-s);i=c*100>r*(e||50);}}return i;},getMetricsFrom:function(t,e){var i=t||e;
212for(var n in i)if(typeof i[n]!="object"||!i[n].value){var r={};r.value=i[n],i[n]=r;}return i;},assign:jp(),isArray:zd()};HS.exports=oN;});var Bp=q((R5,$S)=>{"use strict";var lN=Ue(),uN=lN.extend({getCdnTraffic:function(){var t=null;if(typeof CdnBalancerStats<"u"&&CdnBalancerStats.cdn)t=CdnBalancerStats.cdn.totalDownloadedBytes;else if(typeof Streamroot<"u")t=this._getStreamrootPeerObject("cdn",!1)||this._getStreamrootInstanceObject("cdnDownload");else if(typeof peer5<"u"&&peer5.getStats)t=peer5.getStats().totalHttpDownloaded;else if(typeof teltoo<"u"&&teltoo.getStats){var e=teltoo.getStats();t=e.totalReceivedBytes-e.p2pReceivedBytes;}return t;},getMultiCdnInfo:function(){var t=null;if(typeof CdnBalancerStats<"u"&&CdnBalancerStats.cdn&&CdnBalancerStats.cdn.cdns){var e=CdnBalancerStats.p2p;t={P2P:{downloaded_bytes:e.downloadedBytes,uploaded_bytes:e.uploadedBytes,downloaded_chunks:e.downloadedSegments,uploaded_chunks:e.uploadedSegments,errors:e.failedRequests?e.failedRequests.total:0,missed_downloaded_chunks:e.failedRequests?e.failedRequests.absent:0,timeout_errors:e.failedRequests?e.failedRequests.timeout:0,other_errors:e.failedRequests?e.failedRequests.error:0,late_uploaded_chunks:e.discardedUploadedSegments,late_uploaded_bytes:e.discardedUploadedBytes,late_downloaded_bytes:e.discardedDownloadedBytes,time:e.downloadMillis,active_peers:e.activePeers,peers:e.totalPeers}},CdnBalancerStats.cdn.cdns.forEach(function(i){t[i.name]={downloaded_bytes:i.bytes,downloaded_chunks:i.chunks,errors:i.failures,time:i.downloadMillis};});}return t;},getSegmentDuration:function(){var t=null;return typeof CdnBalancerStats<"u"&&CdnBalancerStats.segmentDuration?CdnBalancerStats.segmentDuration:t;},getBalancerResponseId:function(){var t=null;return typeof CdnBalancerStats<"u"&&CdnBalancerStats.cdn?CdnBalancerStats.cdn.responseUUID:t;},getP2PTraffic:function(){var t=null;return typeof CdnBalancerStats<"u"&&CdnBalancerStats.p2p?t=CdnBalancerStats.p2p.downloadedBytes:typeof Streamroot<"u"?t=this._getStreamrootPeerObject("p2p",!0)||this._getStreamrootInstanceObject("dnaDownload"):typeof peer5<"u"&&peer5.getStats?t=peer5.getStats().totalP2PDownloaded:typeof teltoo<"u"&&teltoo.getStats&&(t=teltoo.getStats().p2pReceivedBytes),t;},getUploadTraffic:function(){var t=null;return typeof CdnBalancerStats<"u"&&CdnBalancerStats.p2p?t=CdnBalancerStats.p2p.uploadedBytes:typeof Streamroot<"u"?t=this._getStreamrootPeerObject("upload",!0)||this._getStreamrootInstanceObject("dnaUpload"):typeof peer5<"u"&&peer5.getStats&&(t=peer5.getStats().totalP2PUploaded),t;},getIsP2PEnabled:function(){var t=!1;if(typeof CdnBalancerStats<"u"&&CdnBalancerStats.p2p)t=CdnBalancerStats.p2p.downloadEnabled;else if(typeof Streamroot<"u"){if(Streamroot.p2pAvailable&&Streamroot.peerAgents)for(var e in Streamroot.peerAgents)t=t||Streamroot.peerAgents[e].isP2PEnabled;else Streamroot.instances&&Streamroot.instances.forEach(function(i){t=t||i.dnaDownloadEnabled||i.dnaUploadEnabled;});}else typeof peer5<"u"&&peer5.isEnabled?t=peer5.isEnabled():typeof teltoo<"u"&&(t=!0);return t;},_getStreamrootPeerObject:function(t,e){var i=null;if(Streamroot.p2pAvailable&&Streamroot.peerAgents)for(var n in Streamroot.peerAgents){var r=Streamroot.peerAgents[n];r.stats&&(!e||r.isP2PEnabled)&&(i+=r.stats[t]);}return i;},_getStreamrootInstanceObject:function(t){var e=null;return Streamroot.instances&&Streamroot.instances.forEach(function(i){i.stats&&i.stats.currentContent&&(e+=i.stats.currentContent[t]);}),e;}});$S.exports=uN;});var jr=q((O5,GS)=>{"use strict";var dN=Ue(),zS=dN.extend({constructor:function(){this.reset();},reset:function(){this.startTime=0,this.stopTime=0,this.pauseTime=0,this.offset=0;},getDeltaTime:function(t){var e=-1,i=new Date().getTime();if(this.startTime){t&&!this.stopTime&&(this.stopTime=i);var n=this.pauseTime?i-this.pauseTime:0,r=this.stopTime?this.stopTime:i;e=this.offset-n+(r-this.startTime);}return e;},start:function(){this.startTime=new Date().getTime(),this.stopTime=0,this.offset=0;},stop:function(){return this.pauseTime&&this.resume(),this.stopTime=new Date().getTime(),this.startTime?this.offset+(this.stopTime-this.startTime):-1;},pause:function(){this.pauseTime=new Date().getTime();},resume:function(){this.offset-=new Date().getTime()-this.pauseTime,this.pauseTime=0;},clone:function(){var t=new zS();return t.startTime=this.startTime,t.stopTime=this.stopTime,t.offset=this.offset,t;}});GS.exports=zS;});var Gd=q((N5,WS)=>{"use strict";var cN=Ue(),hN=jr(),fN=cN.extend({constructor:function(t,e){this.callback=t,this.interval=e||5e3,this.isRunning=!1,this._timer=null,this.chrono=new hN();},start:function(){this.isRunning||(this.isRunning=!0,this._setTick());},stop:function(){if(this.isRunning=!1,this._timer)try{clearTimeout(this._timer),this._timer=null;}catch{typeof atv<"u"&&(atv.clearTimeout(this._timer),this._timer=null);}},_setTick:function(){if(this.isRunning){this.chrono.start();try{this._timer=setTimeout(function(){this.callback(this.chrono.stop()),this._setTick();}.bind(this),this.interval);}catch{typeof atv<"u"&&(this._timer=atv.setTimeout(function(){this.callback(this.chrono.stop()),this._setTick();}.bind(this),this.interval));}}}});WS.exports=fN;});var XS=q((j5,YS)=>{"use strict";var pN={Preroll:"pre",Midroll:"mid",Postroll:"post"};YS.exports=pN;});var QS=q((M5,KS)=>{"use strict";var mN={START:"start",JOIN:"join",PAUSE:"pause",RESUME:"resume",SEEK_BEGIN:"seek-begin",SEEK_END:"seek-end",BUFFER_BEGIN:"buffer-begin",BUFFER_END:"buffer-end",ERROR:"error",STOP:"stop",CLICK:"click",MANIFEST:"manifest",PODSTART:"break-start",PODSTOP:"break-stop",QUARTILE:"quartile",VIDEO_EVENT:"video-event"};KS.exports=mN;});var Co=q((B5,JS)=>{"use strict";var gN=QS(),vN={Event:gN};JS.exports=vN;});var eA=q((F5,ZS)=>{"use strict";var _N={NO_RESPONSE:"NO_RESPONSE",EMPTY:"EMPTY_RESPONSE",WRONG:"WRONG_RESPONSE"};ZS.exports=_N;});var Wd=q((U5,tA)=>{"use strict";var yN={GET:"get",POST:"post"};tA.exports=yN;});var nA=q((V5,iA)=>{"use strict";var bN={DATA:"/data",INIT:"/init",START:"/start",JOIN:"/joinTime",PAUSE:"/pause",RESUME:"/resume",SEEK:"/seek",BUFFER:"/bufferUnderrun",ERROR:"/error",STOP:"/stop",PING:"/ping",VIDEO_EVENT:"/infinity/video/event",AD_INIT:"/adInit",AD_START:"/adStart",AD_JOIN:"/adJoin",AD_PAUSE:"/adPause",AD_RESUME:"/adResume",AD_BUFFER:"/adBufferUnderrun",AD_STOP:"/adStop",AD_CLICK:"/adClick",AD_ERROR:"/adError",AD_MANIFEST:"/adManifest",AD_POD_START:"/adBreakStart",AD_POD_STOP:"/adBreakStop",AD_QUARTILE:"/adQuartile",EVENT:"/infinity/session/event",SESSION_START:"/infinity/session/start",SESSION_STOP:"/infinity/session/stop",NAV:"/infinity/session/nav",BEAT:"/infinity/session/beat",OFFLINE_EVENTS:"/offlineEvents"};iA.exports=bN;});var sA=q((q5,rA)=>{"use strict";var TN={WILL_SEND_INIT:"will-send-init",WILL_SEND_START:"will-send-start",WILL_SEND_JOIN:"will-send-join",WILL_SEND_PAUSE:"will-send-pause",WILL_SEND_RESUME:"will-send-resume",WILL_SEND_SEEK:"will-send-seek",WILL_SEND_BUFFER:"will-send-buffer",WILL_SEND_ERROR:"will-send-error",WILL_SEND_FATAL_ERROR:"will-send-fatal-error",WILL_SEND_STOP:"will-send-stop",WILL_SEND_PING:"will-send-ping",WILL_SEND_VIDEO_EVENT:"will-send-video-event",WILL_SEND_AD_START:"will-send-ad-start",WILL_SEND_AD_JOIN:"will-send-ad-join",WILL_SEND_AD_PAUSE:"will-send-ad-pause",WILL_SEND_AD_RESUME:"will-send-ad-resume",WILL_SEND_AD_BUFFER:"will-send-ad-buffer",WILL_SEND_AD_STOP:"will-send-ad-stop",WILL_SEND_AD_CLICK:"will-send-ad-click",WILL_SEND_AD_ERROR:"will-send-ad-error",WILL_SEND_AD_MANIFEST:"will-send-ad-manifest",WILL_SEND_AD_POD_START:"will-send-ad-break-start",WILL_SEND_AD_POD_STOP:"will-send-ad-break-stop",WILL_SEND_AD_QUARTILE:"will-send-ad-quartile",WILL_SEND_SESSION_START:"will-send-session-start",WILL_SEND_SESSION_STOP:"will-send-session-stop",WILL_SEND_NAV:"will-send-nav",WILL_SEND_BEAT:"will-send-beat",WILL_SEND_EVENT:"will-send-event",WILL_SEND_OFFLINE_EVENTS:"will-send-offline-events"};rA.exports=TN;});var oA=q((H5,aA)=>{"use strict";var SN={ClientSide:"csai",ServerSide:"ssai"};aA.exports=SN;});var Ti=q(($5,lA)=>{"use strict";var AN=XS(),EN=Co(),xN=eA(),CN=Wd(),wN=nA(),DN=sA(),IN=oA(),kN={AdPosition:AN,ManifestError:xN,RequestMethod:CN,Service:wN,WillSendEvent:DN,AdInsertionType:IN,Adapter:EN};lA.exports=kN;});var ji=q((z5,uA)=>{"use strict";var PN=Ue(),sn=Ne(),LN=xt(),Si=PN.extend({constructor:function(t,e,
212i,n){this.xhr=this.createXHR(),this.host=t||"",this.service=e||"",this.params=i||{},this.options=LN.assign({},Si.defaultOptions,n),this.retries=0,this.sendPostRequest=!1,this.preparedPostRequest=!1,this.options.cache||this.setParam("timemark",new Date().getTime());},createXHR:function(){var t={};try{XMLHttpRequest?t=new XMLHttpRequest():t=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){sn.error(e);}return t;},getXHR:function(){return this.xhr;},getResponse:function(){return this.xhr.response;},getResponseText:function(){return this.xhr.responseText;},getResponseHeaders:function(){return this.xhr.getAllResponseHeaders();},getUrl:function(){return this.host+this.service+this.getParamString();},on:function(t,e,i){return this.xhr.addEventListener?this.xhr.addEventListener(t,e.bind(this,this,i)):t===Si.Event.SUCCESS&&(this.xhr.onreadystatechange=function(){this.xhr.readyState===4&&e.bind(this,this,i);}.bind(this)),this;},off:function(t,e){return this.xhr.removeEventListener(t,e),this;},getParamString:function(){try{var t="?";for(var e in this.params){var i=this.params[e];if(i!==null&&typeof i=="object"){var n=JSON.stringify(i);n!=="{}"&&(t+=encodeURIComponent(e)+"="+encodeURIComponent(n)+"&");}else i!==null&&typeof i<"u"&&i!==""&&(t+=encodeURIComponent(e)+"="+encodeURIComponent(i)+"&");}return t.slice(0,-1);}catch(r){return sn.error(r),"";}},getParam:function(t){return this.params[t];},setParam:function(t,e){return this.params[t]=e,this;},setBody:function(t){this.body=t;},setPostRequest:function(t){this.sendPostRequest=t;},getParamsForPostMessages:function(){var t={};try{var e=this.getParam("timemark"),i=this.getParam("code"),n=this.getParam("sessionRoot"),r=this.getParam("sessionId");e&&(t.timemark=e),i&&(t.code=i),n&&(t.sessionRoot=n),r&&(t.sessionId=r);}catch(s){sn.error(s);}return t;},send:function(){try{try{this.sendPostRequest&&!this.preparedPostRequest&&(this.options.method="POST",this.body=JSON.stringify(this.params),this.params=this.getParamsForPostMessages(),this.preparedPostRequest=!0);}catch{}if(this.xhr.open(this.options.method,this.getUrl(),!0),this.options.requestHeaders)for(var t in this.options.requestHeaders)this.options.requestHeaders.hasOwnProperty(t)&&this.xhr.setRequestHeader(t,this.options.requestHeaders[t]);if(this.options.retryAfter>0&&this.options.maxRetries>0){var e=function(){if(this.retries>=this.options.maxRetries)sn.error('Aborting failed request "'+this.service+'". Max retries reached.');else{sn.warn('YBRequest "'+this.service+'" failed. Retry '+(this.retries+1)+" of "+this.options.maxRetries+" in "+this.options.retryAfter+"ms.");try{setTimeout(function(){this.retries+=1,this.send();}.bind(this),this.options.retryAfter);}catch(n){typeof atv<"u"?atv.setTimeout(function(){this.retries+=1,this.send();}.bind(this),this.options.retryAfter):sn.error(n);}}};this.retries===0&&this.on(Si.Event.ERROR,e.bind(this));}sn.logLevel<=sn.Level.VERBOSE&&sn.verbose("XHR Req: "+this.getUrl());
212for(var i in Si._globalListeners)Si._globalListeners[i].forEach(function(n){this.on(i,n);}.bind(this));return this.xhr.send(this.body);}catch(n){sn.error(n);}}},{Event:{SUCCESS:"load",LOAD:"load",ERROR:"error",ABORT:"abort"},defaultOptions:{method:"GET",requestHeaders:{},maxRetries:3,retryAfter:5e3,cache:!1},_globalListeners:{},onEvery:function(t,e){Si._globalListeners[t]=Si._globalListeners[t]||[],Si._globalListeners[t].push(e);},offEvery:function(t,e){if(Si._globalListeners[t]){var i=Si._globalListeners[t].indexOf(e);i!==-1&&Si._globalListeners[t].splice(i,1);}}});uA.exports=Si;});var Cn=q((G5,cA)=>{"use strict";var RN=rn(),dA=RN.extend({constructor:function(){this._isBusy=!0,this._sendRequest=!0,this.transformName="Transform";},parse:function(t){},isBlocking:function(t){return this._isBusy;},done:function(){this._isBusy=!1,this.emit(dA.Event.DONE);},hasToSend:function(t){return this._sendRequest;},getState:function(){return this._sendRequest?this._isBusy?this.STATE_BLOCKED:this.STATE_NO_BLOCKED:this.STATE_OFFLINE;}},{STATE_OFFLINE:2,STATE_BLOCKED:1,STATE_NO_BLOCKED:0,Event:{DONE:"done"}});cA.exports=dA;});var Yd=q((W5,fA)=>{"use strict";var ON=Ue(),hA=Ne(),Fp=ji(),Mr=Cn(),NN=ON.extend({constructor:function(t){this.transforms=[],this.pluginRef=t,this._requests=[];},sendRequest:function(t,e,i){t&&(typeof e=="function"&&t.on(Fp.Event.SUCCESS,e,i),this._registerRequest(t));},buildRequest:function(t,e,i,n){i=i||{};var r=new Fp(t,e,i);typeof n=="function"&&r.on(Fp.Event.SUCCESS,n),this._registerRequest(r);},addTransform:function(t){t.parse&&t.isBlocking?(this.transforms.push(t),t.on(Mr.Event.DONE,this._processRequests.bind(this))):hA.warn(t+" is not a valid RequestTransform.");},removeTransform:function(t){var e=this.transforms.indexOf(t);e!==-1?this.transforms.splice(e,1):hA.warn("Trying to remove unexisting Transform '"+t+"'.");},_registerRequest:function(t){if(this.pluginRef){var e=this.pluginRef.options;e.authToken&&(t.options.requestHeaders.Authorization=e.authType+" "+e.authToken);}this._requests.push(t),this._processRequests();},_processRequests:function(){var t=this._requests;this._requests=[];for(var e=[];t.length;){var i=t.shift(),n=this._transform(i);n===Mr.STATE_NO_BLOCKED?(this.pluginRef&&(i.host=this.pluginRef.getHost()),i.send()):n===Mr.STATE_BLOCKED&&e.push(i);}for(;e.length;)this._requests.push(e.shift());},_transform:function(t){var e=Mr.STATE_NO_BLOCKED;
212return this.transforms.forEach(function(i){if(i.isBlocking(t)){e=Mr.STATE_BLOCKED;return;}else i.parse(t);i.getState()===Mr.STATE_OFFLINE&&(e=Mr.STATE_OFFLINE);}),e;}});fA.exports=NN;});var Vp=q((Y5,mA)=>{"use strict";var Up=ji(),pA=Cn(),Xd=Ne(),jN=xt(),Mi=Ti(),Kd=pA.extend({constructor:function(t,e){pA.prototype.constructor.apply(this,arguments),this.response={},this._viewIndex=new Date().getTime(),this._session=e,this._httpSecure=t.options["app.https"],this._plugin=t,this.transformName="View";},init:function(){if(this._plugin.options&&this._plugin.options.offline)return this.response.host="OFFLINE",this.response.code="OFFLINE",this.response.pingTime=60,this.response.beatTime=60,this.done(),null;if(this._plugin.storage.isEnabled()){var t=new Date().getTime();if(t<this._plugin.sessionExpire+(Number(this._plugin.getDataTime())||0)&&this._plugin.getStoredData())return this.setData(this._plugin.getStoredData()),null;}var e=Mi.Service.DATA,i={outputformat:"json"};i=this._plugin.requestBuilder.buildParams(i,e),i!==null&&(Xd.notice(e+" "+i.system),i.system==="nicetest"&&Xd.error("No accountCode has been set. Please set your accountCode inside plugin's options."),new Up(this._plugin.getHost(),e,i).on(Up.Event.SUCCESS,this._receiveData.bind(this)).on(Up.Event.ERROR,this._failedData.bind(this)).send());},setData:function(t){try{var e=JSON.parse(t);this._plugin.options["parse.fdsResponseHost"]&&(t=t.replace(e.q.h,this._plugin.options["parse.fdsResponseHost"](e.q.h)),e=JSON.parse(t)),this.response.msg=t,this.response.host=jN.addProtocol(e.q.h,this._httpSecure),this.response.code=e.q.c,this.response.pingTime=e.q.pt||5,this.response.beatTime=e.q.i&&e.q.i.bt||30,this.response.sessionExpire=e.q.i&&e.q.i.exp||300,this._plugin.storage.setLocal("sessionExpire",this.response.sessionExpire),this.done();}catch{Xd.error("Fastdata response is invalid.");}},_receiveData:function(t,e){var i=t.getResponse();this.setData(i);},_failedData:function(t,e){Xd.error("Fastdata request has failed.");},nextView:function(){return this._viewIndex=new Date().getTime(),this.getViewCode();},getViewCode:function(t){return t!==null&&this._plugin&&this._plugin.options&&this._plugin.options["session.splitViews"]?this.response.code+"_"+(t||this._viewIndex):this.response.code+"_"+this._viewIndex;},getSession:function(){return this._session;},setSession:function(t){this._session=t;},setHost:function(t){this.response.host=t;},parse:function(t){t.host=t.host||this.response.host,t.params.system=this._plugin.getAccountCode(),t.params.sessionRoot=t.params.sessionRoot||this.getSession(),Kd.EventList.PingTime.indexOf(t.service)!==-1&&(t.params.pingTime=t.params.pingTime||this.response.pingTime),Kd.EventList.Infinity.indexOf(t.service)===-1?this._plugin&&this._plugin.options&&this._plugin.options["session.splitViews"]?(t.params.code=t.params.code||this.getViewCode(t.params.viewIndex),delete t.params.viewIndex):t.params.code=t.params.code||this.getViewCode():t.params.sessionId=t.params.sessionRoot,Kd.EventList.CreateView.indexOf(t.service)!==-1&&(this._plugin.infinity.infinityStarted||this._plugin.storage.isEnabled()&&this._plugin.storage.getLocal("infinityStarted"))&&(t.params.parentId=t.params.sessionRoot,t.params.navContext=t.params.navContext||this._plugin.getContext());}},{EventList:{CreateView:[Mi.Service.START,Mi.Service.INIT,Mi.Service.ERROR],Infinity:[Mi.Service.NAV,Mi.Service.SESSION_START,Mi.Service.SESSION_STOP,Mi.Service.EVENT,Mi.Service.BEAT],PingTime:[Mi.Service.START,Mi.Service.PING]}});mA.exports=Kd;});var wo=q((X5,vA)=>{"use strict";var MN=rn(),gA=MN.extend({constructor:function(t){this._realResource=null,this._lastManifest=null,this._transportFormat=null,this.iterations=3,this._headers=t;},done:function(){this.iterations=3,this.emit(gA.Event.DONE);},parse:function(t,e){},getResource:function(){return this._realResource;},getTransportFormat:function(){return this._transportFormat;},getLastManifest:function(){return this._lastManifest;},shouldExecute:function(t){return!0;}},{Event:{DONE:"done"}});vA.exports=gA;});var Do=q((K5,_A)=>{"use strict";var BN={MP4:"MP4",MPEG2:"TS",CMF:"CMF"};_A.exports=BN;});var $p=q((Q5,yA)=>{"use strict";var qp=ji(),FN=wo(),UN=Ne(),Hp=Do(),VN=FN.extend({parse:function(t,e,
212i){i=i||"";var n=null;try{n=/((\S*?)(\.m3u8|\.m3u|\.ts|\.m4s|\.mp4|\.cmfv|\.m4a)((\?|;)\S*|\n|\r|$))/i.exec(t.replaceAll(",URI=",`
213`).replaceAll('"',"").replaceAll(",",`
214`));}catch(c){UN.warn("Parse HLS Regex failed",c),this.done();}if(n!==null){var r=n[1].trim(),s="",a=i.lastIndexOf("/");if(r.indexOf("http")!==0&&a!==-1){if(r[0]==="/"&&r[1]!=="/"){var o=i.indexOf("/")+1;o+=i.substr(o,i.length).indexOf("/")+1,o+=i.substr(o,i.length).indexOf("/"),r=i.slice(0,o)+r;}else r=i.slice(0,a)+"/"+r;s=i.slice(0,a)+"/";}if(n[3]===".m3u8"||n[3]===".m3u"){if(e)this._parseWithManifest(e,s,n);else{var u=new qp(r,null,null,{cache:!0,requestHeaders:this._headers});u.on(qp.Event.SUCCESS,function(c){this._parseWithManifest(c,s,n);}.bind(this)),u.on(qp.Event.ERROR,function(c){this.done();}.bind(this)),u.send();}}else{switch(n[3]){case".mp4":case".m4s":case".m4a":this._transportFormat=Hp.MP4;break;case".ts":this._transportFormat=Hp.MPEG2;break;case".cmfv":this._transportFormat=Hp.CMF;}this._realResource=r,this.done();}}else this.done();},_parseWithManifest:function(t,e,i){this._lastManifest=t,this.parse(t.getResponseText(),null,e+i[2]);},shouldExecute:function(t){var e=!0;if(t){var i=t.getResponseText();e=i.indexOf("#EXTM3U")!==-1;}return e;}});yA.exports=VN;});var TA=q((J5,bA)=>{"use strict";bA.exports={cdnName:"LEVEL3",parsers:[{element:"host+type",headerName:"X-WR-Diag",regex:/Host:(.+)\sType:(.+)/}],requestHeaders:{"X-WR-Diag":"host"},parseType:function(t){if(t){if(t.indexOf("TCP_HIT")===0||t.indexOf("TCP_MEM_HIT")===0||t.indexOf("TCP_IMS_HIT")===0)return 1;if(t.indexOf("TCP_MISS")===0)return 2;}return 0;}};});var AA=q((Z5,SA)=>{"use strict";SA.exports={cdnName:"CLOUDFRT",parsers:[{element:"host",headerName:"X-Amz-Cf-Id",regex:/(.+)/},{element:"type",headerName:"X-Cache",regex:/(\S+)\s.+/}],parseType:function(t){switch(t){case"Hit":return 1;case"Miss":return 2;default:return 0;}}};});var xA=q((eF,EA)=>{"use strict";EA.exports={cdnName:"AKAMAI",parsers:[{element:"type+host",headerName:"X-Cache",regex:/(.+)\sfrom.+AkamaiGHost\/(.+)\).+/},{element:"host",headerName:"akamai-mon-iucid-del",regex:/(.*)/},{element:"type",headerName:"akamai-cache-status",regex:/(.+)\sfrom\schild/}],requestHeaders:{Pragma:"akamai-x-cache-on"},parseType:function(t){var e=t.toLowerCase();return e.indexOf("hit")!==-1?1:e.indexOf("miss")!==-1?2:0;}};});var wA=q((tF,CA)=>{"use strict";CA.exports={cdnName:"HIGHNEGR",parsers:[{element:"host+type",headerName:"X-HW",regex:/.+,[0-9]+\.(.+)\.(.+)/}],parseType:function(t){switch(t){case"c":case"x":return 1;default:return 2;}}};});var IA=q((iF,DA)=>{"use strict";DA.exports={cdnName:"FASTLY",parsers:[{element:"host",headerName:"X-Served-By",regex:/([^,\s]+)$/},{element:"type",headerName:"X-Cache",regex:/([^,\s]+)$/}],parseType:function(t){switch(t){case"HIT":return 1;case"MISS":return 2;default:return 0;}}};});var PA=q((nF,kA)=>{"use strict";kA.exports={cdnName:"TELEFO",parsers:[{element:"host+type",headerName:"x-tcdn",regex:/Host:(.+)\sType:(.+)/}],requestHeaders:{"x-tcdn":"host"},parseType:function(t){if(t){if(t.indexOf("p")!==-1||t.indexOf("c")!==-1)return 1;if(t.indexOf("i")!==-1||t.indexOf("m")!==-1)return 2;}return 0;}};});var RA=q((rF,LA)=>{"use strict";LA.exports={cdnName:"AMAZON",parsers:[{element:"host",headerName:"x-amz-cf-pop",regex:/(.+)/},{element:"type",headerName:"x-cache",regex:/(.+)\sfrom.+/}],parseType:function(t){return t.toLowerCase().indexOf("hit")!==-1?1:t.toLowerCase().indexOf("miss")!==-1?2:0;}};});var NA=q((sF,OA)=>{"use strict";OA.exports={cdnName:"EDGECAST",parsers:[{element:"host",headerName:"Server",regex:/\((.+)\/.+\)/},{element:"type",headerName:"X-Cache",regex:/(.+)/}],parseType:function(t){switch(t){case"HIT":return 1;case"MISS":default:return 2;}}};});var MA=q((aF,jA)=>{"use strict";jA.exports={parsers:[{element:"name",headerName:null,regex:/(.+)/},{element:"host",headerName:null,regex:/(.+)/}]};});var FA=q((oF,BA)=>{"use strict";BA.exports={cdnName:"NOSOTT",parsers:[{element:"host",headerName:"X-NOS-Server",regex:/(.+)/},{element:"type",headerName:"X-Cache",regex:/(.*)/}],parseType:function(t){switch(t){case"Hit":return 1;case"Miss":return 2;default:return 0;}}};});var Gp=q((lF,VA)=>{"use strict";var qN=rn(),UA=Ne(),HN=xt(),zp=ji(),Je=qN.extend({constructor:function(t){this._options=HN.assign({cdnName:null,parsers:[],requestMethod:"HEAD",requestHeaders:{},parseType:function(){return 0;}},t),this._responses={};}
214,done:function(){this.emit(Je.Event.DONE);},addParser:function(t){return this._options.parsers.push(t),this;},setCdnName:function(t){return this._options.cdnName=t,this;},setRequestMethod:function(t){return this._options.requestMethod=t,this;},setRequestHeader:function(t,e){return this._options.requestHeaders[t]=e,this;},setParseType:function(t){return this._options.parseType=t,this;},getParsedCdnName:function(){return this._cdnName;},getParsedNodeHost:function(){return this._cdnNodeHost;},getParsedNodeTypeString:function(){return this._cdnNodeTypeString;},getParsedNodeType:function(){return this._cdnNodeType;},getResponses:function(){return this._responses;},parse:function(t,e){this._responses=e||{};var i=JSON.stringify(this._options.requestHeaders);this._responses[i]?this._parseResponse(this._responses[i]):this._requestResponse(t);},_requestResponse:function(t){var e=JSON.stringify(this._options.requestHeaders),i=e!=="{}",n=new zp(t,null,null,{method:this._options.requestMethod,maxRetries:0,requestHeaders:this._options.requestHeaders,cache:!0});n.on(zp.Event.SUCCESS,function(r){this._responses[e]=r.getResponseHeaders(),this._parseResponse(this._responses[e]);}.bind(this)),n.on(zp.Event.ERROR,function(r){i?(this._options.requestHeaders={},this._requestResponse(t)):this.done();}.bind(this)),n.send();},_parseResponse:function(t){this._options.parsers.forEach(function(e){if(typeof e.headerName=="string")this._parseHeaderResponse(t,e,e.headerName);else if(Array.isArray(e.headerName))for(var i=0,n=e.headerName.length;i<n;i++){var r=e.headerName[i];typeof r=="string"&&this._parseHeaderResponse(t,e,r);}}.bind(this)),this.done();},_parseHeaderResponse:function(t,e,i){i&&(i=i?i.toLowerCase():"",t.split(`
215`).forEach(function(n){var r=n.indexOf(":");if(r!==-1){var s=n.slice(0,r).toLowerCase();s===i&&this._executeParser(e,n.slice(r+1));}}.bind(this)));},_executeParser:function(t,e){try{var i=t.regex.exec(e.trim());if(i!==null)switch(this._options.cdnName&&(this._cdnName=this._options.cdnName),t.element){case Je.ElementType.HOST:this._cdnNodeHost=i[1];break;case Je.ElementType.TYPE:this._cdnNodeTypeString=i[1],this._cdnNodeType=this._options.parseType(this._cdnNodeTypeString);break;case Je.ElementType.HOST_AND_TYPE:this._cdnNodeHost=i[1],this._cdnNodeTypeString=i[2],this._cdnNodeType=this._options.parseType(this._cdnNodeTypeString);break;case Je.ElementType.TYPE_AND_HOST:this._cdnNodeTypeString=i[1],this._cdnNodeType=this._options.parseType(this._cdnNodeTypeString),this._cdnNodeHost=i[2];break;case Je.ElementType.NAME:this._cdnName=i[1].toUpperCase();break;}}catch{UA.warn("CDN parsing for "+this._options.cdnName+" could not parse header value "+e);}},shouldExecute:function(){return!0;}},{Event:{DONE:"done"},ElementType:{HOST:"host",TYPE:"type",HOST_AND_TYPE:"host+type",TYPE_AND_HOST:"type+host",NAME:"name"},_cdnConfigs:{},setBalancerHeaderName:function(t,e){Je._cdnConfigs.Balancer.parsers[0].headerName=t,Je._cdnConfigs.Balancer.parsers[1].headerName=e;},create:function(t){if(Je._cdnConfigs[t])return new Je(Je._cdnConfigs[t]);UA.warn("Tried to create an unexisting CdnParser named "+t);},add:function(t,e){Je._cdnConfigs[t]=e;}});Je.add("Level3",TA());Je.add("Cloudfront",AA());Je.add("Akamai",xA());Je.add("Highwinds",wA());Je.add("Fastly",IA());Je.add("Telefonica",PA());Je.add("Amazon",RA());Je.add("Edgecast",NA());Je.add("Balancer",MA());Je.add("NosOtt",FA());VA.exports=Je;});var HA=q((uF,qA)=>{"use strict";var $N=rn(),zN=Ne(),Wp=ji(),Yp=$N.extend({constructor:function(t){this.plugin=t,this.headerName="x-cdn";},init:function(){var t=null;this.plugin&&(this.plugin.getAdapter()&&this.plugin.getAdapter().getURLToParse()?t=this.plugin.getAdapter().getURLToParse():t=this.plugin.getResource()),this.plugin&&this.plugin.getAdapter()&&this.plugin.getAdapter().flags.isStarted&&this._request(t);},done:function(t){this.emit(Yp.Events.DONE,t);},error:function(){this.emit(Yp.Events.ERROR);},_successfulRequest:function(t){setTimeout(this.init.bind(this),parseInt(this.plugin.options["parse.cdnTTL"])*1e3);var e=t.getResponseHeaders().split(`
216`),i=null;for(var n in e){var r=e[n],s=r.indexOf(this.headerName);s>-1&&(i=r.substring(s+this.headerName.length+1,r.length-1).replace(" ",""));}this.done(i);},_failedRequest:function(){setTimeout(this.init.bind(this),parseInt(this.plugin.options["parse.cdnTTL"])*1e3),zN.warn("CDN switch detection request failed"),this.error();},_request:function(t){var e=new Wp(t,null,null,{method:"HEAD",cache:!0});e.on(Wp.Event.SUCCESS,this._successfulRequest.bind(this)),e.on(Wp.Event.ERROR,this._failedRequest.bind(this)),e.send();}}
216,{Events:{DONE:"done",ERROR:"error"}});qA.exports=Yp;});var Jp=q((dF,$A)=>{"use strict";var Xp=ji(),GN=wo(),Kp=Ne(),Qp=Do(),WN=GN.extend({parse:function(t,e){if(e)this.parseLocation(e,t);else{var i=new Xp(t,null,null,{cache:!0,requestHeaders:this._headers});i.on(Xp.Event.SUCCESS,function(n){this.parseLocation(n,t);}.bind(this)),i.on(Xp.Event.ERROR,function(n){this.done();}.bind(this)),i.send();}},parseLocation:function(t,e){this.iterations--;var i=new RegExp(/<Location>([\s\S]+)<\/Location>/);try{this._lastManifest=t;var n=t.getResponseText(),r=i.exec(n);if(r&&r[1])var s=this._htmlDecode(r[1].replace(`
217`,""));s&&s!==e&&this.iterations>0?this.parse(s):this.parseFinalResource(n,e);}catch{Kp.warn("Dash parse failed"),this.done();}},_htmlDecode:function(t){if(typeof document<"u"&&typeof document.createElement=="function"){var e=document.createElement("textarea");return e.innerHTML=t,e.childNodes&&e.childNodes.length?e.childNodes[0].nodeValue:t;}return t;},parseFinalResource:function(t,e){var i=new RegExp(/<BaseURL>[\r\n]*(.*?)[\r\n]*<\/BaseURL>/),n=new RegExp(/<SegmentURL[\s\S]*media="([^"]+)/),r=new RegExp(/<SegmentTemplate[\s\S]*media="([^"]+)/),s=null;try{s=i.exec(t)||r.exec(t)||n.exec(t),this._getManifestMetadata(t),s&&s[1]&&this._isFullUrl(s[1])?s[1].indexOf('"')>0?this._realResource=s[1].substr(0,s[1].indexOf('"')).replace(`
218`,""):this._realResource=s[1].replace(`
219`,""):this._realResource=e;}catch{Kp.warn("Dash manifest parse failed");}this.done();},_getManifestMetadata:function(t){try{var e=new RegExp(/<AdaptationSet[\s\S]*mimeType="video\/([^"]+)/),i=e.exec(t),n=null;switch(i[1]){case"mp4":case"m4s":n=Qp.MP4;break;case"mp2t":n=Qp.MPEG2;break;case"cmfv":n=Qp.CMF;break;}this._transportFormat=n;}catch{Kp.warn("Couldnt find the transport format");}},_isFullUrl:function(t){return t.indexOf("http")!==-1;},shouldExecute:function(t){var e=!0;if(t){var i=t.getResponseText();e=i.indexOf("<MPD")!==-1;}return e;}});$A.exports=WN;});var em=q((cF,zA)=>{"use strict";var Zp=ji(),YN=wo(),XN=YN.extend({parse:function(t,e){if(e)this._parseWithManifest(e);else{this._realResource=t;var i=new Zp(t,null,null,{cache:!0,requestHeaders:this._headers});i.on(Zp.Event.SUCCESS,function(n){this._parseWithManifest(n);}.bind(this)),i.on(Zp.Event.ERROR,function(n){this.done();}.bind(this)),i.send();}},_parseWithManifest:function(t){this._lastManifest=t;var e=t.getResponseHeaders(),i=!1;t&&t.xhr&&t.xhr.responseURL&&t.xhr.responseURL!==this._realResource?(this._realResource=t.xhr.responseURL,this.parse(this._realResource),i=!0):e.split(`
220`).forEach(function(n){n.startsWith("Location:")&&(this._realResource=n.slice(10),this.parse(this._realResource),i=!0);}.bind(this)),i||this.done();}});zA.exports=XN;});var nm=q((hF,YA)=>{"use strict";var KN=Cn(),QN=$p(),tm=Gp(),im=HA(),JN=Jp(),ZN=wo(),ej=em(),GA=Ne(),tj=Ti(),WA=KN.extend({constructor:function(t){WA.__super__.constructor.apply(this,arguments),this._plugin=t,this._realResource=null,this._transportFormat=null,this._initResource=null,this._cdnName=null,this._cdnNodeHost=null,this._cdnNodeTypeString=null,this._cdnNodeType=null,this._responses={},this._isBusy=!1,this.transformName="Resource";},getResource:function(){return this._realResource;},_getInitialCdnResource:function(){return this._realResource||this._initResource;},getTransportFormat:function(){return this._transportFormat;},getCdnName:function(){return this._cdnName;},getNodeHost:function(){return this._cdnNodeHost;},getNodeTypeString:function(){return this._cdnNodeTypeString;},getNodeType:function(){return this._cdnNodeType;},init:function(t){if(!t){this.done();return;}this._isBusy||(this._isBusy=!0,this._initResource=t,this._parseManifestEnabled=this._plugin.isParseManifest(),this._cdnEnabled=this._plugin.isParseCdnNode(),this._cdnList=this._plugin.getParseCdnNodeList().slice(),tm.setBalancerHeaderName(this._plugin.getParseCdnNodeNameHeader(),this._plugin.getParseNodeHeader()),this._setTimeout(),this._parseManifestEnabled?this._isFinalUrl(this._initResource)?(this._realResource=this._initResource,this.done()):this.parseManifest():this._parseCDN());},_isFinalUrl:function(t){var e=[".ts",".mp4",".m4s",".cmfv"];t=t||"";for(var i in e){var n=e[i];if(t.lastIndexOf(n)===t.length-n.length)return!0;}return!1;},_setTimeout:function(){var t=function(){this._isBusy&&(this.done(),GA.warn("ResourceTransform has exceeded the maximum execution time (3s) and will be aborted."));}.bind(this);try{this._parseTimeout=setTimeout(t,3e3);}catch(e){typeof atv<"u"?this._parseTimeout=atv.setTimeout(t,3e3):GA.error(e);}},parseManifest:function(t,e){var i=this._plugin.options["parse.manifest.auth"],n=[new ej(i),new JN(i),new QN(i)];this._parseManifest(n,t,e||this._initResource);}
220,_parseManifest:function(t,e,i,n){if(t.length>0){var r=t[0];r.shouldExecute(e)?(r.on(ZN.Event.DONE,function(){this._parseManifest(t.slice(1,t.length),r.getLastManifest(),r.getResource(),r.getTransportFormat()||n);}.bind(this)),r.parse(i,e)):this._parseManifest(t.slice(1,t.length),e,i,n);}else this._transportFormat=n,this._realResource=i,this._parseCDN();},_parseCDN:function(){if(this._plugin.isCdnSwitch())this.switchDetector=new im(this._plugin),this.switchDetector.on(im.Events.DONE,function(i){this._cdnName=i.data,this.done();}.bind(this)),this.switchDetector.on(im.Events.ERROR,function(){this.done();}.bind(this)),this.switchDetector.init();else if(this._cdnEnabled&&this._cdnList.length>0){var t=this._cdnList.shift();if(this.getNodeHost())return;var e=tm.create(t);e?(e.on(tm.Event.DONE,function(){this._responses=e.getResponses(),this._cdnName=e.getParsedCdnName(),this._cdnNodeHost=e.getParsedNodeHost(),this._cdnNodeTypeString=e.getParsedNodeTypeString(),this._cdnNodeType=e.getParsedNodeType(),this.getNodeHost()?this.done():this._parseCDN();}.bind(this)),e.parse(this._getInitialCdnResource(),this._responses)):this._parseCDN();}else this.done();},parse:function(t){if(t.service===tj.Service.START){var e=this._plugin.requestBuilder.lastSent;e.parsedResource=t.params.parsedResource=this.getResource()||t.params.parsedResource,e.transportFormat=t.params.transportFormat=this.getTransportFormat()||t.params.transportFormat,this._cdnEnabled&&(e.cdn=t.params.cdn=t.params.cdn||this.getCdnName(),e.nodeHost=t.params.nodeHost=this.getNodeHost()||t.params.nodeHost,e.nodeType=t.params.nodeType=this.getNodeType()||t.params.nodeType,e.nodeTypeString=t.params.nodeTypeString=this.getNodeTypeString()||t.params.nodeTypeString);}}});YA.exports=WA;});var rm=q((fF,KA)=>{"use strict";var XA=Cn(),ij=XA.extend({constructor:function(t,e){this._sendRequest=!1,this._isBusy=!1,this.plugin=t,this.session=e,this.transformName="Offline";},parse:function(t){t&&this.plugin.offlineStorage&&this.plugin.offlineStorage.addEvent(t.service,t.params);},hasToSend:function(t){return!1;},getState:function(){return XA.STATE_OFFLINE;}});KA.exports=ij;});var JA=q((pF,QA)=>{"use strict";var nj=Ue(),rj=Ne(),sm=nj.extend({exists:function(t){return sm.Dictionary.hasOwnProperty(t);},getNewName:function(t){var e=sm.Dictionary[t];return rj.warn('The option "'+t+'" is deprecated, use "'+e+'" instead'),e;}},{Dictionary:{httpSecure:"app.https",username:"user.name",anonymousUser:"user.anonymousId",obfuscateIp:"user.obfuscateIp",userType:"user.type","content.title2":"content.program","background.settings.iphone":"background.settings.iOS","parse.hls":"parse.manifest","parse.dash":"parse.manifest","parse.locationHeader":"parse.manifest","extraparam.1":"content.customDimension.1","extraparam.2":"content.customDimension.2","extraparam.3":"content.customDimension.3","extraparam.4":"content.customDimension.4","extraparam.5":"content.customDimension.5","extraparam.6":"content.customDimension.6","extraparam.7":"content.customDimension.7","extraparam.8":"content.customDimension.8","extraparam.9":"content.customDimension.9","extraparam.10":"content.customDimension.10","extraparam.11":"content.customDimension.11","extraparam.12":"content.customDimension.12","extraparam.13":"content.customDimension.13","extraparam.14":"content.customDimension.14","extraparam.15":"content.customDimension.15","extraparam.16":"content.customDimension.16","extraparam.17":"content.customDimension.17","extraparam.18":"content.customDimension.18","extraparam.19":"content.customDimension.19","extraparam.20":"content.customDimension.20","ad.extraparam.1":"ad.customDimension.1","ad.extraparam.2":"ad.customDimension.2","ad.extraparam.3":"ad.customDimension.3","ad.extraparam.4":"ad.customDimension.4","ad.extraparam.5":"ad.customDimension.5","ad.extraparam.6":"ad.customDimension.6","ad.extraparam.7":"ad.customDimension.7","ad.extraparam.8":"ad.customDimension.8","ad.extraparam.9":"ad.customDimension.9","ad.extraparam.10":"ad.customDimension.10"}});QA.exports=sm;});var am=q((mF,ZA)=>{"use strict";var sj={HDS:"HDS",HLS:"HLS",MSS:"MSS",DASH:"DASH",RTMP:"RTMP",RTP:"RTP",RTSP:"RTSP",DVB:"DVB",DVBC:"DVB-C",DVBT:"DVB-T",DVBT2:"DVB-T2",MULTICAST:"MULTICAST"};ZA.exports=sj;});var lm=q((gF,tE)=>{"use strict";var aj=Ue(),oj=JA(),lj=Ne(),uj=Do(),dj=am(),eE=Wd(),om=aj.extend({constructor:function(t){this.enabled=!0,this.host="a-fds.youborafds01.com",this.accountCode="nicetest",this.authToken=null,this.authType="Bearer",this.preventZombieViews=!0,this.offline=!1,this.referer=null,this.referral=null,this.disableCookies=!0,this.forceCookies=!1,this.disableStorage=!1,this["user.email"]=null,this["user.type"]=null,this["user.name"]=null,this["user.obfuscateIp"]=!1,this["user.anonymousId"]=null,this["user.privacyProtocol"]=null,this["parse.manifest"]=!1,this["parse.manifest.auth"]={},this["parse.cdnNameHeader"]=["x-cdn-forward"],this["parse.cdnNodeHeader"]="",this["parse.cdnNode"]=!1,this["parse.cdnNode.list"]=["Akamai","Amazon","Cloudfront","Level3","Fastly","Highwinds","Telefonica","Edgecast","NosOtt"],this["parse.fdsResponseHost"]=null,this["parse.cdnSwitchHeader"]=!1,this["parse.cdnTTL"]=60,this["network.ip"]=null,this["network.isp"]=null,this["network.connectionType"]=null,this["device.id"]=null,this["device.code"]=null,this["device.model"]=null,this["device.brand"]=null,this["device.type"]=null,this["device.name"]=null,this["device.osName"]=null,this["device.osVersion"]=null,this["device.browserName"]=null,this["device.browserVersion"]=null,this["device.browserType"]=null,this["device.browserEngine"]=null,this["device.EDID"]=null,this["device.isAnonymous"]=!1,this["content.transactionCode"]=null,this["content.resource"]=null,this["content.isLive"]=null,this["content.isLive.noSeek"]=!1,this["content.isLive.noMonitor"]=!1,this["content.title"]=null,this["content.program"]=null,this["content.duration"]=null,this["content.fps"]=null,this["content.segmentDuration"]=null,this["content.bitrate"]=null,this["content.totalBytes"]=null,this["content.sendTotalBytes"]=!1,this["content.throughput"]=null,this["content.rendition"]=null,this["content.cdn"]=null,this["content.cdnNode"]=null,this["content.cdnType"]=null,this["content.metadata"]={},this["content.metrics"]={},this["content.streamingProtocol"]=null,this["content.transportFormat"]=null,this["content.package"]=null,this["content.saga"]=null,this["content.tvShow"]=null,this["content.season"]=null,this["content.episodeTitle"]=null,this["content.channel"]=null,this["content.id"]=null,this["content.imdbId"]=null,this["content.gracenoteId"]=null,this["content.type"]=null,this["content.genre"]=null,this["content.language"]=null,this["content.autodetect.language"]=!0,this["content.subtitles"]=null,this["content.autodetect.subtitles"]=!0,this["content.contractedResolution"]=null,this["content.cost"]=null,this["content.price"]=null,this["content.playbackType"]=null,this["content.drm"]=null,this["content.encoding.videoCodec"]=null,this["content.encoding.audioCodec"]=null,this["content.encoding.codecSett
220ings"]=null,this["content.encoding.codecProfile"]=null,this["content.encoding.containerFormat"]=null,this["ad.metadata"]={},this["ad.campaign"]=null,this["ad.creativeId"]=null,this["ad.provider"]=null,this["ad.resource"]=null,this["ad.title"]=null,this["ad.duration"]=null,this["ad.expectedPattern"]=null,this["ad.givenAds"]=null,this["ad.breaksTime"]=null,this["ad.expectedBreaks"]=null,this["ad.givenBreaks"]=null,this["ad.ignore"]=!1,this["ad.blockerDetected"]=null,this["app.name"]=null,this["app.releaseVersion"]=null,this["app.https"]=!1,this["background.enabled"]=!0,this["background.settings"]=null,this["background.settings.android"]="stop",this["background.settings.iOS"]="stop",this["background.settings.desktop"]=null,this["background.settings.tv"]="stop",this["background.settings.playstation"]="stop",this["cdnbalancer.uuid"]=null,this["content.customDimensions"]={},this["content.customDimension.1"]=null,this["content.customDimension.2"]=null,this["content.customDimension.3"]=null,this["content.customDimension.4"]=null,this["content.customDimension.5"]=null,this["content.customDimension.6"]=null,this["content.customDimension.7"]=null,this["content.customDimension.8"]=null,this["content.customDimension.9"]=null,this["content.customDimension.10"]=null,this["content.customDimension.11"]=null,this["content.customDimension.12"]=null,this["content.customDimension.13"]=null,this["content.customDimension.14"]=null,this["content.customDimension.15"]=null,this["content.customDimension.16"]=null,this["content.customDimension.17"]=null,this["content.customDimension.18"]=null,this["content.customDimension.19"]=null,this["content.customDimension.20"]=null,this["ad.customDimension.1"]=null,this["ad.customDimension.2"]=null,this["ad.customDimension.3"]=null,this["ad.customDimension.4"]=null,this["ad.customDimension.5"]=null,this["ad.customDimension.6"]=null,this["ad.customDimension.7"]=null,this["ad.customDimension.8"]=null,this["ad.customDimension.9"]=null,this["ad.customDimension.10"]=null,this.forceInit=!1,this["session.metrics"]={},this["session.context"]=!1,this["errors.fatal"]=[],this["errors.nonFatal"]=[],this["errors.ignore"]=[],this.linkedViewId=null,this.waitForMetadata=!1,this.pendingMetadata=[],this.method=eE.GET,this["playhead.monitor"]=!0,this["readyState.monitor"]=!0,this["session.splitViews"]=!1,this.setOptions(t);},setOptions:function(t,e){var i=!1;if(e===void 0){e=this,i=!0;var n=new oj();}if(typeof t<"u")for(var r in t){var s=!1,a=null;i&&(this.hasOwnProperty(r)||(n.exists(r)?(a=n.getNewName(r),s=!0):lj.warn('The option "'+r+'" does not exist, so it cannot be set'))),typeof e[r]=="object"&&e[r]!==null&&!Array.isArray(e[r])&&r==="parse.cdnNode.list"?this.setOptions(t[r],e[r]):s?e[a]=t[r]:e[r]=t[r];}},setExtraParams:function(t){var e=20;if(!(typeof t!="object"||!t.length)){for(t.length>=e&&(t=t.slice(0,e));t.length<e;)t.push(null);t.forEach(function(i,n){this["content.customDimension."+(n+1).toString()]=i;}.bind(this));}},setCustomDimensions:function(){om.prototype.setExtraParams.apply(this,arguments);},setAdExtraParams:function(t){var e=10;if(!(typeof t!="object"||!t.length)){for(t.length>=e&&(t=t.slice(0,e));t.length<e;)t.push(null);t.forEach(function(i,n){this["ad.customDimension."+(n+1).toString()]=i;}.bind(this));}},setAdCustomDimensions:function(){om.prototype.setAdExtraParams.apply(this,arguments);}}
220,{StreamingProtocol:dj,TransportFormat:uj,RequestMethod:eE});tE.exports=om;});var rE=q((vF,nE)=>{"use strict";var iE=Cn(),Qd=Ti(),cj=iE.extend({_services:[Qd.Service.INIT,Qd.Service.START,Qd.Service.OFFLINE_EVENTS],isBlocking:function(t){if(this._isBusy&&t!=null){if(this._services.indexOf(t.service)!==-1)this.done();else if(t.service===Qd.Service.ERROR)return!1;}return iE.prototype.isBlocking.apply(this,arguments);}});nE.exports=cj;});var Zd=q((_F,sE)=>{"use strict";var hj=Ue(),Jd=Ne(),fj=hj.extend({constructor:function(t,e,i,n){this.prefix=t||"youbora",this.disableCookies=e,this.forceCookies=i,this.disabled=n;},isEnabled:function(){if(this.disabled)return!1;var t=!0;if(!this.forceCookies)try{localStorage.setItem(this.prefix+".test","true"),localStorage.removeItem(this.prefix+".test");}catch{t=!1;}return t;},setLocal:function(t,e){if(this.disabled)return null;var i=null;try{this.forceCookies||(typeof localStorage>"u"||!localStorage)&&!this.disableCookies?i=this._setCookie(this.prefix+".local."+t,e):i=localStorage.setItem(this.prefix+"."+t,e);}catch{Jd.error("Youbora Infinity needs localStorage or cookies, not supported by your browser.");}return i;},getLocal:function(t){return this.disabled?null:this._localGetRemove("getItem","_getCookie",t);},removeLocal:function(t){return this.disabled?null:this._localGetRemove("removeItem","_removeCookie",t);},_localGetRemove:function(t,e,i){var n=null;try{this.forceCookies||(typeof localStorage>"u"||!localStorage)&&!this.disableCookies?n=this[e](this.prefix+".local."+i):n=localStorage[t](this.prefix+"."+i);}catch{Jd.error("Youbora Infinity needs localStorage or cookies, not supported by your browser.");}return n;},setSession:function(t,e){if(this.disabled)return null;var i=null;try{this.forceCookies||(typeof sessionStorage>"u"||!sessionStorage)&&!this.disableCookies?i=this._setCookie(this.prefix+".session."+t,e):i=sessionStorage.setItem(this.prefix+"."+t,e);}catch{Jd.error("Youbora Infinity needs sessionStorage or cookies, not supported by your browser.");}return i;},getSession:function(t){return this.disabled?null:this._sessionGetRemove("getItem","_getCookie",t);},removeSession:function(t){return this.disabled?null:this._sessionGetRemove("removeItem","_removeCookie",t);},_sessionGetRemove:function(t,e,i){var n=null;try{this.forceCookies||(typeof sessionStorage>"u"||!sessionStorage)&&!this.disableCookies?n=this[e](this.prefix+".session."+i):n=sessionStorage[t](this.prefix+"."+i);}catch{Jd.error("Youbora Infinity needs sessionStorage or cookies, not supported by your browser.");}return n;},getStorages:function(t){return this.getSession(t)||this.getLocal(t);},setStorages:function(t,e){this.setSession(t,e),this.setLocal(t,e);},removeStorages:function(t){this.removeSession(t),this.removeLocal(t);},_setCookie:function(t,e){if(typeof document<"u"){var i=";";typeof location<"u"&&(i+="domain="+location.host.split(".").reverse().splice(0,2).reverse().join(".")+";path=/;"),document.cookie=t+"="+e+i;}},_getCookie:function(t){if(typeof document<"u")for(var e=t+"=",i=decodeURIComponent(document.cookie),n=i.split(";"),r=0;r<n.length;r++){for(var s=n[r];s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length);}return null;},_removeCookie:function(t){this._setCookie(t,"");}});sE.exports=fj;});var oE=q((yF,aE)=>{"use strict";var pj=Ue(),mj=Zd(),gj=pj.extend({constructor:function(){this.storage=new mj("youboraOffline",!0),this.actualView=null,this.viewList=[],this.givenIds=[],this._getOldViewList();},_newView:function(){var t=this._getValidId();this.storage.setLocal(t,""),this.viewList.push(t),this.storage.setLocal("views",this.viewList),this.actualView=t;},addEvent:function(t,e){if(t==="/start"&&this._newView(),t==="/init"||!this.actualView)return null;var i='{"request":"'+t.slice(1)+'",';i+='"unixtime":'+Date.now()+",";for(var n in e){if(e[n]===void 0)break;i+='"'+n+'":',n==="code"?i+='"CODE_PLACEHOLDER",':n==="sessionId"?i+='"SESSION_PLACEHOLDER",':n==="sessionRoot"?i+='"ROOT_PLACEHOLDER",':typeof e[n]=="string"?i+='"'+e[n]+'",':typeof e[n]=="object"?i+='"'+JSON.stringify(e[n]).replace(/"/g,'\\"')+'",':i+=e[n]+",";}i=i.slice(0,-1),i+="}";var r=this.storage.getLocal(this.actualView);r!==""&&(r=r+","),this.storage.setLocal(this.actualView,r+i);},getView:function(){if(this.viewList.length>this.givenIds.length)for(var t=0;;){var e=this.viewList[t];if(this.givenIds.indexOf(e)<0)return this.givenIds.push(e),["["+this.storage.getLocal(e)+"]",e];t++;}
220return[null,null];},removeView:function(t){this.storage.removeLocal(t);var e=this.viewList.indexOf(t);e!==-1&&this.viewList.splice(e,1),e=this.givenIds.indexOf(t),e!==-1&&this.givenIds.splice(e,1),this.storage.setLocal("views",this.viewList.toString()),t===this.actualView&&(this.actualView=null);},_getOldViewList:function(){var t="";this.storage.getLocal("views")?t=this.storage.getLocal("views"):this.storage.setLocal("views",""),t===""?this.viewList=[]:typeof t.split=="function"&&(this.viewList=t.split(","));},_getValidId:function(){var t=Math.floor(Math.random()*1e8).toString();return this.viewList.indexOf(t)>=0?this._getValidId():t;},sent:function(){this.givenIds=[];}});aE.exports=gj;});var cm=q((bF,lE)=>{"use strict";var vj=Ue(),_j=Ne(),um=["accountCode","username","anonymousUser","rendition","deviceInfo","player","title","title2","live","segmentDuration","mediaDuration","mediaResource","parsedResource","transactionCode","properties","cdn","playerVersion","param1","param2","param3","param4","param5","param6","param7","param8","param9","param10","param11","param12","param13","param14","param15","param16","param17","param18","param19","param20","dimensions","playerStartupTime","obfuscateIp","privacyProtocol","p2pEnabled","pluginVersion","pluginInfo","isp","connectionType","ip","referer","userType","streamingProtocol","transportFormat","householdId","adsBlocked","adsExpected","deviceUUID","libVersion","nodeHost","nodeType","appName","appReleaseVersion","package","saga","tvshow","season","titleEpisode","channel","imdbID","gracenoteID","contentType","genre","contentLanguage","subtitles","cost","price","playbackType","email","drm","videoCodec","audioCodec","codecSettings","codecProfile","containerFormat","contentId","contractedResolution","linkedViewId","edid","cdnBalancerResponseUUID","triggeredEvents"],dm=["player","playhead","adTitle","position","adDuration","adCampaign","adCreativeId","adProvider","adResource","adPlayerVersion","adProperties","adAdapterVersion","adInsertionType","extraparam1","extraparam2","extraparam3","extraparam4","extraparam5","extraparam6","extraparam7","extraparam8","extraparam9","extraparam10","fullscreen","audio","skippable","adNumber","adNumberInBreak","breakNumber"],Br=vj.extend({constructor:function(t){this._plugin=t,this._adNumber=0,this._adNumberInBreak=0,this.lastSent={};},fetchParams:function(t,e,i){t=t||{},e=e||[];for(var n=0;n<e.length;n++){var r=e[n];if(!t[r]){var s=Br.getters[r];if(this._plugin[s]){var a=this._plugin[s]();a!==null&&(!i||this.lastSent[r]!==a)&&(t[r]=a,this.lastSent[r]=a);}else _j.warn("Trying to call undefined getter "+r+":"+s);}}return t;},getGetters:function(){return Br.getters;},buildBody:function(t){var e=null;return this.fetchParams(e,Br.bodyParams[t],!1);},buildParams:function(t,e){return t=t||{},this.fetchParams(t,Br.params[e],!1),this.fetchParams(t,Br.differentParams[e],!0),t;},getNewAdNumber:function(){var t=this.lastSent.adNumber;return t&&this.lastSent.position===this._plugin.getAdPosition()?t+=1:t=1,this.lastSent.adNumber=t,t;},getNewAdNumberInBreak:function(){return this._adNumberInBreak++,this.lastSent.adNumberInBreak=this._adNumberInBreak,this._adNumberInBreak;},getNewBreakNumber:function(){var t=1;return this._adNumberInBreak=0,this.lastSent.breakNumber&&(t=this.lastSent.breakNumber+1),this.lastSent.breakNumber=t,t;},getChangedEntities:function(){return this.fetchParams({},Br.differentParams.entities,!0);}},{params:{"/data":["system","pluginVersion","requestNumber","username"],"/init":um,"/start":um,"/joinTime":["joinDuration","playhead","bitrate","triggeredEvents"],"/pause":["playhead","triggeredEvents"],"/resume":["pauseDuration","playhead","triggeredEvents"],"/seek":["seekDuration","playhead","triggeredEvents"],"/bufferUnderrun":["bufferDuration","playhead","triggeredEvents"],"/error":["player","playhead","triggeredEvents"].concat(um),"/stop":["bitrate","totalBytes","playhead","pauseDuration","metrics","cdnDownloadedTraffic","multiCdnInfo","p2pDownloadedTraffic","uploadTraffic","triggeredEvents"],"/infinity/video/event":["playhead"],"/adInit":dm,"/adStart":dm,"/adJoin":["playhead","position","adJoinDuration","adPlayhead","adNumber","adNumberInBreak","breakNumber"],"/adPause":["playhead","position","adPlayhead","adNumber","adNumberInBreak","breakNumber"],"/adResume":["playhead","position","adPlayhead","adPauseDuration","adNumber","adNumberInBreak","breakNumber"],"/adBufferUnderrun":["playhead","position","adPlayhead","adBufferDuration","adNumber","adNumberInBreak","breakNumber"],"/adStop":["playhead","position","adPlayhead","adBitrate","adTotalDuration","pauseDuration","adViewedDuration","adViewability","adNumber","adNumberInBreak","breakNumber"],"/adClick":["playhead","position","adPlayhead","adNumber","adNumberInBreak","breakNumber"],"/adError":["playhead"].concat(dm),"/adManifest":["givenBreaks","expectedBreaks","expectedPattern","breaksTime"],"/adBreakStart":["position","givenAds","expectedAds","breakNumber","adInsertionType"],"/adBreakStop":["position","breakNumber"],"/adQuartile":["position","adViewedDuration","adViewability","adNumber","adNumberInBreak","breakNumber"],"/ping":["droppedFrames","playrate","cdnDownloadedTraffic","multiCdnInfo","p2pDownloadedTraffic","uploadTraffic","latency","packetLoss","packetSent","metrics","totalBytes","segmentDuration"],"/infinity/session/start":["accountCode","username","userType","anonymousUser","route","page","referer","referral","screenResolution","language","deviceInfo","adsBlocked","deviceUUID","libVersion","appName","appReleaseVersion","isp","connectionType","ip","obfuscateIp","privacyProtocol","dimensions","param1","param2","param3","param4","param5","param6","param7","param8","param9","param10","param11","param12","param13","param14","param15","param16","param17","param18","param19","param20","edid"],"/infinity/session/stop":["sessionMetrics"],"/infinity/session/nav":["route","page","scrollDepth"],"/infinity/session/beat":["sessionMetrics"],"/infinity/session/event":["accountCode"],"/offlineEvents":{}},bodyParams:{"/offlineEvents":["viewJson"]}
220,differentParams:{entities:["rendition","title","title2","param1","param2","param3","param4","param5","param6","param7","param8","param9","param10","param11","param12","param13","param14","param15","param16","param17","param18","param19","param20","cdn","nodeHost","nodeType","nodeTypeString","subtitles","contentLanguage","contentId"]},getters:{requestNumber:"getRequestNumber",playhead:"getPlayhead",playrate:"getPlayrate",fps:"getFramesPerSecond",segmentDuration:"getSegmentDuration",droppedFrames:"getDroppedFrames",mediaDuration:"getDuration",bitrate:"getBitrate",totalBytes:"getTotalBytes",throughput:"getThroughput",rendition:"getRendition",title:"getTitle",title2:"getTitle2",live:"getIsLive",mediaResource:"getResource",parsedResource:"getParsedResource",transactionCode:"getTransactionCode",properties:"getMetadata",playerVersion:"getPlayerVersion",player:"getPlayerName",cdn:"getCdn",pluginVersion:"getPluginVersion",libVersion:"getLibVersion",userType:"getUserType",streamingProtocol:"getStreamingProtocol",transportFormat:"getTransportFormat",obfuscateIp:"getObfuscateIp",privacyProtocol:"getPrivacyProtocol",householdId:"getHouseholdId",latency:"getLatency",packetLoss:"getPacketLoss",packetSent:"getPacketSent",metrics:"getVideoMetrics",dimensions:"getCustomDimensions",param1:"getExtraparam1",param2:"getExtraparam2",param3:"getExtraparam3",param4:"getExtraparam4",param5:"getExtraparam5",param6:"getExtraparam6",param7:"getExtraparam7",param8:"getExtraparam8",param9:"getExtraparam9",param10:"getExtraparam10",param11:"getExtraparam11",param12:"getExtraparam12",param13:"getExtraparam13",param14:"getExtraparam14",param15:"getExtraparam15",param16:"getExtraparam16",param17:"getExtraparam17",param18:"getExtraparam18",param19:"getExtraparam19",param20:"getExtraparam20",extraparam1:"getAdExtraparam1",extraparam2:"getAdExtraparam2",extraparam3:"getAdExtraparam3",extraparam4:"getAdExtraparam4",extraparam5:"getAdExtraparam5",extraparam6:"getAdExtraparam6",extraparam7:"getAdExtraparam7",extraparam8:"getAdExtraparam8",extraparam9:"getAdExtraparam9",extraparam10:"getAdExtraparam10",position:"getAdPosition",adNumber:"getAdNumber",adNumberInBreak:"getAdNumberInBreak",breakNumber:"getBreakNumber",adPlayhead:"getAdPlayhead",adDuration:"getAdDuration",adCampaign:"getAdCampaign",adCreativeId:"getAdCreativeId",adBitrate:"getAdBitrate",adTitle:"getAdTitle",adResource:"getAdResource",adPlayerVersion:"getAdPlayerVersion",adProperties:"getAdMetadata",adAdapterVersion:"getAdAdapterVersion",givenBreaks:"getGivenBreaks",expectedBreaks:"getExpectedBreaks",expectedPattern:"getExpectedPattern",breaksTime:"getBreaksTime",givenAds:"getGivenAds",expectedAds:"getExpectedAds",adsExpected:"getAdsExpected",adViewedDuration:"getAdViewedDuration",adViewability:"getAdViewability",fullscreen:"getIsFullscreen",audio:"getAudioEnabled",skippable:"getIsSkippable",adProvider:"getAdProvider",adInsertionType:"getAdInsertionType",pluginInfo:"getPluginInfo",isp:"getIsp",connectionType:"getConnectionType",ip:"getIp",deviceInfo:"getDeviceInfo",edid:"getEDID",system:"getAccountCode",accountCode:"getAccountCode",username:"getUsername",anonymousUser:"getAnonymousUser",joinDuration:"getJoinDuration",bufferDuration:"getBufferDuration",seekDuration:"getSeekDuration",pauseDuration:"getPauseDuration",adJoinDuration:"getAdJoinDuration",adBufferDuration:"getAdBufferDuration",adPauseDuration:"getAdPauseDuration",adTotalDuration:"getAdTotalDuration",referer:"getReferer",referral:"getReferral",language:"getLanguage",screenResolution:"getScreenResolution",nodeHost:"getNodeHost",nodeType:"getNodeType",nodeTypeString:"getNodeTypeString",route:"getReferer",page:"getPageName",playerStartupTime:"getPlayerStartupTime",pageLoadTime:"getPageLoadTime",cdnDownloadedTraffic:"getCdnTraffic",multiCdnInfo:"getMultiCdnInfo",p2pDownloadedTraffic:"getP2PTraffic",p2pEnabled:"getIsP2PEnabled",uploadTraffic:"getUploadTraffic",cdnBalancerResponseUUID:"getBalancerResponseId",viewJson:"getOfflineView",deviceUUID:"getDeviceUUID",sessionMetrics:"getSessionMetrics",scrollDepth:"getScrollDepth",adsBlocked:"getIsBlocked",linkedViewId:"getLinkedViewId",appName:"getAppName",appReleaseVersion:"getAppReleaseVersion",package:"getPackage",saga:"getSaga",tvshow:"getTvShow",
220season:"getSeason",titleEpisode:"getEpisodeTitle",channel:"getChannel",drm:"getDRM",videoCodec:"getVideoCodec",audioCodec:"getAudioCodec",codecSettings:"getCodecSettings",codecProfile:"getCodecProfile",containerFormat:"getContainerFormat",contentId:"getID",imdbID:"getImdbId",gracenoteID:"getGracenoteID",contentType:"getType",genre:"getGenre",contentLanguage:"getVideoLanguage",subtitles:"getSubtitles",contractedResolution:"getContractedResolution",cost:"getCost",price:"getPrice",playbackType:"getPlaybackType",email:"getEmail"}});lE.exports=Br;});var dE=q((TF,uE)=>{"use strict";var yj=Cn(),bj=yj.extend({isBlocking:function(t){return!t.params.sessionId;}});uE.exports=bj;});var ec=q((SF,fE)=>{"use strict";var Tj=rn(),cE=Yd(),hE=dE(),Sj=xt(),Ys=Tj.extend({constructor:function(t){this._plugin=t,this.infinityStopped=!1,this.infinityStarted=!1;},andBeyond:function(){Ys.prototype.begin.apply(this,arguments);},begin:function(t,e){e=e||!1,e&&(this._plugin.storage.removeStorages("infinityStarted"),this._plugin.storage.removeStorages("data"),this._plugin.restartViewTransform()),this._comm=new cE(this._plugin),this._comm.addTransform(this._plugin.viewTransform),this._comm.addTransform(new hE(this._plugin)),this._plugin&&this._plugin.storage&&typeof this._plugin.storage.getLocal=="function"&&(this._registeredProperties=this._plugin.storage.getLocal("inifnityRegisteredProperties")),this.infinityStarted=this._plugin.storage.getLocal("infinityStarted")==="true",this.infinityStopped||!this.infinityStarted?this.fireSessionStart(t):(this.fireNav(t),this._sendExtraBeat());},_setLastActive:function(){this._firstActive||(this._firstActive=this.getFirstActive()),this._plugin.storage.setStorages("lastactive",new Date().getTime());},getFirstActive:function(){return Number(this._plugin.getLastActive())||0;},getComm:function(){return this._comm;},fireSessionStart:function(t){this.infinityStopped&&(this._plugin.restartViewTransform(),this._comm=new cE(this._plugin),this._comm.addTransform(this._plugin.viewTransform),this._comm.addTransform(new hE(this._plugin)),this.infinityStopped=!1),this.infinityStarted||(this._plugin.storage.setLocal("infinityStarted","true"),this.infinityStarted=!0,this.emit(Ys.Event.SESSION_START,this._getParamsJson(t,null,null,!0,!0)),this._setLastActive());},fireSessionStop:function(t){this.infinityStarted&&(this.infinityStopped=!0,this.infinityStarted=!1,this._plugin.storage.removeStorages("infinityStarted"),this.emit(Ys.Event.SESSION_STOP,t),this._plugin.storage.removeStorages("data"),this._plugin.storage.removeStorages("session"),this._plugin.storage.removeStorages("lastactive"));},newSession:function(t,e){this.isActive()&&(this.infinityStarted?this.fireSessionStop():(this._plugin.storage.removeStorages("infinityStarted"),this._plugin.storage.removeStorages("data"),this._comm&&this._comm.removeTransform(this._plugin.viewTransform),this._plugin.restartViewTransform(),this._comm&&this._comm.addTransform(this._plugin.viewTransform))),this._plugin.setOptions(t),this.begin(e);},fireNav:function(t){this.isActive()&&(this.infinityStarted=!0,this.emit(Ys.Event.NAV,this._getParamsJson(t,null,null,!0)));},_sendExtraBeat:function(){if(this._plugin&&this._plugin._beat){var t=new Date().getTime(),e=this._plugin._beat.chrono.startTime?t-this._plugin._beat.chrono.startTime:0;this._plugin._sendBeat(e),this._plugin._beat.chrono.startTime=t;}this._setLastActive();},fireEvent:function(t,e,i,n){if(this.infinityStarted){var r=this._getParamsJson(e,i,t);Sj.assign(r.params,n||{}),this.emit(Ys.Event.EVENT,r),this._setLastActive();}},register:function(t,e){this._registeredProperties={dimensions:t,values:e},this._plugin.storage.setLocal("inifnityRegisteredProperties",JSON.stringify(this._registeredProperties));},registerOnce:function(t,e){this._registeredProperties||this.register(t,e);},unregister:function(){this._registeredProperties=null,this._plugin.storage.removeLocal("inifnityRegisteredProperties");},_getParamsJson:function(t,e,i,n,r){var s={};if(i&&(s.name=i),s.dimensions=t||{},s.values=e||{},this._registeredProperties){for(var a in this._registeredProperties.dimensions)s.dimensions[a]=this._registeredProperties.dimensions[a];for(var o in this._registeredProperties.values)s.values[o]=this._registeredProperties.values[o];}var u={params:s};return n&&(u.params.dimensions.page&&(u.params.page=u.params.dimensions.page,delete u.params.dimensions.page),u.params.dimensions.route&&(u.params.route=u.params.dimensions.route,delete u.params.dimensions.route),r||delete u.params.dimensions,delete u.params.values),u;},isActive:function(){var t=this._plugin.storage.getLocal("infinityStarted");if(this.infinityStarted||t&&t!=="false")return!0;var e=new Date().getTime();return Number(this._plugin.getLastActive())+this._plugin.sessionExpire>e;}},{Event:{NAV:"nav",SESSION_START:"sessionStart",SESSION_STOP:"sessionStop",BEAT:"beat",EVENT:"event"}});fE.exports=Ys;});var mE=q((AF,pE)=>{"use strict";var Xs=Ne(),Aj=Ue(),Ej=Aj.extend({constructor:function(t){this._fireEvent=typeof t=="function"?t:null,typeof window>"u"||typeof window.npawtmConfig!="object"?this._npawtmConfig=null:this._npawtmConfig=window.npawtmConfig;},identify:function(t){var e,i;return i=null,e=[],this._npawtmConfig?(i=this._getPage(t),i===null?Xs.warn("no page found"):e=this._getEvents(i)):Xs.warn("no config descriptor available"),typeof window>"u"?Xs.warn("Product Analytics Config: cannot bind events since DOM is not available"):e.length>0&&window.addEventListener("load",function(){this._bindElements(e);}.bind(this)),i;},_getPage:function(t){var e,i,n,r,s,a=null;if(typeof t=="object"&&t!==null&&this._npawtmConfig&&this._npawtmConfig.urls&&this._npawtmConfig.regexes&&this._npawtmConfig.domains&&this._npawtmConfig.domains.includes(t.hostname.toLowerCase()))for(n=this._npawtmConfig.urls[t.pathname],typeof n<"u"&&typeof n.page<"u"&&(a=n.page),e=t.pathname+t.search,s=0;s<this._npawtmConfig.regexes.length&&a===null;s++)i=this._npawtmConfig.regexes[s],r=new RegExp(i.regex),e.match(r)&&(a=i.page);return a;},_getEvents:function(t){var e=this._npawtmConfig&&this._npawtmConfig.events?this._npawtmConfig.events[t]:null;return(typeof e>"u"||e===null)&&(e=[]),e;},_bindElements:function(t){var e,i,n,r,s;for(s=0;s<t.length;s++)if(e=t[s],n=document.querySelector(e.selector),n===null)Xs.warn("element "+e.selector+" not found");else if(e.events.length===0)Xs.warn("element "+e.selector+" has no events to bind");else for(r=0;r<e.events.length;r++)i=e.events[r],n.npawEventInfo=e,n.npawEventType=i,n.addEventListener(i,function(a){var o=a.currentTarget.npawEventInfo,u=a.currentTarget.npawEventType;this._elementEvent(o,u,a);}.bind(this));}
220,_elementEvent:function(t,e,i){var n="["+e+"] "+t.name;this._fireEvent?this._fireEvent(n,{uiElement:t.name,eventName:n,eventType:e}):Xs.warn("Cannot trigger event since no handler has been provided");}});pE.exports=Ej;});var vE=q((EF,gE)=>{"use strict";var Io=Ne(),xj=Ue(),Ks=xj.extend({constructor:function(t,e,i,n){typeof i!="function"&&(Io.warn("Fire Adapter Event unset"),i=null),typeof n!="function"&&(Io.warn("Plugin Options Handler unset"),n=null),(typeof t!="number"||t<1||t>9)&&(t=9),typeof e!="number"&&(e=3e4),this._state=null,this._fireAdapterEvent=i,this._pluginOptionsHandler=n,this._dimension="content.customDimension."+t,this._timerId=null,this._timerInterval=e,this._started=!1,this._storeState(Ks.States.ACTIVE);},setActive:function(t,e){var i=Ks.States.ACTIVE;typeof e!="boolean"&&(e=!1),this._started?(this._state!==i&&(this._fireEvent(i,t),this._storeState(i)),this._timerStart()):e&&(this._started=!0,this._timerStart());},_fireEvent:function(t,e){var i;if(Io.notice("User changing from state "+this._state+" to "+t),i={eventType:"ContentPlayback",newState:t,triggerEvent:e,stateFromTo:this._state+" to "+t},this._fireAdapterEvent)switch(t){case Ks.States.ACTIVE:this._fireAdapterEvent("[PLAYBACK STATE] Switch to Active",i);break;case Ks.States.PASSIVE:this._fireAdapterEvent("[PLAYBACK STATE] Switch to Passive",i);break;}else Io.warn("Cannot fire user state event since handler is unavailable");},_storeState:function(t){var e;this._state=t,e={},e[this._dimension]=this._state,this._pluginOptionsHandler?this._pluginOptionsHandler(e):Io.warn("Cannot store user state since handler is unavailable");},_timerStart:function(){var t=Ks.States.PASSIVE;this._timerStop(),this._timerId=setTimeout(function(){this._fireEvent(t,"timer"),this._storeState(t);}.bind(this),this._timerInterval);},_timerStop:function(){this._timerId&&clearTimeout(this._timerId);}},{States:{ACTIVE:"active",PASSIVE:"passive"}});gE.exports=Ks;});var yE=q((xF,_E)=>{"use strict";var Cj=Ue(),Q=Ne(),wj=mE(),Dj=vE(),Ij=Cj.extend({constructor:function(t){this._plugin=typeof t>"u"?null:t,this._infinity=this._plugin&&this._plugin.infinity?this._plugin.infinity:null,this._initialized=!1,this._productAnalyticsSettingsDefault={autoTrackNavigation:!0,autoTrackAttribution:!0,highlightContentAfter:1e3,enableStateTracking:!1,activeStateTimeout:3e4,activeStateDimension:9,pageRules:[]},this._productAnalyticsSettings=Object.assign({},this._productAnalyticsSettingsDefault),this._page=null,this._userState=null,this._config=null,this._searchQuery=null,this._location=typeof window>"u"||typeof window.location>"u"?null:window.location,this._contentHighlighted=null,this._contentHighlightTimeout=null,this._plugin||Q.warn("Plugin reference unset."),this._infinity||Q.warn("Infinity reference unset."),this._location||Q.warn("Location reference unset.");},initialize:function(t){var e;this._productAnalyticsSettings=Object.assign({},this._productAnalyticsSettingsDefault),typeof t=="object"&&Object.assign(this._productAnalyticsSettings,t),typeof this._productAnalyticsSettings.autoTrackNavigation!="boolean"&&(this._productAnalyticsSettings.autoTrackNavigation=this._productAnalyticsSettingsDefault.autoTrackNavigation),typeof this._productAnalyticsSettings.autoTrackAttribution!="boolean"&&(this._productAnalyticsSettings.autoTrackAttribution=this._productAnalyticsSettingsDefault.autoTrackAttribution),typeof this._productAnalyticsSettings.highlightContentAfter!="number"?this._productAnalyticsSettings.highlightContentAfter=this._productAnalyticsSettingsDefault.highlightContentAfter:this._productAnalyticsSettings.highlightContentAfter<1e3&&(Q.warn("Invalid higlightContentAfter value. Using default value instead."),this._productAnalyticsSettings.highlightContentAfter=this._productAnalyticsSettingsDefault.highlightContentAfter),typeof this._productAnalyticsSettings.enableStateTracking!="boolean"&&(this._productAnalyticsSettings.enableStateTracking=this._productAnalyticsSettingsDefault.enableStateTracking),typeof this._productAnalyticsSettings.activeStateTimeout!="number"&&(this._productAnalyticsSettings.activeStateTimeout=this._productAnalyticsSettingsDefault.activeStateTimeout),(typeof this._productAnalyticsSettings.activeStateDimension!="number"||this._productAnalyticsSettings.activeStateDimension<1||this._productAnalyticsSettings.activeStateDimension>9)&&(this._productAnalyticsSettings.activeStateDimension=this._productAnalyticsSettingsDefault.activeStateDimension),(typeof this._productAnalyticsSettings.pageRules>"u"||!Array.isArray(this._productAnalyticsSettings.pageRules))&&(this._productAnalyticsSettings.pageRules=this._productAnalyticsSettingsDefault.pageRules),this._config=new wj(this._fireEvent.bind(this)),this._identify(),this._initialized=!0,this._productAnalyticsSettings.autoTrackNavigation&&this._trackNavigation(),this._productAnalyticsSettings.autoTrackAttribution&&(e=this._location===null?"":this._location.search,this._trackAttribution(new URLSearchParams(e)));},_identify:function(){var t,e,i;for(this._config===null?this._page=null:this._page=this._config.identify(this._location),i=0;i<this._productAnalyticsSettings.pageRules.length&&this._page===null&&this._location!==null;i++)if(e=this._productAnalyticsSettings.pageRules[i],typeof e.rule<"u"&&typeof e.page<"u"){try{t=new RegExp(e.rule);}catch{t=null,Q.warn("Error processing rule",e.rule,e.page);}t!==null&&this._location.pathname.match(t)!==null&&(this._page=this._location.pathname.replace(t,e.page));}this._page===null&&this._location!==null&&(this._page=this._location.pathname);},_adapterTrackStart:function(){this._initialized&&this.trackPlayerInteraction("start",{},{},!0);},adapterAfterSet:function(){var t;this._initialized&&(this._productAnalyticsSettings.enableStateTracking?(this._userState!==null&&Q.warn("userState is already initialized."),this._plugin?this._plugin.setOptions?this._userState=new Dj(this._productAnalyticsSettings.activeStateDimension,this._productAnalyticsSettings.activeStateTimeout,this._fireAdapterEvent.bind(this),this._plugin.setOptions.bind(this._plugin)):Q.warn("Cannot track user state since plugin options are unavailable."):Q.warn("Cannot track user state since plugin is unavailable.")):this._userState=null,t=this._adapterGet(),t?t.on("start",this._adapterTrackStart.bind(this)):Q.warn("Cannot bind adapter start since it is unavailable."));},adapterBeforeRemove:function(){var t;t=this._adapterGet(),t?t.off("start",this._adapterTrackStart):this._initialized&&Q.warn("Cannot unbind adapter start since it is unavailable."),this._userState=null;},_adapterGet:function(){var t;return this._plugin?typeof this._plugin.getAdapter!="function"?t=null:t=this._plugin.getAdapter():t=null,typeof t>"u"?null:t;},newSession:function(){var t=!1;return this._initialized?this._infinity?(this._infinity.newSession(),t=!0):Q.warn("Cannot start a new session since infinity is unavailable."):Q.warn("Cannot start a new session since Product Analytics is uninitialized."),t;},endSession:function(){var t=!1;return this._initialized?this._infinity?(this._infinity.fireSessionStop(),t=!0):Q.warn("Cannot end session since infinity is unavailable."):Q.warn("Cannot end session since Product Analytics is uninitialized."),t;}
220,trackNavigation:function(t,e,i){this._initialized?typeof t!="string"||t===""?Q.warn("Cannot track navigation since page has not been supplied."):(this._page=t,this._trackNavigation(e,i)):Q.warn("Cannot track navigation since Product Analytics is uninitialized.");},_trackNavigation:function(t,e){var i,n,r;this._location===null?(i="",n="",r=""):(i=this._location.href,n=this._location.pathname,r=this._location.hostname),this._initialized?this._infinity?(this._infinity.begin({route:i,page:this._page}),Q.notice("[NAV]",this._page),this._fireEvent("[NAV] "+this._page,{eventType:"Navigation",route:n,routeDomain:r,fullRoute:i},t,e)):Q.warn("Cannot track navigation since infinity is unavailable."):Q.warn("Cannot track navigation since Product Analytics is uninitialized.");},trackAttribution:function(t,e,i,n,r,s,a){if(!this._initialized)Q.warn("Cannot track attribution since Product Analytics is uninitialized.");else if(this._productAnalyticsSettings.autoTrackAttribution)Q.warn("Automatic attribution tracking is enabled: this request won't be processed.");else{var o;o={},typeof t<"u"&&(o.utm_source=t),typeof e<"u"&&(o.utm_medium=e),typeof i<"u"&&(o.utm_campaign=i),typeof n<"u"&&(o.utm_term=n),typeof r<"u"&&(o.utm_content=r),this._trackAttribution(new URLSearchParams(o),s,a);}},_trackAttribution:function(t,e,i){var n=this._getUTMParams(t),r=this._location===null?"":this._location.href;this._initialized?n&&(Q.notice("ATTRIBUTION"),this._fireEvent("ATTRIBUTION",Object.assign({eventType:"Attribution",url:r},n),e,i)):Q.warn("Cannot track attribution since Product Analytics is uninitialized.");},_getUTMParams:function(t){var e,i,n,r,s;return r=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],e={},t.forEach(function(a,o){n=r.indexOf(o.toLowerCase()),n!==-1&&(s=r[n],i=s.split("_"),i.length>1&&(s=i[0]+i[1].charAt(0).toUpperCase()+i[1].slice(1)),e[s]=a);}),Object.keys(e).length>0?e:null;},trackSectionIn:function(t,e,i,n){this._initialized?typeof t!="string"||t===""?Q.warn("Cannot track section-in since no section has been supplied."):typeof e!="number"||e<1?Q.warn("Cannot track section-in since sectionOrder is invalid."):(Q.notice("[SECTION] In"),this._fireEvent("SECTION IN",{eventType:"SectionVisibility",sectionOrder:e,section:t},i,n)):Q.warn("Cannot track section-in since Product Analytics is uninitialized.");},trackSectionOut:function(t,e,i,n){this._initialized?typeof t!="string"||t===""?Q.warn("Cannot track section-out since no section has been supplied."):typeof e!="number"||e<1?Q.warn("Cannot track section-out since sectionOrder is invalid."):(Q.notice("[SECTION] Out"),this._fireEvent("SECTION OUT",{eventType:"SectionVisibility",sectionOrder:e,section:t},i,n)):Q.warn("Cannot track section-out since Product Analytics is uninitialized.");},contentFocusIn:function(t,e,i,n,r,s,a){this.contentFocusOut(),this._initialized?typeof t!="string"||t===""?Q.warn("Cannot track content highlight since no section has been supplied."):typeof e!="number"||e<1?Q.warn("Cannot track content highlight since sectionOrder is invalid."):typeof i!="number"||i<1?Q.warn("Cannot track content highlight since column is invali
220d."):typeof n!="number"||n<1?Q.warn("Cannot track content highlight since row is invalid."):typeof r!="string"||r===""?Q.warn("Cannot track content highlight since no contentID has been supplied."):(this._contentHighlighted={sectionOrder:e,section:t,column:i,row:n,contentID:r,dimensions:s,metrics:a},this._contentHighlightTimeout=setTimeout(this._trackContentHiglight.bind(this),this._productAnalyticsSettings.highlightContentAfter)):Q.warn("Cannot track content highlight since Product Analytics is uninitialized.");},contentFocusOut:function(){this._contentHighlightTimeout!==null&&clearTimeout(this._contentHighlightTimeout),this._contentHighlighted=null,this._contentHighlightTimeout=null;},_trackContentHiglight:function(){this._contentHighlighted?(Q.notice("CONTENT HIGHLIGHT"),this._fireEvent("CONTENT HIGHLIGHT",{eventType:"ContentHighlight",sectionOrder:this._contentHighlighted.sectionOrder,section:this._contentHighlighted.section,column:this._contentHighlighted.column,row:this._contentHighlighted.row,contentId:this._contentHighlighted.contentID},this._contentHighlighted.dimensions,this._contentHighlighted.metrics)):Q.warn("Cannot highlight content since no content is selected");},trackContentClick:function(t,e,i,n,r,s,a){this._initialized?typeof t!="string"||t===""?Q.warn("Cannot track content click since no section has been supplied."):typeof e!="number"||e<1?Q.warn("Cannot track content click since sectionOrder is invalid."):typeof i!="number"||i<1?Q.warn("Cannot track content click since column is invali
220d."):typeof n!="number"||n<1?Q.warn("Cannot track content click since row is invalid."):typeof r!="string"||r===""?Q.warn("Cannot track content click since no contentID has been supplied."):(Q.notice("CONTENT CLICK"),this._fireEvent("CONTENT CLICK",{eventType:"ContentClick",sectionOrder:e,section:t,column:i,row:n,contentId:r},s,a)):Q.warn("Cannot track content click since Product Analytics is uninitialized.");},trackPlay:function(t,e,i){this._initialized?typeof t!="string"||t===""?Q.warn("Cannot track play since no contentID has been supplied."):(Q.notice("[PLAYER] Play"),this._fireAdapterEvent("[PLAYER] Play",{eventType:"ContentPlayback",contentId:t},e,i),this._userState!==null&&this._userState.setActive("Play")):Q.warn("Cannot track play since Product Analytics is uninitialized.");},trackPlayerInteraction:function(t,e,i,n){this._initialized?typeof t!="string"||t===""?Q.warn("Cannot track player interaction since no interaction name has been supplied."):(Q.notice("[PLAYER]",t),this._fireAdapterEvent("[PLAYER] "+t,{eventType:"ContentPlayback"},e,i),this._userState!==null&&this._userState.setActive(t,n)):Q.warn("Cannot track player interaction since Product Analytics is uninitialized.");},trackSearchQuery:function(t,e,i){this._initialized?typeof t!="string"||t===""?Q.warn("Cannot track search query since no searchQuery has been supplied."):(Q.notice("[SEARCH] Query",t),this._searchQuery=t,this._fireEvent("[SEARCH] Query",{eventType:"ContentSearch",query:this._searchQuery},e,i)):Q.warn("Cannot track search query since Product Analytics is uninitialized.");},trackSearchResult:function(t,e,i,n){if(!this._initialized)Q.warn("Cannot track search result since Product Analytics is uninitialized.");else if(typeof t!="number")Q.warn("Cannot track search result since no resultCount has been supplied.");else{var r=typeof e=="string"&&e!==""?e:this._searchQuery;Q.notice("[SEARCH] Results",t),this._fireEvent("[SEARCH] Results",{eventType:"ContentSearch",query:r,resultCount:t},i,n);}},trackSearchClick:function(t,e,i,n,r,s){if(!this._initialized)Q.warn("Cannot track search click since Product Analytics is uninitialized.");else if(typeof t!="number")Q.warn("Cannot track search click since no column has been supplied.");else if(typeof e!="number")Q.warn("Cannot track search click since no row has been supplied.");else if(typeof i!="string"||i==="")Q.warn("Cannot track search click since no contentID has been supplied.");else{var a=typeof n=="string"&&n!==""?n:this._searchQuery;Q.notice("[SEARCH] Result Click"),this._fireEvent("[SEARCH] Result Click",{eventType:"ContentSearch",query:a,column:t,row:e,contentId:i},r,s);}},trackExternalAppLaunch:function(t,e,i){this._initialized?typeof t!="string"||t===""?Q.warn("Cannot track external application launch since no appName has been supplied."):(Q.notice("APP LAUNCH",t),this._fireEvent("APP LAUNCH",{eventType:"ExternalApplications",appName:t},e,i)):Q.warn("Cannot track external application launch since Product Analytics is uninitialized.");},trackExternalAppExit:function(t,e,i){this._initialized?typeof t!="string"||t===""?Q.warn("Cannot track external application exit since no appName has been supplied."):(Q.notice("APP EXIT",t),this._fireEvent("APP EXIT",{eventType:"ExternalApplications",appName:t},e,i)):Q.warn("Cannot track external application exit since Product Analytics is uninitialized.");},trackEngagementEvent:function(t,e,i,n){this._initialized?typeof t!="string"||t===""?Q.warn("Cannot track engagement event since no eventName has been supplied."):typeof e!="string"||e===""?Q.warn("Cannot track engagement event since no contentID has been supplied."):(Q.notice(t),this._fireEvent(t,{eventType:"Engagement",contentId:e},i,n)):Q.warn("Cannot track engagement event since Product Analytics is uninitialized.");},trackEvent:function(t,e,i){this._initialized?typeof t!="string"||t===""?Q.warn("Event cannot be tracked since no eventName has been supplied."):(Q.notice(t),this._fireEvent(t,{eventType:"CustomEvent"},e,i)):Q.warn("Cannot track event since Product Analytics is uninitialized.");}
220,_fireEvent:function(t,e,i,n){var r,s=!1;return r=this._buildDimensions(e,i),this._infinity?(this._infinity.fireEvent(t,r.custom,n,r.top),s=!0):Q.warn("Cannot fire",t,"since infinity is unavailable."),s;},_fireAdapterEvent:function(t,e,i,n){var r,s,a=!1;return s=this._adapterGet(),s?(r=this._buildDimensions(e,i),s.fireEvent(t,r.custom,n,r.top),a=!0):Q.warn("Cannot fire "+t+" event since adapter is unavailable."),a;},_buildDimensions:function(t,e){var i,n,r,s;n={page:this._page},typeof t<"u"&&(n=Object.assign(n,t)),typeof e<"u"&&(n=Object.assign(n,e)),n=Object.assign(n,{eventSource:"Product Analytics"}),s=["contentid","contentId","contentID","utmSource","utmMedium","utmCampaign","utmTerm","utmContent"],r=["contentid","contentId","contentID"],i={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&s.indexOf(a)!==-1&&(i[a]=n[a]);return r.forEach(function(o){delete n[o];}),{custom:n,top:i};}});_E.exports=Ij;});var SE=q((CF,TE)=>{"use strict";var bE=function(t){t=t||window;var e=t.document,i=function(g){var E=!1;if(g.getBoundingClientRect){var S=g.getBoundingClientRect();E={top:Math.max(S.top,0),left:Math.max(S.left,0),bottom:Math.min(S.bottom,t.innerHeight||e.documentElement.clientHeight),right:Math.min(S.right,t.innerWidth||e.documentElement.clientWidth)},E.bottom<=E.top||E.right<=E.left?E=!1:E.area=(E.bottom-E.top)*(E.right-E.left);}return E;},n=function(g,E){if(E){var S=i(g);S&&c.push({url:E,area:S.area,rect:S});}},r=function(){for(var g=e.getElementsByTagName("*"),E=/url\(.*(http.*)\)/ig,S=0;S<g.length;S++){var P=g[S],D=t.getComputedStyle(P);if(P.tagName==="IMG"&&n(P,P.src),D["background-image"]){E.lastIndex=0;var A=E.exec(D["background-image"]);A&&A.length>1&&n(P,A[1].replace('"',""));}if(P.tagName==="IFRAME")try{var C=i(P);if(C){var R=bE(P.contentWindow);R&&c.push({tm:R,area:C.area,rect:C});}}catch{}}},s=function(){for(var g={},E=t.performance.getEntriesByType("resource"),S=0;S<E.length;S++)g[E[S].name]=E[S].responseEnd;for(var P=0;P<c.length;P++)"tm"in c[P]||(c[P].tm=g[c[P].url]!==void 0?g[c[P].url]:0);},a=function(){"msFirstPaint"in t.performance.timing&&(_=t.performance.timing.msFirstPaint-b);for(var g=t.performance.getEntriesByType("paint"),E=0;E<g.length;E++)g[E].name==="first-paint"&&(_=g[E].startTime);if(_===void 0||_<0||_>12e4){_=t.performance.timing.responseStart-b;for(var S={},P=e.getElementsByTagName("head")[0].children,D=0;D<P.length;D++){var A=P[D];A.tagName==="SCRIPT"&&A.src&&!A.async&&(S[A.src]=!0),A.tagName==="LINK"&&A.rel==="stylesheet"&&A.href&&(S[A.href]=!0);}for(var C=t.performance.getEntriesByType("resource"),R=!1,I=0;I<C.length;I++)if(!R&&S[C[I].name]&&(C[I].initiatorType==="script"||C[I].initiatorType==="link")){var M=C[I].responseEnd;(_===void 0||M>_)&&(_=M);}else R=!0;}_=Math.max(_,0);},o=function(){for(var g={0:0},E=0,S=0;S<c.length;S++){var P=_;"tm"in c[S]&&c[S].tm>_&&(P=c[S].tm),g[P]===void 0&&(g[P]=0),g[P]+=c[S].area,E+=c[S].area;}var D=Math.max(e.documentElement.clientWidth,t.innerWidth||0)*Math.max(e.documentElement.clientHeight,t.innerHeight||0);if(D>0&&(D=Math.max(D-E,0)*y,g[_]===void 0&&(g[_]=0),g[_]+=D,E+=D),E){for(var A in g)g.hasOwnProperty(A)&&p.push({tm:A,area:g[A]});p.sort(function(I,M){return I.tm-M.tm;});for(var C=0,R=0;R<p.length;R++)C+=p[R].area,p[R].progress=C/E;}},u=function(){if(p.length){T=0;for(var g=0,E=0,S=0;S<p.length;S++){var P=p[S].tm-g;P>0&&E<1&&(T+=(1-E)*P),g=p[S].tm,E=p[S].progress;}}else T=_;},c=[],p=[],_,T,y=.1;try{var b=t.performance.timing.navigationStart;r(),s(),a(),o(),u();}catch{}return T;};TE.exports=bE;});var EE=q((wF,AE)=>{"use strict";var kj=Ue(),Pj=SE(),Lj=kj.extend({constructor:function(t){if(this.infinity=t.infinity,this.timeObject=null,this.playerSetup=null,this.perfObject=null,this.myTimesObject={},typeof window<"u"&&typeof window.addEventListener=="function"&&(window.addEventListener("load",this._windowLoaded.bind(this)),window.performance&&window.performance.timing)){try{typeof window.performance.getEntriesByType=="function"&&(this.perfObject=window.performance);}catch{}this.timeObject=window.performance.timing;}try{if(typeof PerformanceObserver=="function"){var e=new PerformanceObserver(function(i,n){var r=i.getEntries();this.myTimesObject.largestContentfulPaint=r[r.length-1].renderTime;}.bind(this));PerformanceObserver.supportedEntryTypes.indexOf("largest-contentful-paint")>-1&&e.observe({entryTypes:["largest-contentful-paint"]});}}catch{}},_windowLoaded:function(){this.myTimesObject.onLoad=new Date().getTime(),this._getEnoughFPS(),setTimeout(this._fireLoadTimesEvent.bind(this),1e3);},_fireLoadTimesEvent:function(){this._getLastMetrics(),this.infinity.fireEvent("loadTimes",{},this._getAllValues());},_getAllValues:function(){var t={PageLoadTime:this.getPageLoadTime(),DNST
220ime:this.getDnsTime(),TCPTime:this.getTcpTime(),HandshakeTime:this.getHandshakeTime(),DomReadyTime:this.getDomReadyTime(),BackendTime:this.getBackendTime(),FrontendTime:this.getFrontendTime(),VisualReady:this.getTimeToVisuallyReady(),TimeToInteractive:this.getTimeToInteractive(),JsTime:this.getJSTime(),CssTime:this.getCSSTime(),ImageTime:this.getImageTime(),FontTime:this.getFontTime(),AvgReqLatency:this.getAvgReqLatency(),MaxReqLatency:this.getMaxReqLatency(),FirstPaint:this.getFirstPaint(),FirstContentfulPaint:this.getFirstContentfulPaint(),LargestContentfulPaint:this.getLargestContentfulPaint(),SpeedIndex:this.getSpeedIndex()};for(var e in t)t[e]===null||t[e]===void 0||t[e]<0?delete t[e]:t[e]=Math.round(t[e]);return t;},getPageLoadTime:function(){var t=null;return this.timeObject&&(t=this.timeObject.loadEventEnd-this.timeObject.navigationStart),t;},getPlayerStartupTime:function(){var t=null;return this.timeObject&&this.playerSetup&&(t=this.playerSetup-this.timeObject.navigationStart),t;},getDnsTime:function(){var t=null;return this.timeObject&&(t=this.timeObject.domainLookupEnd-this.timeObject.domainLookupStart),t;},getTcpTime:function(){var t=null;return this.timeObject&&(t=this.timeObject.connectEnd-this.timeObject.connectStart),t;},getHandshakeTime:function(){var t=null;return this.timeObject&&this.timeObject.secureConnectionStart&&(t=this.timeObject.connectEnd-this.timeObject.secureConnectionStart),t;},getDomReadyTime:function(){var t=null;return this.timeObject&&(t=this.timeObject.domComplete-this.timeObject.navigationStart),t;},getBackendTime:function(){var t=null;return this.timeObject&&(t=this.timeObject.responseStart-this.timeObject.navigationStart),t;},getFrontendTime:function(){var t=null;return this.timeObject&&(t=this.myTimesObject.onLoad-this.timeObject.responseStart),t;},getTimeToVisuallyReady:function(){var t=this.myTimesObject.firstPaint||0;return this.timeObject?Math.max(t,this.timeObject.domContentLoadedEventEnd-this.timeObject.navigationStart||0):t||null;},getTimeToInteractive:function(){if(this.myTimesObject.fps&&this.getTimeToVisuallyReady())return Math.max(this.myTimesObject.fps,this.getTimeToVisuallyReady());setTimeout(function(){this.getTimeToInteractive();}.bind(this),500);},getJSTime:function(){return this._getXTime("script");},getCSSTime:function(){return this._getXTime("css");},getImageTime:function(){return this._getXTime("img");},getFontTime:function(){return this._getXTime("css",[".woff",".otf",".ttf"]);},getAvgReqLatency:function(){try{if(this.perfObject&&typeof this.perfObject.getEntriesByType=="function"){var t=0,e=0,i=this.perfObject.getEntriesByType("resource");for(var n in i)i[n].requestStart&&i[n].responseStart&&(e+=i[n].responseStart-i[n].requestStart),t++;return e/t;}}catch{}return null;},getFirstPaint:function(){return this.myTimesObject?this.myTimesObject.firstPaint:null;},getFirstContentfulPaint:function(){return this.myTimesObject?this.myTimesObject.firstContentfulPaint:null;},getLargestContentfulPaint:function(){return this.myTimesObject?this.myTimesObject.largestContentfulPaint:null;},getMaxReqLatency:function(){try{if(this.perfObject&&typeof this.perfObject.getEntriesByType=="function"){var t=this.perfObject.getEntriesByType("resource"),e=0;for(var i in t)t[i].requestStart&&t[i].responseStart&&(e=Math.max(e,t[i].responseStart-t[i].requestStart));return e;}}catch{}return null;},getSpeedIndex:function(){var t=null;if(typeof window<"u"&&window.performance&&typeof window.performance.getEntriesByType=="function")try{t=Pj();}catch{}return t;},_getXTime:function(t,e){var i=0;try{if(this.perfObject&&typeof this.perfObject.getEntriesByType=="function"){var n=this.perfObject.getEntriesByType("resource");for(var r in n)if(n[r].initiatorType===t)if(!e)i+=n[r].duration;else{var s=!1;for(var a in e)n[r].name.indexOf(e[a]>0)&&(s=!0);s&&(i+=n[r].duration);}}}catch{}return Math.round(i)||null;},_getLastMetrics:function(){var t=null,e=null;try{if(this.perfObject&&typeof this.perfObject.getEntriesByType=="function"){var i=this.perfObject.getEntriesByType("paint");for(var n in i)i[n].name==="first-paint"?t=i[n].startTime:i[n].name==="first-contentful-paint"&&(e=i[n].startTime);}}catch{}!t&&this.timeObject&&(t=this.timeObject.msFirstPaint-this.timeObject.navigationStart),this.myTimesObject.firstPaint=t,this.myTimesObject.firstContentfulPaint=e,this.getTimeToInteractive();},_getEnoughFPS:function(){if(this.timeObject&&typeof window<"u"){var t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(){};this.preFPS=new Date().getTime(),t(function(){var e=new Date().getTime();e<this.preFPS+50?this.myTimesObject.fps=e-this.timeObject.navigationStart:setTimeout(function(){return this._getEnoughFPS();}.bind(this),50);}.bind(this));}else return!0;},setPlayerSetupTime:function(){this.playerSetup=this.playerSetup||new Date().getTime();}});AE.exports=Lj;});var hm=q((DF,xE)=>{"use strict";var Rj=Ue(),Oj=Rj.extend({constructor:function(t){this.plugin=t,this.isInBackgroun
220d=!1,this.listenerReference=this._visibilityListener.bind(this),this._reset();},startDetection:function(){!this.isBackgroundDetectorStarted&&typeof document<"u"&&(this.isBackgroundDetectorStarted=!0,document.addEventListener("visibilitychange",this.listenerReference));},stopDetection:function(){this.isBackgroundDetectorStarted&&typeof document<"u"&&(document.removeEventListener("visibilitychange",this.listenerReference),this._reset());},_reset:function(){this.isBackgroundDetectorStarted=!1;},_visibilityListener:function(t){if(typeof document<"u"){var e=this._getSettings();document.visibilityState==="hidden"?this._toBackground(e):document.visibilityState==="visible"&&this._toForeground(e);}},_toBackground:function(t){if(this.isInBackground=!0,this.plugin&&this.plugin._adsAdapter&&this.plugin._adsAdapter.stopChronoView(),typeof t=="string"){switch(t){case"stop":this._fireStop();break;case"pause":this._firePause();break;}if(this.plugin.infinity.infinityStarted){this.lastBeatTime=new Date().getTime();var e=this.plugin._beat.chrono.startTime?this.lastBeatTime-this.plugin._beat.chrono.startTime:0;this.plugin._sendBeat(e),this.plugin._beat.stop();}}},_toForeground:function(t){if(this.isInBackground=!1,this.plugin&&this.plugin._adsAdapter&&this.plugin._adsAdapter.startChronoView(),typeof t=="string"&&t&&this.plugin.infinity.infinityStarted){var e=new Date().getTime();e-this.lastBeatTime<this.plugin.sessionExpire?(this.plugin._sendBeat(e-this.lastBeatTime),this.plugin._beat.start()):this.plugin.infinity.newSession();}},_getSettings:function(){if(typeof this.plugin.options["background.settings"]=="string"&&this.plugin.options["background.settings"])return this.plugin.options["background.settings"];if(this.plugin.deviceDetector.isSmartTV())return this.plugin.options["background.settings.tv"];if(this.plugin.deviceDetector.isDesktop())return this.plugin.options["background.settings.desktop"];if(this.plugin.deviceDetector.isAndroid())return this.plugin.options["background.settings.android"];if(this.plugin.deviceDetector.isIphone())return this.plugin.options["background.settings.iOS"];if(this.plugin.deviceDetector.isPlayStation())return this.plugin.options["background.settings.playstation"];},_firePause:function(){this._fireX("firePause");},_fireStop:function(){this._fireX("fireStop"),this.plugin.fireStop();},_fireX:function(t){this.adsAdapter=this.plugin.getAdsAdapter(),this.adsAdapter&&this.adsAdapter[t](),this.contentAdapter=this.plugin.getAdapter(),this.contentAdapter&&this.contentAdapter[t]();},canBlockStartCalls:function(){return this.isInBackground&&this.plugin.options["background.enabled"]===!0&&this._getSettings();}});xE.exports=Oj;});var fm=q((IF,CE)=>{"use strict";var Nj=Ue(),jj=Nj.extend({constructor:function(){typeof navigator<"u"&&navigator.userAgent&&(this._isSmartTVDevice=navigator.userAgent.toLowerCase().match(/smarttv/)||navigator.userAgent.toLowerCase().match(/smart-tv/)||navigator.userAgent.toLowerCase().match(/appletv/)||navigator.userAgent.toLowerCase().match(/apple tv/),this._isPlaystationDevice=navigator.userAgent.match(/PlayStation/)!==null,this._isIphoneDevice=navigator.userAgent.match(/iPhone|iPad|iPod/i)!==null,this._isAndroidDevice=navigator.userAgent.match(/Android/)!==null,this._isSmartphoneDevice=!this._isSmartTVDevice&&!this._isPlaystationDevice&&(this._isIphoneDevice||this._isAndroidDevice),this._isDesktopDevice=!this._isSmartphoneDevice&&!this._isSmartTVDevice&&!this._isPlaystationDevice);},isIphone:function(){return this._isIphoneDevice;},isAndroid:function(){return this._isAndroidDevice;},isSmartphone:function(){return this._isSmartphoneDevice;},isDesktop:function(){return this._isDesktopDevice;},isSmartTV:function(){return this._isSmartTVDevice;},isPlayStation:function(){return this._isPlaystationDevice;}});CE.exports=jj;});var DE=q((kF,wE)=>{"use strict";var Mj=Ue(),Bj=Mj.extend({constructor:function(t){this.pluginref=t,this.listenerReference=this._changeListener.bind(this),this.loadReference=this._loadListener.bind(this),this.isEnabled=!1,this.pageHeight=0,this.maxHeight=0,this.startDetection();},startDetection:function(){!this.isEnabled&&typeof window<"u"&&typeof window.addEventListener=="function"&&(window.addEventListener("scroll",this.listenerReference),window.addEventListener("resize",this.listenerReference),window.addEventListener("load",this.loadReference),this.isEnabled=!0);},stopDetection:function(){this.isEnabled&&typeof window<"u"&&typeof window.removeEventListener=="function"&&(window.removeEventListener("scroll",this.listenerReference),window.removeEventListener("resize",this.listenerReference),window.removeEventListener("load",this.loadReference),this.isEnabled=!1);},getScrollDepth:function(){var t=null;return this.maxHeight&&this.pageHeight&&(t=Math.min(Math.trunc(this.maxHeight/this.pageHeight*100),100)),t;},_loadListener:function(){if(typeof document<"u"){var t=document.documentElement;t&&(this.pageHeight=Math.round(t.scrollHeight,t.clientHeight,t.offsetHeight),this.maxHeight=window.innerHeight,this._updateCompletionRate());}},_changeListener:function(){if(this.pageHeight){var t=this.maxHeight;this.maxHeight=Math.max(this.maxHeight,window.pageYOffset+window.innerHeight),t!==this.maxHeight&&this._updateCompletionRate();}var e=this.pluginref.getAdsAdapter();e&&e.flags.isStarted&&(e.getIsVisible()?e.startChronoView():e.stopChronoView());},_updateCompletionRate:function(){setTimeout(function(){this.pluginref.storage.setSession("pageScrollDepth",this.get
220ScrollDepth());}.bind(this),3e3);}});wE.exports=Bj;});var kE=q((PF,IE)=>{"use strict";var Fj=Ue(),Uj=Fj.extend({constructor:function(t){this.plugin=t;},getAllData:function(){var t=this.getNonRandomData();return t.timestamp=this.getTimestamp(),t;},getNonRandomData:function(){var t={};return t.userAgent=this.getUserAgent(),t.threads=this.getVirtualCores(),t.language=this.getLanguage(),t.langList=this.getAvailableLanguages(),t.resolution=this.getResolution(),t.colorDepth=this.getColorDepth(),t.deviceMemory=this.getMemory(),t.touchscreen=this.getTouchscreen(),t.localStorage=this.getLocalStorage(),t.sessionStorage=this.getSessionStorage(),t.cookiesAvailable=this.getCookiesAvailable(),t.flashAvailable=this.getHasFlash(),t.timeZone=this.getTimeZone(),t.plugins=this.getPluginList(),t;},getUserAgent:function(){return this._getNavigatorValue("userAgent");},getVirtualCores:function(){return this._getNavigatorValue("hardwareConcurrency");},getLanguage:function(){return this._getNavigatorValue("language");},getAvailableLanguages:function(){return this._getNavigatorValue("languages");},getResolution:function(){var t=null;try{this._getNavigatorValue("screen")&&(t=navigator.screen.width.toString()+navigator.screen.height.toString());}catch{}return t;},getColorDepth:function(){var t=null;try{this._getNavigatorValue("screen")&&(t=navigator.screen.colorDepth);}catch{}return t;},getMemory:function(){return this._getNavigatorValue("deviceMemory");},getTouchscreen:function(){return this._getNavigatorValue("maxTouchPoints")||!1;},getLocalStorage:function(){var t=!1;try{t=typeof localStorage<"u";}catch{}return t;},getSessionStorage:function(){var t=!1;try{t=typeof sessionStorage<"u";}catch{}return t;},getCookiesAvailable:function(){return this._getNavigatorValue("cookieEnabled")||!1;},getHasFlash:function(){var t=!1;try{var e=this._getNavigatorValue("plugins");t=e&&typeof e["Shockwave Flash"]=="object"||typeof window<"u"&&window.ActiveXObject&&new ActiveXObject("ShockwaveFlash.ShockwaveFlash")!==!1;}catch{}return t;},getPluginList:function(){var t=null;try{var e=this._getNavigatorValue("plugins");if(e&&e.length!==0){for(var i="",n=0;n<navigator.plugins.length;n++)i+=navigator.plugins[n].description+" "+navigator.plugins[n].filename+" "+navigator.plugins[n].name+" ";t=i;}}catch{}return t;},getTimeZone:function(){var t=null;try{var e=new Date();t=e.getTimezoneOffset().toString();}catch{}return t;},getTimestamp:function(){return new Date().getTime();},_navigatorCheck:function(){return typeof navigator<"u";},_getNavigatorValue:function(t){var e=null;try{this._navigatorCheck()&&(e=navigator[t]);}catch{}return e;}});IE.exports=Uj;});var LE=q((LF,PE)=>{"use strict";var Vj=function(t){function e(de,le){return de<<le|de>>>32-le;}function i(de,le){var ye,Te,Me,Ze,te;return Me=de&2147483648,Ze=le&2147483648,ye=de&1073741824,Te=le&1073741824,te=(de&1073741823)+(le&1073741823),ye&Te?te^2147483648^Me^Ze:ye|Te?te&1073741824?te^3221225472^Me^Ze:te^1073741824^Me^Ze:te^Me^Ze;}function n(de,le,ye){return de&le|~de&ye;}function r(de,le,ye){return de&ye|le&~ye;}function s(de,le,ye){return de^le^ye;}function a(de,le,ye){return le^(de|~ye);}function o(de,le,ye,Te,Me,Ze,te){return de=i(de,i(i(n(le,ye,Te),Me),te)),i(e(de,Ze),le);}function u(de,le,ye,Te,Me,Ze,te){return de=i(de,i(i(r(le,ye,Te),Me),te)),i(e(de,Ze),le);}function c(de,le,ye,Te,Me,Ze,te){return de=i(de,i(i(s(le,ye,Te),Me),te)),i(e(de,Ze),le);}function p(de,le,ye,Te,Me,Ze,te){return de=i(de,i(i(a(le,ye,Te),Me),te)),i(e(de,Ze),le);}function _(de){for(var le,ye=de.length,Te=ye+8,Me=(Te-Te%64)/64,Ze=(Me+1)*16,te=Array(Ze-1),ge=0,ve=0;ve<ye;)le=(ve-ve%4)/4,ge=ve%4*8,te[le]=te[le]|de.charCodeAt(ve)<<ge,ve++;return le=(ve-ve%4)/4,ge=ve%4*8,te[le]=te[le]|128<<ge,te[Ze-2]=ye<<3,te[Ze-1]=ye>>>29,te;}function T(de){var le="",ye="",Te,Me;for(Me=0;Me<=3;Me++)Te=de>>>Me*8&255,ye="0"+Te.toString(16),le=le+ye.substr(ye.length-2,2);return le;}function y(de){de=de.replace(/rn/g,"n");for(var le="",ye=0;ye<de.length;ye++){var Te=de.charCodeAt(ye);Te<128?le+=String.fromCharCode(Te):Te>127&&Te<2048?(le+=String.fromCharCode(Te>>6|192),le+=String.fromCharCode(Te&63|128)):(le+=String.fromCharCode(Te>>12|224),le+=String.fromCharCode(Te>>6&63|128),le+=String.fromCharCode(Te&63|128));}return le;}var b=Array(),g,E,S,P,D,A,C,R,I,M=7,F=12,U=17,k=22,G=5,V=9,Y=14,ae
220=20,oe=4,pe=11,be=16,Ee=23,Ft=6,Ut=10,Vt=15,Ci=21;for(t=y(t),b=_(t),A=1732584193,C=4023233417,R=2562383102,I=271733878,g=0;g<b.length;g+=16)E=A,S=C,P=R,D=I,A=o(A,C,R,I,b[g+0],M,3614090360),I=o(I,A,C,R,b[g+1],F,3905402710),R=o(R,I,A,C,b[g+2],U,606105819),C=o(C,R,I,A,b[g+3],k,3250441966),A=o(A,C,R,I,b[g+4],M,4118548399),I=o(I,A,C,R,b[g+5],F,1200080426),R=o(R,I,A,C,b[g+6],U,2821735955),C=o(C,R,I,A,b[g+7],k,4249261313),A=o(A,C,R,I,b[g+8],M,1770035416),I=o(I,A,C,R,b[g+9],F,2336552879),R=o(R,I,A,C,b[g+10],U,4294925233),C=o(C,R,I,A,b[g+11],k,2304563134),A=o(A,C,R,I,b[g+12],M,1804603682),I=o(I,A,C,R,b[g+13],F,4254626195),R=o(R,I,A,C,b[g+14],U,2792965006),C=o(C,R,I,A,b[g+15],k,1236535329),A=u(A,C,R,I,b[g+1],G,4129170786),I=u(I,A,C,R,b[g+6],V,3225465664),R=u(R,I,A,C,b[g+11],Y,643717713),C=u(C,R,I,A,b[g+0],ae,3921069994),A=u(A,C,R,I,b[g+5],G,3593408605),I=u(I,A,C,R,b[g+10],V,38016083),R=u(R,I,A,C,b[g+15],Y,3634488961),C=u(C,R,I,A,b[g+4],ae,3889429448),A=u(A,C,R,I,b[g+9],G,568446438),I=u(I,A,C,R,b[g+14],V,3275163606),R=u(R,I,A,C,b[g+3],Y,4107603335),C=u(C,R,I,A,b[g+8],ae,1163531501),A=u(A,C,R,I,b[g+13],G,2850285829),I=u(I,A,C,R,b[g+2],V,4243563512),R=u(R,I,A,C,b[g+7],Y,1735328473),C=u(C,R,I,A,b[g+12],ae,2368359562),A=c(A,C,R,I,b[g+5],oe,4294588738),I=c(I,A,C,R,b[g+8],pe,2272392833),R=c(R,I,A,C,b[g+11],be,1839030562),C=c(C,R,I,A,b[g+14],Ee,4259657740),A=c(A,C,R,I,b[g+1],oe,2763975236),I=c(I,A,C,R,b[g+4],pe,1272893353),R=c(R,I,A,C,b[g+7],be,4139469664),C=c(C,R,I,A,b[g+10],Ee,3200236656),A=c(A,C,R,I,b[g+13],oe,681279174),I=c(I,A,C,R,b[g+0],pe,3936430074),R=c(R,I,A,C,b[g+3],be,3572445317),C=c(C,R,I,A,b[g+6],Ee,76029189),A=c(A,C,R,I,b[g+9],oe,3654602809),I=c(I,A,C,R,b[g+12],pe,3873151461),R=c(R,I,A,C,b[g+15],be,530742520),C=c(C,R,I,A,b[g+2],Ee,3299628645),A=p(A,C,R,I,b[g+0],Ft,4096336452),I=p(I,A,C,R,b[g+7],Ut,1126891415),R=p(R,I,A,C,b[g+14],Vt,2878612391),C=p(C,R,I,A,b[g+5],Ci,4237533241),A=p(A,C,R,I,b[g+12],Ft,1700485571),I=p(I,A,C,R,b[g+3],Ut,2399980690),R=p(R,I,A,C,b[g+10],Vt,4293915773),C=p(C,R,I,A,b[g+1],Ci,2240044497),A=p(A,C,R,I,b[g+8],Ft,1873313359),I=p(I,A,C,R,b[g+15],Ut,4264355552),R=p(R,I,A,C,b[g+6],Vt,2734768916),C=p(C,R,I,A,b[g+13],Ci,1309151649),A=p(A,C,R,I,b[g+4],Ft,4149444226),I=p(I,A,C,R,b[g+11],Ut,3174756917),R=p(R,I,A,C,b[g+2],Vt,718787259),C=p(C,R,I,A,b[g+9],Ci,3951481745),A=i(A,E),C=i(C,S),R=i(R,P),I=i(I,D);var Fr=T(A)+T(C)+T(R)+T(I);return Fr.toLowerCase();};PE.exports=Vj;});var pm=q((RF,RE)=>{"use strict";var qj=kE(),Hj=Ue(),$j=LE(),zj=Hj.extend({constructor:function(t){this.plugin=t,this.dataExtractor=new qj(),this.key=this.getPreviousKey();},generateHashKey:function(){if(!this.key){var t=this.dataExtractor.getAllData();this.key=this._hashFunction(t),this.plugin.storage.setLocal("youboraDeviceUUID",this.key);}},getKey:function(){return this.key||this.generateHashKey(),this.key;},_hashFunction:function(t){var e=t;return typeof t!="string"&&(e=JSON.stringify(t)),$j(e);},_reset:function(){this.key=void 0;},getPreviousKey:function(){return this.plugin.storage.getLocal("youboraDeviceUUID");}});RE.exports=zj;});var NE=q((OF,OE)=>{"use strict";var Gj=Ue(),ko=jr(),Wj=Gj.extend({constructor:function(){this.reset();},reset:function(){this.join=new ko(),this.seek=new ko(),this.pause=new ko(),this.buffer=new ko(),this.total=new ko(),this.viewedMax=[];}});OE.exports=Wj;});var ME=q((NF,jE)=>{"use strict";var Yj=Ue(),Xj=Yj.extend({constructor:function(){this.reset();},reset:function(){this.isStarted=!1,this.isJoined=!1,this.isPaused=!1,this.isSeeking=!1,this.isBuffering=!1,this.isVideoStateBuffering=!1,this.isEnded=!1,this.isStopped=!1,this.lastQuartileSent=0;}});jE.exports=Xj;});var mm=q((jF,BE)=>{"use strict";var Kj=Ue(),Qj=Gd(),Jj=jr(),Po=Kj.extend({constructor:function(t,e,i){this._adapter=t,this._seekEnabled=e&Po.Type.SEEK,this._bufferEnabled=e&Po.Type.BUFFER,i=i||800,this._chrono=new Jj(),this._lastPlayhead=0,i>0&&(this._timer=new Qj(this.progress.bind(this),i));},start:function(){this.stop(),this.canBeUsed()&&this._timer.start();},stop:function(){this._lastPlayhead=0,this._timer&&this._timer.stop();},skipNextTick:function(){this._lastPlayhead=0;},progress:function(){var t=this._chrono.stop();this._chrono.start();var e=t*Po.kBUFFER_THRESHOLD_RATIO,i=t*Po.kSEEK_THRESHOLD_RATIO;this._adapter.getPlayrate&&this._adapter.getPlayrate()&&this._adapter.getPlayrate()!==1&&(e*=this._adapter.getPlayrate(),i*=this._adapter.getPlayrate());var n=this._getPlayhead(),r=Math.abs(this._lastPlayhead-n)*1e3;r<e?this._bufferEnabled&&this._lastPlayhead>0&&!this._adapter.flags.isPaused&&!this._adapter.flags.isSeeking&&this._adapter.fireBufferBegin(null,!1,"playheadMonitor"):r>i?this._seekEnabled&&this._lastPlayhead>0&&this._adapter.fireSeekBegin(null,!1,"playheadMonitor"):(this._seekEnabled&&this._adapter.fireSeekEnd(null,"playheadMonitor"),this._bufferEnabled&&this._adapter.fireBufferEnd(null,"playheadMonitor")),this._lastPlayhead=n;},canBeUsed:function(){var t=this._adapter.plugin;return t&&t.getPlayheadMonitorEnabled()&&(this._seekEnabled||this._bufferEnabled)?t.getIsLive()?!t.options["content.isLive.noMonitor"]:!0:!1;},_getPlayhead:function(){return this._adapter.getPlayhead();}},{Type:{NONE:0,BUFFER:1,SEEK:2},kBUFFER_THRESHOLD_RATIO:.5,kSEEK_THRESHOLD_RATIO:2});BE.exports=Po;});var UE=q((MF,FE)=>{"use strict";var Zj=Ue(),e3=Ne(),t3=Zj.extend({constructor:function(t,e){this._adapter=t,this._videoElement=t.getVideoObject(),this._startedStateCheck=!1,this._intervalCheckId=null,this._intervalMilliseconds=e||300;},start:function(){var t=this._adapter.plugin;t&&t.getReadyStateMonitorEnabled()&&this._videoElement&&!this._startedStateCheck&&(this._intervalCheckId=setInterval(this.checkStateProperty.bind(this),this._intervalMilliseconds),this._startedStateCheck=!0);},stop:function(){try{this._startedStateCheck&&this._intervalCheckId&&clearInterval(this._intervalCheckId),this._intervalCheckId=null,this._startedStateCheck=!1;}catch{e3.error("Produced error stopping the network monitor");}},checkStateProperty:function(t){try{this._videoElement&&this._adapter&&this._videoElement.readyState&&(this._videoElement.readyState>3&&!this._adapter.flags.isSeeking?this._adapter.flags.isBuffering?this.fireBufferEnd({},"stateMonitor"):this._adapter.flags.isJoined||this.fireJoin({},"stateMonitor"):this._videoElement.readyState<4&&!this._adapter.flags.isBuffering&&this.fireBufferBegin({},!1,"stateMonitor",!0));}catch{}}});FE.exports=t3;});var qE=q((BF,VE)=>{"use strict";var Lo=Co(),i3=jr(),n3={getPosition:function(){return null;},getGivenBreaks:function(){return null;},getExpectedBreaks:function(){return null;},getExpectedPattern:function(){return null;},getBreaksTime:function(){return null;},getGivenAds:function(){return null;},getExpectedAds:function(){return null;},getIsVisible:function(){return!0;},getAudioEnabled:function(){return null;},getIsSkippable:function(){return null;},getIsFullscreen:function(){return null;},getCampaign:function(){return null;},getCreativeId:function(){return null;},getProvider:function(){return null;},getAdInsertionType:function(){return null;},fireClick:function(t){typeof t=="string"&&(t={url:t}
220),this.emit(Lo.Event.CLICK,{params:t});},fireQuartile:function(t){this.flags.isStarted&&typeof t=="number"&&t>this.flags.lastQuartileSent&&t<4&&(this.flags.lastQuartileSent++,this.emit(Lo.Event.QUARTILE,{params:{quartile:t}}));},startChronoView:function(){if(this.getIsVisible()&&!this.plugin.backgroundDetector.isInBackground){var t=this.chronos.viewedMax;(t.length===0||t[t.length-1].stopTime!==0)&&(t.push(new i3()),t[t.length-1].start());}},stopChronoView:function(){var t=this.chronos.viewedMax;t[0]&&t.length>0&&t[t.length-1].stopTime===0&&t[t.length-1].stop();},fireManifest:function(t,e){var i={params:t};typeof t=="string"&&(i={params:{errorType:t,errorMessage:e}}),this.emit(Lo.Event.MANIFEST,i);},fireSkip:function(t){t===void 0&&(t={}),t.skipped=!0,this.fireStop(t);},fireBreakStart:function(t){this.emit(Lo.Event.PODSTART,{params:t});},fireBreakStop:function(t){this.emit(Lo.Event.PODSTOP,{params:t});}};VE.exports=n3;});var $E=q((FF,HE)=>{"use strict";var gm=Co(),r3=Ne(),s3={getPlayrate:function(){return this.flags.isPaused?0:1;},getFramesPerSecond:function(){return null;},getDroppedFrames:function(){return null;},getThroughput:function(){return null;},getRendition:function(){return null;},getTitle2:function(){return null;},getIsLive:function(){return null;},getCdnTraffic:function(){return null;},getP2PTraffic:function(){return null;},getUploadTraffic:function(){return null;},getIsP2PEnabled:function(){return null;},getSegmentDuration:function(){return null;},getHouseholdId:function(){return null;},getLatency:function(){return null;},getPacketLoss:function(){return null;},getPacketSent:function(){return null;},getMetrics:function(){return null;},getAudioCodec:function(){return null;},getVideoCodec:function(){return null;},getURLToParse:function(){return null;},fireSeekBegin:function(t,e,i){if(this._discardFalseBuffers(),this.plugin&&this.plugin.getIsLive()&&this.plugin.options["content.isLive.noSeek"])return null;if(this.flags.isJoined&&!this.flags.isSeeking){if(this.flags.isBuffering){if(e!==!1)r3.notice("Converting current buffer to seek"),this.chronos.seek=this.chronos.buffer.clone(),this.chronos.buffer.reset(),this.flags.isBuffering=!1;else return;}else this.chronos.seek.start();try{this.fireEventsStruct.seek=[],i?this.fireEventsStruct.seek.push(i):this.fireEventsStruct.seek.push("undefinedEvent");}catch{}this.flags.isSeeking=!0,this.emit(gm.Event.SEEK_BEGIN,{params:t});}},fireSeekEnd:function(t,e){if(this.plugin&&this.plugin.getIsLive()&&this.plugin.options["content.isLive.noSeek"])return null;if(this.flags.isJoined&&this.flags.isSeeking){try{e?this.fireEventsStruct.seek.push(e):this.fireEventsStruct.seek.push("undefinedEvent");}catch{}t=t||{},t.triggeredEvents=this.fireEventsStruct.seek,this._shouldSplitView()&&(t.viewIndex=this.plugin.viewTransform._viewIndex),this.cancelSeek(),this.emit(gm.Event.SEEK_END,{params:t});}},cancelSeek:function(t){this.flags.isJoined&&this.flags.isSeeking&&(this.flags.isSeeking=!1,this.chronos.seek.stop(),this.monitor&&this.monitor.skipNextTick());},fireEvent:function(t,e,i,n){var r=n||{};r.name=t||"",r.dimensions=e||{},r.values=i||{},this.emit(gm.Event.VIDEO_EVENT,{params:r});}};HE.exports=s3;});var tc=q((UF,GE)=>{"use strict";var a3=rn(),vm=Ne(),ym=xt(),zE=xo(),o3=NE(),l3=ME(),_m=mm(),u3=UE(),wn=Co(),bm=a3.extend({constructor:function(t){this.flags=new l3(),this.chronos=new o3(),this.fireEventsStruct={},this.fireEventsStruct.buffer=[],this.fireEventsStruct.seek=[],this.monitor=null,this.plugin=null,this.player=null,this._isAdsAdapter=null,this.setPlayer(t),this.tag=this.player,vm.notice("Adapter "+this.getVersion()+" with Lib "+zE+" is ready.");},setPlayer:function(t){this.player&&this.unregisterListeners(),typeof t=="string"&&typeof document<"u"?this.player=document.getElementById(t):this.player=t,this.registerListeners();},registerListeners:function(){},unregisterListeners:function(){},dispose:function(){this.stopMonitor(),this.stopReadyStateMonitor(),this.fireStop(),this.unregisterListeners(),this.player=null,this.tag=null;},monitorPlayhead:function(t,e,i){this.stopMonitor();var n=0;t&&(n|=_m.Type.BUFFER),e&&(n|=_m.Type.SEEK),!this.monitor||!this.monitor._timer.isRunning?this.monitor=new _m(this,n,i):this.monitor.skipNextTick();},stopMonitor:function(){this.monitor&&this.monitor.stop();},monitorReadyState:function(t){this.stopReadyStateMonitor(),this.stateMonitor=new u3(this,t);},startReadyStateMonitor:function(){this.stateMonitor&&this.stateMonitor.start();},stopReadyStateMonitor:function(){this.stateMonitor&&this.stateMonitor.stop();},checkReadyState:function(t,e){try{this.plugin&&this.plugin.getReadyStateMonitorEnabled()&&t&&(t>3&&!this.flags.isSeeking?this.flags.isBuffering?this.fireBufferEnd({},e+"-readyState"):this.flags.isJoined||this.fireJoin({},e+"-readyState"):t<4&&!this.flags.isBuffering&&this.fireBufferBegin({},!1,e+"-readyState",!0));}catch{vm.error("Can't check readyState property correctly");}},getPlayhead:function(){return null;},getDuration:function(){return null;},getBitrate:function(){return null;},getTotalBytes:function(){return null;},getTitle:function(){return null;},getResource:function(){return null;},getPlayerVersion:function(){return null;},getPlayerName:function(){return null;},getVersion:function(){return zE+"-generic-js";},getVideoObject:function(){return null;},fireInit:function(t,e){this.plugin&&this.plugin.fireInit(t,e);},fireStart:function(t,e){if(this.plugin&&this.plugin.backgroundDetector&&this.plugin.backgroundDetector.canBlockStartCalls())return null;this.flags.isStarted||(this.flags.isStarted=!0,this.chronos.total.start(),this.chronos.join.start(),e&&(t=t||{}
220,t.triggeredEvents=[e]),this.startReadyStateMonitor(),this.emit(wn.Event.START,{params:t}));},fireJoin:function(t,e){!this.flags.isJoined&&!this.flags.isStarted&&!this._isAds()&&this.plugin&&this.plugin.isInitiated&&this.fireStart({},e),this.flags.isStarted&&!this.flags.isJoined&&(this.flags.isStarted=!0,this.monitor&&this.monitor.start(),this.flags.isJoined=!0,this.chronos.join.stop(),e&&(t=t||{},t.triggeredEvents=[e]),this._shouldSplitView()&&(t.viewIndex=this.plugin.viewTransform._viewIndex),this.emit(wn.Event.JOIN,{params:t}));},firePause:function(t,e){this._discardFalseBuffers(),this.flags.isBuffering&&this.fireBufferEnd(null,"firePauseCall"),this.flags.isJoined&&!this.flags.isPaused&&(this.flags.isPaused=!0,this.chronos.pause.start(),e&&(t=t||{},t.triggeredEvents=[e]),this._shouldSplitView()&&(t.viewIndex=this.plugin.viewTransform._viewIndex),this.emit(wn.Event.PAUSE,{params:t}));},fireResume:function(t,e){this._discardFalseBuffers(),this.flags.isJoined&&this.flags.isPaused&&(this.flags.isPaused=!1,this.chronos.pause.stop(),this.monitor&&this.monitor.skipNextTick(),e&&(t=t||{},t.triggeredEvents=[e]),this._shouldSplitView()&&(t.viewIndex=this.plugin.viewTransform._viewIndex),this.emit(wn.Event.RESUME,{params:t}));},fireBufferBegin:function(t,e,i,n){if(n=n||!1,this.flags.isJoined&&!this.flags.isBuffering){if(this.flags.isSeeking){if(e)vm.notice("Converting current buffer to seek"),this.chronos.buffer=this.chronos.seek.clone(),this.chronos.seek.reset(),this.flags.isSeeking=!1;else return;}else this.chronos.buffer.start();try{this.fireEventsStruct.buffer=[],i?this.fireEventsStruct.buffer.push(i):this.fireEventsStruct.buffer.push("undefinedEvent");}catch{}this.flags.isBuffering=!0,this.flags.isVideoStateBuffering=n,this._shouldSplitView()&&(t.viewIndex=this.plugin.viewTransform._viewIndex),this.emit(wn.Event.BUFFER_BEGIN,{params:t});}},fireBufferEnd:function(t,e){if(this.flags.isJoined&&this.flags.isBuffering){try{e?this.fireEventsStruct.buffer.push(e):this.fireEventsStruct.buffer.push("undefinedEvent");}catch{}t=t||{},t.triggeredEvents=this.fireEventsStruct.buffer,this._shouldSplitView()&&(t.viewIndex=this.plugin.viewTransform._viewIndex),this.cancelBuffer(),this.emit(wn.Event.BUFFER_END,{params:t});}},_discardFalseBuffers:function(){try{this.flags.isBuffering&&this.flags.isVideoStateBuffering&&this._getDeltaBufferTime()<=100&&this.cancelBuffer();}catch{}},cancelBuffer:function(t){this.flags.isJoined&&this.flags.isBuffering&&(this.flags.isBuffering=!1,this.flags.isVideoStateBuffering=!1,this.chronos.buffer.stop(),this.monitor&&this.monitor.skipNextTick());},_getDeltaBufferTime:function(){return this.chronos&&this.chronos.buffer?this.chronos.buffer.getDeltaTime(!1):0;},fireStop:function(t,e){(this._isAds()||this.plugin&&this.plugin._isStopReady())&&(this._isAds()&&this.flags.isStarted||!this._isAds()&&(this.flags.isStarted||this.plugin&&this.plugin.isInitiated))&&(this.stopMonitor(),this.stopReadyStateMonitor(),this.flags.reset(),this.chronos.total.stop(),this.chronos.join.reset(),this.chronos.pause.stop(),this.chronos.buffer.stop(),this.chronos.seek.stop(),e&&(t=t||{},t.triggeredEvents=[e]),this._shouldSplitView()&&(t.viewIndex=this.plugin.viewTransform._viewIndex),this.emit(wn.Event.STOP,{params:t}),this.chronos.pause.reset(),this.chronos.buffer.reset(),this.chronos.seek.reset(),this.chronos.viewedMax.splice(0,this.chronos.viewedMax.length));},setIsAds:function(t){this._isAdsAdapter=t;},_isAds:function(){return this._isAdsAdapter;},fireCasted:function(t,e){t||(t={}),t.casted=!0,this.fireStop(t,e);},fireError:function(t,e,i,n,r){var s=ym.buildErrorParams(t,e,i,n);s.code&&delete s.code,r&&(s=s||{},s.triggeredEvents=[r]),this._shouldSplitView()&&(s.viewIndex=this.plugin.viewTransform._viewIndex);var a=this.plugin?this.plugin.options:{};typeof s.errorCode<"u"&&a["errors.ignore"]&&a["errors.ignore"].indexOf(s.errorCode.toString())>-1||(this.emit(wn.Event.ERROR,{params:s}),typeof s.errorCode<"u"&&a["errors.fatal"]&&a["errors.fatal"].indexOf(s.errorCode.toString())>-1&&this.fireStop({},r));},fireFatalError:function(t,e,i,n,r){var s=this.plugin?this.plugin.options:{};typeof t<"u"&&s["errors.ignore"]&&s["errors.ignore"].indexOf(t.toString())>-1||(this.monitor&&this.monitor.stop(),this.fireError(t,e,i,n,r),typeof t<"u"&&s["errors.nonFatal"]&&s["errors.nonFatal"].indexOf(t.toString())>-1||this.fireStop({},r));},_shouldSplitView:function(){return this.plugin&&this.plugin.options&&this.plugin.options["session.splitViews"];}},{Event:wn.Event});ym.assign(bm.prototype,qE());ym.assign(bm.prototype,$E());GE.exports=bm;});var YE=q((VF,WE)=>{"use strict";
220var Bi=Ne(),Ie=Ti(),d3=xt(),Fi=tc(),c3={setAdapter:function(t){if(this.browserLoadTimes&&this.browserLoadTimes.setPlayerSetupTime(),t.plugin)Bi.warn("Adapters can only be added to a single plugin");else{this.removeAdapter(),this._adapter=t,t.plugin=this,t.setIsAds(!1),this.contentAdapterListeners={},this.contentAdapterListeners[Fi.Event.START]=this._startListener.bind(this),this.contentAdapterListeners[Fi.Event.JOIN]=this._joinListener.bind(this),this.contentAdapterListeners[Fi.Event.PAUSE]=this._pauseListener.bind(this),this.contentAdapterListeners[Fi.Event.RESUME]=this._resumeListener.bind(this),this.contentAdapterListeners[Fi.Event.SEEK_BEGIN]=this._seekBufferBeginListener.bind(this),this.contentAdapterListeners[Fi.Event.SEEK_END]=this._seekEndListener.bind(this),this.contentAdapterListeners[Fi.Event.BUFFER_BEGIN]=this._seekBufferBeginListener.bind(this),this.contentAdapterListeners[Fi.Event.BUFFER_END]=this._bufferEndListener.bind(this),this.contentAdapterListeners[Fi.Event.ERROR]=this._errorListener.bind(this),this.contentAdapterListeners[Fi.Event.STOP]=this._stopListener.bind(this),this.contentAdapterListeners[Fi.Event.VIDEO_EVENT]=this._videoEventListener.bind(this);for(var e in this.contentAdapterListeners)this._adapter.on(e,this.contentAdapterListeners[e]);this.productAnalytics&&this.productAnalytics.adapterAfterSet();}},getAdapter:function(){return this._adapter;},removeAdapter:function(){if(this._adapter){if(this.productAnalytics&&this.productAnalytics.adapterBeforeRemove(),this._adapter.dispose(),this._adapter.plugin=null,this.contentAdapterListeners){for(var t in this.contentAdapterListeners)this._adapter.off(t,this.contentAdapterListeners[t]);delete this.contentAdapterListeners;}this._adapter=null;}},_startListener:function(t){this.isInitiated?this.initChrono.startTime!==0&&(this._adapter.chronos.join.startTime=this.initChrono.startTime):(this.viewTransform.nextView(),this.options&&this.options["session.splitViews"]&&(t.data.params.viewIndex=this.viewTransform._viewIndex),this._initComm(),this._startPings());try{if(this._adapter&&this.resourceTransform){var e=this._getResourceForTransform();this.resourceTransform.init(e);}}catch{}var i=t.data.params||{},n=this.getResource()&&typeof this.getIsLive()=="boolean"&&(this.getIsLive()||typeof this.getDuration()=="number"&&this.getDuration()>0)&&this.getTitle();n=this.options.forceInit?!1:n&&this._isExtraMetadataReady(),n&&!this.isInitiated?(this._send(Ie.WillSendEvent.WILL_SEND_START,Ie.Service.START,i),this._adSavedError(),this._adSavedManifest(),Bi.notice(Ie.Service.START+" "+(i.title||i.mediaResource)),this.isStarted=!0):this.isInitiated||(this.isInitiated=!0,this._adapter.chronos.join.start(),this._send(Ie.WillSendEvent.WILL_SEND_INIT,Ie.Service.INIT,i),this._adSavedError(),this._adSavedManifest(),Bi.notice(Ie.Service.INIT+" "+(i.title||i.mediaResource)));},_retryStart:function(t){this._isExtraMetadataReady()&&(this._send(Ie.WillSendEvent.WILL_SEND_START,Ie.Service.START,{}),this.startDelayed=!1);},_joinListener:function(t){var e={};d3.assign(e,t.data.params||{}),!this._adsAdapter||!this._adsAdapter.flags.isStarted?(this._adapter&&(this._adapter.chronos.join.startTime=Math.min(this._adapter.chronos.join.startTime+(this._totalPrerollsTime||0),new Date().getTime()),this._totalPrerollsTime=0),this.isInitiated&&!this.isStarted&&(this._isExtraMetadataReady()?this._send(Ie.WillSendEvent.WILL_SEND_START,Ie.Service.START,e):this.startDelayed=!0,this._adSavedError(),this._adSavedManifest(),Bi.notice(Ie.Service.START+" "+(e.title||e.mediaResource)),this.isStarted=!0),e=t.data.params||{},this._adsAdapter&&this.isBreakStarted&&this._adsAdapter.fireBreakStop(),this._send(Ie.WillSendEvent.WILL_SEND_JOIN,Ie.Service.JOIN,e),Bi.notice(Ie.Service.JOIN+" "+e.joinDuration+"ms")):(this._adapter.monitor&&this._adapter.monitor.stop(),this._adapter.flags.isJoined=!1,this._adapter.chronos.join.stopTime=0);},_pauseListener:function(t){this._adapter&&(this._adapter.flags.isBuffering||this._adapter.flags.isSeeking||this._adsAdapter&&this._adsAdapter.flags.isStarted)&&this._adapter.chronos.pause.reset();var e=t.data.params||{};this._send(Ie.WillSendEvent.WILL_SEND_PAUSE,Ie.Service.PAUSE,e),Bi.notice(Ie.Service.PAUSE+" at "+e.playhead+"s");},_resumeListener:function(t){this._adsAdapter&&this.isBreakStarted&&!this._adsAdapter.flags.isStarted&&this._adsAdapter.fireBreakStop();var e=t.data.params||{};this._send(Ie.WillSendEvent.WILL_SEND_RESUME,Ie.Service.RESUME,e),Bi.notice(Ie.Service.RESUME+" "+e.pauseDuration+"ms"),this._adapter.chronos.pause.reset();},_seekBufferBeginListener:function(t){this._adapter&&this._adapter.flags.isPaused&&this._adapter.chronos.pause.reset(),t.type&&t.type.includes("buffer")?Bi.notice(t.type+", eventsTriggered: "+this._adapter.fireEventsStruct.buffer):Bi.notice(t.type+", eventsTriggered: "+this._adapter.fireEventsStruct.seek);},_seekEndListener:function(t){var e=t.data.params||{};this._send(Ie.WillSendEvent.WILL_SEND_SEEK,Ie.Service.SEEK,e),Bi.notice(Ie.Service.SEEK+" to "+e.playhead+" in "+e.seekDuration+"ms"+(e.triggeredEvents?", eventsTriggered: "+e.triggeredEvents:""));},_bufferEndListener:function(t){var e=t.data.params||{};this._send(Ie.WillSendEvent.WILL_SEND_BUFFER,Ie.Service.BUFFER,e),Bi.notice(Ie.Service.BUFFER+" to "+e.playhead+" in "+e.bufferDuration+"ms"+(e.triggeredEvents?", eventsTriggered: "+e.triggeredEvents:""));},_errorListener:function(t){this._blockError(t.data.params)||(this.fireError(t.data.params||{}),this._adSavedError(),this._adSavedManifest());},_blockError:function(t){var e=Date.now(),i=this._lastErrorParam
220s?this._lastErrorParams.errorCode===t.errorCode&&this._lastErrorParams.msg===t.msg:!1;return i&&this._lastErrorTime+5e3>e?(this._lastErrorTime=e,!0):(this._lastErrorTime=e,this._lastErrorParams=t,!1);},_stopListener:function(t){this.fireStop(t.data.params||{});},_isStopReady:function(t){var e=!1;if(!this.requestBuilder.lastSent.live&&this._adsAdapter&&this._adapter&&(!this._adapter.getPlayhead()||this._adapter.getPlayhead()>=this.requestBuilder.lastSent.mediaDuration-1)){var i=0,n=this.options["ad.expectedPattern"];if(n&&n.post&&n.post[0])i=n.post[0];else if(this.requestBuilder.lastSent.breaksTime){if(this.requestBuilder.lastSent.position===Ie.AdPosition.Postroll&&(i=this.requestBuilder.lastSent.givenAds),!i&&this.requestBuilder.lastSent.breaksTime){var r=this.requestBuilder.lastSent.breaksTime;if(r.length>0&&this.requestBuilder.lastSent.mediaDuration){var s=Math.round(r[r.length-1]);s+1>=this.requestBuilder.lastSent.mediaDuration&&(i=1);}}}else e=!0;i<=this.playedPostrolls&&(e=!0);}else e=!0;return e;},_videoEventListener:function(t){this._send(Ie.WillSendEvent.WILL_SEND_VIDEO_EVENT,Ie.Service.VIDEO_EVENT,t.data.params);},_isExtraMetadataReady:function(t){if(!this.options.waitForMetadata||this.options.pendingMetadata.length<1)return!0;var e=this.requestBuilder.getGetters();return this.options.pendingMetadata.map(function(i){if(e.hasOwnProperty(i))return!!this[e[i]]();}.bind(this)).indexOf(!1)<0;}};WE.exports=c3;});var QE=q((qF,KE)=>{"use strict";var XE=xt(),h3=xo(),f3=Wd(),p3={getHost:function(){var t=this.options.host;return this.viewTransform&&this.viewTransform.response&&this.viewTransform.response.host&&(t=this.viewTransform.response.host),XE.addProtocol(XE.stripProtocol(t),this.options["app.https"]);},getUserType:function(){return this.options["user.type"];},isParseManifest:function(){return this.options["parse.manifest"];},isParseCdnNode:function(){return this.options["parse.cdnNode"];},isCdnSwitch:function(){return this.options["parse.cdnSwitchHeader"];},getParseCdnNodeList:function(){return this.options["parse.cdnNode.list"];},getParseCdnNodeNameHeader:function(){return this.options["parse.cdnNameHeader"];},getParseNodeHeader:function(){return this.options["parse.cdnNodeHeader"];},getObfuscateIp:function(){return this.options["user.obfuscateIp"];},getPrivacyProtocol:function(){var t=this.options["user.privacyProtocol"];return typeof t=="string"&&(t=t.toLowerCase()),t==="optin"||t==="optout"?t:null;},getCustomDimensions:function(){var t=this.options["content.customDimensions"];return typeof t=="object"?t:null;},getExtraparam1:function(){return this.options["content.customDimension.1"];},getExtraparam2:function(){return this.options["content.customDimension.2"];},getExtraparam3:function(){return this.options["content.customDimension.3"];},getExtraparam4:function(){return this.options["content.customDimension.4"];},getExtraparam5:function(){return this.options["content.customDimension.5"];},getExtraparam6:function(){return this.options["content.customDimension.6"];},getExtraparam7:function(){return this.options["content.customDimension.7"];},getExtraparam8:function(){return this.options["content.customDimension.8"];},getExtraparam9:function(){return this.options["content.customDimension.9"];},getExtraparam10:function(){return this.options["content.customDimension.10"];},getExtraparam11:function(){return this.options["content.customDimension.11"];},getExtraparam12:function(){return this.options["content.customDimension.12"];},getExtraparam13:function(){return this.options["content.customDimension.13"];},getExtraparam14:function(){return this.options["content.customDimension.14"];},getExtraparam15:function(){return this.options["content.customDimension.15"];},getExtraparam16:function(){return this.options["content.customDimension.16"];},getExtraparam17:function(){return this.options["content.customDimension.17"];},getExtraparam18:function(){return this.options["content.customDimension.18"];},getExtraparam19:function(){return this.options["content.customDimension.19"];},getExtraparam20:function(){return this.options["content.customDimension.20"];},getAdExtraparam1:function(){return this.options["ad.customDimension.1"];},getAdExtraparam2:function(){return this.options["ad.customDimension.2"];},getAdExtraparam3:function(){return this.options["ad.customDimension.3"];},getAdExtraparam4:function(){return this.options["ad.customDimension.4"];},getAdExtraparam5:function(){return this.options["ad.customDimension.5"];},getAdExtraparam6:function(){return this.options["ad.customDimension.6"];},getAdExtraparam7:function(){return this.options["ad.customDimension.7"];},getAdExtraparam8:function(){return this.options["ad.customDimension.8"];},getAdExtraparam9:function(){return this.options["ad.customDimension.9"];},getAdExtraparam10:function(){return this.options["ad.customDimension.10"];},getPluginInfo:function(){var t={lib:h3,adapter:this.getAdapterVersion(),adAdapter:this.getAdAdapterVersion()};return t;},getIp:function(){return this.options["network.ip"];},getIsp:function(){return this.options["network.isp"];},getConnectionType:function(){return this.options["network.connectionType"];},getDeviceInfo:function(){var t={};return this.getDeviceCode()&&(t.deviceCode=this.getDeviceCode()),this.getModel()&&(t.model=this.getModel()),this.getBrand()&&(t.brand=this.getBrand()),this.getDeviceType()&&(t.deviceType=this.getDeviceType()),this.getDeviceName()&&(t.deviceName=this.getDeviceName()),this.getOsName()&&(t.osName=this.getOsName()),this.getOsVersion()&&(t.osVersion=this.getOsVersion()),this.getBrowserName()&&(t.browserName=this.getBrowserName()),this.getBrowserVersion()&&(t.browserVersion=this.getBrowserVersion()),this.getBrowserType()&&(t.browserType=this.getBrowserType()),this.getBrowserEngine()&&(t.browserEngine=this.getBrowserEngine()),t!=={}?t:null;},getEDID:function(){var t=this.options["device.EDID"];return t?t.toString():null;},getDeviceCode:function(){return this.options["device.code"];},getModel:function(){return this.options["device.model"];},getBrand:function(){return this.options["device.brand"];},getDeviceType:function(){return this.options["device.type"];},getDeviceName:function(){return this.options["device.name"];},getOsName:function(){return this.options["device.osName"];},getOsVersion:function(){return this.options["device.osVersion"];},getBrowserName:function(){return this.options["device.browserName"];},getBrowserVersion:function(){return this.options["device.browserVersion"];},getBrowserType:function(){return this.options["device.browserType"];},getBrowserEngine:function(){return this.options["device.browserEngine"];},getAccountCode:function(){return this.options.accountCode;},getUsername:function(){return this.options["user.name"];},getAnonymousUser:function(){return this.options["user.anonymousId"];},getEmail:function(){return this.options["user.email"];},getReferer:function(){var t=this.options.referer||"";return!t&&typeof window<"u"&&window.location&&(t=window.location.href),t;},getReferral:function(){var t=this.options.referral||"";return!t&&typeof document<"u"&&(t=document.referrer),t;},getLanguage:function(){var t=null;return typeof navigator<"u"&&(t=navigator.language),t;},getScreenResolution:function(){var t=null;try{if(window&&window.screen){var e=window.devicePixelRatio||1;t=window.screen.width*e+"x"+window.screen.height*e;}}catch{}return t;},getNodeHost:function(){return this.options["content.cdnNode"]||this.resourceTransform.getNodeHost();},getNodeType:function(){return this.options["content.cdnType"]||this.resourceTransform.getNodeType();},getNodeTypeString:function(){return this.resourceTransform.getNodeTypeString();},getRequestNumber:function(){return Math.random();},getOfflineView:function(){var t=null;return this.offlineStorage&&(t=this.offlineStorage.getView()),t;},getDeviceUUID:function(){var t=null;return this.options["device.isAnonymous"]||(t=this.options["device.id"]||this.uuidGenerator.getKey()),t;},getAppName:function(){return this.options["app.name"];}
220,getAppReleaseVersion:function(){return this.options["app.releaseVersion"];},getIsBlocked:function(){return this.options["ad.blockerDetected"];},isMethodPostEnabled:function(){return this.options.method&&this.options.method.toLowerCase()===f3.POST;},getPlayheadMonitorEnabled:function(){return this.options["playhead.monitor"];},getReadyStateMonitorEnabled:function(){return this.options["readyState.monitor"];}};KE.exports=p3;});var n1=q((HF,i1)=>{"use strict";var JE=Ne(),Qs=xt(),ZE=xo(),e1=Do(),t1=am(),m3={getPlayhead:function(){var t=this._safeGetterAdapter("getPlayhead");return Qs.parseNumber(t,0);},getPlayrate:function(){var t=0;if(this._adapter&&this._adapter.flags&&!this._adapter.flags.isPaused)try{t=this._adapter.getPlayrate();}catch(e){JE.warn("An error occured while calling getPlayrate",e);}return t;},getFramesPerSecond:function(){return this._safeGetterAdapter("getFramesPerSecond","content.fps");},getSegmentDuration:function(){return this.hybridNetwork.getSegmentDuration()||this._safeGetterAdapter("getSegmentDuration","content.segmentDuration");},getDroppedFrames:function(){var t=this._safeGetterAdapter("getDroppedFrames");return t||(t=this.getWebkitDroppedFrames()),Qs.parseNumber(t,0);},getWebkitDroppedFrames:function(){return this._adapter&&this._adapter.tag&&this._adapter.tag.webkitDroppedFrameCount?this._adapter.tag.webkitDroppedFrameCount:null;},getDuration:function(){var t=this._safeGetterAdapter("getDuration","content.duration")||null;return Qs.parseNumber(Math.round(t),null);},getBitrate:function(){var t=this._safeGetterAdapter("getBitrate","content.bitrate");return(!t||t===-1)&&(t=this.getWebkitBitrate()),Qs.parseNumber(t,-1);},getTotalBytes:function(){return this.options["content.sendTotalBytes"]?this._safeGetterAdapter("getTotalBytes","content.totalBytes"):null;},getWebkitBitrate:function(){if(this._adapter&&this._adapter.tag&&this._adapter.tag.webkitVideoDecodedByteCount){var t=this._adapter.tag.webkitVideoDecodedByteCount;if(this._lastWebkitBitrate){var e=this._adapter.tag.webkitVideoDecodedByteCount-this._lastWebkitBitrate;t=Math.round(e/this.viewTransform.response.pingTime*8);}return this._lastWebkitBitrate=this._adapter.tag.webkitVideoDecodedByteCount,t!==0?t:-1;}},getThroughput:function(){var t=this._safeGetterAdapter("getThroughput","content.throughput");return Qs.parseNumber(t,-1);},getRendition:function(){return this._safeGetterAdapter("getRendition","content.rendition");},getTitle:function(){return this._safeGetterAdapter("getTitle","content.title");},getTitle2:function(){return this._safeGetterAdapter("getTitle2","content.program");},getIsLive:function(){var t=this.options["content.isLive"];return!t&&t!==!1&&(t=this._safeGetterAdapter("getIsLive")||!1),t;},getResource:function(){return this._safeGetterAdapter("getResource","content.resource");},getParsedResource:function(){var t=null;return this.resourceTransform.isBlocking()||(t=this.resourceTransform.getResource()),t=t||this._safeGetterAdapter("getURLToParse"),t===this.getResource()?null:t;},getTransactionCode:function(){return this.options["content.transactionCode"];},getMetadata:function(){return this.options["content.metadata"];},getPlayerVersion:function(){return this._safeGetterAdapter("getPlayerVersion")||"";},getPlayerName:function(){return this._safeGetterAdapter("getPlayerName")||"";},getCdn:function(){var t=null;return this.resourceTransform.isBlocking()||(t=this.resourceTransform.getCdnName()),t||this.options["content.cdn"];},getPluginVersion:function(){var t=this.getAdapterVersion();return t||(t=ZE+"-adapterless-js"),t;},getLibVersion:function(){return ZE;},getAdapterVersion:function(){return this._safeGetterAdapter("getVersion");},getCdnTraffic:function(){return this._safeGetterAdapter("getCdnTraffic")||this.hybridNetwork.getCdnTraffic();},getMultiCdnInfo:function(){return this.hybridNetwork.getMultiCdnInfo();},getBalancerResponseId:function(){var t=this.hybridNetwork.getBalancerResponseId();return!t&&this.options["cdnbalancer.uuid"]?this.options["cdnbalancer.uuid"]:t;},getP2PTraffic:function(){return this._safeGetterAdapter("getP2PTraffic")||this.hybridNetwork.getP2PTraffic();},getUploadTraffic:function(){return this._safeGetterAdapter("getUploadTraffic")||this.hybridNetwork.getUploadTraffic();},getIsP2PEnabled:function(){return this._safeGetterAdapter("getIsP2PEnabled")||this.hybridNetwork.getIsP2PEnabled();},getStreamingProtocol:function(){var t=this.options["content.streamingProtocol"];if(t){for(var e in t1)if(t1[e]===t)return t;}return null;},getTransportFormat:function(){var t=this.options["content.transportFormat"];if(!t&&this.options["parse.manifest"]&&!this.resourceTransform.isBlocking()&&(t=this.resourceTransform.getTransportFormat()),t){for(var e in e1)if(e1[e]===t)return t;}return null;},getHouseholdId:function(){return this._safeGetterAdapter("getHouseholdId");},getLatency:function(){return this.getIsLive()?this._safeGetterAdapter("getLatency"):null;},getPacketLoss:function(){return this._safeGetterAdapter("getPacketLoss");},getPacketSent:function(){return this._safeGetterAdapter("getPacketSent");},getVideoMetrics:function(){return Qs.getMetricsFrom(this._adapter?this._adapter.getMetrics():null,this.options["content.metrics"]);},getPlayerStartupTime:function(){return this.browserLoadTimes.getPlayerStartupTime();},getJoinDuration:function(){return this._adapter?this._adapter.chronos.join.getDeltaTime(!1):-1;},getBufferDuration:function(){return this._adapter?this._adapter.chronos.buffer.getDeltaTime(!1):-1;},getSeekDuration:function(){return this._adapter?this._adapter.chronos.seek.getDeltaTime(!1):-1;},getPauseDuration:function(){return this._adapter?this._adapter.chronos.pause.getDeltaTime(!1):0;},getPackage:function(){return this.options["content.package"];},getSaga:function(){return this.options["content.saga"];},getTvShow:function(){return this.options["content.tvShow"];},getSeason:function(){return this.options["content.season"];},getEpisodeTitle:function(){return this.options["content.episodeTitle"];},getChannel:function(){return this.options["content.channel"];},getID:function(){return this.options["content.id"];},getImdbId:function(){return this.options["content.imdbId"];},getGracenoteID:function(){return this.options["content.gracenoteId"];},getType:function(){return this.options["content.type"];},getGenre:function(){return this.options["content.genre"];},getVideoLanguage:function(){return this.options["content.language"];},getSubtitles:function(){return this.options["content.subtitles"];},getContractedResolution:function(){return this.options["content.contractedResolution"];},getCost:function(){return this.options["content.cost"];}
220,getPrice:function(){return this.options["content.price"];},getPlaybackType:function(){var t=this.options["content.playbackType"];if(!t){var e=this.options["content.isLive"];typeof e!="boolean"&&(e=this._safeGetterAdapter("getIsLive")),typeof e=="boolean"&&(t=e?"Live":"VoD");}return t;},getDRM:function(){return this.options["content.drm"];},getVideoCodec:function(){return this._safeGetterAdapter("getVideoCodec","content.encoding.videoCodec");},getAudioCodec:function(){return this._safeGetterAdapter("getAudioCodec","content.encoding.audioCodec");},getCodecSettings:function(){return this.options["content.encoding.codecSettings"];},getCodecProfile:function(){return this.options["content.encoding.codecProfile"];},getContainerFormat:function(){return this.options["content.encoding.containerFormat"];},getLinkedViewId:function(){return this.options.linkedViewId;},_safeGetterAdapter:function(t,e){var i=null;if(e&&this.options[e])i=this.options[e];else try{this._adapter&&typeof this._adapter[t]=="function"&&(i=this._adapter[t]());}catch(n){JE.warn("An error occured while calling "+t,n);}return i;}};i1.exports=m3;});var s1=q(($F,r1)=>{"use strict";var Tm=Ne(),ke=Ti(),di=tc(),g3=xt(),v3={getAdsAdapter:function(){return this._adsAdapter;},setAdsAdapter:function(t){if(t.plugin)Tm.warn("Adapters can only be added to a single plugin");else{this.removeAdsAdapter(),t.plugin=this,this._adsAdapter=t,t.setIsAds(!0),this.adsAdapterListeners={},this.adsAdapterListeners[di.Event.START]=this._adStartListener.bind(this),this.adsAdapterListeners[di.Event.JOIN]=this._adJoinListener.bind(this),this.adsAdapterListeners[di.Event.PAUSE]=this._adPauseListener.bind(this),this.adsAdapterListeners[di.Event.RESUME]=this._adResumeListener.bind(this),this.adsAdapterListeners[di.Event.BUFFER_BEGIN]=this._adBufferBeginListener.bind(this),this.adsAdapterListeners[di.Event.BUFFER_END]=this._adBufferEndListener.bind(this),this.adsAdapterListeners[di.Event.STOP]=this._adStopListener.bind(this),this.adsAdapterListeners[di.Event.ERROR]=this._adErrorListener.bind(this),this.adsAdapterListeners[di.Event.CLICK]=this._adClickListener.bind(this),this.adsAdapterListeners[di.Event.MANIFEST]=this._adManifestListener.bind(this),this.adsAdapterListeners[di.Event.PODSTART]=this._adBreakStartListener.bind(this),this.adsAdapterListeners[di.Event.PODSTOP]=this._adBreakStopListener.bind(this),this.adsAdapterListeners[di.Event.QUARTILE]=this._adQuartileListener.bind(this);for(var e in this.adsAdapterListeners)this._adsAdapter.on(e,this.adsAdapterListeners[e]);}},removeAdsAdapter:function(){if(this._adsAdapter){if(this._adsAdapter.dispose(),this._adsAdapter.plugin=null,this.adsAdapterListeners){for(var t in this.adsAdapterListeners)this._adsAdapter.off(t,this.adsAdapterListeners[t]);delete this.adsAdapterListeners;}this.resizeScrollDetector.stopDetection(),this._adsAdapter=null;}},_adStartListener:function(t){this._adapter?(this._adapter.fireBufferEnd(null,"adStartListener"),this._adapter.fireSeekEnd(null,"adStartListener"),!this.isInitiated&&!this._adapter.flags.isStarted&&this._adapter.fireStart(),this._adapter.flags.isPaused&&this._adapter.chronos.pause.reset()):this.fireInit(),this._adsAdapter&&(this._adsAdapter.chronos.viewedMax=[]);var e=t.data.params||{};e.adNumber=this.requestBuilder.getNewAdNumber();var i=(this.getAdResource()||this.getAdTitle())&&typeof this.getAdDuration()=="number";i?(this.adStartSent=!0,this._adsAdapter.fireManifest(),this._adsAdapter.fireBreakStart(),e.adNumberInBreak=this.requestBuilder.getNewAdNumberInBreak(),this._sendAdEventIfAllowed(ke.WillSendEvent.WILL_SEND_AD_START,ke.Service.AD_START,e)):(this.adInitSent=!0,e.adNumberInBreak=this.requestBuilder.getNewAdNumberInBreak(),this._sendAdEventIfAllowed(ke.WillSendEvent.WILL_SEND_AD_INIT,ke.Service.AD_INIT,e));},_adJoinListener:function(t){var e={};g3.assign(e,t.data.params||{}),this.adInitSent&&!this.adStartSent&&(this._adsAdapter.fireManifest(),this._adsAdapter.fireBreakStart(),this._sendAdEventIfAllowed(ke.WillSendEvent.WILL_SEND_AD_START,ke.Service.AD_START,e)),this._adsAdapter.startChronoView(),this.adConnected&&(this._adsAdapter.chronos.join.startTime=this.adConnectedTime,this._adsAdapter.chronos.total.startTime=this.adConnectedTime,this.adConnectedTime=0,this.adConnected=!1),e=t.data.params||{},this._sendAdEventIfAllowed(ke.WillSendEvent.WILL_SEND_AD_JOIN,ke.Service.AD_JOIN,e),this.adInitSent=!1,this.adStartSent=!1;},_adPauseListener:function(t){var e=t.data.params||{};this._adsAdapter.stopChronoView(),this._sendAdEventIfAllowed(ke.WillSendEvent.WILL_SEND_AD_PAUSE,ke.Service.AD_PAUSE,e);},_adResumeListener:function(t){var e=t.data.params||{};this._adsAdapter.startChronoView(),this._sendAdEventIfAllowed(ke.WillSendEvent.WILL_SEND_AD_RESUME,ke.Service.AD_RESUME,e);},_adBufferBeginListener:function(t){Tm.notice("Ad Buffer Begin"),this._adsAdapter.stopChronoView(),this._adsAdapter&&this._adsAdapter.flags.isPaused&&this._adsAdapter.chronos.pause.reset();},_adBufferEndListener:function(t){var e=t.data.params||{};this._adsAdapter.startChronoView(),this._sendAdEventIfAllowed(ke.WillSendEvent.WILL_SEND_AD_BUFFER,ke.Service.AD_BUFFER,e);},_adStopListener:function(t){this._adsAdapter.stopChronoView(),this._adsAdapter.flags.reset(),this._totalPrerollsTime=(this._totalPrerollsTime||0)+this._adsAdapter.chronos.total.getDeltaTime();var e=t.data.params||{};if(e.position=this.requestBuilder.lastSent.position,this._sendAdEventIfAllowed(ke.WillSendEvent.WILL_SEND_AD_STOP,ke.Service.AD_STOP,e),this.requestBuilder.lastSent.position===ke.AdPosition.Postroll){var i=this.options["ad.expectedPattern"];this.playedPostrolls++,(this.requestBuilder.lastSent.givenAds&&this.requestBuilder.lastSent.givenAds<=this.playedPostrolls||!this.requestBuilder.lastSent.givenAds&&i&&i.post&&i.post[0]&&i.post[0]<=this.playedPostrolls)&&this.fireStop();}this.adConnected=!0,this.adConnectedTime=new Date().getTime();},_adErrorListener:function(t){var e=t.data.params||{};if(this._adapter&&!this._adapter.flags.isStarted&&!this.isInitiated)return this._savedAdError=t,null;if(this._blockAdError(t.data.params))return null;this._adsAdapter&&(this._adsAdapter.fireManifest(),this._adsAdapter.fireBreakStart()),(!this._adsAdapter||!this._adsAdapter.flags.isStarted)&&(e.adNumber=this.requestBuilder.getNewAdNumber(),e.adNumberInBreak=this.requestBuilder.getNewAdNumberInBreak()),this.isBreakStarted||(e.breakNumber=this.requestBuilder.getNewBreakNumber()),this._sendAdEventIfAllowed(ke.WillSendEvent.WILL_SEND_AD_ERROR,ke.Service.AD_ERROR,e);},_adSavedError:function(){this._savedAdError&&(this._adErrorListener(this._savedAdError),this._savedAdError=null);},_adSavedManifest:function(){this._savedAdManifest&&(this._adManifestListener(this._savedAdManifest),this._savedAdManifest=null);},_blockAdError:function(t){var e=Date.now(),i=this._lastAdErrorParam
220s&&this._lastAdErrorParams.errorCode===t.errorCode&&this._lastAdErrorParams.msg===t.msg&&this._lastAdErrorParams.adCreativeId===this.getAdCreativeId();return i&&this._lastAdErrorTime+5e3>e?(this._lastAdErrorTime=e,!0):(this._lastAdErrorTime=e,this._lastAdErrorParams=t,!1);},_adClickListener:function(t){var e=t.data.params||{};this._adsAdapter.stopChronoView(),this._sendAdEventIfAllowed(ke.WillSendEvent.WILL_SEND_AD_CLICK,ke.Service.AD_CLICK,e);},_adManifestListener:function(t){if(!this.isAdsManifestSent){if(this._adapter&&!this._adapter.flags.isStarted&&!this.isInitiated)return this._savedAdManifest=t,null;var e=t.data.params||{};this.isAdsManifestSent=!0,this._sendAdEventIfAllowed(ke.WillSendEvent.WILL_SEND_AD_MANIFEST,ke.Service.AD_MANIFEST,e);}},_adBreakStartListener:function(t){if(!this.isBreakStarted){this.isBreakStarted=!0,this._adapter&&this._adapter.firePause();var e=t.data.params||{};e.breakNumber=this.requestBuilder.getNewBreakNumber(),this._sendAdEventIfAllowed(ke.WillSendEvent.WILL_SEND_AD_POD_START,ke.Service.AD_POD_START,e),this.adConnected=!1;}},_adBreakStopListener:function(t){if(this.isBreakStarted){this.isBreakStarted=!1;var e=t.data.params||{};e.position=this.requestBuilder.lastSent.position,this._sendAdEventIfAllowed(ke.WillSendEvent.WILL_SEND_AD_POD_STOP,ke.Service.AD_POD_STOP,e),this.adConnected=!1,this._adapter&&this._adapter.fireResume();}},_adQuartileListener:function(t){var e=t.data.params||{};e.quartile&&this._sendAdEventIfAllowed(ke.WillSendEvent.WILL_SEND_AD_QUARTILE,ke.Service.AD_QUARTILE,e);},_sendAdEventIfAllowed:function(t,e,i){this.options["ad.ignore"]||this._send(t,e,i),Tm.notice(e);}};r1.exports=v3;});var o1=q((zF,a1)=>{"use strict";var Ro=Ne(),Sm=xt(),Js=Ti(),_3={getAdPlayerVersion:function(){return this._safeGetterAdsAdapter("getPlayerVersion")||"";},getAdPosition:function(){var t=Js.AdPosition.Preroll;if(this._adsAdapter)try{var e=this._adsAdapter.getPosition();(Js.AdPosition.Preroll===e||Js.AdPosition.Midroll===e||Js.AdPosition.Postroll===e)&&(t=e);}catch(i){Ro.warn("An error occured while calling getAdPosition",i);}return!t&&this._adapter&&(t=this._adapter.flags.isJoined?Js.AdPosition.Midroll:Js.AdPosition.Preroll),t;},getAdNumber:function(){return this.requestBuilder.lastSent.adNumber||0;},getAdNumberInBreak:function(){return this.requestBuilder.lastSent.adNumberInBreak||0;},getBreakNumber:function(){return this.requestBuilder.lastSent.breakNumber||0;},getAdPlayhead:function(){var t=this._safeGetterAdsAdapter("getPlayhead");return Sm.parseNumber(t,0);},getAdDuration:function(){var t=this._safeGetterAdsAdapter("getDuration","ad.duration");return Sm.parseNumber(t,0);},getAdBitrate:function(){var t=this._safeGetterAdsAdapter("getBitrate");return(!t||t===-1)&&(t=this.getWebkitAdBitrate()),Sm.parseNumber(t,-1);},getWebkitAdBitrate:function(){if(this._adsAdapter&&this._adsAdapter.tag&&this._adsAdapter.tag.webkitVideoDecodedByteCount){var t=this._adsAdapter.tag.webkitVideoDecodedByteCount;if(this._lastWebkitAdBitrate){var e=this._adsAdapter.tag.webkitVideoDecodedByteCount-this._lastWebkitAdBitrate;t=Math.round(e/this.viewTransform.response.pingTime*8);}return this._lastWebkitAdBitrate=this._adsAdapter.tag.webkitVideoDecodedByteCount,t!==0?t:-1;}},getAdTitle:function(){return this._safeGetterAdsAdapter("getTitle","ad.title");},getAdResource:function(){return this._safeGetterAdsAdapter("getResource","ad.resource");},getAdCampaign:function(){return this._safeGetterAdsAdapter("getCampaign","ad.campaign");},getAdCreativeId:function(){return this._safeGetterAdsAdapter("getCreativeId","ad.creativeId");},getAdProvider:function(){return this._safeGetterAdsAdapter("getProvider","ad.provider");},getAdAdapterVersion:function(){return this._safeGetterAdsAdapter("getVersion");},getAdMetadata:function(){return this.options["ad.metadata"];},getAdInsertionType:function(){return this._safeGetterAdsAdapter("getAdInsertionType");},getGivenBreaks:function(){return this._safeGetterAdsAdapter("getGivenBreaks","ad.givenBreaks");},getExpectedBreaks:function(){var t=null,e=this.options["ad.expectedBreaks"],i=this.options["ad.expectedPattern"];if(e)t=e;else if(i)t=0,t=i.pre?i.pre.length:0,t+=i.mid?i.mid.length:0,t+=i.post?i.post.length:0;else if(this._adsAdapter)try{t=this._adsAdapter.getExpectedBreaks();}catch(n){Ro.warn("An error occured while calling expectedBreaks",n);}return t;},getExpectedPattern:function(){return this._safeGetterAdsAdapter("getExpectedPattern","ad.expectedPattern");},getBreaksTime:function(){return this._safeGetterAdsAdapter("getBreaksTime","ad.breaksTime");},getGivenAds:function(){return this._safeGetterAdsAdapter("getGivenAds","ad.givenAds");},getExpectedAds:function(){var t=null;try{if(this._adsAdapter){var e=this.options["ad.expectedPattern"];if(e&&this.getAdPosition()){var i=[];if(e.pre&&(i=i.concat(e.pre)),e.mid&&(i=i.concat(e.mid)),e.post&&(i=i.concat(e.post)),i.length>0){var n=this.requestBuilder.lastSent.breakNumber;n>i.length&&(n=i.length),t=i[n-1];}}else t=this._adsAdapter.getExpectedAds();}}catch(r){Ro.warn("An error occured while calling expectedAds",r);}return t;},getAdsExpected:function(){var t=null;try{t=this.getExpectedPattern()||this.getGivenAds()||!1;}catch(e){Ro.warn("An error occured while calling givenAds or expectedPattern",e);}return t;},getAdJoinDuration:function(){return this._adsAdapter?this._adsAdapter.chronos.join.getDeltaTime(!1):-1;},getAdBufferDuration:function(){return this._adsAdapter?this._adsAdapter.chronos.buffer.getDeltaTime(!1):-1;},getAdPauseDuration:function(){return this._adsAdapter?this._adsAdapter.chronos.pause.getDeltaTime(!1):0;},getAdTotalDuration:function(){return this._adsAdapter?this._adsAdapter.chronos.total.getDeltaTime(!1):-1;},getAdViewedDuration:function(){return this._getTimeMaxOrAcum(!0);},getAdViewability:function(){return this._getTimeMaxOrAcum();},_getTimeMaxOrAcum:function(t){var e=0;return this._adsAdapter&&this._adsAdapter.chronos.viewedMax.forEac
220h(function(i){t?e+=i.getDeltaTime(!1):e=Math.max(i.getDeltaTime(!1),e);}),e;},getAudioEnabled:function(){return this._safeGetterAdsAdapter("getAudioEnabled");},getIsSkippable:function(){return this._safeGetterAdsAdapter("getIsSkippable");},getIsFullscreen:function(){return this._safeGetterAdsAdapter("getIsFullscreen");},_safeGetterAdsAdapter:function(t,e){var i=null;if(e&&this.options[e])i=this.options[e];else try{this._adsAdapter&&typeof this._adsAdapter[t]=="function"&&(i=this._adsAdapter[t]());}catch(n){Ro.warn("An error occured while calling "+t,n);}return i;}};a1.exports=_3;});var u1=q((GF,l1)=>{"use strict";var y3=Ne(),Am=Ti(),b3={_startPings:function(){this._ping.isRunning||this._ping.start();},_stopPings:function(){this._ping.stop();},_sendPing:function(t){var e={diffTime:t,entities:this.requestBuilder.getChangedEntities()};this._adapter&&(this._adapter.flags.isPaused?e=this.requestBuilder.fetchParams(e,["pauseDuration"]):e=this.requestBuilder.fetchParams(e,["bitrate","throughput","fps"]),this._adapter.flags.isJoined&&(e=this.requestBuilder.fetchParams(e,["playhead"])),this._adapter.flags.isBuffering&&(e=this.requestBuilder.fetchParams(e,["bufferDuration"])),this._adapter.flags.isSeeking&&(e=this.requestBuilder.fetchParams(e,["seekDuration"]))),this._adsAdapter&&!this.options["ad.ignore"]&&(this._adsAdapter.flags.isStarted&&(e=this.requestBuilder.fetchParams(e,["adPlayhead","adViewedDuration","adViewability"]),this._adsAdapter.flags.isPaused?e=this.requestBuilder.fetchParams(e,["adPauseDuration"]):e=this.requestBuilder.fetchParams(e,["adBitrate"])),this._adsAdapter.flags.isBuffering&&(e=this.requestBuilder.fetchParams(e,["adBufferDuration"]))),this._send(Am.WillSendEvent.WILL_SEND_PING,Am.Service.PING,e),this.startDelayed&&this._retryStart(),y3.verbose(Am.Service.PING);}};l1.exports=b3;});var c1=q((WF,d1)=>{"use strict";var Oo=Ne(),T3=xt(),Ai=Ti(),S3=Cn(),A3={fireInit:function(t,e){this.isInitiated||(!this.getAdapter()||this.getAdapter()&&!this.getAdapter().flags.isStarted)&&(this.viewTransform.nextView(),this._initComm(),this._startPings(),this.initChrono.start(),this.isInitiated=!0,t=t||{},e&&(t.triggeredEvents=[e]),this.options&&this.options["session.splitViews"]&&(t.viewIndex=this.plugin.viewTransform._viewIndex),this._send(Ai.WillSendEvent.WILL_SEND_INIT,Ai.Service.INIT,t),this._adSavedError(),this._adSavedManifest(),Oo.notice(Ai.Service.INIT+" "+(t.title||t.mediaResource)));},fireError:function(t,e,i,n){this.fireInit();var r=T3.buildErrorParams(t,e,i,n);r.code&&delete r.code,this._send(Ai.WillSendEvent.WILL_SEND_ERROR,Ai.Service.ERROR,r),this._adSavedError(),this._adSavedManifest(),Oo.notice(Ai.Service.ERROR+" "+r.errorLevel+" "+r.errorCode),r.errorLevel==="fatal"&&this.fireStop();},fireFatalError:function(t,e,i,n){this.fireError(t,e,i,n),this.fireStop();},fireStop:function(t){if(this.isInitiated||this.isStarted){this._adapter&&(this._adapter.flags.isStopped=!0,this._adapter.monitor&&this._adapter.monitor.stop()),this._adsAdapter&&this.isBreakStarted&&(this._adsAdapter.fireStop(),this._adsAdapter.fireBreakStop()),t=t||{},this._send(Ai.WillSendEvent.WILL_SEND_STOP,Ai.Service.STOP,t);var e=this._adapter?this._adapter.chronos:null;e&&(e.total.stop(),e.join.reset(),e.pause.reset(),e.buffer.reset(),e.seek.reset()),Oo.notice(Ai.Service.STOP+" at "+t.playhead+"s"),this._reset();}},fireOfflineEvents:function(t){this.options&&!this.options.offline?!this.isInitiated&&(!this._adapter||!this._adapter.flags.isStarted)&&(!this._adsAdapter||!this._adsAdapter.flags.isStarted)?(this._offlineParams=t,this.viewTransform.response.code&&this.viewTransform.response.host?this._generateAndSendOffline():(this.offlineReference=this._generateAndSendOffline.bind(this),this.viewTransform.on(S3.Event.DONE,this.offlineReference))):Oo.error("Adapters have to be stopped"):Oo.error("To send offline events, offline option must be disabled");},_generateAndSendOffline:function(){if(this.options.disableStorage)return null;var t=this._offlineParams;for(this._initComm();;){var e=this.requestBuilder.buildBody(Ai.Service.OFFLINE_EVENTS).viewJson;if(e[0]===null)break;var i=this.viewTransform.nextView(),n=e[0].replace(/CODE_PLACEHOLDER/g,i.toString()).replace(/,"sessionId":"SESSION_PLACEHOLDER"/g,"").replace(/,"sessionRoot":"ROOT_PLACEHOLDER"/g,"");this._send(Ai.WillSendEvent.WILL_SEND_OFFLINE_EVENTS,Ai.Service.OFFLINE_EVENTS,t,n,"POST",function(r,s){this.offlineStorage.removeView(s.offlineId);}.bind(this),{offlineId:e[1]});}this.offlineStorage.sent(),this._offlineParams=null;}};d1.exports=A3;});var f1=q((YF,h1)=>{"use strict";var Mt=Ti(),No=Ne(),E3=ji(),x3=xt(),ic=ec(),C3={_initInfinity:function(){this.infinity.on(ic.Event.NAV,this._navListener.bind(this)),this.infinity.on(ic.Event.SESSION_START,this._sessionStartListener.bind(this)),this.infinity.on(ic.Event.SESSION_STOP,this._sessionStopListener.bind(this)),this.infinity.on(ic.Event.EVENT,this._eventListener.bind(this));}
220,_sendInfinity:function(t,e,i){i=this.requestBuilder.buildParams(i,e);var n={params:i,plugin:this,adapter:this.getAdapter(),adsAdapter:this.getAdsAdapter()};if(this.emit(t,n),this.infinity._comm&&i!==null&&this.options.enabled){this.lastServeiceSent=e;var r=new E3(null,e,i);this.isMethodPostEnabled()&&r.setPostRequest(!0),this.infinity._comm.sendRequest(r);}},_navListener:function(t){var e=t.data.params||{};this._sendInfinity(Mt.WillSendEvent.WILL_SEND_NAV,Mt.Service.NAV,e),this._beat.isRunning||this._beat.start(),No.notice(Mt.Service.NAV+" "+e.route);},_sessionStartListener:function(t){var e=t.data.params||{};this._sendInfinity(Mt.WillSendEvent.WILL_SEND_SESSION_START,Mt.Service.SESSION_START,e),this._beat.isRunning||this._beat.start(),No.notice(Mt.Service.SESSION_START+" "+e.route);},_sessionStopListener:function(t){var e=t.data.params||{};this._sendInfinity(Mt.WillSendEvent.WILL_SEND_SESSION_STOP,Mt.Service.SESSION_STOP,e),this._beat.isRunning&&this._beat.stop(),No.notice(Mt.Service.SESSION_STOP+" "+e.route);},_eventListener:function(t){var e=t.data.params||{};this._sendInfinity(Mt.WillSendEvent.WILL_SEND_EVENT,Mt.Service.EVENT,e),No.notice(Mt.Service.EVENT+" "+e.name);},_sendBeat:function(t){var e={diffTime:t};this._sendInfinity(Mt.WillSendEvent.WILL_SEND_BEAT,Mt.Service.BEAT,e),this.infinity&&this.infinity._setLastActive(),No.verbose(Mt.Service.BEAT);},getSessionMetrics:function(){return x3.getMetricsFrom(this.options["session.metrics"]);}};h1.exports=C3;});var m1=q((XF,p1)=>{"use strict";var w3=xt(),D3={getContext:function(){return"Default";},getScrollDepth:function(){var t=this.storage.getSession("pageScrollDepth");return this.storage.removeSession("pageScrollDepth"),t;},getSession:function(){var t=this.storage.getStorages("session");if(t==="undefined"&&(t=void 0),!t){var e=this.getStoredData();if(e)try{t=JSON.parse(e).q.c;}catch{}}return t;},getStorageHost:function(){var t=null,e=this.getStoredData();if(e)try{t=JSON.parse(e).q.h;}catch{}return t&&w3.addProtocol(t,this.options["app.https"]);},getStoredData:function(){return this.storage.getStorages("data");},getDataTime:function(){return this.storage.getStorages("dataTime");},getLastActive:function(){return this.storage.getStorages("lastactive");},setStoredData:function(t){this.storage.setStorages("data",t);},setSession:function(t){this.storage.setStorages("session",t);},setDataTime:function(t){this.storage.setStorages("dataTime",t);},setLastActive:function(t){this.storage.setStorages("lastactive",t);},getPageName:function(){if(typeof document<"u"&&document.title)return document.title;},getPageLoadTime:function(){return this.browserLoadTimes.getPageLoadTime();},getIsSessionExpired:function(){var t=new Date().getTime();return!this.getSession()||this.infinity.getFirstActive()<t-this.sessionExpire;},getIsDataExpired:function(){var t=new Date().getTime();return!this.storage.isEnabled()||!this.getStoredData()||this.infinity.getFirstActive()<t-this.sessionExpire;}};p1.exports=D3;});var T1=q((KF,b1)=>{"use strict";var I3=rn(),Em=Gd(),k3=jr(),g1=Ti(),Dn=xt(),P3=ji(),L3=Yd(),R3=rE(),v1=Vp(),_1=nm(),O3=rm(),N3=lm(),y1=Zd(),j3=oE(),M3=cm(),B3=ec(),F3=yE(),U3=Bp(),V3=EE(),q3=hm(),H3=fm(),$3=DE(),z3=pm(),an=I3.extend({constructor:function(t,e,i){typeof e=="string"&&!i&&(i=e,e=null),this.storage=new y1(),this.uuidGenerator=new z3(this),this.infinity=new B3(this),this.productAnalytics=new F3(this),this.isInitiated=!1,this.isAdsManifestSent=!1,this.playedPostrolls=0,this.isBreakStarted=!1,this.initChrono=new k3(),this.options=new N3(t),this.storage=new y1(null,this.options.disableCookies,this.options.forceCookies,this.options.disableStorage),this.options.disableStorage||(this.offlineStorage=new j3()),this._adapter=null,this._adsAdapter=null,this._ping=new Em(this._sendPing.bind(this),5e3),this._beat=new Em(this._sendBeat.bind(this),3e4),this._refreshData=new Em(this._checkOldData.bind(this),36e5),this._refreshData.start(),this.sessionExpire=Number(this.storage.getLocal("sessionExpire"))*1e3||18e4,this.requestBuilder=new M3(this),this.resourceTransform=new _1(this),this.lastEventTime=null,this.restartViewTransform(i),this._initInfinity(),this.hybridNetwork=new U3(),this.browserLoadTimes=new V3(this),this.deviceDetector=new H3(),this.backgroundDetector=new q3(this),this.resizeScrollDetector=new $3(this),this.options["background.enabled"]&&this.backgroundDetector.startDetection(),e&&this.setAdapter(e);},_checkOldData:function(){this._adapter&&this._adapter.flags.isStarted||this.infinity.infinityStarted||this.restartViewTransform();},restartViewTransform:function(t){if(this.viewTransform=new v1(this),this.viewTransform.on(v1.Event.DONE,this._receiveData.bind(this)),t){this.viewTransform.setData(t);return;}this.getIsDataExpired()||!this.getStorageHost()||this.storage.getLocal("accCode")!==this.options.accountCode&&this.storage.getSession("accCode")!==this.options.accountCode?(this.storage.removeStorages("data"),this.storage.removeStorages("session"),this.storage.removeLocal("infinityStarted"),this.viewTransform.init(
220)):this.viewTransform.setData(this.getStoredData());},_receiveData:function(t){this._ping.interval=t.target.response.pingTime*1e3,this._beat.interval=t.target.response.beatTime*1e3,this.sessionExpire=t.target.response.sessionExpire*1e3,this.storage.setStorages("data",t.target.response.msg),this.storage.setStorages("dataTime",new Date().getTime()),this.storage.setStorages("accCode",this.options.accountCode),this.getIsSessionExpired()?(this.viewTransform.setSession(this.viewTransform.response.code),this.storage.setStorages("session",this.viewTransform.response.code),this.storage.setStorages("host",this.viewTransform.response.host)):(this.viewTransform.setSession(this.getSession()),this.viewTransform.setHost(this.getStorageHost()));},_reset:function(){this._stopPings(),this.resourceTransform=new _1(this),this._adapter&&this._adapter.flags.reset(),this.isInitiated=!1,this.isStarted=!1,this.startDelayed=!1,this.isAdsManifestSent=!1,this.initChrono.reset(),this._totalPrerollsTime=0,this.requestBuilder.lastSent.breakNumber=0,this.requestBuilder.lastSent.adNumber=0,this._savedAdManifest=null,this._savedAdError=null,this.playedPostrolls=0,this.isBreakStarted=!1;},_send:function(t,e,i,n,r,s,a){var o=new Date().getTime();this.options.preventZombieViews&&this.lastEventTime&&o>this.lastEventTime+600*1e3&&this.viewTransform.nextView(),this.lastEventTime=e===g1.Service.STOP?null:o,i=this.requestBuilder.buildParams(i,e),this.getIsLive()&&(i.mediaDuration=this.options["content.duration"],i.playhead=void 0);var u={params:i,plugin:this,adapter:this.getAdapter(),adsAdapter:this.getAdsAdapter()};if(this.emit(t,u),this._comm&&(i!==null||typeof r<"u")&&this.options.enabled){this.lastServeiceSent=e;var c={};typeof r<"u"&&r!=="GET"&&(c.method=r);var p=new P3(null,e,i,c);n&&p.setBody(n),this.isMethodPostEnabled()&&p.setPostRequest(!0),this._comm.sendRequest(p,s,a);}},_initComm:function(){var t=this._getResourceForTransform();this.resourceTransform.init(t),this._comm=new L3(),this._comm.addTransform(new R3()),this._comm.addTransform(this.viewTransform),this.options&&this.options.offline?this._comm.addTransform(new O3(this)):this._comm.addTransform(this.resourceTransform);},_getResourceForTransform:function(){var t=this.getResource();return this._adapter&&this._adapter.getURLToParse()&&(t=this._adapter.getURLToParse()),t;},getComm:function(){return this._comm;},setOptions:function(t){t&&(this.options.setOptions(t),typeof t["background.enabled"]=="boolean"&&(t["background.enabled"]?this.backgroundDetector.startDetection():this.backgroundDetector.stopDetection()));},getFastDataConfig:function(){return this.viewTransform.response.msg;},disable:function(){this.setOptions({enabled:!1});},enable:function(){this.setOptions({enabled:!0});}},{Event:g1.WillSendEvent});Dn.assign(an.prototype,YE());Dn.assign(an.prototype,QE());Dn.assign(an.prototype,n1());Dn.assign(an.prototype,s1());Dn.assign(an.prototype,o1());Dn.assign(an.prototype,u1());Dn.assign(an.prototype,c1());Dn.assign(an.prototype,f1());Dn.assign(an.prototype,m1());b1.exports=an;});var Bt=q((QF,S1)=>{"use strict";var G3=me,me={};me.noConflict=function(){return me=G3,this;};me.VERSION=xo();me.polyfills=LS();me.polyfills();me.Object=Ue();me.Emitter=rn();me.Log=Ne();me.Log.loadLevelFromUrl();me.Util=xt();me.HybridNetwork=Bp();me.Chrono=jr();me.Timer=Gd();me.Constants=Ti();me.Request=ji();me.Communication=Yd();me.Transform=Cn();me.ViewTransform=Vp();me.ResourceTransform=nm();me.CdnParser=Gp();me.HlsParser=$p();me.DashParser=Jp();me.OfflineParser=rm();me.LocationheaderParser=em();me.Options=lm();me.Plugin=T1();me.Storage=Zd();me.RequestBuilder=cm();me.PlayheadMonitor=mm();me.Adapter=tc();me.adapters={};me.Infinity=ec();me.BackgroundDetector=hm();me.DeviceDetector=fm();me.UUIDGenerator=pm();me.registerAdapter=function(t,e){this.adapters[t]=e;}.bind(me);me.unregisterAdapter=function(t){this.adapters[t]=null;}.bind(me);S1.exports=me;});var jo=q((JF,W3)=>{W3.exports={name:"videojs",type:"adapter",tech:"js",author:"NPAW",version:"6.8.18",built:"2024-04-09",repo:"https://bitbucket.org/npaw/videojs-adapter-js.git",libVersion:"^6.8.54",features:{buffer:"native",seek:"native",error:!0,stop:!0,pause:!0,resume:!0,getters:["getPlayhead","getPlayrate","getDuration","getBitrate","getRendition","getTitle","getIsLive","getResource","getPlayerVersion"]},ads:[{buffer:"monitor",seek:"monitor",error:!0,stop:!0,pause:!0,resume:!0,getters:["getPlayhead","getDuration","getTitle","getResource","getPosition","getGivenBreaks","getBreaksTime","getGivenAds","getIsVisible","getAudioEnabled","getIsSkippable","getIsFullscreen","getCreativeId"],filename:"bcove-freewheel.js"},{buffer:"monitor",seek:"monitor",error:!0,stop:!0,pause:!0,resume:!0,getters:["getPlayhead","getDuration","getBitrate","getTitle","getResource","getPlayerVersion","getPosition","getGivenBreaks","getBreaksTime","getGivenAds","getIsVisible","getAudioEnabled","getIsSkippable","getIsFullscreen","getCreativeId"],filename:"bcove-ima.js"},{buffer:"monitor",seek:"monitor",error:!1,stop:!1,pause:!1,resume:!1,getters:[],filename:"freewheel.js"},{buffer:"monitor",seek:"monitor",error:!0,stop:!0,pause:!1,resume:!1,getters:[],filename:"generic.js"},{buffer:"monitor",seek:"monitor",error:!0,stop:!0,pause:!0,resume:!0,getters:["getPlayhead","getDuration","getTitle","getIsLive","getResource","getPlayerVersion","getPosition","getGivenBreaks","getBreaksTime","getGivenAds","getIsVisible","getAudioEnabled","getIsSkippable","getIsFullscreen"],filename:"ima.js"},{buffer:"monitor",seek:"monitor",error:!0,stop:!0,pause:!0,resume:!0,getters:["getPlayhead","getDuration","getResource","getPosition"],filename:"onceux.js"}]};});var E1=q((ZF,A1)=>{"use strict";var Y3=Bt(),X3=jo(),K3=Y3.Adapter.extend({isGeneric:!0,getVersion:function(){return X3.version+"-videojs-ads";},registerListeners:function(){if(this.references={adstart:this.adStartListener.bind(this),adend:this.adEndListener.bind(this),adskip:this.adSkipListener.bind(this),adserror:this.errorListener.bind(this),"ads-cl
220ick":this.clickListener.bind(this)},this.player)for(var t in this.references)this.player.on(t,this.references[t]);},unregisterListeners:function(){if(this.player&&this.references){for(var t in this.references)this.player.off(t,this.references[t]);delete this.references;}},adStartListener:function(t){this.fireStart(),this.fireJoin();},adEndListener:function(t){this.fireStop();},adSkipListener:function(t){this.fireSkip();},errorListener:function(t){this.fireError();},clickListener:function(t){this.fireClick();}});A1.exports=K3;});var C1=q((eU,x1)=>{"use strict";var Ei=Bt(),Q3=Ei.Adapter.extend({getVersion:function(){var t=null;return typeof google<"u"&&google.ima&&(t="bcove-ima "+google.ima.VERSION),t;},getPlayhead:function(){var t=this.plugin.getAdapter().player;return this.player.ima3&&this.player.ima3&&this.player.ima3.adPlayer&&(t=this.player.ima3.adPlayer),t.currentTime();},getDuration:function(){var t=null;if(this.player.ads&&this.player.ads.ad&&this.player.ads.ad.duration)t=this.player.ads.ad.duration;else{var e=this.plugin.player;this.player.ima3&&(e=this.player.ima3.adPlayer),t=e&&e.duration?e.duration():null;}return t;},getPosition:function(){var t=Ei.Constants.AdPosition.Midroll;if(this.player.ads&&this.player.ads.ad)switch(this.player.ads.ad.type){case"PREROLL":t=Ei.Constants.AdPosition.Preroll;break;case"MIDROLL":t=Ei.Constants.AdPosition.Midroll;break;case"POSTROLL":t=Ei.Constants.AdPosition.Postroll;break;}else this.plugin._adapter.getPlayhead()>=this.plugin._adapter.getDuration()&&(t=Ei.Constants.AdPosition.Postroll);return this.plugin._adapter.flags.isJoined||(t=Ei.Constants.AdPosition.Preroll),t;},getResource:function(){var t="unknown";return this.player.ima3&&(t=this.player.ima3.currentAd.getMediaUrl()),t;},getTitle:function(){var t=null;return this.player.ima3&&this.player.ima3.currentAd&&(t=this.player.ima3.currentAd.getTitle()),t;},getPlayerVersion:function(){var t=null;return this.player.ima3&&(t=this.player.ima3.VERSION),t;},getGivenBreaks:function(){var t=null;return this.player.ima3&&(t=this.player.ima3.adsManager.getCuePoints().length),t;},getBreaksTime:function(){var t=null;if(this.player.ima3){var e=this.player.ima3.adsManager.getCuePoints();for(var i in e)(!e[i]&&e[i]!==0||e[i]===-1)&&(e[i]=this.plugin._adapter.getDuration());t=e;}return t;},getGivenAds:function(){var t=null;return this.player.ima3&&this.player.ima3.currentAd&&this.player.ima3.currentAd.getAdPodInfo()&&(t=this.player.ima3.currentAd.getAdPodInfo().getTotalAds()),t;},getAudioEnabled:function(){var t=null;return this.player.muted()?t=!1:t=!!this.player.volume(),t;},getIsSkippable:function(){var t=!1;return this.player.ima3&&(t=this.player.ima3.currentAd&&this.player.ima3.currentAd.isSkippable()),t;},getIsFullscreen:function(){var t=null;if(this.plugin.deviceDetector.isIphone())t=!this.plugin.deviceDetector.isInBackground;else{var e=null;this.player.ima3&&(e=this.player.ima3.el),t=e?window.innerHeight<=e.clientHeight+30&&window.innerWidth<=e.clientWidth+30:!1;}return t;},getIsVisible:function(){var t=null;return this.plugin.deviceDetector.isIphone()?t=!this.plugin.deviceDetector.isInBackground:this.player.ima3&&(t=Ei.Util.calculateAdViewability(this.player.ima3.el)),t;},getBitrate:function(){var t=-1;return this.player.ima3&&this.player.ima3.currentAd&&this.player.ima3.currentAd.getVastMediaBitrate()&&(t=this.player.ima3.currentAd.getVastMediaBitrate()),t;},getCreativeId:function(){var t=null;return this.player.ima3&&this.player.ima3.currentAd?t=this.player.ima3.currentAd.getCreativeAdId()||this.player.ima3.currentAd.getCreativeId():this.titles&&(t=this.titles[(this.plugin.requestBuilder.lastSent.adNumber||1)-1]._creativeId),t;},registerListeners:function(){if(this.monitorPlayhead(!0,!1),this.references={"ima3-started":this.startJoinListener.bind(this),"ima3-paused":this.pausedListener.bind(this),"ima3-resumed":this.resumedListener.bind(this),"ima3-complete":this.adEndedListener.bind(this),"ima3-skipped":this.skippedListener.bind(this),"ima3-ad-error":this.errorListener.bind(this),"ads-pod-ended":this.podEndListener.bind(this),"ads-cl
220ick":this.clickListener.bind(this),"ads-first-quartile":this.firstQuartileListener.bind(this),"ads-midpoint":this.secondQuartileListener.bind(this),"ads-third-quartile":this.thirdQuartileListener.bind(this)},this.player)for(var t in this.references)this.player.on(t,this.references[t]);},startJoinListener:function(t){this.plugin._adapter&&this.plugin._adapter.firePause(),this.fireStart(),this.fireJoin();},pausedListener:function(t){this.firePause();},resumedListener:function(t){this.fireResume();},skippedListener:function(t){this.fireSkip(),this.plugin._adapter&&this.plugin._adapter.fireResume();},adEndedListener:function(t){var e=this.plugin.requestBuilder.lastSent.adPosition===Ei.Constants.AdPosition.Preroll?0:this.plugin._adapter.lastPlayhead;this.fireStop({playhead:e,adPlayhead:this.getDuration()});},errorListener:function(t){if(this.player.ima3)if(t.getError&&t.getError()){var e=t.getError();this.fireError(e.getCode(),e.getMessage());}else this.fireError();},clickListener:function(t){if(this.player.ima3){var e=null;this.player.ima3.currentAd&&this.player.ima3.currentAd.g&&(e=this.player.ima3.currentAd.g.clickThroughUrl),this.fireClick(e);}},firstQuartileListener:function(t){this.fireQuartile(1);},secondQuartileListener:function(t){this.fireQuartile(2);},thirdQuartileListener:function(t){this.fireQuartile(3);},podEndListener:function(t){this.fireBreakStop();},unregisterListeners:function(){if(this.monitor&&this.monitor.stop(),this.player&&this.references){for(var t in this.references)this.player.off(t,this.references[t]);delete this.references;}},adPlayerErrorListener:function(t){var e=t.data.AdError,i=[1012,1005,301,402,302],n=[1007,1009,303],r=[403,100,503,101,102];i.indexOf(e.getErrorCode())>=0?this.fireManifest(Ei.Constants.ManifestError.NO_RESPONSE,e.getMessage()):n.indexOf(e.getErrorCode())>=0?this.fireManifest(Ei.Constants.ManifestError.EMPTY,e.getMessage()):r.indexOf(e.getErrorCode())>=0?this.fireManifest(Ei.Constants.ManifestError.WRONG,e.getMessage()):this.fireError(e.getErrorCode(),e.getMessage());}},{isUsed:function(t){return typeof google<"u"&&t.player.ima3&&t.player.ads;}});x1.exports=Q3;});var D1=q((tU,w1)=>{"use strict";var xi=Bt(),J3=xi.Adapter.extend({getVersion:function(){var t="unknown";return this.player.FreeWheelPlugin.getVersion?t="bcove-fw "+this.player.FreeWheelPlugin.getVersion():this.player.FreeWheelPlugin.VERSION&&(t="bcove-ssai "+this.player.FreeWheelPlugin.VERSION),t;},getDuration:function(){var t=null;if(this.player.ads&&this.player.ads.ad&&this.player.ads.ad.duration)t=this.player.ads.ad.duration;else{var e=this.plugin.player;if(this.player.FreeWheelPlugin){var i=this.player.FreeWheelPlugin.tech;this.player.FreeWheelPlugin[i].adPlayer&&(e=this.player.FreeWheelPlugin[i].adPlayer);}e&&e.duration&&(t=e.duration());}return t;},getPosition:function(){var t=xi.Constants.AdPosition.Midroll;if(this.player.ads&&this.player.ads.ad)switch(this.player.ads.ad.type){case"PREROLL":t=xi.Constants.AdPosition.Preroll;break;case"MIDROLL":t=xi.Constants.AdPosition.Midroll;break;case"POSTROLL":t=xi.Constants.AdPosition.Postroll;break;}else this.plugin._adapter.flags.isJoined?this.plugin._adapter.getPlayhead()>=this.plugin._adapter.getDuration()&&(t=xi.Constants.AdPosition.Postroll):t=xi.Constants.AdPosition.Preroll;return t;},getResource:function(){var t=null;if(this.slot){var e=this.slot.getAdInstances();if(e){var i=(this.plugin.requestBuilder.lastSent.adNumber||1)-1;if(e[i]&&e[i].getActiveCreativeRendition){var n=e[i].getActiveCreativeRendition();if(n&&n.getPrimaryCreativeRenditionAsset){var r=n.getPrimaryCreativeRenditionAsset();r&&r.getUrl&&r.getUrl()&&(t=r.getUrl());}n&&n.getWrapperUrl&&!t&&(t=n.getWrapperUrl());}}}return t||"unknown";},getTitle:function(){var t=null;return this.player.FreeWheelPlugin.adsManager&&this.player.FreeWheelPlugin.adsManager.getCurrentAd()&&this.player.FreeWheelPlugin.adsManager.getCurrentAd().getTitle()?t=this.player.FreeWheelPlugin.adsManager.getCurrentAd().getTitle():this.titles&&(t=this.titles[(this.plugin.requestBuilder.lastSent.adNumber||1)-1]._adId),t;},getPlayhead:function(){var t=this.plugin.getAdapter().player;return this.player.FreeWheelPlugin.adPlayer&&(t=this.player.FreeWheelPlugin.adPlayer),t.currentTime();},getGivenBreaks:function(){var t=this.player.FreeWheelPlugin.tech,e=this.player.FreeWheelPlugin[t]._adContext._adResponse.getTemporalSlots(),i=0;for(var n in e){var r=e[n];if(r.getAdCount()>0){var s=r.getAdInstances();for(var a in s)if(s[a]._creativeRenditions[0]._baseUnit==="video"){i++;break;}}}return i;},getBreaksTime:function(){var t=null,e=this.player.FreeWheelPlugin[this.player.FreeWheelPlugin.tech]._adContext._adResponse.getTemporalSlots(),i=[];for(var n in e){var r=e[n];if(r.getAdCount()>0){var s=r.getAdInstances();for(var a in s)if(s[a]._creativeRenditions[0]._baseUnit==="video"){this.plugin.getDuration()&&r.getTimePosition()>this.plugin.getDuration()?i.push(this.plugin.getDuration()):i.push(r.getTimePosition());break;}}}return t=i.sort(),t;},getGivenAds:function(){var t=this.player.FreeWheelPlugin.tech;return this.player.FreeWheelPlugin[t]._currentSlot.getAdCount();},getAudioEnabled:function(){var t=null;return this.player.muted()?t=!1:t=!!this.player.volume(),t;},getIsSkippable:function(){return!1;},getIsFullscreen:function(){var t=null;if(this.plugin.deviceDetector.isIphone())t=!this.plugin.deviceDetector.isInBackgroun
220d;else{var e=null,i=this.player.FreeWheelPlugin.tech;e=this.player.FreeWheelPlugin[i]._video,t=e?window.innerHeight<=e.clientHeight+30&&window.innerWidth<=e.clientWidth+30:!1;}return t;},getIsVisible:function(){var t=null;if(this.plugin.deviceDetector.isIphone())t=!this.plugin.deviceDetector.isInBackground;else{if(!this.contentPlayer){var e=this.player.FreeWheelPlugin.tech;for(var i in this.player.FreeWheelPlugin[e]){var n=this.player.FreeWheelPlugin[e][i];if(n.videoHeight&&n.clientHeight){this.contentPlayer=n;break;}}}t=xi.Util.calculateAdViewability(this.contentPlayer);}return t;},getCreativeId:function(){var t=null;return this.titles&&(t=this.titles[(this.plugin.requestBuilder.lastSent.adNumber||1)-1]._creativeId),t;},registerListeners:function(){if(this.monitorPlayhead(!0,!1),this.references={"ads-ad-started":this.startJoinListener.bind(this),"ads-pause":this.pausedListener.bind(this),"ads-play":this.resumedListener.bind(this),"ads-ad-ended":this.adEndedListener.bind(this),"ads-pod-ended":this.podEndListener.bind(this),"ads-first-quartile":this.firstQuartileListener.bind(this),"ads-midpoint":this.secondQuartileListener.bind(this),"ads-third-quartile":this.thirdQuartileListener.bind(this)},typeof tv<"u"){var t=this.player.FreeWheelPlugin[this.player.FreeWheelPlugin.tech]._adContext;this.events=tv.freewheel.SDK,this.fwreferences={},this.fwreferences[this.events.EVENT_AD]=this.logListener.bind(this),this.fwreferences[this.events.EVENT_SLOT_STARTED]=this.slotListener.bind(this),this.fwreferences[this.events.EVENT_ERROR]=this.errorFwListener.bind(this),this.manifestNoResponse=[this.events.ERROR_SECURITY,this.events.ERROR_TIMEOUT];for(var e in this.manifestNoResponse)this.fwreferences[e]=this.noResponseManifestListener.bind(this);this.manifestEmpty=[this.events.ERROR_NO_AD_AVAILABLE,this.events.ERROR_VAST_NO_AD];for(var i in this.manifestEmpty)this.fwreferences[i]=this.manifestEmptyListener.bind(this);this.manifestWrong=[this.events.ERROR_VAST_VERSION_NOT_SUPPORTED,this.events.ERROR_VAST_WRAPPER_LIMIT_REACH,this.events.ERROR_VAST_XML_PARSING,this.events.ERROR_PARSE];for(var n in this.manifestWrong)this.fwreferences[n]=this.manifestWrongListener.bind(this);if(this.player)for(var e in this.fwreferences)t.addEventListener(e,this.fwreferences[e]);}if(this.player)for(var e in this.references)this.player.on(e,this.references[e]);},logListener:function(t){if(t.errorCode||t.errorInfo||t.errorModule){this.errorFwListener(t);return;}switch(t.subType){case this.events.EVENT_AD_SKIPPED:this.skippedListener(t);break;case this.events.EVENT_SLOT_STARTED:this.slotListener(t);break;case this.events.EVENT_AD_CLICK:this.clickFwListener(t);break;}},skippedListener:function(t){this.fireSkip(),this.plugin._adapter&&this.plugin._adapter.fireResume();},noResponseManifestListener:function(t){this.fireManifest(xi.Constants.ManifestError.NO_RESPONSE,"No response");},manifestEmptyListener:function(t){this.fireManifest(xi.Constants.ManifestError.EMPTY,"Empty manifest");},manifestWrongListener:function(t){this.fireManifest(xi.Constants.ManifestError.WRONG,"Wrong manifest format");},slotListener:function(t){this.slot=t.slot,t&&t.slot&&t.slot.getAdInstances&&(this.titles=t.slot.getAdInstances());},startJoinListener:function(t){this.plugin._adapter&&this.plugin._adapter.firePause(),this.fireStart(),this.fireJoin();},pausedListener:function(t){this.firePause();},resumedListener:function(t){this.fireResume();},adEndedListener:function(t){var e=this.plugin.requestBuilder.lastSent.adPosition===xi.Constants.AdPosition.Preroll?0:this.plugin._adapter.lastPlayhead;this.fireStop({playhead:e,adPlayhead:this.getDuration()});},errorFwListener:function(t){this.fireError(t.errorCode||t.subType,t.errorInfo),this.fireStop();},clickFwListener:function(t){var e=t.adInstance.getEventCallbackUrls(this.events.EVENT_AD_CLICK,this.events.EVENT_TYPE_CLICK)[0];this.fireClick(e);},firstQuartileListener:function(t){this.fireQuartile(1);},secondQuartileListener:function(t){this.fireQuartile(2);},thirdQuartileListener:function(t){this.fireQuartile(3);},podEndListener:function(t){this.fireBreakStop();},unregisterListeners:function(){if(this.monitor&&this.monitor.stop(),this.player&&this.references){for(var t in this.references)this.player.off(t,this.references[t]);delete this.references;}}},{isUsed:function(t){return t.player.ads&&t.player.FreeWheelPlugin;}});w1.exports=J3;});var I1=q((iU,Z3)=>{Z3.exports={name:"freewheel",type:"adapter",tech:"js",author:"Nice People At Work",ver
220sion:"6.8.5",built:"2023-11-29",repo:"https://bitbucket.org/npaw/freewheel-adapter-js",libVersion:"^6.8.28",features:{buffer:"monitor",seek:"monitor",error:!0,stop:!0,pause:!0,resume:!0,getters:["getPlayhead","getDuration","getTitle","getResource","getPlayerVersion","getPosition","getGivenBreaks","getBreaksTime","getGivenAds","getIsVisible","getAudioEnabled","getCreativeId"]},ads:[]};});var P1=q((nU,k1)=>{"use strict";var ci=Bt(),xm=I1();ci.adapters.Freewheel=ci.Adapter.extend({getVersion:function(){return xm.version+"-"+xm.name+"-"+xm.tech;},getPlayhead:function(){return this._getAdInstanceMethodCall("getPlayheadTime");},getDuration:function(){return this._getAdInstanceMethodCall("getDuration");},getTitle:function(){try{if(this.titles)return this.titles[this._getAdNumber()]._adId;}catch{}return"unknown";},getResource:function(){var t=null,e=this._getAdInstanceMethodCall("getActiveCreativeRendition");if(e)if(typeof e.getPrimaryCreativeRenditionAsset=="function"){let i=e.getPrimaryCreativeRenditionAsset();i&&typeof i.getUrl=="function"&&(t=i.getUrl());}else typeof e.getWrapperUrl=="function"&&(t=e.getWrapperUrl());return t;},getPlayerVersion:function(){var t=null;return typeof tv<"u"&&tv.freewheel&&tv.freewheel.SDK&&(t=tv.freewheel.SDK.version),t;},getPlayerName:function(){return"Freewheel";},getPosition:function(){return this.position;},getIsVisible:function(){if(!this.contentPlayer)for(var t in this.player){var e=this.player[t];if(e&&e.videoHeight&&e.clientHeight){this.contentPlayer=e;break;}}return ci.Util.calculateAdViewability(this.contentPlayer);},getAudioEnabled:function(){for(var t in this.player){var e=this.player[t];if(e&&e.adManager&&e.adManager._context&&e.adManager._context.getAdVolume)return!!e.adManager._context.getAdVolume();}},getGivenAds:function(){return this.slot.getAdCount();},getBreaksTime:function(){var t=this.getSlots();if(!t)return null;var e=[];for(var i in t){var n=t[i];if(n.getAdCount()>0){var r=n.getAdInstances();for(var s in r)if(r[s]._creativeRenditions[0]._baseUnit==="video"){var a=this.plugin.getDuration(),o=n.getTimePosition();e.push(a&&o>a?a:o);break;}}}return e;},getGivenBreaks:function(){var t=this.getSlots();if(!t)return null;var e=0;for(var i in t){var n=t[i];if(n.getAdCount()>0){var r=n.getAdInstances();for(var s in r)if(r[s]._creativeRenditions[0]._baseUnit==="video"){e++;break;}}}return e;},getCreativeId:function(){var t=null;if(this.slot){var e=this.slot.getAdInstances(),i=this._getAdNumber();e&&e[i]&&(t=e[i]._creativeId);}return t;},getSlots:function(){if(this.player.currentAdContext)return this.player.currentAdContext._adResponse.getTemporalSlots();for(var t in this.player){var e=this.player[t];if(e&&e._adResponse&&e._adResponse.getTemporalSlots)return e;}return null;},_getAdNumber:function(){return(this.plugin.requestBuilder.lastSent.adNumber||1)-1;},_getAdInstanceMethodCall:function(t){var e=null;if(this.slot){var i=this.slot.getAdInstances(),n=this._getAdNumber();i&&i[n]&&typeof i[n][t]=="function"&&(e=i[n][t]());}return e;},registerListeners:function(){this.canRemoveListeners=!0,this.events=tv.freewheel.SDK,this.manifestNoResponse=[this.events.ERROR_SECURITY,this.events.ERROR_TIMEOUT],this.manifestEmpty=[this.events.ERROR_NO_AD_AVAILABLE,this.events.ERROR_VAST_NO_AD],this.manifestWrong=[this.events.ERROR_VAST_VERSION_NOT_SUPPORTED,this.events.ERROR_VAST_WRAPPER_LIMIT_REACH,this.events.ERROR_VAST_XML_PARSING,this.events.ERROR_PARSE],this.ignoredErrors=[this.events.ERROR_ADINSTANCE_UNAVAILABLE],this.references={},this.references[this.events.EVENT_AD]=this.logListener.bind(this),this.references[this.events.EVENT_ERROR]=this.errorListener.bind(this),this.references[this.events.EVENT_SLOT_STARTED]=this.slotListener.bind(this),this.references[this.events.EVENT_SLOT_ENDED]=this.closeListener.bind(this);for(var t in this.manifestNoResponse)this.references[t]=this.noResponseManifestListener.bind(this);for(var e in this.manifestEmpty)this.references[e]=this.manifestEmptyListener.bind(this);for(var i in this.manifestWrong)this.references[i]=this.manifestWrongListener.bind(this);for(var n in this.references)this.player.currentAdContext.addEventListener(n,this.references[n]);},unregisterListeners:function(){if(this.player&&this.references){for(var t in this.references)this.player.currentAdContext.removeEventListener(t,this.references[t]);this.references={};}},noResponseManifestListener:function(t){this.fireManifest(ci.Constants.ManifestError.NO_RESPONSE,"No response");},manifestEmptyListener:function(t){this.fireManifest(ci.Constants.ManifestError.EMPTY,"Empty manifest");},manifestWrongListener:function(t){this.fireManifest(ci.Constants.ManifestError.WRONG,"Wrong manifest format");},logListener:function(t){if(ci.Log.debug(t.subType),t.errorCode||t.errorInfo||t.errorModule){this.errorListener(t);return;}switch(t.subType){case this.events.EVENT_AD_PAUSE:this.pauseListener(t);break;case this.events.EVENT_AD_RESUME:this.resumeListener(t);break;case this.events.EVENT_AD_IMPRESSION_END:this.endedListener(t);break;case this.events.EVENT_AD_INITIATED:this.playListener(t);break;case this.events.EVENT_AD_IMPRESSION:this.playingListener(t);break;case this.events.EVENT_AD_SKIPPED:this.skipListener(t);break;case this.events.EVENT_SLOT_STARTED:this.slotListener(t);break;case this.events.EVENT_AD_CLOSE:case this.events.EVENT_SLOT_ENDED:this.closeListener(t);break;case this.events.EVENT_AD_CLICK:this.clickListener(t);break;case this.events.EVENT_AD_FIRST_QUARTILE:this.fireQuartile(1);break;case this.events.EVENT_AD_MIDPOINT:this.fireQuartile(2);break;case this.events.EVENT_AD_THIRD_QUARTILE:this.fireQuartile(3);break;case this.events.ERROR_SECURITY:case this.events.ERROR_TIMEOUT:this.noResponseManifestListener(t);break;case this.events.ERROR_NO_AD_AVAILABLE:case this.events.ERROR_VAST_NO_AD:this.manifestEmptyListener(t);break;case this.events.ERROR_VAST_VERSION_NOT_SUPPORTED:case this.events.ERROR_VAST_WRAPPER_LIMIT_REACH:case this.events.ERROR_VAST_XML_PARSING:case this.events.ERROR_PARSE:this.manifestWrongListener(t);break;}},slotListener:function(t){this.slot=t.slot;var e=this.plugin.getAdapter();switch(this.disable=!1,this.slot.getTimePositionClass()){case"POSTROLL":this.position=ci.Constants.AdPosition.Postroll;break;case"MIDROLL":this.position=ci.Constants.AdPosition.Midroll;break;case"PREROLL":e&&e.flags.isJoined?this.position=ci.Constants.AdPosition.Midroll:this.position=ci.Constants.AdPosition.Preroll;break;default:this.disable=!0;}this.disable||(this.titles=this.slot.getAdInstances(),this.unregister(),this.plugin.fireInit(),this.fireInit());},playListener:function(t){this.disable||this.fireStart();},playingListener:function(t){this.disable||(this.fireStart(),this.fireJoin(),this.fireResume());},pauseListener:function(t){this.firePause();},resumeListener:function(t){this.playListener(),this.fireResume();},endedListener:function(t){this.fireStop();},skipListener:function(t){this.fireSkip();},clickListener:function(t){var e=t.adInstance.getEventCallbackUrls(tv.freewheel.SDK.EVENT_AD_CLICK,tv.freewheel.SDK.EVENT_TYPE_CLICK)[0],i=new Date().getTime();this.lastUrl===e&&i<(this.lastTime||0)+2e3||(this.lastUrl=e,this.lastTime=i,this.fireClick(e));},closeListener:function(t){this.register(),this.position===ci.Constants.AdPosition.Postroll&&!this.disable&&this.plugin.fireStop();},errorListener:function(t){this.fireError(t.errorCode||t.subType,t.errorInfo),this.fireStop(),this.register();},register:function(t){var e=this.plugin.getAdapter();e&&!this.canRemoveListeners&&(e.registerListeners(),e.fireResume(),this.canRemoveListeners=!0);},unregister:function(t){var e=this.plugin.getAdapter();e&&this.canRemoveListeners&&(this.canRemoveListeners=!1,e.unregisterListeners(),e.firePause());},changeVideo:function(t){(this.flags.isStarted||this.flags.isInited)&&(this.fireStop(),this.plugin.fireStop(),this.register());}});k1.exports=ci.adapters.Freewheel;});var R1=q((rU,L1)=>{"use strict";var eM=P1(),tM=eM.extend({register:function(){},unregister:function(){}},{isUsed:function(t){return t.player&&t.player.freewheelAds;}});L1.exports=tM;});var N1=q((sU,O1)=>{"use strict";var on=Bt(),iM=jo(),nM=on.Adapter.extend({getVersion:function(){return iM.version+"-videojs-ima-ads";},getDuration:function(){return this.ima.getAdsManager()&&this.ima.getAdsManager().getCurrentAd()!==null&&(this.duration=this.ima.getAdsManager().getCurrentAd().getDuration()),this.duration;},getResource:function(){var t=null,e=this.ima.getAdsManager();return e&&(t=e.getCurrentAd().getMediaUrl()),t;},getTitle:function(){var t=null,e=this.ima.getAdsManager();return e&&(t=e.getCurrentAd().getTitle()),t;},getPlayhead:function(){var t=null,e=this.ima.getAdsManager();return e&&(t=this.getDuration()-e.getRemainingTime()),t;},getPlayerVersion:function(){return"IMA"+google.ima.VERSION+"; contrib-ads "+this.player.ads.VERSION;},getPosition:function(){var t=on.Constants.AdPosition.Preroll;return this.plugin._adapter.flags.isJoined&&(!this.plugin.getIsLive()&&this.plugin._adapter.getDuration()-1<this.plugin._adapter.getPlayhead()?t=on.Constants.AdPosition.Postroll:this.plugin._adapter.getPlayhead()>1&&(t=on.Constants.AdPosition.Midroll)),t;},getGivenBreaks:function(){var t=null;return this.cuepoints&&(t=this.cuepoints.length),t;},getBreaksTime:function(){return this.cuepoints;},getGivenAds:function(){return this.totalAds;},getAudioEnabled:function(){return!this.ima.adMuted;},getIsSkippable:function(){return this.isSkippable;},getIsFullscreen:function(){var t=!1,e=this.ima.adDisplayContainer;for(var i in e)e[i]&&e[i].width&&e[i].height&&window.innerHeight&&window.innerWidth&&e[i].width&&e[i].height&&(t=window.innerHeight<=e[i].height+30&&window.innerWidth<=e[i].width+30);return t;},getIsVisible:function(){return on.Util.calculateAdViewability(this.ima.adContainerDiv);},registerListeners:function(){this.monitorPlayhead(!0,!1);var t=google.ima.AdEvent.Type;if(this.references={},this.references[t.AD_METADATA]=this.metadataListener.bind(this),this.references[t.LOADED]=this.loadedListener.bind(this),this.references[t.CONTENT_PAUSE_REQUESTED]=this.contentPauseRequestedListener.bind(this),this.references[t.STARTED]=this.startedListener.bind(this),this.references[t.PAUSED]=this.pausedListener.bind(this),this.references[t.RESUMED]=this.resumedListener.bind(this),this.references[t.COMPLETE]=this.completeListener.bind(this),this.references[t.SKIPPED]=this.skippedListener.bind(this),this.references[t.CLICK]=this.clickListener.bind(this),this.references[google.ima.AdErrorEvent.Type.AD_ERROR]=this.errorListener.bind(this),this.references[t.ALL_ADS_COMPLETED]=this.adsEndedListener.bind(this),this.references[t.FIRST_QUARTILE]=this.firstQuartileListener.bind(this),this.references[t.MIDPOINT]=this.secondQuartileListener.bind(this),this.references[t.THIRD_QUARTILE]=this.thirdQuartileListener.bind(this),this.playerReferences={adend:this.adEndedListener.bind(this),adstart:this.startedListener.bind(this),adskip:this.skippedListener.bind(this),adserror:this.errorListener.bind(this),"ads-cl
220ick":this.clickListener.bind(this)},this.player){this.registerImaEvents();for(var e in this.playerReferences)this.player.on(e,this.playerReferences[e]);}},registerImaEvents:function(){if(this.player.ima.addEventListener?this.ima=this.player.ima:this.player.ima.sdkImpl&&this.player.ima.sdkImpl.addEventListener&&(this.ima=this.player.ima.sdkImpl),this.ima)for(var t in this.references)this.ima.addEventListener(t,this.references[t]);},metadataListener:function(t){this.cuepoints=t.getAdCuePoints().getCuePoints().slice(),this.plugin._adapter&&this.cuepoints.forEach(function(e,i){(this.cuepoints[i]===-1||this.cuepoints[i]==null||this.cuepoints[i]===void 0)&&(this.cuepoints[i]=this.plugin._adapter.getDuration());}.bind(this));},loadedListener:function(t){this.isSkippable=t.getAdData().skippable,this.totalAds=t.getAdData().adPodInfo.totalAds,this.fireInit();},contentPauseRequestedListener:function(t){this.fireInit();},startedListener:function(t){this.fireStart(),this.fireJoin(),this.plugin.getAdapter().firePause();},pausedListener:function(t){this.firePause();},resumedListener:function(t){this.fireResume();},completeListener:function(t){this.fireStop();},skippedListener:function(t){this.fireSkip();},adEndedListener:function(t){this.fireStop();},errorListener:function(t){var e=null,i=null;typeof t.getError=="function"?(e=t.getError(),i=e.getCode()):t.data&&t.data.AdError&&(e=t.data.AdError,i=e.getErrorCode());var n=e?e.getMessage():null;this.fireError(i,n);},clickListener:function(t){var e=null;try{if(t&&typeof t.getAd=="function"){var i=t.getAd();for(prop in i)typeof i[prop]=="object"&&i[prop].clickThroughUrl&&(e=i[prop].clickThroughUrl.substring(i[prop].clickThroughUrl.indexOf("adurl=")).replace("adurl=",""));}}catch{on.Log.notice("Couldnt get adclick url");}this.fireClick(e);},adsEndedListener:function(t){this.plugin.getAdapter().adsEnded=!0,this.fireStop(),this.plugin.getAdapter().fireResume(),this.plugin.requestBuilder.lastSent.adPosition===on.Constants.AdPosition.Postroll&&this.plugin.fireStop();},firstQuartileListener:function(t){this.fireQuartile(1);},secondQuartileListener:function(t){this.fireQuartile(2);},thirdQuartileListener:function(t){this.fireQuartile(3);},unregisterListeners:function(){if(this.monitor&&this.monitor.stop(),this.player&&this.ima&&this.references&&this.playerReferences){for(var t in this.references);for(var t in this.playerReferences)this.player.off(t,this.playerReferences[t]);}delete this.references,delete this.playerReferences;},adPlayerErrorListener:function(t){var e=t.data.AdError,i=[1012,1005,301,402,302],n=[1007,1009,303],r=[403,100,503,101,102],s=e.getErrorCode(),a=e.getMessage();i.indexOf(s)>=0?this.fireManifest(on.Constants.ManifestError.NO_RESPONSE,a):n.indexOf(s)>=0?this.fireManifest(on.Constants.ManifestError.EMPTY,a):r.indexOf(s)>=0?this.fireManifest(on.Constants.ManifestError.WRONG,a):this.fireError(s,a);}},{isUsed:function(t){return typeof google<"u"&&google.ima&&t.player.ima;}});O1.exports=nM;});var M1=q((aU,j1)=>{"use strict";var Mo=Bt(),rM=jo(),sM=Mo.Adapter.extend({getVersion:function(){return rM.version+"-videojs-onceux-ads";},getResource:function(){return this.player.ads.contentSrc;},getPlayhead:function(){return this.player.onceux.currentTime();},getDuration:function(){return this.player.onceux.duration();},getPosition:function(){var t=Mo.Constants.AdPosition.Preroll;return this.plugin.getAdapter().flags.isJoined&&(this.plugin.getAdapter().getPlayhead()<=this.plugin.getAdapter().getDuration()?t=Mo.Constants.AdPosition.Midroll:t=Mo.Constants.AdPosition.Postroll),t;},registerListeners:function(){if(Mo.Util.logAllEvents(this.player,[null,"onceux-ads-complete","onceux-adroll-start","onceux-adroll-complete","onceux-linearad-start","onceux-linearad-impression","onceux-linearad-complete","onceux-linearad-skipped","onceux-linearad-pause","onceux-linearad-resume","onceux-companionad-creativeView","adserror","ads-click"]),this.monitorPlayhead(!0,!1),this.references={"onceux-linearad-start":this.startedListener.bind(this),"onceux-linearad-pause":this.pausedListener.bind(this),"onceux-linearad-resume":this.resumedListener.bind(this),"onceux-linearad-complete":this.completeListener.bind(this),"onceux-linearad-skipped":this.skippedListener.bind(this),adserror:this.errorListener.bind(this),"ads-cl
220ick":this.clickListener.bind(this)},this.player)for(var t in this.references)this.player.on(t,this.references[t]);},unregisterListeners:function(){if(this.monitor&&this.monitor.stop(),this.player&&this.references){for(var t in this.references)this.player.off(t,this.references[t]);delete this.references;}},startedListener:function(t){this.fireStart(),this.fireJoin();},pausedListener:function(t){this.firePause();},resumedListener:function(t){this.fireResume();},completeListener:function(t){this.fireStop({adPlayhead:this.getDuration()});},skippedListener:function(t){this.fireSkip();},errorListener:function(t){this.fireError();},clickListener:function(t){this.fireClick();}},{isUsed:function(t){return t.player.onceux;}});j1.exports=sM;});var F1=q((oU,B1)=>{"use strict";var Cm=Bt();B1.exports={getHls:function(t){return t.getTech().vhs||t.getTech().hls||t.getTech().hls_;},isUsed:function(t){return!!this.getHls(t);},getBitrate:function(t){var e=null,i=this.getHls(t).playlists.media();if(t.player.qualityLevels){var n=t.player.qualityLevels(),r=n[n.selectedIndex];r&&(e=r.bitrate);}else i&&i.attributes&&i.attributes.BANDWIDTH?e=i.attributes.BANDWIDTH:t.player.tech_&&t.player.tech_.vhs&&t.player.tech_.vhs.stats?e=t.player.tech_.vhs.stats.bandwidth:t.player.tech_&&t.player.tech_.hls&&t.player.tech_.hls.bandwidth?e=t.player.tech_.hls.bandwidth:t.player.hls&&t.player.hls.bandwidth&&(e=t.player.hls.bandwidth);return e;},getRendition:function(t){var e=null,i=this.getHls(t).playlists.media();if(t.player.qualityLevels){var n=t.player.qualityLevels(),r=n[n.selectedIndex];r&&(e=Cm.Util.buildRenditionString(r.width,r.height,r.bitrate));}else if(i&&i.attributes){var s=i.attributes;s.RESOLUTION?e=Cm.Util.buildRenditionString(s.RESOLUTION.width,s.RESOLUTION.height,s.BANDWIDTH):s.BANDWIDTH?e=Cm.Util.buildRenditionString(s.BANDWIDTH):s.NAME&&(e=s.NAME);}return e;},getTotalBytes:function(t){var e=this.getHls(t),i=e.bytesReceived;return!i&&e.stats&&(i=e.stats.mediaBytesTransferred-t.acumBytes),i;}};});var V1=q((lU,U1)=>{"use strict";var aM=Bt();U1.exports={getHls:function(t){return this.getTech();},isUsed:function(t){return!!this.getTech(t);},getResource:function(t){var e=null;return this.getTech(t)&&this.getTech(t).url?e=this.getTech(t).url:this.getHls(t)&&this.getHls(t).source_&&(e=this.getHls(t).source_.src),e;},getBitrate:function(t){var e=null,i=this.getTech(t).currentLevel;if(typeof i<"u"&&i!==-1&&this.getTech(t).levels){var n=this.getTech(t).levels[i];n&&n.bitrate&&(e=n.bitrate);}return e;},getRendition:function(t){var e=null,i=this.getTech(t).currentLevel;if(typeof i<"u"&&i!==-1&&this.getTech(t).levels){var n=this.getTech(t).levels[i];n&&(e=aM.Util.buildRenditionString(n.width,n.height,n.bitrate));}return e;},getTech:function(t){var e=t.getTech();return e.vhs||e.hls||e.hls_;}};});var $1=q((uU,H1)=>{"use strict";var q1=Bt();H1.exports={_getShaka:function(t){var e=t.getTech();return e.shakaPlayer||e._shakaplayerInstance;},isUsed:function(t){return!!this._getShaka(t);},getResource:function(t){var e="",i=this._getShaka(t);return typeof i.getManifestUri=="function"?e=i.getManifestUri():typeof i.getCurrentSrc=="function"&&(e=i.getCurrentSrc()),e;},getBitrate:function(t){var e=-1,i=this._getShaka(t);if(typeof i.getStats=="function")e=i.getStats().streamBandwidth;else if(typeof i.getVideoTracks=="function"&&typeof i.getVideoTrackCurrentIndex=="function"){var n=i.getVideoTrackCurrentIndex(),r=i.getVideoTracks();for(var s in r){var a=r[s];a.index==n&&(e=a.bitrate);}}return e;},getRendition:function(t){var e=this._getShaka(t),i=e.getStats(),n=q1.Util.buildRenditionString(i.width,i.height,i.streamBandwidth),r=e.getVariantTracks();for(var s in r){var a=r[s];if(a.active&&a.type==="video"){n=q1.Util.buildRenditionString(a.width,a.height,a.bandwidth);break;}}return n;}};});var W1=q((dU,G1)=>{"use strict";var z1=Bt();G1.exports={isUsed:function(t){return t.player.dash&&t.player.dash.shakaPlayer;},getResource:function(t){var e="",i=t.player.dash.shakaPlayer;return typeof i.getManifestUri=="function"?e=i.getManifestUri():typeof i.getAssetUri=="function"&&(e=i.getAssetUri()),e;},getBitrate:function(t){return t.player.dash.shakaPlayer.getStats().streamBandwidth;},getRendition:function(t){var e=t.player.dash.shakaPlayer,i=e.getStats(),n=z1.Util.buildRenditionString(i.width,i.height,i.streamBandwidth),r=e.getVariantTracks();for(var s in r){var a=r[s];a.active&&a.type==="video"&&(n=z1.Util.buildRenditionString(a.width,a.height,a.bandwidth));}return n;}};});var X1=q((cU,Y1)=>{"use strict";
220var oM=Bt();Y1.exports={isUsed:function(t){return t.player.dash&&t.player.dash.mediaPlayer&&!t.player.dash.shakaPlayer;},getResource:function(t){return this._getDashPlayer(t).getSource();},getBitrate:function(t){var e=null,i=this._getDashPlayer(t);if(i){var n=i.getQualityFor("video");n&&(e=i.getBitrateInfoListFor("video")[n].bitrate);}return e;},getRendition:function(t){var e=null,i=this._getDashPlayer(t);if(i){var n=i.getQualityFor("video");if(n){var r=i.getBitrateInfoListFor("video")[n];r&&(e=oM.Util.buildRenditionString(r.width,r.height,r.bitrate));}}return e;},_getDashPlayer:function(t){return t.player.dash.mediaPlayer;}};});var Dm=q((hU,K1)=>{"use strict";var Zs=Bt(),wm=jo(),Pe=Zs.Adapter.extend({getVersion:function(){return wm.version+"-"+wm.name+"-"+wm.tech;},getTitle:function(){var t=null;return this.player.mediainfo&&(t=this.player.mediainfo.name),t;},getPlayhead:function(){var t=this.player.currentTime();return this.plugin._adsAdapter&&this.plugin._adsAdapter.flags.isStarted&&(t=this.lastPlayhead||t),t;},getIsLive:function(){var t=null;return this.player.mediainfo&&(t=!0,typeof this.player.mediainfo.duration=="number"&&(t=this.player.mediainfo.duration<1)),t;},getDuration:function(){var t=this.player.duration();return this.player.mediainfo&&typeof this.player.mediainfo.duration<"u"&&(t=this.player.mediainfo.duration),t;},getResource:function(){var t=null,e=this.getUsedTech();return e&&e.getResource&&(t=e.getResource(this)),t||(t=this.player.currentSrc()),t;},getBitrate:function(){var t=null,e=this.getUsedTech();return e&&e.getBitrate&&(t=e.getBitrate(this)),t;},getRendition:function(){var t=null,e=this.getUsedTech();return e&&e.getRendition&&(t=e.getRendition(this)),t;},getTotalBytes:function(){var t=null,e=this.getUsedTech();return e&&e.getTotalBytes&&(t=e.getTotalBytes(this)),t;},getPlayerName:function(){var t="videojs";return Pe.ContribHlsTech.isUsed(this)?t+="-hls":Pe.HlsJsTech.isUsed(this)?t+="-hlsjs":Pe.ShakaTech.isUsed(this)?t+="-shaka":Pe.DashShakaTech.isUsed(this)?t+="-dash-shaka":Pe.DashTech.isUsed(this)&&(t+="-dash"),Pe.ImaAdsAdapter.isUsed(this)?t+="-ima":Pe.OnceUXAdsAdapter.isUsed(this)?this.pluginName+="-oux":this.player.FreeWheelPlugin&&(t+="-fw"),this.player.mediainfo&&(t+="-bcove"),t;},getPlayerVersion:function(){var t=null;return typeof videojs<"u"&&(t=videojs.VERSION),t;},getPlayrate:function(){return this.player.playbackRate();},isOnAdBreak:function(){try{return this.player&&this.player.ads&&this.player.ads.inAdBreak&&this.player.ads.inAdBreak();}catch{}return!1;},getTech:function(){return this.player.tech({IWillNotUseThisInPlugins:!0});},getUsedTech:function(){var t=null;return Pe.ContribHlsTech.isUsed(this)?t=Pe.ContribHlsTech:Pe.HlsJsTech.isUsed(this)?t=Pe.HlsJsTech:Pe.ShakaTech.isUsed(this)?t=Pe.ShakaTech:Pe.DashShakaTech.isUsed(this)?t=Pe.DashShakaTech:Pe.DashTech.isUsed(this)&&(t=Pe.DashTech),t;},registerListeners:function(){if(this.monitorPlayhead(!0,!1,1200),this.acumBytes=0,this.ignoreList=[],this.fatalList=[],this.nonFatalList=[],this.references={loadstart:this.loadstartListener.bind(this),adsready:this.loadAdsAdapter.bind(this),play:this.playListener.bind(this),timeupdate:this.timeupdateListener.bind(this),pause:this.pauseListener.bind(this),playing:this.playingListener.bind(this),ended:this.conditionalStop.bind(this),dispose:this.disposeListener.bind(this),seeking:this.seekingListener.bind(this),seeked:this.seekedListener.bind(this),error:this.errorListener.bind(this),adserror:this.aderrorListener.bind(this),adsEnded:this.adsEndedListener.bind(this),texttrackchange:this.textListener.bind(this),waiting:this.bufferingListener.bind(this)},this.player)for(var t in this.references)this.player.on(t,this.references[t]);setTimeout(this.loadAdsAdapter.bind(this),50);},unregisterListeners:function(){if(this.monitor&&this.monitor.stop(),this.player&&this.references){for(var t in this.references)this.player.off(t,this.references[t]);delete this.references;}},textListener:function(t){if(this.player.textTracks)for(var e=this.player.textTracks(),i=e.length,n=0;n<i;++n)e[n]&&e[n].mode==="showing"&&(this.plugin.options["content.subtitles"]=e[n].label||e[n].language);},aderrorListener:function(t){this.loadAdsAdapter(),this.plugin.getAdsAdapter()&&this.plugin.getAdsAdapter().adPlayerErrorListener&&this.plugin.getAdsAdapter().adPlayerErrorListener(t);},loadstartListener:function(t){this.loadAdsAdapter(),Zs.Log.notice("Player detected "+this.getPlayerName());},playListener:function(t){this.isOnAdBreak()||(this.flags.isStarted?this.lastSrc&&this.lastSrc!==this.getResource()&&(this.fireStop({},"playListenerNewResource"),this.acumBytesFunc(),this.lastPlayhead=void 0,this._startEvent("playListenerNewResource"),this.lastSrc=this.getResource()):(this.lastSrc=this.getResource(),this._startEvent("playListenerNotStarted")));},_startEvent:function(t){this.loadAdsAdapter(),this.player.options_&&this.plugin&&!this.plugin.options["content.id"]&&(this.plugin.options["content.id"]=this.player.options_["data-vi
220deo-id"]),this.fireStart({},t),this.flags.isJoined||(this.joinPolling||(this.joinPolling=new Zs.Timer(this._jointimePolling.bind(this),500)),this.joinPolling.start());},_jointimePolling:function(t){this.plugin?(!this.plugin.getAdsAdapter()||!this.plugin.getAdsAdapter().flags.isStarted)&&(this.lastPlayhead!==0&&typeof this.lastPlayhead=="number"&&this.lastPlayhead!==this.getPlayhead()&&(this.fireJoin({},"jointimePolling"),this.joinPolling&&this.joinPolling.stop()),this.lastPlayhead=this.getPlayhead()):this.joinPolling&&this.joinPolling.stop();},timeupdateListener:function(t){this.getPlayhead()>.1&&(this.fireJoin({},"timeupdateListener"),this.joinPolling&&this.joinPolling.stop(),!this.flags.isPaused&&this.lastSeekPlayhead&&this.lastSeekPlayhead!==this.getPlayhead()&&(this.fireSeekEnd({},"timeupdateListener"),this.lastSeekPlayhead=!1)),this.flags.isJoined||(this.lastPlayhead===void 0&&(this.lastPlayhead=this.getPlayhead()),this.lastPlayhead!==this.getPlayhead()&&(this.player.options_&&this.plugin&&!this.plugin.options["content.id"]&&(this.plugin.options["content.id"]=this.player.options_["data-video-id"]),this.fireStart({},"timeupdateListener"),this.fireJoin({},"timeupdateListener"),this.joinPolling&&this.joinPolling.stop(),this.lastPlayhead=void 0)),this.plugin._adsAdapter&&!this.plugin._adsAdapter.flags.isStarted&&(this.lastPlayhead=this.getPlayhead());},pauseListener:function(t){this.firePause({},"pauseListener");},playingListener:function(t){this._startEvent("playingListener"),this.fireResume({},"playingListener"),this.getPlayhead()<1&&this.fireSeekEnd({},"playingListener");},disposeListener:function(t){this.plugin&&(this.plugin.fireStop({},"disposeListener"),this.plugin.removeAdsAdapter(),this.plugin.removeAdapter());},conditionalStop:function(t){this.isOnAdBreak()||this.plugin&&(this.adsEnded=!1,this.fireStop({},"conditionalStop"),this.plugin&&!this.plugin.options["content.id"]&&(this.plugin.options["content.id"]=null),this.acumBytesFunc(),this.lastPlayhead=void 0);},adsEndedListener:function(t){this.adsEnded=!0,this.plugin.requestBuilder.lastSent.adPosition===Zs.Constants.AdPosition.Postroll&&(this.plugin.fireStop({},"adsEndedListener"),this.acumBytesFunc(),this.lastPlayhead=void 0);},seekingListener:function(t){this.fireSeekBegin({},!1,"seekingListener");},seekedListener:function(t){this.lastSeekPlayhead=this.getPlayhead();},bufferingListener:function(t){this.fireBufferBegin({},!1,"bufferingListener");},errorListener:function(t){var e=!1,i=!1,n=null,r=null;this.player.error&&this.player.error()&&(n=Number(this.player.error().code),r=this.player.error().message,(n===2||n===4||n<0)&&(i=!0)),n!==null&&(this.ignoreList.includes(n)&&(e=!0),!i&&this.fatalList.includes(n)?i=!0:i&&this.nonFatalList.includes(n)&&(i=!1)),e||(i?(this.fireFatalError(n,r,void 0,void 0,"errorListener"),this.acumBytesFunc(),this.lastPlayhead=void 0,this.crashed=!0):this.fireError(n,r,void 0,void 0,"errorListener"));},loadAdsAdapter:function(){if(this.plugin)if(this.plugin.getAdsAdapter()===null||this.plugin.getAdsAdapter().isGeneric){var t=null;Pe.ImaAdsAdapter.isUsed(this)?t=new Pe.ImaAdsAdapter(this.player):Pe.OnceUXAdsAdapter.isUsed(this)?t=new Pe.OnceUXAdsAdapter(this.player):Pe.BcoveImaAdsAdapter.isUsed(this)?t=new Pe.BcoveImaAdsAdapter(this.player):Pe.BcoveFreewheelAdsAdapter.isUsed(this)?t=new Pe.BcoveFreewheelAdsAdapter(this.player):Pe.FreewheelAdsAdapter.isUsed(this)?t=new Pe.FreewheelAdsAdapter(this.player.freewheelAds.controller):this.plugin.getAdsAdapter()===null&&(t=new Pe.GenericAdsAdapter(this.player)),t&&this.plugin.setAdsAdapter(t);}else this.plugin.getAdsAdapter().registerImaEvents&&this.plugin.getAdsAdapter().registerImaEvents();},acumBytesFunc:function(){this.acumBytes+=this.getTotalBytes()||0;},errorModifyer:function(t,e,i){this.fatalList=t||[],this.nonFatalList=e||[],this.ignoreList=i||[];}},{GenericAdsAdapter:E1(),BcoveImaAdsAdapter:C1(),BcoveFreewheelAdsAdapter:D1(),FreewheelAdsAdapter:R1(),ImaAdsAdapter:N1(),OnceUXAdsAdapter:M1(),ContribHlsTech:F1(),HlsJsTech:V1(),ShakaTech:$1(),DashShakaTech:W1(),DashTech:X1()});Zs.adapters.Videojs=Pe;K1.exports=Zs.adapters.Videojs;});var ex=q(()=>{"use strict";(function(){window.WebComponents=window.WebComponents||{flags:{}};var t="webcomponents-lite.js",e=document.querySelector('script[src*="'+t+'"]'),i={};if(!i.noOpts){if(location.search.slice(1).split("&").forEach(function(a){var o=a.split("="),u;o[0]&&(u=o[0].match(/wc-(.+)/))&&(i[u[1]]=o[1]||!0);}),e)for(var n=0,r;r=e.attributes[n];n++)r.name!=="src"&&(i[r.name]=r.value||!0);if(i.log&&i.log.split){var s=i.log.split(",");i.log={}
220,s.forEach(function(a){i.log[a]=!0;});}else i.log={};}i.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=i.register),WebComponents.flags=i;})();(function(t){"use strict";var e=!1;if(!t.forceJURL)try{var i=new URL("b","http://a");i.pathname="c%20d",e=i.href==="http://a/c%20d";}catch{}if(e)return;var n=Object.create(null);n.ftp=21,n.file=0,n.gopher=70,n.http=80,n.https=443,n.ws=80,n.wss=443;var r=Object.create(null);r["%2e"]=".",r[".%2e"]="..",r["%2e."]="..",r["%2e%2e"]="..";function s(S){return n[S]!==void 0;}function a(){b.call(this),this._isInvalid=!0;}function o(S){return S==""&&a.call(this),S.toLowerCase();}function u(S){var P=S.charCodeAt(0);return P>32&&P<127&&[34,35,60,62,63,96].indexOf(P)==-1?S:encodeURIComponent(S);}function c(S){var P=S.charCodeAt(0);return P>32&&P<127&&[34,35,60,62,96].indexOf(P)==-1?S:encodeURIComponent(S);}var p=void 0,_=/[a-zA-Z]/,T=/[a-zA-Z0-9\+\-\.]/;function y(S,P,D){function A(Ee){U.push(Ee);}var C=P||"scheme start",R=0,I="",M=!1,F=!1,U=[];e:for(;(S[R-1]!=p||R==0)&&!this._isInvalid;){var k=S[R];switch(C){case"scheme start":if(k&&_.test(k))I+=k.toLowerCase(),C="scheme";else if(P){A("Invalid scheme.");break e;}else{I="",C="no scheme";continue;}break;case"scheme":if(k&&T.test(k))I+=k.toLowerCase();else if(k==":"){if(this._scheme=I,I="",P)break e;s(this._scheme)&&(this._isRelative=!0),this._scheme=="file"?C="relative":this._isRelative&&D&&D._scheme==this._scheme?C="relative or authority":this._isRelative?C="authority first slash":C="scheme data";}else if(P){if(p==k)break e;A("Code point not allowed in scheme: "+k);break e;}else{I="",R=0,C="no scheme";continue;}break;case"scheme data":k=="?"?(this._query="?",C="query"):k=="#"?(this._fragment="#",C="fragment"):p!=k&&k!="	"&&k!=`
221`&&k!="\r"&&(this._schemeData+=u(k));break;case"no scheme":if(!D||!s(D._scheme))A("Missing scheme."),a.call(this);else{C="relative";continue;}break;case"relative or authority":if(k=="/"&&S[R+1]=="/")C="authority ignore slashes";else{A("Expected /, got: "+k),C="relative";continue;}break;case"relative":if(this._isRelative=!0,this._scheme!="file"&&(this._scheme=D._scheme),p==k){this._host=D._host,this._port=D._port,this._path=D._path.slice(),this._query=D._query,this._username=D._username,this._password=D._password;break e;}else if(k=="/"||k=="\\")k=="\\"&&A("\\ is an invalid code point."),C="relative slash";else if(k=="?")this._host=D._host,this._port=D._port,this._path=D._path.slice(),this._query="?",this._username=D._username,this._password=D._password,C="query";else if(k=="#")this._host=D._host,this._port=D._port,this._path=D._path.slice(),this._query=D._query,this._fragment="#",this._username=D._username,this._password=D._password,C="fragment";else{var G=S[R+1],V=S[R+2];(this._scheme!="file"||!_.test(k)||G!=":"&&G!="|"||p!=V&&V!="/"&&V!="\\"&&V!="?"&&V!="#")&&(this._host=D._host,this._port=D._port,this._username=D._username,this._password=D._password,this._path=D._path.slice(),this._path.pop()),C="relative path";continue;}break;case"relative slash":if(k=="/"||k=="\\")k=="\\"&&A("\\ is an invalid code point."),this._scheme=="file"?C="file host":C="authority ignore slashes";else{this._scheme!="file"&&(this._host=D._host,this._port=D._port,this._username=D._username,this._password=D._password),C="relative path";continue;}break;case"authority first slash":if(k=="/")C="authority second slash";else{A("Expected '/', got: "+k),C="authority ignore slashes";continue;}break;case"authority second slash":if(C="authority ignore slashes",k!="/"){A("Expected '/', got: "+k);continue;}break;case"authority ignore slashes":if(k!="/"&&k!="\\"){C="authority";continue;}else A("Expected authority, got: "+k);break;case"authority":if(k=="@"){M&&(A("@ already seen."),I+="%40"),M=!0;for(var Y=0;Y<I.length;Y++){var ae=I[Y];if(ae=="	"||ae==`
222`||ae=="\r"){A("Invalid whitespace in authority.");continue;}if(ae==":"&&this._password===null){this._password="";continue;}var oe=u(ae);this._password!==null?this._password+=oe:this._username+=oe;}I="";}else if(p==k||k=="/"||k=="\\"||k=="?"||k=="#"){R-=I.length,I="",C="host";continue;}else I+=k;break;case"file host":if(p==k||k=="/"||k=="\\"||k=="?"||k=="#"){I.length==2&&_.test(I[0])&&(I[1]==":"||I[1]=="|")?C="relative path":(I.length==0||(this._host=o.call(this,I),I=""),C="relative path start");continue;}else k=="	"||k==`
223`||k=="\r"?A("Invalid whitespace in file host."):I+=k;break;case"host":case"hostname":if(k==":"&&!F){if(this._host=o.call(this,I),I="",C="port",P=="hostname")break e;}else if(p==k||k=="/"||k=="\\"||k=="?"||k=="#"){if(this._host=o.call(this,I),I="",C="relative path start",P)break e;continue;}else k!="	"&&k!=`
224`&&k!="\r"?(k=="["?F=!0:k=="]"&&(F=!1),I+=k):A("Invalid code point in host/hostname: "+k);break;
224case"port":if(/[0-9]/.test(k))I+=k;else if(p==k||k=="/"||k=="\\"||k=="?"||k=="#"||P){if(I!=""){var pe=parseInt(I,10);pe!=n[this._scheme]&&(this._port=pe+""),I="";}if(P)break e;C="relative path start";continue;}else k=="	"||k==`
225`||k=="\r"?A("Invalid code point in port: "+k):a.call(this);break;case"relative path start":if(k=="\\"&&A("'\\' not allowed in path."),C="relative path",k!="/"&&k!="\\")continue;break;case"relative path":if(p==k||k=="/"||k=="\\"||!P&&(k=="?"||k=="#")){k=="\\"&&A("\\ not allowed in relative path.");var be;(be=r[I.toLowerCase()])&&(I=be),I==".."?(this._path.pop(),k!="/"&&k!="\\"&&this._path.push("")):I=="."&&k!="/"&&k!="\\"?this._path.push(""):I!="."&&(this._scheme=="file"&&this._path.length==0&&I.length==2&&_.test(I[0])&&I[1]=="|"&&(I=I[0]+":"),this._path.push(I)),I="",k=="?"?(this._query="?",C="query"):k=="#"&&(this._fragment="#",C="fragment");}else k!="	"&&k!=`
226`&&k!="\r"&&(I+=u(k));break;case"query":!P&&k=="#"?(this._fragment="#",C="fragment"):p!=k&&k!="	"&&k!=`
227`&&k!="\r"&&(this._query+=c(k));break;case"fragment":p!=k&&k!="	"&&k!=`
228`&&k!="\r"&&(this._fragment+=k);break;}R++;}}function b(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1;}function g(S,P){P!==void 0&&!(P instanceof g)&&(P=new g(String(P))),this._url=S,b.call(this);var D=S.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");y.call(this,D,null,P);}g.prototype={toString:function(){return this.href;},get href(){if(this._isInvalid)return this._url;var S="";return(this._username!=""||this._password!=null)&&(S=this._username+(this._password!=null?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+S+this.host:"")+this.pathname+this._query+this._fragment;},set href(S){b.call(this),y.call(this,S);},get protocol(){return this._scheme+":";},set protocol(S){this._isInvalid||y.call(this,S+":","scheme start");},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host;},set host(S){this._isInvalid||!this._isRelative||y.call(this,S,"host");},get hostname(){return this._host;},set hostname(S){this._isInvalid||!this._isRelative||y.call(this,S,"hostname");},get port(){return this._port;},set port(S){this._isInvalid||!this._isRelative||y.call(this,S,"port");},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData;},set pathname(S){this._isInvalid||!this._isRelative||(this._path=[],y.call(this,S,"relative path start"));},get search(){return this._isInvalid||!this._query||this._query=="?"?"":this._query;},set search(S){this._isInvalid||!this._isRelative||(this._query="?",S[0]=="?"&&(S=S.slice(1)),y.call(this,S,"query"));},get hash(){return this._isInvalid||!this._fragment||this._fragment=="#"?"":this._fragment;},set hash(S){this._isInvalid||(this._fragment="#",S[0]=="#"&&(S=S.slice(1)),y.call(this,S,"fragment"));},get origin(){var S;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null";}return S=this.host,S?this._scheme+"://"+S:"";}};var E=t.URL;E&&(g.createObjectURL=function(S){return E.createObjectURL.apply(E,arguments);},g.revokeObjectURL=function(S){E.revokeObjectURL(S);}),t.URL=g;})(self);typeof WeakMap>"u"&&function(){var t=Object.defineProperty,e=Date.now()%1e9,i=function(){this.name="__st"+(Math.random()*1e9>>>0)+(e++ +"__");};i.prototype={set:function(n,r){var s=n[this.name];return s&&s[0]===n?s[1]=r:t(n,this.name,{value:[n,r],writable:!0}),this;},get:function(n){var r;return(r=n[this.name])&&r[0]===n?r[1]:void 0;},delete:function(n){var r=n[this.name];return!r||r[0]!==n?!1:(r[0]=r[1]=void 0,!0);},has:function(n){var r=n[this.name];return r?r[0]===n:!1;}},window.WeakMap=i;}();(function(t){if(t.JsMutationObserver)return;var e=new WeakMap(),i;if(/Trident|Edge/.test(navigator.userAgent))i=setTimeout;else if(window.setImmediate)i=window.setImmediate;else{var n=[],r=String(Math.random());window.addEventListener("message",function(M){if(M.data===r){var F=n;n=[],F.forEach(function(U){U();});}}),i=function(M){n.push(M),window.postMessage(r,"*");};}var s=!1,a=[];function o(M){a.push(M),s||(s=!0,i(c));}function u(M){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(M)||M;}function c(){s=!1;var M=a;a=[],M.sort(function(U,k){return U.uid_-k.uid_;});var F=!1;M.forEach(function(U){var k=U.takeRecords();p(U),k.length&&(U.callback_(k,U),F=!0);}),F&&c();}function p(M){M.nodes_.forEach(function(F){var U=e.get(F);
228U&&U.forEach(function(k){k.observer===M&&k.removeTransientObservers();});});}function _(M,F){for(var U=M;U;U=U.parentNode){var k=e.get(U);if(k)for(var G=0;G<k.length;G++){var V=k[G],Y=V.options;if(!(U!==M&&!Y.subtree)){var ae=F(Y);ae&&V.enqueue(ae);}}}}var T=0;function y(M){this.callback_=M,this.nodes_=[],this.records_=[],this.uid_=++T;}y.prototype={observe:function(M,F){if(M=u(M),!F.childList&&!F.attributes&&!F.characterData||F.attributeOldValue&&!F.attributes||F.attributeFilter&&F.attributeFilter.length&&!F.attributes||F.characterDataOldValue&&!F.characterData)throw new SyntaxError();var U=e.get(M);U||e.set(M,U=[]);for(var k,G=0;G<U.length;G++)if(U[G].observer===this){k=U[G],k.removeListeners(),k.options=F;break;}k||(k=new I(this,M,F),U.push(k),this.nodes_.push(M)),k.addListeners();},disconnect:function(){this.nodes_.forEach(function(M){for(var F=e.get(M),U=0;U<F.length;U++){var k=F[U];if(k.observer===this){k.removeListeners(),F.splice(U,1);break;}}},this),this.records_=[];},takeRecords:function(){var M=this.records_;return this.records_=[],M;}};function b(M,F){this.type=M,this.target=F,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null;}function g(M){var F=new b(M.type,M.target);return F.addedNodes=M.addedNodes.slice(),F.removedNodes=M.removedNodes.slice(),F.previousSibling=M.previousSibling,F.nextSibling=M.nextSibling,F.attributeName=M.attributeName,F.attributeNamespace=M.attributeNamespace,F.oldValue=M.oldValue,F;}var E,S;function P(M,F){return E=new b(M,F);}function D(M){return S||(S=g(E),S.oldValue=M,S);}function A(){E=S=void 0;}function C(M){return M===S||M===E;}function R(M,F){return M===F?M:S&&C(M)?S:null;}function I(M,F,U){this.observer=M,this.target=F,this.options=U,this.transientObservedNodes=[];}I.prototype={enqueue:function(M){var F=this.observer.records_,U=F.length;if(F.length>0){var k=F[U-1],G=R(k,M);if(G){F[U-1]=G;return;}}else o(this.observer);F[U]=M;},addListeners:function(){this.addListeners_(this.target);},addListeners_:function(M){var F=this.options;F.attributes&&M.addEventListener("DOMAttrModified",this,!0),F.characterData&&M.addEventListener("DOMCharacterDataModified",this,!0),F.childList&&M.addEventListener("DOMNodeInserted",this,!0),(F.childList||F.subtree)&&M.addEventListener("DOMNodeRemoved",this,!0);},removeListeners:function(){this.removeListeners_(this.target);},removeListeners_:function(M){var F=this.options;F.attributes&&M.removeEventListener("DOMAttrModified",this,!0),F.characterData&&M.removeEventListener("DOMCharacterDataModified",this,!0),F.childList&&M.removeEventListener("DOMNodeInserted",this,!0),(F.childList||F.subtree)&&M.removeEventListener("DOMNodeRemoved",this,!0);},addTransientObserver:function(M){if(M!==this.target){this.addListeners_(M),this.transientObservedNodes.push(M);var F=e.get(M);F||e.set(M,F=[]),F.push(this);}},removeTransientObservers:function(){var M=this.transientObservedNodes;this.transientObservedNodes=[],M.forEach(function(F){this.removeListeners_(F);for(var U=e.get(F),k=0;k<U.length;k++)if(U[k]===this){U.splice(k,1);break;}},this);},handleEvent:function(M){switch(M.stopImmediatePropagation(),M.type){case"DOMAttrModified":var F=M.attrName,U=M.relatedNode.namespaceURI,k=M.target,be=new P("attributes",k);be.attributeName=F,be.attributeNamespace=U;var G=M.attrChange===MutationEvent.ADDITION?null:M.prevValue;_(k,function(Ee){if(Ee.attributes&&!(Ee.attributeFilter&&Ee.attributeFilter.length&&Ee.attributeFilter.indexOf(F)===-1&&Ee.attributeFilter.indexOf(U)===-1))return Ee.attributeOldValue?D(G):be;});break;case"DOMCharacterDataModified":var k=M.target,be=P("characterData",k),G=M.prevValue;_(k,function(Ee){if(Ee.characterData)return Ee.characterDataOldValue?D(G):be;});break;case"DOMNodeRemoved":this.addTransientObserver(M.target);case"DOMNodeInserted":var V=M.target,Y,ae;M.type==="DOMNodeInserted"?(Y=[V],ae=[]):(Y=[],ae=[V]);var oe=V.previousSibling,pe=V.nextSibling,be=P("childList",M.target.parentNode);be.addedNodes=Y,be.removedNodes=ae,be.previousSibling=oe,be.nextSibling=pe,_(M.relatedNode,function(Ee){if(Ee.childList)return be;});}A();}}
228,t.JsMutationObserver=y,t.MutationObserver||(t.MutationObserver=y,y._isPolyfilled=!0);})(self);(function(){var t=typeof HTMLTemplateElement>"u";/Trident/.test(navigator.userAgent)&&function(){var b=document.importNode;document.importNode=function(){var g=b.apply(document,arguments);if(g.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var E=document.createDocumentFragment();return E.appendChild(g),E;}else return g;};}();var e=function(){if(!t){var b=document.createElement("template"),g=document.createElement("template");g.content.appendChild(document.createElement("div")),b.content.appendChild(g);var E=b.cloneNode(!0);return E.content.childNodes.length===0||E.content.firstChild.content.childNodes.length===0;}}(),i="template",n=function(){};if(t){let b=function(E){switch(E){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case"\xA0":return"&nbsp;";}},g=function(E){return E.replace(c,b);};var T=b,y=g,r=document.implementation.createHTMLDocument("template"),s=!0,a=document.createElement("style");a.textContent=i+"{display:none;}";var o=document.head;o.insertBefore(a,o.firstElementChild),n.prototype=Object.create(HTMLElement.prototype),n.decorate=function(E){if(!E.content){E.content=r.createDocumentFragment();for(var S;S=E.firstChild;)E.content.appendChild(S);if(E.cloneNode=function(P){return n.cloneNode(this,P);},s)try{Object.defineProperty(E,"innerHTML",{get:function(){for(var P="",D=this.content.firstChild;D;D=D.nextSibling)P+=D.outerHTML||g(D.data);return P;},set:function(P){for(r.body.innerHTML=P,n.bootstrap(r);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;r.body.firstChild;)this.content.appendChild(r.body.firstChild);},configurable:!0});}catch{s=!1;}n.bootstrap(E.content);}},n.bootstrap=function(E){for(var S=E.querySelectorAll(i),P=0,D=S.length,A;P<D&&(A=S[P]);P++)n.decorate(A);},document.addEventListener("DOMContentLoaded",function(){n.bootstrap(document);});var u=document.createElement;document.createElement=function(){"use strict";var E=u.apply(document,arguments);return E.localName==="template"&&n.decorate(E),E;};var c=/[&\u00A0<>]/g;}if(t||e){var p=Node.prototype.cloneNode;n.cloneNode=function(b,g){var E=p.call(b,!1);return this.decorate&&this.decorate(E),g&&(E.content.appendChild(p.call(b.content,!0)),this.fixClonedDom(E.content,b.content)),E;},n.fixClonedDom=function(b,g){if(g.querySelectorAll)for(var E=g.querySelectorAll(i),S=b.querySelectorAll(i),P=0,D=S.length,A,C;P<D;P++)C=E[P],A=S[P],this.decorate&&this.decorate(C),A.parentNode.replaceChild(C.cloneNode(!0),A);};var _=document.importNode;Node.prototype.cloneNode=function(b){var g=p.call(this,b);return b&&n.fixClonedDom(g,this),g;},document.importNode=function(b,g){if(b.localName===i)return n.cloneNode(b,g);var E=_.call(document,b,g);return g&&n.fixClonedDom(E,b),E;},e&&(HTMLTemplateElement.prototype.cloneNode=function(b){return n.cloneNode(this,b);});}t&&(window.HTMLTemplateElement=n);})();(function(t){"use strict";if(!(window.performance&&window.performance.now)){var e=Date.now();window.performance={now:function(){return Date.now()-e;}};}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var a=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return a?function(o){return a(function(){o(performance.now());});}:function(o){return window.setTimeout(o,1e3/60);};}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(a){clearTimeout(a);};}());var i=function(){var a=document.createEvent("Event");return a.initEvent("foo",!0,!0),a.preventDefault(),a.defaultPrevented;}();if(!i){var n=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(n.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0;},configurable:!0}));};}var r=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||r&&typeof window.CustomEvent!="function")&&(window.CustomEvent=function(a,o){o=o||{};var u=document.createEvent("CustomEvent");return u.initCustomEvent(a,!!o.bubbles,!!o.cancelable,o.detail),u;},window.CustomEvent.prototype=window.Event.prototype),!window.Event||r&&typeof window.Event!="function"){var s=window.Event;window.Event=function(a,o){o=o||{};var u=document.createEvent("Event");return u.initEvent(a,!!o.bubbles,!!o.cancelable),u;},window.Event.prototype=s.prototype;}})(window.WebComponents);window.HTMLImports=window.HTMLImports||{flags:{}};(function(t){var e="import",i=(e in document.createElement("link")),n=!!window.ShadowDOMPolyfill,r=function(D){return n?window.ShadowDOMPolyfill.wrapIfNeeded(D):D;},s=r(document),a={get:function(){var D=window.HTMLImports.currentScript||document.currentScript||(document.readyState!=="complete"?document.scripts[document.scripts.length-1]:null);return r(D);},configurable:!0};Object.defineProperty(document,"_currentScript",a),Object.defineProperty(s,"_currentScript",a);var o=/Trident/.test(navigator.userAgent);function u(D,A){A=A||s,T(function(){b(D,A);},A);}var c=o?"complete":"interactive",p="readystatechange";function _(D){return D.readyState==="complete"||D.readyState===c;}function T(D,A){if(_(A))D&&D();else{var C=function(){(A.readyState==="complete"||A.readyState===c)&&(A.removeEventListener(p,C),T(D,A));};A.addEventListener(p,C);}}function y(D){D.target.__loaded=!0;}function b(D,A){var C=A.querySelectorAll("link[rel=import]"),R=0,I=C.length,M=[],F=[];function U(){R==I&&D&&D({allImports:C,loadedImports:M,errorImports:F});}function k(ae){y(ae),M.push(this),R++,U();}function G(ae){F.push(this),R++,U();}if(I)for(var V=0,Y;V<I&&(Y=C[V]);V++)g(Y)?(M.push(this),R++,U()):(Y.addEventListener("load",k),Y.addEventListener("error",G));else U();}function g(D){return i?D.__loaded||D.import&&D.import.readyState!=="loading":D.__importParsed;}if(i){let D=function(R){for(var I=0,M=R.length,F;I<M&&(F=R[I]);I++)A(F)&&C(F);},A=function(R){return R.localName==="link"&&R.rel==="import";},C=function(R){var I=R.import;I?y({target:R}):(R.addEventListener("load",y),R.addEventListener("error",y));};var E=D,S=A,P=C;new MutationObserver(function(R){for(var I=0,M=R.length,F;I<M&&(F=R[I]);I++)F.addedNodes&&D(F.addedNodes);}).observe(document.head,{childList:!0}),function(){if(document.readyState==="loading")for(var R=document.querySelectorAll("link[rel=import]"),I=0,M=R.length,F;I<M&&(F=R[I]);I++)C(F);}();}u(function(D){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=new Date().getTime();var A=s.createEvent("CustomEvent");A.initCustomEvent("HTMLImportsLoaded",!0,!0,D),s.dispatchEvent(A);}),t.IMPORT_LINK_TYPE=e,t.useNative=i,t.rootDocument=s,t.whenReady=u,t.isIE=o;})(window.HTMLImports);(function(t){var e=[],i=function(r){e.push(r);},n=function(){e.forEach(function(r){r(t);});};t.addModule=i,t.initializeModules=n;})(window.HTMLImports);window.HTMLImports.addModule(function(t){var e=/(url\()([^)]*)(\))/g,i=/(@import[\s]+(?!url\())([^;]*)(;)/g,n={resolveUrlsInStyle:function(r,s){var a=r.ownerDocument,o=a.createElement("a");return r.textContent=this.resolveUrlsInCssText(r.textContent,s,o),r;},resolveUrlsInCssText:function(r,s,a){var o=this.replaceUrls(r,a,s,e);return o=this.replaceUrls(o,a,s,i),o;},replaceUrls:function(r,s,a,o){return r.replace(o,function(u,c,p,_){var T=p.replace(/["']/g,"");return a&&(T=new URL(T,a).href),s.href=T,T=s.href,c+"'"+T+"'"+_;});}};t.path=n;});window.HTMLImports.addModule(function(t){var e={async:!0,ok:function(i){return i.status>=200&&i.status<300||i.status===304||i.status===0;},load:function(i,n,r){var s=new XMLHttpRequest();return(t.flags.debug||t.flags.bust)&&(i+="?"+Math.random()),s.open("GET",i,e.async),s.addEventListener("readystatechange",function(a){if
228(s.readyState===4){var o=null;try{var u=s.getResponseHeader("Location");u&&(o=u.substr(0,1)==="/"?location.origin+u:u);}catch(c){console.error(c.message);}n.call(r,!e.ok(s)&&s,s.response||s.responseText,o);}}),s.send(),s;},loadDocument:function(i,n,r){this.load(i,n,r).responseType="document";}};t.xhr=e;});window.HTMLImports.addModule(function(t){var e=t.xhr,i=t.flags,n=function(r,s){this.cache={},this.onload=r,this.oncomplete=s,this.inflight=0,this.pending={};};n.prototype={addNodes:function(r){this.inflight+=r.length;for(var s=0,a=r.length,o;s<a&&(o=r[s]);s++)this.require(o);this.checkDone();},addNode:function(r){this.inflight++,this.require(r),this.checkDone();},require:function(r){var s=r.src||r.href;r.__nodeUrl=s,this.dedupe(s,r)||this.fetch(s,r);},dedupe:function(r,s){if(this.pending[r])return this.pending[r].push(s),!0;var a;return this.cache[r]?(this.onload(r,s,this.cache[r]),this.tail(),!0):(this.pending[r]=[s],!1);},fetch:function(r,s){if(i.load&&console.log("fetch",r,s),!r)setTimeout(function(){this.receive(r,s,{error:"href must be specified"},null);}.bind(this),0);else if(r.match(/^data:/)){var a=r.split(","),o=a[0],u=a[1];o.indexOf(";base64")>-1?u=atob(u):u=decodeURIComponent(u),setTimeout(function(){this.receive(r,s,null,u);}.bind(this),0);}else{var c=function(p,_,T){this.receive(r,s,p,_,T);}.bind(this);e.load(r,c);}},receive:function(r,s,a,o,u){this.cache[r]=o;for(var c=this.pending[r],p=0,_=c.length,T;p<_&&(T=c[p]);p++)this.onload(r,T,o,a,u),this.tail();this.pending[r]=null;},tail:function(){--this.inflight,this.checkDone();},checkDone:function(){this.inflight||this.oncomplete();}},t.Loader=n;});window.HTMLImports.addModule(function(t){var e=function(i){this.addCallback=i,this.mo=new MutationObserver(this.handler.bind(this));};e.prototype={handler:function(i){for(var n=0,r=i.length,s;n<r&&(s=i[n]);n++)s.type==="childList"&&s.addedNodes.length&&this.addedNodes(s.addedNodes);},addedNodes:function(i){this.addCallback&&this.addCallback(i);for(var n=0,r=i.length,s,a;n<r&&(s=i[n]);n++)s.children&&s.children.length&&this.addedNodes(s.children);},observe:function(i){this.mo.observe(i,{childList:!0,subtree:!0});}},t.Observer=e;});window.HTMLImports.addModule(function(t){var e=t.path,i=t.rootDocument,n=t.flags,r=t.isIE,s=t.IMPORT_LINK_TYPE,a="link[rel="+s+"]",o={documentSelectors:a,importsSelectors:[a,"link[rel=stylesheet]:not([type])","style:not([type])","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var y=this.nextToParse();y&&this.parse(y);},parse:function(y){if(this.isParsed(y)){n.parse&&console.log("[%s] is already parsed",y.localName);return;}var b=this[this.map[y.localName]];b&&(this.markParsing(y),b.call(this,y));},parseDynamic:function(y,b){this.dynamicElements.push(y),b||this.parseNext();},markParsing:function(y){n.parse&&console.log("parsing",y),this.parsingElement=y;},markParsingComplete:function(y){y.__importParsed=!0,this.markDynamicParsingComplete(y),y.__importElement&&(y.__importElement.__importParsed=!0,this.markDynamicParsingComplete(y.__importElement)),this.parsingElement=null,n.parse&&console.log("completed",y);},markDynamicParsingComplete:function(y){var b=this.dynamicElements.indexOf(y);b>=0&&this.dynamicElements.splice(b,1);},parseImport:function(y){if(y.import=y.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(y),y.import&&(y.import.__importParsed=!0),this.markParsingComplete(y),y.__resource&&!y.__error?y.dispatchEvent(new CustomEvent("load",{bubbles:!1})):y.dispatchEvent(new CustomEvent("error",{bubbles:!1})),y.__pending)for(var b;y.__pending.length;)b=y.__pending.shift(),b&&b({target:y});this.parseNext();},parseLink:function(y){u(y)?this.parseImport(y):(y.href=y.href,this.parseGeneric(y));},parseStyle:function(y){var b=y;y=T(y),b.__appliedElement=y,y.__importElement=b,this.parseGeneric(y);},parseGeneric:function(y){this.trackElement(y),this.addElementToDocument(y);},rootImportForElement:function(y){for(var b=y;b.ownerDocument.__importLink;)b=b.ownerDocument.__importLink;return b;},addElementToDocument:function(y){var b=this.rootImportForElement(y.__importElement||y);b.parentNode.insertBefore(y,b);},trackElement:function(y,b){var g=this,E=function(R){y.removeEventListener("load",E),y.removeEventListener("error",E
228),b&&b(R),g.markParsingComplete(y),g.parseNext();};if(y.addEventListener("load",E),y.addEventListener("error",E),r&&y.localName==="style"){var S=!1;if(y.textContent.indexOf("@import")==-1)S=!0;else if(y.sheet){S=!0;for(var P=y.sheet.cssRules,D=P?P.length:0,A=0,C;A<D&&(C=P[A]);A++)C.type===CSSRule.IMPORT_RULE&&(S=S&&!!C.styleSheet);}S&&setTimeout(function(){y.dispatchEvent(new CustomEvent("load",{bubbles:!1}));});}},parseScript:function(y){var b=document.createElement("script");b.__importElement=y,b.src=y.src?y.src:c(y),t.currentScript=y,this.trackElement(b,function(g){b.parentNode&&b.parentNode.removeChild(b),t.currentScript=null;}),this.addElementToDocument(b);},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(i)||this.nextToParseDynamic());},nextToParseInDoc:function(y,b){if(y&&this._mayParse.indexOf(y)<0){this._mayParse.push(y);for(var g=y.querySelectorAll(this.parseSelectorsForNode(y)),E=0,S=g.length,P;E<S&&(P=g[E]);E++)if(!this.isParsed(P))return this.hasResource(P)?u(P)?this.nextToParseInDoc(P.__doc,P):P:void 0;}return b;},nextToParseDynamic:function(){return this.dynamicElements[0];},parseSelectorsForNode:function(y){var b=y.ownerDocument||y;return b===i?this.documentSelectors:this.importsSelectors;},isParsed:function(y){return y.__importParsed;},needsDynamicParsing:function(y){return this.dynamicElements.indexOf(y)>=0;},hasResource:function(y){return!(u(y)&&y.__doc===void 0);}};function u(y){return y.localName==="link"&&y.rel===s;}function c(y){var b=p(y);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(b);}function p(y){return y.textContent+_(y);}function _(y){var b=y.ownerDocument;b.__importedScripts=b.__importedScripts||0;var g=y.ownerDocument.baseURI,E=b.__importedScripts?"-"+b.__importedScripts:"";return b.__importedScripts++,`
229//# sourceURL=`+g+E+`.js
230`;}function T(y){var b=y.ownerDocument.createElement("style");return b.textContent=y.textContent,e.resolveUrlsInStyle(b),b;}t.parser=o,t.IMPORT_SELECTOR=a;});window.HTMLImports.addModule(function(t){var e=t.flags,i=t.IMPORT_LINK_TYPE,n=t.IMPORT_SELECTOR,r=t.rootDocument,s=t.Loader,a=t.Observer,o=t.parser,u={documents:{},documentPreloadSelectors:n,importsPreloadSelectors:[n].join(","),loadNode:function(g){c.addNode(g);},loadSubtree:function(g){var E=this.marshalNodes(g);c.addNodes(E);},marshalNodes:function(g){return g.querySelectorAll(this.loadSelectorsForNode(g));},loadSelectorsForNode:function(g){var E=g.ownerDocument||g;return E===r?this.documentPreloadSelectors:this.importsPreloadSelectors;},loaded:function(g,E,S,P,D){if(e.load&&console.log("loaded",g,E),E.__resource=S,E.__error=P,p(E)){var A=this.documents[g];A===void 0&&(A=P?null:y(S,D||g),A&&(A.__importLink=E,this.bootDocument(A)),this.documents[g]=A),E.__doc=A;}o.parseNext();},bootDocument:function(g){this.loadSubtree(g),this.observer.observe(g),o.parseNext();},loadedAll:function(){o.parseNext();}},c=new s(u.loaded.bind(u),u.loadedAll.bind(u));u.observer=new a();function p(g){return _(g,i);}function _(g,E){return g.localName==="link"&&g.getAttribute("rel")===E;}function T(g){return!!Object.getOwnPropertyDescriptor(g,"baseURI");}function y(g,E){var S=document.implementation.createHTMLDocument(i);S._URL=E;var P=S.createElement("base");P.setAttribute("href",E),!S.baseURI&&!T(S)&&Object.defineProperty(S,"baseURI",{value:E});var D=S.createElement("meta");return D.setAttribute("charset","utf-8"),S.head.appendChild(D),S.head.appendChild(P),S.body.innerHTML=g,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(S),S;}if(!document.baseURI){var b={get:function(){var g=document.querySelector("base");return g?g.href:window.location.href;},configurable:!0};Object.defineProperty(document,"baseURI",b),Object.defineProperty(r,"baseURI",b);}t.importer=u,t.importLoader=c;});window.HTMLImports.addModule(function(t){var e=t.parser,i=t.importer,n={added:function(s){for(var a,o,u,c=0,p=s.length,_;c<p&&(_=s[c]);c++)a||(a=_.ownerDocument,o=e.isParsed(a)),u=this.shouldLoadNode(_),u&&i.loadNode(_),this.shouldParseNode(_)&&o&&e.parseDynamic(_,u);},shouldLoadNode:function(s){return s.nodeType===1&&r.call(s,i.loadSelectorsForNode(s));},shouldParseNode:function(s){return s.nodeType===1&&r.call(s,e.parseSelectorsForNode(s));}};i.observer.addCallback=n.added.bind(n);var r=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector;});(function(t){var e=t.initializeModules,i=t.isIE;if(t.useNative)return;e();var n=t.rootDocument;function r(){window.HTMLImports.importer.bootDocument(n);}document.readyState==="complete"||document.readyState==="interactive"&&!window.attachEvent?r():document.addEventListener("DOMContentLoaded",r);})(window.HTMLImports);window.CustomElements=window.CustomElements||{flags:{}};(function(t){var e=t.flags,i=[],n=function(s){i.push(s);}
230,r=function(){i.forEach(function(s){s(t);});};t.addModule=n,t.initializeModules=r,t.hasNative=!!document.registerElement,t.isIE=/Trident/.test(navigator.userAgent),t.useNative=!e.register&&t.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative);})(window.CustomElements);window.CustomElements.addModule(function(t){var e=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";function i(o,u){n(o,function(c){if(u(c))return!0;r(c,u);}),r(o,u);}function n(o,u,c){var p=o.firstElementChild;if(!p)for(p=o.firstChild;p&&p.nodeType!==Node.ELEMENT_NODE;)p=p.nextSibling;for(;p;)u(p,c)!==!0&&n(p,u,c),p=p.nextElementSibling;return null;}function r(o,u){for(var c=o.shadowRoot;c;)i(c,u),c=c.olderShadowRoot;}function s(o,u){a(o,u,[]);}function a(o,u,c){if(o=window.wrap(o),!(c.indexOf(o)>=0)){c.push(o);for(var p=o.querySelectorAll("link[rel="+e+"]"),_=0,T=p.length,y;_<T&&(y=p[_]);_++)y.import&&a(y.import,u,c);u(o);}}t.forDocumentTree=s,t.forSubtree=i;});window.CustomElements.addModule(function(t){var e=t.flags,i=t.forSubtree,n=t.forDocumentTree;function r(U,k){return s(U,k)||a(U,k);}function s(U,k){if(t.upgrade(U,k))return!0;k&&T(U);}function a(U,k){i(U,function(G){if(s(G,k))return!0;});}var o=window.MutationObserver._isPolyfilled&&e["throttle-attached"];t.hasPolyfillMutations=o,t.hasThrottledAttached=o;var u=!1,c=[];function p(U){c.push(U),u||(u=!0,setTimeout(_));}function _(){u=!1;for(var U=c,k=0,G=U.length,V;k<G&&(V=U[k]);k++)V();c=[];}function T(U){o?p(function(){y(U);}):y(U);}function y(U){U.__upgraded__&&!U.__attached&&(U.__attached=!0,U.attachedCallback&&U.attachedCallback());}function b(U){g(U),i(U,function(k){g(k);});}function g(U){o?p(function(){E(U);}):E(U);}function E(U){U.__upgraded__&&U.__attached&&(U.__attached=!1,U.detachedCallback&&U.detachedCallback());}function S(U){for(var k=U,G=window.wrap(document);k;){if(k==G)return!0;k=k.parentNode||k.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&k.host;}}function P(U){if(U.shadowRoot&&!U.shadowRoot.__watched){e.dom&&console.log("watching shadow-root for: ",U.localName);for(var k=U.shadowRoot;k;)R(k),k=k.olderShadowRoot;}}function D(U,k){if(e.dom){var G=k[0];if(G&&G.type==="childList"&&G.addedNodes&&G.addedNodes){for(var V=G.addedNodes[0];V&&V!==document&&!V.host;)V=V.parentNode;var Y=V&&(V.URL||V._URL||V.host&&V.host.localName)||"";Y=Y.split("/?").shift().split("/").pop();}console.group("mutations (%d) [%s]",k.length,Y||"");}var ae=S(U);
230k.forEach(function(oe){oe.type==="childList"&&(C(oe.addedNodes,function(pe){pe.localName&&r(pe,ae);}),C(oe.removedNodes,function(pe){pe.localName&&b(pe);}));}),e.dom&&console.groupEnd();}function A(U){for(U=window.wrap(U),U||(U=window.wrap(document));U.parentNode;)U=U.parentNode;var k=U.__observer;k&&(D(U,k.takeRecords()),_());}var C=Array.prototype.forEach.call.bind(Array.prototype.forEach);function R(U){if(!U.__observer){var k=new MutationObserver(D.bind(this,U));k.observe(U,{childList:!0,subtree:!0}),U.__observer=k;}}function I(U){U=window.wrap(U),e.dom&&console.group("upgradeDocument: ",U.baseURI.split("/").pop());var k=U===window.wrap(document);r(U,k),R(U),e.dom&&console.groupEnd();}function M(U){n(U,I);}var F=Element.prototype.createShadowRoot;F&&(Element.prototype.createShadowRoot=function(){var U=F.call(this);return window.CustomElements.watchShadow(this),U;}),t.watchShadow=P,t.upgradeDocumentTree=M,t.upgradeDocument=I,t.upgradeSubtree=a,t.upgradeAll=r,t.attached=T,t.takeRecords=A;});window.CustomElements.addModule(function(t){var e=t.flags;function i(o,u){if(o.localName==="template"&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(o),!o.__upgraded__&&o.nodeType===Node.ELEMENT_NODE){var c=o.getAttribute("is"),p=t.getRegisteredDefinition(o.localName)||t.getRegisteredDefinition(c);if(p&&(c&&p.tag==o.localName||!c&&!p.extends))return n(o,p,u);}}function n(o,u,c){return e.upgrade&&console.group("upgrade:",o.localName),u.is&&o.setAttribute("is",u.is),r(o,u),o.__upgraded__=!0,a(o),c&&t.attached(o),t.upgradeSubtree(o,c),e.upgrade&&console.groupEnd(),o;}function r(o,u){Object.__proto__||s(o,u.prototype,u.native),o.__proto__=u.prototype;}function s(o,u,c){for(var p={},_=u;_!==c&&_!==HTMLElement.prototype;){for(var T=Object.getOwnPropertyNames(_),y=0,b;b=T[y];y++)p[b]||(Object.defineProperty(o,b,Object.getOwnPropertyDescriptor(_,b)),p[b]=1);_=Object.getPrototypeOf(_);}}function a(o){o.createdCallback&&o.createdCallback();}t.upgrade=i,t.upgradeWithDefinition=n,t.implementPrototype=r;});window.CustomElements.addModule(function(t){var e=t.isIE,i=t.upgradeDocumentTree,n=t.upgradeAll,r=t.upgradeWithDefinition,s=t.implementPrototype,a=t.useNative;function o(k,G){var V=G||{};if(!k)throw new Error("document.registerElement: first argument `name` must not be empty");if(k.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(k)+"'.");if(p(k))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(k)+"'. The type name is invalid.");if(S(k))throw new Error("DuplicateDefinitionError: a type with name '"+String(k)+"' is already registered");return V.prototype||(V.prototype=Object.create(HTMLElement.prototype)),V.__name=k.toLowerCase(),V.extends&&(V.extends=V.extends.toLowerCase()),V.lifecycle=V.lifecycle||{},V.ancestry=T(V.extends),y(V),b(V),u(V.prototype),P(V.__name,V),V.ctor=D(V),V.ctor.prototype=V.prototype,V.prototype.constructor=V.ctor,t.ready&&i(document),V.ctor;}function u(k){if(!k.setAttribute._polyfilled){var G=k.setAttribute;k.setAttribute=function(Y,ae){c.call(this,Y,ae,G);};var V=k.removeAttribute;k.removeAttribute=function(Y){c.call(this,Y,null,V);},k.setAttribute._polyfilled=!0;}}function c(k,G,V){k=k.toLowerCase();var Y=this.getAttribute(k);V.apply(this,arguments);var ae=this.getAttribute(k);this.attributeChangedCallback&&ae!==Y&&this.attributeChangedCallback(k,Y,ae);}function p(k){for(var G=0;G<_.length;G++)if(k===_[G])return!0;}var _=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];function T(k){var G=S(k);return G?T(G.extends).concat([G]):[];}function y(k){for(var G=k.extends,V=0,Y;Y=k.ancestry[V];V++)G=Y.is&&Y.tag;k.tag=G||k.__name,G&&(k.is=k.__name);}function b(k){if(!Object.__proto__){var G=HTMLElement.prototype;if(k.is){var V=document.createElement(k.tag);G=Object.getPrototypeOf(V);}for(var Y=k.prototype,ae,oe=!1;Y;)Y==G&&(oe=!0),ae=Object.getPrototypeOf(Y),ae&&(Y.__proto__=ae),Y=ae;oe||console.warn(k.tag+" prototype not found in prototype chain for "+k.is),k.native=G;}}function g(k){return r(I(k.tag),k);}var E={};function S(k){if(k)return E[k.toLowerCase()];}function P(k,G){E[k]=G;}function D(k){return function(){return g(k);};}var A="http://www.w3.org/1999/xhtml";function C(k,G,V){return k===A?R(G,V):M(k,G);}function R(k,G){k&&(k=k.toLowerCase()),G&&(G=G.toLowerCase());var V=S(G||k);
230if(V){if(k==V.tag&&G==V.is)return new V.ctor();if(!G&&!V.is)return new V.ctor();}var Y;return G?(Y=R(k),Y.setAttribute("is",G),Y):(Y=I(k),k.indexOf("-")>=0&&s(Y,HTMLElement),Y);}var I=document.createElement.bind(document),M=document.createElementNS.bind(document),F;!Object.__proto__&&!a?F=function(k,G){if(k instanceof G)return!0;for(var V=k;V;){if(V===G.prototype)return!0;V=V.__proto__;}return!1;}:F=function(k,G){return k instanceof G;};function U(k,G){var V=k[G];k[G]=function(){var Y=V.apply(this,arguments);return n(Y),Y;};}U(Node.prototype,"cloneNode"),U(document,"importNode"),document.registerElement=o,document.createElement=R,document.createElementNS=C,t.registry=E,t.instanceof=F,t.reservedTagList=_,t.getRegisteredDefinition=S,document.register=document.registerElement;});(function(t){var e=t.useNative,i=t.initializeModules,n=t.isIE;if(e){var r=function(){};t.watchShadow=r,t.upgrade=r,t.upgradeAll=r,t.upgradeDocumentTree=r,t.upgradeSubtree=r,t.takeRecords=r,t.instanceof=function(c,p){return c instanceof p;};}else i();var s=t.upgradeDocumentTree,a=t.upgradeDocument;window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(c){return c;}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(c){c.import&&a(wrap(c.import));});function o(){s(window.wrap(document)),window.CustomElements.ready=!0;var c=window.requestAnimationFrame||function(p){setTimeout(p,16);};c(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}));});});}if(document.readyState==="complete"||t.flags.eager)o();else if(document.readyState==="interactive"&&!window.attachEvent&&(!window.HTMLImports||window.HTMLImports.ready))o();else{var u=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(u,o);}})(window.CustomElements);(function(t){var e=document.createElement("style");e.textContent=`body {transition: opacity ease-in 0.2s; } 
231body[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } 
232`;var i=document.querySelector("head");i.insertBefore(e,i.firstChild);})(window.WebComponents);});var ix=q((AU,tx)=>{"use strict";function Im(t){return typeof window.navigator.userAgent=="string"&&window.navigator.userAgent.indexOf(t)>=0;}tx.exports=function(){var t=!document.registerElement,e=Im("CriOS"),i;i=Im("Android")&&Im("Chrome/")&&window.navigator.presentation,(i||e)&&t&&ex();};});var rx=q((EU,nx)=>{"use strict";nx.exports=function(t){let e=t.getComponent("Button");class i extends e{constructor(r,s){super(r,s),r.on("chromecastConnected",this._onChromecastConnected.bind(this)),r.on("chromecastDisconnected",this._onChromecastDisconnected.bind(this)),r.on("chromecastDevicesAvailable",this._onChromecastDevicesAvailable.bind(this)),r.on("chromecastDevicesUnavailable",this._onChromecastDevicesUnavailable.bind(this)),r.chromecastSessionManager&&r.chromecastSessionManager.hasAvailableDevices()?this._onChromecastDevicesAvailable():this._onChromecastDevicesUnavailable(),s.addCastLabelToButton?(this.el().classList.add("vjs-chromecast-button-lg"),this._labelEl=document.createElement("span"),this._labelEl.classList.add("vjs-chromecast-button-label"),this._updateCastLabelText(),this.el().appendChild(this._labelEl)):this.controlText("Open Chromecast menu");}buildCSSClass(){return"vjs-chromecast-button "+(this._isChromecastConnected?"vjs-chromecast-casting-state ":"")+(this.options_.addCastLabelToButton?"vjs-chromecast-button-lg ":"")+e.prototype.buildCSSClass();}handleClick(){this.player().trigger("chromecastRequested");}_onChromecastConnected(){this._isChromecastConnected=!0,this._reloadCSSClasses(),this._updateCastLabelText();}_onChromecastDisconnected(){this._isChromecastConnected=!1,this._reloadCSSClasses(),this._updateCastLabelText();}_onChromecastDevicesAvailable(){this.show();}_onChromecastDevicesUnavailable(){this.hide();}
232_reloadCSSClasses(){this.el_&&(this.el_.className=this.buildCSSClass());}_updateCastLabelText(){this._labelEl&&(this._labelEl.textContent=this._isChromecastConnected?this.localize("Disconnect Cast"):this.localize("Cast"));}}t.registerComponent("chromecastButton",i);};});var km=q((xU,sx)=>{"use strict";var uM=(()=>{class t{constructor(i){this.player=i,this._sessionListener=this._onSessionStateChange.bind(this),this._castListener=this._onCastStateChange.bind(this),this._addCastContextEventListeners(),this.player.on("dispose",this._removeCastContextEventListeners.bind(this)),this._notifyPlayerOfDevicesAvailabilityChange(this.getCastContext().getCastState()),this.remotePlayer=new cast.framework.RemotePlayer(),this.remotePlayerController=new cast.framework.RemotePlayerController(this.remotePlayer);}static hasConnected=!1;_addCastContextEventListeners(){var i=cast.framework.CastContextEventType.SESSION_STATE_CHANGED,n=cast.framework.CastContextEventType.CAST_STATE_CHANGED;this.getCastContext().addEventListener(i,this._sessionListener),this.getCastContext().addEventListener(n,this._castListener);}_removeCastContextEventListeners(){var i=cast.framework.CastContextEventType.SESSION_STATE_CHANGED,n=cast.framework.CastContextEventType.CAST_STATE_CHANGED;this.getCastContext().removeEventListener(i,this._sessionListener),this.getCastContext().removeEventListener(n,this._castListener);}_onSessionStateChange(i){i.sessionState===cast.framework.SessionState.SESSION_ENDED&&(this.player.trigger("chromecastDisconnected"),this._reloadTech());}_onCastStateChange(i){this._notifyPlayerOfDevicesAvailabilityChange(i.castState);}_notifyPlayerOfDevicesAvailabilityChange(i){this.hasAvailableDevices(i)?this.player.trigger("chromecastDevicesAvailable"):this.player.trigger("chromecastDevicesUnavailable");}hasAvailableDevices(i){return i=i||this.getCastContext().getCastState(),i===cast.framework.CastState.NOT_CONNECTED||i===cast.framework.CastState.CONNECTING||i===cast.framework.CastState.CONNECTED;}openCastMenu(){var i;this.player.currentSource()&&(i=function(){t.hasConnected=!0,this.player.trigger("chromecastConnected"),this._reloadTech();}.bind(this),this.getCastContext().requestSession().then(i,function(){}));}_reloadTech(){var i=this.player,n=i.currentTime(),r=i.paused(),s=i.currentSources();i.src(s),i.ready(function(){r?i.pause():i.play(),i.currentTime(n||0);});}getCastContext(){return cast.framework.CastContext.getInstance();}getRemotePlayer(){return this.remotePlayer;}getRemotePlayerController(){return this.remotePlayerController;}static isChromecastAPIAvailable(){return window.chrome&&window.chrome.cast&&window.cast;}static isChromecastConnected(){return t.isChromecastAPIAvailable()&&cast.framework.CastContext.getInstance().getCastState()===cast.framework.CastState.CONNECTED&&t.hasConnected;}}return t;})();sx.exports=uM;});var ox=q((CU,ax)=>{"use strict";var Pm=class{constructor(){this._el=this._createDOMElement();}_createDOMElement(){var e=this._createElement("div","vjs-tech vjs-tech-chromecast"),i=this._createElement("div","vjs-tech-chromecast-poster"),n=this._createElement("img","vjs-tech-chromecast-poster-img"),r=this._createElement("div","vjs-tech-chromecast-title"),s=this._createElement("div","vjs-tech-chromecast-subtitle"),a=this._createElement("div","vjs-tech-chromecast-title-container");return i.appendChild(n),a.appendChild(r),a.appendChild(s),e.appendChild(a),e.appendChild(i),e;}_createElement(e,i){var n=document.createElement(e);return n.className=i,n;}getDOMElement(){return this._el;}_findPosterEl(){return this._el.querySelector(".vjs-tech-chromecast-poster");}_findPosterImageEl(){return this._el.querySelector(".vjs-tech-chromecast-poster-img");}_findTitleEl(){return this._el.querySelector(".vjs-tech-chromecast-title");}_findSubtitleEl(){return this._el.querySelector(".vjs-tech-chromecast-subtitle");}updatePoster(e){var i=this._findPosterImageEl();this._poster=e||null,e?(i.setAttribute("src",e),i.classList.remove("vjs-tech-chromecast-poster-img-empty")):(i.removeAttribute("src"),i.classList.add("vjs-tech-chromecast-poster-img-empty"));}getPoster(){return this._poster;}updateTitle(e){var i=this._findTitleEl();this._title=e,e?(i.innerHTML=e,i.classList.remove("vjs-tech-chromecast-title-empty")):i.classList.add("vjs-tech-chromecast-title-empty");}updateSubtitle(e){var i=this._findSubtitleEl();this._subtitle=e,e?(i.innerHTML=e,i.classList.remove("vjs-tech-chromecast-subtitle-empty")):i.classList.add("vjs-tech-chromecast-subtitle-empty");}};ax.exports=Pm;});var dx=q((wU,ux)=>{"use strict";var lx=km(),dM=ox();ux.exports=function(t){var e=t.getComponent("Tech"),i=10*1e3;let n=(()=>
232{class r extends e{constructor(a){super(a),this.featuresVolumeControl=!0,this.featuresPlaybackRate=!1,this.movingMediaElementInDOM=!1,this.featuresFullscreenResize=!0,this.featuresTimeupdateEvents=!0,this.featuresProgressEvents=!1,this.featuresNativeTextTracks=!1,this.featuresNativeAudioTracks=!1,this.featuresNativeVideoTracks=!1,this.videojs=t,this._eventListeners=[],this.videojsPlayer=this.videojs(a.playerId),this._chromecastSessionManager=this.videojsPlayer.chromecastSessionManager,this._ui.updatePoster(this.videojsPlayer.poster()),this._remotePlayer=this._chromecastSessionManager.getRemotePlayer(),this._remotePlayerController=this._chromecastSessionManager.getRemotePlayerController(),this._listenToPlayerControllerEvents(),this.on("dispose",this._removeAllEventListeners.bind(this)),this._hasPlayedAnyItem=!1,this._requestTitle=a.requestTitleFn||function(){},this._requestSubtitle=a.requestSubtitleFn||function(){},this._requestCustomData=a.requestCustomDataFn||function(){},this._modifyLoadRequestFn=a.modifyLoadRequestFn||function(o){return o;},this._initialStartTime=a.startTime||0,this._playSource(a.source,this._initialStartTime),this.ready(function(){this.setMuted(a.muted);}.bind(this));}createEl(){return this._ui=this._ui||new dM(),this._ui.getDOMElement();}play(){this.paused()&&(this.ended()&&!this._isMediaLoading?this._playSource({src:this.videojsPlayer.src()},0):this._remotePlayerController.playOrPause());}pause(){!this.paused()&&this._remotePlayer.canPause&&this._remotePlayerController.playOrPause();}paused(){return this._remotePlayer.isPaused||this.ended()||this._remotePlayer.playerState===null;}setSource(a){this._currentSource&&this._currentSource.src===a.src&&this._currentSource.type===a.type||(this._currentSource=a,this._playSource(a,0));}_playSource(a,o){var u=this._getCastSession(),c=new chrome.cast.media.MediaInfo(a.src,a.type),p=this._requestTitle(a),_=this._requestSubtitle(a),T=this.poster(),y=this._requestCustomData(a),b;this.trigger("waiting"),this._clearSessionTimeout(),c.metadata=new chrome.cast.media.GenericMediaMetadata(),c.metadata.metadataType=chrome.cast.media.MetadataType.GENERIC,c.metadata.title=p,c.metadata.subtitle=_,c.streamType=this.videojsPlayer.liveTracker&&this.videojsPlayer.liveTracker.isLive()?chrome.cast.media.StreamType.LIVE:chrome.cast.media.StreamType.BUFFERED,T&&(c.metadata.images=[{url:T}]),y&&(c.customData=y),this._ui.updateTitle(p),this._ui.updateSubtitle(_),b=new chrome.cast.media.LoadRequest(c),b.autoplay=!0,b.currentTime=o,b=this._modifyLoadRequestFn(b),this._isMediaLoading=!0,this._hasPlayedCurrentItem=!1,u.loadMedia(b).then(function(){this._clearSessionTimeout(),this._hasPlayedAnyItem||this.triggerReady(),this.trigger("loadstart"),this.trigger("loadeddata"),this.trigger("play"),this.trigger("playing"),this._hasPlayedAnyItem=!0,this._isMediaLoading=!1,this._getMediaSession().addUpdateListener(this._onMediaSessionStatusChanged.bind(this));}.bind(this),this._triggerErrorEvent.bind(this));}setCurrentTime(a){var o=this.duration();a>o||!this._remotePlayer.canSeek||(this._remotePlayer.currentTime=Math.min(o-1,a),this._remotePlayerController.seek(),this._triggerTimeUpdateEvent());}currentTime(){return this._hasPlayedAnyItem?this._remotePlayer.currentTime:this._initialStartTime;}duration(){return this._hasPlayedAnyItem?this._remotePlayer.duration:this.videojsPlayer.duration();}ended(){var a=this._getMediaSession();return!a&&this._hasMediaSessionEnded?!0:a?a.idleReason===chrome.cast.media.IdleReason.FINISHED:!1;}volume(){return this._remotePlayer.volumeLevel;}setVolume(a){this._remotePlayer.volumeLevel=a,this._remotePlayerController.setVolumeLevel(),this._triggerVolumeChangeEvent();}muted(){return this._remotePlayer.isMuted;}setMuted(a){(this._remotePlayer.isMuted&&!a||!this._remotePlayer.isMuted&&a)&&this._remotePlayerController.muteOrUnmute();}poster(){return this._ui.getPoster();}setPoster(a){this._ui.updatePoster(a);}buffered(){}seekable(){return this.videojs.createTimeRange(0,this.duration());}controls(){return!1;}playsinline(){return!0;}supportsFullScreen(){return!0;}setAutoplay(){}playbackRate(){var a=this._getMediaSession();return a?a.playbackRate:1;}setPlaybackRate(){}preload(){}load(){}readyState(){return this._remotePlayer.playerState==="IDLE"||this._remotePlayer.playerState==="BUFFERING"?0:4;}_listenToPlayerControllerEvents(){var a=cast.framework.RemotePlayerEventType;this._addEventListener(this._remotePlayerController,a.PLAYER_STATE_CHANGED,this._onPlayerStateChanged,this),this._addEventListener(this._remotePlayerController,a.VOLUME_LEVEL_CHANGED,this._triggerVolumeChangeEvent,this),this._addEventListener(this._remotePlayerController,a.IS_MUTED_CHANGED,this._triggerVolumeChangeEvent,this),this._addEventListener(this._remotePlayerController,a.CURRENT_TIME_CHANGED,this._triggerTimeUpdateEvent,this),this._addEventListener(this._remotePlayerController,a.DURATION_CHANGED,this._triggerDurationChangeEvent,this);}_addEventListener(a,o,u,c){var p;p={target:a,type:o,callback:u,context:c,listener:u.bind(c)},a.addEventListener(o,p.listener),this._eventListeners.push(p);}_removeAllEventListeners(){for(;this._eventListeners.length>0;)this._removeEventListener(this._eventListeners[0]);this._eventListeners=[];}
232_removeEventListener(a){var o=-1,u=!1,c;for(a.target.removeEventListener(a.type,a.listener),c=0;c<this._eventListeners.length;c++)if(u=this._eventListeners[c].target===a.target&&this._eventListeners[c].type===a.type&&this._eventListeners[c].callback===a.callback&&this._eventListeners[c].context===a.context,u){o=c;break;}o!==-1&&this._eventListeners.splice(o,1);}_onPlayerStateChanged(){var a=chrome.cast.media.PlayerState,o=this._remotePlayer.playerState;o===a.PLAYING?(this._hasPlayedCurrentItem=!0,this.trigger("play"),this.trigger("playing")):o===a.PAUSED?this.trigger("pause"):o===a.IDLE&&this.ended()||o===null&&this._hasPlayedCurrentItem?(this._hasPlayedCurrentItem=!1,this._closeSessionOnTimeout(),this.trigger("ended"),this._triggerTimeUpdateEvent()):o===a.BUFFERING&&this.trigger("waiting");}_onMediaSessionStatusChanged(a){this._hasMediaSessionEnded=!!a;}_closeSessionOnTimeout(){this._clearSessionTimeout(),this._sessionTimeoutID=setTimeout(function(){var a=this._getCastSession();a&&a.endSession(!0),this._clearSessionTimeout();}.bind(this),i);}_clearSessionTimeout(){this._sessionTimeoutID&&(clearTimeout(this._sessionTimeoutID),this._sessionTimeoutID=!1);}_getCastContext(){return this._chromecastSessionManager.getCastContext();}_getCastSession(){return this._getCastContext().getCurrentSession();}_getMediaSession(){var a=this._getCastSession();return a?a.getMediaSession():null;}_triggerVolumeChangeEvent(){this.trigger("volumechange");}_triggerTimeUpdateEvent(){this.trigger("timeupdate");}_triggerDurationChangeEvent(){this.trigger("durationchange");}_triggerErrorEvent(){this.trigger("error");}}return r.canPlaySource=()=>lx.isChromecastConnected(),r.isSupported=()=>lx.isChromecastConnected(),r;})();t.registerTech("chromecast",n);};});var px=q((DU,fx)=>{"use strict";var Lm=km(),cx=1e3,cM=30*1e3;function hM(t){var e=cast.framework.CastContext.getInstance();e.setOptions({receiverApplicationId:t.receiverAppID||chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED});}function fM(t){t.chromecastSessionManager.openCastMenu();}function pM(t,e){var i;e.addButtonToControlBar&&!t.controlBar.getChild("chromecastButton")&&(i=t.controlBar.children().length,typeof e.buttonPositionIndex<"u"&&(i=e.buttonPositionIndex>=0?e.buttonPositionIndex:t.controlBar.children().length+e.buttonPositionIndex),t.controlBar.addChild("chromecastButton",e,i)),t.on("chromecastRequested",fM.bind(null,t));}function mM(t){t.chromecastSessionManager||(t.chromecastSessionManager=new Lm(t));}function hx(t,e){hM(e),mM(t),pM(t,e);}function gM(t,e){var i=cM/cx,n=1,r;r=setInterval(function(){if(n>i){clearInterval(r);return;}Lm.isChromecastAPIAvailable()&&(clearInterval(r),hx(t,e)),n=n+1;},cx);}fx.exports=function(t){t.registerPlugin("chromecast",function(e){var i=Object.assign({addButtonToControlBar:!0},e||{});this.ready(function(){this.controlBar&&(Lm.isChromecastAPIAvailable()?hx(this,i):gM(this,i));}.bind(this));});};});var gx=q((IU,mx)=>{"use strict";var vM=ix(),_M=rx(),yM=dx(),bM=px();mx.exports=function(t,e){var i=Object.assign({preloadWebComponents:!1},e);i.preloadWebComponents&&vM(),t=t||window.videojs,_M(t),yM(t),bM(t);};});var QC=["video",""],JC=(t,e)=>[t,"videos",e],ZC=(t,e)=>({startTime:t,endTime:e});function ew(t,e){if(t&1&&(ne(0,"span",8),Xe(1),se()),t&2){let i=X();ee(),Bn(" ",i.linkLabel," ");}}function tw(t,e){if(t&1&&(ze(0,"yo-video-card",9),Wt(1,"async")),t&2){let i=X();J("imageUrl",i.video.posterImage)("startDate",i.video.streamState==="SCHEDULED"?i.video.startTime:null)("duration",i.video.duration||0)("scheduledTime",i.video.startTime&&i.video.endTime?fr(11,ZC,i.video.startTime,i.video.endTime):void 0)("isLive",i.video.streamState==="LIVE")("liveLabel",i.liveLabel)("isUpcoming",i.video.streamState==="SCHEDULED")("isLocked",!!ki(1,9,i.isVideoLocked$))("lockText",i.videoLockText);}}function iw(t,e){if(t&1&&(ne(0,"span",10),Xe(1),se()),t&2){let i=X();ee(),Bn(" ",i.linkLabel," ");}}var Hl=(()=>{let e=class e{constructor(n,r){this.scopeService=n,this.accessControlService=r,this.direction="RIGHT",this.liveLabel=Bc.liveLabel,this.videoLockText=Bc.videoLockText;}ngOnInit(){if(this.$homepageUrl=this.scopeService.scope$.pipe(_t(n=>n?this.scopeService.getHomepageUrlFromScope(n):"")),!this.channel)throw new Error("Channel is undefined");this.isVideoLocked$=this.accessControlService.isVideoLocked$(this.channel?.docId,this.video);}};e.ɵfac=function(r){return new(r||e)(Ye(es),Ye(Pl));},e.ɵcmp=qi({type:e,selectors:[["joymo-video-control","video",""]],inputs:{video:"video",direction:"direction",linkLabel:"linkLabel",channel:"channel"},standalone:!0,features:[Al],attrs:QC,decls:11,vars:15,consts:[[3,"routerLink","ngSwitch"],["class","text-semibold text-md m-b-12 none lg:block text-center text-primary",4,"ngIf"],[1,"card-group","flex","flex-row-reverse","flex-justify-between","gap-16","lg:block","rounded-md"],["class","none lg:block","size","sm",3,"imageUrl","startDate","duration","scheduledTime","isLive","liveLabel","isUpcoming","isLocked","lockText",4,"ngIf"],["size","sm",1,"block","lg:none",3,"imageUrl"],[1,"flex","flex-column","flex-justify-between","flex-align-start","lg:block","gap-8"],["class","text-secondary text-sm block lg:none m-8 m-b-0",4,"ngIf"],[1,"block","text-primary","text-sm","text-semibold","m-l-8","lg:m-t-12","lg:m-b-8","lg:m-r-8","text-wrap"],[1,"text-semibold","text-md","m-b-12","none","lg:block","text-center","text-primary"],["size","sm",1,"none","lg:block",3,"imageUrl","startDate","duration","scheduledTime","isLive","liveLabel","isUpcoming","isLocked","lockText"],[1,"text-secondary","text-sm","block","lg:none","m-8","m-b-0"]],template:function(r,s){r&1&&(ne(0,"a",0),Wt(1,"async"),he(2,ew,2,1,"span",1),ne(3,"div",2),he(4,tw,2,14,"yo-video-card",3),ze(5,"yo-video-card",4),ne(6,"p",5),he(7,iw,2,1,"span",6),ne(8,"span",7),Xe(9),Wt(10,"truncate"),se()()()()),r&2&&(J("routerLink",fr(12,JC,ki(1,7,s.$homepageUrl),s.video.docId))("ngSwitch",s.direction),ee(2),J("ngIf",s.linkLabel),ee(2),J("ngIf",s.channel),ee(),J("imageUrl",s.video.posterImage),ee(2),J("ngIf",s.linkLabel),ee(2),ni(Kr(10,9,s.video.name,50)));},dependencies:[Un,Fn,xl,Qr,pr,sv,fn,Zr,lv,ov],styles:["[_nghost-%COMP%]{height:82px;width:100%;max-width:360px}@media (min-width: 1280px){[_nghost-%COMP%]{height:inherit;max-width:270px}}.card-group[_ngcontent-%COMP%]{padding:4px;border:1px solid var(--border-color);border-radius:calc(8px * var(--is-rounded))}@media (min-width: 1280px){.card-group[_ngcontent-%COMP%]{margin:auto}}.card-group[_ngcontent-%COMP%]   yo-video-card[_ngcontent-%COMP%]{flex:none;width:120px}@media (min-width: 1280px){.card-group[_ngcontent-%COMP%]   yo-video-card[_ngcontent-%COMP%]{width:inherit}}"]});let t=e;return t;})();function rw(t,e){if(t&1){let i=zt();ne(0,"yo-survey-rating",3),Gt("onClose",function(){st(i);let r=X();return at(r.saveStreamFeedback(r.ratingValue));})("onSubmit",function(r){st(i);let s=X();return at(s.submitRating(r));}),se();}if(t&2){let i=X();J("title",i.videoSurveyRatingCtx.title)("description",i.videoSurveyRatingCtx.description)("numberOfOptions",5)("minLabel",i.videoSurveyRatingCtx.minLabel)("maxLabel",i.videoSurveyRatingCtx.maxLabel);}}function sw(t,e){if(t&1&&(ne(0,"p",6)(1,"span",7),hn(2,0),se(),ze(3,"yo-icon",8),se()),t&2){let i=X(2);ee(2),qg(i.rating),Hg(2),ee(),J("themed",!0);}}function aw(t,e){if(t&1){let i=zt();ne(0,"yo-survey-feedback",4),Gt("onClose",function(){st(i);let r=X();return at(r.saveStreamFeedback(r.ratingValue));})("onSubmit",function(r){st(i);let s=X();
232return at(s.saveStreamFeedback(s.ratingValue,r));}),he(1,sw,4,2,"p",5),se();}if(t&2){let i=X();J("title",i.rating&&i.rating>3?i.videoSurveyFeedbackCtx.positiveTitle:i.videoSurveyFeedbackCtx.constructiveTitle)("submitLabel",i.videoSurveyFeedbackCtx.submitLabel),ee(),J("ngIf",i.rating!==void 0&&i.rating!==null);}}var Iv=6e4,$l=(()=>{let e=class e{constructor(n,r,s){this.fs=n,this.ff=r,this.auth=s,this._timer$=new Vi(),this.destroy$=new Vi(),this.isPlayerInFullScreen=!1,this.isPlaying=!1,this.cumulativeTimeWatched=0,this.totalTimeWatchedUntilLastPause=0,this.showFeedbackPopup=!1,this.timer$=this._timer$.asObservable().pipe(_t(a=>({type:"CLOCK",time:a}))),this.step="RATING",this.videoSurveyRatingCtx={title:" How was the stream?",description:" Please take into consideration the video quality, the camera placement and commentary if any.",minLabel:" Very poor",maxLabel:" Excellent"},this.videoSurveyFeedbackCtx={constructiveTitle:" What could we improve?",positiveTitle:" What did we do well?",submitLabel:" Send feedback"},this.ratingValue=null,this.rating=null;}ngOnChanges(n){n.video&&(this.step="RATING",this.initializeTriggers());}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),clearInterval(this.timerRef),this._timer$.next(0),this._timer$.complete();}initializeTriggers(){this.timerRef=setInterval(()=>{this._timer$.next(Date.now());},Iv),mv(this.auth,this.fs)?.pipe(ii(n=>{if(!this.channel)throw new Error("Channel is undefined");if(!this.video)throw new Error("Video is undefined");return vv(this.fs,n,this.channel.docId,this.video.docId);}),ii(n=>!n.show||n.waitTime===void 0?(this.ngOnDestroy(),On(!1)):(this.userTestingGroup=n.testingGroup,this.showFeedback$(n.waitTime*Iv))),Nn(this.destroy$)).subscribe(n=>{this.showFeedbackPopup=n,this.showFeedbackPopup&&this.ngOnDestroy();});}showFeedback$(n){return kg(this.timer$,this.getPlayStatus$(),this.isPlayerInFullScreen$.pipe(_t(r=>(this.isPlayerInFullScreen=r,{type:"FULL_SCREEN_CHANGE",isPlayerInFullScreen:r})))).pipe(_t(r=>(r.type==="CLOCK"&&this.isPlaying&&this.startTime&&(this.cumulativeTimeWatched=this.totalTimeWatchedUntilLastPause+(r.time-this.startTime)),(this.totalTimeWatchedUntilLastPause>=n||this.cumulativeTimeWatched>=n)&&!this.isPlayerInFullScreen)),Nn(this.destroy$));}getPlayStatus$(){let n;return this.videoPlayerTrigger$.pipe(_t(r=>{if(r.trigger==="PLAY"&&(this.isPlaying=!0,this.startTime=r.time,n={type:"PLAYING",startedAt:this.startTime}),r.trigger==="PAUSE"||r.trigger==="STOP"){if(this.isPlaying=!1,this.stopTime=r.time,!this.startTime)throw new Error("Start time is undefined");n={type:"STOPPED",duration:this.stopTime-this.startTime},this.totalTimeWatchedUntilLastPause+=n.duration;}return n;}));}submitRating(n){this.rating=n.rating,this.ratingValue=n.value,this.step="FEEDBACK";}saveStreamFeedback(n,r){if(this.showFeedbackPopup=!1,!this.channel)throw new Error("Channel is undefined");if(!this.video)throw new Error("Video is undefined");if(!this.userAccessType)throw new Error("User access type is undefined");if(!this.userTestingGroup)throw new Error("user's testing group is undefined");let s={type:"VIDEO",feedback:{rating:n!==null?n:null,message:r||null},videoId:this.video.docId,videoType:this.video.type,isLive:this.video.streamState==="LIVE",eventId:this.event?this.event.docId:null,channelId:this.channel.docId,testingGroup:this.userTestingGroup,accessType:this.userAccessType};gv(this.ff,s).pipe(gl(a=>{throw new Error(a);}),Pg(1)).subscribe();}};e.ɵfac=function(r){return new(r||e)(Ye(Jr),Ye(Kg),Ye(Xg));},e.ɵcmp=qi({type:e,selectors:[["joymo-video-feedback"]],hostAttrs:[1,"m-8","md:m-0"],hostVars:4,hostBindings:function(r,s){r&2&&yl("block",s.showFeedbackPopup)("none",!s.showFeedbackPopup);},inputs:{channel:"channel",video:"video",event:"event",userAccessType:"userAccessType",videoPlayerTrigger$:"videoPlayerTrigger$",isPlayerInFullScreen$:"isPlayerInFullScreen$"},standalone:!0,features:[jg,Al],decls:3,vars:2,consts:()=>{let n;return n=" You rated "+"\uFFFD0\uFFFD"+" ",[n,["optionType","STAR",3,"title","description","numberOfOptions","minLabel","maxLabel","onClose","onSubmit",4,"ngIf"],[3,"title","submitLabel","onClose","onSubmit",4,"ngIf"],["o
232ptionType","STAR",3,"onClose","onSubmit","title","description","numberOfOptions","minLabel","maxLabel"],[3,"onClose","onSubmit","title","submitLabel"],["yo-survey-feedback-footer","","class","flex flex-2 flex-align-center gap-2",4,"ngIf"],["yo-survey-feedback-footer","",1,"flex","flex-2","flex-align-center","gap-2"],[1,"text-xs","m-t-4"],["icon","star_solid","size","md",3,"themed"]];},template:function(r,s){r&1&&(ne(0,"section"),he(1,rw,1,5,"yo-survey-rating",1)(2,aw,2,3,"yo-survey-feedback",2),se()),r&2&&(ee(),J("ngIf",s.step==="RATING"),ee(),J("ngIf",s.step==="FEEDBACK"));},dependencies:[Un,Fn,Il,Dl,pr,fn,uv,dv],styles:["[_nghost-%COMP%]{position:relative}@media (min-width: 768px){[_nghost-%COMP%]{position:absolute;bottom:124px;right:8px}}"]});let t=e;return t;})();function Pv(t,e){return[e.startTime,e.uploadTime].some(i=>i&&[t.startTime,t.uploadTime].some(n=>n&&n?.getTime()<i.getTime()));}function Lv(t,e){return[e.endTime,e.uploadTime].some(i=>i&&[t.endTime,t.uploadTime].some(n=>n&&n?.getTime()>i.getTime()));}function Rv(t){return e=>e.docId!==t;}var Ov={CONTENT_GONE:{title:"Video Unavailable",description:"The video has been removed by the administrator.",icon:"novideo"},GEO_RESTRICTION:{title:"Sorry, the video is not available in your country",icon:"globe"},NEEDS_ACTION:{actionLabel:"Update subscription",description:"We have detected an issue with your subscription. Please update it to continue watching",icon:"card",title:"Subscription is inactive"},ACCESS_FAILED:{description:"An error occurred while trying to contact the server. Please check your internet connection and try to reload the page",icon:"warning_solid",title:"Contacting server has failed"}};Lr();var KU=et(uS()),QU=et(dS()),JU=et(cS());var hS={skip:"Skip Ad","skip in":"Skip Ad in ",advertisement:"Advertisement","video start in":"Video will start in: "};Lr();var bi=et(Pi()),Ip=et(Gl());var vS="7.5.2";function HR(t){return{disableNextSnapshotRestore:!1,_contentEnding:!1,_contentHasEnded:!1,_hasThereBeenALoadStartDuringPlayerLife:!1,_hasThereBeenALoadedData:!1,_hasThereBeenALoadedMetaData:!1,_inLinearAdMode:!1,_shouldBlockPlay:!1,_playBlocked:!1,_playRequested:!1,_error:null,adType:null,VERSION:vS,reset:function(){t.ads.disableNextSnapshotRestore=!1,t.ads._contentEnding=!1,t.ads._contentHasEnded=!1,t.ads.snapshot=null,t.ads.adType=null,t.ads._hasThereBeenALoadedData=!1,t.ads._hasThereBeenALoadedMetaData=!1,t.ads._cancelledPlay=!1,t.ads._shouldBlockPlay=!1,t.ads._playBlocked=!1,t.ads.nopreroll_=!1,t.ads.nopostroll_=!1,t.ads._playRequested=!1,t.ads._error=null;},startLinearAdMode:function(){t.ads._state.startLinearAdMode();},endLinearAdMode:function(){t.ads._state.endLinearAdMode();},skipLinearAdMode:function(){t.ads._state.skipLinearAdMode();},stitchedAds:function(i){return i!==void 0&&(N.log.warn("Using player.ads.stitchedAds() as a setter is deprecated, it should be set as an option upon initialization of contrib-ads."),this.settings.stitchedAds=!!i),this.settings.stitchedAds;},videoElementRecycled:function(){if(t.ads.shouldPlayContentBehindAd(t))return!1;if(!this.snapshot)throw new Error("You cannot use videoElementRecycled while there is no snapshot.");var i=t.tech_.src()!==this.snapshot.src,n=t.currentSrc()!==this.snapshot.currentSrc;return i||n;},isLive:function(i){return i===void 0&&(i=t),typeof i.ads.settings.contentIsLive=="boolean"?i.ads.settings.contentIsLive:i.duration()===1/0?!0:N.browser.IOS_VERSION==="8"&&i.duration()===0;},shouldPlayContentBehindAd:function(i){if(i===void 0&&(i=t),i)return i.ads.settings.liveCuePoints?!N.browser.IS_IOS&&!N.browser.IS_ANDROID&&i.duration()===1/0:!1;throw new Error("shouldPlayContentBehindAd requires a player as a param");},shouldTakeSnapshots:function(i){return i===void 0&&(i=t),!this.shouldPlayContentBehindAd(i)&&!this.stitchedAds();},isInAdMode:function(){return this._state.isAdState();},isWaitingForAdBreak:function(){return this._state.isWaitingForAdBreak();},isContentResuming:function(){return this._state.isContentResuming();},isAdPlaying:function(){return this._state.inAdBreak();},inAdBreak:function(){return this._state.inAdBreak();},removeNativePoster:function(){var i=t.$(".vjs-tech");i&&i.removeAttribute("poster");},debug:function(){if(this.settings.debug){for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];n.length===1&&typeof n[0]=="string"?N.log("ADS: "+n[0]):N.log.apply(N,["ADS:"].concat(n));}},error:function(i){if(i===void 0)return this._error||null;if(i===null||!i.errorType){this._error=null;return;}this._error=i,N.log.error("An error with Ads occured. Type: "+i.errorType+"."),t.trigger({type:"vjsadserror",error:this._error});}};}var _S=function(e,i){i.isImmediatePropagationStopped=function(){return!0;},i.cancelBubble=!0,i.isPropagationStopped=function(){return!0;};}
232,tn=function(e,i,n){_S(e,n),e.trigger({type:i+n.type,originalEvent:n});},$R=function(e,i){e.ads.isInAdMode()&&(e.ads.isContentResuming()?e.ads._contentEnding&&tn(e,"content",i):tn(e,"ad",i));},zR=function(e,i){e.ads.isInAdMode()?e.ads.isContentResuming()?(_S(e,i),e.trigger("resumeended")):tn(e,"ad",i):!e.ads._contentHasEnded&&!e.ads.stitchedAds()&&(tn(e,"content",i),e.trigger("readyforpostroll"));},GR=function(e,i){if(!(i.type==="loadstart"&&!e.ads._hasThereBeenALoadStartDuringPlayerLife||i.type==="loadeddata"&&!e.ads._hasThereBeenALoadedData||i.type==="loadedmetadata"&&!e.ads._hasThereBeenALoadedMetaData))if(e.ads.inAdBreak())tn(e,"ad",i);else{if(e.currentSrc()!==e.ads.contentSrc)return;tn(e,"content",i);}},WR=function(e,i){e.ads.inAdBreak()?tn(e,"ad",i):e.ads.isContentResuming()&&tn(e,"content",i);};function YR(t){t.type==="playing"?$R(this,t):t.type==="ended"?zR(this,t):t.type==="loadstart"||t.type==="loadeddata"||t.type==="loadedmetadata"?GR(this,t):t.type==="play"?WR(this,t):this.ads.isInAdMode()&&(this.ads.isContentResuming()?tn(this,"content",t):tn(this,"ad",t));}function XR(t){t.ads.contentSrc=t.currentSrc(),t.ads._seenInitialLoadstart=!1;var e=function(){if(!t.ads.inAdBreak()){var n=t.currentSrc();n!==t.ads.contentSrc&&(t.ads._seenInitialLoadstart&&t.trigger({type:"contentchanged"}),t.trigger({type:"contentupdate",oldValue:t.ads.contentSrc,newValue:n}),t.ads.contentSrc=n),t.ads._seenInitialLoadstart=!0;}};t.on("loadstart",e);}function kp(){return kp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n]);}return t;},kp.apply(this,arguments);}function ui(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Pp(t,e);}function Pp(t,e){return Pp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n;},Pp(t,e);}var yS={},KR=function(e){if(N.dom.isInFrame()&&typeof bi.default.__tcfapi!="function"){for(var i=bi.default,n,r={};i;){try{if(i.frames.__tcfapiLocator){n=i;break;}}catch{}if(i===bi.default.top)break;i=i.parent;}if(!n)return;bi.default.__tcfapi=function(s,a,o,u){var c=Math.random()+"",p={__tcfapiCall:{command:s,parameter:u,version:a,callId:c}};r[c]=o,n.postMessage(p,"*");},bi.default.addEventListener("message",function(s){var a={};
232try{a=typeof s.data=="string"?JSON.parse(s.data):s.data;}catch{}var o=a.__tcfapiReturn;o&&typeof r[o.callId]=="function"&&(r[o.callId](o.returnValue,o.success),r[o.callId]=null);},!1);}},fS=function(){KR(),typeof bi.default.__tcfapi=="function"&&bi.default.__tcfapi("addEventListener",2,function(e,i){i&&(yS=e);});},QR=function(e){for(var i=e.parent;i!==e.top;){try{if(i.frames&&i.frames.__uspapiLocator)return i;}catch{}i=i.parent;}try{if(e.top.frames&&e.top.frames.__uspapiLocator)return e.top;}catch{}return null;},Lp="",JR=function(){return Lp;},pS=function(e,i){if(i===void 0&&(i=bi.default),i.__uspapi)i.__uspapi("getUSPData",1,function(o,u){var c=u?o.uspString:null;Lp=c,e(c);});else{var n=QR(i);if(!n){e(null);return;}var r=Math.random().toString(36).substring(2),s={__uspapiCall:{command:"getUSPData",version:1,callId:r}},a=function o(u){if(u&&u.data&&u.data.__uspapiReturn&&u.data.__uspapiReturn.callId===r){i.removeEventListener("message",o,!1);var c=u.data.__uspapiReturn,p=c.returnValue,_=c.success,T=_?p.uspString:null;Lp=T,e(T);}};i.addEventListener("message",a,!1),n.postMessage(s,"*");}},Or={AdsBeforePrerollError:"ads-before-preroll-error",AdsPrerollError:"ads-preroll-error",AdsMidrollError:"ads-midroll-error",AdsPostrollError:"ads-postroll-error",AdsMacroReplacementFailed:"ads-macro-replacement-failed",AdsResumeContentFailed:"ads-resume-content-failed"},mS=function(e,i){return i?encodeURIComponent(e):e;},ZR=function(e,i,n){if(e&&e[n])for(var r=e[n],s=Object.keys(r),a=0;a<s.length;a++){var o="{mediainfo."+n+"."+s[a]+"}";i[o]=r[s[a]];}},eO=function(e,i){var n={};return["description","tags","reference_id","ad_keys"].forEach(function(r){e&&e[r]?n["{mediainfo."+r+"}"]=e[r]:i["{mediainfo."+r+"}"]?n["{mediainfo."+r+"}"]=i["{mediainfo."+r+"}"]:n["{mediainfo."+r+"}"]="";}),["custom_fields","customFields"].forEach(function(r){ZR(e,n,r);}),n;},tO=function(e){var i={},n=e.replace(/{([^}=]+)=([^}]*)}/g,function(r,s,a){return i["{"+s+"}"]=a,"{"+s+"}";});return{defaults:i,modifiedString:n};},iO=function(e){return{"{player.id}":e.options_["data-player"]||e.id_,"{player.height}":e.currentHeight(),"{player.width}":e.currentWidth(),"{player.heightInt}":Math.round(e.currentHeight()),"{player.widthInt}":Math.round(e.currentWidth()),"{player.autoplay}":e.autoplay()?1:0,"{player.muted}":e.muted()?1:0,"{player.language}":e.language()||"","{mediainfo.id}":e.mediainfo?e.mediainfo.id:"","{mediainfo.name}":e.mediainfo?e.mediainfo.name:"","{mediainfo.duration}":e.mediainfo?e.mediainfo.duration:"","{player.duration}":e.duration(),"{player.durationInt}":Math.round(e.duration()),"{player.live}":e.duration()===1/0?1:0,"{player.pageUrl}":N.dom.isInFrame()?Ip.default.referrer:bi.default.location.href,"{playlistinfo.id}":e.playlistinfo?e.playlistinfo.id:"","{playlistinfo.name}":e.playlistinfo?e.playlistinfo.name:"","{timestamp}":new Date().getTime(),"{document.referrer}":Ip.default.referrer,"{window.location.href}":bi.default.location.href,"{random}":Math.floor(Math.random()*1e12)};},nO=function(e){var i={};return Object.keys(e).forEach(function(n){i["{tcf."+n+"}"]=e[n];}),i["{tcf.gdprAppliesInt}"]=e.gdprApplies?1:0,i;},rO=function(){return{"{usp.uspString}":JR()};},sO=function(e,i,n){var r=new RegExp("{pageVariable\\.([^}]+)}","g"),s={},a=(e.match(r)||[]).concat(Object.keys(n).filter(function(o){return r.test(o)&&e.includes(n[o]);}));if(a)return a.forEach(function(o){for(var u=o,c=o.slice(14,-1),p=c.split("."),_=bi.default,T,y=0;y<p.length;y++)if(y===p.length-1)T=_[p[y]];else if(_=_[p[y]],typeof _>"u")break;var b=typeof T;T===null?s[u]="null":T===void 0?i[u]?s[u]=i[u]:(N.log.warn('Page variable "'+c+'" not found'),s[u]=""):b!=="string"&&b!=="number"&&b!=="boolean"?(N.log.warn('Page variable "'+c+'" is not a supported type'),s[u]=""):s[u]=T;}),s;},gS=function(e,i,n,r,s){r===void 0&&(r={});for(var a in i){var o=r.hasOwnProperty(a)?r[a]:a;if(o.startsWith("r:"))try{var u=new RegExp(o.slice(2),"g");e=e.replace(u,mS(i[a],n));}catch(c){s.ads.error({errorType:Or.AdsMacroReplacementFailed,macro:a,error:c}),N.log.warn('Unable to replace macro with regex "'+o+'". The provided regex may be invalid.');}else e=e.split(o).join(mS(i[a],n));}return e;};function aO(t,e,i){e===void 0&&(e=!1),i===void 0&&(i={});var n=i.disableDefaultMacros||!1,r=i.macroNameOverrides||{};delete i.disableDefaultMacros,delete i.macroNameOverrides;var s=i;if(n)return gS(t,s,e,r);var a=tO(t),o=a.defaults,u=a.modifiedString;t=u,kp(s,iO(this),eO(this.mediainfo,o),nO(yS),rO(),sO(t,o,r)),t=gS(t,s,e,r,this);for(var c in o)t=t.replace(c,o[c]);return t;}var Nr={};Nr.processMetadataTracks=function(t,e){for(var i=t.textTracks(),n=function(a){a.kind==="metadata"&&(t.ads.cueTextTracks.setMetadataTrackMode(a),e(t,a));},r=0;r<i.length;r++)n(i[r]);i.addEventListener("addtrack",function(s){n(s.track);});};Nr.setMetadataTrackMode=function(t){};
232Nr.getSupportedAdCue=function(t,e){return e;};Nr.isSupportedAdCue=function(t,e){return!0;};Nr.getCueId=function(t,e){return e.id;};var oO=function(e,i){return i!==void 0&&e.ads.includedCues[i];},lO=function(e,i){i!==void 0&&i!==""&&(e.ads.includedCues[i]=!0);};Nr.processAdTrack=function(t,e,i,n){t.ads.includedCues={};for(var r=0;r<e.length;r++){var s=e[r],a=this.getSupportedAdCue(t,s);if(!this.isSupportedAdCue(t,s)){N.log.warn("Skipping as this is not a supported ad cue.",s);return;}var o=this.getCueId(t,s),u=s.startTime;if(oO(t,o)){N.log("Skipping ad already seen with ID "+o);return;}n&&n(t,a,o,u),i(t,a,o,u),lO(t,o);}};function uO(t,e){e&&N.log("Using cancelContentPlay to block content playback"),t.on("play",dO);}function dO(){this.ads._shouldBlockPlay!==!1&&(this.paused()||(this.ads.debug("Playback was canceled by cancelContentPlay"),this.pause()),this.ads._cancelledPlay=!0);}var zs={},Rr=N;zs.isMiddlewareMediatorSupported=function(){return Rr.browser.IS_IOS||Rr.browser.IS_ANDROID?!1:!!(Rr.use&&Rr.middleware&&Rr.middleware.TERMINATOR);};zs.playMiddleware=function(t){return{setSource:function(i,n){n(null,i);},callPlay:function(){if(t.ads&&t.ads._shouldBlockPlay===!0)return t.ads.debug("Using playMiddleware to block content playback"),t.ads._playBlocked=!0,Rr.middleware.TERMINATOR;},play:function(i,n){t.ads&&t.ads._playBlocked&&i?(t.ads.debug("Play call to Tech was terminated."),t.trigger("play"),t.addClass("vjs-has-started"),t.ads._playBlocked=!1):n&&n.catch&&n.catch(function(r){r.name==="NotAllowedError"&&!N.browser.IS_SAFARI&&t.trigger("pause");});}};};zs.testHook=function(t){Rr=t;};var cO=zs.playMiddleware,hO=zs.isMiddlewareMediatorSupported,fO=function(){if(N.getPlugin)return!!N.getPlugin("ads");var e=N.getComponent("Player");return!!(e&&e.prototype.ads);};function pO(t){if(fO(N))return!1;var e=N.registerPlugin||N.plugin;return e("ads",t),hO()&&!N.usingContribAdsMiddleware_&&(N.use("*",cO),N.usingContribAdsMiddleware_=!0,N.log.debug("Play middleware has been registered with videojs")),!0;}var mO={src:"data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAAxJtZGF03ABMYXZjNjEuMy4xMDAAQiAIwRg4AAACrgYF//+q3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2NCByMzEwOCAzMWUxOWY5IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMyAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0zIGJfcHlyYW1pZD0yIGJfYWRhcHQ9MSBiX2JpYXM9MCBkaXJlY3Q9MSB3ZWlnaHRiPTEgb3Blbl9nb3A9MCB3ZWlnaHRwPTIga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAAn//71sXwKaunqigzoMi7hlyTJrrYi4m0AwABFxzcqWKGahTaoBcQAAMWK4AlcFlIICBeldSEQBGCMHAAABVNtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAAIgABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAACQXRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAIgAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAABQAAAAPAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAACIAAAAAAAEAAAAAAbltZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAADwAAAACAFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAFkbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABJHN0YmwAAADAc3RzZAAAAAAAAAABAAAAsGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAABQADwAEgAAABIAAAAAAAAAAEUTGF2YzYxLjMuMTAwIGxpYngyNjQAAAAAAAAAAAAAAAAY//8AAAA2YXZjQwFkAA3/4QAZZ2QADazZQUH7ARAAAAMAEAAAAwPA8UKZYAEABmjr48siwP34+AAAAAAQcGFzcAAAAAEAAAABAAAAFGJ0cnQAAAAAAALAEAACwBAAAAAYc3R0cwAAAAAAAAABAAAAAQAAAgAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAFHN0c3oAAAAAAAAC7wAAAAEAAAAUc3RjbwAAAAAAAAABAAAARQAAAj10cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAAABgAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAAXAAAEAAABAAAAAAG1bWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAACsRAAACABVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAABYG1pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABJHN0YmwAAAB+c3RzZAAAAAAAAAABAAAAbm1wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAACsRAAAAAAANmVzZHMAAAAAA4CAgCUAAgAEgICAF0AVAAAAAAH0AAAAEisFgICABRIQVuUABoCAgAECAAAAFGJ0cnQAAAAAAAH0AAAAEisAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAAVAAAABgAAABhzdGNvAAAAAAAAAAIAAAAwAAADNAAAABpzZ3BkAQAAAHJvbGwAAAACAAAAAf//AAAAHHNiZ3AAAAAAcm9sbAAAAAEAAAACAAAAAQAAAGF1ZHRhAAAAWW1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALGlsc3QAAAAkqXRvbwAAABxkYXRhAAAAAQAAAABMYXZmNjEuMS4xMDA=",type:"video/mp4"},fe=function(){function t(){}return t.getState=function(i){if(i&&t.states_&&t.states_[i])return t.states_[i];}
232,t.registerState=function(i,n){if(typeof i!="string"||!i)throw new Error('Illegal state name, "'+i+'"; must be a non-empty string.');return t.states_||(t.states_={}),t.states_[i]=n,n;},t;}(),Rp=function(){t._getName=function(){return"Anonymous State";};function t(i){this.player=i;}var e=t.prototype;return e.transitionTo=function(n){var r=this.player;this.cleanup(r);var s=new n(r);r.ads._state=s,r.ads.debug(this.constructor._getName()+" -> "+s.constructor._getName());for(var a=arguments.length,o=new Array(a>1?a-1:0),u=1;u<a;u++)o[u-1]=arguments[u];s.init.apply(s,[r].concat(o));},e.init=function(){},e.cleanup=function(){},e.onPlay=function(){},e.onPlaying=function(){},e.onEnded=function(){},e.onAdEnded=function(){},e.onAdsReady=function(){N.log.warn("Unexpected adsready event");},e.onAdsError=function(){},e.onAdsCanceled=function(){},e.onAdTimeout=function(){},e.onAdStarted=function(){},e.onAdSkipped=function(){},e.onContentChanged=function(){},e.onContentResumed=function(){},e.onReadyForPostroll=function(){N.log.warn("Unexpected readyforpostroll event");},e.onNoPreroll=function(){},e.onNoPostroll=function(){},e.startLinearAdMode=function(){N.log.warn("Unexpected startLinearAdMode invocation (State via "+this.constructor._getName()+")");},e.endLinearAdMode=function(){N.log.warn("Unexpected endLinearAdMode invocation (State via "+this.constructor._getName()+")");},e.skipLinearAdMode=function(){N.log.warn("Unexpected skipLinearAdMode invocation (State via "+this.constructor._getName()+")");},e.isAdState=function(){throw new Error("isAdState unimplemented for "+this.constructor._getName());},e.isWaitingForAdBreak=function(){return!1;},e.isContentResuming=function(){return!1;},e.inAdBreak=function(){return!1;},e.handleEvent=function(n){var r=this.player;n==="play"?this.onPlay(r):n==="adsready"?this.onAdsReady(r):n==="adserror"?this.onAdsError(r):n==="adscanceled"?this.onAdsCanceled(r):n==="adtimeout"?this.onAdTimeout(r):n==="ads-ad-started"?this.onAdStarted(r):n==="ads-ad-skipped"?this.onAdSkipped(r):n==="contentchanged"?this.onContentChanged(r):n==="contentresumed"?this.onContentResumed(r):n==="readyforpostroll"?this.onReadyForPostroll(r):n==="playing"?this.onPlaying(r):n==="ended"?this.onEnded(r):n==="nopreroll"?this.onNoPreroll(r):n==="nopostroll"?this.onNoPostroll(r):n==="adended"&&this.onAdEnded(r);},t;}();fe.registerState("State",Rp);var gO=function(t){ui(e,t);function e(n){var r;return r=t.call(this,n)||this,r.contentResuming=!1,r.waitingForAdBreak=!1,r;}var i=e.prototype;return i.isAdState=function(){return!0;},i.onPlaying=function(){var r=fe.getState("ContentPlayback");this.contentResuming&&this.transitionTo(r);},i.onContentResumed=function(){var r=fe.getState("ContentPlayback");this.contentResuming&&this.transitionTo(r);},i.isWaitingForAdBreak=function(){return this.waitingForAdBreak;},i.isContentResuming=function(){return this.contentResuming;},i.inAdBreak=function(){return this.player.ads._inLinearAdMode===!0;},e;}(Rp);fe.registerState("AdState",gO);var vO=function(t){ui(e,t);function e(){return t.apply(this,arguments)||this;}var i=e.prototype;return i.isAdState=function(){return!1;},i.onContentChanged=function(r){var s=fe.getState("BeforePreroll"),a=fe.getState("Preroll");r.ads.debug("Received contentchanged event (ContentState)"),r.paused()?this.transitionTo(s):(this.transitionTo(a,!1),r.pause(),r.ads._pausedOnContentupdate=!0);},e;}(Rp);fe.registerState("ContentState",vO);var _O=fe.getState("ContentState"),yO=function(t){ui(e,t);function e(){return t.apply(this,arguments)||this;}e._getName=function(){return"AdsDone";};var i=e.prototype;return i.init=function(r){r.ads._contentHasEnded=!0,r.trigger("ended");},i.startLinearAdMode=function(){N.log.warn("Unexpected startLinearAdMode invocation (AdsDone)");},e;}(_O);fe.registerState("AdsDone",yO);var Dp;function bO(t){var e;N.browser.IS_IOS&&t.ads.isLive(t)&&t.seekable().length>0?e=t.currentTime()-t.seekable().end(0):e=t.currentTime();var i=t.$(".vjs-tech"),n=t.textTracks?t.textTracks():[],r=[],s={ended:t.ended(),currentSrc:t.currentSrc(),sources:t.currentSources(),src:t.tech_.src(),currentTime:e,type:t.currentType()};i&&(s.style=i.getAttribute("style"));for(var a=0;a<n.length;a++){var o=n[a];r.push({track:o,mode:o.mode}),o.mode="disabled";}return s.suppressedTracks=r,s;}function TO(t,e){var i=t.ads.snapshot;if(e===void 0&&(e=function(){}),t.ads.disableNextSnapshotRestore===!0){t.ads.disableNextSnapshotRestore=!1,delete t.ads.snapshot,e();return;}var n=t.$(".vjs-tech"),r=20,s=i.suppressedTracks,a,o=function(){for(var T=0;T<s.length;T++)a=s[T],a.track.mode=a.mode;},u=function(){var T;if(N.browser.IS_IOS&&t.ads.isLive(t)){if(i.currentTime<0&&(t.seekable().length>
2320?T=t.seekable().end(0)+i.currentTime:T=t.currentTime(),t.currentTime(T)),t.paused()){var y=t.play();y&&y.catch&&y.catch(function(g){N.log.warn("Play promise rejected in IOS snapshot resume",g);});}}else if(i.ended)t.currentTime(t.duration());else{t.currentTime(i.currentTime);var b=t.play();b&&b.catch&&b.catch(function(g){N.log.warn("Play promise rejected in snapshot resume",g);});}t.ads.shouldRemoveAutoplay_&&(t.autoplay(!1),t.ads.shouldRemoveAutoplay_=!1);},c=function _(){if(t.off("contentcanplay",_),Dp&&t.clearTimeout(Dp),n=t.el().querySelector(".vjs-tech"),n.readyState>1||n.seekable===void 0||n.seekable.length>0)return u();if(r--)t.setTimeout(_,50);else try{u();}catch(T){t.ads.error({errorType:Or.AdsResumeContentFailed,error:T}),N.log.warn("Failed to resume the content after an advertisement",T);}};if("style"in i&&n.setAttribute("style",i.style||""),t.ads.videoElementRecycled())t.one("resumeended",function(){delete t.ads.snapshot,e();}),t.one("contentloadedmetadata",o),N.browser.IS_IOS&&!t.autoplay()&&typeof t.techCall_=="function"&&(t.techCall_("setAutoplay",!0),t.ads.shouldRemoveAutoplay_=!0),t.src(i.sources),t.one("contentcanplay",c),Dp=t.setTimeout(c,2e3);else{if(o(),!t.ended()){var p=t.play();p&&p.catch&&p.catch(function(_){N.log.warn("Play promise rejected in snapshot restore",_);});}delete t.ads.snapshot,e();}}function SO(t){t.ads.debug("Starting ad break"),t.ads._inLinearAdMode=!0,t.trigger("adstart"),t.ads.shouldTakeSnapshots()&&(t.ads.snapshot=bO(t)),t.ads.shouldPlayContentBehindAd(t)&&!t.ads.settings.stitchedAds&&(t.ads.preAdVolume_=t.volume(),t.volume(0)),t.addClass("vjs-ad-playing"),t.hasClass("vjs-live")&&t.removeClass("vjs-live"),t.ads.removeNativePoster(),t.ads.preAdPlaybackRate_=t.playbackRate(),t.playbackRate(1),t.controlBar&&t.controlBar.playbackRateMenuButton&&t.controlBar.playbackRateMenuButton.playbackRateSupported&&!t.controlBar.playbackRateMenuButton.hasClass("vjs-hidden")?(t.controlBar.playbackRateMenuButton.hide(),t.ads.showPlaybackMenuOnAdEnd_=!0):t.ads.showPlaybackMenuOnAdEnd_=!1;}function AO(t,e){t.ads.debug("Ending ad break"),e===void 0&&(e=function(){}),t.ads.adType=null,t.ads._inLinearAdMode=!1,t.trigger("adend"),t.removeClass("vjs-ad-playing"),t.ads.isLive(t)&&t.addClass("vjs-live"),t.ads.shouldTakeSnapshots()?TO(t,e):(t.ads.preAdVolume_&&t.volume(t.ads.preAdVolume_),e()),t.playbackRate(t.ads.preAdPlaybackRate_),t.ads.showPlaybackMenuOnAdEnd_&&t.controlBar.playbackRateMenuButton.show();}var nn={start:SO,end:AO},EO=fe.getState("AdState"),xO=function(t){ui(e,t);function e(){return t.apply(this,arguments)||this;}e._getName=function(){return"Preroll";};var i=e.prototype;return i.init=function(r,s,a){if(this.waitingForAdBreak=!0,r.addClass("vjs-ad-loading"),a||r.ads.nopreroll_)return this.resumeAfterNoPreroll(r);var o=r.ads.settings.timeout;typeof r.ads.settings.prerollTimeout=="number"&&(o=r.ads.settings.prerollTimeout),this._timeout=r.setTimeout(function(){r.trigger("adtimeout");},o),s?this.handleAdsReady():this.adsReady=!1;},i.onAdsReady=function(r){r.ads.inAdBreak()?N.log.warn("Unexpected adsready event (Preroll)"):(r.ads.debug("Received adsready event (Preroll)"),this.handleAdsReady());},i.handleAdsReady=function(){this.adsReady=!0,this.readyForPreroll();},i.afterLoadStart=function(r){var s=this.player;s.ads._hasThereBeenALoadStartDuringPlayerLife?r():(s.ads.debug("Waiting for loadstart..."),s.one("loadstart",function(){s.ads.debug("Received loadstart event"),r();}));},i.noPreroll=function(){var r=this;this.afterLoadStart(function(){r.player.ads.debug("Skipping prerolls due to nopreroll event (Preroll)"),r.resumeAfterNoPreroll(r.player);});},i.readyForPreroll=function(){var r=this.player;this.afterLoadStart(function(){r.ads.debug("Triggered readyforpreroll event (Preroll)"),r.trigger("readyforpreroll");});},i.onAdsCanceled=function(r){var s=this;r.ads.debug("adscanceled (Preroll)"),this.afterLoadStart(function(){s.resumeAfterNoPreroll(r);});},i.onAdsError=function(r){var s=this;N.log("adserror (Preroll)"),r.ads.error({errorType:Or.AdsPrerollError}),this.inAdBreak()?r.ads.endLinearAdMode():this.afterLoadStart(function(){s.resumeAfterNoPreroll(r);});},i.startLinearAdMode=function(){var r=this.player;this.adsReady&&!r.ads.inAdBreak()&&!this.isContentResuming()?(this.clearTimeout(r),r.ads.adType="preroll",this.waitingForAdBreak=!1,nn.start(r),r.ads._shouldBlockPlay=!1):N.log.warn("Unexpected startLinearAdMode invocation (Preroll)");},i.onAdStarted=function(r){r.removeClass("vjs-ad-loading");},i.endLinearAdMode=function(){var r=this.player;this.inAdBreak()&&(r.removeClass("vjs-ad-loading"),r.addClass("vjs-ad-content-resuming"),this.contentResuming=!0,nn.end(r));},i.skipLinearAdMode=function(){var r=this,s=this.player;s.ads.inAdBreak()||this.isContentResuming()?N.log.warn("Unexpected skipLinearAdMode invocation"):this.afterLoadStart(function(){s.trigger("adskip"),s.ads.debug("skipLinearAdMode (Preroll)"),r.resumeAfterNoPreroll(s);});},i.onAdTimeout=function(r){var s=this;this.afterLoadStart(function(){r.ads.debug("adtimeout (Preroll)"),s.resumeAfterNoPreroll(r);});},i.onNoPreroll=function(r){r.ads.inAdBreak()||this.isContentResuming()?N.log.warn("Unexpected nopreroll event (Preroll)"):this.noPreroll();},i.resumeAfterNoPreroll=function(r){if(this.contentResuming=!0,r.ads._shouldBlockPlay=!1,this.cleanupPartial(r),r.ads._playRequested||r.ads._pausedOnContentupdate)if(r.paused()){r.ads.debug("resumeAfterNoPreroll: attempting to resume playback (Preroll)");var s=r.play();s&&s.then&&s.then(null,function(a){});}else r.ads.debug("resumeAfterNoPreroll: already playing (Preroll)"),r.trigger("play"),r.trigger("playing");},i.cleanup=function(r){r.ads._hasThereBeenALoadStartDuringPlayerLife||N.log.warn("Leaving Preroll state before loadstart event can cause issues."),this.cleanupPartial(r);},i.cleanupPartial=function(r){r.removeClass("vjs-ad-loading"),r.removeClass("vjs-ad-content-resuming"),this.clearTimeout(r);},i.clearTimeout=function(r){r.clearTimeout(this._timeout),this._timeout=null;},e;}(EO);fe.registerState("Preroll",xO);var CO=fe.getState("ContentState"),wO=function(t){ui(e,t);function e(){return t.apply(this,arguments)||this;}e._getName=function(){return"BeforePreroll";};var i=e.prototype;return i.init=function(r){this.adsReady=!1,this.shouldResumeToContent=!1,r.ads._shouldBlockPlay=r.ads.settings.allowVjsAutoplay?!r.autoplay():!0;},i.onAdsReady=function(r){r.ads.debug("Received adsready event (BeforePreroll)"),this.adsReady=!0;},i.onPlay=function(r){var s=fe.getState("Preroll");r.ads.debug("Received play event (BeforePreroll)"),this.transitionTo(s,this.adsReady,this.shouldResumeToContent);},i.onAdsCanceled=function(r){r.ads.debug("adscanceled (BeforePreroll)"),this.shouldResumeToContent=!0;},i.onAdsError=function(){this.player.ads.debug("adserror (BeforePreroll)"),this.player.ads.error({errorType:Or.AdsBeforePrerollError}),this.shouldResumeToContent=!0;},i.onNoPreroll=function(){this.player.ads.debug("Skipping prerolls due to nopreroll event (BeforePreroll)"),this.shouldResumeToContent=!0;},i.skipLinearAdMode=function(){var r=this.player;r.trigger("adskip"),r.ads.debug("skipLinearAdMode (BeforePreroll)"),this.shouldResumeToContent=!0;},i.onContentChanged=function(){this.init(this.player);},e;}(CO);fe.registerState("BeforePreroll",wO);var DO=fe.getState("AdState"),IO=function(t){ui(e,t);function e(){return t.apply(this,arguments)||this;}e._getName=function(){return"Midroll";};var i=e.prototype;return i.init=function(r){r.ads.adType="midroll",nn.start(r),r.addClass("vjs-ad-loading");},i.onAdStarted=function(r){r.removeClass("vjs-ad-loading");},i.endLinearAdMode=function(){var r=this.player;this.inAdBreak()&&(this.contentResuming=!0,r.addClass("vjs-ad-content-resuming"),r.removeClass("vjs-ad-loading"),nn.end(r));},i.onAdsError=function(r){r.ads.error({errorType:Or.AdsMidrollError}),this.inAdBreak()&&r.ads.endLinearAdMode();},i.cleanup=function(r){r.removeClass("vjs-ad-loading"),r.removeClass("vjs-ad-content-resuming");},e;}(DO);fe.registerState("Midroll",IO);var kO=fe.getState("AdState"),PO=function(t){ui(e,t);function e(){return t.apply(this,arguments)||this;}e._getName=function(){return"Postroll";};var i=e.prototype;return i.init=function(r){if(this.waitingForAdBreak=!0,r.ads._contentEnding=!0,r.ads.nopostroll_){this.resumeContent(r);var a=fe.getState("AdsDone");this.transitionTo(a);}else{r.addClass("vjs-ad-loading");var s=r.ads.settings.timeout;typeof r.ads.settings.postrollTimeout=="number"&&(s=r.ads.settings.postrollTimeout),this._postrollTimeout=r.setTimeout(function(){r.trigger("adtimeout");},s);}},i.startLinearAdMode=function(){var r=this.player;!r.ads.inAdBreak()&&!this.isContentResuming()?(r.ads.adType="postroll",r.clearTimeout(this._postrollTimeout),this.waitingForAdBreak=!1,nn.start(r)):N.log.warn("Unexpected startLinearAdMode invocation (Postroll)");},i.onAdStarted=function(r){r.removeClass("vjs-ad-loading");},i.endLinearAdMode=function(){var r=this,s=this.player,a=fe.getState("AdsDone");this.inAdBreak()&&(s.removeClass("vjs-ad-loading"),this.resumeContent(s),nn.end(s,function(){r.transitionTo(a);}));},i.skipLinearAdMode=function(){var r=this.player;r.ads.inAdBreak()||this.isContentResuming()?N.log.warn("Unexpected skipLinearAdMode invocation"):(r.ads.debug("Postroll abort (skipLinearAdMode)"),r.trigger("adskip"),this.abort(r));},i.onAdTimeout=function(r){r.ads.debug("Postroll abort (adtimeout)"),this.abort(r);},i.onAdsError=function(r){r.ads.debug("Postroll abort (adserror)"),r.ads.error({errorType:Or.AdsPostrollError}),r.ads.inAdBreak()?r.ads.endLinearAdMode():this.abort(r);},i.onContentChanged=function(r){if(this.isContentResuming()){var s=fe.getState("BeforePreroll");this.transitionTo(s);}else if(!this.inAdBreak()){var a=fe.getState("Preroll");this.transitionTo(a);}},i.onNoPostroll=function(r){!this.isContentResuming()&&!this.inAdBreak()?this.abort(r):N.log.warn("Unexpected nopostroll event (Postroll)");},i.resumeContent=function(r){this.contentResuming=!0,r.addClass("vjs-ad-content-resuming");},i.abort=function(r){var s=fe.getState("AdsDone");this.resumeContent(r),r.removeClass("vjs-ad-loading"),this.transitionTo(s);},i.cleanup=function(r){r.removeClass("vjs-ad-content-resuming"),r.clearTimeout(this._postrollTimeout),r.ads._contentEnding=!1;},e;}(kO);fe.registerState("Postroll",PO);var LO=fe.getState("ContentState"),RO=function(t){ui(e,t);function e(){return t.apply(this,arguments)||this;}e._getName=function(){return"ContentPlayback";};var i=e.prototype;return i.init=function(r){r.ads._shouldBlockPlay=!1;},i.onAdsReady=function(r){r.ads.debug("Received adsready event (ContentPlayback)"),r.ads.nopreroll_||(r.ads.debug("Triggered readyforpreroll event (ContentPlayback)"),r.trigger("readyforpreroll"));},i.onReadyForPostroll=function(r){var s=fe.getState("Postroll");r.ads.debug("Received readyforpostroll event"),this.transitionTo(s);},i.startLinearAdMode=function(){var r=fe.getState("Midroll");this.transitionTo(r);},e;}(LO);fe.registerState("ContentPlayback",RO);var OO=fe.getState("ContentState"),NO=function(t){ui(e,t);function e(){return t.apply(this,arguments)||this;}e._getName=function(){return"StitchedContentPlayback";};var i=e.prototype;return i.init=function(){this.player.ads._shouldBlockPlay=!1;},i.onContentChanged=function(){this.player.ads.debug("Received contentchanged event ("+this.constructor._getName()+")");},i.startLinearAdMode=function(){var r=fe.getState("StitchedAdRoll");this.transitionTo(r);},e;}(OO);fe.registerState("StitchedContentPlayback",NO);var jO=fe.getState("AdState"),MO=function(t){ui(e,t);function e(){return t.apply(this,arguments)||this;}e._getName=function(){return"StitchedAdRoll";};var i=e.prototype;return i.init=function(){this.waitingForAdBreak=!1,this.contentResuming=!1,this.player.ads.adType="stitched",nn.start(this.player);},i.onPlaying=function(){},i.onContentResumed=function(){},i.onAdEnded=function(){this.endLinearAdMode(),this.player.trigger("ended");},i.endLinearAdMode=function(){var r=fe.getState("StitchedContentPlayback");nn.end(this.player),this.transitionTo(r);},e;}(jO);fe.registerState("StitchedAdRoll",MO);var BO=fe.getState("AdState"),FO=function(t){ui(e,t);function e(){return t.apply(this,arguments)||this;}e._getName=function(){return"OutstreamPending";};var i=e.prototype;return i.init=function(r){this.adsReady=!1;},i.onPlay=function(r){var s=fe.getState("OutstreamPlayback");r.ads.debug("Received play event (OutstreamPending)"),this.transitionTo(s,this.adsReady);},i.onAdsReady=function(r){r.ads.debug("Received adsready event (OutstreamPending)"),this.adsReady=!0;},i.onAdsError=function(){this.player.ads.debug("adserror (OutstreamPending)"),this.adsReady=!1;},e;}(BO);fe.registerState("OutstreamPending",FO);var UO=fe.getState("AdState"),VO=function(t){ui(e,t);function e(){return t.apply(this,arguments)||this;}e._getName=function(){return"OutstreamPlayback";};var i=e.prototype;return i.init=function(r,s){r.addClass("vjs-ad-loading"),s?this.handleAdsReady():this.abort(r);},i.onAdsReady=function(r){r.ads.inAdBreak()?N.log.warn("Unexpected adsready event (Preroll)"):(r.ads.debug("Received adsready event (Preroll)"),this.handleAdsReady());},i.abort=function(r){var s=fe.getState("OutstreamDone");r.removeClass("vjs-ad-loading"),this.transitionTo(s);},i.onAdStarted=function(r){r.removeClass("vjs-ad-loading");},i.handleAdsReady=function(){this.adsReady=!0,this.readyForOutstreamPlayback();},i.readyForOutstreamPlayback=function(){var r=this.player;this.afterLoadStart(function(){r.trigger("readyforoutstream");});},i.startLinearAdMode=function(){var r=this.player;this.adsReady&&!r.ads.inAdBreak()&&nn.start(r);},i.cleanup=function(r){r.ads._hasThereBeenALoadStartDuringPlayerLife||N.log.warn("Leaving OutstreamPlayback state before loadstart event can cause issues."),this.cleanupPartial(r);},i.cleanupPartial=function(r){r.removeClass("vjs-ad-loading"),r.removeClass("vjs-ad-content-resuming"),this.clearTimeout(r);},i.clearTimeout=function(r){r.clearTimeout(this._timeout),this._timeout=null;},i.onAdStarted=function(r){r.removeClass("vjs-ad-loading");},i.onAdsError=function(r){var s=this;N.log("adserror (OutstreamPlayback)"),this.inAdBreak()?r.ads.endLinearAdMode():this.afterLoadStart(function(){s.abort(r);});},i.onAdTimeout=function(r){var s=this;this.afterLoadStart(function(){r.ads.debug("adtimeout (OutstreamPlayback)"),s.abort(r);});},i.onAdsCanceled=function(r){var s=this;r.ads.debug("adscanceled (OutstreamPlaybac)"),this.afterLoadStart(function(){s.abort(r);});},i.endLinearAdMode=function(){var r=this;if(this.inAdBreak()){this.player.removeClass("vjs-ad-loading");var s=fe.getState("OutstreamDone");nn.end(this.player,function(){r.transitionTo(s);});}},i.afterLoadStart=function(r){var s=this.player;s.ads._hasThereBeenALoadStartDuringPlayerLife?r():(s.ads.debug("Waiting for loadstart..."),s.one("loadstart",function(){s.ads.debug("Received loadstart event"),r();}));},i.skipLinearAdMode=function(){var r=this,s=this.player,a=fe.getState("OutstreamDone");this.inAdBreak()?N.log.warn("Unexpected skipLinearAdMode invocation"):this.afterLoadStart(function(){s.trigger("adskip"),s.ads.debug("skipLinearAdMode (OutstreamPlayback)"),r.transitionTo(a);});},e;}(UO);fe.registerState("OutstreamPlayback",VO);var qO=fe.getState("AdState"),HO=function(t){ui(e,t);function e(){return t.apply(this,arguments)||this;}e._getName=function(){return"OutstreamDone";};var i=e.prototype;return i.init=function(r){r.trigger("ended");},i.startLinearAdMode=function(){N.log.warn("Unexpected startLinearAdMode invocation (OutstreamDone)");},e;}(qO);fe.registerState("OutstreamDone",HO);var $O=zs.isMiddlewareMediatorSupported,zO=N.getTech("Html5").Events,GO={timeout:5e3,prerollTimeout:void 0,postrollTimeout:void 0,debug:!1,stitchedAds:!1,contentIsLive:void 0,liveCuePoints:!0,allowVjsAutoplay:N.options.normalizeAutoplay||!1},Op=function(e){var i=this,n=N.obj.merge(GO,e),r=[];
232zO.concat(["firstplay","loadedalldata"]).forEach(function(o){r.indexOf(o)===-1&&r.push(o);}),i.on(r,YR),$O()||uO(i,n.debug),i.setTimeout(function(){!i.ads._hasThereBeenALoadStartDuringPlayerLife&&i.src()!==""&&N.log.error("videojs-contrib-ads has not seen a loadstart event 5 seconds after being initialized, but a source is present. This indicates that videojs-contrib-ads was initialized too late. It must be initialized immediately after video.js in the same tick. As a result, some ads will not play and some media events will be incorrect. For more information, see http://videojs.github.io/videojs-contrib-ads/integrator/getting-started.html");},5e3),i.on("ended",function(){i.hasClass("vjs-has-started")||i.addClass("vjs-has-started");}),i.on("contenttimeupdate",function(){i.removeClass("vjs-waiting");}),i.on(["addurationchange","adcanplay"],function(){if(!i.ads.settings.stitchedAds&&!i.hasStarted()&&!(i.ads.snapshot&&i.currentSrc()===i.ads.snapshot.currentSrc)&&i.ads.inAdBreak()){var o=i.play();o&&o.catch&&o.catch(function(u){N.log.warn("Play promise rejected when playing ad",u);});}}),i.on("nopreroll",function(){i.ads.debug("Received nopreroll event"),i.ads.nopreroll_=!0;}),i.on("nopostroll",function(){i.ads.debug("Received nopostroll event"),i.ads.nopostroll_=!0;}),i.on("playing",function(){i.ads._cancelledPlay=!1,i.ads._pausedOnContentupdate=!1;}),i.on("play",function(){i.ads._playRequested=!0;}),i.one("loadstart",function(){i.ads._hasThereBeenALoadStartDuringPlayerLife=!0;}),i.on("loadeddata",function(){i.ads._hasThereBeenALoadedData=!0;}),i.on("loadedmetadata",function(){i.ads._hasThereBeenALoadedMetaData=!0;}),i.ads=HR(i),i.ads.settings=n,n.stitchedAds=!!n.stitchedAds,n.playerMode==="outstream"?(i.src(mO),i.ads._state=new(fe.getState("OutstreamPending"))(i)):n.stitchedAds?i.ads._state=new(fe.getState("StitchedContentPlayback"))(i):i.ads._state=new(fe.getState("BeforePreroll"))(i),i.ads._state.init(i),i.ads.cueTextTracks=Nr,i.ads.adMacroReplacement=aO.bind(i),XR(i),i.on("contentchanged",i.ads.reset);var s=function(){return!i.ads.shouldPlayContentBehindAd(i)&&i.ads.inAdBreak()&&i.tech_.featuresNativeTextTracks&&N.browser.IS_IOS&&!Array.isArray(i.textTracks());},a=function(){var u=i.textTracks();if(s())for(var c=0;c<u.length;c++){var p=u[c];p.mode==="showing"&&(p.mode="disabled");}};i.ready(function(){i.textTracks().addEventListener("change",a);}),i.on(["play","playing","ended","adsready","adscanceled","adskip","adserror","adtimeout","adended","ads-ad-started","ads-ad-skipped","contentchanged","dispose","contentresumed","readyforpostroll","nopreroll","nopostroll"],function(o){i.ads._state.handleEvent(o.type);}),i.on("dispose",function(){i.ads.reset(),i.textTracks().removeEventListener("change",a);}),fS(),pS(function(){}),i.ads.listenToTcf=fS,i.ads.updateUsPrivacyString=function(o){return pS(o);};};Op.Error=Or;Op.VERSION=vS;pO(Op);Lr();function Gs(t,e,i){e.forEach(n=>{t.trigger(n,i);});}function bS(t,e,i,n){Gs(t,["ads-request"],{cueId:n.id,cueTime:n.time,timeDiff:i-t.currentPosition,live:t.isLive,adType:e});}function TS(t,e,i){Gs(t,["adsready"],i?{cueId:e.id,cueTime:e.time,live:t.isLive,impressionType:i.type,adName:i.name,target:i.type==="VIDEO"?i.videos[0].href:i.images[0].href}:void 0);}function qd(t,e,i,n,r){Gs(t,["ads-play","adstart"],{cueId:i.id,cueTime:i.time,live:t.isLive,impressionType:n.type,adName:n.name,target:n.type==="VIDEO"?n?.videos[0].href:n?.images[0].href,variant:r,adType:e});}function Hd(t,e,i,n,r){Gs(t,["ads-click"],{cueId:i.id,cueTime:i.time,live:t.isLive,impressionType:n.type,adName:n.name,target:n.target,variant:r,adType:e});}function SS(t,e,i,n,r){Gs(t,["ads-skipped","adskip"],{cueId:i.id,cueTime:i.time,live:t.isLive,impressionType:n.type,adName:n.name,variant:r,adType:e});}function $d(t,e,i,n,r){Gs(t,["ads-ended","adend"],{cueId:i.id,cueTime:i.time,live:t.isLive,impressionType:n.type,adName:n.name,variant:r,adType:e});}function ES(t,e,i,n,r){if(!n.images)return;let s=[],a=[],o=n.images[0],u=(n.displayDuration||10)*1e3,c=!1,p=document.createElement("div");p.className="banner-ad",p.innerHTML=[o.href?`<a class="cta" href="${o.href}" target='${n.target||"_blank"}'><img src='${o.src}'></a>`:`<img class="" src='${o.src}'>`,'<span class="ad-text">Advertisement</span>'].join(`
233`),t.el().appendChild(p),s.push(p),qd(t,e,i,n,o.fileName),o.href&&(p.querySelector("a.cta").onclick=()=>{t.pause(),c||(Hd(t,e,i,n,o.fileName),c=!0),AS(t,s,a);}),t.setTimeout(()=>{c||($d(t,e,i,n,o.fileName),c=!0),AS(t,s,a);},u),t.trigger("adscanceled");}function AS(t,e,i){e.forEach(n=>n.parentNode?.removeChild(n)),i.forEach(({type:n,fn:r})=>{t.off(n,r);});}function xS(t,e,i,n,r){if(!n.videos)return;let s=Date.now();t.ads.startLinearAdMode();let a=!1,o=[],u=[],c=n.videos[0];t.src(c.src),qd(t,e,i,n,c.fileName);let p=()=>{XO(t,o,u);};if(t.one("adprogress",()=>{s=Date.now(),t.play();}),t.one("adloadstart",()=>{t.play();}),c.href){let g=document.createElement("a");o.push(g),g.className="preroll-blocker",g.href=c.href,g.target=n.target||"_blank",g.onclick=function(){a||(Hd(t,e,i,n,c.fileName),a=!0),t.pause();},t.el().insertBefore(g,t.controlBar.el());}if(n.showRemaining&&!n.allowSkip){let g=document.createElement("div");g.className="remaining-time",o.push(g),t.el().appendChild(g);let E=()=>{WO(t,g,r.strings);};u.push({type:"adtimeupdate",fn:E}),t.on("adtimeupdate",E);}let _=!1,T;if(n.allowSkip!==!1){T=document.createElement("div"),T.className="preroll-skip-button",t.el().appendChild(T),o.push(T),T.onclick=function(E){if(_&&(a||(SS(t,"MIDROLL",i,n,c.fileName),a=!0),p()),E.stopPropagation){E.stopPropagation();return;}else return!1;};let g=()=>{_=YO(t,T,n.skipTime||10,r.strings);};u.push({type:"adtimeupdate",fn:g}),t.on("adtimeupdate",g);}let y=()=>{p();},b=()=>{KO(t,s,T,1e3,b)&&(a||$d(t,"MIDROLL",i,n,c.fileName),p());};t.one("error",y),u.push({type:"error",fn:y}),t.one("adended",b),u.push({type:"adended",fn:b});}function WO(t,e,i){t.loadingSpinner.hide();let n=Math.ceil(t.remainingTime());n>0&&(e.innerHTML=i["video start in"]+n);}function YO(t,e,i,n){t.loadingSpinner.hide();let r=Math.ceil(i-t.currentTime());return r>0?(e.innerHTML=n["skip in"]+r+"...",!1):(e.classList.contains("enabled")||(e.classList.add("enabled"),e.innerHTML=n.skip),!0);}function XO(t,e,i){e.forEach(n=>
233n.parentNode?.removeChild(n)),i.forEach(({type:n,fn:r})=>{t.off(n,r);}),t.loadingSpinner.show(),t.posterImage.hide(),t.bigPlayButton.hide(),t.ads.endLinearAdMode();}function KO(t,e,i,n,r){return Date.now()-e>n?!0:(t.play(),t.one("adended",r),i&&i.classList.remove("enabled"),!1);}function QO(t,e,i,n){return function(){i.type==="VIDEO"?xS(t,"PREROLL",e,i,n):ES(t,"PREROLL",e,i,n);};}function Np(t,e,i){bS(t,"PREROLL",0,e),i.adsProvider.getAd("PREROLL",e.id,t.liveTracker.isLive()).then(n=>{n?t.one("readyforpreroll",QO(t,e,n,i)):t.one("readyforpreroll",()=>t.trigger("nopreroll")),TS(t,e,n);});}function CS(t,e){t.one("readyforpreroll",()=>t.trigger("nopreroll")),t.trigger("adsready");}function JO(){return{liveCuePoints:!1,prerollTimeout:1e4,debug:!1};}function ZO(t){let e={adsProvider:{cuePoints:()=>Promise.resolve([]),getAd:()=>Promise.resolve(void 0),getExpectedLiveStreamLength:()=>0},strings:hS,minIntervalBetweenAds:1},i=N.mergeOptions(e,t);t.adsProvider?.adsSettings&&(i=N.mergeOptions(i,t.adsProvider.adsSettings));let n=this;n.ads(JO()),i.adsProvider.cuePoints().then(r=>{let s=[],a=!1;for(let o of r||[])o.time==="START"?(n.on("contentchanged",()=>{Np(n,o,i);}),Np(n,o,i),a=!0):o.time==="END"||s.push(o);a||CS(n,i);});}function wS(){N.registerPlugin("adPlugin",ZO);}function DS(t,e){console.info("Initiating ad plugin"),t.adPlugin(e);}var gU=et(Dm()),Uo=et(Bt());var fU=et(Dm()),nc=et(Bt());var Bo=nc.adapters.Videojs.extend({getPlayerVersion:function(){return"web_videojs_8}";},registerListeners:function(){nc.Log.notice("Registering listeners"),Bo.__super__.registerListeners.apply(this);let t={ended:()=>this.conditionalStop(),play:()=>this.playListener(),adspause:()=>console.log("Ads pause event"),adsready:(...e)=>this.onAdsPlay(...e),"ads-play":(...e)=>this.onAdsPlay(...e)};for(let[e,i]of Object.entries(t))this.references[e]&&this.player.off(e,this.references[e]),this.references[e]=this.player.on(e,i);},onAdsPlay:function(t,e){e&&e.impressionType==="VIDEO"&&Q1({"ad.title":e.adName,"ad.resource":e.variant});},isOnAdBreak(){return!!(this.player.ads&&this.player.ads.inAdBreak&&this.player.ads.inAdBreak());},conditionalStop:function(){this.isOnAdBreak()||Bo.__super__.conditionalStop.apply(this);},playListener:function(){this.isOnAdBreak()||Bo.__super__.playListener.apply(this);}});var Fo;function J1(){Fo=new Uo.Plugin({accountCode:pn.videoAnalytics.accountCode,"app.name":"web:joymo-tv","app.releaseVersion":"2.0"}),pn.videoAnalytics.debug&&(Uo.Log.logLevel=Uo.Log.Level.DEBUG);}function lM(t){return pn.videoAnalytics.enabled===!1?!1:Array.isArray(pn.videoAnalytics.enabled)?pn.videoAnalytics.enabled.includes(t.username):!0;}function Z1(t,e){if(lM(e)){if(!Fo){console.warn("Youbora was not initialized correctly");return;}Fo.setOptions(ti(ti({},pn.videoAnalytics.options),e)),Fo.setAdapter(new Bo(t));}}function Q1(t){Fo.setOptions(t);}var vx=et(gx()),TM="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",rc;function SM(){return rc||(rc=new Promise((t,e)=>{let i=document.createElement("script");i.type="application/javascript",i.async=!0,i.src=TM,i.addEventListener("load",()=>t(!0)),i.addEventListener("error",()=>e(!1)),document.body.appendChild(i);}),rc);}function _x(t){(0,vx.default)(t,{preloadWebComponents:!1}),SM().then(e=>e);}function AM(t){if(!t.chromecastSessionManager)return;let e=t.chromecastSessionManager,i=Object.getPrototypeOf(e).constructor;i.hasConnected&&(i.hasConnected=!1);}function yx(t){t.chromecast({receiverAppID:"CC1AD845"}),t.on("dispose",()=>AM(t));}var bx=!1;function Tx(t){bx||(J1(),wS(),_x(t),bx=!0);}function Sx(t){return{fluid:!0,fill:!0,controls:!0,techOrder:["chromecast","html5"],html5:{vhs:{overrideNative:t},nativeAudioTracks:!1,nativeVideoTracks:!1,nativeTextTracks:!1},liveui:!0,responsive:!0,controlBar:{skipButtons:{forward:10,backward:10},children:["playToggle","skipBackward","skipForward","progressControl","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","seekToLive","customControlSpacer","playbackRateMenuButton","fullscreenToggle"].filter(e=>e!==void 0),volumePanel:{inline:!1}}};}function vt(t){return"https://md.p0.jar15.joymo.no/public/"+t;}function Rm(t){return"https://md.p0.bucs-jar15.joymo.tv/public/"+t;}var EM=vt("03dxTiI8BLENlk1Vat4N/ads/MBLNatChamps.mp4"),xM=vt("QaVzbVlrp8deh9ojYgtZ/ads/Insura+App+Sting+-+5S-e
233ncoded.mp4"),CM=vt("jcuiiq6fmjXY0kAEIfCo/ads/10DEC_ARCHERY_PRE_ROLL.mp4"),jU=vt("jcuiiq6fmjXY0kAEIfCo/ads/2024_Hoyt_Easton_+Combined.mp4"),Ax=vt("jcuiiq6fmjXY0kAEIfCo/ads/Advert_24_Edit_1.mp4"),wM=vt("jcuiiq6fmjXY0kAEIfCo/ads/2024-Wa-10-Second-Commercial-Final.mp4"),DM=vt("jcuiiq6fmjXY0kAEIfCo/ads/easton-pre-roll-ad-10s.mp4"),IM=vt("VzIFad2Sq29SnFONF1Mj/ads/IrelandRlogo.mp4"),Ex=vt("VzIFad2Sq29SnFONF1Mj/ads/Ot8nJE5CDLxR29eN9LpO.mp4"),xx=vt("VzIFad2Sq29SnFONF1Mj/ads/A1JlNol9I5phPo3H9HwB.mp4"),Cx=vt("VzIFad2Sq29SnFONF1Mj/ads/WoVdweQtf4AfmLVM1kzZ.mp4"),wx=vt("VzIFad2Sq29SnFONF1Mj/ads/dRdFRrSuCvGqRWvnlltG.mp4"),MU=vt("8qRfXG1IprJvJTK6HZNT/ads/EN-Super-Cup-Pre-Roll.mp4"),BU=vt("8qRfXG1IprJvJTK6HZNT/ads/entv_ad_global.mp4"),FU=vt("8qRfXG1IprJvJTK6HZNT/ads/Gf+For+En+Tv.mp4"),UU=vt("8qRfXG1IprJvJTK6HZNT/ads/entv-super-cup-3.mp4"),kM=vt("8qRfXG1IprJvJTK6HZNT/ads/WIDE_TM_1_WEBSAFE.mp4"),PM=vt("adKRUey5k6UVEH3HsmAG/ads/judocanada-preroll-2026.mp4"),LM=Rm("BpKUGfqLxV4qwupF10kd/ads/preroll-manchester-2024-09-25.mp4"),RM=Rm("4YXbpTAYSNOqql8psA1n/ads/socs-tv-advert-websafe.mp4"),OM=Rm("4YXbpTAYSNOqql8psA1n/ads/go-girlz.mp4");var NM=[["Ot8nJE5CDLxR29eN9LpO",{url:Ex,href:"https://2ly.link/24WzT"}],["XfuAz20j1ZllXWYPAxKk",{url:Ex,href:"https://linkly.link/2GPJ5"}],["A1JlNol9I5phPo3H9HwB",{url:xx,href:"https://2ly.link/24WzW"}],["gfXlTk40FiEPQM6rgDDc",{url:xx,href:"https://linkly.link/2GPJ2"}],["WoVdweQtf4AfmLVM1kzZ",{url:Cx,href:"https://2ly.link/24WzY"}],["wjVQzOW7i9uqg2cTvF3o",{url:Cx,href:"https://linkly.link/2GPJ8"}],["dRdFRrSuCvGqRWvnlltG",{url:wx,href:"https://2ly.link/24Wzc"}],["ZLm7zea2blMbF9IpaanQ",{url:wx,href:"https://linkly.link/2GPJC"}],["buv5OKD0rE6q5TO3I1fc",{url:EM,href:"",tags:["Qualifiers"]}],["Le6PpMPYaP56wdulfzij",{url:RM,href:"https://linkly.link/2KW17"}],["YjHvPt4BisD0j5HPkJ4G",{url:PM,href:""}],["SOME-RANDOM-TESTING-EVENT-ID",{url:"",href:"https://no.where/"}],[null,null]];function Dx(t){if(t.docId==="ajWe1s42plJD9xD2Kpvs")return{url:OM,href:""};if(t.eventId==="buv5OKD0rE6q5TO3I1fc")return{url:xM,href:"https://2ly.link/1x2MJ"};if(t.channelId==="jcuiiq6fmjXY0kAEIfCo"){switch(t.eventId){case"a5blAhnSpUmXAKXyK0hD":return{url:Ax,href:"https://bit.ly/3vLGyQn"};case"3rJVr8eAR2ZXTbJpPMCo":return{url:DM,href:"https://linkly.link/2Vqoj"};case"CBZfm3t2eB1xs2kLBkB0":return{url:wM,href:"https://2ly.link/1y8p1"};default:return{url:CM,href:""};}return null;}if(t.channelId==="8qRfXG1IprJvJTK6HZNT"&&new Date()<new Date("2026-11-23T00:00:00"))return{url:kM,href:""};if(t.channelId==="BpKUGfqLxV4qwupF10kd")return{url:LM,href:"https://bit.ly/3XGm59M"};if(t.tags.includes("testing:force-preroll"))return{url:Ax,href:""};let e=NM.find(i=>t.eventId!==i[0]||!i[1]?null:!("tags"in i[1])||i[1].tags.some(n=>t.tags.includes(n))?i[1]:null);return e?e[1]:t.channelId==="0AYlDfFb7OtdRQfjgbQ2"?{url:IM,href:"https://2ly.link/1zZGa"}:null;}var jM=["player"],Ix=(()=>{let e=class e{constructor(){this.fullScreenChange=new Mn(),this.videoStarted=new Mn(),this.videoPaused=new Mn(),this.videoStopped=new Mn(),this.outputEvents={play:()=>{this.videoStarted.emit(new Date());},pause:()=>{this.videoPaused.emit(new Date());},ended:()=>{this.videoStopped.emit(new Date());},fullscreenchange:()=>{this.fullScreenChange.emit(this.player?.isFullscreen());}},Tx(N),this._destroyRef=Ng(Mg);}get _video(){if(!this.video)throw new TypeError("no video input provided to the component");return this.video;}get _player(){if(!this.player)throw new TypeError("Your are trying to access a player before it was initialized.");return this.player;}ngOnInit(){if(!this.playerElement)throw Ll.logCriticalError("Failed to get the video player","CONTENT-ACCESS"),new TypeError("The player element was not found");if(!this.video)throw new TypeError("Video was not provided");let n=!N.browser.IS_ANY_SAFARI&&!N.browser.IS_IOS;this.player=N(this.playerElement.nativeElement,Rn(ti({},Sx(n)),{poster:this._video.posterImage,sources:[{src:this._video.videoLocation}]}),function(){}),this.setUpEvents(this.player),this.setupAnalytics(this.player,this.video,this.event),this.setupAdsPlugin(this.player,this.video),this.setupChromecast(this.player),this.setupHotKeys(this.player,n),this.setupPlayerExternalController(this.controller,this.player);}setupPlayerExternalController(n,r){n&&n.pipe(Cv(this._destroyRef)).subscribe(s=>{switch(s.type){case"POSITION":return s.scrollIntoView&&setTimeout(()=>this.playerElement?.nativeElement.scrollIntoView({block:"center",behavior:"smooth"}),0),r.currentTime(Math.min(s.pos,(r.duration()??0)-1));case"PLAY":return r.play();case"PAUSE":return r.pause();case"START":return r.currentTime(0),r.play();}});}setupChromecast(n){yx(n);}setupHotKeys(n,r){n.hotkeys({captureDocumentHotkeys:!1,volumeStep:.1,seekStep:10,enableJogStyle:!0,enableModifiersForNumbers:!0,alwaysCaptureHotkeys:!0,enableVolumeScroll:!1}),r&&(n.qualityLevels({}),n.qualitySelectorHls({}));}ngOnDestroy(){this.player&&(this.clearEvents(this.player),this.player.dis
233pose());}setUpEvents(n){for(let[r,s]of Object.entries(this.outputEvents))n.on(r,s);}clearEvents(n){for(let[r,s]of Object.entries(this.outputEvents))n.off(r,s);}setupAnalytics(n,r,s){Z1(n,Rn(ti({},this.analyticsContextData||{}),{"content.title":r.name,"content.channel":r.channelId,"content.tvShow":s?s.docId:"CHANNEL_WIDE","content.season":s?s.title:"CHANNEL_WIDE","content.duration":r.duration||void 0,"content.isLive":r.streamState==="LIVE","content.id":r.docId,"content.streamingProtocol":"HLS","content.metadata":{tags:r.tags.sort().join("|"),attr0:r.attr0||"",attr1:r.attr1||"",attr2:r.attr2||"",attr3:r.attr3||""},"content.type":r.type,"content.imdbId":(r.startTime||r.uploadTime)?.toISOString().split("T")[0]||""}));}setupAdsPlugin(n,r){if(r.type==="SHORT")return;let s=Dx(r);if(!s)return;let a={name:"Preroll",allowSkip:!1,adSign:!1,videos:[{fileName:s.url,href:s.href,src:s.url}],showRemaining:!1,target:void 0,skipTime:10,type:"VIDEO"};DS(n,{adsProvider:{cuePoints:()=>Promise.resolve([{time:"START",id:"preroll"}]),getAd:(o,u,c)=>xg(this,null,function*(){if(o==="PREROLL")return a;}),getExpectedLiveStreamLength:()=>r.streamState==="LIVE"&&r.endTime&&r.startTime?(r.endTime.getTime()-r.startTime.getTime())/1e3:r.duration||0}});}};e.ɵfac=function(r){return new(r||e)();},e.ɵcmp=qi({type:e,selectors:[["joymo-video-player"]],viewQuery:function(r,s){if(r&1&&bl(jM,7),r&2){let a;Tl(a=Sl())&&(s.playerElement=a.first);}},inputs:{video:"video",event:"event",analyticsContextData:"analyticsContextData",controller:"controller"},outputs:{fullScreenChange:"fullScreenChange",videoStarted:"videoStarted",videoPaused:"videoPaused",videoStopped:"videoStopped"},decls:2,vars:0,consts:[["player",""],["playsinline","",1,"joymo-video-player","video-js"]],template:function(r,s){r&1&&ze(0,"video",1,0);},styles:[`.vjs-svg-icon{display:inline-block;background-repeat:no-repeat;background-position:center;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{position:absolute;top:0;left:0;width:100%;height:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr
2330lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA==) format("woff");font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:"\\f101"}.vjs-icon-play-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play-circle:before{content:"\\f102"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:"\\f103"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:"\\f104"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:"\\f105"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:"\\f106"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:"\\f107"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:"\\f108"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:"\\f109"}.vjs-icon-spinner{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-spinner:before{content:"\\f10a"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:"\\f10b"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:"\\f10c"}.vjs-icon-hd{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-hd:before{content:"\\f10d"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:"\\f10e"}.vjs-icon-downloading{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-downloading:before{content:"\\f10f"}.vjs-icon-file-download{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download:before{content:"\\f110"}.vjs-icon-file-download-done{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download-done:before{content:"\\f111"}.vjs-icon-file-download-off{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download-off:before{content:"\\f112"}
233.vjs-icon-share{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-share:before{content:"\\f113"}.vjs-icon-cog{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cog:before{content:"\\f114"}.vjs-icon-square{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-square:before{content:"\\f115"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:"\\f116"}.vjs-icon-circle-outline{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-outline:before{content:"\\f117"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-inner-circle:before{content:"\\f118"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:"\\f119"}.vjs-icon-repeat{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-repeat:before{content:"\\f11a"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:"\\f11b"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:"\\f11c"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:"\\f11d"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:"\\f11e"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:"\\f11f"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:"\\f120"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:"\\f121"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:"\\f122"}.vjs-icon-next-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-next-item:before{content:"\\f123"}.vjs-icon-previous-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-previous-item:before{content:"\\f124"}.vjs-icon-shuffle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-shuffle:before{content:"\\f125"}.vjs-icon-cast{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cast:before{content:"\\f126"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:"\\f127"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:"\\f128"}.vjs-icon-facebook{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-facebook:before{content:"\\f129"}.vjs-icon-linkedin{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-linkedin:before{content:"\\f12a"}.vjs-icon-twitter{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-twitter:before{content:"\\f12b"}.vjs-icon-tumblr{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-tumblr:before{content:"\\f12c"}.vjs-icon-pinterest{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pinterest:before{content:"\\f12d"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:"\\f12e"}.video-js{display:inline-block;vertical-align:top;box-sizing:border-box;color:#fff;background-color:#000;position:relative;padding:0;font-size:10px;line-height:1;font-weight:400;font-style:normal;font-family:Arial,Helvetica,sans-serif;word-break:initial}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js[tabindex="-1"]{outline:0}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{width:100%;max-width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js.vjs-fill:not(.vjs-audio-only-mode){width:100%;height:100%}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{padding:0;margin:0;height:100%}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{position:fixed;overflow:hidden;z-index:1000;inset:0}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{width:100%!important;height:100%!important;padding-top:0!important;display:block}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{position:absolute;bottom:10%;font-size:2em;background-color:#000000b3;padding:.5em;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{opacity:.5;cursor:default}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{padding:20px;color:#fff;background-color:#000;font-size:18px;font-family:Arial,Helvetica,sans-serif;text-align:center;width:300px;height:150px;margin:0 auto}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{font-size:3em;line-height:1.5em;height:1.63332em;width:3em;display:block;position:absolute;top:50%;left:50%;padding:0;margin-top:-.81666em;margin-left:-1.5em;cursor:pointer;opacity:1;border:.06666em solid #fff;background-color:#2b333f;background-color:#2b333fb3;border-radius:.3em;transition:all .4s}.vjs-big-play-button .vjs-svg-icon{width:1em;height:1em;position:absolute;top:50%;left:50%;line-height:1;transform:translate(-50%,-50%)}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{border-color:#fff;background-color:#73859f;background-color:#73859f80;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-control
233s .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{background:0 0;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-transform:none;text-decoration:none;transition:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.video-js.vjs-spatial-navigation-enabled .vjs-button:focus{outline:.0625em solid #fff;box-shadow:none}.vjs-control .vjs-button{width:100%;height:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:#000c;background:linear-gradient(180deg,#000c,#fff0);overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;font-family:Arial,Helvetica,sans-serif;overflow:auto}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;justify-content:center;list-style:none;margin:0;padding:.2em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:#73859f80}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:0 0}.vjs-menu li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em;font-weight:700;cursor:default}.vjs-menu-button-popup .vjs-menu{display:none;position:absolute;bottom:0;width:10em;left:-3em;height:0;margin-bottom:1.5em;border-top-color:#2b333fb3}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:#2b333fb3;position:absolute;width:100%;bottom:1.5em;max-height:15em}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{transition:all .4s;overflow:hidden}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{opacity:0;height:100%;width:auto;position:absolute;left:4em;top:0;padding:0;margin:0;transition:all .4s}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{width:auto;height:100%;margin:0;overflow:hidden}.video-js .vjs-control-bar{display:none;width:100%;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#2b333f;background-color:#2b333fb3}.video-js.vjs-spatial-navigation-enabled .vjs-control-bar{gap:1px}
233.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;visibility:visible;opacity:1;transition:visibility .1s,opacity .1s}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{visibility:visible;opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible;pointer-events:auto}.video-js .vjs-control{position:relative;text-align:center;margin:0;padding:0;height:100%;width:4em;flex:none}.video-js .vjs-control.vjs-visible-text{width:auto;padding-left:1em;padding-right:1em}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{cursor:pointer;flex:auto;display:flex;align-items:center;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{display:flex;align-items:center}.video-js .vjs-progress-holder{flex:auto;transition:all .2s;height:.3em}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{position:absolute;display:block;height:100%;margin:0;padding:0;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;position:absolute;right:-.5em;line-height:.35em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{position:absolute;top:-.35em;right:-.4em;width:.9em;height:.9em;pointer-events:none;line-height:.15em;z-index:1}.video-js .vjs-load-progress{background:#73859f80}.video-js .vjs-load-progress div{background:#73859fbf}.video-js .vjs-time-tooltip{background-color:#fff;background-color:#fffc;border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{display:none;position:absolute;width:1px;height:100%;background-color:#000;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display,.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display{display:block}.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.vjs-mouse-display .vjs-time-tooltip{color:#fff;background-color:#000;background-color:#000c}.video-js .vjs-slider{position:relative;cursor:pointer;padding:0;margin:0 .45em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:#73859f;background-color:#73859f80}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{text-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.video-js.vjs-spatial-navigation-enabled .vjs-slider:focus{outline:.0625em solid #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;margin-right:1em;display:flex}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{visibility:visible;opacity:0;width:1px;height:1px;margin-left:-1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{visibility:visible;opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{width:5em;height:3em;margin-right:0}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left
233:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{width:10em;transition:width .1s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;width:3em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{width:5em;height:.3em}.vjs-volume-bar.vjs-slider-vertical{width:.3em;height:5em;margin:1.35em auto}.video-js .vjs-volume-level{position:absolute;bottom:0;left:0;background-color:#fff}.video-js .vjs-volume-level:before{position:absolute;font-size:.9em;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{top:-.5em;left:-.3em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{position:absolute;width:.9em;height:.9em;pointer-events:none;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translate(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{width:3em;height:8em;bottom:8em;background-color:#2b333f;background-color:#2b333fb3}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:#fffc;border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{display:none;position:absolute;width:100%;height:1px;background-color:#000;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{width:1px;height:100%}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.vjs-mouse-display .vjs-volume-tooltip{color:#fff;background-color:#000;background-color:#000c}.vjs-poster{display:inline-block;vertical-align:middle;cursor:pointer;margin:0;padding:0;position:absolute;inset:0;height:100%}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{width:100%;height:100%;object-fit:contain}.video-js .vjs-live-control{display:flex;align-items:flex-start;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;flex:none;display:inline-flex;height:100%;padding-left:.5em;padding-right:.5em;font-size:1em;line-height:3em;width:auto;min-width:4em}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{margin-right:.5em;color:#888}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{width:1em;height:1em;pointer-events:none;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;width:auto;padding-left:1em;padding-right:1em}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}
233.vjs-normalise-time-controls:not(.vjs-live) .vjs-time-control{display:flex}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{position:absolute;inset:0 0 3em;pointer-events:none}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;text-align:center;margin-bottom:.1em}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js.vjs-force-center-align-cues .vjs-text-track-cue{text-align:center!important;width:80%!important}@supports not (inset:10px){.video-js .vjs-text-track-display>div{inset:0}}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-playback-rate .vjs-playback-rate-value{pointer-events:none;font-size:1.5em;line-height:2;text-align:center}.vjs-playback-rate .vjs-menu{width:4em;left:0}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);opacity:.85;text-align:left;border:.6em solid rgba(43,51,63,.7);box-sizing:border-box;background-clip:padding-box;width:5em;height:5em;border-radius:50%;visibility:hidden}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{display:flex;justify-content:center;align-items:center;animation:vjs-spinner-show 0s linear .3s forwards}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{content:"";position:absolute;box-sizing:inherit;width:inherit;height:inherit;border-radius:inherit;opacity:1;border:inherit;border-color:transparent;border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{border-top-color:#fff;animation-delay:.44s}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(360deg)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{width:1.5em;height:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:"\\f10c";font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-audio-button+.vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:" \\f12e";font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto;width:initial}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{flex:auto;display:block}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:#2b333fbf;color:#fff;height:70%}.vjs-spatial-navigation-enabled .vjs-modal-dialog.vjs-text-track-settings{height:80%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-right:1em;margin-bottom:.5em}.vjs-text-track-settings fieldset{margin:10px;border:none}
233.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-weight:700;font-size:1.2em}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{outline-style:solid;outline-width:medium;background-image:linear-gradient(0deg,#fff 88%,#73859f)}.vjs-track-settings-controls button:hover{color:#2b333fbf}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);color:#2b333f;cursor:pointer;border-radius:2px}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:#000000e6;background:linear-gradient(180deg,#000000e6 0,#000000b3 60%,#0000);font-size:1.2em;line-height:1.5;transition:opacity .1s;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-forward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30{cursor:pointer}.video-js .vjs-transient-button{position:absolute;height:3em;display:flex;align-items:center;justify-content:center;background-color:#32323280;cursor:pointer;opacity:1;transition:opacity 1s}.video-js:not(.vjs-has-started) .vjs-transient-button{display:none}.video-js.not-hover .vjs-transient-button:not(.force-display),.video-js.vjs-user-inactive .vjs-transient-button:not(.force-display){opacity:0}.video-js .vjs-transient-button span{padding:0 .5em}.video-js .vjs-transient-button.vjs-left{left:1em}.video-js .vjs-transient-button.vjs-right{right:1em}.video-js .vjs-transient-button.vjs-top{top:1em}.video-js .vjs-transient-button.vjs-near-top{top:4em}.video-js .vjs-transient-button.vjs-bottom{bottom:4em}.video-js .vjs-transient-button:hover{background-color:#323232e6}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{position:absolute;top:0;left:0;width:100%;height:100%;border:none;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:0}.video-js :focus:not(:focus-visible){outline:0}.joymo-video-player{position:relative;width:100%;height:100%}.joymo-video-player.video-js{container-type:size;font-size:14px;font-family:Roboto,sans-serif;color:#fff;background-color:#000000e6;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.joymo-video-player.video-js.vjs-ad-playing .vjs-progress-control{pointer-events:none}.joymo-video-player.video-js.vjs-ad-playing .vjs-play-progress{background-color:#ffe400}.joymo-video-player.video-js.vjs-ad-playing .vjs-captions-button,.joymo-video-player.video-js.vjs-ad-playing .vjs-audio-button{display:none}.joymo-video-player.video-js.vjs-ad-playing .vjs-slider-bar:before{content:""}.joymo-video-player.video-js.vjs-ad-playing [class^=vjs-skip-].vjs-button,.joymo-video-player.video-js.vjs-ad-playing .vjs-quality-selector,.joymo-video-player.video-js.vjs-ad-loading .vjs-big-play-button,.joymo-video-player.video-js.vjs-ad-loading .vjs-poster,.joymo-video-player.video-js.vjs-ad-content-resuming .vjs-big-play-button,.joymo-video-player.video-js.vjs-ad-content-resuming .vjs-poster{display:none}.joymo-video-player.video-js .preroll-skip-button,.joymo-video-player.video-js .advertisement-box,.joymo-video-player.video-js .remaining-time{display:block;position:absolute;padding:10px 6px 8px 10px;top:50%;right:0;transform:translateY(-50%);width:auto;background-color:#00000080;color:#aaa;font-size:18px;font-style:italic;line-height:normal;text-align:center;z-index:2;border:1px solid rgba(255,255,255,.35);border-right:none}.joymo-video-player.video-js .preroll-skip-button.enabled{cursor:pointer;color:#fff}.joymo-video-player.video-js .advertisement-box{right:auto;left:0;font-style:normal;border-right:1px solid rgba(255,255,255,.35);border-left:none}.joymo-video-player.video-js .preroll-skip-button.enabled:hover{cursor:pointer;background:#333}.joymo-video-player.video-js .preroll-blocker{display:block;position:absolute;margin:0;padding:0;height:100%;width:100%;inset:0}.joymo-video-player.video-js div.banner-ad{max-width:80%;width:728px;max-height:90px;position:absolute;bottom:3.25em;
233left:50%;transform:translate(-50%);overflow:hidden;border:2px solid #ffe400;background-color:#ffe400}.joymo-video-player.video-js div.banner-ad img{width:100%;height:100%;object-fit:contain}.joymo-video-player.video-js div.banner-ad span.ad-text{display:block;position:absolute;top:0;right:0;background-color:#ffe400;font-size:.5em;color:#000;padding:.25em}.joymo-video-player.video-js .vjs-chromecast-button .vjs-icon-placeholder{background:url(/assets/chromecast/cast_button_icon.svg) center center no-repeat;background-size:contain;display:inline-block;width:1.86em;height:1.86em}.joymo-video-player.video-js .vjs-chromecast-button:hover{cursor:pointer}.joymo-video-player.video-js .vjs-chromecast-button:hover .vjs-icon-placeholder{background-image:url(/assets/chromecast/cast_button_icon.svg)}.joymo-video-player.video-js .vjs-chromecast-button.vjs-chromecast-casting-state .vjs-icon-placeholder{background-image:url(/assets/chromecast/cast_button_icon_active.svg)}.joymo-video-player.video-js .vjs-chromecast-button.vjs-chromecast-casting-state:hover .vjs-icon-placeholder{background-image:url(/assets/chromecast/cast_button_icon_active.svg)}.joymo-video-player.video-js .vjs-chromecast-button.vjs-chromecast-button-lg:not(.vjs-hidden){display:flex;align-items:center;width:auto;padding:0 4px}.joymo-video-player.video-js .vjs-chromecast-button.vjs-chromecast-button-lg:not(.vjs-hidden) .vjs-chromecast-button-label{flex-grow:1;margin-left:4px}.joymo-video-player.video-js .vjs-chromecast-button.vjs-chromecast-button-lg:not(.vjs-hidden) .vjs-icon-placeholder{flex-grow:1}.joymo-video-player.video-js .vjs-tech-chromecast{display:flex;flex-direction:column;justify-content:center;align-items:center;overflow:hidden}.joymo-video-player.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster:after{content:" ";display:block;height:2px;width:100px;background-color:#ccc;position:absolute;left:calc(50% - 50px)}.joymo-video-player.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img{max-height:180px;width:auto;border:2px solid #cccccc}.joymo-video-player.video-js .vjs-tech-chromecast .vjs-tech-chromecast-poster-img.vjs-tech-chromecast-poster-img-empty{width:160px;height:90px}.joymo-video-player.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title-container{position:absolute;bottom:50%;margin-bottom:100px;color:#ccc;text-align:center}.joymo-video-player.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title{font-size:22px}.joymo-video-player.video-js .vjs-tech-chromecast .vjs-tech-chromecast-title.vjs-tech-chromecast-title-empty{display:none}.joymo-video-player.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle{font-size:18px;padding-top:.5em}.joymo-video-player.video-js .vjs-tech-chromecast .vjs-tech-chromecast-subtitle.vjs-tech-chromecast-subtitle-empty{display:none}.joymo-video-player.video-js button.vjs-big-play-button{font-size:4em;line-height:1.5em;height:1.5em;width:1.5em;border:none;border-radius:1.5em;left:50%;top:50%;transform:translate(-50%,-50%);margin:0}.joymo-video-player.video-js.vjs-error .vjs-error-display:before{content:" "}.joymo-video-player.video-js .vjs-control-bar,.joymo-video-player.video-js .vjs-big-play-button,.joymo-video-player.video-js .vjs-menu-button .vjs-menu-content,.joymo-video-player.video-js .vjs-volume-vertical{background-color:#0009}.joymo-video-player.video-js .vjs-slider{background-color:#fff3}.joymo-video-player.video-js .vjs-volume-level,.joymo-video-player.video-js .vjs-zoom-level,.joymo-video-player.video-js .vjs-play-progress{background:#fff}.joymo-video-player.video-js .vjs-control-bar .vjs-fullscreen-control{order:2}.joymo-video-player.video-js .vjs-control-bar .vjs-volume-panel{margin-left:auto}.joymo-video-player.video-js li.vjs-menu-item{padding:.2em}.joymo-video-player.video-js .vjs-progress-control{margin:0 1rem}@container (width < 1024px){.joymo-video-player.video-js .vjs-progress-control{position:absolute;width:calc(100% - 1rem);left:.5rem;bottom:42px;height:2rem;margin:0 0 .5rem;padding:0 1rem;border-radius:1rem;background-color:#0009}.joymo-video-player.video-js .vjs-progress-control .vjs-progress-holder{margin:0}}.joymo-video-player.video-js .vjs-load-progress{background:none}.joymo-video-player.video-js .vjs-load-progress div{background:#fff3}.joymo-video-player.video-js.vjs-waiting .vjs-big-play-button,.joymo-video-player.video-js.vjs-seeking .vjs-big-play-button{display:none}.joymo-video-player.video-js.vjs-waiting>div.vjs-loading-spinner,.joymo-video-player.video-js.vjs-seeking>div.vjs-loading-spinner{border-color:#ffffff40}.joymo-video-player.video-js.vjs-waiting>div.vjs-loading-spinner:after,.joymo-video-player.video-js.vjs-waiting>div.vjs-loading-spinner:before,.joymo-video-player.video-js.vjs-seeking>div.vjs-loading-spinner:after,.joymo-video-player.video-js.vjs-seeking>div.vjs-loading-spinner:before{content:"";border-top-color:gray}@keyframes vjs-spinner-fade{0%{border-top-color:gray}20%{border-top-color:gray}35%{border-top-color:#fff}60%{border-top-color:gray}to{border-top-color:gray}}
234`],encapsulation:2});let t=e;return t;})();var FM=["progress"],UM=t=>[t,"profile","subscriptions"],VM=(t,e)=>({first:t,last:e});function qM(t,e){t&1&&$t(0);}function HM(t,e){if(t&1&&he(0,qM,1,0,"ng-container",15),t&2){X(2);let i=dt(4);J("ngTemplateOutlet",i);}}function $M(t,e){t&1&&$t(0);}function zM(t,e){if(t&1&&he(0,$M,1,0,"ng-container",15),t&2){X(2);let i=dt(6);J("ngTemplateOutlet",i);}}function GM(t,e){t&1&&$t(0);}function WM(t,e){if(t&1&&he(0,GM,1,0,"ng-container",15),t&2){X(2);let i=dt(6);J("ngTemplateOutlet",i);}}function YM(t,e){t&1&&$t(0);}function XM(t,e){if(t&1&&he(0,YM,1,0,"ng-container",16),t&2){let i=X(2),n=dt(2),r=dt(8);J("ngIf",i.getWithin24Hours())("ngIfThen",n)("ngIfElse",r);}}function KM(t,e){t&1&&(Dt(0),hn(1,6),It());}function QM(t,e){if(t&1&&(Dt(0),ne(1,"div",20)(2,"span",21),hn(3,7),se(),ne(4,"span",22),Xe(5),se()(),It()),t&2){let i=X(4);ee(5),ni(i.cheapestAccessLabel);}}function JM(t,e){if(t&1){let i=zt();ne(0,"yo-button",18),Gt("click",function(){st(i);let r=X(3);
234return at(r.getAccessClicked.emit());}),he(1,KM,2,0,"ng-container",19)(2,QM,6,1,"ng-container",19),se();}if(t&2){let i=X(3);J("loading",i.loading())("fullWidth",!0),ee(),J("ngIf",!i.cheapestAccess()),ee(),J("ngIf",i.cheapestAccess()&&i.cheapestAccessLabel);}}function ZM(t,e){if(t&1){let i=zt();ne(0,"yo-button",27),Gt("click",function(){st(i);let r=X(4);return at(r.getAccessClicked.emit());}),Xe(1,"Sign in"),se();}}function e4(t,e){if(t&1&&(ne(0,"div",23),ze(1,"yo-icon",24),ne(2,"p",25),Xe(3," This video is not available for purchase. Membership access may still apply. "),se(),he(4,ZM,2,0,"yo-button",26),se()),t&2){let i=X(3);yl("border-b",i.showSocialSharing())("p-b-20",i.showSocialSharing()),ee(4),fi(4,i.isUserLoggedIn()?-1:4);}}function t4(t,e){if(t&1&&he(0,JM,3,4,"yo-button",17)(1,e4,5,5),t&2){let i=X(2);fi(0,i.loading()||i.optionsAreAvailable()?0:1);}}function i4(t,e){if(t&1&&(ne(0,"span",28),Ug(1,8),ze(2,"br"),Vg(),se(),ne(3,"yo-button",29)(4,"span",30),hn(5,9),se()()),t&2){let i=X(2);ee(3),J("routerLink",Xr(1,UM,i.homepageUrl));}}function n4(t,e){if(t&1&&ze(0,"joymo-social-share",14),t&2){let i=X(2);J("shareTitle",i.video().name)("shareDescription",i.video().description)("useLargeIcons",!0)("showSupportMessage",!0);}}function r4(t,e){if(t&1&&(ne(0,"div",12)(1,"div",13),he(2,HM,1,1)(3,zM,1,1)(4,WM,1,1)(5,XM,1,3),se(),he(6,t4,2,1)(7,i4,6,3)(8,n4,1,4,"joymo-social-share",14),se()),t&2){let i,n=X();ee(2),fi(2,(i=n.video().streamState)==="LIVE"?2:i==="FINISHED"?3:i===null?4:5),ee(4),fi(6,!n.hasAccess()&&!n.isAccessInactive()?6:-1),ee(),fi(7,n.isAccessInactive()?7:-1),ee(),fi(8,n.showSocialSharing()?8:-1);}}function s4(t,e){if(t&1&&(Dt(0),ne(1,"div",39)(2,"div",40)(3,"strong"),Xe(4),se()(),ne(5,"div",41),Xe(6),se()(),It()),t&2){let i=e.$implicit,n=e.first,r=e.last;ee(),J("ngClass",fr(3,VM,n,r)),ee(3),ni(i.value),ee(2),ni(i.unitLong);}}function a4(t,e){if(t&1&&(Dt(0),ne(1,"p",36)(2,"strong"),Xe(3,"Streaming starts in"),se()(),ne(4,"div",37),he(5,s4,7,6,"ng-container",38),Wt(6,"async"),se(),It()),t&2){let i=X(2);ee(5),J("ngForOf",ki(6,1,i.scheduledTimer$));}}function o4(t,e){t&1&&(ne(0,"p",42),Xe(1," Streaming is about to start... "),se());}function l4(t,e){if(t&1&&(ne(0,"div",31),he(1,a4,7,3,"ng-container",32)(2,o4,2,0,"ng-template",null,4,yt),ne(4,"div")(5,"div",33),ze(6,"yo-icon",34),ne(7,"span",35),Xe(8),se()()()()),t&2){let i=dt(3),n=X();ee(),J("ngIf",!n.startingSoon)("ngIfElse",i),ee(7),ni(n.getCountdownDate());}}function u4(t,e){if(t&1&&(ne(0,"div",43)(1,"div",44),Xe(2," Stream is live"),ze(3,"yo-icon",45),se(),ne(4,"div",46),ze(5,"div",47)(6,"div",48,5),ne(8,"div",49)(9,"span",50),Xe(10),Wt(11,"async"),se(),ne(12,"span",51),Xe(13),se()()()()),t&2){let i=X();ee(10),ni(i.timer$?ki(11,2,i.timer$):i.getTimeSinceStart()),ee(3),ni(i.getTimeUntilEnd());}}function d4(t,e){if(t&1&&(ne(0,"span",52)(1,"strong")(2,"span"),hn(3,10),se(),Xe(4),se()()),t&2){let i=X();ee(4),Bn(": ",i.getReadableDuration(),"");}}function c4(t,e){if(t&1&&(ne(0,"div",53)(1,"span",21),Xe(2),Wt(3,"date"),se(),ne(4,"div",33),ze(5,"yo-icon",34),ne(6,"span",54),Xe(7),se()()()),t&2){let i=X(2);ee(2),ni(Kr(3,2,e,"fullDate")),ee(5),ni(i.getTimeLabel());}}function h4(t,e){if(t&1&&he(0,c4,8,5,"div",53),t&2){let i,n=X();fi(0,(i=n.video().startTime)?0:-1,i);}}var Px=(()=>{let e=class e{constructor(n,r,s,a,o,u){this.locale=n,this.ngZone=r,this.scheduler=s,this.cdr=a,this.platformService=o,this.scopeService=u,this.stateScheduler={now:()=>this.scheduler.now(),schedule:(...c)=>this.ngZone.runOutsideAngular(()=>this.scheduler.schedule(...c))},this.getAccessClicked=new Mn(),this.streamStartingSoon=new Mn(),this.accessStatus=hr(void 0),this.video=hr.required(),this.loading=hr(!1),this.showSocialSharing=hr.required(),this.isUserLoggedIn=hr.required(),this.cheapestAccess=hr.required(),this.cheapestPrice=ya(()=>{let c=this.cheapestAccess();return c?new Intl.NumberFormat(this.locale,{style:"currency",currency:c.currency}).format(c.price):"";}),this.hasAccess=ya(()=>!!this.accessStatus()?.access),this.isAccessInactive=ya(()=>{let c=this.accessStatus();return!c||c.access?!1:c.isSubscriptionPaused;}),this.optionsAreAvailable=ya(()=>{let c=this.accessStatus(),p=this.isUserLoggedIn();return this.video().unlocked?!0:c?!c.access&&c.isOptionsAvailable:!1;}),this.startingSoon=!1,this.homepageUrl="",this.unsubscribe=new Vi(),this.isServer=this.platformService.isServer();}ngOnInit(){if(this.isServer)return;this.homepageUrl=this.scopeService.getHomepageUrl();let n=this.video();if(this.cheapestAccessLabel=n.unlocked?"FREE":"Starting from "+this.cheapestPrice()+"",n.type=="STREAM"&&n.streamState&&n.streamState!="FINISHED"){let r=Ig(0,1e3,this.stateScheduler).pipe(jn(()=>setTimeout(()=>this.cdr.detectChanges())),Nn(this.unsubscribe));this.scheduledTimer$=this.getScheduledTimer$(r),n.streamState=="L
234IVE"&&(this.timer$=this.getTimer$(r));}}ngOnDestroy(){this.unsubscribe.next(void 0),this.unsubscribe.complete();}getCountdownDate(){let n=this.video(),r=new Intl.RelativeTimeFormat(this.locale,{numeric:"auto"}),a=(n.startTime?.getDate()||0)-new Date().getDate();return`${r.format(a>=1?1:0,"day")} ${this.getTimeLabel()}`;}getCountdownTimes(){let n=this.video();return this.getTimesToDisplay(this.getTimes(n.startTime.getTime()-new Date().getTime()));}getDurationInMs(){let n=this.video();switch(n.type){case"STREAM":return n.endTime.getTime()-n.startTime.getTime();default:return n.duration||0;}}getMsSinceStart(){let n=this.video();return n.startTime?new Date().getTime()-n.startTime.getTime():0;}getWithin24Hours(){let n=this.video();if(!n.startTime)return!1;let r=Math.abs(n.startTime.getTime()-new Date().getTime());return r>=0&&r<=24*36e5;}getReadableDuration(){let n=this.video(),r=this.getTimesToDisplay(this.getTimes(n.duration?n.duration*1e3:0),void 0);return r.length==3&&r.pop(),r.map(s=>`${s.value} ${s.unitShort}`).join(" ");}getTimer$(n){return n.pipe(_t(r=>{let s=this.getMsSinceStart()/this.getDurationInMs()*100;this.getUpdateProgress(`${Math.min(s,100)}%`);let a=this.getTimes(this.getMsSinceStart()>=this.getDurationInMs()?this.getDurationInMs():this.getMsSinceStart());return this.getTimesToDisplay(a,":");}));}getScheduledTimer$(n){return n.pipe(Gr(r=>this.getWithin24Hours()&&this.video().streamState!="LIVE"&&!this.startingSoon),_t(r=>this.getCountdownTimes()),jn(r=>{(r.length<3&&parseInt(r[0].value)<1||this.video()?.startTime<new Date())&&this.setStreamStartingSoon();}));}setStreamStartingSoon(){this.startingSoon=!0,this.streamStartingSoon.next(!0);}getTimeLabel(){let n=this.video(),r=n.startTime?.getHours().toString().padStart(2,"0"),s=n.startTime?.getMinutes().toString().padStart(2,"0"),a=n.endTime?.getHours().toString().padStart(2,"0"),o=n.endTime?.getMinutes().toString().padStart(2,"0");return`${r}:${s}\u2013${a}:${o}`;}getTimes(n){n=Math.round(n/1e3)*1e3;let r=Math.floor(n/36e5),s=Math.floor(n%36e5/6e4),a=Math.floor(n%36e5%6e4/1e3);return{hours:{value:Math.max(0,r).toString(),unitLong:"hours",unitShort:"h"},minutes:{value:Math.max(0,s).toString(),unitLong:"minutes",unitShort:"min"},seconds:{value:Math.max(0,a).toString(),unitLong:"seconds",unitShort:"sec"}};}getTimeSinceStart(){if(!this.video().startTime)throw new Error("this video does not have a start time");return this.getTimesToDisplay(this.getTimes(this.getMsSinceStart()),":");}getTimesToDisplay(n,r){let s=Object.values(n);return n.hours.value=="0"&&s.shift(),s=s.map((a,o)=>{let u=ti({},a);return u.value=u.value.toString(),o!==0&&(u.value=u.value.padStart(2,"0")),u;}),r?s.map(a=>a.value).join(r):s;}getTimeUntilEnd(){let n=this.video();if(!n.endTime||!n.startTime)throw new Error("this video does not have an end time");return this.getTimesToDisplay(this.getTimes(this.getDurationInMs()),":");}getUpdateProgress(n){this.progressBar.nativeElement.style.setProperty("width",n);}};e.ɵfac=function(r){return new(r||e)(Ye($g),Ye(Fg),Ye(ml),Ye(zg),Ye(Rl),Ye(es));},e.ɵcmp=qi({type:e,selectors:[["joymo-video-state"]],viewQuery:function(r,s){if(r&1&&bl(FM,5),r&2){let a;Tl(a=Sl())&&(s.progressBar=a.first);}},inputs:{accessStatus:[cr.SignalBased,"accessStatus"],video:[cr.SignalBased,"video"],loading:[cr.SignalBased,"loading"],showSocialSharing:[cr.SignalBased,"showSocialSharing"],isUserLoggedIn:[cr.SignalBased,"isUserLoggedIn"],cheapestAccess:[cr.SignalBased,"cheapestAccess"]},outputs:{getAccessClicked:"getAccessClicked",streamStartingSoon:"streamStartingSoon"},decls:9,vars:1,consts:()=>{let n;n="Get Access";let r;r="Get Access";let s;s="An active subscription is required"+"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"+"to watch this video";let a;a="Go to my subscriptions";let o;return o="Duration",[["timeCountdown",""],["progressBar",""],["duration",""],["dateTimeCard",""],["startingSoonTpl",""],["progress",""],n,r,s,a,o,["class","joymo__video_state p-x-16 p-y-20 flex flex-column gap-20",4,"ngIf"],[1,"joymo__video_state","p-x-16","p-y-20","flex","flex-column","gap-20"],[1,"flex","flex-justify-center"],[3,"shareTitle","shareDescription","useLargeIcons","showSupportMessage"],[4,"ngTemplateOutlet"],[4,"ngIf","ngIfThe
234n","ngIfElse"],["role","primary","size","xlarge","id","video_btn_access",1,"w-100",3,"loading","fullWidth"],["role","primary","size","xlarge","id","video_btn_access",1,"w-100",3,"click","loading","fullWidth"],[4,"ngIf"],[1,"flex","flex-column","flex-align-center","p-12"],[1,"text-lg","text-semibold"],[1,"text-sm","text-regular"],[1,"border-default","border-t","flex","flex-column","flex-align-center","gap-8","p-t-16"],["icon","ticket"],[1,"text-center","text-md"],["role","link","id","video_btn_access"],["role","link","id","video_btn_access",3,"click"],[1,"text-center","text-lg","md:text-md","text-semibold"],["role","flat-square",3,"routerLink"],[1,"text-semibold"],[1,"joymo__video_state--countdown","flex","flex-align-center","flex-column","flex-justify-center"],[4,"ngIf","ngIfElse"],[1,"flex","flex-row","flex-align-center"],["icon","clock"],[1,"text-capitalize","text-xs","m-l-4"],[1,"text-md"],[1,"joymo__video_state--countdown-container","p-12","flex","flex-row"],[4,"ngFor","ngForOf"],[1,"time","p-x-16","p-y-6","flex","flex-column","flex-align-center",3,"ngClass"],[1,"j
234oymo__video_state--countdown-value","text-semibold"],[1,"text-capitalize"],[1,"m-b-12","text-md","text-semibold","w-100","text-center"],[1,"joymo__video_state--progress","w-100","flex","flex-column","flex-align-center","gap-20"],[1,"joymo__video_state--progress-header","flex","flex-row","flex-align-center","flex-justify-center","heading-sm"],["icon","live","size","xl",1,"m-l-4"],[1,"w-100","joymo__video_state--progress-container"],[1,"w-100","progress"],[1,"progress","since"],[1,"flex","flex-row","flex-justify-between"],[1,"from-start"],[1,"to-end"],[1,"duration","text-md"],[1,"flex","flex-column","flex-align-center","gap-8"],[1,"text-capitalize","m-l-4"]];},template:function(r,s){r&1&&he(0,r4,9,4,"div",11)(1,l4,9,3,"ng-template",null,0,yt)(3,u4,14,4,"ng-template",null,1,yt)(5,d4,5,1,"ng-template",null,2,yt)(7,h4,1,1,"ng-template",null,3,yt),r&2&&J("ngIf",!s.isServer);},dependencies:[ev,El,Gg,Fn,Cl,Dl,Zr,ts,Qr,wl],styles:[".joymo__video_state[_ngcontent-%COMP%]{width:351px;box-shadow:0 2px 4px #132b1a4d;border-radius:calc(8px * var(--is-rounded));background-color:var(--bg-color)}@media (max-width: 479px){[theme=dark][_nghost-%COMP%]   .joymo__video_state[_ngcontent-%COMP%], [theme=dark]   [_nghost-%COMP%]   .joymo__video_state[_ngcontent-%COMP%]{background-color:var(--bg-light-color)}}.joymo__video_state--progress-header[_ngcontent-%COMP%]{color:var(--red)}.joymo__video_state--progress-container[_ngcontent-%COMP%]{position:relative;padding-top:10px}.joymo__video_state--progress-container[_ngcontent-%COMP%]   .progress[_ngcontent-%COMP%]{position:absolute;height:6px;background-color:var(--border-color);top:0;left:0}.joymo__video_state--progress-container[_ngcontent-%COMP%]   .progress.since[_ngcontent-%COMP%]{background-color:var(--red)}.joymo__video_state--countdown-container[_ngcontent-%COMP%]   .time[_ngcontent-%COMP%]{border-left:1px solid var(--border-color)}.joymo__video_state--countdown-container[_ngcontent-%COMP%]   .time.first[_ngcontent-%COMP%]{border-left:none}.joymo__video_state--countdown-value[_ngcontent-%COMP%]{font-size:30px}"],changeDetection:0});let t=e;return t;})();var p4=t=>[t],m4=(t,e)=>[t,"events",e],g4=t=>({"with-video-state":t}),v4=t=>({user:t});function _4(t,e){if(t&1&&(ne(0,"yo-breadcrumbs",13)(1,"a",14),hn(2,10),se(),ne(3,"a",14),Xe(4),se()()),t&2){let i=X().ngIf;ee(),J("routerLink",Xr(3,p4,i.homepageUrl)),ee(2),J("routerLink",fr(5,m4,i.homepageUrl,i.event.docId)),ee(),Bn(" ",i.event.title," ");}}function y4(t,e){t&1&&$t(0);}function b4(t,e){t&1&&$t(0);}function T4(t,e){t&1&&$t(0);}function S4(t,e){if(t&1&&(Dt(0),ne(1,"section",15),he(2,y4,1,0,"ng-container",16),se(),ne(3,"section",17),he(4,b4,1,0,"ng-container",16)(5,T4,1,0,"ng-container",16),se(),It()),t&2){X();let i=dt(4),n=dt(6),r=dt(8);ee(2),J("ngTemplateOutlet",i),ee(2),J("ngTemplateOutlet",n),ee(),J("ngTemplateOutlet",r);}}function A4(t,e){t&1&&$t(0);}function E4(t,e){if(t&1&&ze(0,"joymo-video-control",23),t&2){let i=X().ngIf,n=X(3).ngIf,r=X();J("video",i.prev)("linkLabel",r.previousVideoLinkLabel)("channel",n.channel);}}function x4(t,e){if(t&1&&ze(0,"joymo-video-control",24),t&2){let i=X().ngIf,n=X(3).ngIf,r=X();J("video",i.next)("linkLabel",r.nextVideoLinkLabel)("channel",n.channel);}}function C4(t,e){if(t&1&&(Dt(0),he(1,E4,1,3,"joymo-video-control",21)(2,x4,1,3,"joymo-video-control",22),It()),t&2){let i=e.ngIf;ee(),J("ngIf",i.prev),ee(),J("ngIf",i.next);}}function w4(t,e){if(t&1&&(Dt(0),ne(1,"section",19),he(2,A4,1,0,"ng-container",20),se(),he(3,C4,3,2,"ng-container",11),Wt(4,"async"),It()),t&2){let i=X(2).ngIf,n=dt(10),r=dt(12),s=X();ee(),J("ngClass",Xr(7,g4,!(s.accessStatus!=null&&s.accessStatus.access)||(s.accessStatus==null?null:s.accessStatus.access)&&i.video.streamState==="SCHEDULED")),ee(),J("ngIf",s.accessStatus==null?null:s.accessStatus.access)("ngIfThen",n)("ngIfElse",r),ee(),J("ngIf",ki(4,5,i.prevAndNext$));}}function D4(t,e){if(t&1&&he(0,w4,5,9,"ng-container",18),t&2){X();let i=dt(16),n=X();J("ngIf",!n.errorState)("ngIfElse",i);}}function I4(t,e){if(t&1&&ze(0,"joymo-tags-list",30),t&2){let i=X(2).ngIf;J("moduleData",i.tagsModule);}}function k4(t,e){if(t&1){let i=zt();ne(0,"a",34),Gt("click",function(){let r=st(i).position,s=X(4);return at(s.goToVideoPosition(r));}),Xe(1),se();}if(t&2){let i=e.$implicit;ee(),ni(i);}}function P4(t,e){if(t&1&&(ne(0,"joymo-show-more-block",31)(1,"joymo-parsed-text-block",32),he(2,k4,2,1,"ng-template",33),se()()),t&2){let i=e.$implicit;J("maxLines",4),ee(),J("inputText",i);}}function L4(t,e){if(t&1&&(ne(0,"joymo-description-block",25)(1,"span",26),Xe(2),Wt(3,"date"),se(),ne(4,"div",27),he(5,I4,1,1,"joymo-tags-list",28),ze(6,"joymo-help",29),se(),he(7,P4,3,2,"ng-template",null,9,yt),se()),t&2){let i=X().ngIf;J("title",i.video.name)("description",i.video.description),ee(2),Bn(" ",Kr(3,6,i.video.startTime||i.video.uploadTime,"dd MMM YYYY \u2022 HH:mm")," "),ee(3),J("ngIf",i.tagsModule),ee(),J("faqLink",i.channel.branding.contactInformation==null?null:i.channel.branding.contactInformation.faqLink)("streamHelpText",i.channel.branding.contactInformation==null?null:i.channel.branding.contactInformation.streamHelpText);}}function R4(t,e){if(t&1){let i=zt();ne(0,"joymo-live-and-upcoming",36),Gt("noResults",function(){st(i);let r=X(4);return at(r.showEventLiveUpcoming=!1);}),se();}if(t&2){let i=X(3).ngIf;J("moduleData",i.liveAndUpcoming)("filterPredicate",i.filterPredicate);}}function O4(t,e){if(t&1&&(Dt(0),he(1,R4,1,2,"joymo-live-and-upcoming",35),It()),t&2){let i=X(2).ngIf;ee(),J("ngIf",i.liveAndUpcoming);}}function N4(t,e){if(t&1){let i=zt();Dt(0),ne(1,"joymo-videos-list",36),Gt("noResults",function(){st(i);let r=X(3);return at(r.showChannelVideoList=!1);}),se(),It();}if(t&2){let i=X(2).ngIf,n=X();
234ee(),J("moduleData",n.videoListForChannel)("filterPredicate",i.filterPredicate);}}function j4(t,e){if(t&1&&he(0,O4,2,1,"ng-container",11)(1,N4,2,2,"ng-container",11),t&2){let i=X(2);J("ngIf",i.showEventLiveUpcoming),ee(),J("ngIf",i.showChannelVideoList);}}function M4(t,e){t&1&&$t(0);}function B4(t,e){if(t&1&&(Dt(0),he(1,M4,1,0,"ng-container",16),It()),t&2){X(3);let i=dt(12);ee(),J("ngTemplateOutlet",i);}}function F4(t,e){t&1&&$t(0);}function U4(t,e){if(t&1){let i=zt();Dt(0),ne(1,"joymo-video-player",41),Gt("videoStarted",function(r){st(i);let s=X(4);return at(s.videoPlayerTrigger$.next({trigger:"PLAY",time:r.getTime()}));})("videoPaused",function(r){st(i);let s=X(4);return at(s.videoPlayerTrigger$.next({trigger:"PAUSE",time:r.getTime()}));})("videoStopped",function(r){st(i);let s=X(4);return at(s.videoPlayerTrigger$.next({trigger:"STOP",time:r.getTime()}));})("fullScreenChange",function(r){st(i);let s=X(4);return at(s.isPlayerInFullScreen$.next(r));}),se(),he(2,F4,1,0,"ng-container",16),It();}if(t&2){let i=X().ngIf,n=X(2).ngIf,r=dt(20),s=X();
234ee(),J("video",i)("event",n.event)("analyticsContextData",s.accessStatus&&s.accessStatus.access?s.accessStatus.playerContext:void 0)("controller",s.playerControler),ee(),J("ngTemplateOutlet",r);}}function V4(t,e){if(t&1&&(Dt(0)(1,38),he(2,B4,2,1,"ng-container",39)(3,U4,3,5,"ng-container",40),It()()),t&2){let i=e.ngIf;ee(),J("ngSwitch",i.streamState),ee(),J("ngSwitchCase","SCHEDULED");}}function q4(t,e){t&1&&$t(0);}function H4(t,e){if(t&1&&(he(0,V4,4,2,"ng-container",11),Wt(1,"async"),he(2,q4,1,0,"ng-container",37)),t&2){let i=X().ngIf,n=dt(18),r=X();J("ngIf",ki(1,3,r.video$)),ee(2),J("ngIf",i.canProvideFeedback)("ngIfThen",n);}}function $4(t,e){t&1&&ze(0,"span",44);}function z4(t,e){t&1&&$t(0);}function G4(t,e){if(t&1){let i=zt();ne(0,"img",42),Gt("error",function(){st(i);let r=X(2);return at(r.invalidPosterImage=!0);}),se(),he(1,$4,1,0,"span",43)(2,z4,1,0,"ng-container",37);}if(t&2){let i=X().ngIf,n=dt(14),r=X();J("hidden",r.invalidPosterImage)("src",i.video.posterImage,Bg),ee(),J("ngIf",!i.video.posterImage||r.invalidPosterImage),ee(),J("ngIf",!r.isServer)("ngIfThen",n);}}function W4(t,e){if(t&1){let i=zt();ne(0,"joymo-video-state",46),Gt("getAccessClicked",function(){let r=st(i),s=X(2).ngIf,a=X();return at(a.openTicketOptions(s.channel,s.video,s.event,r.user,a.accessStatus));})("streamStartingSoon",function(r){st(i);let s=X(3);return at(s.isAboutToStart$.next(r));}),se();}if(t&2){let i=X(2).ngIf,n=X();J("isUserLoggedIn",!!e.user)("cheapestAccess",i.cheapestAccess)("accessStatus",n.accessStatus)("loading",n.state==="loading")("video",i.video)("showSocialSharing",n.showSocialShareOptions);}}function Y4(t,e){if(t&1&&(he(0,W4,1,6,"joymo-video-state",45),Wt(1,"async")),t&2){let i,n=X(2);fi(0,(i=Xr(3,v4,ki(1,1,n.user$)))?0:-1,i);}}function X4(t,e){if(t&1){let i=zt();ne(0,"joymo-info-block",48),Gt("onActionClick",function(){st(i);let r=X(2).ngIf,s=X();return at(s.handleErrorStateAction(r,s.errorState.reason));}),se();}if(t&2){let i=X(3);J("actionLabel",i.errorState.details.actionLabel)("description",i.errorState.details.description)("heading",i.errorState.details.title)("icon",i.errorState.details.icon)("skipMobileRounding",!0);}}function K4(t,e){if(t&1&&he(0,X4,1,5,"joymo-info-block",47),t&2){let i=X(2);J("ngIf",i.errorState);}}function Q4(t,e){if(t&1&&ze(0,"joymo-video-feedback",50),t&2){let i=X(2).ngIf,n=X();J("video",i.video)("event",i.event)("channel",i.channel)("userAccessType",n.accessStatus.access?n.accessStatus.accessType:void 0)("videoPlayerTrigger$",n.videoPlayerTrigger$)("isPlayerInFullScreen$",n.isPlayerInFullScreen$);}}function J4(t,e){if(t&1&&he(0,Q4,1,6,"joymo-video-feedback",49),t&2){let i=X(2);J("ngIf",i.accessStatus);}}function Z4(t,e){t&1&&(ne(0,"div",51),ze(1,"joymo-info-block",54),se());}function eB(t,e){if(t&1&&he(0,Z4,2,0,"div",53),t&2){let i=X(3);J("ngIf",i.showBrowserRecommendation);}}function tB(t,e){if(t&1&&(ne(0,"footer",52),ze(1,"joymo-social-share",55),se()),t&2){let i=X(2).ngIf,n=X();ee(),J("shareTitle",i.video.name)("shareDescription",i.video.description)("showSupportMessage",n.isMobile);}}function iB(t,e){if(t&1&&he(0,eB,1,1,"div",51)(1,tB,2,3,"footer",52),t&2){let i=X(2);fi(0,i.showBrowserRecommendation?0:-1),ee(),fi(1,i.showSocialShareOptions?1:-1);}}function nB(t,e){if(t&1&&(Dt(0),he(1,_4,5,8,"yo-breadcrumbs",12)(2,S4,6,3,"ng-container",11)(3,D4,1,2,"ng-template",null,0,yt)(5,L4,9,9,"ng-template",null,1,yt)(7,j4,2,2,"ng-template",null,2,yt)(9,H4,3,5,"ng-template",null,3,yt)(11,G4,3,5,"ng-template",null,4,yt)(13,Y4,2,5,"ng-template",null,5,yt)(15,K4,1,1,"ng-template",null,6,yt)(17,J4,1,1,"ng-template",null,7,yt)(19,iB,2,2,"ng-template",null,8,yt),It()),t&2){let i=e.ngIf,n=X();ee(),J("ngIf",i.event),ee(),J("ngIf",n.canBeRendered);}}var Lx=(()=>{let e=class e{constructor(n,r,s,a,o,u,c,p){this.router=n,this.route=r,this.fs=s,this.authService=a,this.windowService=o,this.platformService=u,this.accessControlService=c,this.ticketOptionsService=p,this.invalidPosterImage=!1,this.isMobile=!1,this.showBrowserRecommendation=!1,this.showChannelVideoList=!0,this.showEventLiveUpcoming=!0,this.showSocialShareOptions=!1,this.state="idle",this.video$=new Cg(null),this.user$=this.authService.user$,this.playerControler=new Vi(),this.destroy$=new Vi(),this.isAboutToStart$=new Rc(1),this.isPlayerInFullScreen$=new Rc(1),this.isServer=this.platformService.isServer(),this.nextVideoLinkLabel="Up next",this.previousVideoLinkLabel="Previous",this.videoPlayerTrigger$=new Vi(),this.videoListForChannel={heading:"Explore",moduleType:"VIDEOS_LIST",listSource:{},layoutType:"CAROUSEL",density:"DENSE",size:6,sort:"DATE",order:"DESC"},this.pageScope$=this.getPageScope$().pipe(vl(1));}ngOnInit(){if(this.isServer)return;this.isMobile=yv(),this.showBrowserRecommendation=bv()===!1;let n=this.ticketOptionsService.onPaymentResult$.pipe(Gr(s=>s==="success")),r=new Vi();zr([this.pageScope$,n.pipe(_l(null)),r.pipe(_l(!1))]).pipe(ii(([s])=>(this.state="loading",this.getAccessStatus$(s.video))),ii(s=>(this.accessStatus=s,s.access?this.isAboutToStart$.pipe(_t(a=>[s,a])):(this.state="error",this.errorState=this.getErrorDetails(s.reason),Dg))),ii(([s,a])=>(this.video$.next(s.video),a?this.waitForVideoUpdates$(s.video):On(s.video))),ii(s=>this.getAccessStatus$(s)),Nn(this.destroy$)).subscribe(s=>{this.state="ready",this.video$.next(null),s.access&&(this.video$.next(s.video),this.initializeForcedDisconnectHandler(r));});}
234openTicketOptions(n,r,s,a,o){if(!(!o||o.access)){if(!a&&(r.unlocked||!o.isOptionsAvailable)){let u=this.authService.getAuthenticationUrl(n.docId,n.slug,this.windowService.document.location.href);return this.windowService.document.location.assign(u),u;}this.ticketOptionsService.openAllPurchaseOptions(s,r,o.isSubscriptionPaused);}}handleErrorStateAction(n,r){if(r==="NEEDS_ACTION"){this.router.navigate([n.homepageUrl,"profile","subscriptions"]);return;}throw new Error("NotImplemented:"+r);}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete();}getErrorDetails(n){if(!(n==="NO_ACCESS"||n==="SUBSCRIPTION_PAUSED"))return{details:Ov[n],reason:n};}initializeForcedDisconnectHandler(n){let r=this.pageScope$.pipe(Gr(s=>!!s.video),ii(s=>jc(this.fs,s.video.docId,s.channel.docId,this.destroy$)),Gr(s=>s!==void 0),Rg(s=>!!s?.published&&!s?.archived,!0));zr([this.authService.forcedDisconnect$.pipe(_l(null)),r]).pipe(Nn(this.destroy$)).subscribe(([s,a])=>{(s!==null||!a?.published||a?.archived)&&n.next(!0);});}waitForVideoUpdates$(n){return jc(this.fs,n.docId,n.channelId,this.destroy$).pipe(Lg(r=>r?.streamState!=="SCHEDULED"&&r?.videoLocation!=="NA"),Oc(3e4));}getAccessStatus$(n){return n.archived?On({access:!1,isOptionsAvailable:!1,isSubscriptionPaused:!1,reason:"CONTENT_GONE"}):this.accessControlService.checkAccessToVideo(n).pipe(gl(r=>(Ll.logCriticalError(r,"CONTENT-ACCESS"),On({access:!1,reason:"ACCESS_FAILED",isOptionsAvailable:!1}))),_t(r=>r.access?{access:!0,playerContext:r.playerContext,accessType:r.accessType,video:Rn(ti({},n),{videoLocation:r.videoUrl})}:{access:!1,isOptionsAvailable:r.isOptionsAvailable,isSubscriptionPaused:r.reason==="SUBSCRIPTION_PAUSED",reason:r.reason}));}getPageScope$(){return this.route.data.pipe(jn(()=>this.canBeRendered=!1),Oc(1),_t(n=>{this.state="idle",this.accessStatus=void 0,this.isAboutToStart$.next(!1),this.isPlayerInFullScreen$.next(!1),this.canBeRendered=!0,this.errorState=void 0,this.invalidPosterImage=!1,this.showChannelVideoList=!0,this.showEventLiveUpcoming=!0,this.video$.next(null);let r=n.videoPageScope;return this.showSocialShareOptions=!r.channelPublicSettings.featureFlags?.disableSocialSharing,r;}));}goToVideoPosition(n){this.playerControler.next({type:"POSITION",pos:n,scrollIntoView:!0});}};e.ɵfac=function(r){return new(r||e)(Ye(Jg),Ye(Qg),Ye(Jr),Ye(Tv),Ye(Zg),Ye(Rl),Ye(Pl),Ye(Ev));},e.ɵcmp=qi({type:e,selectors:[["joymo-video"]],decls:2,vars:3,consts:()=>{let n;return n="Home",[["videoAreaTmp",""],["videoMetaTmp",""],["relatedVideosTmp",""],["videoPlayerTmp",""],["defaultViewTmp",""],["videoStateTmp",""],["pageErrorTmp",""],["feedbackTmp",""],["socialFooterTmp",""],["descriptionTpl",""],n,[4,"ngIf"],["class","block p-t-12 p-x-16 md:p-t-16 lg:p-x-24",4,"ngIf"],[1,"block","p-t-12","p-x-16","md:p-t-16","lg:p-x-24"],["yo-breadcrumb","",3,"routerLink"],[1,"video__wrapper","m-t-16","md:m-x-16","lg:m-x-24"],[4,"ngTemplateOutlet"],[1,"flex","flex-column","gap-64","standard-margins","m-t-40","md:m-t-16","lg:m-t-24"],[4,"ngIf","ngIfElse"],[1,"video__player--container","w-100","md:w-80","lg:w-100",3,"ngClass"],[4,"ngIf","ngIfThen","ngIfElse"],["data-control","prev","class","video__player--control video__player--control-previous block","direction","LEFT",3,"video","linkLabel","channel",4,"ngIf"],["data-control","next","class","video__player--control video__player--control-next block","direction","RIGHT",3,"video","linkLabel","channel",4,"ngIf"],["data-control","prev","direction","LEFT",1,"video__player--control","video__player--control-previous","block",3,"video","linkLabel","channel"],["data-control","next","direction","RIGHT",1,"video__player--control","video__player--control-next","block",3,"video","linkLabel","channel"],[1,"video__meta",3,"title","description"],["joymo-desc-block-meta","",1,"video__meta--date","text-sm","text-secondary"],["joymo-desc-block-action","",1,"md:p-l-24","flex","flex-column","gap-24"],[3,"moduleData",4,"ngIf"],[1,"lg:w-50","p-16",3,"faqLink","streamHelpText"],[3,"moduleData"],[3,"maxLines"],[3,"inputText"],["override","videoPos"],[1,"text-link",3,"click"],["class","block p-y-16",3,"moduleData","filterPredicate","noResults",4,"ngIf"],[1,"block","p-y-16",3,"noResults","moduleData","filterPredicate"],[4,"ngIf","ngIfThe
234n"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"w-100",3,"videoStarted","videoPaused","videoStopped","fullScreenChange","video","event","analyticsContextData","controller"],[1,"video__player--player","block","w-100",3,"error","hidden","src"],["class","block w-100 video__player--placeholder",4,"ngIf"],[1,"block","w-100","video__player--placeholder"],[1,"video__player--container-state",3,"isUserLoggedIn","cheapestAccess","accessStatus","loading","video","showSocialSharing"],[1,"video__player--container-state",3,"getAccessClicked","streamStartingSoon","isUserLoggedIn","cheapestAccess","accessStatus","loading","video","showSocialSharing"],["class","video__error flex flex-align-center",3,"actionLabel","description","heading","icon","skipMobileRounding","onActionClick",4,"ngIf"],[1,"video__error","flex","flex-align-center",3,"onActionClick","actionLabel","description","heading","icon","skipMobileRounding"],[3,"video","event","channel","userAccessType","videoPlayerTrigger$","isPlayerInFullScreen$",4,"ngIf"],[3,"video","event","channel","userAccessType","videoPlayerTrigger$","isPlayerInFullScreen$"],[1,"p-4"],[1,"flex","p-12","flex-justify-center"],["class","p-4",4,"ngIf"],["type","WARNING","heading","For the best viewing experience, we recommend Google Chrome","size","sm"],[3,"shareTitle","shareDescription","showSupportMessage"]];},template:function(r,s){r&1&&(he(0,nB,21,2,"ng-container",11),Wt(1,"async")),r&2&&J("ngIf",ki(1,1,s.pageScope$));},dependencies:[kl,El,Fn,Cl,xl,Wg,Yg,Nl,Ml,jl,Fl,Zr,Ol,Bl,ts,Ul,xv,Ix,Vl,Hl,$l,Px,Qr,wl],styles:[".video__error[_ngcontent-%COMP%], .video__player--container[_ngcontent-%COMP%]{position:relative;grid-area:1/1/3/3;overflow:hidden;justify-self:center}@media (min-width: 1280px){.video__error[_ngcontent-%COMP%], .video__player--container[_ngcontent-%COMP%]{grid-area:1/2/3/3}}.video__wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}@media (min-width: 768px){.video__wrapper[_ngcontent-%COMP%]{display:grid;grid-template:1fr 68px 98px/1fr 1fr;column-gap:8px}}@media (min-width: 1280px){.video__wrapper[_ngcontent-%COMP%]{grid-template:1fr 68px/1fr min(64%,1120px) 1fr;column-gap:24px;align-items:center}}.video__player--control[_ngcontent-%COMP%]{margin:8px 12px 0;justify-self:center}@media (min-width: 768px){.video__player--control[_ngcontent-%COMP%]{margin:16px 0 0}}@media (min-width: 768px){.video__player--control-previous[_ngcontent-%COMP%]{justify-self:flex-end;grid-area:3/1/4/2}}@media (min-width: 1280px){.video__player--control-previous[_ngcontent-%COMP%]{grid-area:1/1/2/2}}@media (min-width: 768px){.video__player--control-next[_ngcontent-%COMP%]{justify-self:flex-start;grid-area:3/2/4/3}}@media (min-width: 1280px){.video__player--control-next[_ngcontent-%COMP%]{grid-area:1/3/2/4}}@media (min-width: 1280px){.video__player--control[_ngcontent-%COMP%]{margin:auto}}@media (min-width: 768px){.video__player--container[_ngcontent-%COMP%]{box-shadow:0 2px 4px #132b1a4d;border-radius:calc(8px * var(--is-rounded))}}@media (max-width: 479px){.video__player--container.with-video-state[_ngcontent-%COMP%]{overflow:visible;display:flex;grid:unset;grid-column:unset;grid-row:unset;flex-direction:column;align-items:center}.video__player--container.with-video-state[_ngcontent-%COMP%]   .video__player--placeholder[_ngcontent-%COMP%], .video__player--container.with-video-state[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{position:absolute}}.video__player--container-state[_ngcontent-%COMP%]{position:absolute;top:50%;right:50%;transform:translate(50%,-50%)}@media (max-width: 479px){.video__player--container-state[_ngcontent-%COMP%]{position:relative;transform:none;top:unset;right:unset;margin-top:40%}}.video__player--container[_ngcontent-%COMP%]   .video__player--placeholder[_ngcontent-%COMP%], .video__player--container[_ngcontent-%COMP%]   joymo-video-player[_ngcontent-%COMP%], .video__player--container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{aspect-ratio:16/9;grid-row:player-row;object-fit:cover}.video__player--container[_ngcontent-%COMP%]   footer[_ngcontent-%COMP%]{grid-row:footer-row;align-items:center;flex-direction:column-reverse;gap:15px;padding:16px}@media (min-width: 480px){.video__player--container[_ngcontent-%COMP%]   footer[_ngcontent-%COMP%]{background-color:var(--bg-light-color)}}@media (min-width: 768px){.video__player--container[_ngcontent-%COMP%]   footer[_ngcontent-%COMP%]{flex-direction:unset;height:68px}}.video__player--placeholder[_ngcontent-%COMP%]{background-color:var(--bg-transparent-hover-color)}[theme=dark][_nghost-%COMP%]   .video__player--placeholder[_ngcontent-%COMP%], [theme=dark]   [_nghost-%COMP%]   .video__player--placeholder[_ngcontent-%COMP%]{background-color:var(--bg-lightened-6)}.video__meta[_ngcontent-%COMP%]   joymo-help[_ngcontent-%COMP%]{border:1px solid var(--border-color);border-radius:calc(8px * var(--is-rounded))}.video__error[_ngcontent-%COMP%]{min-height:211px}@media (min-width: 768px){.video__error[_ngcontent-%COMP%]{min-height:396px}}@media (min-width: 1280px){.video__error[_ngcontent-%COMP%]{min-height:500px}}"]});let t=e;return t;})();var Rx=(()=>{let e=class e{constructor(n,r,s,a){this.fs=n,this.metaService=r,this.scopeService=s,this.brandingService=a;}resolve(n){let r=n.paramMap.get("videoId");if(!r)throw new Error("VideoIdNotFound");let s=this.scopeService.scope$.pipe(ii(o=>_v(this.fs,r,o.scopeId)),jn(o=>{this.metaService.setTags({title:o.name,description:o.description,image:o.posterImage});}),vl(1)),a=s.pipe(ii(o=>o.eventId?hv(this.fs,o.channelId,o.eventId):On(void 0)),jn(o=>o&&this.applyBranding(o)));
234return zr([this.scopeService.listenToChannel(),s,a]).pipe(_t(([o,u,c])=>{let{channelsWithVideoFeedback:p}=pn.behavior.testFeatures,y=o,{settings:_}=y,T=Eg(y,["settings"]);return{canProvideFeedback:p.includes(T.docId),channel:T,channelPublicSettings:_,cheapestAccess:this.getCheapestPrice(u,c),event:c,filterPredicate:Rv(u.docId),homepageUrl:this.scopeService.getChannelUrlFromChannel(T),liveAndUpcoming:c?this.getLiveAndUpcoming(c.docId):void 0,prevAndNext$:c?this.getPrevAndNext$(u,c):void 0,tagsModule:this.getTagsModule(u),video:u};}));}applyBranding(n){let r=fv(n);r?.brandingOverride&&this.brandingService.setOverride(r.brandingOverride,!0);}getPrevAndNext$(n,r){return this.scopeService.scope$.pipe(ii(s=>{let a={eventId:r.docId},o={scope:s.scope,scopeId:s.scopeId};return zr([Mc(this.fs,a,Rn(ti({},o),{sort:["DATE_TRIMMED","DESC"],_nowRef:n.startTime||n.uploadTime})),Mc(this.fs,a,Rn(ti({},o),{sort:["DATE_TRIMMED","ASC"],_nowRef:n.endTime||n.uploadTime}))]);}),_t(([s,a])=>{let o=s.sort((c,p)=>p.uploadTime.getTime()-c.uploadTime.getTime()).find(c=>c.docId!==n.docId&&Lv(n,c)),u=a.sort((c,p)=>c.uploadTime.getTime()-p.uploadTime.getTime()).find(c=>c.docId!==n.docId&&Pv(n,c));return{prev:o,next:u};}));}getCheapestPrice(n,r){if(!r)return;let s=pv(r,{video:n,includeTicketsWithLimitedRedemptions:!0}).filter(a=>cv(a,r));return Av.getCheapestAccess(s);}getTagsModule(n){return{moduleType:"TAGS_LIST",tags:n.tags};}getLiveAndUpcoming(n){return{heading:"Live and Upcoming Videos",moduleType:"LIVE_AND_UPCOMING_LIST",listSource:{eventId:n},layoutType:"CAROUSEL",density:"DENSE",size:6};}};e.ɵfac=function(r){return new(r||e)(_a(Jr),_a(Sv),_a(es),_a(nv));},e.ɵprov=Og({token:e,factory:e.ɵfac,providedIn:"root"});let t=e;return t;})();var rB=[{path:"",children:[{path:":videoId",resolve:{videoPageScope:Rx},component:Lx}]}],Ox=(()=>{let e=class e{};e.ɵfac=function(r){return new(r||e)();},e.ɵmod=Yr({type:e}),e.ɵinj=Wr({imports:[fn.forChild(rB),fn]});let t=e;return t;})();var Nx=(()=>{let e=class e{};e.ɵfac=function(r){return new(r||e)();},e.ɵmod=Yr({type:e}),e.ɵinj=Wr({imports:[Un]});let t=e;return t;})();var rV=(()=>{let e=class e{};e.ɵfac=function(r){return new(r||e)();},e.ɵmod=Yr({type:e}),e.ɵinj=Wr({providers:[{provide:ml,useValue:wg}],imports:[kl,iv,pr,Nc,Un,Nc,pr,av,Nl,Ml,Il,jl,Fl,fn,Ol,Bl,ts,Ul,wv,rv,Nx,Ox,Vl,Hl,$l]});let t=e;return t;})();export{rV as VideoModule};/**i18n:97d16af80b9e941913080ec17ee9bbcf9996ba7c137660b21174b8d4b6f2b4aa*/ //# sourceMappingURL=chunk-FIBTJPCH.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.