PageSourceSearch

https://www.rtlplay.be/rtlplay/_next/static/chunks/0cf_tu3kosjed.js?dpl=35974042407

js rtlplay.be collected 2026-09-24 09:44:36 UTC 992,724 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,73869,e=>{"use strict";let t,n,i,r,a;var o,s,u,l,d,c,h,p,f,g,m,v,y,b,w,T,S,x,A,E,k,I,C,M,P,D,R,L=e.i(83802),O=e.i(29387),N=e.i(24627);N.default;let j=e=>{if("object"==typeof e&&null!==e){if("function"==typeof Object.getPrototypeOf){let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}return"[object Object]"===Object.prototype.toString.call(e)}return!1},U=new Set(["__proto__","constructor","prototype","toString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString"]),B=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((e,t)=>{if(void 0===t)return e;if(Array.isArray(t))throw TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(t).forEach(n=>{U.has(n)||(Array.isArray(e[n])&&Array.isArray(t[n])?e[n]=B.options.mergeArrays?B.options.uniqueArrayItems?Array.from(new Set(e[n].concat(t[n]))):[...e[n],...t[n]]:t[n]:j(e[n])&&j(t[n])?e[n]=B(e[n],t[n]):!j(e[n])&&j(t[n])?e[n]=B(t[n],void 0):e[n]=void 0===t[n]?B.options.allowUndefinedOverrides?t[n]:e[n]:t[n])}),e},{})},F={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};B.options=F,B.withOptions=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];B.options=Object.assign(Object.assign({},F),e);let r=B(...n);return B.options=F,r};var V=e.i(10612);function H(e,t){if(!e)throw Error("Invariant failed")}function q(){return(q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var G="record",K="invalid-type",W=Object.keys.bind(Object),z=function(e){return Array.isArray(e)},X=function(e){return"string"==typeof e},Y=function(e){return"number"==typeof e&&Number.isFinite(e)};function J(e){return"object"==typeof e&&null!=e&&"[object Object]"==Object.prototype.toString.call(e)}function Q(e){return!(null==e||J(e)&&W(e).length<1||Array.isArray(e)&&e.length<1)}function $(e){return z(e)?q({},e):J(e)?e:{}}function Z(e,t){return null==e&&!!t.optional}function ee(e){return W(e).length<=0?null:e}function et(e,t,n){void 0===n&&(n=!1);var i=er[e.type];return"function"!=typeof i&&H(!1),i(e,t,n)}function en(e,t,n){void 0===n&&(n=!1);for(var i=$(e).shape,r=W(i),a=$(t),o={},s=0;s<r.length;s++){var u=et(i[r[s]],a[r[s]]);if(Q(u)&&(o[r[s]]=u,n))return o}return ee(o)}function ei(e,t,n){void 0===n&&(n=!1);for(var i=$(t),r=W(i),a={},o=0;o<r.length;o++){var s=et(e.of,i[r[o]]);if(Q(s)&&(a[r[o]]=s,n))return a}return ee(a)}var er={string:function(e,t){if(Z(t,e))return null;if(!X(t))return K;var n=e.minLength?e.minLength:[],i=n[0],r=n[1];if(i&&r&&Y(i)&&t.length<i)return r;var a=e.maxLength?e.maxLength:[],o=a[0],s=a[1];if(o&&s&&Y(o)&&t.length>o)return s;var u=e.pattern?e.pattern:[],l=u[0],d=u[1];return l&&d&&!1==l.test(t)?d:null},number:function(e,t){if(Z(t,e))return null;if(!Y(t))return K;var n=e.min?e.min:[],i=n[0],r=n[1];if(Y(i)&&t<i&&r)return r;var a=e.max?e.max:[],o=a[0],s=a[1];if(Y(o)&&t>o&&s)return s;var u=e.is?e.is:[],l=u[0],d=u[1];if(X(l)&&d){var c=Number.isInteger(t);if(c&&"float"==l||!c&&"integer"==l)return d}return null},boolean:function(e,t){return Z(t,e)?null:"boolean"!=typeof t?K:null},constant:function(e,t){return Z(t,e)||t===e.value?null:K},union:function(e,t){if(Z(t,e))return null;for(var n=e.of,i=null,r=0;r<n.length;r++)if(null==et(n[r],t))return null;return K},list:function(e,t,n){return(void 0===n&&(n=!1),Z(t,e))?null:z(t)?en(e,t,n):K},listof:function(e,t,n){return(void 0===n&&(n=!1),Z(t,e))?null:z(t)?ei(e,t,n):K},record:function(e,t,n){return(void 0===n&&(n=!1),Z(t,e))?null:J(t)?en(e,t,n):K},recordof:function(e,t,n){return(void 0===n&&(n=!1),Z(t,e))?null:J(t)?ei(e,t,n):K}},ea=function(e){return q({type:"string",optional:!!(null!=e&&e.optional)},e)},eo=function(e,t){return{type:"listof",optional:!!(null!=t&&t.optional),of:q({},e,{optional:!1})}},es=function(e,t){return{type:G,optional:!!(null!=t&&t.optional),shape:e}},eu=function(){if("u">typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,i){return e[0]===t&&(n=i,!0)}),n}function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(t,n){var i=e(this.__entries__,t);~i?this.__entries__[i][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,i=e(n,t);~i&&n.splice(i,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];e.call(t,r[1],r[0])}},t}(),el="u">typeof window&&"u">typeof document&&window.document===document,ed=e.g.Math===Math?e.g:"u">typeof self&&self.Math===Math?self:"u">typeof window&&window.Math===Math?window:Function("return this")(),ec="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(ed):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},eh=["top","right","bottom","left","width","height","size","weight"],ep="u">typeof MutationObserver,ef=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e){var t=!1,n=!1,i=0;function r(){t&&(t=!1,e()),n&&o()}function a(){ec(r)}function o(){var e=Date.now();if(t){if(e-i<2)return;n=!0}else t=!0,n=!1,setTimeout(a,20);i=e}return o}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){el&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),ep?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){el&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;eh.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=ne
1w e),this.instance_},e.instance_=null,e}(),eg=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var r=i[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},em=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||ed},ev=ew(0,0,0,0);function ey(e){return parseFloat(e)||0}function eb(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){return t+ey(e["border-"+n+"-width"])},0)}var e_="u">typeof SVGGraphicsElement?function(e){return e instanceof em(e).SVGGraphicsElement}:function(e){return e instanceof em(e).SVGElement&&"function"==typeof e.getBBox};function ew(e,t,n,i){return{x:e,y:t,width:n,height:i}}var eT=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ew(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=function(e){if(!el)return ev;if(e_(e)){var t;return ew(0,0,(t=e.getBBox()).width,t.height)}return function(e){var t,n=e.clientWidth,i=e.clientHeight;if(!n&&!i)return ev;var r=em(e).getComputedStyle(e),a=function(e){for(var t={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n],a=e["padding-"+r];t[r]=ey(a)}return t}(r),o=a.left+a.right,s=a.top+a.bottom,u=ey(r.width),l=ey(r.height);if("border-box"===r.boxSizing&&(Math.round(u+o)!==n&&(u-=eb(r,"left","right")+o),Math.round(l+s)!==i&&(l-=eb(r,"top","bottom")+s)),(t=e)!==em(t).document.documentElement){var d=Math.round(u+o)-n,c=Math.round(l+s)-i;1!==Math.abs(d)&&(u-=d),1!==Math.abs(c)&&(l-=c)}return ew(a.left,a.top,u,l)}(e)}(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),eS=function(e,t){var n,i,r,a,o,s=(n=t.x,i=t.y,r=t.width,a=t.height,eg(o=Object.create(("u">typeof DOMRectReadOnly?DOMRectReadOnly:Object).prototype),{x:n,y:i,width:r,height:a,top:i,right:n+r,bottom:a+i,left:n}),o);eg(this,{target:e,contentRect:s})},ex=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new eu,"function"!=typeof e)throw TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(!("u"<typeof Element)&&Element instanceof Object){if(!(e instanceof em(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new eT(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(!("u"<typeof Element)&&Element instanceof Object){if(!(e instanceof em(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new eS(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),eA="u">typeof WeakMap?new WeakMap:new eu,eE=function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var n=new ex(t,ef.getInstance(),this);eA.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){eE.prototype[e]=function(){var t;return(t=eA.get(this))[e].apply(t,arguments)}});var ek=void 0!==ed.ResizeObserver?ed.ResizeObserver:eE,eI=Object.create,eC=Object.defineProperty,eM=Object.getOwnPropertyDescriptor,eP=Object.getOwnPropertyNames,eD=Object.getPrototypeOf,eR=Object.prototype.hasOwnProperty,eL=function(e,t){return function(){return e&&(t=e(e=0)),t}},eO=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}},eN=function(e,t,n,i){if(t&&"object"==typeof t||"function"==typeof t)for(var r,a=eP(t),o=0,s=a.length;o<s;o++)r=a[o],eR.call(e,r)||r===n||eC(e,r,{get:(function(e){return t[e]}).bind(null,r),enumerable:!(i=eM(t,r))||i.enumerable});return e},ej=function(e,t,n){return n=null!=e?eI(eD(e)):{}
1,eN(!t&&e&&e.__esModule?n:eC(n,"default",{value:e,enumerable:!0}),e)},eU=eO(function(t,n){n.exports="u">typeof window?window:e.g});function eB(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):eB(e,t)}var eF=eL(function(){eF()});function eV(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var eH=eL(function(){}),eq=eO(function(e,t){var n=Array.prototype.slice;t.exports=function(e,t){for(("length"in e)||(e=[e]),e=n.call(e);e.length;){var i=e.shift(),r=t(i);if(r)return r;i.childNodes&&i.childNodes.length&&(e=n.call(i.childNodes).concat(e))}}}),eG=eO(function(e,t){function n(e,t){if(!eB(this,n))return new n(e,t);this.data=e,this.nodeValue=e,this.length=e.length,this.ownerDocument=t||null}eF(),t.exports=n,n.prototype.nodeType=8,n.prototype.nodeName="#comment",n.prototype.toString=function(){return"[object Comment]"}}),eK=eO(function(e,t){function n(e,t){if(!eB(this,n))return new n(e);this.data=e||"",this.length=this.data.length,this.ownerDocument=t||null}eF(),t.exports=n,n.prototype.type="DOMTextNode",n.prototype.nodeType=3,n.prototype.nodeName="#text",n.prototype.toString=function(){return this.data},n.prototype.replaceData=function(e,t,n){var i=this.data,r=i.substring(0,e),a=i.substring(e+t,i.length);this.data=r+n+a,this.length=this.data.length}}),eW=eO(function(e,t){t.exports=function(e){var t=this,n=e.type;e.target||(e.target=t),t.listeners||(t.listeners={});var i=t.listeners[n];if(i)return i.forEach(function(n){e.currentTarget=t,"function"==typeof n?n(e):n.handleEvent(e)});t.parentNode&&t.parentNode.dispatchEvent(e)}}),ez=eO(function(e,t){t.exports=function(e,t){this.listeners||(this.listeners={}),this.listeners[e]||(this.listeners[e]=[]),-1===this.listeners[e].indexOf(t)&&this.listeners[e].push(t)}}),eX=eO(function(e,t){t.exports=function(e,t){if(this.listeners&&this.listeners[e]){var n=this.listeners[e],i=n.indexOf(t);-1!==i&&n.splice(i,1)}}}),eY=eO(function(e,t){eH(),t.exports=function e(t){switch(t.nodeType){case 3:return r(t.data);case 8:return"<!--"+t.data+"-->";default:var a,o,s;return o=[],s=(a=t).tagName,"http://www.w3.org/1999/xhtml"===a.namespaceURI&&(s=s.toLowerCase()),o.push("<"+s+function(e){var t=[];for(var n in e)(function(e,t){var n=eV(e[t]);return"style"===t&&Object.keys(e.style).length>0||e.hasOwnProperty(t)&&("string"===n||"boolean"===n||"number"===n)&&"nodeName"!==t&&"className"!==t&&"tagName"!==t&&"textContent"!==t&&"innerText"!==t&&"namespaceURI"!==t&&"innerHTML"!==t})(e,n)&&t.push({name:n,value:e[n]});for(var r in e._attributes)for(var a in e._attributes[r]){var o=e._attributes[r][a],s=(o.prefix?o.prefix+":":"")+a;t.push({name:s,value:o.value})}return e.className&&t.push({name:"class",value:e.className}),t.length?i(t):""}(a)+function(e){var t=e.dataset,n=[];for(var r in t)n.push({name:"data-"+r,value:t[r]});return n.length?i(n):""}(a)),n.indexOf(s)>-1?o.push(" />"):(o.push(">"),a.childNodes.length?o.push.apply(o,a.childNodes.map(e)):a.textContent||a.innerText?o.push(r(a.textContent||a.innerText)):a.innerHTML&&o.push(a.innerHTML),o.push("</"+s+">")),o.join("")}};var n=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function i(e){var t=[];return e.forEach(function(e){var n=e.name,i=e.value;"style"===n&&(i=function(e){if("string"==typeof e)return e;var t="";return Object.keys(e).forEach(function(n){var i=e[n];n=n.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}),t+=n+":"+i+";"}),t}(i)),t.push(n+'="'+r(i).replace(/"/g,"&quot;")+'"')}),t.length?" "+t.join(" "):""}function r(e){var t="";return"string"==typeof e?t=e:e&&(t=e.toString()),t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}}),eJ=eO(function(e,t){eF();var n=eq(),i=eW(),r=ez(),a=eX(),o=eY(),s="http://www.w3.org/1999/xhtml";function u(e,t,n){if(!eB(this,u))return new u(e);var i=void 0===n?s:n||null;this.tagName=i===s?String(e).toUpperCase():e,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=t||null,this.namespaceURI=i,this._attributes={}
1,"INPUT"===this.tagName&&(this.type="text")}t.exports=u,u.prototype.type="DOMElement",u.prototype.nodeType=1,u.prototype.appendChild=function(e){return e.parentNode&&e.parentNode.removeChild(e),this.childNodes.push(e),e.parentNode=this,e},u.prototype.replaceChild=function(e,t){e.parentNode&&e.parentNode.removeChild(e);var n=this.childNodes.indexOf(t);return t.parentNode=null,this.childNodes[n]=e,e.parentNode=this,t},u.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);return this.childNodes.splice(t,1),e.parentNode=null,e},u.prototype.insertBefore=function(e,t){e.parentNode&&e.parentNode.removeChild(e);var n=null==t?-1:this.childNodes.indexOf(t);return n>-1?this.childNodes.splice(n,0,e):this.childNodes.push(e),e.parentNode=this,e},u.prototype.setAttributeNS=function(e,t,n){var i=null,r=t,a=t.indexOf(":");(a>-1&&(i=t.substr(0,a),r=t.substr(a+1)),"INPUT"===this.tagName&&"type"===t)?this.type=n:(this._attributes[e]||(this._attributes[e]={}))[r]={value:n,prefix:i}},u.prototype.getAttributeNS=function(e,t){var n=this._attributes[e],i=n&&n[t]&&n[t].value;return"INPUT"===this.tagName&&"type"===t?this.type:"string"!=typeof i?null:i},u.prototype.removeAttributeNS=function(e,t){var n=this._attributes[e];n&&delete n[t]},u.prototype.hasAttributeNS=function(e,t){var n=this._attributes[e];return!!n&&t in n},u.prototype.setAttribute=function(e,t){return this.setAttributeNS(null,e,t)},u.prototype.getAttribute=function(e){return this.getAttributeNS(null,e)},u.prototype.removeAttribute=function(e){return this.removeAttributeNS(null,e)},u.prototype.hasAttribute=function(e){return this.hasAttributeNS(null,e)},u.prototype.removeEventListener=a,u.prototype.addEventListener=r,u.prototype.dispatchEvent=i,u.prototype.focus=function(){},u.prototype.toString=function(){return o(this)},u.prototype.getElementsByClassName=function(e){var t=e.split(" "),i=[];return n(this,function(e){if(1===e.nodeType){var n=(e.className||"").split(" ");t.every(function(e){return -1!==n.indexOf(e)})&&i.push(e)}}),i},u.prototype.getElementsByTagName=function(e){e=e.toLowerCase();var t=[];return n(this.childNodes,function(n){1===n.nodeType&&("*"===e||n.tagName.toLowerCase()===e)&&t.push(n)}),t},u.prototype.contains=function(e){return n(this,function(t){return e===t})||!1}}),eQ=eO(function(e,t){eF();var n=eJ();function i(e){if(!eB(this,i))return new i;this.childNodes=[],this.parentNode=null,this.ownerDocument=e||null}t.exports=i,i.prototype.type="DocumentFragment",i.prototype.nodeType=11,i.prototype.nodeName="#document-fragment",i.prototype.appendChild=n.prototype.appendChild,i.prototype.replaceChild=n.prototype.replaceChild,i.prototype.removeChild=n.prototype.removeChild,i.prototype.toString=function(){return this.childNodes.map(function(e){return String(e)}).join("")}}),e$=eO(function(e,t){function n(e){}t.exports=n,n.prototype.initEvent=function(e,t,n){this.type=e,this.bubbles=t,this.cancelable=n},n.prototype.preventDefault=function(){}}),eZ=eO(function(e,t){eF();var n=eq(),i=eG(),r=eK(),a=eJ(),o=eQ(),s=e$(),u=eW(),l=ez(),d=eX();function c(){if(!eB(this,c))return new c;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}t.exports=c;var h=c.prototype;h.createTextNode=function(e){return new r(e,this)},h.createElementNS=function(e,t){return new a(t,this,null===e?null:String(e))},h.createElement=function(e){return new a(e,this)},h.createDocumentFragment=function(){return new o(this)},h.createEvent=function(e){return new s(e)},h.createComment=function(e){return new i(e,this)},h.getElementById=function(e){return e=String(e),n(this.childNodes,function(t){if(String(t.id)===e)return t})||null},h.getElementsByClassName=a.prototype.getElementsByClassName,h.getElementsByTagName=a.prototype.getElementsByTagName,h.contains=a.prototype.contains,h.removeEventListener=d,h.addEventListener=l,h.dispatchEvent=u}),e0=eO(function(e,t){t.exports=new(eZ())}),e1=eO(function(t,n){var i,r=e.g,a=e0();"u">typeof document?i=document:(i=r["__GLOBAL_DOCUMENT_CACHE@4"])||(i=r["__GLOBAL_DOCUMENT_CACHE@4"]=a),n.exports=i});function e2(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function e3(e,t){if(e){if("string"==typeof e)return e2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e2(e,t)}}function e4(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(a.push(i.value),!(t&&a.length===t));o=!0);}catch(e){s=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw r}}return a}}(e,t)||e3(e,t)||function(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var e5=ej(eU()),e6=ej(eU()),e8=ej(eU()),e9=function(){var e=e8.default.performance,t=e&&e.timing,n=t&&t.navigationStart;return Math.round("number"==typeof n&&"function"==typeof e.now?n+e.now():Date.now())},e7=function(){if("function"==typeof(null==(e=e6.default.crypto)?void 0:e.getRandomValues)){n=new Uint8Array(32),e6.default.crypto.getRandomValues(n);for(var e,t,n,i=0;i<32;i++)n[i]=n[i]%16}else{n=[];for(var r=0;r<32;r++)n[r]=16*Math.random()|0}var a=0;t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t="x"===e?n[a]:3&n[a]|8;return a++,t.toString(16)});var o=e9(),s=null==o?void 0:o.toString(16).substring(3);return s?t.substring(0,28)+s:t},te=function(){return("000000"+(0x81bf1000*Math.random()|0).toString(36)).slice(-6)},tt=function(e){var t;if(e&&void 0!==e.nodeName)return e.muxId||(e.muxId=te()),e.muxId;try{t=document.querySelector(e)}catch(e){}return t&&!t.muxId&&(t.muxId=e),(null==t?void 0:t.muxId)||e},tn=function(e){e&&void 0!==e.nodeName?e=tt(t=e):t=document.querySelector(e);var t,n=t&&t.nodeName?t.nodeName.toLowerCase():"";return[t,e,n]};function ti(e){return function(e){if(Array.isArray(e))return e2(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||e3(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tr=function(e){var t,n,i,r,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,s=e?[console,e]:[console],u=(t=console.trace).bind.apply(t,ti(s)),l=(n=console.info).bind.apply(n,ti(s)),d=(i=console.debug).bind.apply(i,ti(s)),c=(r=console.warn).bind.apply(r,ti(s)),h=(a=console.error).bind.apply(a,ti(s)),p=o;return{trace:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!(p>0))return u.apply(void 0,ti(t))},debug:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!(p>1))return d.apply(void 0,ti(t))},info:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!(p>2))return l.apply(void 0,ti(t))},warn:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!(p>3))return c.apply(void 0,ti(t))},error:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!(p>4))return h.apply(void 0,ti(t))},get level(){return p},set level(_){_!==this.level&&(p=null!=_?_:o)}}}("[mux]"),ta=ej(eU());function to(){return"1"===(ta.default.doNotTrack||ta.default.navigator&&ta.default.navigator.doNotTrack)}function ts(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tu(e,t){if(!eB(e,t))throw TypeError("Cannot call a class as a function")}function tl(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function td(e,t,n){return t&&tl(e.prototype,t),n&&tl(e,n),e}function tc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function th(e){return(th=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tp(e,t,n){return(tp="u">typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=th(e)););return e}(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(n||e):r.value}})(e,t,n||e)}function tf(e,t){return(tf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}eF(),eH();var tg=function(e){return tm(e)[0]},tm=function(e){if("string"!=typeof e||""===e)return["localhost"];var t,n=(e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/)||[])[4];return n&&(t=(n.match(/[^\.]+\.[^\.]+$/)||[])[0]),[n,t]},tv=ej(eU()),ty=function(){var e=tv.default.performance;return void 0!==(e&&e.timing)}
1,tb=function(){var e=tv.default.performance,t=e&&e.timing;return t&&t.domContentLoadedEventEnd},t_=function(){var e=tv.default.performance,t=e&&e.timing;return t&&t.navigationStart};function tw(e,t,n){n=void 0===n?1:n,e[t]=e[t]||0,e[t]+=n}function tT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){tc(e,t,n[t])})}return e}function tS(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var tx=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],tA=["x-cdn","content-type"].concat(tx);function tE(e){var t={};return(e=e||"").trim().split(/[\r\n]+/).forEach(function(e){if(e){var n=e.split(": "),i=n.shift();i&&(tA.indexOf(i.toLowerCase())>=0||0===i.toLowerCase().indexOf("x-litix-"))&&(t[i]=n.join(": "))}}),t}function tk(e){if(e){var t=tx.find(function(t){return void 0!==e[t]});return t?e[t]:void 0}}var tI=function(e){var t={};for(var n in e){var i=e[n];-1!==i["DATA-ID"].search("io.litix.data.")&&(t[i["DATA-ID"].replace("io.litix.data.","")]=i.VALUE)}return t},tC=function(e){if(!e)return{};var t=t_(),n=e.loading,i=n?n.start:e.trequest,r=n?n.first:e.tfirst,a=n?n.end:e.tload;return{bytesLoaded:e.total,requestStart:Math.round(t+i),responseStart:Math.round(t+r),responseEnd:Math.round(t+a)}},tM=function(e){if(!(!e||"function"!=typeof e.getAllResponseHeaders))return tE(e.getAllResponseHeaders())},tP=function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var i=arguments.length>4?arguments[4]:void 0,r=e.log,a=e.utils.secondsToMs,o=function(e){var t,n=parseInt(i.version);return 1===n&&null!==e.programDateTime&&(t=e.programDateTime),0===n&&null!==e.pdt&&(t=e.pdt),t};if(!ty())return void r.warn("performance timing not supported. Not tracking HLS.js.");var s=function(n,i){return e.emit(t,n,i)},u=function(e,t){var n=t.levels,i=t.audioTracks,r=t.url,a=t.stats,o=t.networkDetails,u=t.sessionData,l={},d={};n.forEach(function(e,t){l[t]={width:e.width,height:e.height,bitrate:e.bitrate,attrs:e.attrs}}
1),i.forEach(function(e,t){d[t]={name:e.name,language:e.lang,bitrate:e.bitrate}});var c=tC(a),h=c.bytesLoaded,p=c.requestStart,f=c.responseStart,g=c.responseEnd;s("requestcompleted",tS(tT({},tI(u)),{request_event_type:e,request_bytes_loaded:h,request_start:p,request_response_start:f,request_response_end:g,request_type:"manifest",request_hostname:tg(r),request_response_headers:tM(o),request_rendition_lists:{media:l,audio:d,video:{}}}))};n.on(i.Events.MANIFEST_LOADED,u);var l=function(e,t){var n=t.details,i=t.level,r=t.networkDetails,u=tC(t.stats),l=u.bytesLoaded,d=u.requestStart,c=u.responseStart,h=u.responseEnd,p=n.fragments[n.fragments.length-1],f=o(p)+a(p.duration);s("requestcompleted",{request_event_type:e,request_bytes_loaded:l,request_start:d,request_response_start:c,request_response_end:h,request_current_level:i,request_type:"manifest",request_hostname:tg(n.url),request_response_headers:tM(r),video_holdback:n.holdBack&&a(n.holdBack),video_part_holdback:n.partHoldBack&&a(n.partHoldBack),video_part_target_duration:n.partTarget&&a(n.partTarget),video_target_duration:n.targetduration&&a(n.targetduration),video_source_is_live:n.live,player_manifest_newest_program_time:isNaN(f)?void 0:f})};n.on(i.Events.LEVEL_LOADED,l);var d=function(e,t){var n=t.details,i=t.networkDetails,r=tC(t.stats);s("requestcompleted",{request_event_type:e,request_bytes_loaded:r.bytesLoaded,request_start:r.requestStart,request_response_start:r.responseStart,request_response_end:r.responseEnd,request_type:"manifest",request_hostname:tg(n.url),request_response_headers:tM(i)})};n.on(i.Events.AUDIO_TRACK_LOADED,d);var c=function(e,t){var i=t.stats,r=t.networkDetails,a=t.frag,o=tC(i=i||a.stats),u=o.bytesLoaded,l=o.requestStart,d=o.responseStart,c=o.responseEnd,h=r?tM(r):void 0,p={request_event_type:e,request_bytes_loaded:u,request_start:l,request_response_start:d,request_response_end:c,request_hostname:r?tg(r.responseURL):void 0,request_id:h?tk(h):void 0,request_response_headers:h,request_media_duration:a.duration,request_url:null==r?void 0:r.responseURL};"main"===a.type?(p.request_type="media",p.request_current_level=a.level,p.request_video_width=(n.levels[a.level]||{}).width,p.request_video_height=(n.levels[a.level]||{}).height,p.request_labeled_bitrate=(n.levels[a.level]||{}).bitrate):p.request_type=a.type,s("requestcompleted",p)};n.on(i.Events.FRAG_LOADED,c);var h=function(e,t){var n=t.frag,i=n.start;s("fragmentchange",{currentFragmentPDT:o(n),currentFragmentStart:a(i)})};n.on(i.Events.FRAG_CHANGED,h);var p=function(e,t){var n,r=t.type,a=t.details,o=t.response,u=t.fatal,l=t.frag,d=t.networkDetails,c=(null==l?void 0:l.url)||t.url||"",h=d?tM(d):void 0;(a===i.ErrorDetails.MANIFEST_LOAD_ERROR||a===i.ErrorDetails.MANIFEST_LOAD_TIMEOUT||a===i.ErrorDetails.FRAG_LOAD_ERROR||a===i.ErrorDetails.FRAG_LOAD_TIMEOUT||a===i.ErrorDetails.LEVEL_LOAD_ERROR||a===i.ErrorDetails.LEVEL_LOAD_TIMEOUT||a===i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||a===i.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT||a===i.ErrorDetails.SUBTITLE_LOAD_ERROR||a===i.ErrorDetails.SUBTITLE_LOAD_TIMEOUT||a===i.ErrorDetails.KEY_LOAD_ERROR||a===i.ErrorDetails.KEY_LOAD_TIMEOUT)&&s("requestfailed",{request_error:a,request_url:c,request_hostname:tg(c),request_id:h?tk(h):void 0,request_type:a===i.ErrorDetails.FRAG_LOAD_ERROR||a===i.ErrorDetails.FRAG_LOAD_TIMEOUT?"media":a===i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||a===i.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT?"audio":a===i.ErrorDetails.SUBTITLE_LOAD_ERROR||a===i.ErrorDetails.SUBTITLE_LOAD_TIMEOUT?"subtitle":a===i.ErrorDetails.KEY_LOAD_ERROR||a===i.ErrorDetails.KEY_LOAD_TIMEOUT?"encryption":"manifest",request_error_code:null==o?void 0:o.code,request_error_text:null==o?void 0:o.text}),u&&s("error",{player_error_code:r,player_error_message:a,player_error_context:"".concat(c?"url: ".concat(c,"\n"):"")+"".concat(o&&(o.code||o.text)?"response: ".concat(o.code,", ").concat(o.text,"\n"):"")+"".concat(t.reason?"failure reason: ".concat(t.reason,"\n"):"")+"".concat(t.level?"level: ".concat(t.level,"\n"):"")+"".concat(t.parent?"parent stream controller: ".concat(t.parent,"\n"):"")+"".concat(t.buffer?"buffer length: ".concat(t.buffer,"\n"):"")+"".concat(t.error?"error: ".concat(t.error,"\n"):"")+"".concat(t.event?"event: ".concat(t.event,"\n"):"")+"".concat(t.err?"error message: ".concat(null==(n=t.err)?void 0:n.message,"\n"):"")})};n.on(i.Events.ERROR,p);var f=function(e,t){var n=t.frag,i=n&&n._url||"";s("requestcanceled",{request_event_type:e,request_url:i,request_type:"media",request_hostname:tg(i)})};n.on(i.Events.FRAG_LOAD_EMERGENCY_ABORTED,f);var g=function(e,t){var i=t.level,a=n.levels[i];if(a&&a.attrs&&a.attrs.BANDWIDTH){var o,u=a.attrs.BANDWIDTH,l=parseFloat(a.attrs["FRAME-RATE"]);isNaN(l)||(o=l),u?s("renditionchange",{video_source_fps:o,video_source_bitrate:u,video_source_width:a.width,video_source_height:a.height,video_source_rendition_name:a.name,video_source_codec:null==a?void 0:a.videoCodec}):r.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js")}};n.on(i.Events.LEVEL_SWITCHED,g),n._stopMuxMonitor=function(){n.off(i.Events.MANIFEST_LOADED,u),n.off(i.Events.LEVEL_LOADED,l),n.off(i.Events.AUDIO_TRACK_LOADED,d),n.off(i.Events.FRAG_LOADED,c),n.off(i.Events.FRAG_CHANGED,h),n.off(i.Events.ERROR,p),n.off(i.Events.FRAG_LOAD_EMERGENCY_ABORTED,f),n.off(i.Events.LEVEL_SWITCHED,g),n.off(i.Events.DESTROYING,n._stopMuxMonitor),delete n._stopMuxMonitor},n.on(i.Events.DESTROYING,n._stopMuxMonitor)},tD=function(e){e&&"function"==typeof e._stopMuxMonitor&&e._stopMuxMonitor()},tR=function(e,t){if(!e||!e.requestEndDate)return{};var n,i=tg(e.url),r=e.url,a=e.bytesLoaded,o=new Date(e.requestStartDate).getTime(),s=new Date(e.firstByteDate).getTime(),u=new Date(e.requestEndDate).getTime(),l=isNaN(e.duration)?0:e.duration,d="function"==typeof t.getMetricsFor?t.getMetricsFor(e.mediaType).HttpList:t.getDashMetrics().getHttpRequests(e.mediaType);d.length>0&&(n=tE(d[d.length-1]._responseHeaders||""));var c=n?tk(n):void 0;return{requestStart:o,requestResponseStart:s,requestResponseEnd:u,requestBytesLoaded:a,requestResponseHeaders:n,requestMediaDuration:l,requestHostname:i,requestUrl:r,requestId:c}},tL=function(e,t){if("function"==typeof t.getCurrentRepresentationForType){var n=t.getCurrentRepresentationForType(e);return n?{currentLevel:n.absoluteIndex,renditionWidth:n.width||null,renditionHeight:n.height||null,renditionBitrate:n.bandwidth}:{}}var i=t.getQualityFor(e),r=t.getCurrentTrackFor(e).bitrateList;return r?{currentLevel:i,renditionWidth:r[i].width||null,renditionHeight:r[i].height||null,renditionBitrate:r[i].bandwidth}:{}},tO=function(e){var t;return null==(t=e.match(/.*codecs\*?="(.*)"/))?void 0:t[1]},tN=function(e){try{var t,n;return null==(n=e.getVersion)||null==(t=n.call(e))?void 0:t.split(".").map(function(e){return parseInt(e)})[0]}catch(e){return!1}},tj=function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var i=e.log;if(!n||!n.on)return void i.warn("Invalid dash.js player reference. Monitoring blocked.");var r=tN(n),a=function(n,i){return e.emit(t,n,i)},o=function(e){var t=e.type,n=(e.data||{}).url;a("requestcompleted",{request_event_type:t,request_start:0,request_response_start:0,request_response_end:0,request_bytes_loaded:-1,request_type:"manifest",request_hostname:tg(n),request_url:n})};n.on("manifestLoaded",o);var s={},u=function(e){if("function"!=typeof e.getRequests)return null;var t=e.getRequests({state:"executed"});return 0===t.length?null:t[t.length-1]},l=function(e){var t=e.type,i=e.chunk,r=e.request,o=(i||{}).mediaInfo||{},u=o.type,l=o.bitrateList,d={};
1(l=l||[]).forEach(function(e,t){d[t]={},d[t].width=e.width,d[t].height=e.height,d[t].bitrate=e.bandwidth,d[t].attrs={}}),"video"===u?s.video=d:"audio"===u?s.audio=d:s.media=d;var c=tR(r,n),h=c.requestStart,p=c.requestResponseStart,f=c.requestResponseEnd,g=c.requestResponseHeaders,m=c.requestMediaDuration,v=c.requestHostname,y=c.requestUrl;a("requestcompleted",{request_event_type:t,request_start:h,request_response_start:p,request_response_end:f,request_bytes_loaded:-1,request_type:u+"_init",request_response_headers:g,request_hostname:v,request_id:c.requestId,request_url:y,request_media_duration:m,request_rendition_lists:s})};r>=4?n.on("initFragmentLoaded",l):n.on("initFragmentLoaded",function(e){var t=e.type,n=e.fragmentModel,i=e.chunk;l({type:t,request:u(n),chunk:i})});var d=function(e){var t=e.type,i=e.chunk,r=e.request,o=i||{},s=o.mediaInfo,u=o.start,l=(s||{}).type,d=tR(r,n),c=d.requestStart,h=d.requestResponseStart,p=d.requestResponseEnd,f=d.requestBytesLoaded,g=d.requestResponseHeaders,m=d.requestMediaDuration,v=d.requestHostname,y=d.requestUrl,b=d.requestId,w=tL(l,n),T=w.currentLevel,S=w.renditionWidth,x=w.renditionHeight;a("requestcompleted",{request_event_type:t,request_start:c,request_response_start:h,request_response_end:p,request_bytes_loaded:f,request_type:l,request_response_headers:g,request_hostname:v,request_id:b,request_url:y,request_media_start_time:u,request_media_duration:m,request_current_level:T,request_labeled_bitrate:w.renditionBitrate,request_video_width:S,request_video_height:x})};r>=4?n.on("mediaFragmentLoaded",d):n.on("mediaFragmentLoaded",function(e){var t=e.type,n=e.fragmentModel,i=e.chunk;d({type:t,request:u(n),chunk:i})});var c={video:void 0,audio:void 0,totalBitrate:void 0},h=function(){if(c.video&&"number"==typeof c.video.bitrate){if(!(c.video.width&&c.video.height))return void i.warn("have bitrate info for video but missing width/height");var e=c.video.bitrate;if(c.audio&&"number"==typeof c.audio.bitrate&&(e+=c.audio.bitrate),e!==c.totalBitrate)return c.totalBitrate=e,{video_source_bitrate:e,video_source_height:c.video.height,video_source_width:c.video.width,video_source_codec:tO(c.video.codec)}}},p=function(e,t,r){var o=e.mediaType;if("audio"===o||"video"===o){if("function"==typeof n.getRepresentationsByType)if(e.newRepresentation)s={bitrate:e.newRepresentation.bandwidth,width:e.newRepresentation.width,height:e.newRepresentation.height,qualityIndex:e.newRepresentation.absoluteIndex};else{var s,u=n.getRepresentationsByType(o);if(u&&"number"==typeof e.newQuality){var l=u.find(function(t){return t.absoluteIndex===e.newQuality||t.index===e.newQuality});l&&(s={bitrate:l.bandwidth,width:l.width,height:l.height,qualityIndex:e.newQuality})}}else{if("number"!=typeof e.newQuality)return void i.warn("missing evt.newQuality in qualityChangeRendered event",e);s=n.getBitrateInfoListFor(o).find(function(t){return t.qualityIndex===e.newQuality})}if(!(s&&"number"==typeof s.bitrate))return void i.warn("missing bitrate info for ".concat(o));c[o]=tS(tT({},s),{codec:n.getCurrentTrackFor(o).codec});var d=h();d&&a("renditionchange",d)}};n.on("qualityChangeRendered",p);var f=function(e){var t=e.request,n=e.mediaType;a("requestcanceled",{request_event_type:(t=t||{}).type+"_"+t.action,request_url:t.url,request_type:n,request_hostname:tg(t.url)})};n.on("fragmentLoadingAbandoned",f);var g=function(e){var t,n,i=e.error,r=(null==i||null==(t=i.data)?void 0:t.request)||{},o=(null==i||null==(n=i.data)?void 0:n.response)||{};(null==i?void 0:i.code)===27&&a("requestfailed",{request_error:r.type+"_"+r.action,request_url:r.url,request_hostname:tg(r.url),request_type:r.mediaType,request_error_code:o.status,request_error_text:o.statusText});var s="".concat(null!=r&&r.url?"url: ".concat(r.url,"\n"):"")+"".concat(null!=o&&o.status||null!=o&&o.statusText?"response: ".concat(null==o?void 0:o.status,", ").concat(null==o?void 0:o.statusText,"\n"):"");a("error",{player_error_code:null==i?void 0:i.code,player_error_message:null==i?void 0:i.message,player_error_context:s})};n.on("error",g),n._stopMuxMonitor=function(){n.off("manifestLoaded",o),n.off("initFragmentLoaded",l),n.off("mediaFragmentLoaded",d),n.off("qualityChangeRendered",p),n.off("error",g),n.off("fragmentLoadingAbandoned",f),delete n._stopMuxMonitor}},tU=function(e){e&&"function"==typeof e._stopMuxMonitor&&e._stopMuxMonitor()},tB=0,tF=function(){function e(){tu(this,e),tc(this,"_listeners",void 0)}return td(e,[{key:"on",value:function(e,t,n){return t._eventEmitterGuid=t._eventEmitterGuid||++tB,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],n&&(t=t.bind(n)),this._listeners[e].push(t),t}},{key:"off",value:function(e,t){var n=this._listeners&&this._listeners[e];
1n&&n.forEach(function(e,i){e._eventEmitterGuid===t._eventEmitterGuid&&n.splice(i,1)})}},{key:"one",value:function(e,t,n){var i=this;t._eventEmitterGuid=t._eventEmitterGuid||++tB;var r=function(){i.off(e,r),t.apply(n||this,arguments)};r._eventEmitterGuid=t._eventEmitterGuid,this.on(e,r)}},{key:"emit",value:function(e,t){var n=this;if(this._listeners){t=t||{};var i=this._listeners["before"+e]||[],r=this._listeners["before*"]||[],a=this._listeners[e]||[],o=this._listeners["after"+e]||[],s=function(t,i){(t=t.slice()).forEach(function(t){t.call(n,{type:e},i)})};s(i,t),s(r,t),s(a,t),s(o,t)}}}]),e}(),tV=ej(eU()),tH=function(){function e(t){var n=this;tu(this,e),tc(this,"_playbackHeartbeatInterval",void 0),tc(this,"_playheadShouldBeProgressing",void 0),tc(this,"pm",void 0),this.pm=t,this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,t.on("playing",function(){n._playheadShouldBeProgressing=!0}),t.on("play",this._startPlaybackHeartbeatInterval.bind(this)),t.on("playing",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adbreakstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adplay",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adplaying",this._startPlaybackHeartbeatInterval.bind(this)),t.on("devicewake",this._startPlaybackHeartbeatInterval.bind(this)),t.on("viewstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("rebufferstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("pause",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("ended",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("viewend",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("error",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("aderror",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adpause",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adended",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adbreakend",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("seeked",function(){t.data.player_is_paused?n._stopPlaybackHeartbeatInterval():n._startPlaybackHeartbeatInterval()}),t.on("timeupdate",function(){null!==n._playbackHeartbeatInterval&&t.emit("playbackheartbeat")}),t.on("devicesleep",function(e,i){null!==n._playbackHeartbeatInterval&&(tV.default.clearInterval(n._playbackHeartbeatInterval),t.emit("playbackheartbeatend",{viewer_time:i.viewer_time}),n._playbackHeartbeatInterval=null)})}return td(e,[{key:"_startPlaybackHeartbeatInterval",value:function(){var e=this;null===this._playbackHeartbeatInterval&&(this.pm.emit("playbackheartbeat"),this._playbackHeartbeatInterval=tV.default.setInterval(function(){e.pm.emit("playbackheartbeat")},this.pm.playbackHeartbeatTime))}},{key:"_stopPlaybackHeartbeatInterval",value:function(){this._playheadShouldBeProgressing=!1,null!==this._playbackHeartbeatInterval&&(tV.default.clearInterval(this._playbackHeartbeatInterval),this.pm.emit("playbackheartbeatend"),this._playbackHeartbeatInterval=null)}}]),e}(),tq=function e(t){var n=this;tu(this,e),tc(this,"viewErrored",void 0),t.on("viewinit",function(){n.viewErrored=!1}),t.on("error",function(e,i){try{var r=t.errorTranslator({player_error_code:i.player_error_code,player_error_message:i.player_error_message,player_error_context:i.player_error_context,player_error_severity:i.player_error_severity,player_error_business_exception:i.player_error_business_exception});r&&(t.data.player_error_code=r.player_error_code||i.player_error_code,t.data.player_error_message=r.player_error_message||i.player_error_message,t.data.player_error_context=r.player_error_context||i.player_error_context,t.data.player_error_severity=r.player_error_severity||i.player_error_severity,t.data.player_error_business_exception=r.player_error_business_exception||i.player_error_business_exception,n.viewErrored=!0)}catch(e){t.mux.log.warn("Exception in error translator callback.",e),n.viewErrored=!0}}),t.on("aftererror",function(){var e,n,i,r,a;null==(e=t.data)||delete e.player_error_code,null==(n=t.data)||delete n.player_error_message,null==(i=t.data)||delete i.player_error_context,null==(r=t.data)||delete r.player_error_severity,null==(a=t.data)||delete a.player_error_business_exception})},tG=function(){function e(t){tu(this,e),tc(this,"_watchTimeTrackerLastCheckedTime",void 0),tc(this,"pm",void 0),this.pm=t,this._watchTimeTrackerLastCheckedTime=null,t.on("playbackheartbeat",this._updateWatchTime.bind(this)),t.on("playbackheartbeatend",this._clearWatchTimeState.bind(this))}return td(e,[{key:"_updateWatchTime",value:function(e,t){var n=t.viewer_time;null===this._watchTimeTrackerLastCheckedTime&&(this._watchTimeTrackerLastCheckedTime=n),tw(this.pm.data,"view_watch_time",n-this._watchTimeTrackerLastCheckedTime),this._watchTimeTrackerLastCheckedTime=n}},{key:"_clearWatchTimeState",value:function(e,t){this._updateWatchTime(e,t),this._watchTimeTrackerLastCheckedTime=null}}]),e}(),tK=function(){function e(t){var n=this;tu(this,e),tc(this,"_playbackTimeTrackerLastPlayheadPosition",void 0),tc(this,"_lastTime",void 0),tc(this,"_isAdPlaying",void 0),tc(this,"_callbackUpdatePlaybackTime",void 0),tc(this,"pm",void 0),this.pm=t,this._playbackTimeTrackerLastPlayheadPosition=-1,this._lastTime=e9(),this._isAdPlaying=!1,this._callbackUpdatePlaybackTime=null,t.on("viewinit",function(){n.pm.data.view_playing_time_ms_cumulative=0});var i=this._startPlaybackTimeTracking.bind(this);t.on("playing",i),t.on("adplaying",i);var r=function(){n.pm.data.player_is_paused||i()};t.on("seeked",r),t.on("rebufferend",r);var a=this._stopPlaybackTimeTracking.bind(this);t.on("playbackheartbeatend",a),t.on("seeking",a),t.on("rebufferstart",a),t.on("adplaying",function(){n._isAdPlaying=!0}),t.on("adended",function(){n._isAdPlaying=!1}),t.on("adpause",function(){n._isAdPlaying=!1}),t.on("adbreakstart",function(){n._isAdPlaying=!1}),t.on("adbreakend",function(){n._isAdPlaying=!1}),t.on("adplay",function(){n._isAdPlaying=!1}),t.on("viewinit",function(){n._playbackTimeTrackerLastPlayheadPosition=-1,n._lastTime=e9(),n._isAdPlaying=!1,n._callbackUpdatePlaybackTime=null})}return td(e,[{key:"_startPlaybackTimeTracking",value:function(){null===this._callbackUpdatePlaybackTime&&(this._callbackUpdatePlaybackTime=this._updatePlaybackTime.bind(this),this._playbackTimeTrackerLastPlayheadPosition=this.pm.data.player_playhead_time,this._lastTime=e9(),this.pm.on("playbackheartbeat",this._callbackUpdatePlaybackTime))}},{key:"_stopPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime&&(this._updatePlaybackTime(),this.pm.off("playbackheartbeat",this._callbackUpdatePlaybackTime),this._callbackUpdatePlaybackTime=null,this._playbackTimeTrackerLastPlayheadPosition=-1)}},{key:"_updatePlaybackTime",value:function(){var e=this.pm.data.player_playhead_time||0,t=e9(),n=t-this._lastTime,i=-1;this._playbackTimeTrackerLastPlayheadPosition>=0&&e>this._playbackTimeTrackerLastPlayheadPosition?i=e-this._playbackTimeTrackerLastPlayheadPosition:this._isAdPlaying&&(i=n),i>0&&i<=1e3&&tw(this.pm.data,"view_content_playback_time",i),null!==this._callbackUpdatePlaybackTime&&n>0&&n<=1e3&&(this._isAdPlaying&&tw(this.pm.data,"ad_playing_time_ms_cumulative",n),tw(this.pm.data,"view_playing_time_ms_cumulative",n)),this._playbackTimeTrackerLastPlayheadPosition=e,this._lastTime=t}}]),e}(),tW=function(){function e(t){tu(this,e),tc(this,"pm",void 0),this.pm=t;var n=this._updatePlayheadTime.bind(this);t.on("playbackheartbeat",n),t.on("playbackheartbeatend",n),t.on("timeupdate",n),t.on("destroy",function(){t.off("timeupdate",n)})}return td(e,[{key:"_updateMaxPlayheadPosition",value:function(){this.pm.data.view_max_playhead_position=void 0===this.pm.data.view_max_playhead_position?this.pm.data.player_playhead_time:Math.max(this.pm.data.view_max_playhead_position,this.pm.data.player_playhead_time)}},{key:"_updatePlayheadTime",value:function(e,t){var n=this,i=function(){n.pm.currentFragmentPDT&&n.pm.currentFragmentStart&&(n.pm.data.player_program_time=n.pm.currentFragmentPDT+n.pm.data.player_playhead_time-n.pm.currentFragmentStart)};if(t&&t.player_playhead_time)this.pm.data.player_playhead_time=t.player_playhead_time,i(),this._updateMaxPlayheadPosition();else if(this.pm.getPlayheadTime){var r=this.pm.getPlayheadTime();void 0!==r&&(this.pm.data.player_playhead_time=r,i(),this._updateMaxPlayheadPosition())}}}]),e}(),tz=function e(t){if(tu(this,e),!t.disableRebufferTracking){var n,i=function(e,t){r(t),n=void 0},r=function(e){if(n){var i=e.viewer_time-n;tw(t.data,"view_rebuffer_duration",i),n=e.viewer_time,t.data.view_rebuffer_duration>3e5&&(t.emit("viewend"),t.send("viewend"),t.mux.log.warn("Ending view after rebuffering for longer than ".concat(3e5,"ms, future events will be ignored unless a programchange or videochange occurs.")))}t.data.view_watch_time>=0&&t.data.view_rebuffer_count>0&&(t.data.view_rebuffer_frequency=t.data.view_rebuffer_count/t.data.view_watch_time,t.data.view_rebuffer_percentage=t.data.view_rebuffer_duration/t.data.view_watch_time)};t.on("playbackheartbeat",function(e,t){return r(t)}
1),t.on("rebufferstart",function(e,r){n||(tw(t.data,"view_rebuffer_count",1),n=r.viewer_time,t.one("rebufferend",i))}),t.on("viewinit",function(){n=void 0,t.off("rebufferend",i)})}},tX=function(){function e(t){var n=this;tu(this,e),tc(this,"_lastCheckedTime",void 0),tc(this,"_lastPlayheadTime",void 0),tc(this,"_lastPlayheadTimeUpdatedTime",void 0),tc(this,"_rebuffering",void 0),tc(this,"pm",void 0),this.pm=t,t.disableRebufferTracking||t.disablePlayheadRebufferTracking||(this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null,t.on("playbackheartbeat",this._checkIfRebuffering.bind(this)),t.on("playbackheartbeatend",this._cleanupRebufferTracker.bind(this)),t.on("seeking",function(){n._cleanupRebufferTracker(null,{viewer_time:e9()})}))}return td(e,[{key:"_checkIfRebuffering",value:function(e,t){if(this.pm.seekingTracker.isSeeking||this.pm.adTracker.isAdBreak||!this.pm.playbackHeartbeat._playheadShouldBeProgressing)return void this._cleanupRebufferTracker(e,t);if(null===this._lastCheckedTime)return void this._prepareRebufferTrackerState(t.viewer_time);if(this._lastPlayheadTime!==this.pm.data.player_playhead_time)return void this._cleanupRebufferTracker(e,t,!0);var n=t.viewer_time-this._lastPlayheadTimeUpdatedTime;"number"==typeof this.pm.sustainedRebufferThreshold&&n>=this.pm.sustainedRebufferThreshold&&(this._rebuffering||(this._rebuffering=!0,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}))),this._lastCheckedTime=t.viewer_time}},{key:"_clearRebufferTrackerState",value:function(){this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null}},{key:"_prepareRebufferTrackerState",value:function(e){this._lastCheckedTime=e,this._lastPlayheadTime=this.pm.data.player_playhead_time,this._lastPlayheadTimeUpdatedTime=e}},{key:"_cleanupRebufferTracker",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this._rebuffering)this._rebuffering=!1,this.pm.emit("rebufferend",{viewer_time:t.viewer_time});else{if(null===this._lastCheckedTime)return;var i=this.pm.data.player_playhead_time-this._lastPlayheadTime,r=t.viewer_time-this._lastPlayheadTimeUpdatedTime;"number"==typeof this.pm.minimumRebufferDuration&&i>0&&r-i>this.pm.minimumRebufferDuration&&(this._lastCheckedTime=null,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}),this.pm.emit("rebufferend",{viewer_time:this._lastPlayheadTimeUpdatedTime+r-i}))}n?this._prepareRebufferTrackerState(t.viewer_time):this._clearRebufferTrackerState()}}]),e}(),tY=function(){function e(t){var n=this;tu(this,e),tc(this,"pm",void 0),this.pm=t,t.on("viewinit",function(){var e=t.data,i=e.view_id;if(!e.view_program_changed){var r=function(e,r){var a=r.viewer_time;"playing"===e.type&&void 0===t.data.view_time_to_first_frame?n.calculateTimeToFirstFrame(a||e9(),i):"adplaying"===e.type&&(void 0===t.data.view_time_to_first_frame||n._inPrerollPosition())&&n.calculateTimeToFirstFrame(a||e9(),i)};t.one("playing",r),t.one("adplaying",r),t.one("viewend",function(){t.off("playing",r),t.off("adplaying",r)})}})}return td(e,[{key:"_inPrerollPosition",value:function(){return void 0===this.pm.data.view_content_playback_time||this.pm.data.view_content_playback_time<=1e3}},{key:"calculateTimeToFirstFrame",value:function(e,t){t===this.pm.data.view_id&&(this.pm.watchTimeTracker._updateWatchTime(null,{viewer_time:e}),this.pm.data.view_time_to_first_frame=this.pm.data.view_watch_time,(this.pm.data.player_autoplay_on||this.pm.data.video_is_autoplay)&&this.pm.pageLoadInitTime&&(this.pm.data.view_aggregate_startup_time=this.pm.data.view_start+this.pm.data.view_watch_time-this.pm.pageLoadInitTime))}}]),e}(),tJ=function e(t){var n=this;tu(this,e),tc(this,"_lastPlayerHeight",void 0),tc(this,"_lastPlayerWidth",void 0),tc(this,"_lastPlayheadPosition",void 0),tc(this,"_lastSourceHeight",void 0),tc(this,"_lastSourceWidth",void 0),t.on("viewinit",function(){n._lastPlayheadPosition=-1}),["pause","rebufferstart","seeking","error","adbreakstart","hb","renditionchange","orientationchange","viewend","playbackmodechange"].forEach(function(e){t.on(e,function(){if(n._lastPlayheadPosition>=0&&t.data.player_playhead_time>=0&&n._lastPlayerWidth>=0&&n._lastSourceWidth>0&&n._lastPlayerHeight>=0&&n._lastSourceHeight>0){var e=t.data.player_playhead_time-n._lastPlayheadPosition;if(e<0){n._lastPlayheadPosition=-1;return}var i=Math.min(n._lastPlayerWidth/n._lastSourceWidth,n._lastPlayerHeight/n._lastSourceHeight),r=Math.max(0,i-1),a=Math.max(0,1-i);t.data.view_max_upscale_percentage=Math.max(t.data.view_max_upscale_percentage||0,r),t.data.view_max_downscale_percentage=Math.max(t.data.view_max_downscale_percentage||0,a),tw(t.data,"view_total_content_playback_time",e),tw(t.data,"view_total_upscaling",r*e),tw(t.data,"view_total_downscaling",a*e)}n._lastPlayheadPosition=-1})}),["playing","hb","renditionchange","orientationchange","playbackmodechange"].forEach(function(e){t.on(e,function(){n._lastPlayheadPosition=t.data.player_playhead_time,n._lastPlayerWidth=t.data.player_width,n._lastPlayerHeight=t.data.player_height,n._lastSourceWidth=t.data.video_source_width,n._lastSourceHeight=t.data.video_source_height})})},tQ=function e(t){var n=this;tu(this,e),tc(this,"isSeeking",void 0),this.isSeeking=!1;var i=-1,r=function(){var e=e9(),r=(t.data.viewer_time||e)-(i||e);tw(t.data,"view_seek_duration",r),t.data.view_max_seek_time=Math.max(t.data.view_max_seek_time||0,r),n.isSeeking=!1,i=-1};t.on("seeking",function(e,a){if(Object.assign(t.data,a),n.isSeeking&&a.viewer_time-i<=2e3){i=a.viewer_time;return}n.isSeeking&&r(),n.isSeeking=!0,i=a.viewer_time,tw(t.data,"view_seek_count",1),t.send("seeking")}),t.on("seeked",function(){r()}),t.on("viewend",function(){n.isSeeking&&(r(),t.send("seeked")),n.isSeeking=!1,i=-1})},t$=function(e,t){e.push(t),e.sort(function(e,t){return e.viewer_time-t.viewer_time})},tZ=["adbreakstart","adrequest","adresponse","adplay","adplaying","adpause","adended","adbreakend","aderror","adclicked","adskipped"],t0=function(){function e(t){var n=this;tu(this,e),tc(this,"_adHasPlayed",void 0),tc(this,"_adRequests",void 0),tc(this,"_adResponses",void 0),tc(this,"_currentAdRequestNumber",void 0),tc(this,"_currentAdResponseNumber",void 0),tc(this,"_prerollPlayTime",void 0),tc(this,"_wouldBeNewAdPlay",void 0),tc(this,"isAdBreak",void 0),tc(this,"pm",void 0),this.pm=t,t.on("viewinit",function(){n.isAdBreak=!1,n._currentAdRequestNumber=0,n._currentAdResponseNumber=0,n._adRequests=[],n._adResponses=[],n._adHasPlayed=!1,n._wouldBeNewAdPlay=!0,n._prerollPlayTime=void 0}),tZ.forEach(function(e){return t.on(e,n._updateAdData.bind(n))});var i=function(){n.isAdBreak=!1};t.on("adbreakstart",function(){n.isAdBreak=!0}),t.on("play",i),t.on("playing",i),t.on("viewend",i),t.on("adrequest",function(e,i){i=Object.assign({ad_request_id:"generatedAdRequestId"+n._currentAdRequestNumber++},i),t$(n._adRequests,i),tw(t.data,"view_ad_request_count"),n.inPrerollPosition()&&(t.data.view_preroll_requested=!0,n._adHasPlayed||tw(t.data,"view_preroll_request_count"))}),t.on("adresponse",function(e,i){i=Object.assign({ad_request_id:"generatedAdRequestId"+n._currentAdResponseNumber++},i),t$(n._adResponses,i);var r=n.findAdRequest(i.ad_request_id);r&&tw(t.data,"view_ad_request_time",Math.max(0,i.viewer_time-r.viewer_time))}),t.on("adplay",function(e,i){n._adHasPlayed=!0,n._wouldBeNewAdPlay&&(n._wouldBeNewAdPlay=!1,tw(t.data,"view_ad_played_count")),n.inPrerollPosition()&&
1!t.data.view_preroll_played&&(t.data.view_preroll_played=!0,n._adRequests.length>0&&(t.data.view_preroll_request_time=Math.max(0,i.viewer_time-n._adRequests[0].viewer_time)),t.data.view_start&&(t.data.view_startup_preroll_request_time=Math.max(0,i.viewer_time-t.data.view_start)),n._prerollPlayTime=i.viewer_time)}),t.on("adplaying",function(e,i){n.inPrerollPosition()&&void 0===t.data.view_preroll_load_time&&void 0!==n._prerollPlayTime&&(t.data.view_preroll_load_time=i.viewer_time-n._prerollPlayTime,t.data.view_startup_preroll_load_time=i.viewer_time-n._prerollPlayTime)}),t.on("adclicked",function(e,i){n._wouldBeNewAdPlay||tw(t.data,"view_ad_clicked_count")}),t.on("adskipped",function(e,i){n._wouldBeNewAdPlay||tw(t.data,"view_ad_skipped_count")}),t.on("adended",function(){n._wouldBeNewAdPlay=!0}),t.on("aderror",function(){n._wouldBeNewAdPlay=!0})}return td(e,[{key:"inPrerollPosition",value:function(){return void 0===this.pm.data.view_content_playback_time||this.pm.data.view_content_playback_time<=1e3}},{key:"findAdRequest",value:function(e){for(var t=0;t<this._adRequests.length;t++)if(this._adRequests[t].ad_request_id===e)return this._adRequests[t]}},{key:"_updateAdData",value:function(e,t){if(this.inPrerollPosition()){if(!this.pm.data.view_preroll_ad_tag_hostname&&t.ad_tag_url){var n=e4(tm(t.ad_tag_url),2),i=n[0],r=n[1];this.pm.data.view_preroll_ad_tag_domain=r,this.pm.data.view_preroll_ad_tag_hostname=i}if(!this.pm.data.view_preroll_ad_asset_hostname&&t.ad_asset_url){var a=e4(tm(t.ad_asset_url),2),o=a[0],s=a[1];this.pm.data.view_preroll_ad_asset_domain=s,this.pm.data.view_preroll_ad_asset_hostname=o}this.pm.data.ad_type="preroll"}this.pm.data.ad_asset_url=null==t?void 0:t.ad_asset_url,this.pm.data.ad_tag_url=null==t?void 0:t.ad_tag_url,this.pm.data.ad_creative_id=null==t?void 0:t.ad_creative_id,this.pm.data.ad_id=null==t?void 0:t.ad_id,this.pm.data.ad_universal_id=null==t?void 0:t.ad_universal_id,null!=t&&t.ad_type&&(this.pm.data.ad_type=null==t?void 0:t.ad_type)}}]),e}(),t1=function e(t){var n=this;tu(this,e),tc(this,"lastWallClockTime",void 0);var i=function(){n.lastWallClockTime=e9(),t.on("before*",r)},r=function(e){var i=e9(),r=n.lastWallClockTime;n.lastWallClockTime=i,i-r>3e4&&(t.emit("devicesleep",{viewer_time:r}),Object.assign(t.data,{viewer_time:r}),t.send("devicesleep"),t.emit("devicewake",{viewer_time:i}),Object.assign(t.data,{viewer_time:i}),t.send("devicewake"))};t.one("playbackheartbeat",i),t.on("playbackheartbeatend",function(){t.off("before*",r),t.one("playbackheartbeat",i)})},t2=ej(eU()),t3=(nP=function(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var i in n)t[i]=n[i]}return t},function e(t){function n(e,i,r){var a;if("u">typeof document){if(arguments.length>1){if("number"==typeof(r=nP({path:"/"},n.defaults,r)).expires){var o=new Date;o.setMilliseconds(o.getMilliseconds()+864e5*r.expires),r.expires=o}try{a=JSON.stringify(i),/^[\{\[]/.test(a)&&(i=a)}catch(e){}return i=t.write?t.write(i,e):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[e,"=",i,r.expires?"; expires="+r.expires.toUTCString():"",r.path?"; path="+r.path:"",r.domain?"; domain="+r.domain:"",r.secure?"; secure":""].join("")}e||(a={});for(var s=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,l=0;l<s.length;l++){var d=s[l].split("="),c=d.slice(1).join("=");'"'===c.charAt(0)&&(c=c.slice(1,-1));try{var h=d[0].replace(u,decodeURIComponent);if(c=t.read?t.read(c,h):t(c,h)||c.replace(u,decodeURIComponent),this.json)try{c=JSON.parse(c)}catch(e){}if(e===h){a=c;break}e||(a[h]=c)}catch(e){}}return a}}return n.set=n,n.get=function(e){return n.call(n,e)},n.getJSON=function(){return n.apply({json:!0},[].slice.call(arguments))},n.defaults={},n.remove=function(e,t){n(e,"",nP(t,{expires:-1}))},n.withConverter=e,n}(function(){})),t4="muxData",t5=function(){var e;try{e=(t3.get(t4)||"").split("&").reduce(function(e,t){var n=e4(t.split("="),2),i=n[0],r=n[1],a=+r;return e[i]=r&&a==r?a:r,e},{})}catch(t){e={}}return e},t6=function(e){try{t3.set(t4,Object.entries(e).map(function(e){var t=e4(e,2),n=t[0],i=t[1];return"".concat(n,"=").concat(i)}).join("&"),{expires:365})}catch(e){}},t8=function(){var e=t5();return e.mux_viewer_id=e.mux_viewer_id||e7(),e.msn=e.msn||Math.random(),t6(e),{mux_viewer_id:e.mux_viewer_id,mux_sample_number:e.msn}},t9=function(){var e=t5(),t=e9();return e.session_start&&(e.sst=e.session_start,delete e.session_start),e.session_id&&(e.sid=e.session_id,delete e.session_id),e.session_expires&&(e.sex=e.session_expires,delete e.session_expires),(!e.sex||e.sex<t)&&(e.sid=e7(),e.sst=t),e.sex=t+15e5,t6(e),{session_id:e.sid,session_start:e.sst,session_expires:e.sex}},t7=nt({a:"env",b:"beacon",c:"custom",d:"ad",e:"event",f:"experiment",i:"internal",m:"mux",n:"response",p:"player",q:"request",r:"retry",s:"session",t:"timestamp",u:"viewer",v:"video",w:"page",x:"view",y:"sub"}),ne=nt({ad:"ad",af:"affiliate",ag:"aggregate",ap:"api",al:"application",ao:"audio",ar:"architecture",as:"asset",au:"autoplay",av:"average",bi:"bitrate",bn:"brand",br:"break",bw:"browser",by:"bytes",bz:"business",ca:"cached",cb:"cancel",cc:"codec",cd:"code",cg:"category",ch:"changed",ci:"client",ck:"clicked",cl:"canceled",cm:"cmcd",cn:"config",co:"count",ce:"counter",cp:"complete",cq:"creator",cr:"creative",cs:"captions",ct:"content",cu:"current",cv:"cumulative",cx:"c
1onnection",cz:"context",da:"data",dg:"downscaling",dm:"domain",dn:"cdn",do:"downscale",dr:"drm",dp:"dropped",du:"duration",dv:"device",dy:"dynamic",eb:"enabled",ec:"encoding",ed:"edge",en:"end",eg:"engine",em:"embed",er:"error",ep:"experiments",es:"errorcode",et:"errortext",ee:"event",ev:"events",ex:"expires",ez:"exception",fa:"failed",fi:"first",fm:"family",ft:"format",fp:"fps",fq:"frequency",fr:"frame",fs:"fullscreen",ha:"has",hb:"holdback",he:"headers",ho:"host",hn:"hostname",ht:"height",id:"id",ii:"init",in:"instance",ip:"ip",is:"is",ke:"key",la:"language",lb:"labeled",le:"level",li:"live",ld:"loaded",lo:"load",lw:"low",ls:"lists",lt:"latency",ma:"max",md:"media",me:"message",mf:"manifest",mi:"mime",ml:"midroll",mm:"min",mn:"manufacturer",mo:"model",mp:"mode",ms:"ms",mx:"mux",ne:"newest",nm:"name",no:"number",on:"on",or:"origin",os:"os",pa:"paused",pb:"playback",pd:"producer",pe:"percentage",pf:"played",pg:"program",ph:"playhead",pi:"plugin",pl:"preroll",pn:"playing",po:"poster",pp:"pip",pr:"preload",ps:"position",pt:"part",pv:"previous",py:"property",px:"pop",pz:"plan",ra:"rate",rd:"requested",re:"rebuffer",rf:"rendition",rg:"range",rm:"remote",ro:"ratio",rp:"response",rq:"request",rs:"requests",sa:"sample",sd:"skipped",se:"session",sh:"shift",sk:"seek",sm:"stream",so:"source",sq:"sequence",sr:"series",ss:"status",st:"start",su:"startup",sv:"server",sw:"software",sy:"severity",ta:"tag",tc:"tech",te:"text",tg:"target",th:"throughput",ti:"time",tl:"total",to:"to",tt:"title",ty:"type",ug:"upscaling",un:"universal",up:"upscale",ur:"url",us:"user",va:"variant",vd:"viewed",vi:"video",ve:"version",vw:"view",vr:"viewer",wd:"width",wa:"watch",wt:"waiting"});function nt(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function nn(e){var t={},n={};return Object.keys(e).forEach(function(i){var r=!1;if(e.hasOwnProperty(i)&&void 0!==e[i]){var a=i.split("_"),o=a[0],s=t7[o];s||(tr.info("Data key word `"+a[0]+"` not expected in "+i),s=o+"_"),a.splice(1).forEach(function(e){"url"===e&&(r=!0),ne[e]?s+=ne[e]:Number.isInteger(Number(e))?s+=e:(tr.info("Data key word `"+e+"` not expected in "+i),s+="_"+e+"_")}),r?n[s]=e[i]:t[s]=e[i]}}),Object.assign(t,n)}var ni=ej(eU()),nr=ej(e1()),na={maxBeaconSize:300,maxQueueLength:3600,baseTimeBetweenBeacons:1e4,maxPayloadKBSize:500},no=["hb","requestcompleted","requestfailed","requestcanceled"],ns=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._beaconUrl=e||"https://img.litix.io",this._eventQueue=[],this._postInFlight=!1,this._resendAfterPost=!1,this._failureCount=0,this._sendTimeout=!1,this._options=Object.assign({},na,t)};ns.prototype.queueEvent=function(e,t){var n=Object.assign({},t);return(this._eventQueue.length<=this._options.maxQueueLength||"eventrateexceeded"===e)&&(this._eventQueue.push(n),this._sendTimeout||this._startBeaconSending(),this._eventQueue.length<=this._options.maxQueueLength)},ns.prototype.flushEvents=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&1===this._eventQueue.length?this._eventQueue.pop():(this._eventQueue.length&&this._sendBeaconQueue(),this._startBeaconSending())},ns.prototype.destroy=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.destroyed=!0,e?this._clearBeaconQueue():this.flushEvents(),ni.default.clearTimeout(this._sendTimeout)},ns.prototype._clearBeaconQueue=function(){var e=this._eventQueue.length>this._options.maxBeaconSize?this._eventQueue.length-this._options.maxBeaconSize:0,t=this._eventQueue.slice(e);e>0&&Object.assign(t[t.length-1],nn({mux_view_message:"event queue truncated"}));var n=this._createPayload(t);nl(this._beaconUrl,n,!0,function(){})},ns.prototype._sendBeaconQueue=function(){var e=this;if(this._postInFlight){this._resendAfterPost=!0;return}var t=this._eventQueue.slice(0,this._options.maxBeaconSize);this._eventQueue=this._eventQueue.slice(this._options.maxBeaconSize),this._postInFlight=!0;var n=this._createPayload(t),i=e9();nl(this._beaconUrl,n,!1,function(n,r){r?(e._eventQueue=t.concat(e._eventQueue),e._failureCount+=1,tr.info("Error sending beacon: "+r)):e._failureCount=0,e._roundTripTime=e9()-i,e._postInFlight=!1,e._resendAfterPost&&(e._resendAfterPost=!1,e._eventQueue.length>0&&e._sendBeaconQueue())})},ns.prototype._getNextBeaconTime=function(){if(!this._failureCount)return this._options.baseTimeBetweenBeacons;var e=Math.pow(2,this._failureCount-1);return(1+(e*=Math.random()))*this._options.baseTimeBetweenBeacons},ns.prototype._startBeaconSending=function(){var e=this;ni.default.clearTimeout(this._sendTimeout),this.destroyed||(this._sendTimeout=ni.default.setTimeout(function(){e._eventQueue.length&&e._sendBeaconQueue(),e._startBeaconSending()},this._getNextBeaconTime()))},ns.prototype._createPayload=function(e){var t=this,n={transmission_timestamp:Math.round(e9())};this._roundTripTime&&(n.rtt_ms=Math.round(this._roundTripTime));var i,r,a,o=function(){a=(i=JSON.stringify({metadata:n,events:r||e})).length/1024},s=function(){return a<=t._options.maxPayloadKBSize};return o(),s()||(tr.info("Payload size is too big ("+a+" kb). Removing unnecessary events."),r=e.filter(function(e){return -1===no.indexOf(e.e)}),o()),s()||(tr.info("Payload size still too big ("+a+" kb). Cropping fields.."),r.forEach(function(e){for(var t in e){var n=e[t];"string"==typeof n&&n.length>51200&&(e[t]=n.substring(0,51200))}}),o()),i};var nu="function"==typeof nr.default.exitPictureInPicture?function(e){return e.length<=57344}:function(e){return!1},nl=function(e,t,n,i){if(n&&navigator&&navigator.sendBeacon&&navigator.sendBeacon(e,t))return void i();if(ni.default.fetch)return void ni.default.fetch(e,{method:"POST",body:t,headers:{"Content-Type":"text/plain"},keepalive:nu(t)}).then(function(e){return i(null,e.ok?null:"Error")}).catch(function(e){return i(null,e)});if(ni.default.XMLHttpRequest){var r=new ni.default.XMLHttpRequest;r.onreadystatechange=function(){if(4===r.readyState)return i(null,200!==r.status?"error":void 0)},r.open("POST",e),r.setRequestHeader("Content-Type","text/plain"),r.send(t);return}i()},nd=["env_key","view_id","view_sequence_number","player_sequence_number","beacon_domain","player_playhead_time","viewer_time","mux_api_version","event","video_id","player_instance_id","player_error_code","player_error_message","player_error_context","player_error_severity","player_error_business_exception","view_playing_time_ms_cumulative","ad_playing_time_ms_cumulative"],nc=["adplay","adplaying","adpause","adfirstquartile","admidpoint","adthirdquartile","adended","adresponse","adrequest"],nh=["ad_id","ad_creative_id","ad_universal_id"],np=["viewstart","error","ended","viewend"],nf=function(){function e(t,n){var i,r,a,o,s,u,l,d,c,h,p,f,g,m,v,y,b,w,T,S=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};tu(this,e),tc(this,"mux",void 0),tc(this,"envKey",void 0),tc(this,"options",void 0),tc(this,"eventQueue",void 0),tc(this,"sampleRate",void 0),tc(this,"disableCookies",void 0),tc(this,"respectDoNotTrack",void 0),tc(this,"previousBeaconData",void 0),tc(this,"lastEventTime",void 0),tc(this,"rateLimited",void 0),tc(this,"pageLevelData",void 0),tc(this,"viewerData",void 0),this.mux=t,this.envKey=n,this.options=S,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.eventQueue=new ns((i=this.envKey,a=(r=this.options).beaconCollectionDomain,o=r.beaconDomain,a?(/localhost(?::\d+)?$/.test(a)?"http://":"https://")+a:(i=i||"inferred").match(/^[a-z0-9]+$/)?"https://"+i+"."+(o||"litix.io"):"https://img.litix.io/a.gif")),this.sampleRate=null!=(b=this.options.sampleRate)?b:1,this.disableCookies=null!=(w=this.options.disableCookies)&&w,this.respectDoNotTrack=null!=(T=this.options.respectDoNotTrack)&&T,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.pageLevelData={mux_api_version:this.mux.API_VERSION,mux_embed:this.mux.NAME,mux_embed_version:this.mux.VERSION,viewer_application_name:null==(s=this.options.platform)?void 0:s.name,viewer_application_version:null==(u=this.options.platform)?void 0:u.version,viewer_application_engine:null==(l=this.options.platform)?void 0:l.layout,viewer_device_name:null==(d=this.options.platform)?void 0:d.product,viewer_device_category:"",viewer_device_manufacturer:null==(c=this.options.platform)?void 0:c.manufacturer,viewer_os_family:null==(p=this.options.platform)||null==(h=p.os)?void 0:h.family,viewer_os_architecture:null==(g=this.options.platform)||null==(f=g.os)?void 0:f.architecture,viewer_os_version:null==(v=this.options.platform)||null==(m
1=v.os)?void 0:m.version,page_url:null===t2.default||void 0===t2.default||null==(y=t2.default.location)?void 0:y.href},this.viewerData=this.disableCookies?{}:t8()}return td(e,[{key:"send",value:function(e,t){if(!(!e||!(null!=t&&t.view_id))){if(this.respectDoNotTrack&&to())return tr.info("Not sending `"+e+"` because Do Not Track is enabled");if(!t||"object"!=typeof t)return tr.error("A data object was expected in send() but was not provided");var n=this.disableCookies?{}:t9(),i=tS(tT({},this.pageLevelData,t,n,this.viewerData),{event:e,env_key:this.envKey});i.user_id&&(i.viewer_user_id=i.user_id,delete i.user_id);var r,a=(null!=(r=i.mux_sample_number)?r:0)>=this.sampleRate,o=nn(this._deduplicateBeaconData(e,i));if(this.lastEventTime=this.mux.utils.now(),a)return tr.info("Not sending event due to sample rate restriction",e,i,o);if(this.envKey||tr.info("Missing environment key (envKey) - beacons will be dropped if the video source is not a valid mux video URL",e,i,o),!this.rateLimited)if(tr.info("Sending event",e,i,o),this.rateLimited=!this.eventQueue.queueEvent(e,o),this.mux.WINDOW_UNLOADING&&"viewend"===e)this.eventQueue.destroy(!0);else{if(this.mux.WINDOW_HIDDEN&&"hb"===e)this.eventQueue.flushEvents(!0);else if(np.indexOf(e)>=0){if("error"===e&&"warning"===t.player_error_severity)return;this.eventQueue.flushEvents()}if(this.rateLimited)return i.event="eventrateexceeded",o=nn(i),this.eventQueue.queueEvent(i.event,o),tr.error("Beaconing disabled due to rate limit.")}}}},{key:"destroy",value:function(){this.eventQueue.destroy(!1)}},{key:"_deduplicateBeaconData",value:function(e,t){var n=this,i={},r=t.view_id;if("-1"===r||"viewstart"===e||"viewend"===e||!this.previousBeaconData||this.mux.utils.now()-this.lastEventTime>=6e5)i=tT({},t),r&&(this.previousBeaconData=i),r&&"viewend"===e&&(this.previousBeaconData=null);else{var a=0===e.indexOf("request");Object.entries(t).forEach(function(t){var r=e4(t,2),o=r[0],s=r[1];n.previousBeaconData&&(s!==n.previousBeaconData[o]||nd.indexOf(o)>-1||n.objectHasChanged(a,o,s,n.previousBeaconData[o])||n.eventRequiresKey(e,o))&&(i[o]=s,n.previousBeaconData[o]=s)})}return i}},{key:"objectHasChanged",value:function(e,t,n,i){return!!e&&0===t.indexOf("request_")&&("request_response_headers"===t||"object"!=typeof n||"object"!=typeof i||Object.keys(n||{}).length!==Object.keys(i||{}).length)}},{key:"eventRequiresKey",value:function(e,t){return!!("renditionchange"===e&&0===t.indexOf("video_source_")||nh.includes(t)&&nc.includes(e)||"playbackmodechange"===e&&0===t.indexOf("player_playback_mode"))}}]),e}(),ng=function e(t){tu(this,e);var n=0,i=0,r=0,a=0,o=0,s=0,u=0;t.on("requestcompleted",function(e,s){var u,l,d=s.request_start,c=s.request_response_start,h=s.request_response_end,p=s.request_bytes_loaded;if(a++,c?(u=c-(null!=d?d:0),l=(null!=h?h:0)-c):l=(null!=h?h:0)-(null!=d?d:0),l>0&&p&&p>0){var f=p/l*8e3;o++,i+=p,r+=l,t.data.view_min_request_throughput=Math.min(t.data.view_min_request_throughput||1/0,f),t.data.view_average_request_throughput=i/r*8e3,t.data.view_request_count=a,u>0&&(n+=u,t.data.view_max_request_latency=Math.max(t.data.view_max_request_latency||0,u),t.data.view_average_request_latency=n/o)}}),t.on("requestfailed",function(e,n){a++,s++,t.data.view_request_count=a,t.data.view_request_failed_count=s}),t.on("requestcanceled",function(e,n){a++,u++,t.data.view_request_count=a,t.data.view_request_canceled_count=u})},nm=function e(t){var n=this;tu(this,e),tc(this,"_lastEventTime",void 0),t.on("before*",function(e,i){var r=i.viewer_time,a=e9(),o=n._lastEventTime;if(n._lastEventTime=a,o&&a-o>36e5){var s=Object.keys(t.data).reduce(function(e,n){return 0===n.indexOf("video_")?Object.assign(e,tc({},n,t.data[n])):e},{});t.mux.log.info("Received event after at least an hour inactivity, creating a new view");var u=t.playbackHeartbeat._playheadShouldBeProgressing;t._resetView(Object.assign({viewer_time:r},s)),t.playbackHeartbeat._playheadShouldBeProgressing=u,t.playbackHeartbeat._playheadShouldBeProgressing&&"play"!==e.type&&"adbreakstart"!==e.type&&(t.emit("play",{viewer_time:r}),"playing"!==e.type&&t.emit("playing",{viewer_time:r}))}})};function nv(e,t){return(null==e?void 0:e.toLowerCase())===(null==t?void 0:t.toLowerCase())}var ny=function e(t){tu(this,e);var n=function(e){var n,i,r,s=null!=(n=e)&&n.request_type&&("media"===n.request_type||"video"===n.request_type)&&null!=(i=n.request_response_headers)&&i["x-cdn"]?n.request_response_headers["x-cdn"]:null!=n&&n.video_cdn?n.video_cdn:null,u=null!=(r=e)&&r.request_start?r.request_start:null!=r&&r.viewer_time?r.viewer_time:Date.now();null!=s&&!nv(s,a)&&o<=u&&(a=s,o=u,t.emit("cdnchange",{video_cdn:s}))},i=null,r=null,a=null,o=0;t.on("viewinit",function(){i=null,r=null,a=null,o=0}),t.on("beforecdnchange",function(e,t){var n=null==t?void 0:t.video_cdn;n&&(void 0===t.video_previous_cdn||null===t.video_previous_cdn)&&(nv(n,r)?t.video_previous_cdn=null!=i?i:void 0:(t.video_previous_cdn=null!=r?r:void 0,i=r,r=n))}),t.on("requestcompleted",function(e,t){n(t)})},nb=function(e){try{return JSON.parse(e),!0}catch(e){return!1}},n_=function e(t){var n=this;tu(this,e),tc(this,"_emittingAutomaticEvent",!1),tc(this,"_hasInitialized",!1),tc(this,"_currentMode","standard"),t.on("viewstart",function(){n._hasInitialized||(n._hasInitialized=!0,n._currentMode=t.data.player_playback_mode||"standard",n._emittingAutomaticEvent=!0,t.emit("playbackmodechange",{player_playback_mode:n._currentMode,player_playback_mode_data:"{}"}),n._emittingAutomaticEvent=!1)}),t.on("viewend",function(){n._hasInitialized=!1}),t.on("playbackmodechange",function(e,i){n._emittingAutomaticEvent||(i.player_playback_mode_data?nb(i.player_playback_mode_data)||(t.mux.log.warn("Invalid JSON string for player_playback_mode_data"),i.player_playback_mode_data="{}"):i.player_playback_mode_data="{}",t.data.player_playback_mode_data=i.player_playback_mode_data,t.data.player_playback_mode=i.player_playback_mode,n._currentMode=i.player_playback_mode)})},nw=function(){function e(t){tu(this,e),tc(this,"pm",void 0),tc(this,"_currentRangeStart",void 0),tc(this,"_lastPlayheadTime",void 0),this.pm=t,this._currentRangeStart=null,this._lastPlayheadTime=null,t.on("playbackheartbeat",this._updatePlaybackRange.bind(this)),t.on("playbackheartbeatend",this._endPlaybackRange.bind(this))}return td(e,[{key:"_updateLastRangeEnd",value:function(){var e=this.pm.data.video_playback_ranges;if(e&&e.length>0){var t=this.pm.data.player_playhead_time||0;e[e.length-1][1]=t}}},{key:"_updatePlaybackRange",value:function(){var e,t=this.pm.data.player_playhead_time||0;if(!(!this.pm.disableAdPlaybackRangeFiltering&&null!=(e=this.pm.adTracker)&&e.isAdBreak&&null!==this._lastPlayheadTime&&t<this._lastPlayheadTime)){if(null!==this._lastPlayheadTime&&null!==this._currentRangeStart&&Math.abs(t-this._lastPlayheadTime)>1e3){var n=this.pm.data.video_playback_ranges;n&&n.length>0&&(n[n.length-1][1]=this._lastPlayheadTime),this._currentRangeStart=null}if(null===this._currentRangeStart){var i=this.pm.data.video_playback_ranges||[];i.length>0&&i[i.length-1][1]===t?this._currentRangeStart=i[i.length-1][0]:(this._currentRangeStart=t,i.push([t,t])),this.pm.data.video_playback_ranges=i}else this._updateLastRangeEnd();this._lastPlayheadTime=t}}},{key:"_endPlaybackRange",value:function(){null!==this._currentRangeStart&&(this._updateLastRangeEnd(),this._currentRangeStart=null,this._lastPlayheadTime=null)}}]),e}(),nT=Object.freeze({CELLULAR:"cellular",WIFI:"wifi",WIRED:"wired",OTHER:"other",NO_CONNECTION:"no_connection",UNKNOWN:"unknown"}),nS=function(e){if(!e)return nT.UNKNOWN;switch(e){case"cellular":case"wimax":return nT.CELLULAR;case"wifi":return nT.WIFI;case"ethernet":return nT.WIRED;case"none":return nT.NO_CONNECTION;case"bluetooth":case"other":default:return nT.OTHER;case"unknown":return nT.UNKNOWN}},nx=ej(eU()),nA=function(){function e(t){var n=this;tu(this,e),tc(this,"pm",void 0),tc(this,"lastType",void 0),tc(this,"lastLowDataMode",void 0),this.pm=t,this.pm.one("viewinit",function(){var t,i=n.emit.bind(n);i(),nx.default.addEventListener("online",i),nx.default.addEventListener("offline",i),null==(t=e.connection)||t.addEventListener("change",i
1),n.pm.on("destroy",function(){var t;null==(t=e.connection)||t.removeEventListener("change",i),nx.default.removeEventListener("online",i),nx.default.removeEventListener("offline",i)})})}return td(e,[{key:"type",get:function(){var t,n;return(null==(t=nx.default.navigator)?void 0:t.onLine)===!1?nT.NO_CONNECTION:null!=(n=e.connection)&&n.type?nS(e.connection.type):nT.UNKNOWN}},{key:"lowDataMode",get:function(){var t;return null==(t=e.connection)?void 0:t.saveData}},{key:"emit",value:function(){var e=this.type,t=this.lowDataMode;e===this.lastType&&t===this.lastLowDataMode||(this.lastType=e,this.lastLowDataMode=t,this.pm.emit("networkchange",tT({viewer_connection_type:e},void 0!==t&&{viewer_connection_low_data_mode:t})))}}],[{key:"connection",get:function(){var e;return"object"==typeof(e=nx.default.navigator)&&"connection"in e&&"object"==typeof e.connection?nx.default.navigator.connection:null}}]),e}(),nE=["viewstart","ended","loadstart","pause","play","playing","ratechange","waiting","adplay","adpause","adended","aderror","adplaying","adrequest","adresponse","adbreakstart","adbreakend","adfirstquartile","admidpoint","adthirdquartile","rebufferstart","rebufferend","seeked","error","hb","requestcompleted","requestfailed","requestcanceled","renditionchange","networkchange","cdnchange","playbackmodechange"],nk=new Set(["requestcompleted","requestfailed","requestcanceled"]),nI=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),e&&tf(i,e);var t,n=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=th(i);return e=t?Reflect.construct(n,arguments,th(this).constructor):n.apply(this,arguments),e&&("object"===eV(e)||"function"==typeof e)?e:ts(this)});function i(e,t,r){tu(this,i),tc(ts(a=n.call(this)),"pageLoadEndTime",void 0),tc(ts(a),"pageLoadInitTime",void 0),tc(ts(a),"_destroyed",void 0),tc(ts(a),"_heartBeatTimeout",void 0),tc(ts(a),"adTracker",void 0),tc(ts(a),"dashjs",void 0),tc(ts(a),"data",void 0),tc(ts(a),"disablePlayheadRebufferTracking",void 0),tc(ts(a),"disableRebufferTracking",void 0),tc(ts(a),"disableAdPlaybackRangeFiltering",void 0),tc(ts(a),"errorTracker",void 0),tc(ts(a),"errorTranslator",void 0),tc(ts(a),"emitTranslator",void 0),tc(ts(a),"getAdData",void 0),tc(ts(a),"getPlayheadTime",void 0),tc(ts(a),"getStateData",void 0),tc(ts(a),"stateDataTranslator",void 0),tc(ts(a),"hlsjs",void 0),tc(ts(a),"id",void 0),tc(ts(a),"longResumeTracker",void 0),tc(ts(a),"minimumRebufferDuration",void 0),tc(ts(a),"mux",void 0),tc(ts(a),"playbackEventDispatcher",void 0),tc(ts(a),"playbackHeartbeat",void 0),tc(ts(a),"playbackHeartbeatTime",void 0),tc(ts(a),"playheadTime",void 0),tc(ts(a),"seekingTracker",void 0),tc(ts(a),"sustainedRebufferThreshold",void 0),tc(ts(a),"watchTimeTracker",void 0),tc(ts(a),"currentFragmentPDT",void 0),tc(ts(a),"currentFragmentStart",void 0),a.pageLoadInitTime=t_(),a.pageLoadEndTime=tb(),a.mux=e,a.id=t,null!=r&&r.beaconDomain&&a.mux.log.warn("The `beaconDomain` setting has been deprecated in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."),(r=Object.assign({debug:!1,minimumRebufferDuration:250,sustainedRebufferThreshold:1e3,playbackHeartbeatTime:25,beaconDomain:"litix.io",sampleRate:1,disableCookies:!1,respectDoNotTrack:!1,disableRebufferTracking:!1,disablePlayheadRebufferTracking:!1,disableAdPlaybackRangeFiltering:!1,errorTranslator:function(e){return e},emitTranslator:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t},stateDataTranslator:function(e){return e}},r)).data=r.data||{},r.data.property_key&&(r.data.env_key=r.data.property_key,delete r.data.property_key),tr.level=r.debug?1:3,a.getPlayheadTime=r.getPlayheadTime,a.getStateData=r.getStateData||function(){return{}},a.getAdData=r.getAdData||function(){},a.minimumRebufferDuration=r.minimumRebufferDuration,a.sustainedRebufferThreshold=r.sustainedRebufferThreshold,a.playbackHeartbeatTime=r.playbackHeartbeatTime,a.disableRebufferTracking=r.disableRebufferTracking,a.disableRebufferTracking&&a.mux.log.warn("Disabling rebuffer tracking. This should only be used in specific circumstances as a last resort when your player is known to unreliably track rebuffering."),a.disablePlayheadRebufferTracking=r.disablePlayheadRebufferTracking,a.disableAdPlaybackRangeFiltering=r.disableAdPlaybackRangeFiltering,a.errorTranslator=r.errorTranslator,a.emitTranslator=r.emitTranslator,a.stateDataTranslator=r.stateDataTranslator,a.playbackEventDispatcher=new nf(e,r.data.env_key,r),a.data={player_instance_id:e7(),mux_sample_rate:r.sampleRate,beacon_domain:r.beaconCollectionDomain||r.beaconDomain},a.data.view_sequence_number=1,a.data.player_sequence_number=1;var a,o=(function(){void 0===this.data.view_start&&(this.data.view_start=this.mux.utils.now(),this.emit
1("viewstart"),this.emit("renditionchange"))}).bind(ts(a));if(a.on("viewinit",function(e,t){this._resetVideoData(),this._resetViewData(),this._resetErrorData(),this._updateStateData(),Object.assign(this.data,t),this._initializeViewData(),this.one("play",o),this.one("adbreakstart",o)}),a.on("videochange",function(e,t){this._resetView(t)}),a.on("programchange",function(e,t){this.data.player_is_paused&&this.mux.log.warn("The `programchange` event is intended to be used when the content changes mid playback without the video source changing, however the video is not currently playing. If the video source is changing please use the videochange event otherwise you will lose startup time information."),this._resetView(Object.assign(t,{view_program_changed:!0})),o(),this.emit("play"),this.emit("playing")}),a.on("fragmentchange",function(e,t){this.currentFragmentPDT=t.currentFragmentPDT,this.currentFragmentStart=t.currentFragmentStart}),a.on("destroy",a.destroy),"u">typeof window&&"function"==typeof window.addEventListener&&"function"==typeof window.removeEventListener){var s=function(){var e=void 0!==a.data.view_start;a.mux.WINDOW_HIDDEN="hidden"===document.visibilityState,e&&a.mux.WINDOW_HIDDEN&&(a.data.player_is_paused||a.emit("hb"))};window.addEventListener("visibilitychange",s,!1);var u=function(e){e.persisted||a.destroy()};window.addEventListener("pagehide",u,!1),a.on("destroy",function(){window.removeEventListener("visibilitychange",s),window.removeEventListener("pagehide",u)})}return a.on("playerready",function(e,t){Object.assign(this.data,t)}),nE.forEach(function(e){a.on(e,function(t,n){0!==e.indexOf("ad")&&this._updateStateData(),Object.assign(this.data,n),this._sanitizeData()}),a.on("after"+e,function(){("error"!==e||this.errorTracker.viewErrored)&&this.send(e)})}),a.on("viewend",function(e,t){Object.assign(a.data,t)}),a.one("playerready",function(e){var t=this.mux.utils.now();this.data.player_init_time&&(this.data.player_startup_time=t-this.data.player_init_time),this.pageLoadInitTime=this.data.page_load_init_time||this.pageLoadInitTime,this.pageLoadEndTime=this.data.page_load_end_time||this.pageLoadEndTime,!this.mux.PLAYER_TRACKED&&this.pageLoadInitTime&&(this.mux.PLAYER_TRACKED=!0,(this.data.player_init_time||this.pageLoadEndTime)&&(this.data.page_load_time=Math.min(this.data.player_init_time||1/0,this.pageLoadEndTime||1/0)-this.pageLoadInitTime)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time}),a.longResumeTracker=new nm(ts(a)),a.errorTracker=new tq(ts(a)),new t1(ts(a)),a.seekingTracker=new tQ(ts(a)),a.playheadTime=new tW(ts(a)),a.playbackHeartbeat=new tH(ts(a)),new tJ(ts(a)),a.watchTimeTracker=new tG(ts(a)),new tK(ts(a)),new nw(ts(a)),a.adTracker=new t0(ts(a)),new tX(ts(a)),new tz(ts(a)),new tY(ts(a)),new ng(ts(a)),new ny(ts(a)),new n_(ts(a)),new nA(ts(a)),r.hlsjs&&a.addHLSJS(r),r.dashjs&&a.addDashJS(r),a.emit("viewinit",r.data),a}return td(i,[{key:"emit",value:function(e,t){var n,r=Object.assign({viewer_time:this.mux.utils.now()},t),a=[e,r];if(this.emitTranslator)try{a=this.emitTranslator(e,r)}catch(e){this.mux.log.warn("Exception in emit translator callback.",e)}null!=a&&a.length&&(n=tp(th(i.prototype),"emit",this)).call.apply(n,[this].concat(ti(a)))}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,void 0!==this.data.view_start&&(this.emit
1("viewend"),this.send("viewend")),this.playbackEventDispatcher.destroy(),this.removeHLSJS(),this.removeDashJS(),window.clearTimeout(this._heartBeatTimeout))}},{key:"send",value:function(e){if(this.data.view_id){var t=Object.assign({},this.data);if(void 0===t.video_source_is_live&&(t.player_source_duration===1/0||t.video_source_duration===1/0?t.video_source_is_live=!0:(t.player_source_duration>0||t.video_source_duration>0)&&(t.video_source_is_live=!1)),t.video_source_is_live||["player_program_time","player_manifest_newest_program_time","player_live_edge_program_time","player_program_time","video_holdback","video_part_holdback","video_target_duration","video_part_target_duration"].forEach(function(e){t[e]=void 0}),t.video_source_url=t.video_source_url||t.player_source_url,t.video_source_url){var n=e4(tm(t.video_source_url),2),i=n[0];t.video_source_domain=n[1],t.video_source_hostname=i}delete t.ad_request_id,t.video_playback_ranges&&(t.video_playback_range=JSON.stringify(t.video_playback_ranges.filter(function(e){return e[0]!==e[1]}).map(function(e){return"".concat(e[0],":").concat(e[1])})),delete t.video_playback_ranges),this.playbackEventDispatcher.send(e,t),this.data.view_sequence_number++,this.data.player_sequence_number++,nk.has(e)||this._restartHeartBeat(),"viewend"===e&&delete this.data.view_id}}},{key:"_resetView",value:function(e){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",e)}},{key:"_updateStateData",value:function(){var e,t=this.getStateData();if("function"==typeof this.stateDataTranslator)try{t=this.stateDataTranslator(t)}catch(e){this.mux.log.warn("Exception in stateDataTranslator translator callback.",e)}null!=(e=this.data)&&e.video_cdn&&null!=t&&t.video_cdn&&(t.video_cdn,t=function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(t,["video_cdn"])),Object.assign(this.data,t),this.playheadTime._updatePlayheadTime(),this._sanitizeData()}},{key:"_sanitizeData",value:function(){var e=this;["player_width","player_height","video_source_width","video_source_height","player_playhead_time","video_source_bitrate"].forEach(function(t){var n=parseInt(e.data[t],10);e.data[t]=isNaN(n)?void 0:n}),["player_source_url","video_source_url"].forEach(function(t){if(e.data[t]){var n=e.data[t].toLowerCase();(0===n.indexOf("data:")||0===n.indexOf("blob:"))&&(e.data[t]="MSE style URL")}})}},{key:"_resetVideoData",value:function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("video_")&&delete e.data[t]})}},{key:"_resetViewData",value:function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("view_")&&delete e.data[t]}),this.data.view_sequence_number=1}},{key:"_resetErrorData",value:function(){delete this.data.player_error_code,delete this.data.player_error_message,delete this.data.player_error_context,delete this.data.player_error_severity,delete this.data.player_error_business_exception}},{key:"_initializeViewData",value:function(){var e=this,t=this.data.view_id=e7(),n=function(){t===e.data.view_id&&tw(e.data,"player_view_count",1)};this.data.player_is_paused?this.one("play",n):n()}},{key:"_restartHeartBeat",value:function(){var e=this;window.clearTimeout(this._heartBeatTimeout),this._heartBeatTimeout=window.setTimeout(function(){e.data.player_is_paused||e.emit("hb")},1e4)}},{key:"addHLSJS",value:function(e){e.hlsjs?this.hlsjs?this.mux.log.warn("An instance of HLS.js is already being monitored for this player."):(this.hlsjs=e.hlsjs,tP(this.mux,this.id,e.hlsjs,{},e.Hls||window.Hls)):this.mux.log.warn("You must pass a valid hlsjs instance in order to track it.")}},{key:"removeHLSJS",value:function(){this.hlsjs&&(tD(this.hlsjs),this.hlsjs=void 0)}},{key:"addDashJS",value:function(e){e.dashjs?this.dashjs?this.mux.log.warn("An instance of Dash.js is already being monitored for this player."):(this.dashjs=e.dashjs,tj(this.mux,this.id,e.dashjs)):this.mux.log.warn("You must pass a valid dashjs instance in order to track it.")}},{key:"removeDashJS",value:function(){this.dashjs&&(tU(this.dashjs),this.dashjs=void 0)}}]),i}(tF),nC=ej(e1());function nM(){return nC.default&&!!(nC.default.fullscreenElement||nC.default.webkitFullscreenElement||nC.default.mozFullScreenElement||nC.default.msFullscreenElement)}var nP,nD,nR=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],nL={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"},nO=ej(eU());nO.default&&nO.default.WeakMap&&(nD=new WeakMap);var nN=function(e){return this.buffer="",this.manifest={segments:[],serverControl:{},sessionData:{}},this.currentUri={},this.process(e),this.manifest};nN.prototype.process=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.processLine(this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}
1,nN.prototype.processLine=function(e){var t=e.indexOf(":"),n=nq(e,t),i=n[0],r=2===n.length?nB(n[1]):void 0;if("#"!==i[0])this.currentUri.uri=i,this.manifest.segments.push(this.currentUri),!this.manifest.targetDuration||"duration"in this.currentUri||(this.currentUri.duration=this.manifest.targetDuration),this.currentUri={};else switch(i){case"#EXT-X-TARGETDURATION":if(!isFinite(r)||r<0)return;this.manifest.targetDuration=r,this.setHoldBack();break;case"#EXT-X-PART-INF":nj(this.manifest,n),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break;case"#EXT-X-SERVER-CONTROL":nj(this.manifest,n),this.setHoldBack();break;case"#EXTINF":0===r?this.currentUri.duration=.01:r>0&&(this.currentUri.duration=r);break;case"#EXT-X-PROGRAM-DATE-TIME":var a=new Date(r);this.manifest.dateTimeString||(this.manifest.dateTimeString=r,this.manifest.dateTimeObject=a),this.currentUri.dateTimeString=r,this.currentUri.dateTimeObject=a;break;case"#EXT-X-VERSION":nj(this.manifest,n);break;case"#EXT-X-SESSION-DATA":var o=tI(nG(n[1]));Object.assign(this.manifest.sessionData,o)}},nN.prototype.setHoldBack=function(){var e=this.manifest,t=e.serverControl,n=e.targetDuration,i=e.partTargetDuration;if(t){var r="holdBack",a="partHoldBack",o=n&&3*n,s=i&&2*i;n&&!t.hasOwnProperty(r)&&(t[r]=o),o&&t[r]<o&&(t[r]=o),i&&!t.hasOwnProperty(a)&&(t[a]=3*i),i&&t[a]<s&&(t[a]=s)}};var nj=function(e,t){var n,i=nU(t[0].replace("#EXT-X-",""));nH(t[1])?(n={},n=Object.assign(nV(t[1]),n)):n=nB(t[1]),e[i]=n},nU=function(e){return e.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})},nB=function(e){if("yes"===e.toLowerCase()||"no"===e.toLowerCase())return"yes"===e.toLowerCase();var t=-1!==e.indexOf(":")?e:parseFloat(e);return isNaN(t)?e:t},nF=function(e){var t={},n=e.split("=");return n.length>1&&(t[nU(n[0])]=nB(n[1])),t},nV=function(e){for(var t=e.split(","),n={},i=0;t.length>i;i++)n=Object.assign(nF(t[i]),n);return n},nH=function(e){return e.indexOf("=")>-1},nq=function(e,t){return -1===t?[e]:[e.substring(0,t),e.substring(t+1)]},nG=function(e){var t={};if(e){var n=e.search(",");return[e.slice(0,n),e.slice(n+1)].forEach(function(e,n){for(var i=e.replace(/['"]+/g,"").split("="),r=0;r<i.length;r++)"DATA-ID"===i[r]&&(t["DATA-ID"]=i[1-r]),"VALUE"===i[r]&&(t.VALUE=i[1-r])}),{data:t}}},nK={safeCall:function(e,t,n,i){var r=i;if(e&&"function"==typeof e[t])try{r=e[t].apply(e,n)}catch(e){tr.info("safeCall error",e)}return r},safeIncrement:tw,getComputedStyle:function(e,t){var n;return e&&t&&nO.default&&"function"==typeof nO.default.getComputedStyle?(nD&&nD.has(e)&&(n=nD.get(e)),n||(n=nO.default.getComputedStyle(e,null),nD&&nD.set(e,n)),n.getPropertyValue(t)):""},secondsToMs:function(e){return Math.floor(1e3*e)},assign:Object.assign,headersStringToObject:tE,cdnHeadersToRequestId:tk,extractHostnameAndDomain:tm,extractHostname:tg,manifestParser:nN,generateShortID:te,generateUUID:e7,now:e9,findMediaElement:tn},nW={},nz=function(e){var t=arguments;"string"==typeof e?nz.hasOwnProperty(e)?e5.default.setTimeout(function(){t=Array.prototype.splice.call(t,1),nz[e].apply(null,t)},0):tr.warn("`"+e+"` is an unknown task"):"function"==typeof e?e5.default.setTimeout(function(){e(nz)},0):tr.warn("`"+e+"` is invalid.")},nX={loaded:e9(),NAME:"mux-embed",VERSION:"5.18.1",API_VERSION:"2.1",PLAYER_TRACKED:!1,monitor:function(e,t){return function(e,t,n){var i=e4(tn(t),3),r=i[0],a=i[1],o=i[2],s=e.log,u=e.utils.getComputedStyle,l=e.utils.secondsToMs;if(!r)return s.error("No element was found with the `"+a+"` query selector.");if("video"!==o&&"audio"!==o)return s.error("The element of `"+a+"` was not a media element.");r.mux&&(r.mux.destroy(),delete r.mux,s.warn("Already monitoring this video element, replacing existing event listeners")),(n=Object.assign({automaticErrorTracking:!0},n,{getPlayheadTime:function(){return l(r.currentTime)},getStateData:function(){var e,t,n=(null==(e=this.getPlayheadTime)?void 0:e.call(this))||l(r.currentTime),i=this.hlsjs&&this.hlsjs.url,a=this.dashjs&&"function"==typeof this.dashjs.getSource&&this.dashjs.getSource(),o={player_is_paused:r.paused,player_width:parseInt(u(r,"width")),player_height:parseInt(u(r,"height")),player_autoplay_on:r.autoplay,player_preload_on:r.preload,player_language_code:r.lang,player_is_fullscreen:nM(),video_poster_url:r.poster,video_source_url:i||a||r.currentSrc,video_source_duration:l(r.duration),video_source_height:r.videoHeight,video_source_width:r.videoWidth,view_dropped_frame_count:null==r||null==(t=r.getVideoPlaybackQuality)?void 0:t.call(r).droppedVideoFrames};if(r.getStartDate&&n>0){var s=r.getStartDate();if(s&&"function"==typeof s.getTime&&s.getTime()){var d=s.getTime();o.player_program_time=d+n,r.seekable.length>0&&(o.player_live_edge_program_time=d+r.seekable.end(r.seekable.length-1))}}return o}})).data=Object.assign({player_software:"HTML5 Video Element",player_mux_plugin_name:"VideoElementMonitor",player_mux_plugin_version:e.VERSION},n.data),r.mux=r.mux||{},r.mux.deleted=!1,r.mux.emit=function(t,n){e.emit(a,t,n)},r.mux.updateData=function(e){r.mux.emit("hb",e)};var d=function(){s.error("The monitor for this video element has already been destroyed.")};
1r.mux.destroy=function(){Object.keys(r.mux.listeners).forEach(function(e){r.removeEventListener(e,r.mux.listeners[e],!1)}),delete r.mux.listeners,r.mux.fullscreenChangeListener&&(document.removeEventListener("fullscreenchange",r.mux.fullscreenChangeListener,!1),delete r.mux.fullscreenChangeListener),r.mux.destroy=d,r.mux.swapElement=d,r.mux.emit=d,r.mux.addHLSJS=d,r.mux.addDashJS=d,r.mux.removeHLSJS=d,r.mux.removeDashJS=d,r.mux.updateData=d,r.mux.setEmitTranslator=d,r.mux.setStateDataTranslator=d,r.mux.setGetPlayheadTime=d,r.mux.deleted=!0,e.emit(a,"destroy")},r.mux.swapElement=function(t){var n=e4(tn(t),3),i=n[0],a=n[1],o=n[2];return i?"video"!==o&&"audio"!==o?e.log.error("The element of `"+a+"` was not a media element."):void(i.muxId=r.muxId,delete r.muxId,i.mux=i.mux||{},i.mux.listeners=Object.assign({},r.mux.listeners),delete r.mux.listeners,Object.keys(i.mux.listeners).forEach(function(e){r.removeEventListener(e,i.mux.listeners[e],!1),i.addEventListener(e,i.mux.listeners[e],!1)}),i.mux.fullscreenChangeListener=r.mux.fullscreenChangeListener,delete r.mux.fullscreenChangeListener,i.mux.swapElement=r.mux.swapElement,i.mux.destroy=r.mux.destroy,delete r.mux,r=i):e.log.error("No element was found with the `"+a+"` query selector.")},r.mux.addHLSJS=function(t){e.addHLSJS(a,t)},r.mux.addDashJS=function(t){e.addDashJS(a,t)},r.mux.removeHLSJS=function(){e.removeHLSJS(a)},r.mux.removeDashJS=function(){e.removeDashJS(a)},r.mux.setEmitTranslator=function(t){e.setEmitTranslator(a,t)},r.mux.setStateDataTranslator=function(t){e.setStateDataTranslator(a,t)},r.mux.setGetPlayheadTime=function(t){t||(t=n.getPlayheadTime),e.setGetPlayheadTime(a,t)},e.init(a,n),e.emit(a,"playerready"),r.paused||(e.emit(a,"play"),r.readyState>2&&e.emit(a,"playing")),r.mux.listeners={},nR.forEach(function(t){("error"!==t||n.automaticErrorTracking)&&(r.mux.listeners[t]=function(){var n={};if("error"===t){if(!r.error||1===r.error.code)return;n.player_error_code=r.error.code,n.player_error_message=nL[r.error.code]||r.error.message}e.emit(a,t,n)},r.addEventListener(t,r.mux.listeners[t],!1))}),r.mux.listeners.enterpictureinpicture=function(){e.emit(a,"playbackmodechange",{player_playback_mode:"pip",player_playback_mode_data:"{}"})},r.mux.listeners.leavepictureinpicture=function(){var t=nM()?"fullscreen":"standard";e.emit(a,"playbackmodechange",{player_playback_mode:t,player_playback_mode_data:"{}"})},r.addEventListener("enterpictureinpicture",r.mux.listeners.enterpictureinpicture,!1),r.addEventListener("leavepictureinpicture",r.mux.listeners.leavepictureinpicture,!1),r.mux.fullscreenChangeListener=function(){var t=nM(),n=document.fullscreenElement;if(t&&(n===r||null!=n&&n.contains(r)))e.emit(a,"playbackmodechange",{player_playback_mode:"fullscreen",player_playback_mode_data:"{}"});else if(!t){var i=document.pictureInPictureElement===r;e.emit(a,"playbackmodechange",{player_playback_mode:i?"pip":"standard",player_playback_mode_data:"{}"})}},document.addEventListener("fullscreenchange",r.mux.fullscreenChangeListener,!1)}(nz,e,t)},destroyMonitor:function(e){var t=e4(tn(e),1)[0];t&&t.mux&&"function"==typeof t.mux.destroy?t.mux.destroy():tr.error("A video element monitor for `"+e+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(e,t){var n=tt(e);nW[n]?nW[n].addHLSJS(t):tr.error("A monitor for `"+n+"` has not been initialized.")},addDashJS:function(e,t){var n=tt(e);nW[n]?nW[n].addDashJS(t):tr.error("A monitor for `"+n+"` has not been initialized.")},removeHLSJS:function(e){var t=tt(e);nW[t]?nW[t].removeHLSJS():tr.error("A monitor for `"+t+"` has not been initialized.")},removeDashJS:function(e){var t=tt(e);nW[t]?nW[t].removeDashJS():tr.error("A monitor for `"+t+"` has not been initialized.")},init:function(e,t){to()&&t&&t.respectDoNotTrack&&tr.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var n=tt(e);nW[n]=new nI(nz,n,t)},emit:function(e,t,n){var i=tt(e);nW[i]?(nW[i].emit(t,n),"destroy"===t&&delete nW[i]):tr.error("A monitor for `"+i+"` has not been initialized.")},updateData:function(e,t){var n=tt(e);nW[n]?nW[n].emit("hb",t):tr.error("A monitor for `"+n+"` has not been initialized.")},setEmitTranslator:function(e,t){var n=tt(e);nW[n]?nW[n].emitTranslator=t:tr.error("A monitor for `"+n+"` has not been initialized.")},setStateDataTranslator:function(e,t){var n=tt(e);nW[n]?nW[n].stateDataTranslator=t:tr.error("A monitor for `"+n+"` has not been initialized.")},setGetPlayheadTime:function(e,t){var n=tt(e);nW[n]?nW[n].getPlayheadTime=t:tr.error("A monitor for `"+n+"` has not been initialized.")},checkDoNotTrack:to,log:tr,utils:nK,events:{PLAYER_READY:"playerready",VIEW_INIT:"viewinit",VIDEO_CHANGE:"videochange",PLAY:"play",PAUSE:"pause",PLAYING:"playing",TIME_UPDATE:"timeupdate",SEEKING:"seeking",SEEKED:"seeked",REBUFFER_START:"rebufferstart",REBUFFER_END:"rebufferend",ERROR:"error",ENDED:"ended",RENDITION_CHANGE:"renditionchange",ORIENTATION_CHANGE:"orientationchange",PLAYBACK_MODE_CHANGE:"playbackmodechange",NETWORK_CHANGE:"networkchange",AD_REQUEST:"adrequest",AD_RESPONSE:"adresponse",AD_BREAK_START:"adbreakstart",AD_PLAY:"adplay",AD_PLAYING:"adplaying",AD_PAUSE:"adpause",AD_FIRST_QUARTILE:"adfirstquartile",AD_MID_POINT:"admidpoint",AD_THIRD_QUARTILE:"adthirdquartile",AD_ENDED:"adended",AD_BREAK_END:"adbreakend",AD_ERROR:"aderror",REQUEST_COMPLETED:"requestcompleted",REQUEST_FAILED:"requestfailed",REQUEST_CANCELLED:"requestcanceled",HEARTBEAT:"hb",DESTROY:"destroy"},WINDOW_HIDDEN:!1,WINDOW_UNLOADING:!1};Object.assign(nz,nX),void 0!==e5.default&&"function"==typeof e5.default.addEventListener&&e5.default.addEventListener("pagehide",function(e){e.persisted||(nz.WINDOW_UNLOADING=!0)},!1);var nY=Object.create,nJ=Object.defineProperty,nQ=Object.getOwnPropertyDescriptor,n$=Object.getOwnPropertyNames,nZ=Object.getPrototypeOf,n0=Object.prototype.hasOwnProperty,n1=(e,t,n,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var r,a=n$(t),o=0,s=a.length;o<s;o++)r=a[o],n0.call(e,r)||r===n||nJ(e,r,{get:(e=>t[e]).bind(null,r),enumerable:!(i=nQ(t,r))||i.enumerable});return e};let n2={Error:"error",Warning:"warning",Network:"network",LoadStatusChange:"loadstatuschange",PlayheadStateChange:"playheadstatechange",TimesChange:"timeschange",Started:"started",SeekingChange:"seekingchange",AdBreakStarted:"adbreakstarted",AdBreakEnded:"adbreakended",AdStarted:"adstarted",AdEnded:"adended",PauseAdStarted:"pauseadstarted",PauseAdEnded:"pauseadended",VolumeChange:"volumechange",VideoQualitiesChange:"videoqualitiesc
1hange",TextTracksChange:"texttrackschange",TextTrackStyleChange:"texttrackstylechange",AudioTracksChange:"audiotrackschange",BroadcastChange:"broadcastchange",AutoVideoQualityChange:"autovideoqualitychange",LiveEdgeChange:"liveedgechange",MarkerChange:"markerchange",ChapterChange:"chapterchange",BufferingChange:"bufferingchange",StatsChange:"statschange",UiIntent:"uiintent"},n3=Symbol.for("uiEventHandlers");var n4=class{emit(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.emitter_.emit(e,...n),this.emitter_.emit("*",e);let r=this[n3];if(r.size)for(let t of r)t(e)}constructor(){(0,L._)(this,"emitter_",new N.default),(0,L._)(this,"addEventListener",(e,t)=>{this.emitter_.on(e,t)}),(0,L._)(this,"removeEventListener",(e,t)=>{this.emitter_.off(e,t)}),(0,L._)(this,n3,new Set)}},n5=(t=t=>{var n="u">typeof window?window:e.g,i={};if((function(e,t,n){var i,r,a,o,s,u,l,d,c,h,p,f="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t},g="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e},m=function(n){n=["object"==typeof globalThis&&globalThis,n,"object"==typeof e&&e,"object"==typeof self&&self,"object"==typeof t&&t];for(var i=0;i<n.length;++i){var r=n[i];if(r&&r.Math==Math)return r}throw Error("Cannot find global object")}(this);function v(e,t){if(t)e:{var n=m;e=e.split(".");for(var i=0;i<e.length-1;i++){var r=e[i];if(!(r in n))break e;n=n[r]}(t=t(i=n[e=e[e.length-1]]))!=i&&null!=t&&g(n,e,{configurable:!0,writable:!0,value:t})}}if("function"==typeof Object.setPrototypeOf)i=Object.setPrototypeOf;else{e:{var y={};try{y.__proto__={a:!0},r=y.a;break e}catch(e){}r=!1}i=r?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw TypeError(e+" is not extensible");return e}:null}var b=i;function w(e,t){if(e.prototype=f(t.prototype),e.prototype.constructor=e,b)b(e,t);else for(var n in t)if("prototype"!=n)if(Object.defineProperties){var i=Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(e,n,i)}else e[n]=t[n];e.Hm=t.prototype}function T(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}function S(e){var t="u">typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if("number"==typeof e.length)return{next:T(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function x(e){if(!(e instanceof Array)){e=S(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}function A(e){if(!(e instanceof Object))throw TypeError("Iterator result "+e+" is not an object")}function E(){this.J=!1,this.H=null,this.i=void 0,this.h=1,this.F=this.I=0,this.M=this.C=null}function k(e){if(e.J)throw TypeError("Generator is already running");e.J=!0}function I(e,t){e.C={Yh:t,ni:!0},e.h=e.I||e.F}function C(e){for(var t in this.i=e,this.g=[],e)this.g.push(t);this.g.reverse()}function M(e){this.g=new E,this.h=e}function P(e,t,n,i){try{var r=t.call(e.g.H,n);if(A(r),!r.done)return e.g.J=!1,r;var a=r.value}catch(t){return e.g.H=null,I(e.g,t),D(e)}return e.g.H=null,i.call(e.g,a),D(e)}function D(e){for(;e.g.h;)try{var t=e.h(e.g);if(t)return e.g.J=!1,{value:t.value,done:!1}}catch(t){e.g.i=void 0,I(e.g,t)}if(e.g.J=!1,e.g.C){if(t=e.g.C,e.g.C=null,t.ni)throw t.Yh;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function R(e){this.next=function(t){return k(e.g),e.g.H?t=P(e,e.g.H.next,t,e.g.K):(e.g.K(t),t=D(e)),t},this.throw=function(t){return k(e.g),e.g.H?t=P(e,e.g.H.throw,t,e.g.K):(I(e.g,t),t=D(e)),t},this.return=function(t){var n;return k(e.g),(n=e.g.H)?P(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),D(e))},this[Symbol.iterator]=function(){return this}}function L(e){var t=new R(new M(e));function n(e){return t.next(e)}function i(e){return t.throw(e)}return new Promise(function(e,r){!function t(a){a.done?e(a.value):Promise.resolve(a.value).then(n,i).then(t,r)}(t.next())})}function O(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}function N(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function j(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function U(e,t){e instanceof String&&(e+="");var n=0,i=!1,r={next:function(){if(!i&&n<e.length){var r=n++;return{value:t(r,e[r]),done:!1}}return i=!0,{done:!0,value:void 0}}};return r[Symbol.iterator]=function(){return r},r}function B(e,t,n){if(null==e)throw TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}function F(e,t,n){e instanceof String&&(e=String(e));for(var i=e.length,r=0;r<i;r++){var a=e[r];if(t.call(n,a,r,e))return{ji:r,v:a}}return{ji:-1,v:void 0}}E.prototype.K=function(e){this.i=e},E.prototype.getNextAddressJsc=function(){return this.h},E.prototype.getYieldResultJsc=function(){return this.i},E.prototype.return=function(e){this.C={return:e},this.h=this.F},E.prototype.return=E.prototype.return,E.prototype.O=function(e){this.C={A:e},this.h=this.F},E.prototype.jumpThroughFinallyBlocks=E.prototype.O,E.prototype.g=function(e,t){return this.h=t,{value:e}},E.prototype.yield=E.prototype.g,E.prototype.P=function(e,t){var n=(e=S(e)).next();if(A(n),!n.done)return this.H=e,this.g(n.value,t);this.i=n.value,this.h=t},E.prototype.yieldAll=E.prototype.P,E.prototype.A=function(e){this.h=e},E.prototype.jumpTo=E.prototype.A,E.prototype.j=function(){this.h=0},E.prototype.jumpToEnd=E.prototype.j,E.prototype.m=function(e,t){this.I=e,void 0!=t&&(this.F=t)},E.prototype.setCatchFinallyBlocks=E.prototype.m,E.prototype.D=function(e){this.I=0,this.F=e||0},E.prototype.setFinallyBlock=E.prototype.D,E.prototype.o=function(e,t){this.h=e,this.I=t||0},E.prototype.leaveTryBlock=E.prototype.o,E.prototype.l=function(e){return this.I=e||0,e=this.C.Yh,this.C=null,e},E.prototype.enterCatchBlock=E.prototype.l,E.prototype.u=function(e,t,n){n?this.M[n]=this.C:this.M=[this.C],this.I=e||0,this.F=t||0},E.prototype.enterFinallyBlock=E.prototype.u,E.prototype.B=function(e,t){t=this.M.splice(t||0)[0],(t=this.C=this.C||t)?t.ni?this.h=this.I||this.F:void 0!=t.A&&this.F<t.A?(this.h=t.A,this.C=null):this.h=this.F:this.h=e},E.prototype.leaveFinallyBlock=E.prototype.B,E.prototype.N=function(e){return new C(e)},E.prototype.forIn=E.prototype.N,C.prototype.h=function(){for(;this.g.length>0;){var e=this.g.pop();if(e in this.i)return e}return null},C.prototype.getNext=C.prototype.h,v("Symbol",function(e){function t(e,t){this.g=e,g(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.g};var n="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",i=0;return function e(r){if(this instanceof e)throw TypeError("Symbol is not a constructor");return new t(n+(r||"")+"_"+i++,r)}}),v("Symbol.iterator",function(e){return e||g(Array.prototype,e=Symbol("Symbol.iterator"),{configurable:!0,writable:!0,value:function(){return N(T(this))}}),e}),v("Promise",function(e){function t(e){this.h=0,this.i=void 0,this.g=[],this.o=!1;var t=this.j();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function n(){this.g=null}function i(e){return e instanceof t?e:new t(function(t){t(e)})}if(e)return e;n.prototype.h=function(e){if(null==this.g){this.g=[];var t=this;this.i(function(){t.l()})}this.g.push(e)};var r=m.setTimeout;n.prototype.i=function(e){r(e,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(e){this.j(e)}}}this.g=null},n.prototype.j=function(e){this.i(function(){throw e})},t.prototype.j=function(){function e(e){return function(i){n||(n=!0,e.call(t,i))}}var t=this,n=!1;return{resolve:e(this.F),reject:e(this.l)}},t.prototype.F=function(e){if(e===this)this.l(TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.I(e);else{switch(typeof e){case"object":var n=null!=e;break;case"function":n=!0;break;default:n=!1}n?this.D(e):this.m(e)}},t.prototype.D=function(e){var t=void 0;try{t=e.then}catch(e){this.l(e);return}"function"==typeof t?this.J(t,e):this.m(e)},t.prototype.l=function(e){this.u(2,e)},t.prototype.m=function(e){this.u(1,e)},t.prototype.u=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.i=t,2===this.h&&this.H(),this.B()},t.prototype.H=function(){var e=this;r(function(){if(e.C()){var t=m.console;void 0!==t&&t.error(e.i)}},1)},t.prototype.C=function(){if(this.o)return!1;var e=m.CustomEvent,t=m.Event,n=m.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=m.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,n(e))},t.prototype.B=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)a.h(this.g[e]);this.g=null}};var a=new n;return t.prototype.I=function(e){var t=this.j();e.Ie(t.resolve,t.reject)},t.prototype.J=function(e,t){var n=this.j();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},t.prototype.then=function(e,n){function i(e,t){return"function"==typeof e?function(t){try{r(e(t))}catch(e){a(e)}}:t}var r,a,o=new t(function(e,t){r=e,a=t});return this.Ie(i(e,r),i(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.Ie=function(e,t){function n(){switch(i.h){case 1:e(i.i);break;case 2:t(i.i);break;default:throw Error("Unexpected state: "+i.h)}}var i=this;null==this.g?a.h(n):this.g.push(n),this.o=!0},t.resolve=i,t.reject=function(e){return new t(function(t,n){n(e)})},t.race=function(e){return new t(function(t,n){for(var r=S(e),a=r.next();!a.done;a=r.next())i(a.value).Ie(t,n)})},t.all=function(e){var n=S(e),r=n.next();return r.done?i([]):new t(function(e,t){var a=[],o=0;do a.push(void 0),o++,i(r.value).Ie(function(t){return function(n){a[t]=n,0==--o&&e(a)}}(a.length-1),t),r=n.next();while(!r.done)})},t}),v("WeakMap",function(e){function t(e){if(this.g=(s+=Math.random()+1).toString(),e){e=S(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function n(){}function i(e){var t=typeof e;return"object"===t&&null!==e||"function"===t}function r(e){j(e,o)||g(e,o,{value:new n})}function a(e){var t=Object[e];t&&(Object[e]=function(e){return e instanceof n?e:(Object.isExtensible(e)&&r(e),t(e))})}if(function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}
1),n=Object.seal({}),i=new e([[t,2],[n,3]]);if(2!=i.get(t)||3!=i.get(n))return!1;return i.delete(t),i.set(n,4),!i.has(t)&&4==i.get(n)}catch(e){return!1}}())return e;var o="$jscomp_hidden_"+Math.random();a("freeze"),a("preventExtensions"),a("seal");var s=0;return t.prototype.set=function(e,t){if(!i(e))throw Error("Invalid WeakMap key");if(r(e),!j(e,o))throw Error("WeakMap key fail: "+e);return e[o][this.g]=t,this},t.prototype.get=function(e){return i(e)&&j(e,o)?e[o][this.g]:void 0},t.prototype.has=function(e){return i(e)&&j(e,o)&&j(e[o],this.g)},t.prototype.delete=function(e){return!!(i(e)&&j(e,o)&&j(e[o],this.g))&&delete e[o][this.g]},t}),v("Map",function(e){function t(){var e={};return e.rc=e.next=e.head=e}function n(e,t){var n=e[1];return N(function(){if(n){for(;n.head!=e[1];)n=n.rc;for(;n.next!=n.head;)return{done:!1,value:t(n=n.next)};n=null}return{done:!0,value:void 0}})}function i(e,t){var n=t&&typeof t;"object"==n||"function"==n?a.has(t)?n=a.get(t):(n=""+ ++o,a.set(t,n)):n="p_"+t;var i=e[0][n];if(i&&j(e[0],n))for(e=0;e<i.length;e++){var r=i[e];if(t!=t&&r.key!=r.key||t===r.key)return{id:n,list:i,index:e,entry:r}}return{id:n,list:i,index:-1,entry:void 0}}function r(e){if(this[0]={},this[1]=t(),this.size=0,e){e=S(e);for(var n;!(n=e.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(S([[t,"s"]]));if("s"!=n.get(t)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var i=n.entries(),r=i.next();if(r.done||r.value[0]!=t||"s"!=r.value[1])return!1;return!(r=i.next()).done&&4==r.value[0].x&&"t"==r.value[1]&&!!i.next().done}catch(e){return!1}}())return e;var a=new WeakMap;r.prototype.set=function(e,t){var n=i(this,e=0===e?0:e);return n.list||(n.list=this[0][n.id]=[]),n.entry?n.entry.value=t:(n.entry={next:this[1],rc:this[1].rc,head:this[1],key:e,value:t},n.list.push(n.entry),this[1].rc.next=n.entry,this[1].rc=n.entry,this.size++),this},r.prototype.delete=function(e){return!!(e=i(this,e)).entry&&!!e.list&&(e.list.splice(e.index,1),e.list.length||delete this[0][e.id],e.entry.rc.next=e.entry.next,e.entry.next.rc=e.entry.rc,e.entry.head=null,this.size--,!0)},r.prototype.clear=function(){this[0]={},this[1]=this[1].rc=t(),this.size=0},r.prototype.has=function(e){return!!i(this,e).entry},r.prototype.get=function(e){return(e=i(this,e).entry)&&e.value},r.prototype.entries=function(){return n(this,function(e){return[e.key,e.value]})},r.prototype.keys=function(){return n(this,function(e){return e.key})},r.prototype.values=function(){return n(this,function(e){return e.value})},r.prototype.forEach=function(e,t){for(var n,i=this.entries();!(n=i.next()).done;)n=n.value,e.call(t,n[1],n[0],this)},r.prototype[Symbol.iterator]=r.prototype.entries;var o=0;return r}),v("Set",function(e){function t(e){if(this.g=new Map,e){e=S(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.g.size}return!function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(S([t]));if(!n.has(t)||1!=n.size||n.add(t)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var i=n.entries(),r=i.next();if(r.done||r.value[0]!=t||r.value[1]!=t)return!1;return!(r=i.next()).done&&r.value[0]!=t&&4==r.value[0].x&&r.value[1]==r.value[0]&&i.next().done}catch(e){return!1}}()?(t.prototype.add=function(e){return e=0===e?0:e,this.g.set(e,e),this.size=this.g.size,this},t.prototype.delete=function(e){return e=this.g.delete(e),this.size=this.g.size,e},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(e){return this.g.has(e)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(e,t){var n=this;this.g.forEach(function(i){return e.call(t,i,i,n)})},t):e}),v("Array.prototype.values",function(e){return e||function(){return U(this,function(e,t){return t})}}),v("Array.from",function(e){return e||function(e,t,n){t=null!=t?t:function(e){return e};var i=[],r="u">typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if("function"==typeof r){e=r.call(e);for(var a=0;!(r=e.next()).done;)i.push(t.call(n,r.value,a++))}else for(r=e.length,a=0;a<r;a++)i.push(t.call(n,e[a],a));return i}}),v("Array.prototype.keys",function(e){return e||function(){return U(this,function(e){return e})}}),v("Object.is",function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}}),v("Array.prototype.includes",function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var i=n.length;for((t=t||0)<0&&(t=Math.max(t+i,0));t<i;t++){var r=n[t];if(r===e||Object.is(r,e))return!0}return!1}}),v("String.prototype.includes",function(e){return e||function(e,t){return -1!==B(this,e,"includes").indexOf(e,t||0)}}),v("String.fromCodePoint",function(e){return e||function(e){for(var t="",n=0;n<arguments.length;n++){var i=Number(arguments[n]);if(i<0||i>1114111||i!==Math.floor(i))throw RangeError("invalid_code_point "+i);i<=65535?t+=String.fromCharCode(i):(i-=65536,t+=String.fromCharCode(i>>>10&1023|55296),t+=String.fromCharCode(1023&i|56320))}return t}}),v("Array.prototype.findIndex",function(e){return e||function(e,t){return F(this,e,t).ji}}),v("WeakSet",function(e){function t(e){if(this.g=new WeakMap,e){e=S(e);for(var t;!(t=e.next()).done;)this.add(t.value)}}return!function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}
1),n=Object.seal({}),i=new e([t]);if(!i.has(t)||i.has(n))return!1;return i.delete(t),i.add(n),!i.has(t)&&i.has(n)}catch(e){return!1}}()?(t.prototype.add=function(e){return this.g.set(e,!0),this},t.prototype.has=function(e){return this.g.has(e)},t.prototype.delete=function(e){return this.g.delete(e)},t):e}),v("Array.prototype.find",function(e){return e||function(e,t){return F(this,e,t).v}}),v("String.prototype.startsWith",function(e){return e||function(e,t){var n=B(this,e,"startsWith"),i=n.length,r=e.length;t=Math.max(0,Math.min(0|t,n.length));for(var a=0;a<r&&t<i;)if(n[t++]!=e[a++])return!1;return a>=r}}),v("Object.entries",function(e){return e||function(e){var t,n=[];for(t in e)j(e,t)&&n.push([t,e[t]]);return n}});var V="function"==typeof Object.assign?Object.assign:function(e,t){if(null==e)throw TypeError("No nullish arg");e=Object(e);for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i)for(var r in i)j(i,r)&&(e[r]=i[r])}return e};v("Object.assign",function(e){return e||V}),v("Promise.prototype.finally",function(e){return e||function(e){return this.then(function(t){return Promise.resolve(e()).then(function(){return t})},function(t){return Promise.resolve(e()).then(function(){throw t})})}}),v("Array.prototype.entries",function(e){return e||function(){return U(this,function(e,t){return[e,t]})}}),v("Number.EPSILON",function(){return 2220446049250313e-31}),v("Number.MAX_SAFE_INTEGER",function(){return 0x1fffffffffffff}),v("Math.clz32",function(e){return e||function(e){if(0==(e=Number(e)>>>0))return 32;var t=0;return 0xffff0000&e||(e<<=16,t+=16),0xff000000&e||(e<<=8,t+=8),0xf0000000&e||(e<<=4,t+=4),0xc0000000&e||(e<<=2,t+=2),!(0x80000000&e)&&t++,t}}),v("Number.isNaN",function(e){return e||function(e){return"number"==typeof e&&isNaN(e)}}),v("String.prototype.repeat",function(e){return e||function(e){var t=B(this,null,"repeat");if(e<0||e>0x4fffffff)throw RangeError("Invalid count value");e|=0;for(var n="";e;)1&e&&(n+=t),(e>>>=1)&&(t+=t);return n}}),v("Number.isFinite",function(e){return e||function(e){return"number"==typeof e&&!isNaN(e)&&e!==1/0&&e!==-1/0}}),v("Object.values",function(e){return e||function(e){var t,n=[];for(t in e)j(e,t)&&n.push(e[t]);return n}}),v("Math.log2",function(e){return e||function(e){return Math.log(e)/Math.LN2}}),v("String.prototype.endsWith",function(e){return e||function(e,t){var n=B(this,e,"endsWith");void 0===t&&(t=n.length),t=Math.max(0,Math.min(0|t,n.length));for(var i=e.length;i>0&&t>0;)if(n[--t]!=e[--i])return!1;return i<=0}}),v("Math.trunc",function(e){return e||function(e){if(isNaN(e=Number(e))||e===1/0||e===-1/0||0===e)return e;var t=Math.floor(Math.abs(e));return e<0?-t:t}});var H=this||self;function q(e,t){e=e.split(".");var n,i=H;for((e[0]in i)||void 0===i.execScript||i.execScript("var "+e[0]);e.length&&(n=e.shift());)e.length||void 0===t?i=i[n]&&i[n]!==Object.prototype[n]?i[n]:i[n]={}:i[n]=t}function G(e){this.i=Math.log(.5),this.g=Math.exp(this.i/e),this.j=this.h=0}function K(e){return e.h/(1-Math.pow(e.g,e.j))}function W(){this.h=new G(2),this.j=new G(5),this.g=0,this.i=128e3,this.l=16e3}function z(){}function X(){}function Y(){}function J(e){var t=O.apply(1,arguments);$.has(e)||($.add(e),Y.apply(z,x(t)))}function Q(){}G.prototype.sample=function(e,t){var n=Math.pow(this.g,e);isNaN(t=t*(1-n)+n*this.h)||(this.h=t,this.j+=e)},W.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes;var t=this.h;t.g=Math.exp(t.i/e.fastHalfLife),(t=this.j).g=Math.exp(t.i/e.slowHalfLife)},W.prototype.sample=function(e,t){if(!(t<this.l)){var n=8e3*t/e;e/=1e3,this.g+=t,this.h.sample(e,n),this.j.sample(e,n)}},W.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(K(this.h),K(this.j))};var $=new Set;function Z(){this.g=new Map}function ee(){this.g=new Z}function et(e,t,n,i){this.target=e,this.type=t,this.listener=n,this.g=function(e,t){if(void 0==t)return!1;if("boolean"==typeof t)return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter(function(e){return!n.has(e)}),!function(e){var t=en;if(void 0==t){t=!1;try{var n={},i={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",i),Object.defineProperty(n,"capture",i),i=function(){},e.addEventListener("test",i,n),e.removeEventListener("test",i,n)}catch(e){t=!1}en=t}return t||!1}(e)?t.capture||!1:t}(e,i),this.target.addEventListener(t,n,this.g)}e.console&&(Y=function(){return console.warn.apply(console,x(O.apply(0,arguments)))},X=function(){console.error.apply(console,x(O.apply(0,arguments)))}),(p=Z.prototype).push=function(e,t){this.g.has(e)?this.g.get(e).push(t):this.g.set(e,[t])},p.get=function(e){return this.g.has(e)?this.g.get(e).slice():null},p.remove=function(e,t){if(this.g.has(e)){var n=this.g.get(e).filter(function(e){return e!=t});this.g.set(e,n),n.length||this.g.delete(e)}},p.forEach=function(e){this.g.forEach(function(t,n){e(n,t)})},p.size=function(){return this.g.size},p.keys=function(){return Array.from(this.g.keys())},(p=ee.prototype).release=function(){this.Ua(),this.g=null},p.G=function(e,t,n,i){this.g&&(e=new et(e,t,n,i),this.g.push(t,e))},p.Ba=function(e,t,n,i){var r=this;this.G(e,t,function i(a){r.Na(e,t,i),n(a)},i)},p.Na=function(e,t,n){if(this.g){var i=this.g.get(t)||[];i=S(i);for(var r=i.next();!r.done;r=i.next())(r=r.value).target!=e||n!=r.listener&&n||(r.Na(),this.g.remove(t,r))}},p.Ua=function(){if(this.g){for(var e=[],t=S(this.g.g.values()),n=t.next();!n.done;n=t.next())e.push.apply(e,x(n.value));for(t=(e=S(e)).next();!t.done;t=e.next())t.value.Na();this.g.g.clear()}},q("shaka.util.EventManager",ee),ee.prototype.removeAll=ee.prototype.Ua,ee.prototype.unlisten=ee.prototype.Na,ee.prototype.listenOnce=ee.prototype.Ba,ee.prototype.listen=ee.prototype.G,ee.prototype.release=ee.prototype.release,et.prototype.Na=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var en=void 0;function ei(e){this.h=e,this.g=void 0}
1function er(){return es.value()}q("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3}),ei.prototype.value=function(){return void 0===this.g&&(this.g=this.h()),this.g};var ea=null,eo=null,es=new ei(function(){var e=void 0;return ea&&(e=ea()),!e&&eo&&(e=eo()),e});function eu(e,t){this.g=e,this.h=t}function el(e,t){var n=new eu(5,0),i=eh,r=i.g,a=n.h-r.h;((n.g-r.g||a)>0?i.i:i.h)(i.g,n,e,t)}function ed(e,t,n,i){Y([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function ec(e,t,n,i){X([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(" "))}eu.prototype.toString=function(){return"v"+this.g+"."+this.h};var eh=null,ep=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function ef(e){var t;e instanceof ef?(eg(this,e.bc),this.Zc=e.Zc,em(this,e.Ab),ev(this,e.td),this.Zb=e.Zb,ey(this,e.g.clone()),this.Mc=e.Mc):e&&(t=String(e).match(ep))?(eg(this,t[1]||"",!0),this.Zc=eb(t[2]||""),em(this,t[3]||"",!0),ev(this,t[4]),this.Zb=eb(t[5]||"",!0),ey(this,t[6]||"",!0),this.Mc=eb(t[7]||"")):this.g=new ek(null)}function eg(e,t,n){e.bc=n?eb(t,!0):t,e.bc&&(e.bc=e.bc.replace(/:$/,""))}function em(e,t,n){e.Ab=n?eb(t,!0):t}function ev(e,t){if(t){if(isNaN(t=Number(t))||t<0)throw Error("Bad port number "+t);e.td=t}else e.td=null}function ey(e,t,n){t instanceof ek?e.g=t:(n||(t=e_(t,eA)),e.g=new ek(t))}function eb(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function e_(e,t,n){return null!=e?(e=encodeURI(e).replace(t,ew),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function ew(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(p=ef.prototype).bc="",p.Zc="",p.Ab="",p.td=null,p.Zb="",p.Mc="",p.toString=function(){var e=[],t=this.bc;if(t&&e.push(e_(t,eT,!0),":"),t=this.Ab){e.push("//");var n=this.Zc;n&&e.push(e_(n,eT,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.td)&&e.push(":",String(t))}return(t=this.Zb)&&(this.Ab&&"/"!=t.charAt(0)&&e.push("/"),e.push(e_(t,"/"==t.charAt(0)?ex:eS,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.Mc)&&e.push("#",e_(t,eE)),e.join("")},p.resolve=function(e){var t=this.clone();"data"===t.bc&&(t=new ef);var n=!!e.bc;n?eg(t,e.bc):n=!!e.Zc,n?t.Zc=e.Zc:n=!!e.Ab,n?em(t,e.Ab):n=null!=e.td;var i=e.Zb;if(n)ev(t,e.td);else if(n=!!e.Zb){if("/"!=i.charAt(0))if(this.Ab&&!this.Zb)i="/"+i;else{var r=t.Zb.lastIndexOf("/");-1!=r&&(i=t.Zb.substr(0,r+1)+i)}if(".."==i||"."==i)i="";else if(-1!=i.indexOf("./")||-1!=i.indexOf("/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var a=[],o=0;o<i.length;){var s=i[o++];"."==s?r&&o==i.length&&a.push(""):".."==s?((a.length>1||1==a.length&&""!=a[0])&&a.pop(),r&&o==i.length&&a.push("")):(a.push(s),r=!0)}i=a.join("/")}}return n?t.Zb=i:n=""!==e.g.toString(),n?ey(t,e.g.clone()):n=!!e.Mc,n&&(t.Mc=e.Mc),t},p.clone=function(){return new ef(this)};var eT=/[#\/\?@]/g,eS=/[#\?:]/g,ex=/[#\?]/g,eA=/[#\?@]/g,eE=/#/g;function ek(e){this.g=e||null}function eI(e){if(!e.gb&&(e.gb=new Map,e.Od=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var i=t[n].indexOf("="),r=null;if(i>=0){var a=t[n].substring(0,i);r=t[n].substring(i+1)}else a=t[n];a=decodeURIComponent(a),r=r||"",e.add(a,decodeURIComponent(r))}}function eC(){}function eM(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if((ArrayBuffer.isView(e)?e.buffer:e)==(ArrayBuffer.isView(t)?t.buffer:t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=eD(e);t=eD(t);for(var i=0;i<e.byteLength;i++)if(n[i]!=t[i])return!1;return!0}function eP(e){return ArrayBuffer.isView(e)?0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer:e}function eD(e,t,n){return eO(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint8Array)}function eR(e,t,n){return eO(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint16Array)}
1function eL(e,t,n){return eO(e,void 0===t?0:t,n=void 0===n?1/0:n,DataView)}function eO(e,t,n,i){var r=ArrayBuffer.isView(e)?e.buffer:e,a=1;"BYTES_PER_ELEMENT"in i&&(a=i.BYTES_PER_ELEMENT);var o=((e.byteOffset||0)+e.byteLength)/a;return new i(r,e=Math.floor(Math.max(0,Math.min(((e.byteOffset||0)+t)/a,o))),Math.floor(Math.min(e+Math.max(n,0),o))-e)}function eN(e,t,n){var i=O.apply(3,arguments);this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1,this.message="Shaka Error "+this.code;try{throw Error(this.message||"Shaka Error")}catch(e){this.stack=e.stack}}function ej(){}function eU(t){if(!t)return"";if(239==(t=eD(t))[0]&&187==t[1]&&191==t[2]&&(t=t.subarray(3)),e.TextDecoder&&!er().uh())return(t=new TextDecoder().decode(t)).includes("�")&&X('Decoded string contains an "unknown character" codepoint.  That probably means the UTF8 encoding was incorrect!'),t;for(var n="",i=0;i<t.length;++i){var r=65533;if((128&t[i])==0?r=t[i]:t.length>=i+2&&(224&t[i])==192&&(192&t[i+1])==128?(r=(31&t[i])<<6|63&t[i+1],i+=1):t.length>=i+3&&(240&t[i])==224&&(192&t[i+1])==128&&(192&t[i+2])==128?(r=(15&t[i])<<12|(63&t[i+1])<<6|63&t[i+2],i+=2):t.length>=i+4&&(241&t[i])==240&&(192&t[i+1])==128&&(192&t[i+2])==128&&(192&t[i+3])==128&&(r=(7&t[i])<<18|(63&t[i+1])<<12|(63&t[i+2])<<6|63&t[i+3],i+=3),r<=65535)n+=String.fromCharCode(r);else{var a=1023&(r-=65536);n+=String.fromCharCode(55296+(r>>10)),n+=String.fromCharCode(56320+a)}}return n}function eB(e,t,n){if(!e)return"";if(!n&&e.byteLength%2!=0)throw new eN(2,2,2004);var i=new Uint16Array(n=Math.floor(e.byteLength/2));e=eL(e);for(var r=0;r<n;r++)i[r]=e.getUint16(2*r,t);return eG.value()(i)}function eF(e){function t(e){return n.byteLength<=e||n[e]>=9&&n[e]<=126}if(!e)return"";var n=eD(e);if(239==n[0]&&187==n[1]&&191==n[2])return eU(n);if(254==n[0]&&255==n[1])return eB(n.subarray(2),!1);if(255==n[0]&&254==n[1])return eB(n.subarray(2),!0);if(0==n[0]&&0==n[2])return eB(e,!1);if(0==n[1]&&0==n[3])return eB(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return eU(e);throw new eN(2,2,2003)}function eV(t){if(e.TextEncoder&&!er().uh()){var n=new TextEncoder;return eP(n.encode(t))}n=new Uint8Array((t=unescape(t=encodeURIComponent(t))).length);for(var i=0;i<t.length;i++)n[i]=t[i].charCodeAt(0);return eP(n)}function eH(e,t){for(var n=new ArrayBuffer(2*e.length),i=new DataView(n),r=0;r<e.length;++r)i.setUint16(2*r,e.charCodeAt(r),t);return n}function eq(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":" ","&lrm;":"‎","&rlm;":"‏"},n=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(e){return"#"==e[1]?(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10))>=0&&e<=1114111?String.fromCodePoint(e):"":t[e]||"'"}):e||""}(p=ek.prototype).gb=null,p.Od=null,p.add=function(e,t){eI(this),this.g=null;var n=this.gb.has(e)?this.gb.get(e):null;return n||this.gb.set(e,n=[]),n.push(t),this.Od++,this},p.set=function(e,t){return eI(this),this.g=null,this.gb.has(e)?this.gb.set(e,[t]):this.add(e,t),this},p.get=function(e){return eI(this),this.gb.get(e)||[]},p.toString=function(){if(this.g)return this.g;if(!this.gb||!this.gb.size)return"";for(var e=[],t=S(this.gb.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=encodeURIComponent(i),i=this.gb.get(i);for(var r=0;r<i.length;r++){var a=n;""!==i[r]&&(a+="="+encodeURIComponent(i[r])),e.push(a)}}return this.g=e.join("&")},p.clone=function(){var e=new ek;if(e.g=this.g,this.gb){for(var t=new Map,n=S(this.gb),i=n.next();!i.done;i=n.next()){var r=S(i.value);i=r.next().value,r=r.next().value,t.set(i,r.concat())}e.gb=t,e.Od=this.Od}return e},q("shaka.util.BufferUtils",eC),eC.toDataView=eL,eC.toUint16=eR,eC.toUint8=eD,eC.toArrayBuffer=eP,eC.equal=eM,eN.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")},q("shaka.util.Error",eN),eN.Severity={RECOVERABLE:1,CRITICAL:2},eN.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},eN.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVA
1LID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,CANNOT_ADD_EXTERNAL_CHAPTERS_TO_LIVE_STREAM:4055,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,PRELOAD_DESTROYED:7006,QUEUE_INDEX_OUT_OF_BOUNDS:7007,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1e4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007},q("shaka.util.StringUtils",ej),ej.resetFromCharCode=function(){eG.g=void 0},ej.toUTF16=eH,ej.toUTF8=eV,ej.fromBytesAutoDetect=eF,ej.fromUTF16=eB,ej.fromUTF8=eU;var eG=new ei(function(){for(var e={Hc:65536};e.Hc>0;e={Hc:e.Hc},e.Hc/=2)if(function(e){try{var t=new Uint8Array(e);return String.fromCharCode.apply(null,t).length>0}catch(e){return!1}}(e.Hc))return function(e){return function(t){for(var n="",i=0;i<t.length;i+=e.Hc)n+=String.fromCharCode.apply(null,t.subarray(i,i+e.Hc));return n}}(e);return null});function eK(){}function eW(e){return e=eD(e),Uint8Array.prototype.toBase64?e.toBase64({alphabet:"base64",omitPadding:!1}):btoa(e=eG.value()(e))}function ez(e,t){return t=void 0==t||t,Uint8Array.prototype.toBase64?eD(e).toBase64({alphabet:"base64url",omitPadding:!t}):(e=eW(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,""))}function eX(t){if(!("fromBase64"in Uint8Array)){t=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));for(var n=new Uint8Array(t.length),i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}
1return t=t.replace(/\s+/g,""),Uint8Array.fromBase64(t,{alphabet:/[-_]/.test(t)?"base64url":"base64"})}function eY(t){if(!("fromHex"in Uint8Array)){for(var n=t.length/2,i=new Uint8Array(n),r=0;r<n;r++)i[r]=e.parseInt(t.substr(2*r,2),16);return i}return Uint8Array.fromHex(t)}function eJ(e){var t=eD(e);if(!Uint8Array.prototype.toHex){e="",t=S(t);for(var n=t.next();!n.done;n=t.next())1==(n=(n=n.value).toString(16)).length&&(n="0"+n),e+=n;return e}return t.toHex()}function eQ(){var e=O.apply(0,arguments);return e$(e,0,e.length)}function e$(e,t,n){t=void 0===t?0:t,n=void 0===n?e.length:n;for(var i=0,r=t;r<n;++r)i+=e[r].byteLength;for(i=new Uint8Array(i),r=0;t<n;++t){var a=e[t];ArrayBuffer.isView(a)&&1===a.BYTES_PER_ELEMENT?i.set(a,r):i.set(eD(a),r),r+=a.byteLength}return i}function eZ(e,t,n){if(n=void 0===n?"":n,0==t.length)return e;if(1==e.length&&1==t.length){var i=new ef(e[0]);return t=new ef(t[0]),t=i.resolve(t),n&&ey(t,n),[t.toString()]}t=t.map(function(e){return new ef(e)}),i=[],e=S(e);for(var r=e.next();!r.done;r=e.next()){r=new ef(r.value);for(var a=S(t),o=a.next();!o.done;o=a.next())o=r.resolve(o.value),n&&ey(o,n),i.push(o.toString())}return i}function e0(e,t,n,i,r){return e={keySystem:e,encryptionScheme:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:n||[],keyIds:new Set,mediaTypes:r},i&&(e.keySystemUris=new Set([i])),e}function e1(t,n){n=void 0===n?"cenc":n;var i=[],r=[],a=[];t.forEach(function(e,t){var n=t;22!=n.length&&(n=ez(eY(t),!1));var o=e;22!=o.length&&(o=ez(eY(e),!1)),e={kty:"oct",kid:n,k:o},i.push(e),r.push(e.kid),a.push(t)}),t=JSON.stringify({keys:i});var o=JSON.stringify({kids:r});return o=[{initData:eD(eV(o)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",encryptionScheme:n,licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:o,keyIds:new Set(a)}}function e2(e,t){if(1==t.length)return t[0];if(null!=(e=e3(e,t)))return e;throw new eN(2,4,4025,t)}function e3(e,t){var n=e9.get(e);n=S(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;for(var r=S(t),a=r.next();!a.done;a=r.next())if(a=a.value,i.test(a.trim()))return a.trim()}return e==e5?"":null}function e4(e,t){var n=[];e=S(e=e9.get(e));for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=S(t),a=r.next();!a.done;a=r.next())a=a.value,i.test(a.trim())&&n.push(a.trim())}return n}q("shaka.util.Uint8ArrayUtils",eK),eK.concat=eQ,eK.toHex=eJ,eK.fromHex=eY,eK.fromBase64=eX,eK.toBase64=ez,eK.toStandardBase64=eW;var e5="text",e6={xa:"video",ha:"audio",Va:e5,Vf:"image",rl:"application"},e8=1/15,e9=new Map().set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cehx]?$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^mp2v/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function e7(e,t,n,i){this.g=null,this.l=e,this.i=t,this.m=n,this.o=i,this.j=!1;e:{if("u"<typeof libDPIModule&&Y("Could not find LCEVC Library dependencies on this page"),"u">typeof LCEVCdec)this.h=LCEVCdec;else if("u">typeof LcevcDil)this.h=LcevcDil,this.j=!0,el("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Y("Could not find LCEVC Library on this page"),e=!1;break e}void 0===this.h.SupportObject?(Y("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||Y(this.h.SupportObject.SupportError),e=void 0!==this.h&&"u">typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}e&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function te(e,t,n,i){"video"!==i.type||e.o&&!i.baseOriginalId||e.g&&e.g.appendBuffer(t,"video",i.id,-n,!e.o)}function tt(e){e.g&&e.i.classList.add("shaka-hidden")}function tn(e){return!!e&&"u">typeof LCEVCdec&&"lvc1"==e.codecs}function ti(t){if(to.has(t))return to.get(t);var n=e.ManagedMediaSource||e.MediaSource;
1return!!n&&(n=n.isTypeSupported(t),to.set(t,n),n)}function tr(){var t=e.ManagedSourceBuffer||e.SourceBuffer;return!!t&&!!t.prototype&&!!t.prototype.changeType}function ta(){var t=e.ManagedMediaSource||e.MediaSource;return!!t&&!!t.prototype&&!!t.prototype.setLiveSeekableRange&&!!t.prototype.clearLiveSeekableRange}e7.prototype.release=function(){this.g&&(this.g.close(),this.g=null)},q("shaka.lcevc.Dec",e7),e7.prototype.release=e7.prototype.release;var to=new Map;function ts(){}function tu(e,t){td.set(e,t)}function tl(e,t){if(t){var n=td.get(t);if(n)return n}throw new eN(2,4,4e3,e,t)}q("shaka.media.ManifestParser",ts),ts.unregisterParserByMime=function(e){td.delete(e)},ts.registerParserByMime=tu,ts.registerParserByExtension=function(){el("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},ts.AccessibilityPurpose={Bm:"visually impaired",Ml:"hard of hearing",im:"spoken subtitles"};var td=new Map;function tc(){}function th(){}function tp(e){this.h=new Map,this.i=0,this.j=new th,(e=tm(e.toLowerCase()))&&(this.j=e()),this.g=new tc,(e=ty)&&(this.g=e(),this.h.set(this.i,this.g))}function tf(e,t){t=S(t=e.j.parse(t));for(var n=t.next();!n.done;n=t.next()){var i=eD((n=n.value).packet);i.length>0&&e.g.extract(i,n.pts)}return e.g.decode()}function tg(e,t){tv.set(e,t)}function tm(e){return tv.get(e)}tc.prototype.extract=function(){},tc.prototype.decode=function(){return[]},tc.prototype.clear=function(){},tc.prototype.getStreams=function(){return[]},th.prototype.init=function(){},th.prototype.parse=function(){return[]},tp.prototype.init=function(e,t,n){if(t=void 0!==t&&t,-1!=(n=void 0===n?-1:n)&&this.i!=n){t=n;var i=this.h.get(t);this.h.set(this.i,this.g),i?this.g=i:((i=ty)&&(this.g=i()),this.h.set(t,this.g))}else t||this.g.clear();this.j.init(e),-1!=n&&(this.i=n)},tp.prototype.remove=function(e){e=new Set(e=void 0===e?[]:e);for(var t=S(this.h.keys()),n=t.next();!n.done;n=t.next())if(n=n.value,!e.has(n)){var i=this.h.get(n);i&&i.clear(),this.h.delete(n)}},q("shaka.media.ClosedCaptionParser",tp),tp.findDecoder=function(){return ty},tp.unregisterDecoder=function(){ty=null},tp.registerDecoder=function(e){ty=e},tp.findParser=tm,tp.unregisterParser=function(e){tv.delete(e)},tp.registerParser=tg;var tv=new Map,ty=null;function tb(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=t_,this.scroll=tw}q("shaka.text.CueRegion",tb);var t_=1;tb.units={PX:0,PERCENTAGE:1,LINES:2};var tw="";function tT(e,t){return!!("number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t))||e===t}function tS(e,t){(t=e.indexOf(t))>-1&&e.splice(t,1)}function tx(e,t,n){if(n||(n=tT),e.length!=t.length)return!1;t=t.slice(),e=S(e);for(var i=e.next(),r={};!i.done;r={oi:void 0},i=e.next()){if(r.oi=i.value,-1==(i=t.findIndex(function(e){return function(t){return n(e.oi,t)}}(r))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function tA(e,t){for(var n=0,i=e.length;n<i;){var r=n+i>>>1;t(e[r])?n=r+1:i=r}return n}function tE(e,t,n){if(e===t)return!0;if(!e||!t)return e==t;if(n||(n=tT),e.length!=t.length)return!1;for(var i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1;return!0}function tk(e){this.h=e||"",this.g=0}function tI(e){tC(e,/[ \t]+/gm)}function tC(e,t){return(t.lastIndex=e.g,t=null==(t=t.exec(e.h))?null:{position:t.index,length:t[0].length,results:t},e.g==e.h.length||null==t||t.position!=e.g)?null:(e.g+=t.length,t.results)}function tM(e){return e.g==e.h.length?null:(e=tC(e,/[^ \t\n]*/gm))?e[0]:null}function tP(e){if(null==(e=tC(e,tR)))return null;var t=Number(e[2]),n=Number(e[3]);return t>59||n>59?null:(Number(e[6])||0)/1e3+n+60*t+3600*(Number(e[1])||0)}function tD(e){return e?tP(new tk(e)):null}tb.scrollMode={NONE:tw,UP:"up"};var tR=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function tL(){}function tO(e){var t=new WeakSet;return function e(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||ArrayBuffer.isView(n))return n;if(t.has(n))return null;var i=Array.isArray(n);if(n.constructor!=Object&&!i)return null;t.add(n);var r,a=i?[]:{};for(r in n)a[r]=e(n[r]);return i&&(a.length=n.length),a}}(e)}function tN(e){var t,n={};for(t in e)n[t]=e[t];return n}function tj(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++){var i=n.toString(),r=e[n];void 0!==r&&(r=tj(r))&&t.push(i+":"+r)}e="["+t.join(",")+"]"}else if("function"==typeof e)e="";else if(e instanceof Object){for((n=Object.keys(e)).sort(),t=[],i=(n=S(n)).next();!i.done;i=n.next())i=JSON.stringify(r=i.value),void 0!==(r=e[r])&&(r=tj(r))&&t.push(i+":"+r);
1e="{"+t.join(",")+"}"}else e=JSON.stringify(e);return e}function tU(e,t){var n=void 0!==n&&n;return tB(e=eF(e),t,n)}function tB(e,t,n){if(e=function(e,t){function n(){for(var t=i;-1==="\r\n	>/= ".indexOf(e[i])&&e[i];)i++;return(" "+e.slice(t,i)).slice(1)}var i=0,r=0;return function a(o,s){s=void 0!==s&&s;for(var u=[];e[i];)if(60==e.charCodeAt(i)){if(47===e.charCodeAt(i+1)){s=i+2,i=e.indexOf(">",i);var l=(s=e.substring(s,i)).indexOf(o);if(-1==l){var d=o.indexOf(".");d>0&&(l=s.indexOf(o.substring(0,d)))}if(-1==l)throw Error("Unexpected close tag\nLine: "+((o=e.substring(0,i).split("\n")).length-1)+"\nColumn: "+(o[o.length-1].length+1)+"\nChar: "+e[i]);i+1&&(i+=1);break}if(33===e.charCodeAt(i+1)){if(45==e.charCodeAt(i+2)){for(;-1!==i&&(62!==e.charCodeAt(i)||45!=e.charCodeAt(i-1)||45!=e.charCodeAt(i-2)||-1==i);)i=e.indexOf(">",i+1);-1===i&&(i=e.length)}else if(91===e.charCodeAt(i+2)&&91===e.charCodeAt(i+8)&&"cdata"===e.substr(i+3,5).toLowerCase()){-1==(l=e.indexOf("]]>",i))?(u.push(e.substr(i+9)),i=e.length):(u.push(e.substring(i+9,l)),i=l+3);continue}i++;continue}if(r>512)throw Error("XML is too deeply nested");r++;e:{d=s,i++;var c=n(),h={};for(l=[];62!==e.charCodeAt(i)&&e[i];){var p=e.charCodeAt(i);if(p>64&&p<91||p>96&&p<123){p=n();for(var f=e.charCodeAt(i);f&&39!==f&&34!==f&&!(f>64&&f<91||f>96&&f<123)&&62!==f;)i++,f=e.charCodeAt(i);var g=i+1;if(i=e.indexOf(e[i],g),g=(" "+e.slice(g,i)).slice(1),39===f||34===f){if(-1===i){if(d={tagName:c,attributes:h,children:l,parent:null},t)for(c=0;c<l.length;c++)"string"!=typeof l[c]&&(l[c].parent=d);l=d;break e}}else g=null,i--;if(p.startsWith("xmlns:")){f=g;var m=p.split(":")[1];ni.set(f,m),nr.set(m,f)}"tt"===c&&"xml:space"===p&&"preserve"===g&&(d=!0),h[p]=g}i++}for(47!==e.charCodeAt(i-1)?(i++,l=a(c,d)):i++,d={tagName:c,attributes:h,children:l,parent:null},c=l.length,h=0;h<c;h++)"string"!=typeof(p=l[h])?t&&(p.parent=d):h==c-1&&"\n"==p&&l.pop();l=d}if(r--,u.push(l),"string"==typeof l)break;"?"===l.tagName[0]&&l.children&&(u.push.apply(u,x(l.children)),l.children=[])}else l=i,-2==(i=e.indexOf("<",i)-1)&&(i=e.length),l=(" "+e.slice(l,i+1)).slice(1),s?l.length>0&&u.push(l):u.length&&1==l.length&&"\n"==l[0]?u.push(l):l.trim().length>0&&u.push(l),i++;return u}("")}(e,void 0!==n&&n),!t&&e.length)return e[0];var i=t.split(",");return(t=e.find(function(e){return i.includes(e.tagName)}))?t:null}function tF(e){return ni.has(e)?ni.get(e):""}function tV(e){return"string"==typeof e}function tH(e){var t=[];if(!e.children)return[];e=S(e.children);for(var n=e.next();!n.done;n=e.next())"string"!=typeof(n=n.value)&&t.push(n);return t}function tq(e,t){var n=[];if(!e.children)return[];e=S(e.children);for(var i=e.next();!i.done;i=e.next())(i=i.value).tagName===t&&n.push(i);return n}function tG(e){if("string"==typeof e)return eq(e);var t=[];e=S(e.children);for(var n=e.next();!n.done;n=e.next())"string"==typeof(n=n.value)&&t.push(n);return""===(t=t.join(""))?null:eq(t)}function tK(e){for(var t=S(e.children),n=t.next();!n.done;n=t.next())if("string"!=typeof n.value)return null;return(e=tG(e))&&(e=e.trim()),e}function tW(e,t,n){if(n=void 0===n?[]:n,e.tagName===t&&n.push(e),e.children){e=S(e.children);for(var i=e.next();!i.done;i=e.next())tW(i.value,t,n)}return n}function tz(e,t){return 1!=(e=tq(e,t)).length?null:e[0]}function tX(e,t,n){return 1!=(e=tQ(e,t,n)).length?null:e[0]}function tY(e,t,n,i){i=void 0===i?null:i;var r=null;return null==(e=e.attributes[t])||""===e&&null!==i||(r=n(e)),null==r?i:r}function tJ(e,t,n){return t=tF(t),e.attributes[t+":"+n]||null}function tQ(e,t,n){var i=tF(t);if(t=[],e.children)for(n=i?i+":"+n:n,i=(e=S(e.children)).next();!i.done;i=e.next())(i=i.value)&&i.tagName===n&&t.push(i);return t}function t$(e,t,n){t=S(t);for(var i=t.next();!i.done;i=t.next())if(i=tJ(e,i.value,n))return i;return null}function tZ(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),isNaN(e=Date.parse(e))?null:e/1e3):null}function t0(e){return e&&(e=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$","i").exec(e))&&isFinite(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null))?e:null}function t1(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t&&isFinite(e=Number(t[1]))&&isFinite(t=Number(t[2]))?{start:e,end:t}:null}function t2(e){return(e=Number(e))%1==0?e:null}function t3(e){return(e=Number(e))%1==0&&e>0?e:null}function t4(e){return(e=Number(e))%1==0&&e>=0?e:null}function t5(e){return isNaN(e=Number(e))?null:e}function t6(e){return!!e&&"true"===e.toLowerCase()}function t8(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function t9(e){var t=[];e=S(e=eq(e).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/));for(var n=e.next();!n.done;n=e.next()){var i=(n=n.value).match(/^([\w]+)/);if(i){var r=n.match(/(@id='(.*?)')/),a=n.match(/(@t='(\d+)')/),o=n.match(/(@n='(\d+)')/),s=n.match(/\[(\d+)\]/);t.push({name:i[0],id:r?r[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:a?Number(a[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:o?Number(o[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:s?Number(s[1])-1:null,wc:n.split("/@")[1]||null})}else n.startsWith("@")&&t.length&&(t[t.length-1].wc=n.slice(1))}return t}function t7(e,t){var n=t9(t.attributes.sel||"");if(n.length){var i=n[n.length-1],r=t.attributes.pos||null;null!=(n=i.position)||(null!==i.t&&(n=ne(e,"t",i.t)),null!==i.n&&(n=ne(e,"n",i.n))),null===n?n="prepend"===r?0:e.length:"prepend"===r?--n:"after"===r&&++n,r=t.tagName,(i=i.wc)&&e[n]?nt(e[n],r,i,tK(t)||""):("remove"!==r&&"replace"!==r||e.splice(n,1),"add"!==r&&"replace"!==r||e.splice.apply(e,[n,0].concat(x(t.children))))}}function ne(e,t,n){var i=0;e=S(e);for(var r=e.next();!r.done;r=e.next()){if(Number(r.value.attributes[t])===n)return i;i++}return null}function nt(e,t,n,i){"remove"===t?delete e.attributes[n]:("add"===t||"replace"===t)&&(e.attributes[n]=i)}function nn(e){if(!e)return null;var t={tagName:e.tagName,attributes:tN(e.attributes),children:[],parent:null};e=S(e.children);for(var n=e.next();!n.done;n=e.next())"string"==typeof(n=n.value)||((n=nn(n)).parent=t),t.children.push(n);return t}
1q("shaka.util.ObjectUtils",tL),tL.alphabeticalKeyOrderStringify=tj,tL.shallowCloneObject=tN,tL.cloneObject=tO;var ni=new Map,nr=new Map;function na(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new tb,this.position=null,this.positionAlign=nc,this.size=0,this.textAlign=nh,this.direction=nm,this.writingMode=nv,this.lineInterpretation=ny,this.line=null,this.lineHeight="",this.lineAlign=nb,this.displayAlign=nf,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=nS,this.fontStyle=nA,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textCombineUpright="",this.textDecoration=[],this.textStrokeWidth=this.textStrokeColor=this.textShadow="",this.wrapLine=!0,this.id="",this.nestedCues=[],this.lineBreak=this.isContainer=!1,this.rubyTag=null,this.cellResolution={columns:32,rows:15}}function no(e,t){return(e=new na(e,t,"")).lineBreak=!0,e}function ns(e,t){if(e.payload!=t.payload||!(.001>Math.abs(e.startTime-t.startTime)&&.001>Math.abs(e.endTime-t.endTime)))return!1;for(var n in e)if("startTime"!=n&&"endTime"!=n&&"payload"!=n){if("nestedCues"==n){if(!tE(e.nestedCues,t.nestedCues,ns))return!1}else if("region"==n||"cellResolution"==n){for(var i in e[n])if(e[n][i]!=t[n][i])return!1}else if(Array.isArray(e[n])){if(!tE(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1}return!0}function nu(e,t){t=void 0===t?new Map:t;var n=e.payload;if(n.includes("<")){0===t.size&&nl(t);var i,r,a,o,s=n;n=[];for(var u=-1,l=0;l<s.length;l++)"<"===s[l]?u=l+1:">"===s[l]&&u>0&&((u=s.substr(u,l-u)).match(nC)&&n.push(u),u=-1);for(l=(n=S(n)).next();!l.done;l=n.next())l=l.value,s=s.replace("<"+l+">",'<div time="'+l+'">')+"</div>";e:{l=s,u=[];var d=-1;n="",s=!1;for(var c=0;c<l.length;c++)if("/"===l[c]){var h=l.indexOf(">",c);if(-1===h){n=l;break e}if((h=l.substring(c+1,h))&&"v"==h){s=!0;var p=null;if(u.length&&(p=u[u.length-1]),p){if(p===h)n+="/"+h+">";else{if(!p.startsWith("v")){n+=l[c];continue}n+="/"+p+">"}c+=h.length+1}else n+=l[c]}else n+=l[c]}else"<"===l[c]?"v"!=l[d=c+1]&&(d=-1):">"===l[c]&&d>0&&(u.push(l.substr(d,c-d)),d=-1),n+=l[c];for(u=(l=S(u)).next();!u.done;u=l.next())d=(u=u.value).replace(" ",".voice-"),n=(n=n.replace("<"+u+">","<"+d+">")).replace("</"+u+">","</"+d+">"),s||(n+="</"+d+">")}i=n,r={"< ":""," >":" &gt;"},o=RegExp((a=/(< +>|<\s|\s>)/g).source),n=i&&o.test(i)?i.replace(a,function(e){return r[e]||""}):i||"",e.payload="",s="<span>"+n.replace(/\n/g,"<br />")+"</span>";try{var f=tB(s,"span")}catch(e){}if(f)if(1!=(f=f.children).length||f[0].tagName)for(n=(f=S(f)).next();!n.done;n=f.next())!function e(t,n,i){var r=n.clone();if(r.nestedCues=[],r.payload="",r.rubyTag="",r.line=null,r.region=new tb,r.position=null,r.size=0,r.textAlign=nh,t.tagName)for(var a=S(t.tagName.split(/(?=[ .])+/g)),o=a.next();!o.done;o=a.next()){var s=o=o.value;if(s.startsWith(".voice-")){var u=s.split("-").pop();s='v[voice="'+u+'"]',i.has(s)||(s="v[voice="+u+"]")}switch(i.has(s)&&(u=r,s=i.get(s))&&(u.backgroundColor=nd(s.backgroundColor,u.backgroundColor),u.color=nd(s.color,u.color),u.fontFamily=nd(s.fontFamily,u.fontFamily),u.fontSize=nd(s.fontSize,u.fontSize),u.textShadow=nd(s.textShadow,u.textShadow),u.fontWeight=s.fontWeight,u.fontStyle=s.fontStyle,u.opacity=s.opacity,u.rubyTag=s.rubyTag,u.textCombineUpright=s.textCombineUpright,u.wrapLine=s.wrapLine),o){case"br":r=no(r.startTime,r.endTime),n.nestedCues.push(r);return;case"b":r.fontWeight=nx;break;case"i":r.fontStyle=nE;break;case"u":r.textDecoration.push(nI);break;case"font":(o=t.attributes.color)&&(r.color=o);break;case"div":if(!(o=t.attributes.time))break;(o=tD(o))&&(r.startTime=o);break;case"ruby":case"rp":case"rt":r.rubyTag=o}}if(a=t.children,tV(t)||1==a.length&&tV(a[0]))for(i=tG(t).split("\n"),t=!0,a=(i=S(i)).next();!a.done;a=i.next())a=a.value,t||(t=no(r.startTime,r.endTime),n.nestedCues.push(t)),a.length>0&&((t=r.clone()).payload=eq(a),n.nestedCues.push(t)),t=!1;else for(n.nestedCues.push(r),t=(n=S(a)).next();!t.done;t=n.next())e(t.value,r,i)}(n.value,e,t);else e.payload=eq(n);else e.payload=eq(n)}else e.payload=eq(n)}function nl(e){for(var t=S(Object.entries(nw)),n=t.next();!n.done;n=t.next()){var i=S(n.value);n=i.next().value,i=i.next().value;var r=new na(0,0,"");r.color=i,e.set("."+n,r)}for(n=(t=S(Object.entries(nT))).next();!n.done;n=t.next())n=(i=S(n.value)).next().value,i=i.next().value,(r=new na(0,0,"")).backgroundColor=i,e.set("."+n,r)}
1function nd(e,t){return e&&e.length>0?e:t}na.prototype.clone=function(){var e,t=new na(0,0,"");for(e in this)t[e]=this[e],Array.isArray(t[e])&&(t[e]=t[e].slice());return t},q("shaka.text.Cue",na),na.parseCuePayload=nu,na.equal=ns,na.prototype.clone=na.prototype.clone;var nc="auto";na.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:nc};var nh="center",np={LEFT:"left",RIGHT:"right",CENTER:nh,START:"start",END:"end"};na.textAlign=np;var nf="after",ng={BEFORE:"before",CENTER:"center",AFTER:nf};na.displayAlign=ng;var nm="ltr";na.direction={HORIZONTAL_LEFT_TO_RIGHT:nm,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var nv="horizontal-tb";na.writingMode={HORIZONTAL_TOP_TO_BOTTOM:nv,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var ny=0;na.lineInterpretation={LINE_NUMBER:0,PERCENTAGE:1};var nb="start",n_={CENTER:"center",START:nb,END:"end"};na.lineAlign=n_;var nw={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};na.defaultTextColor=nw;var nT={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};na.defaultTextBackgroundColor=nT;var nS=400,nx=700;na.fontWeight={NORMAL:400,BOLD:700};var nA="normal",nE="italic",nk={NORMAL:nA,ITALIC:nE,OBLIQUE:"oblique"};na.fontStyle=nk;var nI="underline";na.textDecoration={UNDERLINE:nI,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var nC=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function nM(){}function nP(e,t,n){nR.set(e.toLowerCase().split(";")[0]+"-"+n,{priority:n,xf:t})}function nD(e,t){for(var n=e.toLowerCase().split(";")[0],i=S([nj,nN,nO,nL]),r=i.next();!r.done;r=i.next())if(r=nR.get(n+"-"+r.value)){var a=r.xf(),o=a.isSupported(e,t);if(a.destroy(),o)return r.xf}return null}nM.prototype.destroy=function(){},q("shaka.transmuxer.TransmuxerEngine",nM),nM.findTransmuxer=nD,nM.unregisterTransmuxer=function(e,t){nR.delete(e.toLowerCase().split(";")[0]+"-"+t)},nM.registerTransmuxer=nP,nM.prototype.destroy=nM.prototype.destroy;var nR=new Map,nL=1,nO=2,nN=3,nj=4;function nU(){}function nB(e,t){var n=e;return t&&!nY.includes(e)&&(n+='; codecs="'+t+'"'),n}function nF(e,t){return t&&(e+='; codecs="'+t+'"'),e}function nV(e,t,n){var i=nB(e,t);return nD(t=nF(e,t))?(e=nD(t))?(n=(e=e()).convertCodecs(n,t),e.destroy()):n=t:n="video/mp2t"!=e&&"audio"==n?i.replace("video","audio"):i,n}function nH(e){return e.split(";")[0].split("/")[1]}function nq(e){var t=nX(e);switch(e=t[0].toLowerCase(),t=t[1].toLowerCase(),!0){case"mp4a"===e&&"69"===t:case"mp4a"===e&&"6b"===t:case"mp4a"===e&&"40.34"===t:return"mp3";case"mp4a"===e&&"66"===t:case"mp4a"===e&&"67"===t:case"mp4a"===e&&"68"===t:case"mp4a"===e&&"40.2"===t:case"mp4a"===e&&"40.02"===t:case"mp4a"===e&&"40.5"===t:case"mp4a"===e&&"40.05"===t:case"mp4a"===e&&"40.29"===t:case"mp4a"===e&&"40.42"===t:return"aac";case"mp4a"===e&&"a5"===t:case"ac3"===e:case"ac-3"===e:return"ac-3";case"mp4a"===e&&"a6"===t:case"eac3"===e:case"ec-3"===e:return"ec-3";case"ac-4"===e:return"ac-4";case"mp4a"===e&&"b2"===t:return"dtsx";case"mp4a"===e&&"a9"===t:return"dtsc";case"vp09"===e:case"vp9"===e:return"vp9";case"avc1"===e:case"avc3"===e:return"avc";case"hvc1"===e:case"hev1"===e:return"hevc";case"vvc1"===e:case"vvi1"===e:return"vvc";case"dvh1"===e:case"dvhe"===e:return t&&t.startsWith("05")?"dovi-p5":"dovi-hevc";case"dvav"===e:case"dva1"===e:return"dovi-avc";case"dav1"===e:return"dovi-av1";case"dvc1"===e:case"dvi1"===e:return"dovi-vvc"}return e}function nG(e){var t=[];e=S(e.split(","));for(var n=e.next();!n.done;n=e.next())t.push((n=nX(n.value))[0]);return t.sort().join(",")}function nK(e){return e.split(";")[0]}function nW(e){return(e=e.split(/ *; */)).shift(),(e=e.find(function(e){return e.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function nz(e){return"application/x-mpegurl"===e||"application/vnd.apple.mpegurl"===e||"audio/x-mpegurl"===e}function nX(e){var t=(e=e.split("."))[0];return e.shift(),[t,e.join(".")]}nM.PluginPriority={FALLBACK:1,PREFERRED_SECONDARY:2,PREFERRED:3,APPLICATION:4},q("shaka.util.MimeUtils",nU),nU.getFullTypeWithAllCodecs=nF,nU.getFullType=nB;var nY=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function nJ(e){this.i=null,this.l=e,this.B=this.F=!1,this.m=this.u=0,this.o=1/0,this.h=this.g=null,this.D="",this.C=function(){},this.j=new Map}function nQ(e,t){n2.set(e,t)}function n$(e){return n2.get(e)}function nZ(e){return!!n2.has(e)||("application/cea-608"==e||"application/cea-708"==e)&&!!ty}function n0(e,t,n){e.D=t,(t=e.j.get(t))&&(t=t.filter(function(e){return e.endTime<=n})).length&&e.l.append(t)}function n1(e){for(var t=1/0,n=-1/0,i=S(e.j.values()),r=i.next();!r.done;r=i.next()){r=S(r.value);for(var a=r.next();!a.done;a=r.next())t=Math.min(t,(a=a.value).startTime),n=Math.max(n,a.endTime)}t!==1/0&&n!==-1/0&&(e.g=null==e.g?Math.max(t,e.m):Math.min(e.g,Math.max(t,e.m)),e.h=Math.max(e.h,Math.min(n,e.o)))}nJ.prototype.destroy=function(){return this.l=this.i=null,this.j.clear(),Promise.resolve()},nJ.prototype.remove=function(e,t,n){n=void 0!==n&&n;var i=this;return L(function(r){return 1==r.h?r.g(Promise.resolve(),2):e>=t||n&&(function(e,t,n){for(var i=S(e.j.keys()),r=i.next();!r.done;r=i.next()){r=r.value;var a=e.j.get(r);a=a.filter(function(e){return e.startTime<t||e.endTime>=n}),e.j.set(r,a)}}(i,e,t),""===i.D)?r.return():void(i.l&&i.l.remove(e,t)&&null!=i.g&&(t<=i.g||e>=i.h||(e<=i.g&&t>=i.h?i.g=i.h=null:e<=i.g&&t<i.h?i.g=t:e>i.g&&t>=i.h&&(i.h=e)),n1(i)),r.j())})},q("shaka.text.TextEngine",nJ),nJ.prototype.destroy=nJ.prototype.destroy,nJ.findParser=n$,nJ.unregisterParser=function(e){n2.delete(e)},nJ.registerParser=nQ;
1var n2=new Map;function n3(e){this.h=e,this.g=null}function n4(e){this.h=e,this.g=null}function n5(e,t){return e.concat(t)}function n6(){}function n8(e){return null!=e}function n9(e,t){return Promise.race([t,new Promise(function(t,n){new n4(n).ea(e)})])}function n7(){}function ie(e,t){return e=ir(e),t=ir(t),e.split("-")[0]==t.split("-")[0]}function it(e,t){return e=ir(e),t=ir(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&1==e.length&&2==t.length}function ii(e,t){return e=ir(e),t=ir(t),e=e.split("-"),t=t.split("-"),2==e.length&&2==t.length&&e[0]==t[0]}function ir(e){var t=(e=S(e.split("-x-"))).next().value;t=void 0===t?"":t,e=void 0===(e=e.next().value)?"":e;var n=S(t.split("-"));return t=void 0===(t=n.next().value)?"":t,n=void 0===(n=n.next().value)?"":n,e=e?"x-"+e:"",t=t.toLowerCase(),t=il.get(t)||t,((n=n.toUpperCase())?t+"-"+n:t)+(e?"-"+e:"")}function ia(e,t){return e=ir(e),(t=ir(t))==e?4:it(t,e)?3:ii(t,e)?2:+!!it(e,t)}function io(e){var t=e.indexOf("-");return e=(e=t>=0?e.substring(0,t):e).toLowerCase(),il.get(e)||e}function is(e){return e.language?ir(e.language):e.audio&&e.audio.language?ir(e.audio.language):e.video&&e.video.language?ir(e.video.language):"und"}function iu(e,t){e=ir(e);var n=new Set;t=S(t);for(var i=t.next();!i.done;i=t.next())n.add(ir(i.value));for(i=(t=S(n)).next();!i.done;i=t.next())if((i=i.value)==e)return i;for(i=(t=S(n)).next();!i.done;i=t.next())if(it(i=i.value,e))return i;for(i=(t=S(n)).next();!i.done;i=t.next())if(ii(i=i.value,e))return i;for(t=(n=S(n)).next();!t.done;t=n.next())if(it(e,t=t.value))return t;return null}n3.prototype.ea=function(t){var n=this;this.stop();var i=!0,r=null;return this.g=function(){e.clearTimeout(r),i=!1},r=e.setTimeout(function(){i&&n.h()},1e3*t),this},n3.prototype.stop=function(){this.g&&(this.g(),this.g=null)},n4.prototype.wb=function(){return this.stop(),this.h(),this},n4.prototype.ea=function(e){var t=this;return this.stop(),this.g=new n3(function(){t.h()}).ea(e),this},n4.prototype.Ha=function(e){var t=this;return this.stop(),this.g=new n3(function(){t.g.ea(e),t.h()}).ea(e),this},n4.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},q("shaka.util.Timer",n4),n4.prototype.stop=n4.prototype.stop,n4.prototype.tickEvery=n4.prototype.Ha,n4.prototype.tickAfter=n4.prototype.ea,n4.prototype.tickNow=n4.prototype.wb,q("shaka.util.LanguageUtils",n7),n7.findClosestLocale=iu,n7.getLocaleForVariant=is,n7.getLocaleForText=function(e){return ir(e.language||"und")},n7.getBase=io,n7.relatedness=ia,n7.areSiblings=function(e,t){var n=io(e),i=io(t);return e!=n&&t!=i&&n==i},n7.normalize=ir,n7.isSiblingOf=ii,n7.isParentOf=it,n7.areLanguageCompatible=ie,n7.areLocaleCompatible=function(e,t){return(e=ir(e))==(t=ir(t))};var il=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","
1sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function id(){}function ic(e,t,n,i,r){if(r.length){var a=e.textStreams;r=S(r);for(var o=r.next(),s={};!o.done;s={Dh:void 0},o=r.next())if(s.Dh=o.value,(o=a.filter(function(e){return function(t){return!!(t.codecs.startsWith(e.Dh)||t.mimeType.startsWith(e.Dh))}}(s))).length){a=o;break}e.textStreams=a}if(a=e.variants,(t.length||n.length)&&(a=function(e,t,n){t=S(t);for(var i=t.next(),r={};!i.done;r={videoCodec:void 0},i=t.next())if(r.videoCodec=i.value,(i=e.filter(function(e){return function(t){return t.video&&t.video.codecs.startsWith(e.videoCodec)}}(r))).length){e=i;break}for(t=(n=S(n)).next(),i={};!t.done;i={audioCodec:void 0},t=n.next())if(i.audioCodec=t.value,(t=e.filter(function(e){return function(t){return t.audio&&t.audio.codecs.startsWith(e.audioCodec)}}(i))).length){e=t;break}return e}(a,t,n)),i.length){for(t=new Z,a=(n=S(a)).next();!a.done;a=n.next())a=a.value,t.push(String(a.video.width||0),a);var u=[];t.forEach(function(e,t){e=0;var n=[];t=S(t);for(var r=t.next(),a={};!r.done;a={Tf:void 0},r=t.next())a.Tf=r.value,(r=i.filter(function(e){return function(t){return e.Tf.decodingInfos[0][t]}}(a)).length)>e?(e=r,n=[a.Tf]):r==e&&n.push(a.Tf);u.push.apply(u,x(n))}),a=u}for(n=new Set,t=new Set,r=(a=S(a)).next();!r.done;r=a.next())(r=r.value).audio&&n.add(r.audio),r.video&&t.add(r.video);a=Array.from(n).sort(function(e,t){return e.bandwidth-t.bandwidth});var l=[];for(n=new Map,r=(a=S(a)).next();!r.done;r=a.next()){if(o=function(e){var t=e.language+(e.channelsCount||0)+(e.audioSamplingRate||0)+e.roles.join(",")+e.label+e.groupId+e.fastSwitching;return e.dependencyStream&&(t+=e.dependencyStream.baseOriginalId||""),t}(r=r.value),(s=n.get(o)||[]).length){var d=s[s.length-1],c=nq(d.codecs),h=nq(r.codecs);c!=h||r.bandwidth&&d.bandwidth&&!(r.bandwidth>d.bandwidth)||(s.push(r),l.push(r.id))}else s.push(r),l.push(r.id);n.set(o,s)}var p={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};a=Array.from(t).sort(function(e,t){if(!e.bandwidth||!t.bandwidth||e.bandwidth==t.bandwidth){if(e.codecs&&t.codecs&&e.codecs!=t.codecs&&e.width==t.width){var n=nq(e.codecs),i=nq(t.codecs);if(n!=i)return(p[n]||1)-(p[i]||1)}return e.width-t.width}return e.bandwidth-t.bandwidth}),t=tr();var f=[];for(n=new Map,r=(a=S(a)).next();!r.done;r=a.next()){if(o=function(e){var t=String(e.width||"")+String(e.height||"")+String(Math.round(e.frameRate||0))+(e.hdr||"")+e.fastSwitching;return e.dependencyStream&&(t+=e.dependencyStream.baseOriginalId||""),e.roles&&(t+=e.roles.sort().join("_")),t}(r=r.value),(s=n.get(o)||[]).length){if(d=s[s.length-1],!t&&(c=nq(d.codecs))!==(h=nq(r.codecs)))continue;(c=nq(d.codecs))!=(h=nq(r.codecs))||r.bandwidth&&d.bandwidth&&!(r.bandwidth>d.bandwidth)||(s.push(r),f.push(r.id))}else s.push(r),f.push(r.id);n.set(o,s)}e.variants=e.variants.filter(function(e){var t=e.audio;return e=e.video,(!t||!!l.includes(t.id))&&(!e||!!f.includes(e.id))})}function ih(e,t,n){if(e&&e.video&&e.video.width&&e.video.height){var i,r,a,o,s,u,l,d,c,h,p,f,g,m,v,y,b,w,T=e.video.width,x=e.video.height;if(x>T&&(T=(x=S([x,T])).next().value,x=x.next().value),h=T,p=t.minWidth,f=Math.min(t.maxWidth,n.width),!(h>=p)||!(h<=f)||(g=x,m=t.minHeight,v=Math.min(t.maxHeight,n.height),!(g>=m)||!(g<=v))||(y=T*x,b=t.minPixels,w=t.maxPixels,!(y>=b)||!(y<=w)))return!1}return(!e||!e.video||!e.video.frameRate||(i=e.video.frameRate,r=t.minFrameRate,a=t.maxFrameRate,i>=r&&i<=a))&&(!e||!e.audio||!e.audio.channelsCount||(o=e.audio.channelsCount,s=t.minChannelsCount,u=t.maxChannelsCount,o>=s&&o<=u))&&(l=e.bandwidth,d=t.minBandwidth,c=t.maxBandwidth,l>=d&&l<=c)}function ip(e,t,n,i,r){var a,o;return L(function(s){if(1==s.h)return er().Wi()&&function(e){var t=new Map().set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),n=new Set;e=S(e);for(var i=e.next();!i.done;i=e.next())(i=i.value).video&&n.add(i.video);for(e=(n=S(n)).next();!e.done;e=n.next()){e=e.value,i=S(t);for(var r=i.next();!r.done;r=i.next()){var a=S(r.value);if(r=a.next().value,a=a.next().value,e.codecs.includes(r)){e.codecs=e.codecs.replace(r,a);break}}}}(t.variants),s.g(im(t.variants,n,!1,i),2);a=null,e&&(o=e.g)&&(a=o.keySystem),t.variants=t.variants.filter(function(e){var t=function(e,t,n){if(!e.decodingInfos.some(function(e){return!!e.supported&&(!t||!(e=e.keySystemAccess)||(n[e.keySystem]||e.keySystem)==t)}))return!1;var i=er(),r="Xbox"===i.Ib();i="MOBILE"===i.Ta()&&"GECKO"===i.Ea();var a=e.video,o=a&&a.width||0,s=a&&a.height||0;return!(r&&a&&(o>1920||s>1080)&&(a.codecs.includes("avc1.")||a.codecs.includes("avc3.")))&&(!(r=a&&a.dependencyStream)||!!tn(r))&&(e=e.audio,!(i&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus"))&&(!e||!e.depen
1dencyStream))}(e,a,r);if(!t){var n=[];e.audio&&n.push(iP(e.audio)),e.video&&n.push(iP(e.video))}return t}),s.j()})}function ig(e,t){var n,i,r,a,o,s,u;return L(function(l){if(1==l.h){for(n=function(e,t){if(e){var n=tN(e);return n.supported=e.supported&&t.supported,n.powerEfficient=e.powerEfficient&&t.powerEfficient,n.smooth=e.smooth&&t.smooth,t.keySystemAccess&&!n.keySystemAccess&&(n.keySystemAccess=t.keySystemAccess),n}return t},i=null,r=[],o=(a=S(t)).next(),s={};!o.done;s={cache:void 0,He:void 0},o=a.next())u=o.value,s.He=tj(u),s.cache=iL,s.cache.has(s.He)?i=n(i,s.cache.get(s.He)):r.push((function(e){var t=[""];e.video&&(t=nW(e.video.contentType).split(","));var n=[""];e.audio&&(n=nW(e.audio.contentType).split(","));var i=[];t=S(t);for(var r=t.next();!r.done;r=t.next()){r=r.value;for(var a=S(n),o=a.next(),s={};!o.done;s={Lc:void 0},o=a.next())o=o.value,s.Lc=tO(e),e.video&&(s.Lc.video.contentType=nB(nK(s.Lc.video.contentType),r)),e.audio&&(s.Lc.audio.contentType=nB(nK(s.Lc.audio.contentType),o)),i.push(new Promise(function(e){return function(t,n){("MOBILE"==er().Ta()?n9(5,navigator.mediaCapabilities.decodingInfo(e.Lc)):navigator.mediaCapabilities.decodingInfo(e.Lc)).then(function(e){t(e)}).catch(n)}}(s)))}return Promise.all(i).catch(function(){return JSON.stringify(e),null})})(u).then(function(e){return function(t){var r=null;t=S(t||[]);for(var a=t.next();!a.done;a=t.next())r=n(r,a.value);r&&(e.cache.set(e.He,r),i=n(i,r))}}(s)));return l.g(Promise.all(r),2)}i&&e.decodingInfos.push(i),l.j()})}function im(e,t,n,i){var r,a,o,s,u,l,d,c,h,p,f,g,m,v,y,b;return L(function(w){switch(w.h){case 1:if(e.some(function(e){return e.decodingInfos.length}))return w.return();a=(r=S(i)).next(),o={};case 2:if(a.done){w.A(4);break}o.Di=a.value,s=!1,l=(u=S(e)).next();case 5:var T;if(l.done){w.A(7);break}h=(c=S(iv(d=l.value,t,n).filter((T=o,function(e){return!(e=(e=e[0]).keySystemConfiguration&&e.keySystemConfiguration.keySystem)||e===T.Di})))).next();case 8:if(h.done){w.A(10);break}return p=h.value,w.g(ig(d,p),9);case 9:h=c.next(),w.A(8);break;case 10:d.decodingInfos.some(function(e){return e.supported})&&(s=!0),l=u.next(),w.A(5);break;case 7:if(s)return w.return();o={Di:void 0},a=r.next(),w.A(2);break;case 4:g=(f=S(e)).next();case 12:if(g.done){w.A(0);break}y=(v=S(iv(m=g.value,t,n).filter(function(e){return!(e=(e=e[0]).keySystemConfiguration&&e.keySystemConfiguration.keySystem)||!i.includes(e)}))).next();case 15:if(y.done){g=f.next(),w.A(12);break}return b=y.value,w.g(ig(m,b),16);case 16:y=v.next(),w.A(15)}})}function iv(e,t,n){var i=e.audio,r=e.video,a=[],o=[];if(r)for(var s=S(r.fullMimeTypes),u=s.next();!u.done;u=s.next()){var l=nW(u=u.value);if(l.includes(",")&&!i){var d=l.split(","),c=nK(u);l=e2("video",d),d=iy(d=e2("audio",d),c),c=nV(c,d,"audio"),o.push({contentType:c,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(l=ib(l),u={contentType:nV(nK(u),l,"video"),width:r.width||64,height:r.height||64,bitrate:r.bandwidth||e.bandwidth||1,framerate:r.frameRate||30},r.hdr)switch(r.hdr){case"PQ":u.transferFunction="pq";break;case"HLG":u.transferFunction="hlg"}r.colorGamut&&(u.colorGamut=r.colorGamut),a.push(u)}if(i)for(u=(s=S(i.fullMimeTypes)).next();!u.done;u=s.next())u=nK(l=u.value),l=iy(nW(l),u),u=nV(u,l,"audio"),o.push({contentType:u,channels:i.channelsCount||2,bitrate:i.bandwidth||e.bandwidth||1,samplerate:i.audioSamplingRate||1,spatialRendering:i.spatialAudio});for(s=[],0==a.length&&a.push(null),0==o.length&&o.push(null),u=(a=S(a)).next();!u.done;u=a.next())for(u=u.value,c=(l=S(o)).next();!c.done;c=l.next())c=c.value,d={type:n?"file":"media-source"},u&&(d.video=u),c&&(d.audio=c),s.push(d);if(!(o=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])).length)return[s];for(e=[],n=new Map,a=(o=S(o)).next();!a.done;a=o.next())a=a.value,n.get(a.keySystem)||n.set(a.keySystem,[]),n.get(a.keySystem).push(a);for(o=t?"required":"optional",t=t?["persistent-license"]:["temporary"],u=(a=S(n.keys())).next();!u.done;u=a.next()){for(u=u.value,c=n.get(u),l=new Map,d=(c=S(c)).next();!d.done;d=c.next()){var h=(d=d.value).videoRobustness+","+d.audioRobustness;l.get(h)||l.set(h,[]),l.get(h).push(d)}
1for(c=(l=S(l.values())).next();!c.done;c=l.next()){c=c.value,d=[],h=S(s);for(var p=h.next();!p.done;p=h.next()){p=Object.assign({},p.value);for(var f={keySystem:u,initDataType:"cenc",persistentState:o,distinctiveIdentifier:"optional",sessionTypes:t},g=S(c),m=g.next();!m.done;m=g.next()){if((m=m.value).initData&&m.initData.length){for(var v=new Set,y=S(m.initData),b=y.next();!b.done;b=y.next())v.add(b.value.initDataType);f.initDataType=m.initData[0].initDataType}m.distinctiveIdentifierRequired&&(f.distinctiveIdentifier="required"),m.persistentStateRequired&&(f.persistentState="required"),m.sessionType&&(f.sessionTypes=[m.sessionType]),i&&(f.audio?(m.encryptionScheme&&(f.audio.encryptionScheme=f.audio.encryptionScheme||m.encryptionScheme),f.audio.robustness=f.audio.robustness||m.audioRobustness):(f.audio={robustness:m.audioRobustness},m.encryptionScheme&&(f.audio.encryptionScheme=m.encryptionScheme)),""==f.audio.robustness&&delete f.audio.robustness),r&&(f.video?(m.encryptionScheme&&(f.video.encryptionScheme=f.video.encryptionScheme||m.encryptionScheme),f.video.robustness=f.video.robustness||m.videoRobustness):(f.video={robustness:m.videoRobustness},m.encryptionScheme&&(f.video.encryptionScheme=m.encryptionScheme)),""==f.video.robustness&&delete f.video.robustness)}p.keySystemConfiguration=f,d.push(p)}e.push(d)}}return e}function iy(e,t){var n=er();return"flac"==e.toLowerCase()?"WEBKIT"!=n.Ea()?"flac":"fLaC":"opus"===e.toLowerCase()?"WEBKIT"!=n.Ea()?"opus":"mp4"==nH(t)?"Opus":"opus":"ac-3"==e.toLowerCase()&&n.fe()?"ec-3":e}function ib(e){if(e.includes("avc1")){var t=e.split(".");if(3==t.length)return t.shift()+"."+parseInt(t.shift(),10).toString(16)+("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}else if("vp9"==e)return"vp09.00.41.08";return e}function i_(e){var t=e.audio,n=e.video,i=t?t.mimeType:null,r=n?n.mimeType:null,a=t?t.codecs:null,o=n?n.codecs:null,s=t?t.groupId:null,u=[];n&&u.push(n.mimeType),t&&u.push(t.mimeType),u=u[0]||null;var l=[];t&&l.push(t.kind),n&&l.push(n.kind),l=l[0]||null;var d=new Set;if(t)for(var c=S(t.roles),h=c.next();!h.done;h=c.next())d.add(h.value);if(n)for(h=(c=S(n.roles)).next();!h.done;h=c.next())d.add(h.value);if(e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:u,audioMimeType:i,videoMimeType:r,codecs:"",audioCodec:a,videoCodec:o,primary:e.primary,roles:Array.from(d),audioRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:s,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null,e.hdr=n.hdr||null,e.colorGamut=n.colorGamut||null,e.videoLayout=n.videoLayout||null,(i=n.dependencyStream)&&(e.width=i.width||e.width,e.height=i.height||e.height,e.videoCodec=i.codecs||e.videoCodec,e.pixelAspectRatio=i.pixelAspectRatio||e.pixelAspectRatio,e.videoBandwidth&&i.bandwidth&&(e.videoBandwidth+=i.bandwidth)),o.includes(","))){e.channelsCount=n.channelsCount,e.audioSamplingRate=n.audioSamplingRate,e.spatialAudio=n.spatialAudio,e.originalLanguage=n.originalLanguage,e.audioMimeType=r,r=o.split(",");try{e.videoCodec=e2("video",r),e.audioCodec=e2("audio",r)}catch(e){}}
1return t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.spatialAudio=t.spatialAudio,e.label=t.label,e.audioRoles=t.roles,e.accessibilityPurpose=t.accessibilityPurpose,e.originalLanguage=t.originalLanguage,r=t.dependencyStream)&&(e.audioCodec=r.codecs||e.audioCodec,e.audioBandwidth&&r.bandwidth&&(e.audioBandwidth+=r.bandwidth)),n&&!e.videoBandwidth&&(t?e.audioBandwidth&&(e.videoBandwidth=e.bandwidth-e.audioBandwidth):e.videoBandwidth=e.bandwidth),t&&!e.audioBandwidth&&(n?e.videoBandwidth&&(e.audioBandwidth=e.bandwidth-e.videoBandwidth):e.audioBandwidth=e.bandwidth),t=[],e.videoCodec&&t.push(e.videoCodec),e.audioCodec&&t.push(e.audioCodec),e.codecs=t.join(", "),e}function iw(e){return{id:e.id,active:!1,type:e5,bandwidth:e.bandwidth||0,language:e.language,label:e.label,kind:e.kind||null,mimeType:e.mimeType,codecs:e.codecs||null,primary:e.primary,roles:e.roles,accessibilityPurpose:e.accessibilityPurpose,forced:e.forced,originalTextId:e.originalId,originalLanguage:e.originalLanguage}}function iT(e){var t=e.width||null,n=e.height||null,i=null;e.segmentIndex&&(i=e.segmentIndex.Bb());var r=e.tilesLayout;return i&&(r=i.tilesLayout||r),r&&null!=t&&(t/=Number(r.split("x")[0])),r&&null!=n&&(n/=Number(r.split("x")[1])),{id:e.id,type:"image",bandwidth:e.bandwidth||0,width:t,height:n,mimeType:e.mimeType,codecs:e.codecs||null,tilesLayout:r||null,originalImageId:e.originalId}}function iS(e){return e.__shaka_id||(e.__shaka_id=iO++),e.__shaka_id}function ix(e){var t={id:iS(e),active:"disabled"!=e.mode,type:e5,bandwidth:0,language:ir(e.language||"und"),label:e.label,kind:e.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:"forced"==e.kind,originalTextId:e.id,originalLanguage:e.language};return"captions"==e.kind&&(t.mimeType="unknown"),"subtitles"==e.kind&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),t}function iA(e,t){var n=e?e.language:null;if(n={id:iS(e||t),active:e?e.enabled:t.selected,type:"variant",bandwidth:0,language:ir(n||"und"),label:e?e.label:null,kind:e?e.kind:null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!!e&&"main"==e.kind,roles:[],forced:!1,audioR
1oles:null,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:t?t.id:null,originalAudioId:e?e.id:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:n},e&&e.kind&&(n.roles=[e.kind],n.audioRoles=[e.kind]),e&&e.configuration&&(e.configuration.codec&&(n.audioCodec=e.configuration.codec,n.codecs=n.audioCodec),e.configuration.bitrate&&(n.audioBandwidth=e.configuration.bitrate,n.bandwidth+=n.audioBandwidth),e.configuration.sampleRate&&(n.audioSamplingRate=e.configuration.sampleRate),e.configuration.numberOfChannels&&(n.channelsCount=e.configuration.numberOfChannels)),t&&t.configuration&&(t.configuration.codec&&(n.videoCodec=t.configuration.codec,n.codecs=n.codecs?n.codecs+","+n.videoCodec:n.videoCodec),t.configuration.bitrate&&(n.videoBandwidth=t.configuration.bitrate,n.bandwidth+=n.videoBandwidth),t.configuration.framerate&&(n.frameRate=t.configuration.framerate),t.configuration.width&&(n.width=t.configuration.width),t.configuration.height&&(n.height=t.configuration.height),t.configuration.colorSpace&&t.configuration.colorSpace.transfer))switch(t.configuration.colorSpace.transfer){case"pq":n.hdr="PQ";break;case"hlg":n.hdr="HLG";break;case"bt709":n.hdr="SDR"}return n}function iE(e){return e.allowedByApplication&&e.allowedByKeySystem&&0==e.disabledUntilTime}function ik(e){return e.filter(function(e){return iE(e)})}function iI(e,t,n,i){var r=e,a=e.filter(function(e){return e.primary});a.length&&(r=a);var o=r.length?r[0].language:"";if(r=r.filter(function(e){return e.language==o}),t){var s=iu(ir(t),e.map(function(e){return e.language}));s&&(r=e.filter(function(e){return ir(e.language)==s}))}if(r=r.filter(function(e){return e.forced==i}),n){if((e=iC(r,n)).length)return e}else if((e=r.filter(function(e){return 0==e.roles.length})).length)return e;return(e=r.map(function(e){return e.roles}).reduce(n5,[])).length?iC(r,e[0]):r}function iC(e,t){return e.filter(function(e){return e.roles.includes(t)})}function iM(e,t){t.length&&(t=t.filter(function(t){return nq(e.codecs)==nq(t.codecs)}).sort(function(e,t){return e.bandwidth&&t.bandwidth&&e.bandwidth!=t.bandwidth?e.bandwidth-t.bandwidth:(e.width||0)-(t.width||0)}),e.trickModeVideo=t[0],t.length>1&&(t=t.find(function(t){return e.width==t.width&&e.height==t.height})))&&(e.trickModeVideo=t)}function iP(e){return"audio"==e.type?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:"video"==e.type?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}function iD(e,t,n){if(0==n.autoShowText)return!1;if(1==n.autoShowText)return!0;var i=ir(n.preferredTextLanguage);return(t=ir(t.language),2==n.autoShowText)?ie(t,i):3==n.autoShowText?!!e&&(e=ir(e.language),ie(t,i)&&!ie(e,t)):(Y("Invalid autoShowText setting!"),!1)}function iR(e){var t={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]};e=S(e);for(var n=e.next();!n.done;n=e.next()){var i={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:(n=n.value)?nK(n):"",codecs:n?nW(n):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"video",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};i.fullMimeTypes.add(nB(i.mimeType,i.codecs)),n.startsWith("audio/")?(i.type="audio",t.audio=i):t.video=i}return t}q("shaka.util.StreamUtils",id),id.meetsRestrictions=ih;var iL=new Map,iO=0,iN=new Map().set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),ij=new Map().set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdj
1FDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function iU(){var t=this;this.m=null,this.B=!1,this.u=new W,this.j=new ee,navigator.connection&&navigator.connection.addEventListener&&this.j.G(navigator.connection,"change",function(){if(t.B&&t.g.useNetworkInformation){t.u=new W,t.g&&t.u.configure(t.g.advanced);var e=t.chooseVariant();e&&navigator.onLine&&t.m(e,t.g.clearBufferSwitch,t.g.safeMarginSwitch)}}),this.o=[],this.I=1,this.J=!1,this.h=this.l=this.g=this.C=null,this.D=new n4(function(){if(t.B&&(t.g.restrictToElementSize||t.g.restrictToScreenSize)){var e=t.chooseVariant();e&&t.m&&t.m(e,t.g.clearBufferSwitch,t.g.safeMarginSwitch)}}),this.F=e,"documentPictureInPicture"in e&&this.j.G(e.documentPictureInPicture,"enter",function(){t.F=e.documentPictureInPicture.window,t.D&&t.D.wb(),t.j.Ba(t.F,"pagehide",function(){t.F=e,t.D&&t.D.wb()})}),this.H=this.i=null}function iB(e){if(!e.J){var t=e.u;if(!(t.g>=t.i))return;e.J=!0,e.C-=(e.g.switchInterval-e.g.minTimeToSwitch)*1e3}Date.now()-e.C<1e3*e.g.switchInterval||(t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.m&&e.m(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch))}function iF(e,t,n,i,r){if(e.H){var a=e.H.di();a&&(n=n.filter(function(e){return!e.bandwidth||!a||e.bandwidth<=a}))}return t&&(n=n.filter(function(e){return ih(e,t,{width:r,height:i})})),n.sort(function(e,t){return e.bandwidth-t.bandwidth})}(p=iU.prototype).stop=function(){this.m=null,this.B=!1,this.o=[],this.I=1,this.l=this.C=null,this.h&&(this.h.disconnect(),this.h=null),this.D.stop(),this.H=this.i=null},p.release=function(){this.j.release(),this.D=null},p.init=function(e){this.m=e},p.chooseVariant=function(){var e=1/0,t=1/0;if(this.g.restrictToScreenSize){var n=this.g.ignoreDevicePixelRatio?1:this.F.devicePixelRatio;e=this.F.screen.height*n,t=this.F.screen.width*n}if(this.h&&this.g.restrictToElementSize){n=this.g.ignoreDevicePixelRatio?1:this.F.devicePixelRatio;var i=this.l.clientHeight,r=this.l.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.l&&(i=this.i.height,r=this.i.width),e=Math.min(e,i*n),t=Math.min(t,r*n)}if((n=this.o.filter(function(e){return e&&!(e.audio&&e.audio.fastSwitching||e.video&&e.video.fastSwitching)})).length||(n=this.o),i=n,n.length!=this.o.length&&(i=this.o.filter(function(e){return e&&(!!e.audio&&!!e.audio.fastSwitching||!!e.video&&!!e.video.fastSwitching)})),n=iF(this,this.g.restrictions,i,1/0,1/0),e!=1/0||t!=1/0){for(r=(n=S(n=function(e){var t=[];e=S(e);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&(n=n.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort(function(e,t){return e.width-t.width})}(n))).next();!r.done;r=n.next())if((r=r.value).height>=e&&r.width>=t){e=r.height,t=r.width;break}n=iF(this,this.g.restrictions,i,e,t)}for(e=this.getBandwidthEstimate(),i.length&&!n.length&&(n=[(n=iF(this,null,i,1/0,1/0))[0]]),t=n[0]||null,i=0;i<n.length;i++){r=n[i];for(var a=isNaN(this.I)?1:Math.abs(this.I),o=a*r.bandwidth/this.g.bandwidthDowngradeTarget,s={bandwidth:1/0},u=i+1;u<n.length;u++)if(r.bandwidth!=n[u].bandwidth){s=n[u];break}a=a*s.bandwidth/this.g.bandwidthUpgradeTarget,t&&r&&e>=o&&e<=a&&(t.bandwidth!=r.bandwidth||t.bandwidth==r.bandwidth&&t.video&&r.video&&(t.video.width<r.video.width||t.video.height<r.video.height))&&(t=r)}return this.C=Date.now(),t},p.enable=function(){this.B=!0,this.o.length&&this.trySuggestStreams()},p.disable=function(){this.B=!1},p.segmentDownloaded=function(e,t,n,i){var r=e;this.g.removeLatencyFromFirstPacketTime&&i&&1===i.packetNumber&&i.timeToFirstByte&&(r=e-i.timeToFirstByte),r>=this.g.cacheLoadThreshold&&this.u.sample(r,t),n&&null!=this.C&&this.B&&iB(this)},p.trySuggestStreams=function(){null!=this.C&&this.B&&iB(this)},p.getBandwidthEstimate=function(){var e=this.g.defaultBandwidthEstimate;return(navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(e=1e6*navigator.connection.downlink),navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth)?e:(e=this.u.getBandwidthEstimate(e),this.H?this.H.getBandwidthEstimate(e):e)},p.setVariants=function(e){this.o=e},p.playbackRateChanged=function(e){this.I=e},p.setMediaElement=function(t){function n(){i.D.ea(iV)}var i=this;this.l=t,this.h&&(this.h.disconnect(),this.h=null),this.l&&"ResizeObserver"in e&&(this.h=new ResizeObserver(n),this.h.observe(this.l)),this.j.G(t,"enterpictureinpicture",function(e){e.pictureInPictureWindow&&(i.i=e.pictureInPictureWindow,i.j.G(i.i,"resize",n))}),this.j.G(t,"leavepictureinpicture",function(){i.i&&i.j.Na(i.i,"resize",n),i.i=null})},p.setCmsdManager=function(e){this.H=e},p.configure=function(e){this.g=e,this.u&&this.g&&this.u.configure(this.g.advanced)},q("shaka.abr.SimpleAbrManager",iU),iU.prototype.configure=iU.prototype.configure,iU.prototype.setCmsdManager=iU.prototype.setCmsdManager,iU.prototype.setMediaElement=iU.prototype.setMediaElement,iU.prototype.playbackRateChanged=iU.prototype.playbackRateChanged,iU.prototype.setVariants=iU.prototype.setVariants,iU.prototype.getBandwidthEstimate=iU.prototype.getBandwidthEstimate,iU.prototype.trySuggestStreams=iU.prototype.trySuggestStreams,iU.prototype.segmentDownloaded=iU.prototype.segmentDownloaded,iU.prototype.disable=iU.prototype.disable,iU.prototype.enable=iU.prototype.enable,iU.prototype.chooseVariant=iU.prototype.chooseVariant,iU.prototype.init=iU.prototype.init,iU.prototype.release=iU.prototype.release,iU.prototype.stop=iU.prototype.stop;var iV=1;function iH(e,t){if(e===t||!e.length||!t.length)return!0;e=S(e);for(var n=e.next();!n.done;n=e.next()){if(iX(n=n.value))return!0;for(var i=S(t),r=i.next();!r.done;r=i.next())if(r=r.value,n.keySystem===r.keySystem||iX(r))return!0}return!1}function iq(e,t){if(!e.length)return t;if(!t.length)return e;var n=[];e=S(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=S(t),a=r.next();!a.done;a=r.next())if(a=a.value,i.keySystem==a.keySystem){r=new Map;for(var o=S((i.initData||[]).concat(a.initData||[])),s=o.next();!s.done;s=o.next())s=s.value,r.set(s.keyId,s);r=Array.from(r.values()),o=i.keyIds&&a.keyIds?new Set([].concat(x(i.keyIds),x(a.keyIds))):i.keyIds||a.keyIds,n.push({keySystem:i.keySystem,licenseServerUri:i.licenseServerUri||a.licenseServerUri,distinctiveIdentifierRequired:i.distinctiveIdentifierRequired||a.distinctiveIdentifierRequired,persistentStateRequired:i.persistentStateRequired||a.persistentStateRequired,videoRobustness:i.videoRobustness||a.videoRobustness,audioR
1obustness:i.audioRobustness||a.audioRobustness,serverCertificate:i.serverCertificate||a.serverCertificate,serverCertificateUri:i.serverCertificateUri||a.serverCertificateUri,initData:r,keyIds:o});break}else iX(i)?n.push(i):iX(a)&&n.push(a)}return n}function iG(e){return"org.w3.clearkey"===e}function iK(e){return!!e&&!!e.match(/^com\.widevine\.alpha/)}function iW(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function iz(e){return!!e&&!!e.match(/^com\.apple\.fps/)}function iX(e){return!!(e=e.licenseServerUri)&&e.startsWith("data:application/json;base64,")}function iY(e,t,n,i){return e+"#"+t+"#"+n+"#"+(i=[].concat(x(new Set(i))).sort().join("#"))}q("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});var iJ=new ei(function(){return eP(new Uint8Array([0]))}),iQ=new Map;function i$(e,t){var n=i0();this.l=null==e.maxAttempts?n.maxAttempts:e.maxAttempts,this.j=null==e.baseDelay?n.baseDelay:e.baseDelay,this.o=null==e.fuzzFactor?n.fuzzFactor:e.fuzzFactor,this.m=null==e.backoffFactor?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=void 0!==t&&t)&&(this.g=1)}function iZ(e){var t,n;return L(function(i){if(1==i.h){if(e.g>=e.l)if(e.i)e.g=1,e.h=e.j;else throw new eN(2,7,1010);return(t=e.g,e.g++,0==t)?i.return():(n=e.h*(1+(2*Math.random()-1)*e.o),i.g(new Promise(function(e){new n4(e).ea(n/1e3)}),2))}e.h*=e.m,i.j()})}function i0(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function i1(){var e,t,n=new Promise(function(n,i){e=n,t=i});return n.resolve=e,n.reject=t,n}function i2(e,t){this.promise=e,this.i=t,this.g=null}function i3(e){return new i2(Promise.reject(e),function(){return Promise.resolve()})}function i4(){var e=Promise.reject(new eN(2,7,7001));return e.catch(function(){}),new i2(e,function(){return Promise.resolve()})}function i5(e){return new i2(Promise.resolve(e),function(){return Promise.resolve()})}function i6(e){return new i2(e,function(){return e.catch(function(){})})}function i8(e){return new i2(Promise.all(e.map(function(e){return e.promise})),function(){return Promise.all(e.map(function(e){return e.abort()}))})}function i9(t,n){if(n)if(n instanceof Map)for(var i=S(n.keys()),r=i.next();!r.done;r=i.next())Object.defineProperty(this,r=r.value,{value:n.get(r),writable:!0,enumerable:!0});else for(i in n)Object.defineProperty(this,i,{value:n[i],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function i7(e){var t,n=new i9(e.type);for(t in e)Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0});return n}i1.prototype.resolve=function(){},i1.prototype.reject=function(){},i2.prototype.abort=function(){return this.g||(this.g=this.i()),this.g},i2.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},i2.prototype.Xa=function(e,t){function n(n){return function(s){if(r.g&&n)a.reject(o);else{var u=n?e:t;u?i=function(e,t,n){try{var i=e(t);if(i&&i.promise&&i.abort)return n.resolve(i.promise),function(){return i.abort()};return n.resolve(i),function(){return Promise.resolve(i).then(function(){},function(){})}}catch(e){return n.reject(e),function(){return Promise.resolve()}}}(u,s,a):(n?a.resolve:a.reject)(s)}}}function i(){return a.reject(o),r.abort()}var r=this,a=new i1;a.catch(function(){});var o=new eN(2,7,7001);return this.promise.then(n(!0),n(!1)),new i2(a,function(){return i()})},m.Object.defineProperties(i2.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}}),q("shaka.util.AbortableOperation",i2),i2.prototype.chain=i2.prototype.Xa,i2.prototype.finally=i2.prototype.finally,i2.all=i8,i2.prototype.abort=i2.prototype.abort,i2.notAbortable=i6,i2.completed=i5,i2.aborted=i4,i2.failed=i3,i9.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},i9.prototype.stopImmediatePropagation=function(){this.g=!0},i9.prototype.stopPropagation=function(){},q("shaka.util.FakeEvent",i9);var re={vl:"abrstatuschanged",wl:"adaptation",xl:"audiotrackchanged",yl:"audiotrackschanged",zl:"boundarycrossed",Al:"buffering",Bl:"canupdatestarttime",Cl:"complete",Dl
1:"currentitemchanged",El:"downloadcompleted",Fl:"downloadfailed",Gl:"downloadheadersreceived",Hl:"drmsessionupdate",Il:"emsg",Ol:"itemsinserted",Pl:"itemsremoved",fm:"prft",Error:"error",Jl:"expirationupdated",Kl:"firstquartile",Ll:"gapjumped",Ql:"keystatuschanged",Tl:"loaded",Ul:"loading",Wl:"manifestparsed",Xl:"manifestupdated",Yl:"mediaqualitychanged",Zl:"mediasourcerecovered",$l:"metadataadded",Metadata:"metadata",am:"midpoint",bm:"nospatialvideoinfo",dm:"onstatechange",gm:"ratechange",jm:"segmentappended",lm:"sessiondata",nm:"spatialvideoinfo",om:"stalldetected",pm:"started",qm:"statechanged",rm:"streaming",sm:"textchanged",tm:"texttrackvisibility",um:"thirdquartile",vm:"timelineregionadded",wm:"timelineregionenter",xm:"timelineregionexit",ym:"trackschanged",Am:"unloading",Cm:"variantchanged"};function rt(){this.ab=new Z,this.xe=this}function rn(){this.g=[]}function ri(e,t){e.g.push(t.finally(function(){tS(e.g,t)}))}function rr(e,t,n,i,r,a,o){rt.call(this),this.i=null,this.j=!1,this.u=new rn,this.g=new Set,this.h=new Set,this.o=e||null,this.m=t||null,this.B=n||null,this.C=i||null,this.D=r||null,this.H=a||null,this.F=o||null,this.l=new Map}function ra(e,t,n,i){i=void 0!==i&&i,n=n||rh;var r=rp.get(e);(!r||n>=r.priority)&&rp.set(e,{priority:n,xf:t,Hk:i})}function ro(e,t){for(var n=S(e.g),i=n.next();!i.done;i=n.next())t.g.add(i.value);for(n=(e=S(e.h)).next();!n.done;n=e.next())t.h.add(n.value)}function rs(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===n?null:n}}function ru(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.u)return!1}return!0}function rl(){this.g=0}function rd(e,t,n){i2.call(this,e,t),this.h=n}rt.prototype.addEventListener=function(e,t){this.ab&&this.ab.push(e,t)},rt.prototype.removeEventListener=function(e,t){this.ab&&this.ab.remove(e,t)},rt.prototype.dispatchEvent=function(e){if(!this.ab)return!0;var t=this.ab.get(e.type)||[],n=this.ab.get("All");for(n&&(t=t.concat(n)),n=(t=S(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.xe,e.currentTarget=this.xe;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},rt.prototype.release=function(){this.ab=null},rn.prototype.destroy=function(){for(var e=[],t=S(this.g),n=t.next();!n.done;n=t.next())(n=n.value).promise.catch(function(){}),e.push(n.abort());return this.g=[],Promise.all(e)},w(rr,rt),(p=rr.prototype).configure=function(e){this.i=e},p.Kk=function(e){this.g.add(e)},p.jl=function(e){this.g.delete(e)},p.rj=function(){this.g.clear()},p.Lk=function(e){this.h.add(e)},p.kl=function(e){this.h.delete(e)},p.sj=function(){this.h.clear()},p.Sh=function(){this.l.clear()},p.destroy=function(){return this.j=!0,this.g.clear(),this.h.clear(),this.l.clear(),rt.prototype.release.call(this),this.u.destroy()},p.request=function(e,t,n){var i=this,r=new rl;if(this.j){var a=Promise.reject(new eN(2,7,7001));return a.catch(function(){}),new rd(a,function(){return Promise.resolve()},r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?tO(t.retryParameters):i0(),t.uris=tO(t.uris);var o=(a=function(e,t,n,i){function r(e){a=a.Xa(function(){return n.body&&(n.body=eP(n.body)),e(t,n,i)})}var a=i5(void 0);e.D&&r(e.D),e=S(e.g);for(var o=e.next();!o.done;o=e.next())r(o.value);return a.Xa(void 0,function(e){if(e instanceof eN&&7001==e.code)throw e;throw new eN(2,1,1006,e)})}(this,e,t,n)).Xa(function(){return function e(t,n,i,r,a,o,s,u){t.i.forceHTTP&&(i.uris[o]=i.uris[o].replace("https://","http://")),t.i.forceHTTPS&&(i.uris[o]=i.uris[o].replace("http://","https://")),o>0&&t.H&&t.H(n,r,i.uris[o],i.uris[o-1]);var l=new ef(i.uris[o]),d=l.bc,c=!1;d||(eg(l,d=(d=location.protocol).slice(0,-1)),i.uris[o]=l.toString()),d=d.toLowerCase();var h=(d=rp.get(d))?d.xf:null;
1if(!h)return i3(new eN(2,1,1e3,l));var p=d.Hk;(l=t.l.get(l.Ab))&&(i.headers["common-access-token"]=l);var f,g=null,m=null,v=!1,y=!1;return i6(iZ(a)).Xa(function(){if(t.j)return i4();f=Date.now();var e=0;i.requestStartTime=Date.now();var a=h(i.uris[o],i,n,function(a,o,s){g&&g.stop(),m&&m.ea(l/1e3),t.o&&n==rc&&(i.packetNumber=++e,t.o(a,o,ru(r),i,r),c=!0,u.g=s)},function(e){y=!0,i.timeToFirstByte=Date.now()-i.requestStartTime,t.m&&t.m(e,i,n)},{minBytesForProgressEvents:t.i.minBytesForProgressEvents});if(!p)return a;var s=i.retryParameters.connectionTimeout;s&&(g=new n4(function(){v=!0,a.abort()})).ea(s/1e3);var l=i.retryParameters.stallTimeout;return l&&(m=new n4(function(){v=!0,a.abort()})),a}).Xa(function(e){g&&g.stop(),m&&m.stop(),void 0==e.timeMs&&(e.timeMs=Date.now()-f);var r=e.headers["common-access-token"];if(r){var a=new ef(e.uri);t.l.set(a.Ab,r)}return r={response:e,fk:c},!y&&t.m&&t.m(e.headers,i,n),t.B&&t.B(i,e),r},function(l){if(g&&g.stop(),m&&m.stop(),t.C){var d=null,c=0;l instanceof eN&&(d=l,1001==l.code&&(c=l.data[1])),t.C(i,d,c,v)}if(t.j)return i4();if(v&&(l=new eN(1,1,1003,i.uris[o],n)),l instanceof eN){if(7001==l.code)throw l;if(1010==l.code)throw s;if(1==l.severity){if((d=new i9("retry",d=new Map().set("error",l))).cancelable=!0,t.dispatchEvent(d),d.defaultPrevented)throw l;return o=(o+1)%i.uris.length,e(t,n,i,r,a,o,l,u)}}throw l})}(i,e,t,n,new i$(t.retryParameters,!1),0,null,r)}),s=o.Xa(function(t){var r=i,a=i5(void 0);r=S(r.h);for(var o=r.next(),s={};!o.done;s={Ji:void 0},o=r.next())s.Ji=o.value,a=a.Xa(function(i){return function(){var r=t.response;return r.data&&(r.data=eP(r.data)),(0,i.Ji)(e,r,n)}}(s));return a.Xa(function(){return t},function(e){var t=2;if(e instanceof eN){if(7001==e.code)throw e;t=e.severity}throw new eN(t,1,1007,e)})}),u=Date.now(),l=0;a.promise.then(function(){l=Date.now()-u},function(){});var d=0;o.promise.then(function(){d=Date.now()},function(){});var c=s.Xa(function(r){var a=Date.now()-d,o=r.response;return o.timeMs+=l,o.timeMs+=a,r.fk||!i.o||o.fromCache||"HEAD"==t.method||e!=rc||i.o(o.timeMs,o.data.byteLength,ru(n),t,n),i.F&&i.F(e,o,n),o},function(e){throw e&&(e.severity=2),e});return a=new rd(c.promise,function(){return c.abort()},r),ri(this.u,a),a},q("shaka.net.NetworkingEngine",rr),rr.prototype.request=rr.prototype.request,rr.prototype.destroy=rr.prototype.destroy,rr.makeRequest=rs,rr.defaultRetryParameters=function(){return i0()},rr.prototype.clearCommonAccessTokenMap=rr.prototype.Sh,rr.prototype.clearAllResponseFilters=rr.prototype.sj,rr.prototype.unregisterResponseFilter=rr.prototype.kl,rr.prototype.registerResponseFilter=rr.prototype.Lk,rr.prototype.clearAllRequestFilters=rr.prototype.rj,rr.prototype.unregisterRequestFilter=rr.prototype.jl,rr.prototype.registerRequestFilter=rr.prototype.Kk,rr.unregisterScheme=function(e){rp.delete(e)},rr.registerScheme=ra,rr.prototype.configure=rr.prototype.configure,rr.NumBytesRemainingClass=rl,w(rd,i2),rr.PendingRequest=rd;var rc=1;rr.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8},rr.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var rh=3;rr.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var rp=new Map;function rf(e){this.g=!1,this.h=new i1,this.i=e}function rg(e,t){if(e.g){if(t instanceof eN&&7003==t.code)throw t;throw new eN(2,7,7003,t)}}function rm(e,t){var n=[];e=S(e);for(var i=e.next();!i.done;i=e.next())n.push(t(i.value));return n}function rv(e){for(var t=new Map,n=S(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function ry(e){var t={};return e.forEach(function(e,n){t[n]=e}),t}function rb(e,t){this.h=eL(e),this.i=t==rw,this.g=0}function r_(){return new eN(2,3,3e3)}rf.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then(function(){e.h.resolve()},function(){e.h.resolve()}))},(p=rb.prototype).Ka=function(){return this.g<this.h.byteLength},p.Oa=function(){return this.g},p.getLength=function(){return this.h.byteLength},p.Z=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch(e){throw r_()}},p.Da=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch(e){throw r_()}},p.W=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch(e){throw r_()}},p.ah=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch(e){throw r_()}},p.vd=function(){try{if(this.i)var e=this.h.getUint32(this.g,!0),t=this.h.getUint32(this.g+4,!0);else t=this.h.getUint32(this.g,!1),e=this.h.getUint32(this.g+4,!1)}catch(e){throw r_()}if(t>2097151)throw new eN(2,3,3001);return this.g+=8,0x100000000*t+e},p.Ob=function(e,t){if(this.g+e>this.h.byteLength)throw r_();var n=eD(this.h,this.g,e);return this.g+=e,t?new Uint8Array(n):n},p.skip=function(e){if(this.g+e>this.h.byteLength)throw r_();this.g+=e},p.Ki=function(e){if(this.g<e)throw r_();this.g-=e},p.seek=function(e){if(e<0||e>this.h.byteLength)throw r_();this.g=e},p.ud=function(){for(var e=this.g;this.Ka()&&0!=this.h.getUint8(this.g);)this.g+=1;return e=eD(this.h,e,this.g-e),this.g+=1,eU(e)},q("shaka.util.DataViewReader",rb),rb.prototype.readTerminatedString=rb.prototype.ud,rb.prototype.seek=rb.prototype.seek,rb.prototype.rewind=rb.prototype.Ki,rb.prototype.skip=rb.prototype.skip,rb.prototype.readBytes=rb.prototype.Ob,rb.prototype.readUint64=rb.prototype.vd,rb.prototype.readInt32=rb.prototype.ah,rb.prototype.readUint32=rb.prototype.W,rb.prototype.readUint16=rb.prototype.Da,rb.prototype.readUint8=rb.prototype.Z,rb.prototype.getLength=rb.prototype.getLength,rb.prototype.getPosition=rb.prototype.Oa,rb.prototype.hasMoreData=rb.prototype.Ka;var rw=1;function rT(){this.i=new Map,this.h=new Map,this.g=!1}function rS(e){for(var t=rM(e);e.reader.Ka()&&!e.parser.g;)e.parser.rd(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function rx(e){for(var t=rM(e),n=e.reader.W(),i=0;i<n&&(e.parser.rd(e.start+t,e.reader,e.partialOkay,e.stopOnPartial),!e.parser.g);i++);}function rA(e){var t=rM(e);for(e.reader.skip(78);e.reader.Ka()&&!e.parser.g;)e.parser.rd(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function rE(e){var t=rM(e);e.reader.skip(8);var n=e.reader.Da();for(e.reader.skip(6),2==n?e.reader.skip(48):e.reader.skip(12),1==n&&e.reader.skip(16);e.reader.Ka()&&!e.parser.g;)e.parser.rd(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function rk(e,t){return function(n){e(n.reader.Ob(n.reader.getLength()-n.reader.Oa(),t))}}function rI(e){var t=0;e=S(e);for(var n=e.next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function rC(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function rM(e){return 8+8*!!e.has64BitSize+4*(null!=e.flags)}rb.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:1},(p=rT.prototype).box=function(e,t){return e=rI(e),this.i.set(e,rP),this.h.set(e,t),this},p.S=function(e,t){return e=rI(e),this.i.set(e,rD),this.h.set(e,t),this},p.stop=function(){this.g=!0},p.parse=function(e,t,n){for(e=new rb(e,0),this.g=!1;e.Ka()&&!this.g;)this.rd(0,e,t,n)},p.rd=function(e,t,n,i){var r=t.Oa();if(i&&r+8>t.getLength())this.g=!0;else{var a=t.W(),o=t.W(),s=rC(o),u=!1;switch(a){case 0:a=t.getLength()-r;break;case 1:if(i&&t.Oa()+8>t.getLength()){this.g=!0;return}a=t.vd(),u=!0}var l=this.h.get(o);if(l){var d=null,c=null;if(this.i.get(o)==rD){if(i&&t.Oa()+4>t.getLength()){this.g=!0;return}
1d=(c=t.W())>>>24,c&=0xffffff}o=r+a,n&&o>t.getLength()&&(o=t.getLength()),i&&o>t.getLength()?this.g=!0:(o-=t.Oa(),l({name:s,parser:this,partialOkay:n||!1,stopOnPartial:i||!1,version:d,flags:c,reader:t=new rb(t=o>0?t.Ob(o,!1):new Uint8Array(0),0),size:a,start:r+e,has64BitSize:u}))}else t.skip(Math.min(r+a-t.Oa(),t.getLength()-t.Oa()))}},q("shaka.util.Mp4Parser",rT),rT.headerSize=rM,rT.typeToString=rC,rT.allData=rk,rT.audioSampleEntry=rE,rT.visualSampleEntry=rA,rT.sampleDescription=rx,rT.children=rS,rT.prototype.parseNext=rT.prototype.rd,rT.prototype.parse=rT.prototype.parse,rT.prototype.stop=rT.prototype.stop,rT.prototype.fullBox=rT.prototype.S,rT.prototype.box=rT.prototype.box;var rP=0,rD=1;function rR(e){var t=this;this.g=[],this.data=[],new rT().box("moov",rS).box("moof",rS).S("pssh",function(e){if(!(e.version>1)){var n=eD(e.reader.h,-12,e.size);t.data.push(n),e=e.reader.Ob(16,!1),t.g.push(eJ(e))}}).parse(e)}function rL(e,t,n,i){var r=e.length,a=12+t.length+4+r;i>0&&(a+=4+16*n.size);var o=new Uint8Array(a),s=eL(o),u=0;if(s.setUint32(u,a),u+=4,s.setUint32(u,0x70737368),u+=4,i<1?s.setUint32(u,0):s.setUint32(u,0x1000000),u+=4,o.set(t,u),u+=t.length,i>0)for(s.setUint32(u,n.size),u+=4,n=(t=S(n)).next();!n.done;n=t.next())n=eY(n.value),o.set(n,u),u+=n.length;return s.setUint32(u,r),o.set(e,u+4),o}function rO(e){var t=this;this.D=e,this.l=this.B=null,this.ia=this.T=!1,this.J=0,this.g=null,this.o=new ee,this.i=new Map,this.Y=[],this.C=new Map,this.K=!1,this.m=new i1,this.h=null,this.u=function(n){2==n.severity&&t.m.reject(n),e.onError(n)},this.ka=new Map,this.ma=new Map,this.M=new n4(function(){var e,n;return e=t.ka,void((n=t.ma).clear(),e.forEach(function(e,t){return n.set(t,e)}),(e=Array.from(n.values())).length&&e.every(function(e){return"expired"==e})&&t.u(new eN(2,6,6014)),t.D.uf(ry(n)))}),this.P=!1,this.N=[],this.na=!1,this.F=new n4(function(){t.i.forEach(function(e,n){var i=e.Wg,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(t.D.onExpirationUpdated(n.sessionId,r),e.Wg=r)})}),this.m.catch(function(){}),this.j=new rf(function(){var e;return L(function(n){switch(n.h){case 1:return t.o.release(),t.o=null,t.m.reject(),t.F.stop(),t.F=null,t.M.stop(),t.M=null,n.g(rJ(t),2);case 2:if(!t.l){n.A(3);break}return n.m(4),n.g(t.l.setMediaKeys(null),6);case 6:n.o(5);break;case 4:e=n.l(),Y("DrmEngine.destroyNow_ exception",e);case 5:t.l=null;case 3:t.g=null,t.B=null,t.C=new Map,t.h=null,t.u=function(){},t.D=null,t.O=!1,t.I=null,n.j()}})}),this.O=!1,this.H=this.I=null,this.V=function(){return!1}}function rN(e,t,n,i){i=void 0===i||i,e.C=new Map,n=S(n);for(var r=n.next();!r.done;r=n.next())e.C.set(r.value,{initData:null,initDataType:null});for(r=(n=S(e.h.persistentSessionsMetadata)).next();!r.done;r=n.next())r=r.value,e.C.set(r.sessionId,{initData:r.initData,initDataType:r.initDataType});return e.P=e.C.size>0,rj(e,t,i)}function rj(t,n,i){var r,a,o,s,u,l,d,c,h,p,f,g,m,v,y;return L(function(b){if(1==b.h){for(r0(t.h.clearKeys,n),r=n.some(function(e){return!!e.video&&!!e.video.drmInfos.length||!!e.audio&&!!e.audio.drmInfos.length}),a=rv(t.h.servers),o=rv(t.h.advanced||{}),!r&&i&&function(e,t){var n=[];for(t.forEach(function(e,t){n.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}),t=(e=S(e)).next();!t.done;t=e.next())(t=t.value).video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}(n,a),s=new WeakSet,l=(u=S(n)).next();!l.done;l=u.next())for(c=(d=S(rQ(l.value))).next();!c.done;c=d.next())h=c.value,s.has(h)||(s.add(h),function(t,n,i,r){var a=t.keySystem;a&&("org.w3.clearkey"!=a||!t.licenseServerUri)&&(n.size&&n.get(a)&&(t.licenseServerUri=n=n.get(a)),t.keyIds||(t.keyIds=new Set),(i=i.get(a))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=i.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=i.persistentStateRequired),t.serverCertificate||(t.serverCertificate=i.serverCertificate),i.sessionType&&(t.sessionType=i.sessionType),t.serverCertificateUri||(t.serverCertificateUri=i.serverCertificateUri)),r[a]&&(t.keySystem=r[a]),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==a&&(t.keySystem="com.chromecast.playready"))}(h,a,o,t.h.keySystemsMapping));for(p=function(e,n){var i=[];e=S(e);for(var r=e.next();!r.done;r=e.next()){var a=(r=r.value)[n]||o.has(r.keySystem)&&o.get(r.keySystem)[n]||"";
1if(""==a&&iK(r.keySystem)&&("audioRobustness"==n?a=[t.h.defaultAudioRobustnessForWidevine]:"videoRobustness"==n&&(a=[t.h.defaultVideoRobustnessForWidevine])),"string"==typeof a)i.push(r);else if(Array.isArray(a)){0===a.length&&(a=[""]),a=S(a);for(var s=a.next();!s.done;s=a.next()){var u={};i.push(Object.assign({},r,(u[n]=s.value,u)))}}}return i},f=new WeakSet,m=(g=S(n)).next();!m.done;m=g.next())(v=m.value).video&&!f.has(v.video)&&(v.video.drmInfos=p(v.video.drmInfos,"videoRobustness"),v.video.drmInfos=p(v.video.drmInfos,"audioRobustness"),f.add(v.video)),v.audio&&!f.has(v.audio)&&(v.audio.drmInfos=p(v.audio.drmInfos,"videoRobustness"),v.audio.drmInfos=p(v.audio.drmInfos,"audioRobustness"),f.add(v.audio));return b.g(im(n,t.P,t.O,t.h.preferredKeySystems),2)}return(rg(t.j),r||a.size>0)?(y=rH(t,n),b.return(r?y:y.catch(function(){}))):(t.T=!0,b.return(Promise.resolve()))})}function rU(e){var t;return L(function(n){switch(n.h){case 1:if(e.l.mediaKeys)return n.return();if(!e.I){n.A(2);break}return n.g(e.I,3);case 3:return rg(e.j),n.return();case 2:return n.m(4),e.I=e.l.setMediaKeys(e.B),n.g(e.I,6);case 6:n.o(5);break;case 4:t=n.l(),e.u(new eN(2,6,6003,t.message));case 5:rg(e.j),n.j()}})}function rB(e){var t,n,i;
1return L(function(r){if(1==r.h)return e.C.size?(e.C.forEach(function(t,n){rK(e,n,t)}),r.g(e.m,3)):r.A(2);if(2!=r.h){if((e.g&&e.g.keyIds||new Set([])).size>0&&function(e){for(var t=S(e.g&&e.g.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if("usable"!==e.ka.get(n.value))return!1;return!0}(e))return r.return(e.m);e.K=!1,e.m=new i1,e.m.catch(function(){})}for(n=(t=S((e.g?e.g.initData:[])||[])).next();!n.done;n=t.next())rF(e,(i=n.value).initDataType,i.initData);return r$(e)&&e.m.resolve(),r.return(e.m)})}function rF(e,t,n){if(n.length){try{n=e.h.initDataTransform(n,t,e.g)}catch(n){t=n,n instanceof eN||(t=new eN(2,6,6016,n)),e.u(t);return}if(e.h.ignoreDuplicateInitData){var i=e.i.values();i=S(i);for(var r=i.next();!r.done;r=i.next())if(eM(n,r.value.initData))return;var a=!1;if(e.C.forEach(function(e){!a&&eM(n,e.initData)&&(a=!0)}),a)return}e.K=!0,e.i.size>0&&r$(e)&&(e.m.resolve(),e.K=!1,e.m=new i1,e.m.catch(function(){})),function(e,t,n,i){try{var r=e.B.createSession(i)}catch(t){e.u(new eN(2,6,6005,t.message));return}e.o.G(r,"message",function(t){rW(e)?e.N.push(t):rz(e,t)}),e.o.G(r,"keystatuseschange",function(t){return rX(e,t)}),e.i.set(r,{initData:n,initDataType:t,loaded:!1,Wg:1/0,Fb:null,type:i}),e.h.logLicenseExchange&&ez(n),r.generateRequest(t,n).catch(function(t){if(!e.j.g){e.i.delete(r);var n=t.errorCode;if(n&&n.systemCode){var i=n.systemCode;i<0&&(i+=0x100000000),i="0x"+i.toString(16)}e.u(new eN(2,6,6006,t.message,t,i))}})}(e,t,n,e.g.sessionType)}}
1function rV(e){return Array.from(e=rm(e=e.i.keys(),function(e){return e.sessionId}))}function rH(e,t){var n,i,r,a,o,s;return L(function(u){switch(u.h){case 1:if(!(i=function(e,t,n){for(var i=S(t),r=i.next();!r.done;r=i.next()){r=S(rQ(r.value));for(var a=r.next();!a.done;a=r.next())a=a.value,n.has(a.keySystem)||n.set(a.keySystem,[]),n.get(a.keySystem).push(a)}if(1==n.size&&n.has(""))throw new eN(2,6,6e3);(i=e.h.preferredKeySystems).length||1==(r=rv(e.h.servers)).size&&(i=Array.from(r.keys()));var o=(r=S(i)).next();for(a={};!o.done;a={Ei:void 0},o=r.next()){a.Ei=o.value,o=S(t);for(var s=o.next();!s.done;s=o.next())if(s=s.value.decodingInfos.find(function(e){return function(t){return t.supported&&null!=t.keySystemAccess&&t.keySystemAccess.keySystem==e.Ei}}(a)))return s.keySystemAccess}for(a=(r=S([!0,!1])).next();!a.done;a=r.next())for(a=a.value,s=(o=S(t)).next();!s.done;s=o.next()){s=S(s.value.decodingInfos);for(var u=s.next();!u.done;u=s.next())if((u=u.value).supported&&u.keySystemAccess){var l=u.keySystemAccess.keySystem;if(!i.includes(l)){var d=n.get(l);for(!d&&e.h.keySystemsMapping[l]&&(d=n.get(e.h.keySystemsMapping[l])),d=(l=S(d)).next();!d.done;d=l.next())if(!!d.value.licenseServerUri==a)return u.keySystemAccess}}}return null}(e,t,n=new Map))){if(!navigator.requestMediaKeySystemAccess)throw new eN(2,6,6020);throw new eN(2,6,6001)}if(rg(e.j),u.m(2),i.getConfiguration(),r=e.h.keySystemsMapping[i.keySystem]||i.keySystem,e.g=rZ(e,r,n.get(r)),!e.g.licenseServerUri)throw new eN(2,6,6012,e.g.keySystem);return u.g(i.createMediaKeys(),4);case 4:if(a=u.i,rg(e.j),e.B=a,!(""!=e.h.minHdcpVersion&&"getStatusForPolicy"in e.B)){u.A(5);break}return u.m(6),u.g(e.B.getStatusForPolicy({minHdcpVersion:e.h.minHdcpVersion}),8);case 8:if("usable"!=u.i)throw new eN(2,6,6018);rg(e.j),u.o(5,2);break;case 6:if((o=u.l(2))instanceof eN)throw o;throw new eN(2,6,6019,o.message);case 5:var l,d,c;return e.T=!0,e.F.Ha(e.h.updateExpirationTime),u.g(L(function(t){switch(t.h){case 1:if(!e.B||!e.g)return t.return();if(!e.g.serverCertificateUri||e.g.serverCertificate&&e.g.serverCertificate.length){t.A(2);break}return l=rs([e.g.serverCertificateUri],e.h.retryParameters),t.m(3),d=e.D.nc.request(5,l,{isPreload:e.V()}),t.g(d.promise,5);case 5:c=t.i,e.g.serverCertificate=eD(c.data),t.o(4);break;case 3:throw new eN(2,6,6017,t.l());case 4:if(e.j.g)return t.return();case 2:if(!e.g.serverCertificate||!e.g.serverCertificate.length)return t.return();return t.m(6),t.g(e.B.setServerCertificate(e.g.serverCertificate),8);case 8:t.o(0);break;case 6:throw new eN(2,6,6004,t.l().message)}}),9);case 9:rg(e.j),u.o(0);break;case 2:if(s=u.l(),rg(e.j,s),e.g=null,s instanceof eN)throw s;throw new eN(2,6,6002,s.message)}})}function rq(e){r$(e)&&e.m.resolve()}function rG(e,t){new n4(function(){t.loaded=!0,rq(e)}).ea(r2)}function rK(e,t,n){var i,r,a,o,s,u,l;return L(function(d){switch(d.h){case 1:try{i=e.B.createSession("persistent-license")}catch(t){return r=new eN(2,6,6005,t.message),e.u(r),d.return(Promise.reject(r))}return e.o.G(i,"message",function(t){rW(e)?e.N.push(t):rz(e,t)}),e.o.G(i,"keystatuseschange",function(t){return rX(e,t)}),a={initData:n.initData,initDataType:n.initDataType,loaded:!1,Wg:1/0,Fb:null,type:"persistent-license"},e.i.set(i,a),d.m(2),d.g(i.load(t),4);case 4:return o=d.i,rg(e.j),o||(e.i.delete(i),s=e.h.persistentSessionOnlinePlayback?1:2,e.u(new eN(s,6,6013)),a.loaded=!0),rG(e,a),rq(e),d.return(i);case 2:u=d.l(),rg(e.j,u),e.i.delete(i),l=e.h.persistentSessionOnlinePlayback?1:2,e.u(new eN(l,6,6005,u.message)),a.loaded=!0,rq(e);case 3:return d.return(Promise.resolve())}})}function rW(e){return e.l?e.h.delayLicenseRequestUntilPlayed&&e.l.paused&&!e.na:!e.ia&&e.h.delayLicenseRequestUntilPlayed}function rz(e,t){var n,i,r,a,o,s,u,l,d,c,h,p,f,g;L(function(m){switch(m.h){case 1:if(n=t.target,e.h.logLicenseExchange&&ez(t.message),i=e.i.get(n),r=e.g.licenseServerUri,a=e.h.advanced[e.g.keySystem],"individualization-request"==t.messageType&&a&&a.individualizationServer&&(r=a.individualizationServer),(o=rs([r],e.h.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,o.drmInfo=e.g,i&&(o.initData=i.initData,o.initDataType=i.initDataType),a&&a.headers)for(s in a.headers)o.headers[s]=a.headers[s];if(iG(e.g.keySystem)){var v=o,y=e.g;try{var b=eF(v.body);if(b){var w=JSON.parse(b);w.type||(w.type=y.sessionType,v.body=eV(JSON.stringify(w)))}}catch(e){}}if(iW(e.g.keySystem))if((v=eB(o.body,!0,!0)).includes("PlayReadyKeyMessage")){for(b=(y=S(y=tW(v=tB(v,"PlayReadyKeyMessage"),"HttpHeader"))).next();!b.done;b=y.next())b=tW(w=b.value,"name")[0],w=tW(w,"value")[0],o.headers[tG(b)]=tG(w);o.body=eX(tG(v=tW(v,"Challenge")[0]))}else o.headers["Content-Type"]="text/xml; charset=utf-8";return u=Date.now(),m.m(2),d=e.D.nc.request(2,o,{isPreload:e.V()}),e.Y.push(d),m.g(d.promise,4);case 4:l=m.i,tS(e.Y,d),m.o(3);break;case 2:if(c=m.l(),e.j.g)return m.return();return h=new eN(2,6,6007,c),1==e.i.size?(e.u(h),i&&i.Fb&&i.Fb.reject(h)):(i&&i.Fb&&i.Fb.reject(h),e.i.delete(n),r$(e)&&(e.m.resolve(),e.M.ea(.1))),m.return();case 3:if(e.j.g)return m.return();return e.J+=(Date.now()-u)/1e3,e.h.logLicenseExchange&&ez(l.data),m.m(5),m.g(n.update(l.data),7);case 7:m.o(6);break;case 5:return f=new eN(2,6,6008,(p=m.l())&&p.message||String(p)),e.u(f),i&&i.Fb&&i.Fb.reject(f),m.return();case 6:if(e.j.g)return m.return();g=new i9("drmsessionupdate"),e.D.onEvent(g),i&&(i.Fb&&i.Fb.resolve(),rG(e,i
1)),m.j()}})}function rX(e,t){t=t.target;var n=e.i.get(t),i=!1;t.keyStatuses.forEach(function(t,r){if("string"==typeof r){var a=r;r=t,t=a}if(a=er(),iW(e.g.keySystem)&&16==r.byteLength&&a.Cf()){var o=(a=eL(r)).getUint32(0,!0),s=a.getUint16(4,!0),u=a.getUint16(6,!0);a.setUint32(0,o,!1),a.setUint16(4,s,!1),a.setUint16(6,u,!1)}"status-pending"!=t&&(n.loaded=!0),"expired"==t&&(i=!0),r=eJ(r).slice(0,32),e.ka.set(r,t)});var r=t.expiration-Date.now();(r<0||i&&r<1e3)&&n&&!n.Fb&&(e.i.delete(t),rY(t)),r$(e)&&(e.m.resolve(),e.M.ea(r3))}function rY(e){return L(function(t){return 1==t.h?(t.m(2),t.g(n9(r1,Promise.all([e.close().catch(function(){}),e.closed])),4)):2!=t.h?t.o(0):void(t.l(),t.j())})}function rJ(e){var t;return L(function(n){return t=Array.from(e.i.entries()),e.i.clear(),n.g(Promise.all(t.map(function(t){var n=(t=S(t)).next().value,i=t.next().value;return L(function(t){return 1==t.h?(t.m(2),e.ia||e.C.has(n.sessionId)||"persistent-license"!==i.type||e.h.persistentSessionOnlinePlayback?t.g(rY(n),5):t.g(n.remove(),5)):2!=t.h?t.o(0):void(t.l(),t.j())})})),0)})}function rQ(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function r$(e){var t=e=e.i.values();t=S(t);for(var n=t.next();!n.done;n=t.next())if(!n.value.loaded)return!1;return!0}function rZ(t,n,i){var r=[],a=[],o=[],s=[],u=[],l=new Set,d=new Set;for(function(t,n,i,r,a,o,s,u){var l=[];t=S(t);for(var d=t.next(),c={};!d.done;c={La:void 0},d=t.next()){if(c.La=d.value,n.includes(c.La.encryptionScheme)||n.push(c.La.encryptionScheme),"org.w3.clearkey"==c.La.keySystem&&c.La.licenseServerUri.startsWith("data:application/json;base64,")?l.includes(c.La.licenseServerUri)||l.push(c.La.licenseServerUri):i.includes(c.La.licenseServerUri)||i.push(c.La.licenseServerUri),a.includes(c.La.serverCertificateUri)||a.push(c.La.serverCertificateUri),c.La.serverCertificate&&(r.some(function(e){return function(t){return eM(t,e.La.serverCertificate)}}(c))||r.push(c.La.serverCertificate)),c.La.initData){d=S(c.La.initData);for(var h=d.next(),p={};!h.done;p={Lg:void 0},h=d.next())p.Lg=h.value,o.some(function(e){return function(t){var n=e.Lg;return!!t.keyId&&t.keyId==n.keyId||t.initDataType==n.initDataType&&eM(t.initData,n.initData)}}(p))||o.push(p.Lg)}if(c.La.keyIds)for(h=(d=S(c.La.keyIds)).next();!h.done;h=d.next())s.add(h.value);if(c.La.keySystemUris&&u)for(d=(c=S(c.La.keySystemUris)).next();!d.done;d=c.next())u.add(d.value)}if(1==l.length)i.push(l[0]);else if(l.length>0){for(n=[],r=(l=S(l)).next();!r.done;r=l.next())r=JSON.parse(r=e.atob(r.value.split("data:application/json;base64,").pop())),n.push.apply(n,x(r.keys));l=JSON.stringify({keys:n}),i.push("data:application/json;base64,"+e.btoa(l))}}(i,r,a,s,o,u,l,d),t=t.P?"persistent-license":"temporary",n={keySystem:n,encryptionScheme:r[0],licenseServerUri:a[0],distinctiveIdentifierRequired:i[0].distinctiveIdentifierRequired,persistentStateRequired:i[0].persistentStateRequired,sessionType:i[0].sessionType||t,audioRobustness:i[0].audioRobustness||"",videoRobustness:i[0].videoRobustness||"",serverCertificate:s[0],serverCertificateUri:o[0],initData:u,keyIds:l,mediaTypes:i[0].mediaTypes},d.size>0&&(n.keySystemUris=d),d=(i=S(i)).next();!d.done;d=i.next())(d=d.value).distinctiveIdentifierRequired&&(n.distinctiveIdentifierRequired=d.distinctiveIdentifierRequired),d.persistentStateRequired&&(n.persistentStateRequired=d.persistentStateRequired);return n}function r0(e,t){if(0!=(e=rv(e)).size){e=e1(e),t=S(t);for(var n=t.next();!n.done;n=t.next())(n=n.value).video&&(n.video.drmInfos=[e]),n.audio&&(n.audio.drmInfos=[e])}}(p=rO.prototype).destroy=function(){return this.j.destroy()},p.configure=function(e,t){this.h=e,t&&(this.V=t),this.F&&this.T&&this.g&&this.F.Ha(this.h.updateExpirationTime)},p.Pb=function(e){var t,n,i=this;return L(function(r){if(1==r.h)return i.l===e?r.return():i.B?(i.l=e,i.o.Ba(i.l,"play",function(){for(var e=S(i.N),t=e.next();!t.done;t=e.next())rz(i,t.value);i.na=!0,i.N=[]}),i.l.remote?(i.o.G(i.l.remote,"connect",function(){return rJ(i)}),i.o.G(i.l.remote,"connecting",function(){return rJ(i)}),i.o.G(i.l.remote,"disconnect",function(){return rJ(i)})):"webkitCurrentPlaybackTargetIsWireless"in i.l&&i.o.G(i.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return rJ(i)}),i.H=i.g&&i.g.initData.find(function(e){return e.initData.length>0})||null,t=i.g.keySystem,(n=er().Tg(t))||!i.H&&"com.apple.fps"===i.g.keySystem&&!i.C.size?r.A(2):r.g(rU(i),2)):(i.o.Ba(e,"encrypted",function(){i.u(new eN(2,6,6010))}),r.return());rB(i).catch(function(){}),!n&&(i.H||i.C.size||i.h.parseInbandPsshEnabled)||i.o.G(i.l,"encrypted",function(e){return L(function(t){if(1==t.h)return t.g(rU(i),2);rF(i,e.initDataType,eD(e.initData)),t.j()})}),r.j()})},p.Fg=function(){var e=this,t=this.i.keys();return Array.from(t=rm(t,function(t){var n=e.i.get(t);return{sessionId:t.sessionId,sessionType:n.type,initData:n.initData,initDataType:n.initDataType}}))},p.Sd=function(){var e=1/0,t=this.i.keys();t=S(t);for(var n=t.next();!n.done;n=t.next())isNaN((n=n.value).expiration)||(e=Math.min(e,n.expiration));return e},p.Se=function(){return ry(this.ma)};var r1=1,r2=5,r3=.5;function r4(e,t,n){for(n=void 0===n||n,this.h=e,this.g=new Set([e]),t=(e=S(t=t||[])).next();!t.done;t=e.next())this.add(t.value,n)}function r5(e,t){return e.mimeType==t.mimeType&&tx(e=e.codecs.split(",").map(function(e){return nG(e)}),t=t.codecs.split(",").map(function(e){return nG(e)}))}function r6(){}function r8(){this.g=ae,this.j=new Map().set(ae,2).set(r7,1),this.i=0,this.h=-1}function r9(e,t){var n=e.g!==t;return e.g=t,n&&t===ae&&(e.i=Date.now()),n}r4.prototype.add=function(e,t){var n,i=this.h;
1if(t=void 0===t||t,!(n=!!i.audio!=!!e.audio||!!i.video!=!!e.video||i.language!=e.language)&&(n=i.audio&&e.audio)){n=i.audio;var r=e.audio;n=!(!((!n.channelsCount||!r.channelsCount||n.channelsCount>2||r.channelsCount>2)&&n.channelsCount!=r.channelsCount||n.spatialAudio!==r.spatialAudio||t&&!r5(n,r))&&tx(n.roles,r.roles)&&n.groupId===r.groupId)}return!n&&(n=i.video&&e.video)&&(i=i.video,n=e.video,n=!((!t||r5(i,n))&&tx(i.roles,n.roles))),!n&&(this.g.add(e),!0)},r4.prototype.values=function(){return this.g.values()},q("shaka.media.AdaptationSet",r4),q("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"}),r6.prototype.create=function(){},r6.prototype.configure=function(){},r6.prototype.getConfiguration=function(){},q("shaka.media.AdaptationSetCriteria",r6);var r7=0,ae=1;function at(e,t,n){this.h=e,this.i=t,this.g=n}function an(e,t){return L(function(n){if(1==n.h){var i,r,a;return n.g((i=e.g,r=e.h.drm.preferredKeySystems,a=e.h.drm.keySystemsMapping,r=void 0===r?[]:r,a=void 0===a?{}:a,L(function(e){var n,o,s,u,l,d,c;return 1==e.h?e.g(ip(i,t,t.offlineSessionIds.length>0,r,a),2):(t.textStreams=t.textStreams.filter(function(e){return nZ(e=nB(e.mimeType,e.codecs))}),e.g(L(function(e){switch(e.h){case 1:n=[],s=(o=S(t.imageStreams)).next();case 2:if(s.done){e.A(4);break}if("application/mp4"==(l=(u=s.value).mimeType)&&"mjpg"==u.codecs&&(l="image/jpg"),iN.has(l)){e.A(5);break}if(!(d=ij.get(l))){iN.set(l,!1),e.A(5);break}return e.g(new Promise(function(e){var t=new Image;t.src=d,"decode"in t?t.decode().then(function(){e(!0)}).catch(function(){e(!1)}):t.onload=t.onerror=function(){e(2===t.height)}}),7);case 7:c=e.i,iN.set(l,c);case 5:iN.get(l)&&n.push(u),s=o.next(),e.A(2);break;case 4:t.imageStreams=n,e.j()}}),0))})),2)}if(e.h.streaming.dontChooseCodecs||ic(t,e.h.preferredVideoCodecs,e.h.preferredAudioCodecs,e.h.preferredDecodingAttributes,e.h.preferredTextFormats),!t.variants.some(iE))throw new eN(2,4,4032);return n.return(ar(e,t))})}function ai(e,t){var n=e.h.restrictions;e=e.i;var i=!1;t=S(t.variants);for(var r=t.next();!r.done;r=t.next()){var a=(r=r.value).allowedByApplication;r.allowedByApplication=ih(r,n,e),a!=r.allowedByApplication&&(i=!0)}return i}function ar(e,t){var n=ai(e,t);if(t){var i=e.g?e.g.g:null;if(i&&e.g.B){for(var r=new Set,a=S(t.variants),o=a.next();!o.done;o=a.next())(o=o.value).audio&&r.add(o.audio),o.video&&r.add(o.video);for(a=(r=S(r)).next();!a.done;a=r.next())aa(e,i.keySystem,a.value)}ao(e,t)}return n}function aa(e,t,n){n=S(n.drmInfos);for(var i=n.next();!i.done;i=n.next())if((i=i.value).keySystem==t){for(var r=S(i.initData||[]),a=r.next();!a.done;a=r.next())a=a.value,rF(e.g,a.initDataType,a.initData);(r=e.g).g&&(r.g.mediaTypes!==i.mediaTypes&&(r.g.mediaTypes=i.mediaTypes),iX(i)&&(r.g=rZ(r,r.g.keySystem,[r.g,i])))}}function ao(e,t){function n(e){if(e&&!s.has(e)&&(s.add(e),e.keyIds.size)){e=S(e.keyIds);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=i[r?"00":t];n?as.includes(n)&&o.add(n):a.add(t)}}}var i=e.g?e.g.Se():{},r=(e=Object.keys(i)).length&&"00"==e[0];e=!1;var a=new Set,o=new Set,s=new WeakSet;t=S(t.variants);for(var u=t.next();!u.done;u=t.next()){if((u=u.value).allowedByApplication){if(u.allowedByKeySystem)return}else e=!0;n(u.audio),n(u.video)}throw new eN(2,4,4012,e={hasAppRestrictions:e,missingKeys:Array.from(a),restrictedKeyStatuses:Array.from(o)})}var as=["output-restricted","internal-error"];function au(e,t){var n=null,i=null,r=null,a=null,o=e.W();return 1&t&&(r=e.vd()),2&t&&(a=e.W()),8&t&&(n=e.W()),16&t&&(i=e.W()),{trackId:o,Pd:n,Qd:i,nj:r,Li:a}}function al(e,t){return 1==t?{baseMediaDecodeTime:0x100000000*(t=e.W())+(e=e.W())}:{baseMediaDecodeTime:e.W()}}function ad(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.W(),e.skip(4),{timescale:t,language:String.fromCharCode(((e=e.Da())>>10)+96)+String.fromCharCode(((960&e)>>5)+96)+String.fromCharCode((31&e)+96)}}function ac(e,t,n){var i=e.W(),r=[],a=null;1&n&&(a=e.ah()),4&n&&e.skip(4);for(var o=0;o<i;o++){var s={mh:null,sampleSize:null,Df:null};256&n&&(s.mh=e.W()),512&n&&(s.sampleSize=e.W()),1024&n&&e.skip(4),2048&n&&(s.Df=0==t?e.W():e.ah()),r.push(s)}return{Gm:i,kh:r,ng:a}}function ah(e){e.skip(6),e.skip(2),e.skip(8);var t=e.Da();return e.skip(2),e.skip(2),e.skip(2),{channelCount:t,sampleRate:e=e.Da()+e.Da()/65536}}function ap(e){return{codec:rC(e=e.W())}}function af(e,t){return t=void 0!==t&&t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function ag(e){return(e<10?"0":"")+e}function am(e){this.g=void 0===e?[]:e}function av(e){if(0===e.g.length)throw Error("StreamInfos must have elements");for(var t=[],n=S(e.g),i=n.next();!i.done;i=n.next()){var r=t,a=r.push,o=i.value;i=ak;var s=o.id+1,u=o.stream.width||0,l=o.stream.height||0;"audio"==o.type&&(l=u=0);var d=o.duration*o.timescale,c=Math.floor(d/(aC+1));switch(d=Math.floor(d%(aC+1)),s=ak("tkhd",s=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(ax(s,4)),[0,0,0,0],x(ax(c,4)),x(ax(d,4)),[0,0,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,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(ax(u,2)),[0,0],x(ax(l,2)),[0,0]))),u=ak,l=Math.floor((c=o.duration*o.timescale)/(aC+1)),c=Math.floor(c%(aC+1)),d=(d=o.stream.language).charCodeAt(0)-96<<10|d.charCodeAt(1)-96<<5|d.charCodeAt(2)-96,l=ak("mdhd",l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(ax(o.timescale,4)),x(ax(l,4)),x(ax(c,4)),x(ax(d,2)),[0,0]))),c=o,d=new Uint8Array([]),c.type){case"video":d=aP.value();break;
1case"audio":d=aD.value()}c=ak("hdlr",d);e:{switch(o.type){case"video":o=ak("minf",ak("vmhd",aj.value()),aV.value(),ay(o));break e;case"audio":o=ak("minf",ak("smhd",aU.value()),aV.value(),ay(o));break e}o=new Uint8Array([])}i=i("trak",s,o=u("mdia",l,c,o)),a.call(r,i)}for(n=e.g[0],a=(r=ak).apply,i=Math.floor((o=n.duration*n.timescale)/(aC+1)),o=Math.floor(o%(aC+1)),o=(i=["moov",ak("mvhd",i=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(ax(n.timescale,4)),x(ax(i,4)),x(ax(o,4)),[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])))]).concat,t=x(t),s=[],c=(e=S(e.g)).next();!c.done;c=e.next())l=(u=s).push,c=ak("trex",c=new Uint8Array([0,0,0,0].concat(x(ax(c.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]))),l.call(u,c);return e=ak.apply(am,["mvex"].concat(x(s))),e=a.call(r,am,o.call(i,t,[e,aw(n.stream)])),(n=new Uint8Array((t=aF.value()).byteLength+e.byteLength)).set(t),n.set(e,t.byteLength),n}function ay(e){var t="aac";e.codecs.includes("mp3")?t="mp3":e.codecs.includes("ac-3")?t=er().fe()?"ec-3":"ac-3":e.codecs.includes("ec-3")?t="ec-3":e.codecs.includes("opus")&&(t="opus");var n=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){if(t=e.stream.width||0,n=e.stream.height||0,e.Qa.byteLength>0)var i=ak("avcC",e.Qa);else{i=ak;for(var r=7,a=[],o=[],s=0,u=0,l=0,d=0;d<e.yb.length;d++){var c=aA(e.yb[d]);switch(31&c[0]){case 7:a.push(c),r+=c.length+2;break;case 8:o.push(c),r+=c.length+2}}for(a.length>0&&(s=a[0][1],l=a[0][2],u=a[0][3]),r=new Uint8Array(r),d=0,r[d++]=1,r[d++]=s,r[d++]=l,r[d++]=u,r[d++]=255,r[d++]=224|a.length,s=0;s<a.length;s++)r[d++]=(65280&a[s].length)>>8,r[d++]=255&a[s].length,r.set(a[s],d),d+=a[s].length;for(r[d++]=o.length,a=0;a<o.length;a++)r[d++]=(65280&o[a].length)>>8,r[d++]=255&o[a].length,r.set(o[a],d),d+=o[a].length;i=i("avcC",r)}t=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].concat(x(ax(t,2)),x(ax(n,2)),[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])),n="avc1",o=ab(e),a=new Uint8Array([]),aI(e.stream)&&(a=aT(e.stream,e.codecs),n="encv"),n=ak(n,t,i,o,a)}else e.codecs.includes("hvc1")&&(n=e.stream.width||0,i=e.stream.height||0,t=new Uint8Array([]),e.Qa.byteLength>0&&(t=ak("hvcC",e.Qa)),n=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].concat(x(ax(n,2)),x(ax(i,2)),[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])),i="hvc1",o=ab(e),a=new Uint8Array([]),aI(e.stream)&&(a=aT(e.stream,e.codecs),i="encv"),n=ak(i,n,t,o,a));break;case"audio":"mp3"==t?e=ak(".mp3",a_(e)):("ac-3"==t?(t=ak("dac3",e.Ia),n="ac-3"):"ec-3"==t?(t=ak("dec3",e.Ia),n="ec-3"):"opus"==t?(t=ak("dOps",e.Ia),n="Opus"):(e.Ia.byteLength>0?t=ak("esds",e.Ia):(t=ak,n=e.id+1,i=e.stream.channelsCount||2,a=e.stream.audioSamplingRate||44100,s=e2("audio",e.codecs.split(",")),o=(u={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12})[a],("mp4a.40.5"===s||"mp4a.40.29"===s)&&(o=u[2*a]),a=parseInt(s.split(".").pop(),10),t=t("esds",n=new Uint8Array([0,0,0,0,3,25].concat(x(ax(n,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,a<<3|o>>>1,o<<7|i<<3,6,1,2])))),n="mp4a"),i=new Uint8Array([]),aI(e.stream)&&(i=aT(e.stream,e.codecs),n="enca"),e=ak(n,a_(e),t,i)),n=e}return e=ak("stsd",aB.value(),n),ak("stbl",e,ak("stts",aR.value()),ak("stsc",aL.value()),ak("stsz",aN.value()),ak("stco",aO.value()))}function ab(e){if(!e.Ya&&!e.$a)return new Uint8Array([]);var t=e.$a;return ak("pasp",e=new Uint8Array([].concat(x(ax(e.Ya,4)),x(ax(t,4)))))}function a_(e){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.stream.channelsCount||2,0,16,0,0,0,0].concat(x(ax(e.stream.audioSamplingRate||44100,2)),[0,0]))}function aw(e){var t=[];if(!aI(e))return new Uint8Array([]);e=S(e.drmInfos);for(var n=e.next();!n.done;n=e.next())if((n=n.value).initData){n=S(n.initData);for(var i=n.next();!i.done;i=n.next())t.push(i.value.initData)}return eQ.apply(eK,x(t))}function aT(e,t){t=ak("frma",t=new Uint8Array([].concat(x(ax(aE(t.split(".")[0]),4)))));var n="cenc",i=e.drmInfos[0];i&&i.encryptionScheme&&(n=i.encryptionScheme),n=ak("schm",n=new Uint8Array([0,0,0,0].concat(x(ax(aE(n),4)),[0,1,0,0]))),i=ak;
1var r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);e=S(e.drmInfos);for(var a=e.next();!a.done;a=e.next())if((a=a.value)&&a.keyIds&&a.keyIds.size){a=S(a.keyIds);for(var o=a.next();!o.done;o=a.next())r=aA(o.value)}return r=ak("tenc",e=new Uint8Array([0,0,0,0,0,0,1,8]),r),ak("sinf",t,n,i("schi",r))}function aS(e){var t=[];e=S(e.g);for(var n=e.next();!n.done;n=e.next()){n=n.value;var i,r,a=t.push,o=ak,s=new Uint8Array([0,0,0,0].concat(x(ax(n.data?n.data.sequenceNumber:0,4))));s=ak("mfhd",s);var u=n.data?n.data.sb:[],l=new Uint8Array(4+u.length);for(r=0;r<u.length;r++){var d=u[r].flags;l[r+4]=d.Pe<<4|d.cf<<2|d.Ye}var c=(u=ak("sdtp",l)).length+32+20+8+16+8+8;l=ak,r=ak("tfhd",r=new Uint8Array([0,0,0,58].concat(x(ax(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])));var h=Math.floor((d=n.data?n.data.baseMediaDecodeTime:0)%(aC+1));d=ak("tfdt",d=new Uint8Array([1,0,0,0].concat(x(ax(Math.floor(d/(aC+1)),4)),x(ax(h,4)))));var p=c,f=12+16*(h=(c=n.data?n.data.sb:[]).length),g=new Uint8Array(f);for(p+=8+f,g.set([+("video"===n.type),0,15,1].concat(x(ax(h,4)),x(ax(p,4))),0),p=0;p<h;p++){var m=c[p];f=ax(m.duration,4);var v=ax(m.size,4),y=m.flags;m=ax(m.mb,4),g.set([].concat(x(f),x(v),[y.Og<<2|y.Pe,y.cf<<6|y.Ye<<4|y.Pg,61440&y.Oe,15&y.Oe],x(m)),12+16*p)}o=o("moof",s,u=l("traf",r,d,c=ak("trun",g),u)),a.call(t,o,(i=((i=n).data?i.data.sb:[]).map(function(e){return e.data}),ak.apply(am,["mdat"].concat(x(i)))))}return eQ.apply(eK,x(t))}function ax(e,t){var n=[];for(--t;t>=0;t--)n.push(e>>8*t&255);return n}function aA(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length/2;n+=1)t[n]=parseInt(String(e[2*n]+e[2*n+1]),16);return t}function aE(e){for(var t=0,n=0;n<e.length;n+=1)t|=e.charCodeAt(n)<<(e.length-n-1)*8;return t}function ak(e){var t=O.apply(1,arguments),n=aM.get(e);n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],aM.set(e,n));for(var i=8,r=t.length-1;r>=0;r--)i+=t[r].byteLength;for((r=new Uint8Array(i))[0]=i>>24&255,r[1]=i>>16&255,r[2]=i>>8&255,r[3]=255&i,r.set(n,4),n=0,i=8;n<t.length;n++)r.set(t[n],i),i+=t[n].byteLength;return r}function aI(e){return e.encrypted&&e.drmInfos.length>0}var aC=0xffffffff,aM=new Map,aP=new ei(function(){return 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])}),aD=new ei(function(){return 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])}),aR=new ei(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),aL=new ei(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),aO=new ei(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),aN=new ei(function(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0])}),aj=new ei(function(){return new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}),aU=new ei(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),aB=new ei(function(){return new Uint8Array([0,0,0,0,0,0,0,1])}),aF=new ei(function(){var e=new Uint8Array([105,115,111,109]),t=new Uint8Array([97,118,99,49]);return ak("ftyp",e,new Uint8Array([0,0,0,1]),e,t)}),aV=new ei(function(){var e=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]);return e=ak("dref",e),ak("dinf",e)});function aH(e,t,n){0!=(t=(e=eL(e,t)).getUint32(0))&&(1==t?(e.setUint32(8,n>>32),e.setUint32(12,0|n)):e.setUint32(0,n))}function aq(e,t,n,i,r,a,o,s){this.R=e,this.startByte=t,this.endByte=n,this.pd=void 0===i?null:i,this.timescale=void 0===r?null:r,this.h=void 0===a?null:a,this.aesKey=void 0===o?null:o,this.g=this.mimeType=this.codecs=null,this.encrypted=void 0!==s&&s}function aG(e,t){return e===t||(e&&t?e.Bc()==t.Bc()&&e.zc()==t.zc()&&tE(e.R().sort(),t.R().sort())&&eM(e.Tb(),t.Tb()):e==t)}function aK(e,t,n,i,r,a,o,s,u,l,d,c,h,p,f,g){for(l=void 0===l?[]:l,p=void 0===p?az:p,this.startTime=e,this.j=this.endTime=t,this.D=n,this.startByte=i,this.endByte=r,this.$=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=u,this.g=l,this.tilesLayout=void 0===d?"":d,this.C=void 0===c?null:c,this.h=void 0===h?null:h,this.status=p,this.preload=!1,this.l=!0,this.o=!1,this.aesKey=void 0===f?null:f,this.thumbnailSprite=null,this.i=-1,this.m=void 0!==g&&g,this.F=this.u=!1,t=(e=S(this.g)).next();!t.done;t=e.next())t.value.ti();this.m&&this.g.length&&this.g[this.g.length-1].si(),this.B=this.bandwidth=this.mimeType=this.codecs=null,this.H=!1}function aW(e){if(e.endByte)return e.endByte+1-e.startByte;if(e.bandwidth){var t=e.bandwidth*(e.endTime-e.startTime);if(!isNaN(t)&&t>0)return t}if(e.g.length>0&&e.m)for(e=(e=S(e.g)).next();!e.done;e=e.next()){aW(e.value);break}return null}aq.prototype.Bc=function(){return this.startByte},aq.prototype.zc=function(){return this.endByte},aq.prototype.ge=function(e){this.h=e},aq.prototype.Tb=function(){return this.h},q("shaka.media.InitSegmentReference",aq),aq.prototype.getEndByte=aq.prototype.zc,aq.prototype.getStartByte=aq.prototype.Bc,(p=aK.prototype).R=function(){return this.D()},p.getStartTime=function(){return this.startTime},p.Gj=function(){return this.endTime},p.Bc=function(){return this.startByte},p.zc=function(){return this.endByte},p.$j=function(){return this.tilesLayout},p.Zj=function(){return this.C},p.Ub=function(){return this.status},p.xk=function(){this.status=aX},p.Sg=function(){this.preload=!0},p.isPreload=function(){return this.preload},p.od=function(){this.l=!1},p.kk=function(){return this.l},p.ti=function(){this.u=!0},p.nk=function(){return this.u},p.si=function(){this.F=!0},p.lk=function(){return this.F},p.ri=function(){this.o=!0},p.gk=function(){return this.o},p.Jf=function(e){this.thumbnailSprite=e},p.Xj=function(){return this.thumbnailSprite},p.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=S(this.g),n=t.next();!n.done;
1n=t.next())n=n.value,n.startTime+=e,n.endTime+=e,n.j+=e},p.Bh=function(e){null==this.h?X("Sync attempted without sync time!"):Math.abs(e=this.h-e-this.startTime)>=.001&&this.offset(e)},p.ge=function(e,t){this.B=e,this.H=void 0!==t&&t},p.Tb=function(e){var t=this.B;return(void 0===e||e)&&this.H&&(this.B=null),t},q("shaka.media.SegmentReference",aK),aK.prototype.getSegmentData=aK.prototype.Tb,aK.prototype.setSegmentData=aK.prototype.ge,aK.prototype.syncAgainst=aK.prototype.Bh,aK.prototype.offset=aK.prototype.offset,aK.prototype.getThumbnailSprite=aK.prototype.Xj,aK.prototype.setThumbnailSprite=aK.prototype.Jf,aK.prototype.hasByterangeOptimization=aK.prototype.gk,aK.prototype.markAsByterangeOptimization=aK.prototype.ri,aK.prototype.isLastPartial=aK.prototype.lk,aK.prototype.markAsLastPartial=aK.prototype.si,aK.prototype.isPartial=aK.prototype.nk,aK.prototype.markAsPartial=aK.prototype.ti,aK.prototype.isIndependent=aK.prototype.kk,aK.prototype.markAsNonIndependent=aK.prototype.od,aK.prototype.isPreload=aK.prototype.isPreload,aK.prototype.markAsPreload=aK.prototype.Sg,aK.prototype.markAsUnavailable=aK.prototype.xk,aK.prototype.getStatus=aK.prototype.Ub,aK.prototype.getTileDuration=aK.prototype.Zj,aK.prototype.getTilesLayout=aK.prototype.$j,aK.prototype.getEndByte=aK.prototype.zc,aK.prototype.getStartByte=aK.prototype.Bc,aK.prototype.getEndTime=aK.prototype.Gj,aK.prototype.getStartTime=aK.prototype.getStartTime,aK.prototype.getUris=aK.prototype.R;var az=0,aX=1;function aY(e){return 1==e.length&&e.end(0)-e.start(0)<1e-4}function aJ(e){return!e||aY(e)?null:1==e.length&&0>e.start(0)?0:e.length?e.start(0):null}function aQ(e){return!e||aY(e)?null:e.length?e.end(e.length-1):null}function a$(e,t){return!(!e||!e.length||aY(e)||t>e.end(e.length-1))&&t>=e.start(0)}function aZ(e,t){if(!e||!e.length||aY(e))return 0;var n=0;e=S(a0(e));for(var i=e.next();!i.done;i=e.next()){var r=i.value;i=r.start,(r=r.end)>t&&(n+=r-Math.max(i,t))}return n}function a0(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function a1(){}function a2(e,t){var n=document.createElement("source");return n.src=e,n.type=void 0===t?"":t,n}function a3(e){for(var t=!1,n=e.getElementsByTagName("source"),i=n.length-1;i>=0;--i)e.removeChild(n[i]),t=!0;return e.src&&(e.removeAttribute("src"),t=!0),t}function a4(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function a5(){return a8||(a6||(a6=new n4(function(){a8=null})),(a8=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(a8=document.createElement("video")),a6.ea(1)),a8}aK.Status={ul:0,zm:1,Vl:2},q("shaka.util.Dom",a1),a1.removeAllChildren=a4,a1.clearSourceFromVideo=a3;var a6=null,a8=null;function a9(){}function a7(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128||!1}function oe(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128||!1}function ot(e,t){var n=(127&e[t])<<21;return n|=(127&e[t+1])<<14,(n|=(127&e[t+2])<<7)|127&e[t+3]}function on(e){for(var t=0,n=[];a7(e,t);){var i=ot(e,t+6);for(e[t+5]>>6&1&&(t+=10),t+=10,i=t+i;t+10<i;){var r=e.subarray(t),a=ot(r,4);(a=function(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===e.type){if(e.size<2||3!==e.data[0])return null;var n=e.data.subarray(1).indexOf(0);if(-1===n)return null;var i=eU(eD(e.data,1,n)),r=e.data[2+n],a=e.data.subarray(3+n).indexOf(0);if(-1===a)return null;var o,s=eU(eD(e.data,3+n,a));return o="-->"===i?eU(eD(e.data,4+n+a)):eP(e.data.subarray(4+n+a)),t.mimeType=i,t.pictureType=r,t.description=s,t.data=o,t}return"TXXX"===e.type||"WXXX"===e.type?e.size<2||3!==e.data[0]||-1===(i=e.data.subarray(1).indexOf(0))?null:(n=eU(eD(e.data,1,i)),e=eU(eD(e.data,2+i)).replace(/\0*$/,""),t.description=n,t.data=e,t):"PRIV"===e.type?e.size<2||-1===(n=e.data.indexOf(0))?null:(t.description=n=eU(eD(e.data,0,n)),"com.apple.streaming.transportStreamTimestamp"==n?(e=1&(n=e.data.subarray(n.length+1))[3],n=((n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7])/45,e&&(n+=47721858.84),t.data=n):t.data=e=eP(e.data.subarray(n.length+1)),t):"T"===e.type[0]?e.size<2||3!==e.data[0]?null:(t.data=e=eU(e.data.subarray(1)).replace(/\0*$/,""),t):"W"===e.type[0]?(t.data=e=eU(e.data).replace(/\0*$/,""),t):e.data?(t.data=eP(e.data),t):null}(r={type:String.fromCharCode(r[0],r[1],r[2],r[3]),size:a,data:r.subarray(10,10+a)}))&&n.push(a),t+=r.size+10}oe(e,t)&&(t+=10)}return n}function oi(e,t){for(var n=t=void 0===t?0:t,i=0;a7(e,t);)e[t+5]>>6&1&&(i+=10),i+=10,i+=ot(e,t+6),oe(e,t+10)&&(i+=10),t+=i;return i>0?e.subarray(n,n+i):new Uint8Array([])}function or(e,t,n){return n=void 0===n?Number.EPSILON:n,e===t||(e=Math.abs(e-t))<=n||n!==Number.EPSILON&&Math.abs(e-n)<=Number.EPSILON}function oa(e){return new Date(Date.UTC(1900,0,1,0,0,0,0)+e).getTime()}
1function oo(e,t){if(this.j=e,void 0===t?0:t){t=new Uint8Array(e.byteLength);for(var n=0,i=0;i<e.byteLength;i++)i>=2&&3==e[i]&&0==e[i-1]&&0==e[i-2]||(t[n]=e[i],n++);this.j=eD(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function os(e){var t=e.j.byteLength-e.i,n=Math.min(4,e.i);if(0!==n){for(var i=0,r=0;r<n;r++)i=i<<8|e.j[t+r];e.h=i<<(4-n)*8,e.g=8*n,e.i-=n}}function ou(e,t){if(e.g<=t){var n=Math.floor((t-=e.g)/8);t-=8*n,e.g-=n,os(e)}e.h<<=t,e.g-=t}function ol(e,t){var n=Math.min(e.g,t),i=e.h>>>32-n;return e.g-=n,e.g>0?e.h<<=n:e.i>0&&os(e),(n=t-n)>0?i<<n|ol(e,n):i}function od(e){for(var t=0;0===e.g;){if(0===e.i)return t;os(e)}for(;;){var n=Math.clz32(e.h);if(n>e.g&&(n=e.g),t+=n,e.h<<=n,e.g-=n,e.g>0||0===e.i)break;os(e)}return t}function oc(e){ou(e,1+od(e))}function oh(e){return ol(e,od(e)+1)-1}function op(e){return 1&(e=oh(e))?1+e>>>1:-1*(e>>>1)}function of(e){return 1===ol(e,1)}function og(e){return ol(e,8)}function om(e,t){for(var n=8,i=8,r=0;r<t;r++)0!==i&&(i=(n+(i=op(e))+256)%256),n=0===i?n:i}function ov(){this.K=null,this.M=!1,this.C=this.N=null,this.m=[],this.j=[],this.g=[],this.F=this.H=null,this.l=[],this.i=[],this.h=[],this.I=null,this.u=[],this.o=[],this.D=this.J=this.B=null}function oy(e,t,n){return e$(e,t[n],n+1<t.length?t[n+1]:e.length)}function ob(e,t,n){if(t.byteLength<9||(t[0]<<16|t[1]<<8|t[2])!=1)return null;var i=t[4]<<8|t[5];if(i&&i>n-6)return null;var r=null,a=null,o=t[7];if(t.byteLength<ow(t))return null;if(192&o){r=(14&t[9])*0x20000000+(255&t[10])*4194304+(254&t[11])*16384+(255&t[12])*128+(254&t[13])/2;var s=null;64&o&&(r=ox(r,s=(14&t[14])*0x20000000+(255&t[15])*4194304+(254&t[16])*16384+(255&t[17])*128+(254&t[18])/2)),null!=e.B||(e.B=r),r=ox(r,e.B),a=e.B=r,null!=s&&(a=ox(s,r))}return n<=(e=t[8]+9)?null:{packetLength:i,Gk:e,pts:r,dts:a}}function o_(e,t){return(e=ob(e,t,t.byteLength))?{data:t.subarray(e.Gk),packetLength:e.packetLength,pts:e.pts,dts:e.dts,nalus:[]}:null}function ow(e){return 64&(e=e[7])?19:192&e?14:9}function oT(e){return null==e.pts||null==e.dts?null:Math.min(e.dts,e.pts)/9e4}function oS(e){var t=e.ld();return t.length>1&&(e=t[0].pts,!isNaN((t=t[1].pts)-e))?String(Math.abs(1/(t-e)*9e4)):null}function ox(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>0x100000000;)e+=0x200000000*n;return e}function oA(e){return!(0>oE(e))}function oE(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(71==e[n]&&71==e[n+188]&&71==e[n+376])return n;var i=e.indexOf(71,n+1);n=i>=0&&i<t?i:n+1}return -1}q("shaka.util.Id3Utils",a9),a9.getID3Data=oi,a9.getID3Frames=on,q("shaka.util.ExpGolomb",oo),(p=ov.prototype).clearData=function(){this.m=[],this.j=[],this.g=[],this.l=[],this.i=[],this.h=[],this.u=[],this.o=[]},p.Hf=function(e){null!=this.D&&this.D!=e&&(this.B=null),this.D=e},p.parse=function(e){if(e.length<564)return this;for(var t=Math.max(0,oE(e)),n=e.length-(e.length+t)%188,i=!1,r=t;r<n;r+=188)if(71==e[r]){var a=!!(64&e[r+1]),o=((31&e[r+1])<<8)+e[r+2];if((48&e[r+3])>>4>1){var s=r+5+e[r+4];if(s==r+188)continue}else s=r+4;switch(o){case 0:a&&(s+=e[s]+1),this.K=(31&e[s+10])<<8|e[s+11];break;case 17:case 8191:break;case this.K:a&&(s+=e[s]+1),o={audio:-1,video:-1,Ze:-1,audioCodec:"",videoCodec:""};var u=s+3+((15&(a=e)[s+1])<<8|a[s+2])-4;for(s+=12+((15&a[s+10])<<8|a[s+11]);s<u;
1){var l=(31&a[s+1])<<8|a[s+2],d=(15&a[s+3])<<8|a[s+4];switch(a[s]){case 6:if(d>0)for(var c=s+5,h=d;h>2;){var p=a[c+1]+2;switch(a[c]){case 5:var f=c+2;f=a[f]<<24|a[f+1]<<16|a[f+2]<<8|a[f+3],-1==o.audio&&0x4f707573===f?(o.audio=l,o.audioCodec="opus"):-1==o.video&&0x41563031===f&&(o.video=l,o.videoCodec="av1");break;case 106:-1==o.audio&&(o.audio=l,o.audioCodec="ac3");break;case 122:-1==o.audio&&(o.audio=l,o.audioCodec="ec3");break;case 124:-1==o.audio&&(o.audio=l,o.audioCodec="aac");break;case 127:"opus"==o.audioCodec&&(f=null,128===a[c+2]&&(f=a[c+3]),null!=f&&(this.J={channelCount:(15&f)==0?2:15&f,qj:f,sampleRate:48e3}))}c+=p,h-=p}break;case 15:-1==o.audio&&(o.audio=l,o.audioCodec="aac");break;case 17:-1==o.audio&&(o.audio=l,o.audioCodec="aac-loas");break;case 21:-1==o.Ze&&(o.Ze=l);break;case 27:-1==o.video&&(o.video=l,o.videoCodec="avc");break;case 3:case 4:-1==o.audio&&(o.audio=l,o.audioCodec="mp3");break;case 36:-1==o.video&&(o.video=l,o.videoCodec="hvc");break;case 129:-1==o.audio&&(o.audio=l,o.audioCodec="ac3");break;case 132:case 135:-1==o.audio&&(o.audio=l,o.audioCodec="ec3")}s+=d+5}-1!=(a=o).video&&(this.N=a.video,this.C=a.videoCodec),-1!=a.audio&&(this.H=a.audio,this.F=a.audioCodec),-1!=a.Ze&&(this.I=a.Ze),i&&!this.M&&(i=!1,r=t-188),this.M=!0;break;case this.N:s=e.subarray(s,r+188),a?(this.j.push(this.m.length),this.m.push(s)):this.j.length&&this.m.push(s);break;case this.H:s=e.subarray(s,r+188),a?(this.i.push(this.l.length),this.l.push(s)):this.i.length&&this.l.push(s);break;case this.I:s=e.subarray(s,r+188),a?(this.o.push(this.u.length),this.u.push(s)):this.o.length&&this.u.push(s);break;default:i=!0}}return this},p.Fk=function(e){return el("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.Yg(e,{$d:null,state:null})},p.Yg=function(e,t){var n=e.pts?e.pts/9e4:null,i=(e=e.data).byteLength,r=1;"hvc"==this.C&&(r=2);var a=t.state||0,o=a,s=0,u=[],l=-1,d=0,c="hvc"===this.C;for(-1==a&&(l=0,d=c?e[0]>>1&63:31&e[0],a=0,s=1);s<i;){var h=e[s++];a?1===a?a=2*!h:h?1==h?(h=s-a-1,l>=0?u.push({data:e.subarray(l+r,h),fullData:e.subarray(l,h),type:d,time:n,state:null}):(a=u.length?u[u.length-1]:t.$d)&&(o&&s<=4-o&&a.state&&(a.data=a.data.subarray(0,a.data.byteLength-o),a.fullData=a.fullData.subarray(0,a.fullData.byteLength-o)),h>0&&(h=e.subarray(0,h),a.data=eQ(a.data,h),a.fullData=eQ(a.fullData,h),a.state=0)),s<i?(d=c?e[s]>>1&63:31&e[s],l=s,a=0):a=-1):a=0:a=3:a=+!h}return l>=0&&a>=0&&u.push({data:e.subarray(l+r,i),fullData:e.subarray(l,i),type:d,time:n,state:a}),!u.length&&t.$d&&(n=u.length?u[u.length-1]:t.$d)&&(n.data=eQ(n.data,e),n.fullData=eQ(n.fullData,e)),t.state=a,u},p.getMetadata=function(){for(var e=[],t=0;t<this.o.length;t++){var n=oy(this.u,this.o,t);(n=o_(this,n))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:on(n.data),dts:n.dts,pts:n.pts})}return e},p.qb=function(){if(this.i.length&&!this.h.length)for(var e=0;e<this.i.length;e++){var t=oy(this.l,this.i,e),n=o_(this,t),i=this.h.length?this.h[this.h.length-1]:null;n&&null!=n.pts&&null!=n.dts&&(!i||i.pts!=n.pts&&i.dts!=n.dts)?this.h.push(n):this.h.length&&(t=n?n.data:t)&&((i=this.h[this.h.length-1]).data=eQ(i.data,t))}return this.h},p.ld=function(e){if(e=void 0===e||e,this.j.length&&!this.g.length){for(var t=0;t<this.j.length;t++){var n=oy(this.m,this.j,t),i=o_(this,n),r=this.g.length?this.g[this.g.length-1]:null;i&&null!=i.pts&&null!=i.dts&&(!r||r.pts!=i.pts&&r.dts!=i.dts)?this.g.push(i):this.g.length&&(n=i?i.data:n)&&((r=this.g[this.g.length-1]).data=eQ(r.data,n))}if(e){for(t={$d:null,state:null},r=[],i=(n=S(this.g)).next();!i.done;i=n.next())(i=i.value).nalus=this.Yg(i,t),i.nalus.length&&(r.push(i),t.$d=i.nalus[i.nalus.length-1]);this.g=r}}return e?this.g:(e=this.g,this.g=[],e)},p.getStartTime=function(e){if("audio"==e)e=this.qb();else{if("video"!=e)return null;e=this.ld(!1)}return e.length?oT(e[0]):null},p.Rd=function(){return{audio:this.F,video:this.C}},p.Xe=function(){for(var e=[],t=S(this.ld()),n=t.next();!n.done;n=t.next())e.push.apply(e,x(n.value.nalus));return e},p.dk=function(){el("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.Jg();return{height:e.height,width:e.width}},p.Jg=function(){return"hvc"==this.C?function(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Xe();if(!n.length||!(n=n.find(function(e){return 33==e.type})))return t;var i=new oo(n.fullData,!0);og(i),og(i),ol(i,4);var r=ol(i,3);of(i);var a=ol(i,2),o=ol(i,1),s=ol(i,5),u=ol(i,32);n=og(i);for(var l=og(i),d=og(i),c=og(i),h=og(i),p=og(i),f=og(i),g=[],m=[],v=0;v<r;v++)g.push(of(i)),m.push(of(i));if(r>0)for(v=r;v<8;v++)ol(i,2);for(v=0;v<r;v++)g[v]&&ol(i,88),m[v]&&og(i);oh(i),3==(r=oh(i))&&ol(i,1),g=oh(i),m=oh(i);var y=v=0,b=0,w=0;return of(i)&&(v+=oh(i),y+=oh(i),b+=oh(i),w+=oh(i)),t.width=String(g-(v+y)*(1===r||2===r?2:1)),t.height=String(m-(b
1+w)*(1===r?2:1)),i=function(e){for(var t=0,n=0;n<32;n++)t|=(e>>n&1)<<31-n;return t>>>0}(u),o=1==o?"H":"L",a="hvc1."+["","A","B","C"][a]+s+"."+i.toString(16).toUpperCase()+"."+o+f,p&&(a+="."+p.toString(16).toUpperCase()),h&&(a+="."+h.toString(16).toUpperCase()),c&&(a+="."+c.toString(16).toUpperCase()),d&&(a+="."+d.toString(16).toUpperCase()),l&&(a+="."+l.toString(16).toUpperCase()),n&&(a+="."+n.toString(16).toUpperCase()),t.codec=a,t.frameRate=oS(e),t}(this):function(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Xe();if(!n.length||!(n=n.find(function(e){return 7==e.type})))return t;var i=og(n=new oo(n.data)),r=og(n),a=og(n);if(oc(n),ok.includes(i)){var o=oh(n);if(3===o&&ou(n,1),oc(n),oc(n),ou(n,1),of(n)){o=3!==o?8:12;for(var s=0;s<o;s++)of(n)&&(s<6?om(n,16):om(n,64))}}if(oc(n),0===(o=oh(n)))oh(n);else if(1===o)for(ou(n,1),oc(n),oc(n),o=oh(n),s=0;s<o;s++)oc(n);oc(n),ou(n,1),o=oh(n),s=oh(n);var u=ol(n,1);0===u&&ou(n,1),ou(n,1);var l=0,d=0,c=0,h=0;return of(n)&&(l=oh(n),d=oh(n),c=oh(n),h=oh(n)),t.height=String((2-u)*(s+1)*16-2*c-2*h),t.width=String((o+1)*16-2*l-2*d),t.codec="avc1."+("0"+i.toString(16).toUpperCase()).slice(-2)+("0"+r.toString(16).toUpperCase()).slice(-2)+("0"+a.toString(16).toUpperCase()).slice(-2),t.frameRate=oS(e),t}(this)},q("shaka.util.TsParser",ov),ov.syncOffset=oE,ov.probe=oA,ov.prototype.getVideoInfo=ov.prototype.Jg,ov.prototype.getVideoResolution=ov.prototype.dk,ov.prototype.getVideoNalus=ov.prototype.Xe,ov.prototype.getCodecs=ov.prototype.Rd,ov.prototype.getStartTime=ov.prototype.getStartTime,ov.prototype.getVideoData=ov.prototype.ld,ov.prototype.getAudioData=ov.prototype.qb,ov.prototype.getMetadata=ov.prototype.getMetadata,ov.prototype.parseNalus=ov.prototype.Yg,ov.prototype.parseAvcNalus=ov.prototype.Fk,ov.prototype.parse=ov.prototype.parse,ov.prototype.setDiscontinuitySequence=ov.prototype.Hf,ov.prototype.clearData=ov.prototype.clearData,ov.Timescale=9e4;var ok=[100,110,122,244,44,83,86,118,128,138,139,134];function oI(e,t,n,i,r){var a=this;this.g=e,this.O=n,this.B=i,this.ka=t,this.l=new Map,this.C=new Map,this.Ja=new Map,this.h=null,this.Fa=!1,this.H=r||null,this.m=new Map,this.u=new ee,this.j=new Map,this.J=null,this.M=new i1,this.Aa="",this.eb=!1,this.za=!0,this.N=!1,this.K=this.Y=null,this.i=oC(this,this.M),this.Ra=this.D=!1,this.F=new rf(function(){var e,t,n,i,r,o,s,u,l,d,c,h;return L(function(p){if(1==p.h){for(e=[],n=(t=S(a.m)).next();!n.done;n=t.next())for(r=(i=S(n.value)).next().value,s=(o=i.next().value)[0],u=r,a.m.set(u,o.slice(0,1)),s&&e.push(s.p.catch(n6)),d=(l=S(o.slice(1))).next();!d.done;d=l.next())d.value.p.reject(new eN(2,7,7003,void 0));return a.h&&e.push(a.h.destroy()),p.g(Promise.all(e),2)}for(h=(c=S(a.j.values())).next();!h.done;h=c.next())h.value.destroy();a.u&&(a.u.release(),a.u=null),a.g&&(oM(a),a.g.load(),a.g.disableRemotePlayback=!1),a.g=null,a.Y=null,a.K=null,a.B=null,a.i=null,a.h=null,a.ka=null,a.l.clear(),a.Ja.clear(),a.j.clear(),a.J=null,a.m.clear(),a.H=null,a.ia.clear(),a.O=null,p.j()})}),this.I=!1,this.P="UNKNOWN",this.Za=this.cb=!1,this.ab=new i1,this.o=!1,this.ya=null,this.ia=new Map,this.na=this.T=this.ua=this.V=null,this.ma=new i1,this.g.remote&&(this.N="disconnected"!=this.g.remote.state,this.u.G(this.g.remote,"connect",function(){a.N="disconnected"!=a.g.remote.state}),this.u.G(this.g.remote,"connecting",function(){a.N="disconnected"!=a.g.remote.state}),this.u.G(this.g.remote,"disconnect",function(){a.N="disconnected"!=a.g.remote.state}))}function oC(t,n){if(t.za=!0,e.ManagedMediaSource){t.K||(t.g.disableRemotePlayback=!0);var i=new ManagedMediaSource;t.u.G(i,"startstreaming",function(){t.za=!0}),t.u.G(i,"endstreaming",function(){t.za=!1})}else i=new MediaSource;return t.u.Ba(i,"sourceopen",function(){URL.revokeObjectURL(t.Aa),n.resolve()}),t.u.Ba(t.g,"playing",function(){t.eb=!0}),t.Aa=o3(i),oM(t),t.B.useSourceElements?(t.Y=a2(t.Aa),t.g.appendChild(t.Y),t.K&&t.g.appendChild(t.K),t.g.load()):t.g.src=t.Aa,i}function oM(e){if(e.g){var t,n;e.g.removeAttribute("src"),(null==(t=e.Y)?void 0:t.parentElement)===e.g&&e.g.removeChild(e.Y),(null==(n=e.K)?void 0:n.parentElement)===e.g&&e.g.removeChild(e.K)}}function oP(e,t,n,i){"audio"==t&&i&&(i=iy(i,n.mimeType)),"video"==t&&i&&"video/mp4"==n.mimeType&&(i=ib(i));
1var r=nB(n.mimeType,i);if(t==e5)oR(e,r,e.I,n.external);else{var a=e.B.forceTransmux;(!ti(r)||!e.I&&nY.includes(r))&&(a=!0);var o=nF(n.mimeType,i);if(a){if(a=e3("audio",(i||"").split(",")),i=e3("video",(i||"").split(",")),a&&i){e.o=!0,oP(e,"audio",n,a),oP(e,"video",n,i);return}(i=nD(o))&&(r=i(),e.j.set(t,r),r=r.convertCodecs(t,o))}o=r+e.B.addExtraFeaturesToSourceBuffer(r),rg(e.F);try{var s=e.i.addSourceBuffer(o)}catch(t){throw new eN(2,3,3015,t,"The mediaSource_ status was "+e.i.readyState+" expected 'open'",null)}e.I&&(s.mode=o4),e.u.G(s,"error",function(){var n=e.m.get(t)[0];n.p.reject(new eN(2,3,3014,e.g.error?e.g.error.code:0,n.uri))}),e.u.G(s,"updateend",function(){return oY(e,t)}),e.l.set(t,s),e.C.set(t,r),e.Ja.set(t,!!n.drmInfos.length)}}function oD(e){return e.za&&!e.N&&!e.D}function oR(e,t,n,i){e.h||(e.h=new nJ(e.ka),e.h&&(e.h.C=e.B.modifyCueCallback));var r=e.h,a=i||e.Fa;e=e.P,"application/cea-608"==t||"application/cea-708"==t?r.i=null:(r.i=n2.get(t)(),r.i.setSequenceMode?r.i.setSequenceMode(n):el("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),r.i.setManifestType?r.i.setManifestType(e):el("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),r.F=a,r.B=i)}function oL(e){return!e.D&&(!e.i||"ended"==e.i.readyState)}function oO(e){return!e.D&&(!e.i||"closed"==e.i.readyState)}function oN(e,t){return e.l.size?t==e5?e.h.g:aJ(oB(e,t)):null}function oj(e,t){return e.l.size?t==e5?e.h.h:aQ(oB(e,t)):null}function oU(e,t,n){return t==e5?null==(e=e.h).h||e.h<n?0:e.h-Math.max(n,e.g):aZ(e=oB(e,t),n)}function oB(e,t){if(e.D||e.N||oO(e))return null;try{return e.l.get(t).buffered}catch(n){return e.l.has(t),null}}function oF(e,t,n,i,r,a,o,s,u,l,d){var c,h,p,f,g,m,v,y,b,w,T,A,E,k,I;return o=void 0!==o&&o,s=void 0!==s&&s,u=void 0!==u&&u,l=void 0!==l&&l,L(function(C){switch(C.h){case 1:if(t!=(c=e6).Va){C.A(2);break}if("HLS"!=e.P){C.A(3);break}return C.g(e.ab,4);case 4:h=C.i,e.h.u=h;case 3:var M,P,D,R,O,N,j,U,B,F,V,H,q;return C.g((M=e.h,P=n,D=i?i.startTime:null,R=i?i.endTime:null,O=i?i.R()[0]:null,L(function(e){if(1==e.h)return e.g(Promise.resolve(),2);if(!M.i||!M.l)return e.return();if(null==D||null==R)return M.i.parseInit(eD(P)),e.return();for(N=M.B?0:M.u,j=M.F||M.B?D:M.u,U={periodStart:N,segmentStart:D,segmentEnd:R,vttOffset:j},V=(F=S(B=M.i.parseMedia(eD(P),U,O,[]))).next();!V.done;V=F.next())H=V.value,M.C(H,O||null,U);q=B.filter(function(e){return e.startTime>=M.m&&e.startTime<M.o}),M.l.append(q),null!=M.g||(M.g=Math.max(D,M.m)),M.h=Math.min(R,M.o),e.j()})),5);case 5:case 8:return C.return();case 2:if(l||!e.o){C.A(6);break}return C.g(oF(e,c.ha,n,i,r,a,o,s,u,!0),7);case 7:return C.g(oF(e,c.xa,n,i,r,a,o,s,u,!0),8);case 6:if(!e.l.has(t))return C.return();if(p=e.l.get(t).timestampOffset,f=e.C.get(t),e.j.has(t)&&(f=e.j.get(t).getOriginalMimeType()),i&&(m=(g=function(e,t,n,i,r,a,o){o=void 0!==o&&o;var s=null,u=[],l=eD(n);if(nY.includes(a))(n=on(l)).length&&i&&((o=n.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&"number"==typeof o.data&&(s=Math.round(o.data)/1e3),e.O.onMetadata([{cueTime:i.startTime,data:l,frames:n,dts:i.startTime,pts:i.startTime}],0,i.endTime));else if(a.includes("/mp4")&&i&&i.$){l=new rT;var d=null!=r.emsgSchemeIdUris&&r.emsgSchemeIdUris.length>0||e.B.dispatchAllEmsgBoxes,c=[];d&&l.S("emsg",function(t){e:{var n=r.emsgSchemeIdUris;if(0===t.version)var a=t.reader.ud(),o=t.reader.ud(),s=t.reader.W(),u=t.reader.W(),l=t.reader.W(),d=t.reader.W(),h=i.startTime+u/s;else s=t.reader.W(),u=(h=t.reader.vd()/s+i.timestampOffset)-i.startTime,l=t.reader.W(),d=t.reader.W(),a=t.reader.ud(),o=t.reader.ud();if(t=t.reader.Ob(t.reader.getLength()-t.reader.Oa(),!0),n&&n.includes(a)||e.B.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==a)e.O.Ek();else{n=h,("https://aomedia.org/emsg/ID3"!==a||0xffffffff!==l)&&(n+=l/s),s={startTime:h,endTime:n,schemeIdUri:a,value:o,timescale:s,presentationTimeDelta:u,eventDuration:l,id:d,messageData:t};break e}s=null}s&&c.push(s)});var h=i.$.timescale;t=h&&!isNaN(h);var p=0,f=!1;for(t&&l.S("prft",function(t){var n=t.reader,i=t.version;n.W(),t=1e3*(t=n.W())+n.W()/0x100000000*1e3,n=0===i?n.W():0x100000000*(i=n.W())+(n=n.W()),t=oa(t),n=new i9("prft",n=new Map().set("detail",{wallClockTime:t,programStartDate:new Date(t-n/h*1e3)})),e.O.onEvent(n)}).box("moof",rS).box("traf",rS).S("tfdt",function(e){f||(p=al(e.reader,e.version).baseMediaDecodeTime/h,f=!0,d||e.parser.stop())}),(d||t)&&l.parse(n,!1,o),f&&0==i.timestampOffset&&(s=p),n=(l=S(c)).next();!n.done;n=l.next())!function(e,t,n,i){var r=or(t.startTime,n.startTime+t.presentationTimeDelta/t.timescale);i&&"HLS"==e.P&&!r&&(n=-i+n.startTime,t.startTime+=n,t.endTime+=n),e.O.Ck(t),!t.messageData||"https://aomedia.org/emsg/ID3"!=t.schemeIdUri&&"https://developer.apple.com/streaming/emsg-id3"!=t.schemeIdUri||(n=on(t.messageData)).length&&(i=t.startTime,e.O.onMetadata([{cueTime:i,data:t.messageData,frames:n,dts:i,pts:i}],0,t.endTime))}(e,n.value,i,s)}else a.includes("/mp4")||a.includes("/webm")||!oA(l)||(e.ia.has(t)||e.ia.set(t,new ov),(u=e.ia.get(t)).clearData(),u.Hf(i.i),u.parse(l),null!=(l=function(e,t){if("audio"==t){t=e.l;var n=e.i}else{if("video"!=t)return null;t=e.m,n=e.j}for(var i=0;i<n.length;i++){var r=n[i],a=i+1<n.length?n[i+1]:t.length,o=t[r];if(o){for(var s=0,u=r;u<a;u++)s+=t[u].byteLength;if((s=ob(e,r=o.byteLength>=9&&o.byteLength>
1=ow(o)?o:e$(t,r,a),s))&&null!=(s=oT(s)))return s}}return null}(u,t))&&(s=l),u=u.getMetadata());return{timestamp:s,metadata:u}}(e,t,n,i,r,f,u)).timestamp,v=g.metadata,null!=m&&(null==e.V&&t==c.xa&&(e.V=m,e.ua=i.startTime,null!=e.T&&(y=0,e.ua==e.na&&(y=e.V-e.T),e.ma.resolve(y))),null==e.T&&t==c.ha&&(e.T=m,e.na=i.startTime,null!=e.V&&(b=0,e.ua==e.na&&(b=e.V-e.T),e.ma.resolve(b))),w=m,T=nY,!e.I&&T.includes(e.C.get(t))&&(w=0),A=i.startTime-w,(Math.abs(p-A)>=.001||o||s)&&(!u||A>0||!p)&&(p=A,e.Za&&(oJ(e,t,function(){return oW(e,t)},null),oJ(e,t,function(){return oz(e,t,p)},null))),t!=c.xa&&e.l.has(c.xa)||e.ab.resolve(p)),v.length)&&e.O.onMetadata(v,p,i?i.endTime:null),a&&t==c.xa&&(e.h||oR(e,"application/cea-608",e.I,!1),e.J||(e.J=new tp(f.split(";",1)[0])),i?(E=tf(e.J,n)).length&&function(e,t,n){var i=new Map;t=S(t);for(var r=t.next();!r.done;r=t.next()){var a=r.value;r=a.stream,a=a.cue,i.has(r)||i.set(r,[]),function e(t,n,i){n.startTime+=i,n.endTime+=i,n=S(n.nestedCues);for(var r=n.next();!r.done;r=n.next())e(t,r.value,i)}(e,a,n),a.startTime>=e.m&&a.startTime<e.o&&(i.get(r).push(a),r==e.D&&e.l.append([a]))}for(t=(n=S(i.keys())).next();!t.done;t=n.next())for(t=t.value,e.j.has(t)||e.j.set(t,[]),a=(r=S(i.get(t))).next();!a.done;a=r.next())a=a.value,e.j.get(t).push(a);n1(e)}(e.h,E,p):e.J.init(n,s,d)),!e.j.has(t)){C.A(9);break}return C.g(e.j.get(t).transmux(n,r,i,e.i.duration,t),10);case 10:n=C.i;case 9:if(n=function(e,t,n,i,r){if("mp4"!=nH(e.C.get(r)))return n;var a,o,s=null===i,u=e.Ja.get(r),l=e.O.Lj(),d=!1;i&&i.$&&(d=i.$.encrypted),i=i?i.R()[0]:null;var c=er();return e.B.correctEc3Enca&&s&&"audio"===r&&(a=eD(a=n),o=null,new rT().box("moov",rS).box("trak",rS).box("mdia",rS).box("minf",rS).box("stbl",rS).S("stsd",rx).box("enca",function(e){return o=e.reader.h,rE(e)}).box("sinf",rS).box("frma",function(e){e.parser.stop(),"ec-3"===ap(e.reader).codec&&o&&2!==o.getUint16(16)&&o.setUint16(16,2)}).parse(a),n=a),e.B.insertFakeEncryptionInInit&&u&&c.wd(l,r)&&(s?n=function(e,t,n){function i(e){c.push({box:e,xi:0x656e6361})}function r(e){c.push({box:e,xi:0x656e6376})}function a(e){l=!0,e.parser.stop()}function o(e){d.push(e),rS(e)}var s,u=t=eD(t),l=!1,d=[],c=[];if(new rT().box("moov",o).box("trak",o).box("mdia",o).box("minf",o).box("stbl",o).S("stsd",function(e){s=e,d.push(e),rx(e)}).S("encv",a).S("enca",a).S("dvav",r).S("dva1",r).S("dvh1",r).S("dvhe",r).S("dvc1",r).S("dvi1",r).S("hev1",r).S("hvc1",r).S("avc1",r).S("avc3",r).S("ac-3",i).S("ec-3",i).S("ac-4",i).S("Opus",i).S("fLaC",i).S("mp4a",i).parse(t),l)return t;if(0==c.length||!s)throw eJ(t),new eN(2,3,3019,n);c.reverse(),n=S(c);for(var h=n.next();!h.done;h=n.next())h=h.value,u=function(e,t,n,i,r,a){var o=aT(e,i.name),s=t.subarray(i.start,i.start+i.size);for((e=new Uint8Array(i.size+o.byteLength)).set(s,0),eL(e).setUint32(4,a),e.set(o,i.size),aH(e,0,e.byteLength),a=new Uint8Array(t.byteLength+e.byteLength),i=er().bf()?i.start:i.start+i.size,o=t.subarray(i),a.set(t.subarray(0,i)),a.set(e,i),a.set(o,i+e.byteLength),r=(t=S(r)).next();!r.done;r=t.next())aH(a,(r=r.value).start,r.size+e.byteLength);return e=eL(a,n.start),n=rM(n),t=e.getUint32(n),e.setUint32(n,t+1),a}(e,u,s,h.box,d,h.xi);return u=function(e,t){if(0===(e=aw(e)).byteLength)return t;var n=0,i=0;new rT().box("moov",function(e){n=e.start,i=e.size,e.parser.stop()}).parse(t);var r=n+i;aH(t,n,i+e.byteLength);var a=new Uint8Array(t.byteLength+e.byteLength),o=t.subarray(r);return a.set(t.subarray(0,r)),a.set(e,r),a.set(o,r+e.byteLength),a}(e,u),er().hh()?((e=new Uint8Array(t.byteLength+u.byteLength)).set(u),e.set(t,u.byteLength),e):u}(t,n,i):!d&&c.Hi(r)&&(n=function(e){e=eD(e);var t=[];new rT().box("mdat",function(e){t.push(e)}).parse(e);for(var n=[],i=0;i<t.length;i++){var r=t[i-1],a=t[i];n.push(function(e){function t(e){o.push(e),rS(e)}var n,i,r,a,o=[];if(new rT().box("moof",t).box("traf",t).S("tfhd",function(e){n=e,r=au(e.reader,e.flags)}).S("trun",function(e){i=e,a=ac(e.reader,e.version,e.flags)}).parse(e),r&&2!==r.Li){var s=n.start+rM(n)+4+8*(null!==r.nj),u=eL(e);if(null!==r.Li)u.setUint32(s,2);else{aH(e,n.start,n.size+4);var l=u.getUint32(n.start+8);u.setUint32(n.start+8,2|l),a&&null!==a.ng&&u.setInt32(i.start+rM(i)+4,a.ng+4),l=e.subarray(0,s),u=e.subarray(s),(e=new Uint8Array(e.byteLength+4)).set(l),l=[];for(var d=3;d>=0;d--)l.push(2>>8*d&255);for(e.set(new Uint8Array(l),s),e.set(u,s+4),u=(s=S(o)).next();!u.done;u=s.next())aH(e,(u=u.value).start,u.size+4)}}return e}(e.subarray(r?r.start+r.size:0,a.start+a.size)))}return eQ.apply(eK,x(n))}(n))),s&&c.fe()&&(n=function(e){function t(e){i.push({start:e.start,size:e.size}),rS(e)}var n=eD(e),i=[];return new rT().box("moov",t).box("trak",t).box("mdia",t).box("minf",t).box("stbl",t).box("stsd",function(e){i.push({start:e.start,size:e.size});for(var t=eL(n,e.start),r=0;r<e.size-3;r++){var a=t.getUint32(r);0x61632d33==a?t.setUint32(r,0x65632d33):0x64616333==a&&t.setUint32(r,0x64656333)}}).parse(n),n}(n)),n}(e,r,n,i,t),!i||!e.I||t==c.Va||!o&&!s){C.A(11);break}if(k=i.startTime,"HLS"!=e.P||e.o||t!=c.ha||!e.l.has(c.xa)){C.A(13);break}return C.g(e.ma,14);case 14:Math.abs(I=C.i)>.15&&(k-=I);case 13:oJ(e,t,function(){return oW(e,t)},null),oJ(e,t,function(){return oz(e,t,k)},null);case 11:return C.g(oJ(e,t,function(){var i=n;e.H&&te(e.H,i,p,r),e.l.get(t).appendBuffer(i)},i?i.R()[0]:null),15);case 15:C.j()}})}function oV(e,t){var n;return L(function(i){return 1==i.h?t==(n=e6).Va?e.h?i.g(e.h.remove(0,1/0),0):i.return():t===n.xa&&e.J&&e.h?i.g(e.h.remove(0,1/0,!0),4):i.A(4):6!=i.h?i.g(oJ(e,t,function(){return oK(e,t,0,e.i.duration)}
1,null),6):e.o?i.g(oJ(e,n.ha,function(){return oK(e,n.ha,0,e.i.duration)},null),0):i.A(0)})}function oH(e,t,n,i,r,a,o,s,u){var l,d;return L(function(c){if(1==c.h){var h,p,f,g,m,v,y;return t==(l=e6).Va?(a||(e.h.u=n),h=e.h,h.m=i,h.o=r,c.return()):(d=[],c.g(L(function(n){if(1==n.h){if(p=e6,g=(f=o2(e,t,o,s,u)).type,m=f.dc,v=f.qf,(y=u.get(p.ha))&&(e.o=y.isAudioMuxedInVideo),g==o5)return e.j.has(t)&&!m?(e.j.get(t).destroy(),e.j.delete(t)):!e.j.has(t)&&m?e.j.set(t,m):m&&(e.j.has(t)&&e.j.get(t).transmux!==m.transmux?(e.j.get(t).destroy(),e.j.set(t,m)):m.destroy()),n.return(!1);if(g==o8)return n.g(oJ(e,t,function(){if(t!==e5){if(e.C.get(t),tr()){e.j.has(t)&&(e.j.get(t).destroy(),e.j.delete(t)),m&&e.j.set(t,m);var n=v+e.B.addExtraFeaturesToSourceBuffer(v);e.l.get(t).changeType(n),e.C.set(t,v)}oY(e,t)}},null),3);return g!=o6?n.A(3):(m&&m.destroy(),n.g(o0(e,u),3))}return n.return(!0)}),2))}return c.i||(d.push(oJ(e,t,function(){return oW(e,t)},null)),e.o&&d.push(oJ(e,l.ha,function(){return oW(e,l.ha)},null))),a||(d.push(oJ(e,t,function(){return oz(e,t,n)},null)),e.o&&d.push(oJ(e,l.ha,function(){return oz(e,l.ha,n)},null))),(0!=i||r!=1/0)&&(d.push(oJ(e,t,function(){return oX(e,t,i,r)},null)),e.o&&d.push(oJ(e,l.ha,function(){return oX(e,l.ha,i,r)},null))),d.length?c.g(Promise.all(d),0):c.A(0)})}function oq(e,t,n){var i,r;return L(function(a){return 1==a.h?t==(i=e6).Va||(t==i.xa&&(e.ab=new i1),!e.I||(r=oj(e,t))&&.15>Math.abs(r-n))?a.return():(oJ(e,t,function(){return oW(e,t)},null),e.o&&oJ(e,i.ha,function(){return oW(e,i.ha)},null),a.g(oJ(e,t,function(){return oz(e,t,n)},null),2)):e.o?a.g(oJ(e,i.ha,function(){return oz(e,i.ha,n)},null),0):a.A(0)})}function oG(e){L(function(t){return e.F.g||e.g.error||e.N||e.D||oL(e)||oO(e)?t.return():t.g(oQ(e,function(){oL(e)||oO(e)||e.i.clearLiveSeekableRange()}),0)})}function oK(e,t,n,i){if(i<=n)oY(e,t);else{if(e.H){var r=e.H;"video"===t&&r.g&&r.g.flushBuffer(n,i)}e.l.get(t).remove(n,i)}}function oW(e,t){var n=e.l.get(t),i=n.appendWindowStart,r=n.appendWindowEnd;n.abort(),n.appendWindowStart=i,n.appendWindowEnd=r,oY(e,t)}function oz(e,t,n){n<0&&(n+=.001),e.l.get(t).timestampOffset=n,oY(e,t)}function oX(e,t,n,i){var r=e.l.get(t);(r.appendWindowEnd!==i||r.appendWindowStart!==n)&&(r.appendWindowStart=0,r.appendWindowEnd=i,r.appendWindowStart=n),oY(e,t)}function oY(e,t){if(e.D||e.F.g){var n=e.m.get(t);n&&n.length&&((n=n[0])&&n.p&&n.p.resolve(),e.m.set(t,[]))}else(n=e.m.get(t)[0])&&(n.p.resolve(),o$(e,t))}function oJ(e,t,n,i){return rg(e.F),n={start:n,p:new i1,uri:i},e.m.get(t).push(n),1==e.m.get(t).length&&oZ(e,t),n.p}function oQ(e,t){var n,i,r,a,o,s,u,l,d,c,h,p,f,g,m,v;return L(function(y){switch(y.h){case 1:for(rg(e.F),n=[],i=Array.from(e.l.keys()),r=new Map,o=(a=S(i)).next(),s={};!o.done;s={ready:void 0},o=a.next())u=o.value,s.ready=new i1,l={start:function(e){return function(){return e.ready.resolve()}}(s),p:s.ready,uri:null},(d=e.m.get(u)).push(l),n.push(s.ready),r.set(u,l),1==d.length&&l.start();return y.m(2),y.g(Promise.all(n),4);case 4:y.o(3);break;case 2:if(c=y.l(),e.F.g){for(p=(h=S(i)).next();!p.done;p=h.next())f=p.value,g=e.m.get(f),r.has(f)&&tS(g,r.get(f));return y.return()}throw c;case 3:return y.m(5,6),y.g(t(),6);case 6:for(y.u(),v=(m=S(i)).next();!v.done;v=m.next())o$(e,v.value);y.B(0);break;case 5:throw new eN(2,3,3015,y.l(),e.g.error||"No error in the media element",null)}})}function o$(e,t){e.m.get(t).shift(),oZ(e,t)}function oZ(e,t){var n=e.m.get(t)[0];if(n)try{n.start()}catch(i){"QuotaExceededError"==i.name?n.p.reject(new eN(2,3,3017,t)):oD(e)?n.p.reject(new eN(2,3,3015,i,e.g.error||"No error in the media element",n.uri)):n.p.reject(new eN(2,3,3024,t)),o$(e,t)}}function o0(e,t){return oQ(e,function(){var n,i,r,a,o,s,u,l,d,c,h,p,f,g,m,v,y,b,w;return L(function(T){if(1==T.h){if(e.D||e.N)return T.return();for(n=e6,e.D=!0,e.o=!1,i=e.g.currentTime,r=e.g.autoplay,e.g.paused||(e.Ra=!0),e.eb&&(e.g.autoplay=!1),T.D(2),e.u.Ua(),o=(a=S(e.j.values())).next();!o.done;o=a.next())o.value.destroy();for(u=(s=S(e.l.values())).next();!u.done;u=s.next()){l=u.value;try{e.i.removeSourceBuffer(l)}catch(e){}}return e.j.clear(),e.l.clear(),d=e.i.duration,e.M=new i1,e.i=oC(e,e.M),T.g(e.M,4)}if(2!=T.h){for(!isNaN(d)&&d?e.i.duration=d:!isNaN(e.ya)&&e.ya&&(e.i.duration=e.
1ya),c=new i1,h=e.i.sourceBuffers,p=t.size,f=0,g=function(){++f===p&&(c.resolve(),e.u.Na(h,"addsourcebuffer",g))},e.u.G(h,"addsourcebuffer",g),v=(m=S(t.keys())).next();!v.done;v=m.next())y=v.value,b=t.get(y),oP(e,y,b,b.codecs);return(w=t.get(n.ha))&&w.isAudioMuxedInVideo&&(e.o=!0),e.o&&!e.m.has(n.ha)&&e.m.set(n.ha,[]),e.g.currentTime=i,T.g(c,2)}return T.u(),e.D=!1,rg(e.F),e.u.Ba(e.g,"canplaythrough",function(){e.F.g||(e.g.autoplay=r,e.Ra&&(e.Ra=!1,e.g.play()))}),T.B(0)})})}function o1(e,t,n,i){var r=!1,a=e3("audio",(i||"").split(",")),o=e3("video",(i||"").split(",")),s=o;"audio"==t&&(s=a),s||(s=i),i=nB(n,s);var u=nK(e.C.get(t)),l=e.B.forceTransmux;if(!ti(i)||!e.I&&nY.includes(i)?l=!0:l||n==u||(l="WEBKIT"===er().Ea()&&nY.includes(n)),l&&(n=nD(e=nF(n,s)))){var d=n();a&&o&&(r=!0),i=d.convertCodecs(t,e)}return t=nq(nW(i)),{dc:d,hl:r,Ph:nK(i),codec:t,mimeType:i}}function o2(e,t,n,i,r){if(t==e5)return{type:o5,qf:n,dc:null};var a=nq(nW(e.C.get(t))),o=nK(e.C.get(t)),s=o1(e,t,n,i),u=s.dc,l=s.hl,d=s.Ph,c=s.codec;s=s.mimeType;var h=!0;return(l&&e.C.has("audio")&&(n=o1(e,"audio",n,i),i=nq(nW(e.C.get("audio"))),h=nK(e.C.get("audio")),h=i==n.codec&&h==n.Ph,n.dc&&n.dc.destroy()),a===c&&o===d&&h)?{type:o5,qf:s,dc:u}:(a=!0,(e.o&&!r.has("audio")||l&&u&&!e.j.has(t))&&(a=!1),a&&"smooth"===e.B.codecSwitchingStrategy&&tr())?{type:o8,qf:s,dc:u}:(u&&u.destroy(),{type:o6,qf:s,dc:null})}(p=oI.prototype).destroy=function(){return this.F.destroy()},p.init=function(e,t,n,i){t=void 0!==t&&t,n=void 0===n?"UNKNOWN":n,i=void 0!==i&&i;var r,a,o,s,u,l,d=this;return L(function(c){if(1==c.h)return r=e6,c.g(d.M,2);if(3!=c.h)return oL(d)||oO(d)?(X("Expected MediaSource to be open during init(); reopening the media source."),d.M=new i1,d.i=oC(d,d.M),c.g(d.M,3)):c.A(3);for(d.I=t,d.P=n,d.cb=i,d.Za=!d.I&&"HLS"==d.P&&!d.cb,d.ia.clear(),d.V=null,d.ua=null,d.T=null,d.na=null,d.ma=new i1,o=(a=S(e.keys())).next();!o.done;o=a.next())s=o.value,u=e.get(s),oP(d,s,u,u.codecs),d.o?(d.m.set(r.ha,[]),d.m.set(r.xa,[])):d.m.set(s,[]);(l=e.get(r.ha))&&l.isAudioMuxedInVideo&&(d.o=!0),c.j()})},p.configure=function(e){this.B=e,this.h&&(this.h.C=e.modifyCueCallback)},p.Qb=function(){var e={total:this.D?[]:a0(this.g.buffered),audio:a0(oB(this,"audio")),video:a0(oB(this,"video")),text:[]};if(this.h){var t=this.h.g,n=this.h.h;null!=t&&null!=n&&e.text.push({start:t,end:n})}return e},p.remove=function(e,t,n,i){var r,a,o=this;return L(function(s){return 1==s.h?(e==(r=e6).xa&&o.J&&(o.J.remove(i),a=o.h.g||0,o.h.remove(a,n,!0)),e==r.Va?s.g(o.h.remove(t,n),0):n>t?s.g(oJ(o,e,function(){return oK(o,e,t,n)},null),5):s.A(0)):o.o?s.g(oJ(o,r.ha,function(){return oK(o,r.ha,t,n)},null),0):s.A(0)})},p.flush=function(e){var t,n=this;return L(function(i){return 1==i.h?e==(t=e6).Va?i.return():i.g(oJ(n,e,function(){n.g.currentTime-=.001,oY(n,e)},null),2):n.o?i.g(oJ(n,t.ha,function(){var e=t.ha;n.g.currentTime-=.001,oY(n,e)},null),0):i.A(0)})},p.endOfStream=function(e){var t=this;return L(function(n){return n.g(oQ(t,function(){oL(t)||oO(t)||(e?t.i.endOfStream(e):t.i.endOfStream())}),0)})},p.ub=function(e){var t=this;return L(function(n){return n.g(oQ(t,function(){if(t.B.durationReductionEmitsUpdateEnd&&e<t.i.duration)for(var n=S(t.l.keys()),i=n.next();!i.done;i=n.next()){i=i.value;var r={start:function(){},p:new i1,uri:null};t.m.get(i).unshift(r)}t.i.duration=e,t.ya=e}),0)})},p.getDuration=function(){return this.i.duration};
1var o3=e.URL.createObjectURL,o4="sequence",o5="none",o6="reset",o8="changeType";function o9(e,t,n){this.i=e,this.D=t,this.u=this.l=1/0,this.h=1,this.g=this.j=null,this.B=0,this.C=!0,this.J=!1,this.I=0,this.F=void 0===n||n,this.H=0,this.o=!1,this.m=e}function o7(e,t,n,i){var r=this;this.u=i,this.g=e,this.D=t,this.h=n,this.l=new ee,this.o=!1,this.m=0,this.C=!1,this.H=this.F=0,this.j=function(e){if(!e.h.stallEnabled)return null;var t=e.h.stallThreshold,n=e.h.stallSkip;return new st(new si(e.g),t,function(t,i,r){return L(function(t){if(1==t.h)return a0(e.g.buffered).length?n?(e.g.currentTime+=n,t.A(2)):t.g(e.g.play(),3):t.return();if(2!=t.h){if(!e.g)return t.return();e.g.pause(),e.g.play()}0==r&&(e.H++,e.u(new i9("stalldetected"))),t.j()})})}(this),this.B=!1,this.l.G(e,"waiting",function(){return se(r)}),this.i=new n4(function(){se(r)}).Ha(this.h.gapJumpTimerTime)}function se(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.o)return}else e.o=!1;if((!e.g.paused||e.g.currentTime==e.m&&(e.g.autoplay||e.g.currentTime!=e.m))&&(!e.j||!sn(e.j))){var t,n,i,r=e.g.currentTime,a=e.g.buffered,o=(t=a,n=e.h.gapDetectionThreshold,!t||!t.length||aY(t)?null:(t=a0(t).findIndex(function(e,t,i){return e.start>r&&(0==t||i[t-1].end-r<=n)}))>=0?t:null);if(null==o&&e.j&&!sn(e.j)){for(var s=a0(a),u=0;u<s.length-1;u++)if(.1>Math.abs(r-s[u].end)&&s[u+1].start>s[u].end){o=u+1;break}}null==o||0==o&&!e.B||(s=a.start(o),(u=e.h.gapPadding)&&(s=Math.ceil((s+u)*100)/100),s>=e.D.Cb()||s-r<.001||(0!=o&&a.end(o-1),i=s,e.C=!0,e.l.Ba(e.g,"seeked",function(){e.C=!1}),e.g.currentTime=i,r==e.m&&(e.m=s),e.F++,e.u(new i9("gapjumped"))))}}}function st(e,t,n){this.i=e,this.u=sr(e),this.h=e.g.currentTime,this.m=Date.now()/1e3,this.l=this.g=0,this.o=t,this.j=n}function sn(e){var t=e.i,n=sr(t),i=t.g.currentTime,r=Date.now()/1e3;return(e.h!=i||e.u!=n)&&(e.m=r,e.h=i,e.u=n,e.g=0),(n=(i=r-e.m)>=e.o&&n&&e.g<3&&(0==e.g||r-e.l>=e.o))&&(e.j&&e.j(e.h,i,e.g),e.g++,e.l=r,e.h=t.g.currentTime),n}function si(e){var t=this;this.g=e,this.h=new ee,this.i=!1,this.h.G(this.g,"audiofocuspaused",function(){t.i=!0}),this.h.G(this.g,"audiofocusgranted",function(){t.i=!1}),this.h.G(this.g,"audiofocuslost",function(){t.i=!0})}function sr(e){if(e.g.paused||0==e.g.playbackRate||e.i||0==e.g.buffered.length)var t=!1;else e:{t=e.g.currentTime,e=S(a0(e.g.buffered));for(var n=e.next();!n.done;n=e.next())if(!(t<(n=n.value).start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}function sa(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=so.value().get(t),n.Ba(e,t,i))}(p=o9.prototype).getDuration=function(){return this.l},p.Nj=function(){return this.h},p.Ri=function(e){this.i=e},p.ub=function(e){this.l=e},p.Sj=function(){return this.i},p.Qi=function(e){this.B=e},p.Uc=function(e){e&&!this.C&&(this.J=!0),this.C=e},p.If=function(e){this.u=e},p.We=function(){return this.u},p.qh=function(e){this.D=e},p.Fj=function(){return this.D},p.Bi=function(e,t){if(0!=e.length){var n=(Date.now()+this.B)/1e3;if(0!=(e=e.filter(function(e){return e.start+t<n})).length){var i=e[e.length-1].end+t;this.rf(e[0].start+t),this.h=e.reduce(function(e,t){return Math.max(e,t.end-t.start)},this.h),this.g=Math.max(this.g,i),null!=this.i&&this.F&&!this.o&&(this.i=n-this.g-this.h)}}},p.ae=function(e){if(0!=e.length){var t=e[0].startTime,n=e[0].endTime,i=(Date.now()+this.B)/1e3;e=S(e);for(var r=e.next();!r.done;r=e.next())i<(r=r.value).startTime||(t=Math.min(t,r.startTime),n=Math.max(n,r.endTime),this.h=Math.max(this.h,r.endTime-r.startTime));this.rf(t),this.g=Math.max(this.g,n),null!=this.i&&this.F&&!this.o&&(this.i=i-this.g-this.h)}},p.Ai=function(e,t){this.rf(e),t==1/0||this.U()||(this.g=Math.max(this.g,t))},p.Oj=function(){return this.g},p.kf=function(){this.o=!0},p.pk=function(){return this.o},p.rh=function(e){this.m=e},p.Kj=function(){return this.m},p.rf=function(e){null==this.j?this.j=e:this.J||(this.j=Math.min(this.j,e))},p.Ug=function(e){this.h=Math.max(this.h,e)},p.offset=function(e){null!=this.j&&(this.j+=e),null!=this.g&&(this.g+=e)},p.U=function(){return this.l==1/0&&!this.C},p.Pc=function(){return this.l!=1/0&&!this.C},p.Db=function(){return Math.max(this.I,this.Ac()-this.u)},p.Ui=function(e){this.I=e},p.Ac=function(){return this.U()||this.Pc()?Math.min(Math.max(0,(Date.now()+this.B)/1e3-this.h-this.i)+this.H,this.l):this.g?Math.min(this.g,this.l):this.l},p.Td=function(e){var t=Math.max(this.j,this.I);return this.u==1/0?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.Ac()-this.u
1+e,this.Cb()))},p.Sb=function(){return this.Td(0)},p.Cb=function(){return Math.max(0,this.Ac()-(this.U()||this.Pc()?this.D:0))},p.gj=function(){return null!=this.i&&(null==this.g||!this.F)},p.Pi=function(e){this.H=e},p.Aj=function(){return this.H},q("shaka.media.PresentationTimeline",o9),o9.prototype.getAvailabilityTimeOffset=o9.prototype.Aj,o9.prototype.setAvailabilityTimeOffset=o9.prototype.Pi,o9.prototype.usingPresentationStartTime=o9.prototype.gj,o9.prototype.getSeekRangeEnd=o9.prototype.Cb,o9.prototype.getSeekRangeStart=o9.prototype.Sb,o9.prototype.getSafeSeekRangeStart=o9.prototype.Td,o9.prototype.getSegmentAvailabilityEnd=o9.prototype.Ac,o9.prototype.setUserSeekStart=o9.prototype.Ui,o9.prototype.getSegmentAvailabilityStart=o9.prototype.Db,o9.prototype.isInProgress=o9.prototype.Pc,o9.prototype.isLive=o9.prototype.U,o9.prototype.offset=o9.prototype.offset,o9.prototype.notifyMaxSegmentDuration=o9.prototype.Ug,o9.prototype.notifyMinSegmentStartTime=o9.prototype.rf,o9.prototype.getInitialProgramDateTime=o9.prototype.Kj,o9.prototype.setInitialProgramDateTime=o9.prototype.rh,o9.prototype.isStartTimeLocked=o9.prototype.pk,o9.prototype.lockStartTime=o9.prototype.kf,o9.prototype.getMaxSegmentEndTime=o9.prototype.Oj,o9.prototype.notifyPeriodDuration=o9.prototype.Ai,o9.prototype.notifySegments=o9.prototype.ae,o9.prototype.notifyTimeRange=o9.prototype.Bi,o9.prototype.getDelay=o9.prototype.Fj,o9.prototype.setDelay=o9.prototype.qh,o9.prototype.getSegmentAvailabilityDuration=o9.prototype.We,o9.prototype.setSegmentAvailabilityDuration=o9.prototype.If,o9.prototype.setStatic=o9.prototype.Uc,o9.prototype.setClockOffset=o9.prototype.Qi,o9.prototype.getPresentationStartTime=o9.prototype.Sj,o9.prototype.setDuration=o9.prototype.ub,o9.prototype.setPresentationStartTime=o9.prototype.Ri,o9.prototype.getMaxSegmentDuration=o9.prototype.Nj,o9.prototype.getDuration=o9.prototype.getDuration,o7.prototype.release=function(){this.l&&(this.l.release(),this.l=null),null!=this.i&&(this.i.stop(),this.i=null),this.j&&(this.j.release(),this.j=null),this.g=this.D=this.u=null},o7.prototype.vf=function(){this.B=!0,this.i&&this.i.Ha(this.h.gapJumpTimerTime),se(this)},st.prototype.release=function(){this.i&&this.i.release(),this.j=this.i=null},si.prototype.release=function(){this.h&&this.h.release(),this.h=null};var so=new ei(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function ss(e,t,n,i){var r=this;this.g=e,this.m=t,this.u=n,this.l=null,this.j=function(){return null!=r.l||(r.l=i()),r.l},this.o=!1,this.h=new ee,this.i=new sh(e),sa(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){sd(r,r.j())})}function su(e){return e.o?e.g.currentTime:e.j()}function sl(e,t){e.g.readyState>0?sp(e.i,t):sa(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){sd(e,e.j())})}function sd(e,t){.001>Math.abs(e.g.currentTime-t)?sc(e):(e.h.Ba(e.g,"seeking",function(){sc(e)}),sp(e.i,e.g.currentTime&&0!=e.g.currentTime?e.g.currentTime:t))}function sc(e){e.o=!0,e.h.G(e.g,"seeking",function(){return e.m()}),e.u(e.g.currentTime)}function sh(e){var t=this;this.g=e,this.m=10,this.j=this.l=this.i=0,this.h=new n4(function(){t.i<=0||t.g.currentTime!=t.l||t.g.currentTime===t.j?t.h.stop():(t.g.currentTime=t.j,t.i--)})}function sp(e,t){e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,e.h.Ha(.1)}function sf(e){this.g=e,this.i=!1,this.h=null,this.j=new ee}function sg(e){return e.g.getStartDate&&!isNaN(e=e.g.getStartDate().getTime())?e/1e3:null}function sm(e,t){return(e=e.g.seekable).length>0&&(t=Math.max(e.start(0),t),t=Math.min(e.end(e.length-1),t)),t}function sv(e,t,n,i,r,a){var o=this;this.h=e,this.g=t.presentationTimeline,this.l=n,this.u=r,this.o=null,this.i=new o7(e,t.presentationTimeline,n,a),this.j=new ss(e,function(){e:{var e=o.i;e.o=!0,e.B=!1,e.i&&e.i.Ha(e.h.gapJumpTimerTime),se(e);var t=su(o.j);if(e=s_(o,t),!ta()&&Math.abs(e-t)>.001){t=!1;var n=er().Mi();if(n){var i=Date.now()/1e3;(!o.o||o.o<i-n)&&(o.o=i,t=!0)}else t=!0;if(t){sl(o.j,e),e=void 0;break e}}o.u(),e=void 0}return e},function(e){var t=o.i;t.g.seeking&&!t.o&&(t.o=!0,t.m=e),t.i&&t.i.Ha(t.h.gapJumpTimerTime),se(t)},function(){return sy(o,i)}),this.m=new n4(function(){if(0!=o.h.readyState&&!o.h.paused){var e=su(o.j),t=o.g.Sb(),n=o.g.Cb();
1n-t<3&&(t=n-3),e<t&&(e=s_(o,e),o.h.currentTime=e)}})}function sy(e,t){return null==t?t=e.g.getDuration()<1/0?e.g.Sb():e.g.Cb():t instanceof Date?t=t.getTime()/1e3-(e.g.m||e.g.i):t<0&&(t=e.g.Cb()+t),sb(e,sw(e,t))}function sb(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function s_(e,t){var n=e.l.rebufferingGoal,i=e.l.safeSeekOffset,r=e.g.Sb(),a=e.g.Cb(),o=e.g.getDuration();a-r<3&&(r=a-3);var s=e.g.Td(n),u=e.g.Td(i);return n=e.g.Td(n+i),t>=o?sb(e,t):t>a?a-e.l.safeSeekEndOffset:t<r?e.g.U()&&e.l.returnToEndOfLiveWindowWhenOutside?a-e.l.safeSeekEndOffset:a$(e.h.buffered,u)?u:n:t>=s||a$(e.h.buffered,t)?t:n}function sw(e,t){var n=e.g.Sb();return t<n?n:t>(e=e.g.Cb())?e:t}function sT(e){this.g=e,this.m=null,this.i=0,this.o=!1}function sS(e,t,n){return new sT([e=new aK(e,e+t,function(){return n},0,null,null,e,e,e+t)])}function sx(e,t,n,i){this.i=e,this.h=t,this.g=n,this.reverse=i}function sA(){sT.call(this,[]),this.h=[]}function sE(e){var t=this;this.g=e,this.j=!1,this.h=this.g.Hg(),this.i=new n4(function(){t.g.isPaused()||t.g.Ak(.25*t.h)})}function sk(e){e.i.stop();var t=e.j?0:e.h;if(t>=0&&t<=16)try{e.g.Hg()!=t&&e.g.Si(t);return}catch(e){}e.i.Ha(.25),0!=e.g.Hg()&&e.g.Si(0)}function sI(e){var t=this;this.j=e,this.h=new ee,this.g=new Set,this.i=new n4(function(){sC(t,!1)}).wb(),e.paused||this.i.Ha(.25),this.h.G(e,"playing",function(){t.i.wb().Ha(.25)}),this.h.G(e,"pause",function(){t.i.stop()}),this.h.G(e,"seeked",function(){t.i.wb(),e.paused||t.i.Ha(.25)})}function sC(e,t){var n=e.j.currentTime;e=S(e.g);for(var i=e.next();!i.done;i=e.next())i.value.j(n,t)}function sM(e){rt.call(this),this.g=new Map,this.h=e}function sP(e,t,n){return!!(e=e.h()[n])&&e.length>0&&(n=e[e.length-1].end,t>=e[0].start&&t<n)}function sD(e){var t={bandwidth:e.bandwidth||0,audioSamplingRate:null,codecs:e.codecs,contentType:e.type,frameRate:null,height:null,mimeType:e.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:e.roles,language:null};return"video"==e.type&&(t.frameRate=e.frameRate||null,t.height=e.height||null,t.pixelAspectRatio=e.pixelAspectRatio||null,t.width=e.width||null),"audio"==e.type&&(t.audioSamplingRate=e.audioSamplingRate,t.channelsCount=e.channelsCount,t.label=e.label||null,t.language=e.language),t}function sR(e){rt.call(this),this.h=new Map,this.i=e,this.g=null}function sL(e,t){var n=t.schemeIdUri+"_"+t.id+"_"+t.startTime.toFixed(1)+"_"+t.endTime.toFixed(1);e.h.has(n)||(e.h.set(n,t),t=new i9("regionadd",new Map([["region",t]])),e.dispatchEvent(t),e.g||(e.g=new n4(function(){for(var t=e.i(),n=S(e.h),i=n.next();!i.done;i=n.next()){var r=S(i.value);i=r.next().value,(r=r.next().value).endTime<t.start&&(e.h.delete(i),i=new i9("regionremove",new Map([["region",r]])),e.dispatchEvent(i))}!e.h.size&&e.g&&(e.g.stop(),e.g=null)}).Ha(2)))}function sO(e,t,n,i){this.m=e,this.i=t,this.l=n,this.g=new Map,this.j=new Map,this.h=null,this.o=i}function sN(e,t,n){if(n=void 0!==n&&n,!e.i.segmentIndex||(e.h||(e.h=e.i.segmentIndex.Rb(t,!0,e.o)),!e.h))return Promise.resolve();for(n&&e.h.next(),t=[];e.g.size<e.m&&(n=e.h.next().value);){var i=!0;n.isPreload()&&null!=n.endByte&&(i=!1),2==n.Ub()&&(i=!1),n.Tb(!1)&&(i=!1),i&&n.$&&t.push(sj(e,n.$)),i&&!e.g.has(n)&&(i=new sq(e.l),t.push(sG(i,n,e.i)),e.g.set(n,i))}return sF(e),Promise.all(t)}function sj(e,t){if(!e.i.segmentIndex||t.Tb()||Array.from(e.j.keys()).some(function(e){return aG(e,t)}))return Promise.resolve();var n=new sq(e.l),i=sG(n,t,e.i);return e.j.set(t,n),i}function sU(e,t){t=S(t.keys());for(var n=t.next();!n.done;n=t.next())(n=n.value)&&sH(e,n)}function sB(e,t){t=void 0===t||t,sU(e,e.g),t&&sU(e,e.j),e.h=null}function sF(e){if(e.g.size)for(var t=Array.from(e.g.keys()),n=S(e.j.keys()),i=n.next(),r={};!i.done;r={Mg:void 0},i=n.next())r.Mg=i.value,t.some(function(e){return function(t){return aG(t.$,e.Mg)}}(r))||sH(e,r.Mg)}function sV(e,t){e.m=t;for(var n=Array.from(e.g.keys());n.length>t;){var i=n.pop();i&&sH(e,i)}sF(e)}function sH(e,t){var n=e.g;t instanceof aq&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function sq(e){this.g=e,this.be=this.yh=null}function sG(e,t,n){var i=[];return e.be=e.g(t,n,function(t){var n;return L(function(r){return e.yh?(n=t,i.length>0&&(i.push(t),n=e$(i),i=[]),r.g(e.yh(n),0)):(i.push(t),r.return())})}),e.be.promise.catch(function(e){return e instanceof eN&&7001==e.code?Promise.resolve():Promise.reject(e)})}function sK(e){var t=nK(e);return{type:t.split("/")[0],mimeType:t,codecs:e=nW(e),language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,le:null,colorGamut:null,frameRate:null}}function sW(e){var t=new Set,n=[];e=S(e);for(var i=e.next();!i.done;i=e.next()){var r=nG(i=i.value);t.has(r)||(n.push(i),t.add(r))}return t=e4("audio",n),i=e4("video",n),e=e4(e5,n),i=function(e){if(e.length<=1)return e;var t=e.find(function(e){return e.startsWith("dvav.")||e.startsWith("dva1.")||e.startsWith("dvh1.")||e.startsWith("dvhe.")||e.startsWith("dav1.")||e.startsWith("dvc1.")||e.startsWith("dv
1i1.")});return t?ti('video/mp4; codecs="'+t+'"')?[t]:e.filter(function(e){return e!=t}):e}(i),t=t.concat(i).concat(e),n.length&&!t.length?n:t}function sz(t,n,i){var r,a,o,s,u;return L(function(l){if(1==l.h)return(r=n).cryptoKey?l.A(2):l.g(r.fetchKey(),3);if(!(a=r.iv))for(a=eD(new ArrayBuffer(16)),o=r.firstMediaSequenceNumber+i,s=a.byteLength-1;s>=0;s--)a[s]=255&o,o>>=8;return u="CBC"==n.blockCipherMode?{name:"AES-CBC",iv:a}:{name:"AES-CTR",counter:a,length:64},l.return(e.crypto.subtle.decrypt(u,r.cryptoKey,t))})}function sX(e,t,n){var i,r,a,o,s;return L(function(u){switch(u.h){case 1:if(i=sY(e),r=sQ.get(i))return u.return(r);return a=0,o=rs([e],n),u.m(2),o.method="HEAD",u.g(t.request(a,o).promise,4);case 4:r=u.i.headers["content-type"],u.o(3);break;case 2:if(!(s=u.l())||1002!=s.code&&1001!=s.code){u.A(3);break}return o.method="GET",u.g(t.request(a,o).promise,6);case 6:r=u.i.headers["content-type"];case 3:return u.return(r?r.toLowerCase().split(";").shift():"")}})}function sY(e){for(var t=e.length,n=0;n<e.length;n++){var i=e.charCodeAt(n);if(63===i||35===i){t=n;break}}for(n=t-1;n>=0;n--){if(46===(i=e.charCodeAt(n))){if(n+1<t)return e.slice(n+1,t).toLowerCase();break}if(47===i)break}return""}function sJ(e,t,n,i,r){return e=rs(e,i,r),(0!=t||null!=n)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}ss.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.i&&(this.i.release(),this.i=null),this.m=function(){},this.g=null},sh.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null},(p=sf.prototype).ready=function(){var e=this;sa(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,function(){if(null==e.h||0==e.h&&e.g.duration!=1/0)e.i=!0;else{var t=e.g.currentTime,n=null;if("number"==typeof e.h)n=e.h;else if(e.h instanceof Date){var i=sg(e);null!==i&&(n=e.h.getTime()/1e3-i,n=sm(e,n))}null==n?e.i=!0:(n<0&&(n=Math.max(0,t+n)),t!=n?(e.j.Ba(e.g,"seeking",function(){e.i=!0}),e.g.currentTime=n):e.i=!0)}})},p.release=function(){this.j&&(this.j.release(),this.j=null),this.g=null},p.Wf=function(e){this.h=this.i?this.h:e},p.Id=function(){var e=this.i?this.g.currentTime:this.h;return e instanceof Date&&(e=sm(this,e=e.getTime()/1e3-(sg(this)||0))),e||0},p.Kh=function(){return 0},p.Ih=function(){return 0},p.Jh=function(){return!1},p.zi=function(){},p.mi=function(){var e=aQ(this.g.buffered);return null!=e&&e>=this.g.duration-1},(p=sv.prototype).ready=function(){this.m.Ha(.25)},p.release=function(){this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.m&&(this.m.stop(),this.m=null),this.h=this.j=this.g=this.l=null,this.u=function(){}},p.Wf=function(e){sl(this.j,sy(this,e))},p.Id=function(){var e=su(this.j);return this.h.readyState>0&&!this.h.paused?sw(this,e):e},p.Kh=function(){return this.i.H},p.Ih=function(){return this.i.F},p.Jh=function(){return this.i.C},p.zi=function(){this.i.vf()},p.mi=function(){if(this.g.U()){var e=this.g.Ac(),t=aQ(this.h.buffered);if(null!=t&&t>=e)return!0}return!1},(p=sT.prototype).getNumReferences=function(){return this.g.length},p.getNumEvicted=function(){return this.i},p.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},p.yk=function(){this.o=!0},p.pb=function(e){for(var t=S(this.g),n=t.next();!n.done;n=t.next())e(n.value)},p.Bb=function(){return this.g[0]||null},p.find=function(e){var t=this.g.length-1;if(t<0)return null;if(e<this.g[0].startTime)return this.i;var n=tA(this.g,function(t){return t.startTime<=e})-1;if(n<0)return null;var i=this.g[n];return t=n<t?this.g[n+1].startTime:i.endTime,e>=i.startTime&&e<t?n+this.i:null},p.get=function(e){return 0==this.g.length||(e-=this.i)<0||e>=this.g.length?null:this.g[e]},p.offset=function(e){if(!this.o)for(var t=S(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},p.mf=function(e){if(!this.o&&e.length){var t=Math.round(1e3*e[0].startTime)/1e3,n=tA(this.g,function(e){return Math.round(1e3*e.startTime)/1e3<t});this.g.length=n,this.g.push.apply(this.g,x(e))}},p.Zd=function(e,t){for(var n=Math.max(t,this.g.length>0?this.g[0].startTime:-1/0),i=0;i<e.length&&e[i].endTime<=n;)i++;i>0&&(e=e.slice(i)),this.mf(e),this.Sa(t)},p.Sa=function(e){if(!this.o){var t=tA(this.g,function(t){return t.endTime<=e});t>0&&(this.i+=t,this.g=this.g.slice(t))}},p.fd=function(e,t,n){if(n=void 0!==n&&n,!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=t)this.g.pop();else break;var i=tA(this.g,function(t){return t.endTime<=e});i>0&&(n||(this.i+=i),this.g=this.g.slice(i)),0!=this.g.length&&((t=new aK((n=this.g[this.g.length-1]).startTime,t,n.D,n.startByte,n.endByte,n.$,n.timestampOffset,n.appendWindowStart,n.appendWindowEnd,n.g,n.tilesLayout,n.C,n.h,n.status,n.aesKey)).mimeType=n.mimeType,t.codecs=n.co
1decs,t.i=n.i,this.g[this.g.length-1]=t)}},p.Nf=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new n4(function(){var e=t();e?n.g.push.apply(n.g,x(e)):(n.m.stop(),n.m=null)}),this.m.Ha(e))},sT.prototype[Symbol.iterator]=function(){return this.Rb(0)},sT.prototype.Rb=function(e,t,n){t=void 0!==t&&t,n=void 0!==n&&n;var i=this.find(e);if(null==i)return null;var r=this.get(i);n?i++:i--;var a=-1;if(r&&r.g.length>0)for(var o=r.g.length-1;o>=0;--o){var s=r.g[o];if(e>=s.startTime&&e<s.endTime){if(!t){for(;o&&!s.l;)o--,s=r.g[o];if(!s.l)return X("No independent partial segment found!"),null}n?i--:i++,a=o-1;break}}return new sx(this,i,a,n)},sT.prototype.Me=function(){return -1},q("shaka.media.SegmentIndex",sT),sT.forSingleSegment=sS,sT.prototype.getIteratorForTime=sT.prototype.Rb,sT.prototype.updateEvery=sT.prototype.Nf,sT.prototype.fit=sT.prototype.fd,sT.prototype.evict=sT.prototype.Sa,sT.prototype.mergeAndEvict=sT.prototype.Zd,sT.prototype.offset=sT.prototype.offset,sT.prototype.get=sT.prototype.get,sT.prototype.find=sT.prototype.find,sT.prototype.markImmutable=sT.prototype.yk,sT.prototype.release=sT.prototype.release,sT.prototype.getNumEvicted=sT.prototype.getNumEvicted,sT.prototype.getNumReferences=sT.prototype.getNumReferences,(p=sx.prototype).Bd=function(e){this.reverse=e},p.vj=function(){return this.h},p.current=function(){var e=this.i.get(this.h);return e&&e.g.length>0&&e.m&&this.g>=e.g.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&e.g.length>0?e.g[this.g]:e},p.next=function(){var e=this.i.get(this.h);return this.reverse?e&&e.g.length>0?(this.g--,this.g<0&&(this.h--,this.g=(e=this.i.get(this.h))&&e.g.length>0?e.g.length-1:0)):(this.h--,this.g=0):e&&e.g.length>0?(this.g++,e.m&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),{value:e=this.current(),done:!e}},p.ih=function(){var e=this.current();if(e&&e.u&&!e.l&&(e=this.i.get(this.h))&&e.g.length>0)for(var t=e.g[this.g];t.l&&!(this.g<=0);)this.g--,t=e.g[this.g]},q("shaka.media.SegmentIterator",sx),sx.prototype.resetToLastIndependent=sx.prototype.ih,sx.prototype.next=sx.prototype.next,sx.prototype.current=sx.prototype.current,sx.prototype.currentPosition=sx.prototype.vj,sx.prototype.setReverse=sx.prototype.Bd,w(sA,sT),(p=sA.prototype).clone=function(){var e=new sA;return e.h=this.h.slice(),e.i=this.i,e},p.release=function(){this.h=[]},p.pb=function(e){for(var t=S(this.h),n=t.next();!n.done;n=t.next())n.value.pb(e)},p.find=function(e){for(var t=this.i,n=S(this.h),i=n.next();!i.done;i=n.next()){var r=(i=i.value).find(e);if(null!=r)return r+t;t+=i.getNumEvicted()+i.getNumReferences()}return null},p.get=function(e){for(var t=this.i,n=S(this.h),i=n.next();!i.done;i=n.next()){var r=(i=i.value).get(e-t);if(r)return r;r=i.getNumReferences(),t+=i.getNumEvicted()+r}return null},p.offset=function(){},p.mf=function(){},p.Sa=function(e){if(this.h.length){var t=this.h[0];t.Sa(e),0==t.getNumReferences()&&(this.h.shift(),this.i+=t.getNumEvicted(),t.release(),this.Sa(e))}},p.Zd=function(){},p.fd=function(){},p.Nf=function(){},q("shaka.media.MetaSegmentIndex",sA),sA.prototype.updateEvery=sA.prototype.Nf,sA.prototype.fit=sA.prototype.fd,sA.prototype.mergeAndEvict=sA.prototype.Zd,sA.prototype.evict=sA.prototype.Sa,sA.prototype.merge=sA.prototype.mf,sA.prototype.offset=sA.prototype.offset,sA.prototype.get=sA.prototype.get,sA.prototype.find=sA.prototype.find,sA.prototype.forEachTopLevelReference=sA.prototype.pb,sA.prototype.release=sA.prototype.release,sE.prototype.release=function(){this.set(this.jd()),this.i&&(this.i.stop(),this.i=null),this.g=null},sE.prototype.set=function(e){this.h=e,sk(this)},sE.prototype.jd=function(){return this.g.jd()},sI.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i.stop();for(var e=S(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},w(sM,rt),sM.prototype.release=function(){this.g.clear(),rt.prototype.release.call(this)},sM.prototype.j=function(e){for(var t=S(this.g.values()),n=t.next();!n.done;n=t.next()){var i=(n=n.value).mg;e:{for(var r=n.ee,a=r.length-1;a>=0;a--){var o=r[a];if(o.position<=e){r=o.pd;break e}}r=null}a=r&&!(i===r||i&&r&&i.bandwidth==r.bandwidth&&i.audioSamplingRate==r.audioSamplingRate&&i.codecs==r.codecs&&i.contentType==r.contentType&&i.frameRate==r.frameRate&&i.height==r.height&&i.mimeType==r.mimeType&&i.channelsCount==r.channelsCount&&i.pixelAspectRatio==r.pixelAspectRatio&&i.width==r.width),o=r&&i&&r.label&&i.label&&i.label!==r.label;var s=r&&i&&r.language&&i.language&&i.language!==r.language;i=r&&i&&r.roles&&i.roles&&!tE(i.roles,r.roles),(o||s||i)&&sP(this,e,r.contentType)&&(n.mg=r,i=new i9("audiotrackchange",new Map([["quality",r],["position",e]])),this.dispatchEvent(i)),a&&sP(this,e,r.contentType)&&(n.mg=r,JSON.stringify(r),n=new i9("qual
1itychange",new Map([["quality",r],["position",e]])),this.dispatchEvent(n))}},w(sR,rt),sR.prototype.release=function(){this.h.clear(),this.g&&(this.g.stop(),this.g=null),rt.prototype.release.call(this)},sO.prototype.Sa=function(e,t){t=void 0!==t&&t;for(var n=S(this.g.keys()),i=n.next();!i.done;i=n.next())e>(i=i.value).endTime&&sH(this,i);t&&sF(this)},sO.prototype.Bd=function(e){this.o=e,this.h&&this.h.Bd(e)},sq.prototype.abort=function(){this.be&&this.be.abort()};var sQ=new Map().set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv","text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");function s$(e,t){var n=this;this.g=t,this.j=e,this.i=null,this.J=new Map,this.C=1,this.B=this.o=null,this.P=0,this.h=new Map,this.K=!1,this.T=null,this.D=!1,this.l=new rf(function(){var e,t,i,r,a,o;return L(function(s){if(1==s.h){for(n.u&&n.u.stop(),n.u=null,n.I&&n.I.stop(),n.I=null,e=[],i=(t=S(n.h.values())).next();!i.done;i=t.next())uo(r=i.value),e.push(us(r)),r.aa&&(sB(r.aa),r.aa=null);
1for(o=(a=S(n.m.values())).next();!o.done;o=a.next())sB(o.value);return s.g(Promise.all(e),2)}n.h.clear(),n.m.clear(),n.g=null,n.j=null,n.i=null,n.H=null,s.j()})}),this.N=Date.now()/1e3,this.m=new Map,this.O={projection:null,hfov:null},this.Y=0,this.V=1/0,this.F=null,this.M=[],this.u=new n4(function(){if(n.j&&n.g)if(n.j.presentationTimeline.U()){var e,t=n.j.presentationTimeline.Sb(),i=n.j.presentationTimeline.Cb();i-t>1?(e=n.g.X,L(function(n){return e.F.g||e.g.error||e.N||e.D||oL(e)||oO(e)?n.return():n.g(oQ(e,function(){oL(e)||oO(e)||e.i.setLiveSeekableRange(t,i)}),0)})):oG(n.g.X)}else oG(n.g.X),n.u&&n.u.stop();else n.u&&n.u.stop()}),this.H=null,this.I=new n4(function(){var e=n.g.video;!e.ended&&n.H&&(e.currentTime=n.H,n.H=null)})}function sZ(e,t){for(var n=0>e.g.ib(),i=S(e.h.values()),r=i.next();!r.done;r=i.next())(r=r.value).sa&&r.sa.Bd(n),r.aa&&r.aa.Bd(n);for(r=(i=S(e.m.values())).next();!r.done;r=i.next())r.value.Bd(n);(n=e.h.get("video"))&&(i=n.stream)&&(t?(t=i.trickModeVideo)&&!n.Fc&&(s2(e,t,!1,0,!1),n.Fc=i):(t=n.Fc)&&(n.Fc=null,s2(e,t,!0,0,!1)))}function s0(e,t,n,i,r,a){n=void 0!==n&&n,i=void 0===i?0:i,r=void 0!==r&&r,a=void 0!==a&&a,e.o=t,e.K&&(t.video&&s2(e,t.video,n,i,r,a),t.audio&&s2(e,t.audio,n,i,r,a))}function s1(e,t){L(function(n){if(1==n.h)return e.F=null,e.B=t,e.K?t.segmentIndex?n.A(2):n.g(t.createSegmentIndex(),2):n.return();s2(e,t,!0,0,!1),n.j()})}function s2(e,t,n,i,r,a){var o,s,u,l,d,c,h,p,f=e.h.get(t.type);f||t.type!=e5?f&&(f.Fc&&(t.trickModeVideo?(f.Fc=t,t=t.trickModeVideo):f.Fc=null),f.stream!=t||r)&&(e.m.has(t)?f.aa=e.m.get(t):f.aa&&(o=f.aa,(s=t)&&s!==o.i&&(sB(o),o.i=s)),t.type==e5&&f.stream!=t&&(r=nB(t.mimeType,t.codecs),oR(e.g.X,r,e.j.sequenceMode,t.external)),!e.m.has(f.stream)&&f.stream.closeSegmentIndex&&(f.Pa?(r="("+f.type+":"+f.stream.id+")",e.J.has(r)||e.J.set(r,f.stream.closeSegmentIndex)):f.stream.closeSegmentIndex()),r=f.stream.isAudioMuxedInVideo!=t.isAudioMuxedInVideo,f.stream=t,f.sa=null,f.cg=!!a,t.dependencyStream?f.yc=s5(e,t.dependencyStream):f.yc=null,r&&(f.jb=null,f.lc=null,f.kc=null,t.isAudioMuxedInVideo&&(t=null,"video"===f.type?t=e.h.get("audio"):"audio"===f.type&&(t=e.h.get("video")),t&&(us(t).catch(function(){}),t.jb=null,t.lc=null,t.kc=null,s4(e,t),s3(e,t).catch(function(t){e.g&&e.g.onError(t)})))),n?f.Kc?f.Uf=!0:f.Pa?(f.Ic=!0,f.Le=i,f.Uf=!0):(uo(f),ur(e,f,!0,i).catch(function(t){e.g&&e.g.onError(t)})):f.Pa||f.xb||ua(e,f,0),s3(e,f).catch(function(t){e.g&&e.g.onError(t)})):(u=t,L(function(t){switch(t.h){case 1:return l=e6,e.P++,d=e.P,t.m(2),t.g(oV(e.g.X,l.Va),4);case 4:t.o(3);break;case 2:c=t.l(),e.g&&e.g.onError(c);case 3:h=nB(u.mimeType,u.codecs),oR(e.g.X,h,e.j.sequenceMode,u.external),(e.g.X.ka.isTextVisible()||e.i.alwaysStreamText)&&e.P==d&&(p=s5(e,u),e.h.set(l.Va,p),ua(e,p,0)),t.j()}}))}function s3(e,t){var n,i,r;return L(function(a){if(1==a.h)return t.Eb?(n=t.stream,i=t.Eb,n.segmentIndex?a.A(2):a.g(n.createSegmentIndex(),2)):a.return();if(4!=a.h)return(r=n.dependencyStream)&&!r.segmentIndex?a.g(r.createSegmentIndex(),4):a.A(4);if(t.Eb!=i||t.stream!=n)return a.return();var o=e.g.jc(),s=oj(e.g.X,t.type),u=t.stream.segmentIndex.find(t.Ga?t.Ga.endTime:o),l=null==u?null:t.stream.segmentIndex.get(u);u=l?aW(l):null,l&&!u&&(u=(l.endTime-l.getStartTime())*(t.stream.bandwidth||e.o.bandwidth)/8),u?((l=l.$)&&(u+=(l.endByte?l.endByte+1-l.startByte:null)||0),o=8*u/(l=e.g.getBandwidthEstimate())<(s||0)-o-e.i.rebufferingGoal||t.Eb.h.g>u):o=!0,o&&t.Eb.abort(),a.j()})}function s4(e,t){t.Kc||t.Ic||(t.Pa?(t.Ic=!0,t.Le=0):null==oN(e.g.X,t.type)?null!=t.xb||ua(e,t,0):(uo(t),ur(e,t,!1,0).catch(function(t){e.g&&e.g.onError(t)})))}function s5(e,t){var n={stream:t,type:t.type,sa:null,aa:s6(e,t),Ga:null,jb:null,jf:null,lc:null,kc:null,gf:null,hf:null,Fc:null,endOfStream:!1,Pa:!1,xb:null,Ic:!1,Le:0,Uf:!1,Kc:!1,Tc:!0,cg:!1,dh:!1,md:!1,Eb:null,yc:null};return t.dependencyStream&&(n.yc=s5(e,t.dependencyStream)),n}function s6(e,t){if("video"===t.type&&e.i.disableVideoPrefetch||"audio"===t.type&&e.i.disableAudioPrefetch||t.type===e5&&("application/cea-608"==t.mimeType||"application/cea-708"==t.mimeType)||t.type===e5&&e.i.disableTextPrefetch)return null;if(e.m.has(t))return e.m.get(t);var n=e.h.get(t.type);return(n=n&&n.aa)&&t===n.i?n:e.i.segmentPrefetchLimit>0?new sO(e.i.segmentPrefetchLimit,t,function(t,n,i){return ui(t,n,i||null,e.i.retryParameters,e.g.nc)},0>e.g.ib()):null}function s8(e,t,n,i){if(t.sa){var r=t.sa.current();return r&&t.Ga&&(n=t.Ga.endTime,or(t.Ga.startTime,r.startTime,.002)&&or(n,r.endTime,.002)&&(r=t.sa.next().value)),r}if(t.Ga||i)return r=t.Ga?t.Ga.endTime:i,n=0>e.g.ib(),t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Rb(r,!1,n)),t.sa&&t.sa.next().value;var a=Math.max(n-(i=e.j.sequenceMode||uc(e)?0:e.i.inaccurateManifestTolerance),0),o=e.g.X.getDuration();for(1>Math.abs(a-o)&&(a=Math.max(n-(i=1),0)),o=0>e.g.ib(),e=null,i&&(t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Rb(a,!1,o)),e=t.sa&&t.sa.next().value),e||(t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Rb(n,!1,o)),e=t.sa&&t.sa.next().value);(null==(r=e)?void 0:r.Ub())===2;)i=n=void 0,e=null!=(i=null==(n=t.sa)?void 0:n.next().value)?i:null;return e}function s9(e,t,n,i,r,a,o,s){var u,l,d,c,h;return L(function(p){switch(p.h){case 1:if(u=e6,l=up(e),p.m(2),t.lc=i,t.kc=r,o&&(t.gf=o),s&&(t.hf=s),t.jf=n,d=e.j.sequenceMode||"HLS"==e.j.type,c=null,t.type===u.xa?c=e.h.get(u.ha):t.type===u.ha&&(c=e.h.get(u.xa)),!(c&&c.stream&&c.stream.isAudioMuxedInVideo)){p.A(4);break}return p.g(oH(e.g.X,c.type,n,i,r,d,c.stream.mimeType,c.stream.codecs,l),4);case 4:return p.g(oH(e.g.X,t.type,n,i,r,d,a.mimeType||t.stream.mimeType,a.
1codecs||t.stream.codecs,l),6);case 6:p.o(0);break;case 2:throw h=p.l(),t.lc=null,t.kc=null,t.gf=null,t.hf=null,t.jf=null,h}})}function s7(e,t,n,i,r,a,o,s){var u,l,d,c;return o=void 0!==o&&o,s=void 0!==s&&s,L(function(h){switch(h.h){case 1:return u=i.closedCaptions&&i.closedCaptions.size>0,e.i.shouldFixTimestampOffset&&(l="video/mp4"==i.mimeType||"audio/mp4"==i.mimeType,d=null,r.$&&(d=r.$.timescale),l&&d&&"video"===i.type&&"DASH"==e.j.type&&new rT().box("moof",rS).box("traf",rS).S("tfdt",function(n){var i,a,o,s;return L(function(u){return(i=al(n.reader,n.version).baseMediaDecodeTime)?(a=-i/d,(Number(t.jf)||0)<a)?(o=t.lc,s=t.kc,u.g(s9(e,t,a,o,s,r),0)):u.A(0):u.return()})}).parse(a,!1,o)),h.g(ue(e,t,n),2);case 2:return rg(e.l),c=t.Tc,t.Tc=!1,h.g(e.g.Qh(t.type,a),3);case 3:return h.g(oF(e.g.X,t.type,a,r,i,u,c,s,o),4);case 4:rg(e.l),h.j()}})}function ue(e,t,n){var i,r,a,o,s,u,l,d,c;return L(function(h){return 1==h.h?(e.F==t&&(e.F=null),(i=t.stream.segmentIndex)instanceof sA&&(i.Sa(e.j.presentationTimeline.Db()),r=[],function(e,t){e=S(e.h);for(var n=e.next();!n.done;n=e.next())t(n.value)}(i,function(e){r.push(e.Me())})),a=Math.max(e.i.bufferBehind*e.C,e.j.presentationTimeline.h),null==(o=oN(e.g.X,t.type)))?h.return():(s=n-o,u=e.i.evictionGoal,l=e.j.presentationTimeline.Sb(),d=e.j.presentationTimeline.Cb(),c=s-a,d-l>u&&(c=Math.max(s-a,l-u-o)),c<=u?h.return():h.g(e.g.X.remove(t.type,o,o+c,r),2)):4!=h.h?(rg(e.l),e.F?h.g(ue(e,e.F,n),4):h.A(0)):void(rg(e.l),h.j())})}function ut(e){return e&&e.type==e5&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function un(e,t,n,i){var r,a,o,s,u;return L(function(l){switch(l.h){case 1:if(r=n.Tb())return l.return(r);if(a=null,t.aa){var d=t.aa,c=d.g;n instanceof aq&&(c=d.j),c.has(n)?(d=c.get(n),i&&(d.yh=i),a=d.be):a=null}return a||(a=ui(n,t.stream,i||null,e.i.retryParameters,e.g.nc)),o=0,t.sa&&(o=t.sa.h),t.Eb=a,l.g(a.promise,2);case 2:if(s=l.i,t.Eb=null,u=s.data,!n.aesKey){l.A(3);break}return l.g(sz(u,n.aesKey,o),4);case 4:u=l.i;case 3:return l.return(u)}})}function ui(e,t,n,i,r,a){a=void 0!==a&&a;var o=e instanceof aK?e:void 0;return(e=sJ(e.R(),e.startByte,e.endByte,i,n)).contentType=t.type,r.request(rc,e,{type:+!!o,stream:t,segment:o,isPreload:a})}function ur(e,t,n,i){var r,a;return L(function(o){return 1==o.h?(t.Ic=!1,t.Uf=!1,t.Le=0,t.Kc=!0,t.Ga=null,t.sa=null,t.aa&&!e.m.has(t.stream)&&sB(t.aa,!1),i?(r=e.g.jc(),a=e.g.X.getDuration(),o.g(e.g.X.remove(t.type,r+i,a),3)):o.g(oV(e.g.X,t.type),4)):3!=o.h?(rg(e.l),n?o.g(e.g.X.flush(t.type),3):o.A(3)):void(rg(e.l),t.Kc=!1,t.endOfStream=!1,t.Pa||t.xb||ua(e,t,0),o.j())})}function ua(t,n,i){var r=n.type;(r!=e5||t.h.has(r))&&(n.xb=new n3(function(){var i;return L(function(r){if(1==r.h){var a,o,s,u,l,d,c,h,p;return r.m(2),r.g(L(function(i){switch(i.h){case 1:if(rg(t.l),a=e6,n.Pa||null==n.xb||n.Kc)return i.return();if(n.xb=null,!n.Ic){i.A(2);break}return i.g(ur(t,n,n.Uf,n.Le),3);case 3:case 8:return i.return();case 2:for(var r=S(t.J.entries()),f=r.next();!f.done;f=r.next()){var g=S(f.value);f=g.next().value,g=g.next().value,f.includes(n.type)&&(g(),t.J.delete(f))}if(n.stream.segmentIndex){i.A(4);break}return o=n.stream,i.m(5),i.g(n.stream.createSegmentIndex(),7);case 7:i.o(6);break;case 5:return s=i.l(),i.g(uu(t,n,s),8);case 6:if(o!=n.stream)return o.closeSegmentIndex&&o.closeSegmentIndex(),n.Pa||n.xb||ua(t,n,0),i.return();case 4:if(!n.yc||n.yc.stream.segmentIndex){i.A(9);break}return i.m(11),i.g(n.yc.stream.createSegmentIndex(),13);case 13:i.o(9);break;case 11:i.l();case 9:i.m(14),null!=(u=function(t,n){if(ut(n))return i=t.g.X,r=n.stream.originalId||"",a=oj(i,"video")||0,n0(i.h,r,a),null;if(n.type==e5&&(o=t.g.X).h&&n0(o.h,"",0),n.stream.isAudioMuxedInVideo&&"audio"==n.type)return null;if(n.type!=e5&&oO(t.g.X))return ud(t,!0),null;var i,r,a,o,s,u,l,d,c,h,p,f,g,m,v,y,b,w,T,A,E,k,I,C=t.i.updateIntervalSeconds/Math.max(1,Math.abs(t.g.ib()));if(!oD(t.g.X)&&n.type!=e5)return C/2;var M=t.g.jc();if("audio"===n.type)for(var P=S(t.m.keys()),D=P.next();!D.done;D=P.next())(D=t.m.get(D.value)).Sa(M,!0),sN(D,M);P=n.Ga?n.Ga.endTime:M;var R=oU(t.g.X,n.type,M);"video"==n.type&&!t.h.has("audio")&&t.g.X.l.has("audio")&&(R=Math.min(R,D=oU(t.g.X,"audio",M))),D=Math.max(1,Math.max(t.i.rebufferingGoal,t.i.bufferingGoal)*t.C);var O=t.j.presentationTimeline.getDuration()-P,N=oj(t.g.X,n.type);if(O<1e-6&&N)return n.endOfStream=!0,"video"==n.type&&((C=t.h.get(e5))&&ut(C)&&(C.endOfStream=!0),(C=t.h.get("audio"))&&C.stream.isAudioMuxedInVideo&&(C.endOfStream=!0)),null;if(n.endOfStream=!1,R>=D)return C/2;if(O=!n.sa,!(R=s8(t,n,M,N)))return t=1/0,(n=n.Ga)&&(t=n.endTime-n.startTime),Math.min(t/2,C);N=n.jb;var j=R.$;N&&j&&aG(j,N)&&(N.g=j.g),N=!1,O&&n.cg&&(N=!0,n.cg=!1),O=1/0,j=S(t.h.values());for(var U=j.next();!U.done;U=j.next())ut(U=U.value)||U.stream.isAudioMuxedInVideo||U.sa&&!U.sa.current()||(O=Math.min(O,U.Ga?U.Ga.endTime:M));return P>=O+t.j.presentationTimeline.h?C:(n.aa&&n.sa&&!t.m.has(n.stream)&&(n.aa.Sa(R.startTime+.001),sN(n.aa,R.startTime).catch(function(){})),uc(t)&&function(e,t,n){if(t.type===e5)return!1;var i=t.jb;if(!i)return!1;var r=n.$;if(n=i.g!==r.g,"reset_to_encrypted"===e.i.crossBoundaryStrategy&&(i.encrypted||r.encrypted||(n=!1),i.encrypted&&(e.i.crossBoundaryStrategy="keep")),"RESET_ON_ENCRYPTION_CHANGE"===e.i.crossBoundaryStrategy&&i.encrypted==r.encrypted&&(n=!1),n&&t.Tc){var a=e.g.video,o=a.paused;ud(e,!0).then(function(){var t=new Map().set("oldEncrypted",i.encrypted).set("newEncrypted",r.encrypted);e.g.onEvent(new i9("boundarycrossed",t)),o||a.play()})}return n}(t,n,R)||((s=t,u=n,l=R,d=N,L(function(t){var n,i,r,a,o,x,C,P,D,R,O,N,j,U,B,F,V,H,q,G,K,W,z,X;switch(t.h){case 1:if(c=e6,h=u.stream,p=u.sa,u.Pa=!0,t.m(2),2==l.Ub
1())throw new eN(1,1,1011);return t.g(L(function(e){switch(e.h){case 1:var t;if(n=e6,i=null==u.Ga,r=[],a=Math.max(0,Math.max(l.appendWindowStart,s.Y)-.1),o=Math.min(l.appendWindowEnd,s.V)+.1,C=nG(x=l.codecs||u.stream.codecs),P=nK(l.mimeType||u.stream.mimeType),(D=l.timestampOffset)==u.jf&&a==u.lc&&o==u.kc&&C==u.gf&&P==u.hf){e.A(2);break}if(!(u.gf&&u.hf&&((t=o2(t=s.g.X,u.type,P,x,up(s))).dc&&t.dc.destroy(),t.type==o6))||(R=null,u.type===n.xa?R=s.h.get(n.ha):u.type===n.ha&&(R=s.h.get(n.xa)),!R)){e.A(3);break}return e.g(us(R).catch(function(){}),5);case 5:R.jb=null,R.lc=null,R.kc=null,s4(s,R);case 3:return e.g(s9(s,u,D,a,o,l,C,P),2);case 2:return aG(l.$,u.jb)||(u.jb=l.$,l.l&&l.$&&(O=un(s,u,l.$),N=function(){var e,t,i,r,a,o,c,h,p;return L(function(f){switch(f.h){case 1:return f.m(2),f.g(O,4);case 4:return e=f.i,rg(s.l),t=null,i=new Map,r={projection:null,hfov:null},(a=new rT).box("moov",rS).box("trak",rS).box("mdia",rS).S("mdhd",function(e){t=ad(e.reader,e.version).timescale}).S("hdlr",function(e){switch((e=e.reader).skip(4),String.fromCharCode((e=e.Ob(4,!1))[0],e[1],e[2],e[3])){case"soun":i.set(n.ha,t);break;case"vide":i.set(n.xa,t)}t=null}),u.type===n.xa&&a.box("minf",rS).box("stbl",rS).S("stsd",rx).box("encv",rA).box("avc1",rA).box("avc3",rA).box("hev1",rA).box("hvc1",rA).box("dvav",rA).box("dva1",rA).box("dvh1",rA).box("dvhe",rA).box("dvc1",rA).box("dvi1",rA).box("vexu",rS).box("proj",rS).S("prji",function(e){r.projection=e.reader.ud()}).box("hfov",function(e){r.hfov=e.reader.W()/1e3}),a.parse(e,!0,!0),u.type===n.xa&&function(e,t){if(e.O.projection!=t.projection||e.O.hfov!=t.hfov){if(null!=t.projection||null!=t.hfov){var n=new Map().set("detail",t);n=new i9("spatialvideoinfo",n)}else n=new i9("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.O=t}}(s,r),i.has(u.type)?l.$.timescale=i.get(u.type):null!=t&&(l.$.timescale=t),(o=u.stream.segmentIndex)instanceof sA&&(c=function(e,t){e=S(e.h);for(var n=e.next();!n.done;n=e.next())if(null!=(n=n.value).find(t))return n.Me();return -1}(o,l.startTime)),h=u.stream.closedCaptions&&u.stream.closedCaptions.size>0,f.g(s.g.Qh(u.type,e),5);case 5:return f.g(oF(s.g.X,u.type,e,null,u.stream,h,u.Tc,d,!1,!1,c),6);case 6:f.o(0);break;case 2:throw p=f.l(),u.jb=null,p}})},j=l.startTime,i&&null!=(U=oj(s.g.X,u.type))&&(j=U),s.g.Dk(j,l.$),r.push(N()))),B=u.Ga?u.Ga.i:-1,l.i!=B&&r.push(oq(s.g.X,u.type,l.startTime)),e.g(Promise.all(r),0)}}),4);case 4:if(rg(s.l),s.D)return t.return();if(f="video/mp4"==h.mimeType||"audio/mp4"==h.mimeType,g=e.ReadableStream,s.i.lowLatencyMode&&s.j.isLowLatency&&g&&f&&("HLS"!=s.j.type||l.o))return y=new Uint8Array(0),w=b=!1,A=function(e){var t,n,i;return L(function(r){switch(r.h){case 1:if(b||(w=!0,rg(s.l),s.D))return r.return();if(r.m(2),y=eQ(y,e),t=!1,n=0,new rT().box("mdat",function(e){n=e.size+e.start,t=!0}).parse(y,!1,!0),!t){r.A(4);break}return i=y.subarray(0,n),y=y.subarray(n),r.g(s7(s,u,M,h,l,i,!0,d),5);case 5:u.aa&&u.sa&&sN(u.aa,l.startTime,!0);case 4:r.o(0);break;case 2:T=r.l(),r.j()}})},t.g(un(s,u,l,A),9);return m=un(s,u,l),t.g(m,7);case 7:if(v=t.i,rg(s.l),s.D)return t.return();return rg(s.l),u.Ic?(u.Pa=!1,ua(s,u,0),t.return()):t.g(s7(s,u,M,h,l,v,!1,d),6);case 9:if(E=t.i,T)throw T;if(w){t.A(10);break}return b=!0,rg(s.l),s.D?t.return():u.Ic?(u.Pa=!1,ua(s,u,0),t.return()):t.g(s7(s,u,M,h,l,E,!1,d),10);case 10:u.aa&&u.sa&&sN(u.aa,l.startTime,!0);case 6:if(rg(s.l),s.D)return t.return();u.Ga=l,p.next(),u.Pa=!1,u.dh=!1,JSON.stringify(s.g.X.Qb()[u.type]),u.Ic||(k=null,u.type===c.xa?k=s.h.get(c.ha):u.type===c.ha&&(k=s.h.get(c.xa)),k&&k.type==c.ha?s.g.vf(l,u.stream,k.stream.isAudioMuxedInVideo):s.g.vf(l,u.stream,u.stream.codecs.includes(","))),uo(u),ua(s,u,0),t.o(0);break;case 2:if(I=t.l(),rg(s.l,I),s.D)return t.return();if(u.Pa=!1,7001==I.code)u.Pa=!1,uo(u),ua(s,u,0),t.A(0);else if(u.type==c.Va&&s.i.ignoreTextStreamFailures)s.h.delete(c.Va),t.A(0);else{if(3017==I.code)return t.g(L(function(e){switch(e.h){case 1:for(F=!1,H=(V=S(s.h.values())).next();!H.done;H=V.next())if((q=H.value)!=u&&q.dh){F=!0;break}if(F){e.A(2);break}if(s.i.avoidEvictionOnQuotaExceededError){if(G=ul(s,I),s.g.disableStream(u.stream,G))return e.return();return ua(s,u,4),e.return()}if((K=Math.round(100*s.C))>
120){s.C-=.2,e.A(3);break}if(K>4){s.C-=.04,e.A(3);break}if(W=ul(s,I),!s.g.disableStream(u.stream,W)){u.md=!0,s.D=!0,s.g.onError(I),e.A(5);break}return s.C=1,z=s.g.jc(),e.g(ue(s,u,z),5);case 5:return e.return();case 3:return u.dh=!0,X=s.g.jc(),e.g(ue(s,u,X),2);case 2:ua(s,u,4),e.j()}}),0);return u.md=!0,1==I.category&&u.aa&&sH(u.aa,l),I.severity=2,t.g(uu(s,u,I),0)}}})).catch(function(){}),n.yc&&function e(t,n,i,r){var a,o,s,u,l,d,c,h,p,f;return L(function(g){switch(g.h){case 1:for(u=(s=(o=(a=n.stream).segmentIndex)&&o.Rb(i))&&s.next().value;u&&t.M.includes(u.startTime);)u=s&&s.next().value;if(!u){g.A(0);break}if(!(l=u.$)||aG(l,n.jb)){g.A(3);break}return n.jb=l,g.m(4),g.g(un(t,n,l),6);case 6:if(d=g.i,!t.g)return g.return();var m=t.g.X;m.H&&te(m.H,d,0,a),t.M=[],g.o(3);break;case 4:throw c=g.l(),n.jb=null,c;case 3:if(n.Ga&&n.Ga==u){g.A(0);break}return n.Ga=u,g.m(8),g.g(un(t,n,u),10);case 10:if(h=g.i,!t.g)return g.return();(m=t.g.X).H&&te(m.H,h,0,a),t.M.push(u.startTime),g.o(9);break;case 8:throw p=g.l(),n.Ga=null,p;case 9:if(!t.g)return g.return();if(f=Math.max.apply(Math,[0].concat(x(t.M))),t.g.jc()+r>f)return g.g(e(t,n,u.startTime,r),0);g.A(0)}})}(t,n.yc,M,D)),null)}(t,n))&&(ua(t,n,u),n.md=!1),i.o(15);break;case 14:return l=i.l(),i.g(uu(t,n,l),16);case 16:return i.return();case 15:if(n.type===a.Va)return i.return();if(d=[],n.stream&&!n.stream.isAudioMuxedInVideo&&d.push(n),c=n.type===a.ha?a.xa:a.ha,(h=t.h.get(c))&&h.stream&&!h.stream.isAudioMuxedInVideo&&d.push(h),!t.K||!d.every(function(e){return e.endOfStream})){i.A(0);break}return i.g(t.g.X.endOfStream(),18);case 18:rg(t.l),0!=(p=t.g.X.getDuration())&&p<t.j.presentationTimeline.getDuration()&&t.j.presentationTimeline.ub(p),i.j()}}),4)}if(2!=r.h)return r.o(0);i=r.l(),t.g&&t.g.onError(i),r.j()})}).ea(i))}function uo(e){null!=e.xb&&(e.xb.stop(),e.xb=null)}function us(e){return L(function(t){return e.Eb?t.g(e.Eb.abort(),0):t.A(0)})}function uu(e,t,n){var i,r,a,o,s;return L(function(u){switch(u.h){case 1:return 3024==n.code?(t.Pa=!1,uo(t),ua(e,t,0),u.return()):u.g(iZ(e.T),2);case 2:if(rg(e.l),1===n.category&&1003!=n.code){if(t.Fc)return sZ(e,!1),u.return();i=ul(e,n),n.handled=e.g.disableStream(t.stream,i),n.handled&&(n.severity=1)}if(n.handled||1011!=n.code){u.A(3);break}for(r=e.g.jc(),a=oj(e.g.X,t.type),o=s8(e,t,r,a);(null==(s=o)?void 0:s.Ub())===2;)t.Ga=o,o=s8(e,t,r,a);if(!o){u.A(3);break}return u.g(oq(e.g.X,t.type,o.startTime),5);case 5:return t.Pa=!1,t.md=!1,uo(t),ua(e,t,0),u.return();case 3:n.handled&&1011==n.code||e.g.onError(n),n.handled||e.i.failureCallback(n),u.j()}})}function ul(e,t){return 0===e.i.maxDisabledTime&&1011==t.code?1:e.i.maxDisabledTime}function ud(e,t){t=void 0!==t&&t;var n,i,r,a,o,s=void 0===s||s;return L(function(u){return 1==u.h?(n=Date.now()/1e3,i=e.i.minTimeBetweenRecoveries,t||e.i.allowMediaSourceRecoveries&&!(n-e.N<i))?(e.N=n,r=e6,(a=e.h.get(r.ha))&&(a.jb=null,a.lc=null,a.kc=null,s&&s4(e,a),us(a).catch(function(){}),a.sa&&a.sa.ih(),uo(a)),(o=e.h.get(r.xa))&&(o.jb=null,o.lc=null,o.kc=null,s&&s4(e,o),us(o).catch(function(){}),o.sa&&o.sa.ih(),uo(o)),u.g(o0(e.g.X,up(e)),2)):u.return(!1):(!o||o.Kc||o.Pa||o.xb||ua(e,o,0),!a||a.Kc||a.Pa||a.xb||ua(e,a,0),u.return(!0))})}function uc(e){return"keep"!==e.i.crossBoundaryStrategy}function uh(e){if(uc(e)){e.I.stop();var t=e.g.jc(),n=e.h.get("video")||e.h.get("audio");n&&(n=n.jb)&&null!==n.g&&((t=n.g-t)<0||t>1||(e.H=n.g+.1,e.I.ea(t)))}}function up(e,t){t=void 0!==t&&t;var n=new Map;return e.o.audio&&n.set("audio",e.o.audio),e.o.video&&n.set("video",e.o.video),t&&e.B&&n.set(e5,e.B),n}function uf(){}function ug(e,t,n,i,r){var a,o=r in i,s=o?n.constructor==Object&&0==Object.keys(i).length:n.constructor==Object&&0==Object.keys(n).length,u=o||s,l=!0;for(a in t){var d=r+"."+a,c=o?i[r]:n[a];u||a in n?void 0===t[a]?void 0===c||u?delete e[a]:e[a]=tO(c):s?e[a]=t[a]:c.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=tO(c)),d=ug(e[a],t[a],c,i,d),l=l&&d):typeof t[a]!=typeof c||null==t[a]||"function"!=typeof t[a]&&t[a].constructor!=c.constructor?(X("Invalid config, wrong type for "+d),l=!1):"function"==typeof n[a]&&n[a].length!=t[a].length?(Y("Unexpected number of arguments for "+d),e[a]=t[a]):e[a]=Array.isArray(e[a])?t[a].slice():t[a]:(X("Invalid config, unrecognized key "+d),l=!1)}return l}function um(e,t){for(var n={},i=n,r=0,a=0;!((r=e.indexOf(".",r))<0);)(0==r||"\\"!=e[r-1])&&(i[a=e.substring(a,r).replace(/\\\./g,".")]={},i=i[a],a=r+1),r+=1;return i[e.substring(a).replace(/\\\./g,".")]=t,n}function uv(e,t){function n(e){return e&&"object"==typeof e&&!Array.isArray(e)}return!function e(t){for(var i=S(Object.keys(t)),r=i.next();!r.done;r=i.next())if(!(t[r=r.value]instanceof HTMLElement))if(n(t[r])&&0===Object.keys(t[r]).length)delete t[r];else{var a=t[r];Array.isArray(a)&&0===a.length||"function"==typeof t[r]?delete t[r]:n(t[r])&&(e(t[r]),0===Object.keys(t[r]).length&&delete t[r])}}(e=function e(t,i){return Object.keys(t).reduce(function(r,a){var o=t[a];return i.hasOwnProperty(a)?o instanceof HTMLElement&&i[a]instanceof HTMLElement?o.isEqualNode(i[a])||(r[a]=o):n(o)&&n(i[a])?(Object.keys(o=e(o,i[a])).length>0||!n(o))&&(r[a]=o):Array.isArray(o)&&Array.isArray(i[a])?tx(o,i[a])||(r[a]=o):Number.isNaN(o)&&Number.isNaN(i[a])||o!==i[a]&&(r[a]=o):r[a]=o,r},{})}(e,t)),e}function uy(){}function ub(e){return new ef(e=eF(e)).Ab}function u_(e,t,n){function i(e){eL(a).setUint32(o,e.byteLength,!0),o+=4,a.set(eD(e),o),o+=e.byteLength}if(!n||!n.byteLength)throw new eN(2,6,6015);
1var r="string"==typeof t?eH(t,!0):t,a=new Uint8Array(12+(e=eH(e=eF(e),!0)).byteLength+r.byteLength+n.byteLength),o=0;return i(e),i(r),i(n),a}function uw(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,n=eF(e).split("skd://").pop(),u_(e,n,t))}function uT(e,t){2===e&&(e=t.drmInfo)&&iz(e.keySystem)&&(t.headers["Content-Type"]="application/octet-stream")}function uS(){this.g=null}function ux(){}function uA(){var t=1/0,n=er();navigator.connection&&navigator.connection.saveData&&(t=360);var i={retryParameters:i0(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(t,n,i){return"apple"===e.shakaMediaKeysPolyfill&&"skd"==n&&(n=i.serverCertificate,i=ub(t),t=u_(t,i,n)),t},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"},r="reload",a=!1;tr()&&n.Xc()&&(r="smooth",a=!0);var o={trackSelectionCallback:function(e){return L(function(t){return t.return(e)})},downloadSizeCallback:function(e){var t;return L(function(n){return 1==n.h?navigator.storage&&navigator.storage.estimate?n.g(navigator.storage.estimate(),3):n.return(!0):(t=n.i,n.return(t.usage+e<.95*t.quota))})},progressCallback:function(e,t){},usePersistentLicense:!0,numberOfParallelDownloads:5},s={drm:i,manifest:a={retryParameters:i0(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,ignoreDrmInfo:!1,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"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:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:uI,manifestPreprocessorTXml:uC,sequenceMode:!1,multiTypeVariantsAllowed:a,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:n.Wc(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:uI,manifestPreprocessorTXml:uC,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},streaming:{retryParameters:i0(),failureCallback:function(e){},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:!1,dontChooseCodecs:!1,shouldFixTimestampOffset:!1,avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep",returnToEndOfLiveWindowWhenOutside:!1},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16e3},mediaSource:{codecSwitchingStrategy:r,addExtraFeaturesToSourceBuffer:function(e){return""},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(e,t,n){},dispatchAllEmsgBoxes:!1,useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:o,abrFactory:function(){return new iU},adaptationSetCriteriaFactory:function(){return new(Function.prototype.bind.apply(uS,[null].concat(x(O.apply(0,arguments)))))},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:t,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!1},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,disableHLSInterstitial:!1,disableDASHInterstitial:!1,allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:30,repeatMode:0}};return o.trackSelectionCallback=function(e){return L(function(t){return t.return(function(e,t,n){var i=n;"AUTO"==i&&(i=fe(n=e.some(function(e){return!!e.hdr&&"HLG"==e.hdr})));var r=e.filter(function(e){return"variant"==e.type&&(!e.hdr||e.hdr==i)});n=[];var a=iu(t,r.map(function(e){return e.language}));a&&(n=r.filter(function(e){return ir(e.language)==a})),0==n.length&&(n=r.filter(function(e){return e.primary})),0==n.length&&(r.map(function(e){return e.language}),n=r);var o=n.filter(function(e){return e.height&&e.height<=480});for(o.length&&(o.sort(function(e,t){return t.height-e.height}),n=o.filter(function(e){return e.height==o[0].height})),t=[],n.length&&(r=Math.floor(n.length/2),n.sort(function(e,t){return e.bandwidth-t.bandwidth}),t.push(n[r])),n=(e=S(e)).next();!n.done;n=e.next())(n=n.value).type!=e5&&"image"!=n.type||t.push(n);return t}(e,s.preferredAudioLanguage,s.preferredVideoHdrLevel))})},n.Wa(s)}function uE(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}function uk(e,t,n){var i={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioR
1obustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return ug(e,t,n||uA(),i,"")}function uI(e){var t;return t=[e],t&&e}function uC(e){var t;return t=[e],t&&e}function uM(){this.g=null,this.h=[]}function uP(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration),e=S(e.h);for(var i=e.next();!i.done;i=e.next())n+=(i=i.value).state==t?i.duration:0;return n}function uD(){this.i=this.h=null,this.g=[]}function uR(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function uL(){this.C=this.Y=NaN,this.l="",this.j=this.pi=this.u=this.B=this.K=this.D=this.o=this.m=this.J=this.F=this.i=this.T=this.V=this.N=this.O=this.P=NaN,this.M=0,this.H=this.I=NaN,this.g=new uM,this.h=new uD}function uO(e,t){e.j=isNaN(e.j)?t:e.j+t}function uN(e,t,n,i){rt.call(this),this.O=e,this.Y=t,this.Ja=i.networkingEngine,this.m=n,this.C=null,this.Fa=0,this.cb=i.cd,this.H=i.vk,this.eb=i.wk,this.g=i.config,this.l=this.I=this.h=null,this.ya=!1,this.J=i.Jk,this.za=!1,this.i=null,this.na=!1,this.j=this.F=null,this.ka=!1,this.N=new Map,this.Aa=!1,this.Ra=i.Ik,this.ia=new uL,this.ua=new i1,this.B=new i1,this.P=null,this.u=!1,this.ma=i.lj,this.V=this.o=null,this.Za=i.kj,this.T=!1,this.M=[],this.K=[],this.D=!0}function uj(e,t,n){(e=t?e.K:e.M)?e.push(n):n()}function uU(e,t){if(e.P=t,e.T=!0,e.M){t=S(e.M);for(var n=t.next();!n.done;n=t.next())(n=n.value)()}e.M=null}function uB(e){if(e.u)throw new eN(2,7,7003)}function uF(e,t){e.dispatchEvent(new i9("onstatechange",new Map().set("state",t)))}function uV(e,t){var n,i,r;return L(function(a){switch(a.h){case 1:if(!e.h||e.i)return a.return();return uF(e,"drm-engine"),e.Fa=Date.now()/1e3,e.i=e.cb(),e.H.g=e.i,e.i.configure(e.g.drm,function(){return e.D}),n=ik(e.h.variants),i=!0,e.h&&e.h.presentationTimeline&&(i=e.h.presentationTimeline.U()),a.g(rN(e.i,n,e.h.offlineSessionIds,i),2);case 2:if(uB(e),!t){a.A(3);break}return a.g(e.i.Pb(t),4);case 4:uB(e);case 3:return a.g(an(e.H,e.h),5);case 5:if(!a.i){a.A(0);break}return r=new i9("trackschanged",void 0),a.g(Promise.resolve(),7);case 7:e.dispatchEvent(r),a.j()}})}function uH(e){var t=ik(e.h.variants);return t=e.C.create(t),e.j.configure(e.g.abr),e.j.setVariants(Array.from(t.values())),e.j.chooseVariant()}function uq(e,t,n){var i,r,a,o;return L(function(s){return 1==s.h?(i=new sO(e.g.streaming.segmentPrefetchLimit||2,t,function(t,n,i){return ui(t,n,i||null,e.g.streaming.retryParameters,e.Ja,e.D)},!1),e.N.set(t.id,i),t.segmentIndex?s.A(2):s.g(t.createSegmentIndex(),2)):(r="number"==typeof e.m?e.m:0,a=t.segmentIndex.Rb(r),o=null,a&&((o=a.current())||(o=a.next().value)),o||(o=t.segmentIndex.Bb()),o?n?o.$?s.g(sj(i,o.$),0):s.A(0):s.g(sN(i,o.startTime),0):s.A(0))})}function uG(e){function t(e){return e.video&&e.audio||e.video&&e.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}function uK(e,t){rt.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{bd:null,$c:uX,Oc:function(e,t){return uW(n,"enter",e,t)}},{bd:uz,$c:uX,Oc:function(e,t){return uW(n,"enter",e,t)}},{bd:uY,$c:uX,Oc:function(e,t){return uW(n,"enter",e,t)}},{bd:uX,$c:uz,Oc:function(e,t){return uW(n,"exit",e,t)}},{bd:uX,$c:uY,Oc:function(e,t){return uW(n,"exit",e,t)}},{bd:uz,$c:uY,Oc:function(e,t){t?uW(n,"skip",e,t):(uW(n,"enter",e,t),uW(n,"exit",e,t))}},{bd:uY,$c:uz,Oc:function(e,t){return uW(n,"skip",e,t)}}],this.h=new ee,this.h.G(this.i,"regionremove",function(e){n.g.delete(e.region)})}function uW(e,t,n,i){t=new i9(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}(p=s$.prototype).destroy=function(){return this.l.destroy()},p.configure=function(e){if(this.i=e,this.T=new i$({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0),e.disableAudioPrefetch){var t=this.h.get("audio");t&&t.aa&&(sB(t.aa),t.aa=null),t=S(this.m.keys());for(var n=t.next();!n.done;n=t.next())n=n.value,sB(this.m.get(n)),this.m.delete(n)}for(e.disableTextPrefetch&&(t=this.h.get(e5))&&t.aa&&(sB(t.aa),t.aa=null),e.disableVideoPrefetch&&(t=this.h.get("video"))&&t.aa&&(sB(t.aa),t.aa=null),n=(t=S(this.h.keys())).next();!n.done;n=t.next())(n=this.h.get(n.value)).aa?(sV(n.aa,e.segmentPrefetchLimit),e.segmentPrefetchLimit>0||(sB(n.aa),n.aa=null)):e.segmentPrefetchLimit>0&&(n.aa=s6(this,n.stream));e.disableAudioPrefetch||function(e){for(var t=e.i.segmentPrefetchLimit,n=e.i.prefetchAudioLanguages,i=S(e.j.variants),r=i.next(),a={};!r.done;a={Hb:void 0},r=i.next())if(a.Hb=r.value,a.Hb.audio)if(e.m.has(a.Hb.audio)){if(sV(r=e.m.get(a.Hb.audio),t),!(t>0&&n.some(function(e){return function(t){return ie(e.Hb.audio.language,t)}}(a)))){var o=e.h.get(a.Hb.audio.type);r!==(o&&o.aa)&&sB(r),e.m.delete(a.Hb.audio)}}else!(t<=0)&&n.some(function(e){return function(t){return ie(e.Hb.audio.language,t)}}(a))&&(r=s6(e,a.Hb.audio))&&(a.Hb.audio.segmentIndex||a.Hb.audio.createSegmentIndex(),e.m.set(a.Hb.audio,r))}(this)},p.start=function(e){var t=this;return L(function(n){if(1==n.h){var i,r,a,o,s,u,l,d,c;return n.g((i=e||new Map,L(function(e){if(1==e.h){if(!t.o)throw new eN(2,5,5006);return r=up(t,!0),a=t.g.X,e.g(a.init(r,t.j.sequenceMode,t.j.type,t.j.ignoreManifestTimestampsInSegmentsMode),2)}for(rg(t.l),t.updateDuration(),s=(o=S(r.keys())).next();!s.done;s=o.next())u=s.value,l=r.get(u),t.h.has(u)||(d=s5(t,l),i.has(l.id)&&(function(e,t){e.l=t,e=S(e.g.values());for(var n=e.next();!n.done;n=e.next())n.value.g=t}(c=i.get(l.id),function(e,n,i){return ui(e,n,i||null,t.i.retryParameters,t.g.nc)}),d.aa=c),t.h.set(u,d),ua(t,d,0));e.j()})),2)}rg(t.l),t.K=!0,n.j()})},p.Tc=function(){if(this.g){for(var e=this.g.jc(),t=S(this.h.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=this.h.get(i);var r=this.g.X;if(!(r=i==e5?null!=(r=r.h).g&&null!=r.h&&e>=r.g&&e<r.h:a$(r=oB(r,i),e))){if(this.N=0,n.aa&&(n.aa.h=null),"audio"===n.type){r=S(this.m.values());for(var a=r.next();!a.done;a=r.next())a.value.h=null}n.sa=null,(null!=oj(this.g.X,i)||n.Pa)&&s4(this,n),n.Eb&&(n.Eb.abort(),n.Eb=null),i===e5&&(i=this.g.X).J&&i.J.g.clear(),n.Tc=!0}}uc(this)&&uh(this)}},p.updateDuration=function(){var e=ta(),t=this.j.presentationTimeline.getDuration();t<1/0?(e&&(this.u&&this.u.stop(),oG(this.g.X)),this.g.X.ub(t)):e?(this.u&&this.u.Ha(.5),this.g.X.ub(1/0)):this.g.X.ub(0x100000000)},q("shaka.util.ConfigUtils",uf),uf.getDifferenceFromConfigObjects=uv,uf.convertToConfigObject=um,uf.mergeConfigObjects=ug,q("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2}),q("shaka.drm.FairPlay",uy),uy.commonFairPlayResponse=function(e,t){if(2===e&&(e=t.originalRequest.drmInfo)&&iz(e.keySystem)){try{var n=eU(t.data)}catch(e){return}if(e=!1,"<ckc>"===(n=n.trim()).substr(0,5)&&"</ckc>"===n.substr(-6)&&(n=n.slice(5,-6),e=!0),!e)try{var i=JSON.parse(n);i.ckc&&(n=i.ckc,e=!0),i.CkcMessage&&(n=i.CkcMessage,e=!0),i.License&&(n=i.License,e=!0)}catch(e){}e&&(t.data=eP(eX(n)))}},uy.muxFairPlayRequest=function(e,t){uT(e,t)},uy.expressplayFairPlayRequest=function(e,t){if(2===e){var n=t.drmInfo;n&&iz(n.keySystem)&&uT(e,t)}},uy.conaxFairPlayRequest=function(e,t){uT(e,t)},uy.ezdrmFairPlayRequest=function(e,t){uT(e,t)},uy.verimatrixFairPlayRequest=function(e,t){2===e&&(e=t.drmInfo)&&iz(e.keySystem)&&(e=ez(e=eD(t.body)),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=eV("spc="+e))}
1,uy.muxInitDataTransform=function(e,t,n){return uw(e,t,n)},uy.expressplayInitDataTransform=function(e,t,n){return uw(e,t,n)},uy.conaxInitDataTransform=function(t,n,i){if("skd"!==n)return t;n=i.serverCertificate,i=eF(t).split("skd://").pop().split("?").shift();var r=new ArrayBuffer(2*(i=e.atob(i)).length);r=eR(r);for(var a=0,o=i.length;a<o;a++)r[a]=i.charCodeAt(a);return u_(t,r,n)},uy.ezdrmInitDataTransform=function(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,n=eF(e).split(";").pop(),u_(e,n,t))},uy.verimatrixInitDataTransform=function(e,t,n){return uw(e,t,n)},uy.initDataTransform=u_,uy.defaultGetContentId=ub,uy.isFairPlaySupported=function(){var e;return L(function(t){return 1==t.h?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},t.m(2),t.g(navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):2!=t.h?t.return(!0):(t.l(),t.return(!1))})},uS.prototype.configure=function(e){this.g=e},uS.prototype.getConfiguration=function(){return this.g},uS.prototype.create=function(e){if(this.g.language){var t,n,i,r,a,o,s,u,l,d,c,h,p,f,g,m=(p=e,(f=iu(ir(this.g.language),p.map(function(e){return is(e)})))?p.filter(function(e){return f==is(e)}):[]);m.length&&(g=m)}g||(g=(g=e.filter(function(e){return e.primary})).length?g:e),(t=g,n=this.g.role,e=t.filter(function(e){return!!e.audio&&(n?e.audio.roles.includes(n):0==e.audio.roles.length)})).length&&(g=e),this.g.videoLayout&&(i=g,r=this.g.videoLayout,e=i.filter(function(e){return!e.video||!e.video.videoLayout||e.video.videoLayout==r})).length&&(g=e),this.g.Dc&&(a=g,"AUTO"==(o=this.g.Dc)&&(o=fe(a.some(function(e){return!!e.video&&!!e.video.hdr&&"HLG"==e.video.hdr}))),e=a.filter(function(e){return!e.video||!e.video.hdr||e.video.hdr==o})).length&&(g=e);var v=[this.g.channelCount,this.g.preferredAudioChannelCount];if((e=v.filter(function(e,t){return e&&v.indexOf(e)===t})).length){for(m=(e=S(e)).next();!m.done;m=e.next())if((m=function(e,t){return e.filter(function(e){return!e.audio||!e.audio.channelsCount||!(e.audio.channelsCount>t)}).sort(function(e,t){return e.audio||t.audio?e.audio?t.audio?(t.audio.channelsCount||0)-(e.audio.channelsCount||0):1:-1:0})}(g,m.value)).length){g=m;break}}this.g.Jc&&(s=g,u=this.g.Jc,e=s.filter(function(e){return!!e.audio&&!!e.audio.label&&e.audio.label.toLowerCase()==u.toLowerCase()})).length&&(g=e),this.g.Fd&&(l=g,d=this.g.Fd,e=l.filter(function(e){return!!e.video&&!!e.video.label&&e.video.label.toLowerCase()==d.toLowerCase()})).length&&(g=e),(c=g,h=this.g.spatialAudio,e=c.filter(function(e){return!e.audio||e.audio.spatialAudio==h})).length&&(g=e);var y=[this.g.audioCodec,this.g.Jd].concat(x(this.g.preferredAudioCodecs));if((e=y.filter(function(e,t){return e&&y.indexOf(e)===t})).length){for(m=(e=S(e)).next();!m.done;m=e.next())if((m=function(e,t){return e.filter(function(e){return!e.audio||e.audio.codecs==t})}(g,m.value)).length){g=m;break}}return new r4(g[0],g,!("smooth"==this.g.codecSwitchingStrategy&&tr()))},q("shaka.util.PlayerConfiguration",ux),ux.mergeConfigObjects=uk,ux.createDefaultForLL=uE,ux.createDefault=uA,w(uN,rt),(p=uN.prototype).getStartTime=function(){return this.m},p.hd=function(){return this.O},p.Gg=function(){return this.h},p.getStats=function(){return this.ia},p.Rj=function(){return this.o?i_(this.o):null},p.Qj=function(){return this.V?iw(this.V):null},p.start=function(){var t,n=this;L(function(i){var r,a,o,s,u,l,d,c,h,p;switch(i.h){case 1:return i.g(Promise.resolve(),2);case 2:return i.m(3),i.g(L(function(e){switch(e.h){case 1:if(uF(n,"manifest-parser"),n.l||(n.I=tl(n.O,n.Y),n.l=n.I(),n.l.configure(n.g.manifest,function(){return n.D})),r=Date.now()/1e3,uF(n,"manifest"),n.h){e.A(2);break}return e.g(n.l.start(n.O,n.eb),3);case 3:var t,i,u,l,d,c;return n.h=e.i,uG(n.h),e.g(L(function(e){if(n.C||(n.C=n.g.adaptationSetCriteriaFactory(),n.C.configure({language:n.g.preferredAudioLanguage,role:n.g.preferredVariantRole,channelCount:n.g.preferredAudioChannelCount,Dc:n.g.preferredVideoHdrLevel,spatialAudio:n.g.preferSpatialAudio,videoLayout:n.g.preferredVideoLayout,Jc:n.g.preferredAudioLabel,Fd:n.g.preferredVideoLabel,codecSwitchingStrategy:n.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Jd:"",Ce:0,preferredAudioCodecs:n.g.preferredAudioCodecs,preferredAudioChannelCount:n.g.preferredAudioChannelCount})),n.Za&&(t=n.g.abrFactory,n.F=t,n.j=t(),n.j.configure(n.g.abr)),!(i=uH(n))||1!=n.h.variants.length&&"HLS"!=n.h.type)return e.A(0);for(u=[],d=(l=S([i.video,i.audio])).next();!d.done;d=l.next())(c=d.value)&&!c.segmentIndex&&u.push(c.createSegmentIndex());return u.length>0?e.g(Promise.all(u),0):e.A(0)}),2);case 2:return n.ua.resolve(),a=new i9("manifestparsed",void 0),e.g(Promise.resolve(),5);case 5:if(n.dispatchEvent(a),0==n.h.variants.length)throw new eN(2,4,4036);if(uG(n.h),!ai(n.H,n.h)){e.A(6);break}return o=new i9("trackschanged",void 0),e.g(Promise.resolve(),7);case 7:uB(n),n.dispatchEvent(o);case 6:(s=Date.now()/1e3-r)>=0&&(n.ia.J=s),e.j()}}),5);case 5:if(uB(n),"webkit"===e.shakaMediaKeysPolyfill){i.A(6);break}return i.g(uV(n),7);case 7:uB(n);case 6:if(!n.ma){i.A(8);break}return i.g(L(function(e){return(!n.o&&(u=uH(n))&&(n.o=u),n.o)?(l=n.h.presentationTimeline.U(),d=[],(c=n.o).video&&d.push(uq(n,c.video,l)),c.audio&&d.push(uq(n,c.audio,l)),(h=iI(n.h.textStreams,n.g.preferredTextLanguage,n.g.preferredTextRole,n.g.preferForcedSubs)[0]||null)&&iD(c.audio,h,n.g)&&(d.push(uq(n,h,l)),n.V=h
1),e.g(Promise.all(d),0)):e.A(0)}),9);case 9:uB(n);case 8:if(!n.ma||!n.i){i.A(10);break}return i.g((p=n.i,L(function(e){return 1==e.h?!p.K||rW(p)?e.A(0):e.g(p.m,3):e.g(Promise.all(p.Y.map(function(e){return e.promise})),0)})),11);case 11:uB(n);case 10:n.B.resolve(),i.o(0);break;case 3:(t=i.l())instanceof eN&&(7001==t.code||7003==t.code)||n.B.reject(t),i.j()}})},p.dispatchEvent=function(e){return this.P?this.P.dispatchEvent(e):rt.prototype.dispatchEvent.call(this,e)},p.onError=function(e){2===e.severity&&(this.B.reject(e),this.destroy());var t=new Map().set("detail",e);t=new i9("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)},p.configure=function(e,t){e=um(e,t),uk(this.g,e)},p.getConfiguration=function(){return tO(this.g)},p.ql=function(){return this.B},p.destroy=function(){var e,t,n=this;return L(function(i){switch(i.h){case 1:if(n.u=!0,!n.l||n.ya){i.A(2);break}return i.g(n.l.stop(),2);case 2:if(!n.j||n.ka){i.A(4);break}return i.g(n.j.stop(),4);case 4:if(n.J&&!n.za&&n.J.release(),!n.i||n.na){i.A(6);break}return i.g(n.i.destroy(),6);case 6:if(n.N.size>0&&!n.Aa)for(t=(e=S(n.N.values())).next();!t.done;t=e.next())sB(t.value);i.j()}})},q("shaka.media.PreloadManager",uN),uN.prototype.destroy=uN.prototype.destroy,uN.prototype.waitForFinish=uN.prototype.ql,uN.prototype.getPrefetchedTextTrack=uN.prototype.Qj,uN.prototype.getPrefetchedVariantTrack=uN.prototype.Rj,w(uK,rt),uK.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,rt.prototype.release.call(this)},uK.prototype.j=function(e,t){if(!this.l||0!=e){this.l=!1;for(var n=S(this.i.h.values()),i=n.next();!i.done;i=n.next()){i=i.value;var r=this.g.get(i),a=e<i.startTime?uz:e>i.endTime?uY:uX;this.g.set(i,a);for(var o=S(this.m),s=o.next();!s.done;s=o.next())(s=s.value).bd==r&&s.$c==a&&s.Oc(i,t)}}};for(var uz=1,uX=2,uY=3,uJ={ach:"Lwo",ady:"Адыгэбзэ",af:"Afrikaans","af-NA":"Afrikaans (Namibia)","af-ZA":"Afrikaans (South Africa)",ak:"Tɕɥi",ar:"العربية","ar-AR":"العربية","ar-MA":"العربية","ar-SA":"العربية (السعودية)","ay-BO":"Aymar aru",az:"Azərbaycan dili","az-AZ":"Azərbaycan dili","be-BY":"Беларуская",bg:"Български","bg-BG":"Български",bn:"বাংলা","bn-IN":"বাংলা (ভারত)","bn-BD":"বাংলা(বাংলাদেশ)","bs-BA":"Bosanski",ca:"Català","ca-ES":"Català",cak:"Maya Kaqchikel","ck-US":"ᏣᎳᎩ (tsalagi)",cs:"Čeština","cs-CZ":"Čeština",cy:"Cymraeg","cy-GB":"Cymraeg",da:"Dansk","da-DK":"Dansk",de:"Deutsch","de-AT":"Deutsch (Österreich)","de-DE":"Deutsch (Deutschland)","de-CH":"Deutsch (Schweiz)",dsb:"Dolnoserbšćina",el:"Ελληνικά","el-GR":"Ελληνικά",en:"English","en-GB":"English (UK)","en-AU":"English (Australia)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-IN":"English (India)","en-PI":"English (Pirate)","en-UD":"English (Upside Down)","en-US":"English (US)","en-ZA":"English (South Africa)","en@pirate":"English (Pirate)",eo:"Esperanto","eo-EO":"Esperanto",es:"Español","es-AR":"Español (Argentine)","es-419":"Español (Latinoamérica)","es-CL":"Español (Chile)","es-CO":"Español (Colombia)","es-EC":"Español (Ecuador)","es-ES":"Español (España)","es-LA":"Español (Latinoamérica)","es-NI":"Español (Nicaragua)","es-MX":"Español (México)","es-US":"Español (Estados Unidos)","es-VE":"Español (Venezuela)",et:"eesti keel","et-EE":"Eesti (Estonia)",eu:"Euskara","eu-ES":"Euskara",fa:"فارسی","fa-IR":"فارسی","fb-LT":"Leet Speak",ff:"Fulah",fi:"Suomi","fi-FI":"Suomi","fo-FO":"Føroyskt",fr:"Français","fr-CA":"Français (Canada)","fr-FR":"Français (France)","fr-BE":"Français (Belgique)","fr-CH":"Français (Suisse)","fy-NL":"Frysk",ga:"Gaeilge","ga-IE":"Gaeilge (Gaelic)",gl:"Galego","gl-ES":"Galego","gn-PY":"Avañe'ẽ","gu-IN":"ગુજરાતી","gx-GR":"Ἑλληνική ἀρχαία",he:"עברית‏","he-IL":"עברית‏",hi:"हिन्दी","hi-IN":"हिन्दी",hr:"Hrvatski","hr-HR":"Hrvatski",hsb:"Hornjoserbšćina",ht:"Kreyòl",hu:"Magyar","hu-HU":"Magyar","hy-AM":"Հայերեն",id:"Bahasa Indonesia","id-ID":"Bahasa Indonesia",is:"Íslenska","is-IS":"Íslenska (Iceland)",it:"Italiano","it-IT":"Italiano",ja:"日本語","ja-JP":"日本語","jv-ID":"Basa Jawa","ka-GE":"ქართული","kk-KZ":"Қазақша",km:"ភាសាខ្មែរ","km-KH":"ភាសាខ្មែរ",kab:"Taqbaylit",kn:"ಕನ್ನಡ","kn-IN":"ಕನ್ನಡ (India)",ko:"한국어","ko-KR":"한국어 (韩国)",ku:"Kurdî","ku-TR":"Kurdî",la:"Latin","la-VA"
1:"Latin",lb:"Lëtzebuergesch","li-NL":"Lèmbörgs",lt:"Lietuvių","lt-LT":"Lietuvių",lv:"Latviešu","lv-LV":"Latviešu",mai:"मैथिली, মৈথিলী","mg-MG":"Malagasy",mk:"Македонски","mk-MK":"Македонски (Македонски)",ml:"മലയാളം","ml-IN":"മലയാളം","mn-MN":"Монгол",mr:"मराठी","mr-IN":"मराठी",ms:"Bahasa Melayu","ms-MY":"Bahasa Melayu",mt:"Malti","mt-MT":"Malti",my:"ဗမာစကာ",nb:"Norsk (bokmål)","nb-NO":"Norsk (bokmål)",ne:"नेपाली","ne-NP":"नेपाली",nl:"Nederlands","nl-BE":"Nederlands (België)","nl-NL":"Nederlands (Nederland)","nn-NO":"Norsk (nynorsk)",no:"Norsk",oc:"Occitan","or-IN":"ଓଡ଼ିଆ",pa:"ਪੰਜਾਬੀ","pa-IN":"ਪੰਜਾਬੀ (ਭਾਰਤ ਨੂੰ)",pl:"Polski","pl-PL":"Polski","ps-AF":"پښتو",pt:"Português","pt-BR":"Português (Brasil)","pt-PT":"Português (Portugal)","qu-PE":"Qhichwa","rm-CH":"Rumantsch",ro:"Română","ro-RO":"Română",ru:"Русский","ru-RU":"Русский","sa-IN":"संस्कृतम्","se-NO":"Davvisámegiella","si-LK":"පළාත",sk:"Slovenčina","sk-SK":"Slovenčina (Slovakia)",sl:"Slovenščina","sl-SI":"Slovenščina","so-SO":"Soomaaliga",sq:"Shqip","sq-AL":"Shqip",sr:"Српски","sr-RS":"Српски (Serbia)",su:"Basa Sunda",sv:"Svenska","sv-SE":"Svenska",sw:"Kiswahili","sw-KE":"Kiswahili",ta:"தமிழ்","ta-IN":"தமிழ்",te:"తెలుగు","te-IN":"తెలుగు",tg:"забо́ни тоҷикӣ́","tg-TJ":"тоҷикӣ",th:"ภาษาไทย","th-TH":"ภาษาไทย (ประเทศไทย)",tl:"Filipino","tl-PH":"Filipino",tlh:"tlhIngan-Hol",tr:"Türkçe","tr-TR":"Türkçe","tt-RU":"татарча",uk:"Українська","uk-UA":"Українська",ur:"اردو","ur-PK":"اردو",uz:"O'zbek","uz-UZ":"O'zbek",vi:"Tiếng Việt","vi-VN":"Tiếng Việt","xh-ZA":"isiXhosa",yi:"ייִדיש","yi-DE":"ייִדיש (German)",zh:"中文","zh-HANS":"中文简体","zh-HANT":"中文繁體","zh-CN":"中文(中国)","zh-HK":"中文(香港)","zh-SG":"中文(新加坡)","zh-TW":"中文(台灣)","zu-ZA":"isiZulu"},uQ=S(Object.keys(uJ)),u$=uQ.next();!u$.done;u$=uQ.next()){var uZ=u$.value;uJ[uZ.toLowerCase()]=uJ[uZ]}function u0(e){var t=(e=e.toLowerCase()).replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);switch(t?e="#"+(256|parseInt(t[1],10)).toString(16).slice(1)+(256|parseInt(t[2],10)).toString(16).slice(1)+(256|parseInt(t[3],10)).toString(16).slice(1):e.startsWith("#")&&e.length>7&&(e=e.slice(0,7)),e){case"white":case"#fff":case"#ffffff":return"white";case"lime":case"#0f0":case"#00ff00":return"lime";case"cyan":case"#0ff":case"#00ffff":return"cyan";case"red":case"#f00":case"#ff0000":return"red";case"yellow":case"#ff0":case"#ffff00":return"yellow";case"magenta":case"#f0f":case"#ff00ff":return"magenta";case"blue":case"#00f":case"#0000ff":return"blue";case"black":case"#000":case"#000000":return"black"}return null}function u1(e,t){var n=[];e=S(u2(e));for(var i=e.next();!i.done;i=e.next())if((i=i.value).isContainer)n.push.apply(n,x(u1(i.nestedCues,i)));else{var r=i.clone();r.nestedCues=[],r.payload=function e(t,n){if(t.lineBreak)return"\n";if(t.nestedCues.length)return t.nestedCues.map(function(n){return e(n,t)}).join("");if(!t.payload)return t.payload;var i=[],r=t.fontWeight>=nx,a=t.fontStyle==nE,o=t.textDecoration.includes(nI);return r&&i.push(["b"]),a&&i.push(["i"]),o&&i.push(["u"]),""==(a=t.color)&&n&&(a=n.color),r="",(a=u0(a))&&(r+="."+a),""==(a=t.backgroundColor)&&n&&(a=n.backgroundColor),(n=u0(a))&&(r+=".bg_"+n),r&&i.push(["c",r]),i.reduceRight(function(e,t){var n=S(t);return"<"+(t=n.next().value)+(void 0===(n=n.next().value)?"":n)+">"+e+"</"+t+">"},t.payload)}(i,t),n.push(r)}return n}function u2(e){var t=[];e=S(e);for(var n=e.next(),i={};!n.done;i={jg:void 0},n=e.next())i.jg=n.value,t.some(function(e){return function(t){return ns(e.jg,t)}}(i))||t.push(i.jg);return t}function u3(e,t){var n=u1(t),i=[];t=e.cues?Array.from(e.cues):[],n=S(n);for(var r=n.next(),a={};!r.done;a={nd:void 0},r=n.next())a.nd=r.value,!t.some(function(e){return function(t){return t.startTime==e.nd.startTime&&t.endTime==e.nd.endTime&&t.text==e.nd.payload}}(a))&&a.nd.payload&&(r=function(e){function t(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()}if(e.startTime>=e.endTime)return null;var n=new VTTCue(e.startTime,e.endTime,e.payload);n.id=t(e.startTime.toString())+t(e.endTime.toString())+t(e.payload),n.lineAlign=e.lineAlign,n.positionAlign=e.positionAlign,e.size&&(n.size=e.size);try{n.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=n.align&&(n.align="middle"),"vertical-lr"==e.writingMode?n.vertical="lr":"vertical-rl"==e.writingMode&&(n.vertical="rl"),1==e.lineInterpretation&&(n.snapToLines=!1),null!=e.line&&(n.line=e.line),null!=e.position&&(n.position=e.position),n}(a.nd))&&i.push(r);for(n=(t=S(t=i.slice().sort(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:"line"in VTTCue.prototype?i.indexOf(t)-i.indexOf(e):i.indexOf(e)-i.indexOf(t)}))).next();!n.done;n=t.next())e.addCue(n.value)}function u4(e,t){var n=!1;"disabled"===e.mode&&(n=!0,e.mode="hidden");for(var i=0;i<e.cues.length;){var r=e.cues[i];t(r)?e.removeCue(r):i++}n&&(e.mode="disabled")}function u5(e){var t=this;this.i=e,this.l=new ee,this.j=null,this.h=new Map,this.g=-1,this.u=!1,this.m=null,this.C=function(){var e;null==(e=t.m)||e.stop(),t.m=null,t.l.Na(t.i,"textchanged",t.o),t.l.Na(t.j.textTracks,"change",t.B),e=S(t.h.values());for(var n=e.next();!n.done;n=e.next())n.value.remove();t.h.clear(),t.g=-1,t.j=null},this.o=function(){var e=new Map,n=t.i.Cc();n=S(n);for(var i=n.next();!i.done;i=n.next()){if(i=i.value,t.h.has(i.id)){var r=t.h.get(i.id);i.active||"disabled"===r.track.mode||(r.track.mode="disabled"),t.h.delete(i.id)}else{var a=r=t.j.ownerDocument.createElement("track"),o=er();if(o=i.forced&&"WEBKIT"===o.Ea()?"forced":"caption"===i.kind?"captions":"subtitles",a.kind=o,a=r,o=void 0,i.label)o=i.label;else if(i.language)if(i.language in uJ)o=uJ[i.language];else{var s=io(i.language);s in uJ&&(o=uJ[s]+" ("+i.language+")")}o||(o=i.originalTextId,i.language&&i.language!==i.originalTextId&&(o+=" ("+i.language+")")),a.label=o,i.language?i.language in uJ?r.srclang=i.language:(a=io(i.language),o=void 0,r.srclang=null!=(o=a)?o:"und"):r.srclang="und",r.src="data:,WEBVTT",r.track.mode="disabled",t.j.appendChild(r)}e.set(i.id,r),i.active&&(t.g=i.id)}
1for(i=(n=S(t.h.values())).next();!i.done;i=n.next())i.value.remove();t.g>-1&&(e.has(t.g)?"disabled"===(n=e.get(t.g).track).mode&&(n.mode=t.u?"showing":"hidden"):t.g=-1),t.h=e},this.B=function(){if(!t.m){var e=t.j;t.m=new n4(function(){if(t.m=null,t.j===e){var n=-1,i=!1;if(t.h.has(t.g)){var r=t.h.get(t.g);"showing"===r.track.mode?(n=t.g,i=!0):"hidden"===r.track.mode&&(n=t.g)}if(!i)for(r=(i=S(t.h)).next();!r.done;r=i.next()){var a=S(r.value);if(r=a.next().value,"showing"===(a=a.next().value).track.mode){n=r;break}n<0&&"hidden"===a.track.mode&&(n=r)}for(r=(i=S(t.h)).next();!r.done;r=i.next())r=(a=S(r.value)).next().value,a=a.next().value,r!==n&&"disabled"!==a.track.mode&&(a.track.mode="disabled");t.g!==n&&(t.g=n,n>-1&&t.i.oh({id:n})),t.i.sh(n>-1&&"showing"===t.h.get(n).track.mode)}}).ea(0)}},this.l.G(e,"loaded",function(){return t.enableTextDisplayer()}),this.enableTextDisplayer()}function u6(e,t){for(el("SimpleTextDisplayer","Please migrate to NativeTextDisplayer"),this.h=e,this.i=t,this.g=null,t=(e=S(Array.from(this.h.textTracks))).next();!t.done;t=e.next())"metadata"!==(t=t.value).kind&&"chapters"!==t.kind&&(t.mode="disabled",t.label==this.i&&(this.g=t));this.g&&(this.g.mode="hidden")}function u8(e){e.h&&!e.g&&(e.g=e.h.addTextTrack("subtitles",e.i),e.g.mode="hidden")}function u9(){}function u7(t,n){var i=this;this.j=!1,this.h=[],this.m=t,this.l=n,this.C=this.u=null,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.B=new n4(function(){i.m.paused||lt(i)}),le(this),this.o=new Map,this.i=new ee,this.i.G(document,"fullscreenchange",function(){lt(i,!0)}),this.i.G(this.m,"seeking",function(){lt(i,!0)}),this.i.G(this.m,"ratechange",function(){le(i)}),this.i.G(this.m,"resize",function(){var e=i.m,t=e.videoWidth;e=e.videoHeight,t&&e?i.u=t/e:i.u=null}),this.H=!1,this.D=null,"ResizeObserver"in e&&(this.D=new ResizeObserver(function(){i.H||(i.H=!0,requestAnimationFrame(function(){i.H=!1,i.g&&i.g.parentElement&&i.j&&lt(i,!0)}))}),this.D.observe(this.l)),this.F=new Map}function le(e){e.B&&(e.h.length?e.B.Ha((e.C?e.C.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(e.m.playbackRate))):e.B.stop())}function lt(e,t){if(e.g){var n=e.m.currentTime;if(!e.j||(void 0===t?0:t)){t=S(e.F.values());for(var i=t.next();!i.done;i=t.next())a4(i.value);a4(e.g),e.o.clear(),e.F.clear()}e.j&&function e(t,n,i,r,a){var o=!1,s=[],u=[];n=S(n);for(var l=n.next();!l.done;l=n.next()){l=l.value,a.push(l);var d=t.o.get(l),c=l.startTime<=r&&l.endTime>r,h=d?d.ij:null;d&&(s.push(d.lg),d.Sc&&s.push(d.Sc),c||(o=!0,t.o.delete(l),d=null)),c&&(u.push(l),d?function(e,t){for(;null!=t;){if(t==e.g)return!0;t=t.parentElement}return!1}(t,h)||(o=!0):(function(e,t,n){var i=n.length>1,r=i?"span":"div";t.lineBreak&&(r="br"),t.rubyTag&&(r=t.rubyTag),i=!i&&t.nestedCues.length>0;var a=document.createElement(r);if("br"!=r&&function(e,t,n,i,r){var a,o,s,u=t.style,l=0==n.nestedCues.length,d=i.length>1;u.whiteSpace="pre-wrap";var c=n.payload.replace(/\s+$/g,function(e){return" ".repeat(e.length)});if(u.webkitTextStrokeColor=n.textStrokeColor,u.webkitTextStrokeWidth=n.textStrokeWidth,u.color=n.color,u.direction=n.direction,u.opacity=n.opacity,u.paddingLeft=ln(n.linePadding,n,e.l),u.paddingRight=ln(n.linePadding,n,e.l),u.textCombineUpright=n.textCombineUpright,u.textShadow=n.textShadow,n.backgroundImage)u.backgroundImage="url('"+n.backgroundImage.replace(/['"()\\]/g,"")+"')",u.backgroundRepeat="no-repeat",u.backgroundSize="contain",u.backgroundPosition="center",n.backgroundColor&&(u.backgroundColor=n.backgroundColor),u.width="100%",u.height="100%";else{if(n.nestedCues.length)var h=t;else h=document.createElement("span"),t.appendChild(h);n.border&&(h.style.border=n.border),r||((t=function(e,t){for(var n=e.length-1;n>=0;n--){var i=t(e[n]);if(i||0===i)return i}return null}(i,function(e){return e.backgroundColor}))?h.style.backgroundColor=t:c&&(h.style.backgroundColor="rgba(0, 0, 0, 0.8)")),c&&(h.setAttribute("translate","no"),h.textContent=c)}d&&!i[i.length-1].isContainer?u.display="inline":(u.display="flex",u.flexDirection="column",u.alignItems="center","left"==n.textAlign||"start"==n.textAlign?(u.width="100%",u.alignItems="flex-start"):("right"==n.textAlign||"end"==n.textAlign)&&(u.width="100%",u.alignItems="flex-end"),u.justifyContent="before"==n.displayAlign?"flex-start":"center"==n.displayAlign?"center":"flex-end"),l||(u.margin="0"),u.fontFamily=n.fontFamily,u.fontWeight=n.fontWeight.toString(),u.fontStyle=n.fontStyle,u.letterSpacing=n.letterSpacing,(1!==(i=e.C?e.C.fontScaleFactor:1)||n.fontSize)&&(u.fontSize=ln(n.fontSize||"1em",n,e.l,i)),null!=(i=n.line)&&((l=n.lineInterpretation)==ny&&(l=1,d=16,e.u&&e.u<1&&(d=32),i=i<0?100+i/d*100:i/d*100),1==l&&(u.position="absolute",n.writingMode==nv?(u.width="100%",n.lineAlign==nb?u.top=i+"%":"end"==n.lineAlign&&(u.bottom=100-i+"%")):"vertical-lr"==n.writingMode?(u.height="100%",
1n.lineAlign==nb?u.left=i+"%":"end"==n.lineAlign&&(u.right=100-i+"%")):(u.height="100%",n.lineAlign==nb?u.right=i+"%":"end"==n.lineAlign&&(u.left=100-i+"%")))),u.lineHeight=n.lineHeight,o=(a=n).direction,s=a.positionAlign,a=a.textAlign,"line-left"==(e=s!==nc?s:"left"===a||"start"===a&&o===nm||"end"===a&&"rtl"===o?"line-left":"right"===a||"start"===a&&"rtl"===o||"end"===a&&o===nm?"line-right":"center")?(u.cssFloat="left",null!==n.position&&(u.position="absolute",n.writingMode==nv?(u.left=n.position+"%",u.width="auto"):u.top=n.position+"%")):"line-right"==e?(u.cssFloat="right",null!==n.position&&(u.position="absolute",n.writingMode==nv?(u.right=100-n.position+"%",u.width="auto"):u.bottom=n.position+"%")):null!==n.position&&50!=n.position&&(u.position="absolute",n.writingMode==nv?(u.left=n.position+"%",u.width="auto"):u.top=n.position+"%",n.size&&(u.transform="translateX(-50%)")),u.textAlign=n.textAlign,u.textDecoration=n.textDecoration.join(" "),u.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&u.writingMode==n.writingMode||(u.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==nv?u.width=n.size+"%":u.height=n.size+"%")}(e,a,t,n,i),n=null,t.region&&t.region.id){var o=t.region,s=e.u===4/3?2.5:1.9;if(n=o.id+"_"+o.width+"x"+o.height+(o.heightUnits==t_?"%":"px")+"-"+o.viewportAnchorX+"x"+o.viewportAnchorY+(o.viewportAnchorUnits==t_?"%":"px")+"-"+o.regionAnchorX+"x"+o.regionAnchorY,e.F.has(n))n=e.F.get(n);else{r=document.createElement("span");var u=o.heightUnits==t_?"%":"px",l=o.widthUnits==t_?"%":"px",d=o.viewportAnchorUnits==t_?"%":"px";r.id="shaka-text-region---"+n,r.classList.add("shaka-text-region"),r.style.position="absolute";var c=o.height,h=o.width;2===o.heightUnits&&(c=5.33*o.height,u="%"),2===o.widthUnits&&(h=o.width*s,l="%"),r.style.height=c+u,r.style.width=h+l,2===o.viewportAnchorUnits?(s=o.viewportAnchorY/75*100,u=o.viewportAnchorX/(e.u===4/3?160:210)*100,s-=o.regionAnchorY*c/100,u-=o.regionAnchorX*h/100,r.style.top=s+"%",r.style.left=u+"%"):(r.style.top=o.viewportAnchorY-o.regionAnchorY*c/100+d,r.style.left=o.viewportAnchorX-o.regionAnchorX*h/100+d),0!==o.heightUnits&&0!==o.widthUnits&&0!==o.viewportAnchorUnits&&(o=Math.max(0,Math.min(100-(parseInt(r.style.width.slice(0,-1),10)||0),parseInt(r.style.left.slice(0,-1),10)||0)),r.style.top=Math.max(0,Math.min(100-(parseInt(r.style.height.slice(0,-1),10)||0),parseInt(r.style.top.slice(0,-1),10)||0))+"%",r.style.left=o+"%"),r.style.display="flex",r.style.flexDirection="column",r.style.alignItems="center",r.style.justifyContent="before"==t.displayAlign?"flex-start":"center"==t.displayAlign?"center":"flex-end",e.F.set(n,r),n=r}}r=a,i&&((r=document.createElement("span")).classList.add("shaka-text-wrapper"),r.style.backgroundColor=t.backgroundColor,r.style.lineHeight="normal",a.appendChild(r)),e.o.set(t,{lg:a,ij:r,Sc:n})}(t,l,a),h=(d=t.o.get(l)).ij,o=!0)),l.nestedCues.length>0&&h&&e(t,l.nestedCues,h,r,a),a.pop()}if(o){for(a=(r=S(s)).next();!a.done;a=r.next())(a=a.value).parentElement&&a.parentElement.removeChild(a);for(u.sort(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime-t.endTime}),r=(u=S(u)).next();!r.done;r=u.next())(r=t.o.get(r.value)).Sc?(r.Sc.contains(i)&&r.Sc.removeChild(i),i.appendChild(r.Sc),r.Sc.appendChild(r.lg)):i.appendChild(r.lg)}}(e,e.h,e.g,n,[])}}function ln(e,t,n,i){i=void 0===i?1:i;var r=(r=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(r[1]),unit:r[2]}:null;if(!r)return e;switch(e=r.unit,i*=r.value,e){case"%":return i/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*i/t.cellResolution.rows+"px";default:return i+e}}function li(e,t){this.h=e,this.g=t,this.i=void 0,this.u=!1,this.F=!0,this.l=this.C=!1,this.o=this.m=void 0,this.B=0,this.H=!1,this.D=new ee,this.j=null}function lr(t){return t.g.sessionId||(t.g.sessionId=e.crypto.randomUUID()),{v:t.g.version,sf:t.i,sid:t.g.sessionId,cid:t.g.contentId,mtp:t.h.getBandwidthEstimate()/1e3}}function la(e,t,n){n=void 0===n?{}:n;var i=void 0===i?e.g.useHeaders:i;if(e.g.enabled)if(r=e,Object.assign(a=void 0===(a=n)?{}:a,lr(r)),a.pr=r.h.ib(),o=a.ot===ll||a.ot===ld,r.C&&o&&(a.bs=!0,a.su=!0,r.C=!1),null!=a.su||(a.su=r.F),a.v===lc&&(r.h.U()&&(a.ltc=r.h.Te()),void 0!=(o=!r.H&&r.o&&r.m?r.o-(r.B||r.m):void 0)&&(a.msd=o,r.H=!0)),s=a,e=(u=r.g.includeKeys).length?Object.keys(s).reduce(function(e,t){return u.includes(t)&&(e[t]=s[t]),e},{}):s,i)Object.keys(i=function(e){var t=Object.keys(e),n={},i=["Object","Request","Session","Status"],r=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3};t=S(t);for(var o=t.next();!o.done;o=t.next())r[null!=a[o=o.value]?a[o]:1][o]=e[o];for(e=0;e<r.length;e++)(a=ls(r[e]))&&(n["CMCD-"+i[e]]=a);return n}(e)).length&&Object.assign(t.headers,i);else{var r,a,o,s,u,l=ls(e);l&&(t.uris=t.uris.map(function(e){return lu(e,l)}))}}function lo(e,t){if(!(t=e.h.Qb()[t]).length)return 0;var n=e.h.getCurrentTime();return(e=t.find(function(e){return e.start<=n&&e.end>=n}
1))?(e.end-n)*1e3:0}function ls(e){function t(e){return 100*n(e/100)}function n(e){return Math.round(e)}var i=[],r={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(e){return encodeURIComponent(e)},rtp:t,tb:n},a=Object.keys(e||{}).sort();a=S(a);for(var o=a.next();!o.done;o=a.next()){var s,u=e[o=o.value];if(!Number.isNaN(s=u)&&null!=s&&""!==s&&!1!==s&&("v"!==o||1!==u)&&("pr"!=o||1!==u)){var l=r[o];l&&(u=l(u));var d=void 0;d="string"==(l=typeof u)&&"ot"!==o&&"sf"!==o&&"st"!==o?o+"="+JSON.stringify(u):"boolean"===l?o:"symbol"===l?o+"="+u.description:o+"="+u,i.push(d)}}return i.join(",")}function lu(e,t){return!t||e.includes("offline:")?e:((e=new ef(e)).g.set("CMCD",t),e.toString())}(p=u5.prototype).configure=function(){},p.remove=function(e,t){return!!this.i&&(this.h.has(this.g)&&u4(this.h.get(this.g).track,function(n){return n.startTime<t&&n.endTime>e}),!0)},p.append=function(e){this.h.has(this.g)&&u3(this.h.get(this.g).track,e)},p.destroy=function(){var e,t;return this.i&&(this.j&&this.C(),this.i=null),null==(e=this.m)||e.stop(),this.m=null,null==(t=this.l)||t.release(),this.l=null,Promise.resolve()},p.isTextVisible=function(){return this.u},p.setTextVisibility=function(e){if(this.u=e,this.h.has(this.g)){var t=this.h.get(this.g).track;"disabled"!==t.mode&&(e=e?"showing":"hidden",t.mode!==e&&(t.mode=e))}else if(this.i&&3===this.i.Ue())if(t=Array.from(this.i.Ve().textTracks).filter(function(e){return["captions","subtitles","forced"].includes(e.kind)}),e){e=null,t=S(t);for(var n=t.next();!n.done;n=t.next())if("showing"===(n=n.value).mode){e=null;break}else e||"hidden"!==n.mode||(e=n);e&&(e.mode="showing")}else for(t=(e=S(t)).next();!t.done;t=e.next())"showing"===(t=t.value).mode&&(t.mode="hidden")},p.setTextLanguage=function(){},p.enableTextDisplayer=function(){!this.j&&this.i&&2===this.i.Ue()&&(this.j=this.i.Ve(),this.l.Ba(this.i,"unloading",this.C),this.l.G(this.i,"textchanged",this.o),this.l.G(this.j.textTracks,"change",this.B),this.o())},q("shaka.text.NativeTextDisplayer",u5),u5.prototype.enableTextDisplayer=u5.prototype.enableTextDisplayer,u5.prototype.setTextLanguage=u5.prototype.setTextLanguage,u5.prototype.setTextVisibility=u5.prototype.setTextVisibility,u5.prototype.isTextVisible=u5.prototype.isTextVisible,u5.prototype.destroy=u5.prototype.destroy,u5.prototype.append=u5.prototype.append,u5.prototype.remove=u5.prototype.remove,u5.prototype.configure=u5.prototype.configure,(p=u6.prototype).configure=function(){},p.remove=function(e,t){return!!this.g&&(u4(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0)},p.append=function(e){this.g&&u3(this.g,e)},p.destroy=function(){return this.g&&(u4(this.g,function(){return!0}),this.g.mode="disabled"),this.g=this.h=null,Promise.resolve()},p.isTextVisible=function(){return!!this.g&&"showing"==this.g.mode},p.setTextVisibility=function(e){e&&!this.g&&u8(this),this.g&&(this.g.mode=e?"showing":"hidden")},p.setTextLanguage=function(){},p.enableTextDisplayer=function(){u8(this)},q("shaka.text.SimpleTextDisplayer",u6),u6.prototype.enableTextDisplayer=u6.prototype.enableTextDisplayer,u6.prototype.setTextLanguage=u6.prototype.setTextLanguage,u6.prototype.setTextVisibility=u6.prototype.setTextVisibility,u6.prototype.isTextVisible=u6.prototype.isTextVisible,u6.prototype.destroy=u6.prototype.destroy,u6.prototype.append=u6.prototype.append,u6.prototype.remove=u6.prototype.remove,u6.prototype.configure=u6.prototype.configure,(p=u9.prototype).configure=function(){},p.remove=function(){},p.append=function(){},p.destroy=function(){},p.isTextVisible=function(){return!1},p.setTextVisibility=function(){},p.setTextLanguage=function(){},p.enableTextDisplayer=function(){},q("shaka.text.StubTextDisplayer",u9),u9.prototype.enableTextDisplayer=u9.prototype.enableTextDisplayer,u9.prototype.setTextLanguage=u9.prototype.setTextLanguage,u9.prototype.setTextVisibility=u9.prototype.setTextVisibility,u9.prototype.isTextVisible=u9.prototype.isTextVisible,u9.prototype.destroy=u9.prototype.destroy,u9.prototype.append=u9.prototype.append,u9.prototype.remove=u9.prototype.remove,u9.prototype.configure=u9.prototype.configure,(p=u7.prototype).configure=function(e){this.C=e,le(this),lt(this,!0)},p.append=function(e){var t=[].concat(x(this.h));e=S(u2(e));for(var n=e.next(),i={};!n.done;i={kg:void 0},n=e.next())i.kg=n.value,t.some(function(e){return function(t){return ns(t,e.kg)}}(i))||this.h.push(i.kg);this.h.length&&le(this),lt(this)},p.destroy=function(){return!this.g||(this.g.parentElement&&this.l.removeChild(this.g),this.g=null,this.j=!1,this.h=[],this.B&&(this.B.stop(),this.B=null),this.o.clear(),this.i&&(this.i.release(),this.i=null),this.D&&(this.D.disconnect(),this.D=null)),Promise.resolve()},p.remove=function(e,t){if(!this.g)return!1;var n=this.h.length;return this.h=this.h.filter(function(n){return n.startTime<e||n.endTime>=t}),lt(this,n>this.h.length),this.h.length||le(this),!0},p.isTextVisible=function(){return this.j},p.setTextVisibility=function(e){(this.j=e)?(this.g.parentElement||this.l.appendChild(this.g),lt(this,!0)):this.g.parentElement&&this.l.removeChild(this.g)},p.setTextLanguage=function(e){e&&"und"!=e?this.g.setAttribute("lang",e):this.g.setAttribute("lang","")},p.enableTextDisplayer=function(){},q("shaka.text.UITextDisplayer",u7),u7.prototype.enableTextDisplayer=u7.prototype.enableTextDisplayer,u7.prototype.setTextLanguage=u7.prototype.setTextLanguage,u7.prototype.setTextVisibility=u7.prototype.setTextVisibility,u7.prototype.isTextVisible=u7.prototype.isTextVisible,u7.prototype.remove=u7.prototype.remove,u7.prototype.destroy=u7.prototype.destroy,u7.prototype.append=u7.prototype.append,u7.prototype.configure=u7.prototype.configure,q("shaka.text.WebVttGenerator",function(){}),li.prototype.setMediaElement=function(e){var t;this.j=e,t=this,t.D.Ba(t.j,"play",function(){t.m||(t.m=Date.now())}),t.D.Ba(t.j,"playing",function(){t.o||(t.o=Date.now())})},li.prototype.configure=function(e){this.g=e};var ll="v",ld="av",lc=2;function lh(e){this.h=e,this.g=null}
1function lp(e){return!e||"false"!==e.toLowerCase()&&(/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""))}q("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",Rl:"ld",HLS:"h",Sl:"lh",hm:"s",OTHER:"o"}),(p=lh.prototype).configure=function(e){this.h=e},p.di=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(lg)?1e3*this.g.get(lg):null},p.bi=function(){return this.h.enabled&&this.g&&this.g.has(lf)?1e3*this.g.get(lf):null},p.Tj=function(){return this.h.enabled&&this.g&&this.g.has(lm)?this.g.get(lm):null},p.Uj=function(){return this.h.enabled&&this.g&&this.g.has(lv)?this.g.get(lv):null},p.getBandwidthEstimate=function(e){var t=this.bi();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return n>0&&n<=1?e*(1-n)+t*n:e},q("shaka.util.CmsdManager",lh),lh.prototype.getBandwidthEstimate=lh.prototype.getBandwidthEstimate,lh.prototype.getRoundTripTime=lh.prototype.Uj,lh.prototype.getResponseDelay=lh.prototype.Tj,lh.prototype.getEstimatedThroughput=lh.prototype.bi,lh.prototype.getMaxBitrate=lh.prototype.di;var lf="etp",lg="mb",lm="rd",lv="rtt";function ly(){this.g=null,this.h=[]}function lb(e,t){return L(function(n){if(1==n.h)return e.g?n.g(new Promise(function(t){return e.h.push(t)}),2):n.A(2);e.g=t,n.j()})}function l_(t,n,i){n=void 0===n?null:n,rt.call(this);var r,a=this;this.m=dv,this.h=null,this.ue=n,this.ia=!1,this.ze=new ee,this.pe=new ee,this.l=new ee,this.$b=new ee,this.Cd=new ee,this.F=this.H=this.D=this.K=null,this.Ae=0,this.ka=new ly,this.O=this.Fa=this.Y=this.i=this.xd=this.I=this.j=this.me=this.T=this.Mh=this.ua=this.M=this.eb=this.za=this.oe=this.P=this.Ja=this.J=this.Xb=null,this.Ra=!1,this.cb=this.u=null,this.se=1e9,this.ye=[],this.sc=new Map,this.Vb=[],this.Xf=-1,this.g=lY(this),this.Zf=uE(),this.V=null,this.Be=-1,this.Yb=null,this.ya={width:1/0,height:1/0},this.re=new at(this.g,this.ya,null),this.we=[],this.B=null,this.N=this.g.adaptationSetCriteriaFactory(),this.N.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredVariantRole,channelCount:0,Dc:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,Jc:this.g.preferredAudioLabel,Fd:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Jd:"",Ce:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount}),this.Ed=this.g.preferredTextLanguage,this.Hd=this.g.preferredTextRole,this.Gd=this.g.preferForcedSubs,this.qe=[],i&&i(this),this.M=(r=this,new li({getBandwidthEstimate:function(){return r.u?r.u.getBandwidthEstimate():NaN},Qb:function(){return r.Qb()},getCurrentTime:function(){return r.h?r.h.currentTime:0},ib:function(){return r.ib()},Jb:function(){return r.Jb()},Kb:function(){return r.Kb()},U:function(){return r.U()},Te:function(){return r.Te()}},r.g.cmcd)),this.ua=new lh(this.g.cmsd),this.K=lN(this),this.ma=this.na=this.Aa=this.C=null,this.ag=!1,this.Yf=[],this.$f=new n4(function(){return L(function(e){return 1==e.h?a.na?e.g(a.Pb(a.ma,!0),3):e.A(0):4!=e.h?e.g(a.load(a.na),4):void(a.ag?a.ma.pause():a.ma.play(),a.na=null,a.ag=!1,e.j())})}),dw&&(this.C=dw(),this.C.configure(this.g.ads),this.Cd.G(this.C,"ad-content-pause-requested",function(e){var t,n;return L(function(i){if(1==i.h)return(a.$f.stop(),a.na)?i.A(0):(a.ma=a.h,a.ag=a.Xd(),t=e.saveLivePosition||!1,n=!0,a.U()&&(n=t),i.g(a.Wh(!0,n),3));a.na=i.i,i.j()})}),this.Cd.G(this.C,"ad-content-resume-requested",function(e){if(e=e.offset||0,a.na){var t=a.na;t.m&&e&&("number"==typeof t.m?t.m+=e:t.m.setTime(t.m.getTime()+1e3*e))}a.$f.ea(.1)}),this.Cd.G(this.C,"ad-content-attach-requested",function(){return L(function(e){if(1==e.h)return a.h||!a.ma?e.A(0):e.g(a.Pb(a.ma,!0),3);a.ma=null,e.j()})})),dT&&(this.Aa=dT(this),this.Aa.configure(this.g.queue)),this.ze.G(e,"online",function(){ds(a),a.jh()}),this.ve=new n4(function(){for(var e=Date.now()/1e3,t=!1,n=!0,i=S(a.i.variants),r=i.next();!r.done;r=i.next())(r=r.value).disabledUntilTime>0&&r.disabledUntilTime<=e&&(r.disabledUntilTime=0,t=!0),r.disabledUntilTime>0&&(n=!1);n&&a.ve.stop(),t&&l4(a,!1,void 0,!1,!1)}),this.Za=null,t&&(el("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Pb(t,!0)),this.o=null}function lw(e){null!=e.T&&(tt(e.T),e.T.release(),e.T=null)}function lT(e,t){return new i9(e,t)}function lS(e,t){d_.set(e,t)}function lx(e,t){e.dispatchEvent(lT("onstatechange",new Map().set("state",t)))}function lA(e,t){var n;return L(function(i){return 1==i.h?(n=++e.Ae,i.g(lb(e.ka,t),2)):n!=e.Ae?(e.ka.release(),i.return(!0)):i.return(!1)})}function lE(e,t){var n,i,r;
1return t=void 0!==t&&t,L(function(a){if(1==a.h)return(n=null,e.i&&e.I&&e.xd&&e.Y&&e.g)?(i=e.h.currentTime,t||(i=null),a.g(lI(e,e.Y,i,e.Fa,e.g,!0,!1,!1),3)):a.A(2);if(2!=a.h){n=a.i,e.we.push(n),e.I&&e.I.setMediaElement&&e.I.setMediaElement(null),(r=e.j?e.j.o:null)&&(n.o=r);var o=n,s=e.I,u=e.xd;o.h=e.i,o.l=s,o.I=u,n.C=e.N,n.start(),e.i=null,e.I=null,e.xd=null,e.u=null,e.cb=null}return a.return(n)})}function lk(e,t,n,i,r,a){var o,s,u,l;return r=void 0!==r&&r,L(function(d){return 1==d.h?i?d.A(2):d.g(lC(e,t),3):(2!=d.h&&(i=d.i),function(e,t){if(!p7(er()))return!0;if(t){if(""==(e.h||a5()).canPlayType(t))return!1;if(!p7(er())||!td.has(t))return!0;if(nz(t))return"WEBKIT"===er().Ea()&&(e.g.drm.servers["com.apple.fps"]||e.g.drm.servers["com.apple.fps.1_0"])?e.g.streaming.useNativeHlsForFairPlay:e.g.streaming.preferNativeHls;if("application/dash+xml"===t||"video/vnd.mpeg.dash.mpd"===t)return e.g.streaming.preferNativeDash}return!1}(e,i))?d.return(null):(o=a||e.g,s=!1,u=!0,r&&(e.u&&e.cb==o.abrFactory&&(u=!1),e.h&&"AUDIO"===e.h.nodeName&&(s=!0)),l=lI(e,t,n,i||null,o,!r,s,u),l=r?l.then(function(e){return e.D=!1,e}):l.then(function(t){return e.we.push(t),t}),d.return(l))})}function lI(e,t,n,i,r,a,o,s){var u,l,d,c,h,p,f,g,m,v,y,b,w;return a=void 0===a||a,o=void 0!==o&&o,s=void 0===s||s,L(function(T){var x,A,E;return 1==T.h?(u=null,l=tO(r),o&&(l.manifest.disableVideo=!0),d=function(){return u.T&&u.u?null:u},c=function(){return d()?d().getConfiguration():e.g},e.ya.width!=1/0||e.ya.height!=1/0||e.g.ignoreHardwareResolution)?T.A(2):(h=er(),T.g(h.fc(),3)):(2!=T.h&&(p=T.i,e.ya.width=p.width,e.ya.height=p.height),f=new at(l,e.ya,null),g={networkingEngine:e.K,filter:function(e){var t;return L(function(n){return 1==n.h?n.g(an(f,e),2):4!=n.h?n.i?(t=lT("trackschanged"),n.g(Promise.resolve(),4)):n.A(0):void(u.dispatchEvent(t),n.j())})},makeTextStreamsForClosedCaptions:function(t){return function(e,t){for(var n=new Set,i=S(t.textStreams),r=i.next();!r.done;r=i.next())"application/cea-608"!=(r=r.value).mimeType&&"application/cea-708"!=r.mimeType||n.add(r.originalId);for(r=(i=S(t.variants)).next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions){for(var a=S(r.closedCaptions.keys()),o=a.next();!o.done;o=a.next())if(o=o.value,!n.has(o)){var s=o.startsWith("CC")?"application/cea-608":"application/cea-708",u=new sA,l=r.closedCaptions.get(o);s={id:e.se++,originalId:o,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:u,mimeType:s,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:e5,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:r.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([nB(s,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},t.textStreams.push(s),n.add(o)}}}(e,t)},onTimelineRegionAdded:function(e){sL(u.J,e)},onEvent:function(e){return u.dispatchEvent(e)},onError:function(e){return u.onError(e)},isLowLatencyMode:function(){return c().streaming.lowLatencyMode},updateDuration:function(){e.j&&u.T&&e.j.updateDuration()},newDrmInfo:function(e){var t=u.i,n=t?t.g:null;n&&t.B&&aa(f,n.keySystem,e)},onManifestUpdated:function(){var t=new Map().set("isLive",e.U());u.dispatchEvent(lT("manifestupdated",t)),uj(u,!1,function(){e.C&&e.C.onManifestUpdated(e.U())})},getBandwidthEstimate:function(){return e.u.getBandwidthEstimate()},onMetadata:function(t,n,i,r){var a=t;"com.apple.hls.interstitial"==t&&(a="com.apple.quicktime.HLS",t={startTime:n,endTime:i,values:r},e.C)&&e.C.onHLSInterstitialMetadata(e,e.h,t),t=(r=S(r)).next();for(var o={};!t.done;o={$g:void 0},t=r.next())o.$g=t.value,"ID"!=o.$g.name&&uj(u,!1,function(t){return function(){lO(e,n,i,a,t.$g)}}(o))},disableStream:function(t){return e.disableStream(t,e.g.streaming.maxDisabledTime)},addFont:function(t,n){return e.addFont(t,n)}},(m=new sR(function(){return e.Ma()})).addEventListener("regionadd",function(t){var n=t.region;dl(e,"timelineregionadded",n,u),uj(u,!1,function(){e.C&&(e.C.onDashTimedMetadata(n),e.C.onDASHInterstitialMetadata(e,e.h,n))})}),v=null,l.streaming.observeQualityChanges&&((v=new sM(function(){return e.Qb()})).addEventListener("qualitychange",function(t){dd(e,t.quality,t.position)}),v.addEventListener("audiotrackchange",function(t){dd(e,t.quality,t.position,!0)})),y=!0,b={nc:e.K,onError:function(e){return u.onError(e)},uf:function(t){uj(u,!0,function(){e.D&&function(e,t){if(e.j){var n=lT("keystatuschanged");e.dispatchEvent(n);var i=Object.keys(t);1==i.length&&""==i[0]&&(i=["00"],t={"00":t[""]});var r=1==i.length&&"00"==i[0];if(n=!1,i.length){i=e.keySystem();for(var a=rv(e.g.drm.clearKeys),o=function(n,i){n.allowedByKeySystem=!0,i=S(i);for(var a=i.next();!a.done;a=i.next())a=a.value,((a=t[r?"00":a])||e.D.H)&&(n.allowedByKeySystem=n.allowedByKeySystem&&!!a&&!as.includes(a))},s=S(e.i.variants),u=s.next();!u.done;u=s.next()){var l=function(e){var t=[];return e.audio&&t.push(e.audio),e.video&&t.push(e.video),t}(u=u.value);l=S(l);for(var d=l.next();!d.done;d=l.next()){d=d.value;var c=u.allowedByKeySystem;if(d.keyIds.size)if(d.drmInfos.length&&!a.size&&"HLS"==e.i.type)for(var h=S(d.drmInfos),p=h.next();!p.done;p=h.next())(p=p.value).keySystem==i&&(p.keyIds.size?o(u,p.keyIds):o(u,d.keyIds));else o(u,d.keyIds);c!=u.allowedByKeySystem&&(n=!0)}}}n&&(l9(e),(n=e.j.o)&&!n.allowedByKeySystem?l4(e):l3(e))}}(e,t)})},onExpirationUpdated:function(e,t){var n=lT("expirationupdated");u.dispatchEvent(n),(n=u.l)&&n.onExpirationUpdated&&n.onExpirationUpdated(e,t)},onEvent:function(t){if(u.dispatchEvent(t),"drmsessionupdate"==t.type&&y){y=!1,t=Date.now()/1e3-u.Fa;var n=e.B||u.getStats();t>=0&&(n.m=t),e.T&&tt(e.T)}}},w=lN(e,d),ro(e.K,w),u=new uN(t,i,n,{config:l,wk:g,Jk:m,Ik:v,cd:function(){return e.cd(b)},vk:f,networkingEngine:w,lj:a,kj:s}),s||(x=u,A=e.u,E=e.cb,x.j=A,x.F=E),T.return(u))})}function lC(e,t){var n,i;return L(function(r){return 1==r.h?(n=e.g.manifest.retryParameters,r.g(sX(t,e.K,n),2)):(nz(i=r.i)?"WEBKIT"===er().Ea()&&(i="application/vnd.apple.mpegurl"):"video/quicktime"===i&&"CHROMIUM"===er().Ea()&&(i="video/mp4"),r.return(i))})}function lM(e){var t=e.g.textDisplayFactory;if(e.Lh!==t){var n,i,r,a,o=e.o;e.o=t(),e.o.configure?e.o.configure(e.g.textDisplayer):el("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.o.setTextLanguage||el("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),o?(e.o.setTextVisibility(o.isTextVisible()),o.destroy().catch(function(){})):e.o.setTextVisibility(e.ia),e.H&&((n=e.H).ka=i=e.o,n.h&&(n.h.l=i)),e.Lh=t,e.j&&(a=(r=e.j).h.get(e5))&&s2(r,a.stream,!0,0,!0)}else e.o&&e.o.configure&&e.o.configure(e.g.textDisplayer)}function lP(e){var t,n;return L(function(i){if(1==i.h){var r,a,o,s;return er(),lx(e,"media-source"),e.g.mediaSource.useSourceElements&&a3(e.h),lM(e),r=e.h,a=e.o,o={Lj:function(){return e.keySystem()},onMetadata:function(t,n,i){t=S(t);for(var r=t.next();!r.done;r=t.next())if((r=r.value).data&&"number"==typeof r.cueTime&&r.frames){var a=r.cueTime+n,o=i;o&&a>o&&(o=a);for(var s=S(r.frames),u=s.next();!u.done;u=s.next())lO(e,a,o,"org.id3",u.value);e.C&&e.C.onHlsTimedMetadata(r,a)}},Ck:function(t){e.eb&&sL(e.eb,{schemeIdUri:t.schemeIdUri,startTime:t.startTime,endTime:t.endTime,id:String(t.id),emsg:t})},onEvent:function(t){return e.dispatchEvent(t)},Ek:function(){e.I&&e.I.update&&e.I.update()}},s=e.T,t=new oI(r,a,o,e.g.mediaSource,s),n=e.g.manifest.segmentRelativeVttTiming,t.Fa=n,i.g(t.M,2)}e.H=t,i.j()})}function lD(e,t){e.J=new sE({Hg:function(){return t.playbackRate},jd:function(){return t.defaultPlaybackRate},Si:function(e){t.playbackRate=e},Ak:function(n){var i=t.currentTime;if(a$(t.buffered,i)&&!(t.readyState<=HTMLMediaElement.HAVE_CURRENT_DATA)){n=i+n;var r=e.Ma();n<r.start?i!==r.start&&(t.currentTime=r.start):n>r.end?i!==r.end&&(t.currentTime=r.end):t.currentTime=n}},isPaused:function(){return t.paused}})}function lR(e,t,n){function i(){return lZ(e)}if(e.l.G(t,"playing",i),e.l.G(t,"pause",i),e.l.G(t,"ended",i),e.l.G(t,"ratechange",function(){return lQ(e)}),t.remote&&(e.l.G(t.remote,"connect",function(){e.j&&"connected"==t.remote.state&&dn(e),l9(e)}),e.l.G(t.remote,"connecting",function(){return l9(e)}),e.l.G(t.remote,"disconnect",function(){return L(function(n){if(1==n.h)return e.j&&"disconnected"==t.remote.state?n.g(ud(e.j),3):n.A(2);2!=n.h&&dn(e),l9(e),n.j()})})),t.audioTracks&&(e.l.G(t.audioTracks,"addtrack",function(){return l9(e)}),e.l.G(t.audioTracks,"removetrack",function(){return l9(e)}),e.l.G(t.audioTracks,"change",function(){return l9(e)})),t.videoTracks&&(e.l.G(t.videoTracks,"addtrack",function(){return l9(e)}),e.l.G(t.videoTracks,"removetrack",function(){return l9(e)}),e.l.G(t.videoTracks,"change",function(){return l9(e)})),t.textTracks){var r=function(){e.m===db&&e.o instanceof u5&&dn(e),l9(e)};e.l.G(t.textTracks,"addtrack",function(t){if(t.track)switch((t=t.track).kind){case"metadata":var n=t;if("metadata"==n.kind){n.mode="hidden",e.l.G(n,"cuechange",function(){if(n.activeCues)for(var t=S(n.activeCues),i=t.next();!i.done;i=t.next())lO(e,(i=i.value).startTime,i.endTime,i.type,i.value),e.C&&e.C.onCueMetadataChange(i.value);if(n.cues){t=[],i=S(n.cues);for(var r=i.next(),a={};!r.done;a={xc:void 0},r=i.next())a.xc=r.value,"com.apple.quicktime.HLS"==a.xc.type&&null!=a.xc.startTime&&((r=t.find(function(e){return function(t){return t.startTime==e.xc.startTime&&t.endTime==e.xc.endTime}}(a)))||(r={startTime:a.xc.startTime,endTime:a.xc.endTime,values:[]},t.push(r)),r.values.push(a.xc.value));for(i=(t=S(t)).next();!i.done;i=t.next())(i=i.value).values.some(function(e){return"X-ASSET-URI"==e.key||"X-ASSET-LIST"==e.key})&&e.C&&(i.values.push({key:"CUE",description:"",data:0!=i.startTime||e.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),e.C.onHLSInterstitialMetadata(e,e.h,i))}});var i=new n4(function(){var t=Array.from(e.h.textTracks).filter(function(e){return"metadata"==e.kind});t=S(t);for(var n=t.next();!n.done;n=t.next())n.value.mode="hidden"}).wb().ea(.5);e.qe.push(function(){i.stop()})}break;case"chapters":var a=t;if(a&&"chapters"==a.kind){a.mode="hidden";var o=new n4(function(){a.mode="hidden"}).wb().ea(.5);e.qe.push(function(){o.stop()})}break;default:r()}}),e.l.G(t.textTracks,"removetrack",r),e.l.G(t.textTracks,"change",r),"keep"!==e.g.streaming.crossBoundaryStrategy&&(e.l.G(t,"waiting",function(){e.j&&uh(e.j)}),e.l.G(t,"timeupdate",function(){e.j&&uh(e.j)}))}"none"!=t.preload&&e.l.Ba(t,"loadedmetadata",function(){var t=e.B,i=Date.now()/1e3-n;i>=0&&(t.F=i)})}
1function lL(e,t,n){t=new Map().set("startTime",t.startTime).set("endTime",t.endTime).set("metadataType",t.schemeIdUri).set("payload",t.payload),e.dispatchEvent(lT(n,t))}function lO(e,t,n,i,r){e.za&&((t={schemeIdUri:i,startTime:t,endTime:n||1/0,id:"",payload:r}).id=JSON.stringify(t),sL(e.za,t))}function lN(e,t){function n(n){t()?t().dispatchEvent(n):e.dispatchEvent(n)}function i(e){t()?uj(t(),!0,e):e()}t||(t=function(){return null});var r=new rr(function(n,i,r,a,o){var s=t()?t().j:e.u;s&&s.segmentDownloaded(n,i,r,a,o)},function(t,r,a){n(lT("downloadheadersreceived",r=new Map().set("headers",t).set("request",r).set("requestType",a))),i(function(){if(e.ua){var n=e.ua;if(n.h.enabled){var i=t["cmsd-static"];if(i)try{var r=new Map,a=i.split(",");for(i=0;i<a.length;i++){var o=a[i].split("=");r.set(o[0],lp(o[1]))}}catch(e){}if(r=t["cmsd-dynamic"]){e:try{var s=new Map,u=r.split(";");for(r=1;r<u.length;r++){var l=u[r].split("=");s.set(l[0],lp(l[1]))}var d=s;break e}catch(e){d=null;break e}d&&(n.g=d)}}}})},function(e,t){n(lT("downloadcompleted",e=new Map().set("request",e).set("response",t)))},function(e,t,i,r){n(lT("downloadfailed",e=new Map().set("request",e).set("error",t).set("httpResponseCode",i).set("aborted",r)))},function(t,n,r){i(function(){var i=e.M,a=r;if(a=void 0===a?{}:a,i.g.enabled)if("HEAD"===n.method)la(i,n);else switch(t){case 0:try{if(i.g.enabled){if(a.type){e:{switch(a.type){case 4:var o=i.l?"ld":"d";break e;case 3:case 2:o=i.l?"lh":"h";break e;case 5:o="s";break e}o=void 0}i.i=o}la(i,n,{ot:"m",su:!i.u})}}catch(e){J("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",e)}break;case rc:try{if(i.g.enabled){var s=n.uris[0],u=a.segment;o=0,u&&(o=u.endTime-u.startTime);var l={d:1e3*o,st:i.h.U()?"l":"v"};l.ot=function(e){if(0===e.type)return"i";if(e=e.stream){var t=e.type;if("video"==t)return e.codecs&&e.codecs.includes(",")?ld:ll;if("audio"==t)return"a";if("text"==t)return"application/mp4"===e.mimeType?"tt":"c"}}(a);var d=l.ot===ll||"a"===l.ot||l.ot===ld||"tt"===l.ot,c=a.stream;if(c){var h=i.h.ib();if(d&&(l.bl=function(e,t){if(!(t=e.h.Qb()[t]).length)return NaN;var n=e.h.getCurrentTime();return(e=t.find(function(e){return e.start<=n&&e.end>=n}))?(e.end-n)*1e3:NaN}(i,c.type),"tt"!==l.ot)){var p=lo(i,c.type);l.dl=h?p/Math.abs(h):p}if(c.bandwidth&&(l.br=c.bandwidth/1e3),c.segmentIndex&&u){var f=c.segmentIndex.Rb(u.endTime,!0,h<0);if(f){var g=f.next().value;if(g&&g!=u){if(s&&!tE(u.R(),g.R())){var m=g.R()[0],v=new URL(m),y=new URL(s);if(v.origin!==y.origin)var b=m;else{for(var w=v.pathname.split("/").slice(1),T=y.pathname.split("/").slice(1,-1);w[0]===T[0];)w.shift(),T.shift();for(;T.length;)T.shift(),w.unshift("..");b=w.join("/")}l.nor=b}if((g.startByte||g.endByte)&&(u.startByte!=g.startByte||u.endByte!=g.endByte)){var x=g.startByte+"-";g.endByte&&(x+=g.endByte),l.nrr=x}}}var A=i.h.ib()||1,E=lo(i,c.type)||500,k=c.bandwidth,I=k?k*(u.endTime-u.startTime)/1e3/(E/A/1e3)*i.g.rtpSafetyFactor:NaN;isNaN(I)||(l.rtp=I)}}d&&"tt"!==l.ot&&(l.tb=function(e,t){var n=e.h.Kb();if(!n.length)return NaN;e=n[0],n=S(n);for(var i=n.next();!i.done;i=n.next())"variant"===(i=i.value).type&&i.bandwidth>e.bandwidth&&(e=i);switch(t){case ll:return e.videoBandwidth||NaN;case"a":return e.audioBandwidth||NaN;default:return e.bandwidth}}(i,l.ot)/1e3),la(i,n,l)}}catch(e){J("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",e)}break;case 2:case 5:case 6:la(i,n,{ot:"k"});break;case 4:la(i,n,{ot:"o"})}})},function(n,i,r,a){(n=t()?t().l:e.I)&&n.banLocation&&n.banLocation(a)},function(n,i){if(i.data){i=i.data.byteLength;var r=t()?t().getStats():e.B;r&&(uO(r,i),0===n&&(r.pi=i))}});return r.configure(e.g.networking),r}
1function lj(e,t,n){e.P=new r8,r9(e.P,r7),lU(e),lJ(e),e.Ja=new n4(function(){lB(e)}),e.g.streaming.rebufferingGoal&&e.Ja.Ha(.25),e.l.G(t,"waiting",function(){return lB(e,"waiting")}),e.l.G(t,"canplaythrough",function(){return lB(e,"canplaythrough")}),e.l.G(t,"playing",function(){return lB(e,"playing")}),e.l.G(t,"seeked",function(){return lB(e,"seeked")}),e.l.G(t,"timeupdate",function(){return lB(e,"timeupdate")}),n&&(e.l.G(t,"progress",function(){return lB(e,"progress")}),e.l.G(t,"stalled",function(){return lB(e,"stalled")}))}function lU(e){var t=e.g.streaming.rebufferingGoal;e.P.j.set(ae,Math.min(.5,t/2)).set(r7,t)}function lB(e,t){if(e.g.streaming.rebufferingGoal){t=!!e.H&&oL(e.H),t=e.Xd()||t||e.F.mi();var n=aZ(e.h.buffered,e.h.currentTime),i=e.P,r=i.j.get(i.g);r9(i,t||n>=r&&n>0?ae:r7)&&lJ(e)}else if(t){n=e.P,i=e.h.currentTime,r=n.h,n.h=i;var a=void 0;switch(t){case"seeking":case"waiting":n.h=-1,a=r7;break;case"canplaythrough":case"playing":case"seeked":a=ae;break;case"timeupdate":r>=0&&i-r>.01&&(a=ae)}void 0!==a&&r9(n,a)&&lJ(e)}}function lF(e){if(e.re=new at(e.g,e.ya,e.D),e.I){var t=tO(e.g.manifest);e.h&&"AUDIO"===e.h.nodeName&&(t.disableVideo=!0),e.I.configure(t)}if(e.D&&e.D.configure(e.g.drm),e.j){e.j.configure(e.g.streaming);try{e.m!=dm&&ar(e.re,e.i)&&l9(e)}catch(t){du(e,t)}e.u&&l3(e),(t=e.j.o)&&(!t.allowedByApplication||!t.allowedByKeySystem)&&l4(e)}e.K&&e.K.configure(e.g.networking),e.H&&(e.H.configure(e.g.mediaSource),e.H.Fa=e.g.manifest.segmentRelativeVttTiming),e.o&&lM(e),e.u&&(e.u.configure(e.g.abr),e.g.abr.enabled?e.u.enable():e.u.disable(),dr(e)),e.P&&lU(e),e.Ja&&(e.g.streaming.rebufferingGoal?e.Ja.Ha(.25):e.Ja.stop()),e.i&&dh(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.C&&e.C.configure(e.g.ads),e.M&&e.M.configure(e.g.cmcd),e.ua&&e.ua.configure(e.g.cmsd),e.Aa&&e.Aa.configure(e.g.queue)}function lV(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{columns:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}function lH(e,t){var n,i,r;return L(function(a){return 1==a.h?(e.m==dy||e.m==db)&&(n=e.ye,e.i&&(n=e.i.imageStreams),i=n[0])?(null!=t&&(i=n.find(function(e){return e.id==t})),i?i.segmentIndex?a.A(2):a.g(i.createSegmentIndex(),2):a.return(null)):a.return(null):(i.closeSegmentIndex&&(e.sc.has(i)||(r=new n4(function(){i&&(i.closeSegmentIndex(),e.sc.delete(i))}),e.sc.set(i,r)),e.sc.get(i).ea(5)),a.return(i))})}function lq(e,t,n,i){var r=t.width||0,a=t.height||0,o=r/i.columns,s=a/i.rows,u=i.columns*i.rows,l=e.j-e.startTime;l=e.C||l/u;var d=e.startTime,c=0,h=0;return(u>1&&(h=Math.floor((n-e.startTime)/l+1e-4),d=e.startTime+h*l,c=h%i.columns*o,h=Math.floor(h/i.columns)*s),d>=e.endTime||or(d,e.endTime,1e-4))?null:(i=!1,(n=e.thumbnailSprite)&&(i=!0,s=n.height,c=n.positionX,h=n.positionY,o=n.width),{segment:e,imageHeight:a,imageWidth:r,height:s,positionX:c,positionY:h,startTime:d,duration:l,uris:e.R(),startByte:e.Bc(),endByte:e.zc(),width:o,sprite:i,mimeType:e.mimeType||t.mimeType,codecs:e.codecs||t.codecs})}function lG(e,t){e.l.G(t,"cuechange",function(){e.o.remove(0,Math.max(0,e.h.currentTime-e.g.streaming.bufferBehind));var n={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},i=[],r=Array.from(t.activeCues||[]);r=S(r);for(var a=r.next();!a.done;a=r.next()){if((a=a.value).endTime===1/0||a.endTime<a.startTime)a=null;else{var o=new na(a.startTime,a.endTime,a.text);o.line="number"==typeof a.line?a.line:null,a.lineAlign&&(o.lineAlign=a.lineAlign),o.lineInterpretation=a.snapToLines?ny:1,o.position="number"==typeof a.position?a.position:null,a.positionAlign&&(o.positionAlign=a.positionAlign),o.size=a.size,o.textAlign=a.align,"lr"===a.vertical?o.writingMode="vertical-lr":"rl"===a.vertical&&(o.writingMode="vertical-rl"),a.region&&(o.region.id=a.region.id,o.region.height=a.region.lines,o.region.heightUnits=2,o.region.regionAnchorX=a.region.regionAnchorX,o.region.regionAnchorY=a.region.regionAnchorY,o.region.scroll=a.region.scroll,o.region.viewportAnchorX=a.region.viewportAnchorX,o.region.viewportAnchorY=a.region.viewportAnchorY,o.region.viewportAnchorUnits=t_,o.region.width=a.region.width,o.region.widthUnits=t_),nu(o),a=o}a&&((o=e.g.mediaSource.modifyCueCallback)&&o(a,null,n),i.push(a))}e.o.append(i)}),t.mode=document.pictureInPictureElement?"showing":"hidden"}function lK(e){return Array.from(e.h.textTracks).filter(function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label})}function lW(e,t){var n;return L(function(i){switch(i.h){case 1:return i.m(2),i.g(sX(t,e.K,e.g.streaming.retryParameters),4);case 4:n=i.i,i.o(3);break;case 2:i.l();case 3:if(n)return i.return(n);throw new eN(1,2,2011,t)}})}function lz(e,t){var n,i,r;
1return L(function(a){if(1==a.h){n=rc,(i=rs([t],e.g.streaming.retryParameters)).method="GET";var o=e.M;try{o.g.enabled&&la(o,i,{ot:"c",su:!0})}catch(e){J("CMCD_TEXT_ERROR","Could not generate text CMCD data.",e)}return a.g(e.K.request(n,i).promise,2)}return r=a.i,a.return(r.data)})}function lX(e,t,n,i){var r=n$(n);if(r)return n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=eD(t),function(e,t){function n(e){for(var n=e,i=S(t),r=i.next();!r.done;r=i.next())(r=r.value).end&&r.start<e&&(n+=r.end-r.start);return((e=Math.floor(n/3600))<10?"0":"")+e+":"+((i=Math.floor(n/60%60))<10?"0":"")+i+":"+((r=Math.floor(n%60))<10?"0":"")+r+"."+((n=Math.floor(1e3*n%1e3))<100?n<10?"00":"0":"")+n}var i=u1(e);e="WEBVTT\n\n",i=S(i);for(var r=i.next();!r.done;r=i.next())e+=n((r=r.value).startTime)+" --> "+n(r.endTime)+function(e){var t=[];switch(e.textAlign){case"left":t.push("align:left");break;case"right":t.push("align:right");break;case nh:t.push("align:middle");break;case"start":t.push("align:start");break;case"end":t.push("align:end")}switch(e.writingMode){case"vertical-lr":t.push("vertical:lr");break;case"vertical-rl":t.push("vertical:rl")}return t.length?" "+t.join(" "):""}(r)+"\n",e+=r.payload+"\n\n";return e}(t=n.parseMedia(t,e,null,[]),i);throw new eN(2,2,2014,n)}function lY(e){var t=uA();return t.streaming.failureCallback=function(t){if(e.U()){var n=null;1001==t.code||1002==t.code?(n=1,e.g.streaming.lowLatencyMode&&(n=.1)):1003==t.code&&(n=.1),null!=n&&(t.severity=1,e.jh(n))}},t.textDisplayFactory=function(){var t=er();return e.ue&&(document.fullscreenEnabled||"WEBKIT"!==t.Ea())?new u7(e.h,e.ue):"track"in document.createElement("track")?new u5(e):new u9},t}function lJ(e){var t=e.Ng();if(e.B&&e.P&&e.F){if(0==e.g.streaming.rebufferingGoal){var n=e.J;n.j=!1,sk(n)}else(n=e.J).j=t,sk(n);if(e.M&&(n=e.M,t||n.u||(n.u=!0),n.u&&t&&(n.C=!0),n.F=t),lZ(e),n=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts,e.g.streaming.liveSync.dynamicTargetLatency.enabled&&t&&e.Be<n){n=e.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.V&&(e.V=Math.min(e.V+ ++e.Be*r,n-i))}}t=new Map().set("buffering",t),e.dispatchEvent(lT("buffering",t))}function lQ(e){var t=e.h.playbackRate;0==t?0!==(t=e.ib())&&1!==t&&(t=lT("ratechange"),e.dispatchEvent(t)):(e.J&&(e.J.set(t),e.m==dy&&e.u.playbackRateChanged(t),l$(e,t)),t=lT("ratechange"),e.dispatchEvent(t))}function l$(e,t){e.$b.Ua(),e.$b.G(e.h,"timeupdate",function(){var n=e.h.currentTime,i=e.Ma(),r=e.U(),a=r?e.g.streaming.safeSeekOffset:0;t>0?r&&t>1&&Math.floor(n)>=Math.floor(i.end)&&e.Ld():Math.floor(n)<=Math.floor(i.start+a)&&e.Ld()})}function lZ(e){if(e.B&&e.P){var t=e.B.g,n="playing";e.P.g==r7?n="buffering":e.Xd()?n="ended":e.h.paused&&(n="paused");var i=n;if(null==t.g)t.g={timestamp:Date.now()/1e3,state:i,duration:0},t=!0;else{var r=Date.now()/1e3;t.g.duration=r-t.g.timestamp,t.g.state==i?t=!1:(t.h.push(t.g),t.g={timestamp:r,state:i,duration:0},t=!0)}t&&(n=new Map().set("newstate",n),e.dispatchEvent(lT("statechanged",n)))}}function l0(e){var t=e.h.playbackRate,n=e.U();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var i=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,r=e.ai();r<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=i&&e.ke(i,!1):1==r&&t!==e.J.jd()&&e.Ld()}if(n&&Number.isFinite((n=e.Ma()).end)&&!(e.h.currentTime<n.start||e.h.paused)){i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.enabled;var a=e.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled)var o=e.g.streaming.liveSync.targetLatency,s=o+i,u=Math.max(0,o-i),l=e.g.streaming.liveSync.maxPlaybackRate,d=e.g.streaming.liveSync.minPlaybackRate;else e.i&&e.i.serviceDescription&&(o=e.i.serviceDescription.targetLatency,null!=e.i.serviceDescription.targetLatency?s=e.i.serviceDescription.targetLatency+i:null!=e.i.serviceDescription.maxLatency&&(s=e.i.serviceDescription.maxLatency),null!=e.i.serviceDescription.targetLatency?u=Math.max(0,e.i.serviceDescription.targetLatency-i):null!=e.i.serviceDescription.minLatency&&(u=e.i.serviceDescription.minLatency),l=e.i.serviceDescription.maxPlaybackRate||e.g.streaming.liveSync.maxPlaybackRate,d=e.i.serviceDescription.minPlaybackRate||e.g.streaming.liveSync.minPlaybackRate);e.V||"number"!=typeof o||(e.V=o);var c=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;r&&e.Yb&&null!==e.V&&"number"==typeof o&&e.Be<c&&Date.now()-e.Yb>1e3*a&&(a=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.V=Math.max(e.V-(o-a)/2,a+i),e.Yb=Date.now()),r&&null!==e.V&&(s=e.V+i,u=e.V-i),o=n.end-e.h.currentTime,i=0,e.m==db&&(r=e.h.buffered).length>0&&(i=Math.max(l,(i=r.end(r.length-1))-n.end)),n=e.g.streaming.liveSync.panicMode,r=1e3*e.g.streaming.liveSync.panicThreshold,a=Date.now()-e.P.i,n&&!d&&(d=e.g.streaming.liveSync.minPlaybackRate),n&&d&&a<=r?t!=d&&e.ke(d,!1):void 0!=s&&l&&o-i>s?(t!=l&&e.ke(l,!1),e.Yb=null):void 0!=u&&d&&o-i<u?(t!=d&&e.ke(d,!1),e.Yb=null):t!==e.J.jd()&&(e.Ld(),e.Yb=Date.now())}}function l1(e,t,n){return(!!or(t,n,.01)||n>t)&&e.Xf<t&&(e.Xf=t,!0)}function l2(e){if(e.h){var t=e.Ma();if(!isNaN(t=(t=t.end-t.start)>0?e.h.currentTime/t:0)){if(l1(e,0,t*=100))var n=lT("started");else l1(e,25,t)?n=lT("firstquartile"):l1(e,50,t)?n=lT("midpoint"):l1(e,75,t)?n=lT("thirdquartile"):((l1(e,100,t)||t>100)&&(n=lT("complete")),e.g&&e.g.playRangeEnd!=1/0&&e.Xd()&&e.h.pause());n&&e.dispatchEvent(n)}}}function l3(e){try{ao(e.re,e.i)}catch(t){return du(e,t),!1}var t=ik(e.i.variants);
1return t=e.N.create(t),e.u.setVariants(Array.from(t.values())),!0}function l4(e,t,n,i,r){var a;t=void 0===t||t,n=void 0===n?0:n,i=void 0!==i&&i,r=void 0===r||r,(a=l3(e)?e.u.chooseVariant():null)&&l5(e,a,r,t,n,i)}function l5(e,t,n,i,r,a){a=void 0!==a&&a;var o=e.j.o;if(t==o)i&&s0(e.j,t,i,r,!0);else{var s=e.B.h;if(s.h!=t&&(s.h=t,s.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),s0(e.j,t,i,r,a,n),i=null,o&&(i=i_(o)),(o=i_(t)).active=!0,e.T&&(r=e.T,t=t.video)){switch(t.dependencyStream&&(t=t.dependencyStream),a=0,s=-1,t.mimeType){case"video/webm":a=1;break;case"video/mp4":a=2}switch(e.ci()){case"DASH":s=1;break;case"HLS":s=0}r.g&&(r.g.setLevelSwitching(t.id,!0),r.g.setContainerFormat(a),r.j||r.g.setStreamingFormat(s))}n?dp(e,n=lT("adaptation",n=new Map().set("oldTrack",i).set("newTrack",o))):l7(e,i,o),de(e,i,o)}}function l6(e,t){var n=Array.from(e.h.audioTracks).find(function(e){return e.enabled});if(t.enabled=!0,n){t.id!==n.id&&(n.enabled=!1);var i=l8(e);l7(e,n=iA(n,i),t=iA(t,i)),de(e,n,t)}}function l8(e){return e.h&&e.h.videoTracks?Array.from(e.h.videoTracks).find(function(e){return e.selected}):null}function l9(e){dp(e,lT("trackschanged")),dt(e)}function l7(e,t,n){dp(e,t=lT("variantchanged",t=new Map().set("oldTrack",t).set("newTrack",n)))}function de(e,t,n){var i=!1;t&&t.audioId==n.audioId&&t.audioGroupId==n.audioGroupId||(i=!0),i&&dt(e)}function dt(e){dp(e,lT("audiotrackschanged"))}function dn(e){dp(e,lT("textchanged"))}function di(e){dp(e,lT("texttrackvisibility"))}function dr(e){e.g.abr.enabled||ds(e),dp(e,lT("abrstatuschanged",new Map().set("newStatus",e.g.abr.enabled)))}function da(e){var t=e.Cc().find(function(e){return e.active});t&&e.o&&e.o.setTextLanguage&&e.o.setTextLanguage(t.language)}function ds(e,t){if(t=void 0===t||t,e.m==dy){e.ve.stop();for(var n=S(e.i.variants),i=n.next();!i.done;i=n.next())i.value.disabledUntilTime=0;t&&l3(e)}}function du(e,t){var n,i,r,a;return L(function(o){switch(o.h){case 1:if(e.m==dm)return o.return();if(1===t.severity&&e.B.M++,n=!0,!(e.Ra&&e.i&&e.j)||3016!=t.code&&3014!=t.code&&3015!=t.code&&3024!=t.code&&3018!=t.code){o.A(2);break}if("WEBKIT"===er().Ea()&&3016==t.code)return o.return();return o.m(3),o.g(ud(e.j),5);case 5:n=!(i=o.i),i&&(r=lT("mediasourcerecovered"),e.dispatchEvent(r)),o.o(2);break;case 3:o.l(),n=!0;case 2:if(!n)return o.return();2===t.severity&&ds(e,!1),a=lT("error",new Map().set("detail",t)),e.dispatchEvent(a),a.defaultPrevented&&(t.handled=!0),o.j()}})}function dl(e,t,n,i){i=void 0===i?e:i,e=new Map().set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,timescale:n.timescale,eventElement:n.eventElement,eventNode:n.eventNode}),i.dispatchEvent(lT(t,e))}function dd(e,t,n,i){i=void 0!==i&&i,t=new Map().set("mediaQuality",{bandwidth:t.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate,height:t.height,mimeType:t.mimeType,channelsCount:t.channelsCount,pixelAspectRatio:t.pixelAspectRatio,width:t.width,label:t.label,roles:t.roles,language:t.language}).set("position",n),e.dispatchEvent(lT(i?"audiotrackchanged":"mediaqualitychanged",t))}function dc(e,t){if(t=void 0===t||t,!e.h.error)return t?new eN(2,3,3016):null;var n=e.h.error.code;return t||1!=n?((t=e.h.error.msExtendedCode)&&(t<0&&(t+=0x100000000),t=t.toString(16)),new eN(2,3,3016,n,t,e.h.error.message)):null}function dh(e,t,n){t>0&&(e.U()||e.Ui(t)),n<(t=e.getDuration())&&(e.U()||e.ub(n))}function dp(e,t){L(function(n){if(1==n.h)return n.g(Promise.resolve(),2);e.m!=dm&&e.dispatchEvent(t),n.j()})}function df(e){var t=new Set;e=S(e);for(var n=e.next();!n.done;n=e.next())(n=n.value).language?t.add(ir(n.language)):t.add("und");return t}function dg(e){for(var t=new Map,n=new Map,i=0;i<e.length;i++){var r=e[i],a="und",o=[];r.language&&(a=ir(r.language)),(o="variant"==r.type?r.audioRoles:r.roles)&&o.length||(o=[""]),t.has(a)||t.set(a,new Set),o=S(o);for(var s=o.next();!s.done;s=o.next())s=s.value,t.get(a).add(s),r.label&&(n.has(a)||n.set(a,new Map),n.get(a).set(s,r.label))}var u=[];return t.forEach(function(e,t){e=S(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;var r=null;n.has(t)&&n.get(t).has(i)&&(r=n.get(t).get(i)),u.push({language:t,role:i,label:r})}}),u}ly.prototype.release=function(){this.h.length>0?this.h.shift()():this.g=null},w(l_,rt),(p=l_.prototype).destroy=function(){var e,t=this;return L(function(n){switch(n.h){case 1:if(t.m==dm)return n.return();return lw(t),e=t.detach(),t.m=dm,n.g(e,2);case 2:return n.g(t.og(),3);case 3:if(t.ze&&(t.ze.release(),t.ze=null),t.pe&&(t.pe.release(),t.pe=null),t.l&&(t.l.release(),t.l=null),t.$b&&(t.$b.release(),t.$b=null),t.Cd&&(t.Cd.release(),t.Cd=null),t.cb=null,t.g=null,t.B=null,t.ue=null,t.M=null,t.ua=null,!t.K){n.A(4);break}return n.g(t.K.destroy(),5);case 5:t.K=null;case 4:t.u&&(t.u.release(),t.u=null),t.Aa&&(t.Aa.destroy(),t.Aa=null),rt.prototype.release.call(t),n.j()}})},p.Pb=function(e,t){t=void 0===t||t;var n,i,r,a=this;return L(function(o){switch(o.h){case 1:if(a.m==dm)throw new eN(2,7,7e3);if(n=a.h&&a.h==e,!a.h||a.h==e){o.A(2);break}return o.g(a.detach(),2);case 2:return o.g(lA(a,"attach"),4);case 4:if(o.i)return o.return();if(o.m(5,6),n||(lx(a,"attach"),i=function(){var e=dc(a,!1);e&&du(a,e)},a.pe.G(e,"error",i),a.h=e,a.M&&a.M.setMediaElement(e)),er(),!t||!p7()||a.H){o.A(6);break}return o.g(lP(a),6);case 6:o.u(),a.ka.release(),o.B(0);break;case 5:return r=o.l(),o.g(a.detach(),10);case 10:throw r}})},p.mj=function(e){this.Mh=e},p.detach=function(e){e=void 0!==e&&e;var t=this;return L(function(n){if(1==n.h){if(t.m==dm)throw new eN(2,7,7e3);return n.g(t.vc(!1,e),2)}if(3!=n.h)return n.g(lA(t,"detach"),3);if(n.i)return n.return();try{t.h&&(t.pe.Ua(),t.h=null),lx(t,"detach"),t.C&&!e&&t.C.release()}finally{t.ka.release()}n.j()})},p.vc=function(t,n){t=void 0===t||t,n=void 0!==n&&n;var i,r,a,o,s,u,l,d,c,h,p,f,g,m,v,y=this;return L(function(b){switch(b.h){case 1:return y.m!=dm&&(y.m=dv),b.g(lA(y,"unload"),2);case 2:if(b.i)return b.return();return b.D(3),y.Ra=!1,lx(y,"unload"),lw(y),i=y.qe.map(function(e){return e()}),y.qe=[],b.g(Promise.all(i),5);case 5:if(y.dispatchEvent(lT("unloading")),y.oe&&(y.oe.release(),y.oe=null),y.za&&(y.za.release(),y.za=null),y.eb&&(y.eb.release(),y.eb=null),y.h&&(y.l.Ua(),y.$b.Ua()),y.ve.stop(),y.Xb&&(y.Xb.release(),y.Xb=null),y.Ja&&(y.Ja.stop(),y.Ja=null),!y.I){b.A(6);break}return b.g(y.I.stop(),7);case 7:y.I=null,y.xd=null;case 6:if(!y.u){b.A(8);break}return b.g(y.u.stop(),8);case 8:if(!y.j){b.A(10);break}return b.g(y.j.destroy(),11);case 11:y.j=null;case 10:if(y.J&&(y.J.release(),y.J=null),y.F&&(y.F.release(),y.F=null),"webkit"!==e.shakaMediaKeysPolyfill||!y.D){b.A(12);break}return b.g(y.D.destroy(),13);case 13:y.D=null;case 12:if(!y.H){b.A(14);break}return b.g(y.H.destroy(),15);case 15:y.H=null;case 14:var w;if(y.C&&!n&&y.C.onAssetUnload(),y.na&&!n&&(y.na.destroy(),y.na=null),n||y.$f.stop(),y.M&&((w=y.M).u=!1,w.F=!0,w.C=!1,w.l=!1,w.m=0,w.o=0,w.B=0,w.H=!1,w.j=null,w.D.Ua()),y.ua&&(y.ua.g=null),!y.o){b.A(16);break}return b.g(y.o.destroy(),17);case 17:y.o=null;case 16:if(y.ia=!1,y.h){for(a=(r=S(y.Yf)).next();!a.done;a=r.next())(o=a.value).src.startsWith("blob:")&&URL.revokeObjectURL(o.src),o.remove();y.Yf=[],a3(y.h)&&y.h.load()}if(!y.D){b.A(18);break}return b.g(y.D.destroy(),19);case 19:y.D=null;case 18:if(y.Za&&y.Y!=y.Za.hd()&&(y.Za.u||y.Za.destroy(),y.Za=null),y.Y=null,y.Fa=null,y.P=null,y.i){for(u=(s=S(y.i.variants)
1).next();!u.done;u=s.next())for(c=(d=S([(l=u.value).audio,l.video])).next();!c.done;c=d.next())(h=c.value)&&h.segmentIndex&&h.segmentIndex.release();for(f=(p=S(y.i.textStreams)).next();!f.done;f=p.next())(g=f.value).segmentIndex&&g.segmentIndex.release()}for(y.g&&y.g.streaming.clearDecodingCache&&(iL.clear(),iQ.clear()),y.i=null,y.B=new uL,y.Lh=null,y.Yb=null,y.V=null,y.Be=-1,y.ye=[],v=(m=S(y.sc.values())).next();!v.done;v=m.next())v.value.stop();y.sc.clear(),y.Vb=[],y.Xf=-1,y.K&&y.K.Sh(),lJ(y);case 3:b.u(),y.ka.release(),b.B(4);break;case 4:if(er(),t&&p7()&&!y.H&&y.h)return b.g(lP(y),0);b.A(0)}})},p.ol=function(e){this.O=e},p.load=function(t,n,i){n=void 0===n?null:n;var r,a,o,s,u,l,d,c,h,p,f,g,m,v,y,b=this;return L(function(w){switch(w.h){case 1:if(b.m==dm)throw new eN(2,7,7e3);if(b.h||!b.ma){w.A(2);break}return w.g(b.Pb(b.ma,!0),3);case 3:b.ma=null;case 2:if(r=null,a="",i=null==(o=i)?void 0:o.toLowerCase(),t instanceof uN){if(t.u)throw new eN(2,7,7006);a=(r=t).hd()||""}else a=t||"";return w.g(lb(b.ka,"load"),4);case 4:if(b.ka.release(),!b.h)throw new eN(2,7,7002);if(!b.Y){w.A(5);break}return b.Y=a,w.g(b.vc(!1),5);case 5:if(s=++b.Ae,u=function(){return L(function(e){if(1==e.h)return b.Ae==s?e.A(0):r?e.g(r.destroy(),3):e.A(3);throw new eN(2,7,7e3)})},l=function(e,t){return L(function(n){switch(n.h){case 1:return n.D(2),n.g(lb(b.ka,t),4);case 4:return n.g(u(),5);case 5:return n.g(e(),6);case 6:return n.g(u(),7);case 7:r&&b.g&&(r.g=b.g);case 2:n.u(),b.ka.release(),n.B(0)}})},w.m(7,8),null==n&&r&&(n=r.getStartTime()),b.O=n,b.Ra=!1,b.dispatchEvent(lT("loading")),r){i=r.Y,w.A(10);break}if(i){w.A(10);break}return w.g(l(function(){return L(function(e){if(1==e.h)return e.g(lC(b,a),2);i=e.i,e.j()})},"guessMimeType_"),10);case 10:if(d=!!r,r){uU(r,b),b.B=r.getStats(),w.A(13);break}return w.g(lk(b,a,n,i,!0,b.g),14);case 14:(r=w.i)?(r.D=!1,uU(r,b),b.B=r.getStats(),r.start(),r.B.catch(function(){})):b.B=new uL;case 13:if(c=!r,h=Date.now()/1e3,b.B=r?r.getStats():new uL,b.Y=a,b.Fa=i||null,lJ(b),p=function(){var e=b.h?b.h.buffered:null;return{start:aJ(e)||0,end:aQ(e)||0}},b.za=new sR(p),b.za.addEventListener("regionadd",function(e){lL(b,e.region,"metadataadded")}),c)return w.g(l(function(){return L(function(e){var t,n,r,a;return e.g((t=i,L(function(e){return 1==e.h?(n=Date.now()/1e3,r=!0,b.D=b.cd({nc:b.K,onError:function(e){du(b,e)},uf:function(){},onExpirationUpdated:function(){var e=lT("expirationupdated");b.dispatchEvent(e)},onEvent:function(e){if(b.dispatchEvent(e),"drmsessionupdate"==e.type&&r){r=!1,e=b.B;var t=Date.now()/1e3-n;t>=0&&(e.m=t)}}}),b.D.configure(b.g.drm),a=iR([t]),b.D.O=!0,e.g(rN(b.D,[a],[]),2)):e.g(b.D.Pb(b.h),0)})),0)})},"initializeSrcEqualsDrmInner_"),25);return b.eb=new sR(p),w.g(l(function(){return L(function(e){if(1==e.h)return e.g(Promise.race([r.ua,r.B]),2);b.xd=r.I;var t=r;t.ya=!0,b.I=t.l,b.i=r.Gg(),e.j()})},"waitForFinish"),17);case 17:if(b.H){w.A(18);break}return w.g(l(function(){return L(function(e){return e.g(lP(b),0)})},"initializeMediaSourceEngineInner_"),18);case 18:return b.i&&b.i.textStreams.length&&(b.o.enableTextDisplayer?b.o.enableTextDisplayer():el("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),w.g(l(function(){return L(function(e){return e.g(r.B,0)})},"waitForFinish"),20);case 20:if(b.g=r.getConfiguration(),b.re=r.H,b.I&&b.I.setMediaElement&&b.h&&b.I.setMediaElement(b.h),(T=r).za=!0,b.oe=T.J,b.me=r.Ra,(f=r.C)&&(b.N=f),d&&b.h&&"AUDIO"===b.h.nodeName&&(function(e){for(var t=S(e.i.variants),n=t.next();!n.done;n=t.next())(n=n.value).video&&(n.video.closeSegmentIndex(),n.video=null),n.bandwidth=n.audio&&n.audio.bandwidth?n.audio.bandwidth:0;e.i.variants=e.i.variants.filter(function(e){return e.audio})}(b),b.configure("manifest.disableVideo",!0)),r.i){w.A(21);break}return w.g(l(function(){return L(function(e){return e.g(uV(r,b.h),0)})},"drmEngine_.init"),21);case 21:return(x=r).na=!0,b.D=x.i,w.g(l(function(){return L(function(e){return e.g(b.D.Pb(b.h),0)})},"drmEngine_.attach"),23);case 23:return(g=r.F)&&(!b.cb||b.cb!=g)&&((A=r).ka=!0,b.u=A.j,b.cb=r.F,"function"!=typeof b.u.setMediaElement&&(el("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),b.u.setMediaElement=function(){}),"function"!=typeof b.u.setCmsdManager&&(el("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),b.u.setCmsdManager=function(){}),"function"!=typeof b.u.trySuggestStreams&&(el("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),b.u.trySuggestStreams=function(){})),(E=r).Aa=!0,m=E.N,v=r.o,w.g(l(function(){return L(function(t){var n,i,r,a,o,s,u,l,d,c,p,f,g,y,w,T,x,A,E,k,I,C,M,P,D,R,O,N;
1return t.g((n=h,L(function(t){var h,j,U,B,F,V,H,q,G,K,W,z,X;switch(t.h){case 1:for(lx(b,"load"),i=b.h,lD(b,i),lR(b,i,n),("onchange"in e.screen)&&b.l.G(e.screen,"change",function(){if(b.N.getConfiguration){var e=b.N.getConfiguration();"AUTO"==e.Dc?l3(b):"AUTO"==b.g.preferredVideoHdrLevel&&b.g.abr.enabled&&(e.Dc="AUTO",b.N.configure(e),l3(b))}}),r=!1,o=(a=S(b.i.variants)).next();!o.done;o=a.next())(u=(s=o.value).video&&s.video.dependencyStream)&&(r=tn(u));h=b.g,(j=r)||h.lcevc.enabled?(lw(b),null!=b.T||(b.T=new e7(b.h,b.Mh,h.lcevc,j),b.H&&(b.H.H=b.T))):lw(b),b.Ed=b.g.preferredTextLanguage,b.Hd=b.g.preferredTextRole,b.Gd=b.g.preferForcedSubs,dh(b.i.presentationTimeline,b.g.playRangeStart,b.g.playRangeEnd),b.u.init(function(e,t,n){b.i&&b.j&&e!=b.j.o&&l5(b,e,!0,void 0!==t&&t,void 0===n?0:n)}),b.u.setMediaElement(i),b.u.setCmsdManager(b.ua),b.j=new s$(b.i,{jc:function(){return b.F?b.F.Id():0},getBandwidthEstimate:function(){return b.u.getBandwidthEstimate()},ib:function(){return b.ib()},video:b.h,X:b.H,nc:b.K,onError:function(e){return du(b,e)},onEvent:function(e){return b.dispatchEvent(e)},vf:function(e,t,n){var i=e.startTime;if(e=e.endTime,(t=t.type)!=e5){if(b.F){b.F.zi();var r=oN(b.H,t);!b.U()&&b.h.paused&&!b.h.seeking&&null!=r&&r>0&&b.F.Id()<r&&!or(b.F.Id(),r,.001)&&b.F.Wf(r)}lB(b)}n=new Map().set("start",i).set("end",e).set("contentType",t).set("isMuxed",n),b.dispatchEvent(lT("segmentappended",n))},Dk:function(e,t){var n,i,r,a,o,s;(t=t.pd)&&b.me&&(n=b.me,i=t,r=n,a=i.contentType,(o=r.g.get(a))||(o={ee:[],mg:null,contentType:a},r.g.set(a,o)),function(e,t){if((e=e.h()[t.contentType])&&e.length>0){var n=e[0].start,i=e[e.length-1].end,r=t.ee;t.ee=r.filter(function(e,t){return(!(e.position<=n)||!(t+1<r.length)||!(r[t+1].position<=n))&&!(e.position>=i)})}else t.ee=[]}(n,s=o),n={pd:i,position:e},(i=(s=s.ee).findIndex(function(t){return t.position>=e}))>=0?s.splice(i,+(s[i].position==e),n):s.push(n))},Qh:function(e,t){var n=b.D;if(n.h.parseInbandPsshEnabled&&!n.H&&["audio","video"].includes(e)){e=new rR(eD(t)),t=0;for(var i=S(e.data),r=i.next();!r.done;r=i.next())t+=r.value.length;if(0==t)n=Promise.resolve();else{for(t=new Uint8Array(t),i=0,r=(e=S(e.data)).next();!r.done;r=e.next())r=r.value,t.set(r,i),i+=r.length;rF(n,"cenc",t),n=n.m}}else n=Promise.resolve();return n},disableStream:function(e,t){return b.disableStream(e,t)}}),b.j.configure(b.g.streaming),b.m=dy,b.dispatchEvent(lT("streaming")),l=v;case 2:for((c=b.j.o)||(p=l3(b)?b.u.chooseVariant():null,v||(l=p)),f=[],y=(g=S([(d=c||l).video,d.audio])).next();!y.done;y=g.next())(w=y.value)&&!w.segmentIndex&&(f.push(w.createSegmentIndex()),w.dependencyStream&&f.push(w.dependencyStream.createSegmentIndex()));if(!(f.length>0)){t.A(4);break}return t.g(Promise.all(f),4);case 4:if(!d||0!=d.disabledUntilTime){t.A(2);break}if(l3(b),b.I&&b.I.onInitialVariantChosen&&b.I.onInitialVariantChosen(d),b.i.isLowLatency&&(b.g.streaming.lowLatencyMode?b.configure(b.Zf):Y("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.")),b.M&&((U=b.M).l=b.i.isLowLatency&&b.g.streaming.lowLatencyMode,U.l?"d"==U.i?U.i="ld":"h"==U.i&&(U.i="lh"):"ld"==U.i?U.i="d":"lh"==U.i&&(U.i="h"),function(e,t){if(e.g&&e.g.enabled&&e.g.version==lc&&e.j&&e.j.autoplay){var n=e.j.play();n&&n.then(function(){e.B=t}).catch(function(){e.B=0})}}(b.M,1e3*n)),dh(b.i.presentationTimeline,b.g.playRangeStart,b.g.playRangeEnd),B=b.j,F=b.g.playRangeStart,V=b.g.playRangeEnd,B.j.presentationTimeline.U()||(B.Y=F,B.V=V),b.Ra=!0,b.dispatchEvent(lT("canupdatestarttime")),T=function(e){var t,n,r,a;b.F=new sv(b.h,b.i,b.g.streaming,e,function(){b.Xb&&sC(b.Xb,!b.F.Jh()),b.j&&b.j.Tc(),b.P&&lB(b,"seeking")},function(e){return b.dispatchEvent(e)}),t=e,n=b.U()||"number"==typeof t&&t>0,(t=new uK(b.oe,n)).addEventListener("enter",function(e){dl(b,"timelineregionenter",e.region)}),t.addEventListener("exit",function(e){dl(b,"timelineregionexit",e.region)}),t.addEventListener("skip",function(e){var t=e.region;
1e.seeking||(dl(b,"timelineregionenter",t),dl(b,"timelineregionexit",t))}),(r=new uK(b.za,n)).addEventListener("enter",function(e){lL(b,e.region,"metadata")}),(n=new uK(b.eb,n)).addEventListener("enter",function(e){e=new Map().set("detail",e.region.emsg),b.dispatchEvent(lT("emsg",e))}),(a=new sI(b.h)).g.add(t),a.g.add(r),a.g.add(n),b.me&&a.g.add(b.me),b.Xb=a,lj(b,i,!1)},b.g.streaming.startAtSegmentBoundary||(null==(x=b.O)&&b.i.startTime&&(x=b.i.startTime),T(x)),c){t.A(7);break}if(!b.g.streaming.startAtSegmentBoundary){t.A(8);break}return A=b.i.presentationTimeline,b.O instanceof Date&&(k=A.m||A.i,E=b.O.getTime()/1e3-k),null!=E||(E="number"==typeof b.O?b.O:b.U()?1/0:b.h.currentTime),null==b.O&&b.i.startTime&&(E=b.i.startTime),I=A.Sb(),C=A.Cb(),E<I?E=I:E>C&&(E=C),t.g((H=l,q=E,L(function(e){return 1==e.h?(G=H.audio,K=H.video,W=function(e,t){var n,i,r;return L(function(a){return 1==a.h?e?e.segmentIndex?a.A(2):a.g(e.createSegmentIndex(),2):a.return(null):(i=(n=e.segmentIndex.Rb(t))?n.next().value:null)?(r=i.startTime,a.return(r)):a.return(null)})},e.g(W(G,q),2)):3!=e.h?(z=e.i,e.g(W(K,q),3)):null!=(X=e.i)&&null!=z?e.return(Math.max(X,z)):null!=X?e.return(X):null!=z?e.return(z):e.return(q)})),9);case 9:M=t.i,T(M);case 8:l5(b,l,!0,!1,0);case 7:return b.F.ready(),b.Cc().find(function(e){return e.active})||((P=iI(b.i.textStreams,b.Ed,b.Hd,b.Gd)[0]||null)&&uR(b.B.h,P,!0),l&&(P?(iD(l.audio,P,b.g)&&(b.ia=!0),b.ia&&b.o.setTextVisibility(!0)):(b.ia=!1,b.o.setTextVisibility(!1)),di(b)),P&&(b.g.streaming.alwaysStreamText||b.Qg())&&
1(s1(b.j,P),da(b))),t.g(b.j.start(m),10);case 10:b.g.abr.enabled&&(b.u.enable(),dr(b)),l9(b),b.i.variants.some(function(e){return e.primary}),((D=b.U())&&(b.g.streaming.liveSync&&b.g.streaming.liveSync.enabled||b.i.serviceDescription||b.g.streaming.liveSync.panicMode)||b.g.streaming.vodDynamicPlaybackRate)&&(R=function(){return l0(b)},b.l.G(i,"timeupdate",R)),D||(O=function(){return l2(b)},b.l.G(i,"timeupdate",O),l2(b),b.i.nextUrl&&(b.g.streaming.preloadNextUrlWindow>0&&(N=function(){var e;return L(function(t){if(1==t.h)return isNaN(e=b.Ma().end-b.h.currentTime)||!(e<=b.g.streaming.preloadNextUrlWindow)?t.A(0):(b.l.Na(i,"timeupdate",N),t.g(b.preload(b.i.nextUrl),4));b.Za=t.i,t.j()})},b.l.G(i,"timeupdate",N)),b.l.G(i,"ended",function(){b.load(b.Za||b.i.nextUrl)}))),b.C&&b.C.onManifestUpdated(D),t.j()}})),0)})},"loadInner_"),24);case 24:var T,x,A,E,k=r;if(k.K)for(var I=S(k.K),C=I.next();!C.done;C=I.next())(C=C.value)();k.K=null,b.Fa&&er().cj()&&nz(b.Fa)&&function(t,n,i){if(t.g&&e.ManagedMediaSource&&t.i&&t.B.useSourceElements){var r;(null==(r=t.K)?void 0:r.parentElement)===t.g&&t.g.removeChild(t.K),t.K=a2(n,i),t.g.appendChild(t.K),t.g.disableRemotePlayback=!1}}(b.H,b.Y,b.Fa),w.A(16);break;case 25:return w.g(l(function(){return L(function(e){var t,n,r,a,o,s,u,l,d,c,p,f,g,m;return e.g((t=h,n=i,L(function(e){switch(e.h){case 1:var i,h;if(lx(b,"src-equals"),r=b.h,b.F=new sf(r),a=!1,b.qe.push(function(){a=!0}),b.dispatchEvent(lT("canupdatestarttime")),null!=b.O&&b.F.Wf(b.O),i=b.O||0,(i=new uK(b.za,i instanceof Date||i>0)).addEventListener("enter",function(e){lL(b,e.region,"metadata")}),(h=new sI(b.h)).g.add(i),b.Xb=h,lD(b,r),lj(b,r,!0),r.textTracks&&(lM(b),o=function(e){if(!(b.o instanceof u5)){var t=lK(b).find(function(e){return"disabled"!==e.mode});t&&(t.mode=e?"showing":"hidden"),b.o instanceof u6&&(t=Array.from(b.h.textTracks).find(function(e){return"Shaka Player TextTrack"==e.label}))&&(t.mode=!e&&b.o.isTextVisible()?"showing":"hidden")}},b.l.G(r,"enterpictureinpicture",function(){return o(!0)}),b.l.G(r,"leavepictureinpicture",function(){return o(!1)}),r.remote?(b.l.G(r.remote,"connect",function(){return o(!1)}),b.l.G(r.remote,"connecting",function(){return o(!1)}),b.l.G(r.remote,"disconnect",function(){return o(!1)})):"webkitCurrentPlaybackTargetIsWireless"in r&&b.l.G(r,"webkitcurrentplaybacktargetiswirelesschanged",function(){return o(!1)}),(s=r).webkitSupportsFullscreen&&b.l.G(s,"webkitpresentationmodechanged",function(){return o("inline"!==s.webkitPresentationMode)})),lR(b,r,t),!(u=function(e,t,n){try{if(!e.g.enabled)return t;var i=lr(e);e:{switch(n.toLowerCase()){case"audio/mp4":case"audio/webm":case"audio/ogg":case"audio/mpeg":case"audio/aac":case"audio/flac":case"audio/wav":var r="a";break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":r=ld;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"audio/x-mpegurl":case"application/dash+xml":case"video/vnd.mpeg.dash.mpd":case"application/vnd.ms-sstr+xml":r="m";break e}r=void 0}return i.ot=r,i.su=!0,lu(t,ls(i))}catch(e){return J("CMCD_SRC_ERROR","Could not generate src CMCD data.",e),t}}(b.M,b.Y,n)).includes("#t=")&&(b.g.playRangeStart>0||isFinite(b.g.playRangeEnd))&&(u+="#t=",b.g.playRangeStart>0&&(u+=b.g.playRangeStart),isFinite(b.g.playRangeEnd)&&(u+=","+b.g.playRangeEnd)),!b.H){e.A(2);break}return e.g(b.H.destroy(),3);case 3:b.H=null;case 2:return a3(r),r.src=u,"TV"==(l=er()).Ta()&&r.load(),"none"!=r.preload&&!r.autoplay&&nz(n)&&"WEBKIT"===l.Ea()&&r.load(),b.m=db,b.dispatchEvent(lT("streaming")),d=function(){return new Promise(function(e){var t=new n4(e);b.l.G(r.textTracks,"change",function(){return t.ea(.5)}),t.ea(.5)})},c=new i1,sa(r,HTMLMediaElement.HAVE_METADATA,b.l,function(){return L(function(e){if(1==e.h)return b.F.ready(),b.Fa&&nz(b.Fa)?e.g(d(),3):(c.resolve(),e.A(0));c.resolve(),e.j()})}),sa(r,HTMLMediaElement.HAVE_CURRENT_DATA,b.l,function(){var e,t,n,i,r;return L(function(o){var s,u;if(1==o.h)return o.g(d(),2);if(a)return o.return();if(""!=(s=b.g.preferredAudioLanguage)&&b.Ni(s,b.g.preferredVariantRole),(e=lK(b)).some(function(e){return"showing"===e.mode})&&(b.ia=!0,b.o.setTextVisibility(!0)),!(b.o instanceof u5))for(e.length&&(b.o.enableTextDisplayer?b.o.enableTextDisplayer():el("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),t=!1,i=(n=S(e)).next();!i.done;i=n.next())"disabled"!==(r=i.value).mode&&(t?(r.mode="disabled",Y("Found more than one enabled text track, disabling it",r)):(lG(b,r),t=!0));""!=(u=b.g.preferredTextLanguage)&&b.nh(u,b.g.preferredTextRole,b.g.preferForcedSubs),o.j()})}),r.error?c.reject(dc(b)):"none"==r.preload&&(Y('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),c.resolve()),b.l.Ba(r,"error",function(){c.reject(dc(b))}),e.g(n9(b.g.streaming.loadTimeout,c),4);case 4:((p=b.U())&&(b.g.streaming.liveSync&&b.g.streaming.liveSync.enabled||b.g.streaming.liveSync.panicMode)||b.g.streaming.vodDynamicPlaybackRate)&&(f=function(){return l0(b)},b.l.G(r,"timeupdate",f)),p||(g=function(){return l2(b)},b.l.G(r,"timeupdate",g),l2(b)),b.C&&(b.C.onManifestUpdated(p),p&&(m=b.Ma().end,b.l.G(r,"progress",function(){var e=b.Ma().end;m!=e&&(b.C.onManifestUpdated(b.U()),m=e)}))),b.Ra=!0,e.j()}})),0)})},"srcEqualsInner_"),16);case 16:b.dispatchEvent(lT("loaded"));case 8:if(w.u(),!r){w.A(27);break}return w.g(r.destroy(),27);case 27:b.Za=null,w.B(0);break;case 7:if(!(y=w.l())||7e3==y.code){w.A(29);break}return w.g(b.vc(!1),29);case 29:throw y}})},p.il=function(e,t,n){e=void 0===e||e,t=void 0!==t&&t,n=void 0!==n&&n;var i,r=this;return L(function(a){return 1==a.h?a.g(lE(r,n),2):3!=a.h?(i=a.i,a.g(r.vc(e,t),3)):a.return(i)})},p.Wh=function(e,t){e=void 0!==e&&e,t=void 0!==t&&t;var n,i=this;return L(function(r){return 1==r.h?r.g(lE(i,t),2):3!=r.h?(n=r.i,r.g(i.detach(e),3)):r.return(n)})},p.preload=function(e,t,n,i){t=void 0===t?null:t;var r,a,o,s=this;return L(function(u){return 1==u.h?(n=null==(r=n)?void 0:r.toLowerCase(),uk(a=lY(s),i||s.g,lY(s)),u.g(lk(s,e,t,n,!1,a),2)):((o=u.i)?o.start():du(s,new eN(2,7,7005)),u.return(o))})},p.og=function(){var e,t,n,i,r=this;return L(function(a){for(e=[],n=(t=S(r.we)).next();!n.done;n=t.next())(i=n.value).u||e.push(i.destroy());return r.we=[],a.g(Promise.all(e),0)})},p.Nk=function(){for(var e=this.ka;e.g;)e.release()},p.cd=function(e){return new rO(e)},p.configure=function(e,t){if(2==arguments.length&&"string"==typeof e&&(e=um(e,t)),e.streaming&&"forceTransmuxTS"in e.streaming&&(el("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(el("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&"useNativeHlsOnSafari"in e.streaming){el("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var n=er();e.streaming.preferNativeHls=e.streaming.useNativeHlsOnSafari&&"WEBKIT"===n.Ea(),delete e.streaming.useNativeHlsOnSafari}if(e.streaming&&"boolean"==typeof e.streaming.liveSync&&(el("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),n=e.streaming.liveSync,e.streaming.liveSync={},e.streaming.liveSync.enabled=n),e.streaming&&!(e.streaming.liveSync&&"targetLatency"in e.
1streaming.liveSync)&&("liveSyncMinLatency"in e.streaming||"liveSyncMaxLatency"in e.streaming)){n=e.streaming.liveSyncMinLatency||0;var i=Math.abs((e.streaming.liveSyncMaxLatency||1)-n)/2;e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=n+i,e.streaming.liveSync.targetLatencyTolerance=i}if(e.streaming&&"liveSyncMaxLatency"in e.streaming&&(el("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMaxLatency),e.streaming&&"liveSyncMinLatency"in e.streaming&&(el("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMinLatency),e.streaming&&"liveSyncTargetLatency"in e.streaming&&(el("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=e.streaming.liveSyncTargetLatency,delete e.streaming.liveSyncTargetLatency),e.streaming&&"liveSyncTargetLatencyTolerance"in e.streaming&&(el("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatencyTolerance=e.streaming.liveSyncTargetLatencyTolerance,delete e.streaming.liveSyncTargetLatencyTolerance),e.streaming&&"liveSyncPlaybackRate"in e.streaming&&(el("streaming.liveSyncPlaybackRate","Please Use streaming.liveSync.maxPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.maxPlaybackRate=e.streaming.liveSyncPlaybackRate,delete e.streaming.liveSyncPlaybackRate),e.streaming&&"liveSyncMinPlaybackRate"in e.streaming&&(el("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.minPlaybackRate=e.streaming.liveSyncMinPlaybackRate,delete e.streaming.liveSyncMinPlaybackRate),e.streaming&&"liveSyncPanicMode"in e.streaming&&(el("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicMode=e.streaming.liveSyncPanicMode,delete e.streaming.liveSyncPanicMode),e.streaming&&"liveSyncPanicThreshold"in e.streaming&&(el("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicThreshold=e.streaming.liveSyncPanicThreshold,delete e.streaming.liveSyncPanicThreshold),e.mediaSource&&"sourceBufferExtraFeatures"in e.mediaSource){el("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var r=e.mediaSource.sourceBufferExtraFeatures;e.mediaSource.addExtraFeaturesToSourceBuffer=function(){return r},delete e.mediaSource.sourceBufferExtraFeatures}if(e.manifest&&e.manifest.hls&&"useSafariBehaviorForLive"in e.manifest.hls&&(el("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete e.manifest.hls.useSafariBehaviorForLive),e.streaming&&"parsePrftBox"in e.streaming&&(el("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete e.streaming.parsePrftBox),e.manifest&&e.manifest.dash&&"enableAudioGroups"in e.manifest.dash&&(el("manifest.dash.enableAudioGroups configuration","It is now enabled by default and cannot be disabled."),delete e.manifest.dash.enableAudioGroups),e.streaming&&"dispatchAllEmsgBoxes"in e.streaming&&(el("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.dispatchAllEmsgBoxes=e.streaming.dispatchAllEmsgBoxes,delete e.streaming.dispatchAllEmsgBoxes),e.streaming&&"autoLowLatencyMode"in e.streaming&&(el("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),e.streaming.lowLatencyMode=e.streaming.autoLowLatencyMode,delete e.streaming.autoLowLatencyMode),e.manifest&&e.manifest.dash&&"ignoreSupplementalCodecs"in e.manifest.dash&&(el("manifest.dash.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.dash.ignoreSupplementalCodecs,delete e.manifest.dash.ignoreSupplementalCodecs),e.manifest&&e.manifest.hls&&"ignoreSupplementalCodecs"in e.manifest.hls&&(el("manifest.hls.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.hls.ignoreSupplementalCodecs,delete e.manifest.hls.ignoreSupplementalCodecs),e.manifest&&e.manifest.dash&&"updatePeriod"in e.manifest.dash&&(el("manifest.dash.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.dash.updatePeriod,delete e.manifest.dash.updatePeriod),e.manifest&&e.manifest.hls&&"updatePeriod"in e.manifest.hls&&(el("manifest.hls.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.hls.updatePeriod,delete e.manifest.hls.updatePeriod),e.manifest&&e.manifest.dash&&"ignoreDrmInfo"in e.manifest.dash&&(el("manifest.dash.ignoreDrmInfo configuration","Please Use manifest.ignoreDrmInfo instead."),e.manifest.ignoreDrmInfo=e.manifest.dash.ignoreDrmInfo,delete e.manifest.dash.ignoreDrmInfo),e.drm&&e.drm.advanced){for(var a in n=!1,e.drm.advanced){var o=e.drm.advanced[a];i=o.videoRobustness,o=o.audioRobustness,"videoRobustness"in e.drm.advanced[a]&&!Array.isArray(e.drm.advanced[a].videoRobustness)&&(e.drm.advanced[a].videoRobustness=[i],n=!0),"audioRobustness"in e.drm.advanced[a]&&!Array.isArray(e.drm.advanced[a].audioRobustness)&&(e.drm.advanced[a].audioRobustness=[o],n=!0)}n&&el("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of str
1ings, please update your usage of these properties.")}return e.streaming&&"forceHTTP"in e.streaming&&(el("streaming.forceHTTP configuration","Please Use networking.forceHTTP instead."),e.networking=e.networking||{},e.networking.forceHTTP=e.streaming.forceHTTP,delete e.streaming.forceHTTP),e.streaming&&"forceHTTPS"in e.streaming&&(el("streaming.forceHTTPS configuration","Please Use networking.forceHTTP instead."),e.networking=e.networking||{},e.networking.forceHTTPS=e.streaming.forceHTTPS,delete e.streaming.forceHTTPS),e.streaming&&"minBytesForProgressEvents"in e.streaming&&(el("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),e.networking=e.networking||{},e.networking.minBytesForProgressEvents=e.streaming.minBytesForProgressEvents,delete e.streaming.minBytesForProgressEvents),a=uk(this.g,e,lY(this)),lF(this),a},p.uj=function(e){this.Zf=e},p.getConfiguration=function(){var e=lY(this);return uk(e,this.g,lY(this)),e},p.Ej=function(){return this.Zf},p.ei=function(){return uk(lY(this),this.g,lY(this)),uv(this.g,lY(this))},p.ai=function(){if(this.h){var e=this.h.buffered.length;e=e?this.h.buffered.end(e-1):0;var t=Math.min(this.h.currentTime+this.g.streaming.bufferingGoal,this.Ma().end);if(e>=t)return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},p.Ii=function(){for(var e in this.g)delete this.g[e];uk(this.g,lY(this),lY(this)),lF(this)},p.Ue=function(){return this.m},p.ci=function(){return this.i?this.i.type:null},p.Ve=function(){return this.h},p.Jb=function(){return this.K},p.hd=function(){return this.Y},p.$h=function(){return this.C?this.C:null},p.ii=function(){return this.Aa?this.Aa:null},p.U=function(){return this.i&&!this.wa()?this.i.presentationTimeline.U():!!(this.h&&(this.h.src||this.wa()))&&this.h.duration==1/0},p.Pc=function(){return!!this.i&&this.i.presentationTimeline.Pc()},p.hk=function(){if(this.i&&!this.wa()){var e=this.i.variants;return!!e.length&&!e[0].video}return!!(this.h&&(this.h.src||this.wa()))&&(this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight)},p.qk=function(){if(this.i&&!this.wa()){var e=this.i.variants;return!!e.length&&!(e=e[0]).audio&&!!e.video&&!e.video.codecs.includes(",")}return!!(this.h&&(this.h.src||this.wa()))&&!!this.h.audioTracks&&0==this.h.audioTracks.length},p.Ma=function(){if(this.i&&!this.wa()){if(!this.Ra&&"HLS"==this.i.type)return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Sb(),end:e.Cb()}}if(this.h&&(this.h.src||this.wa())&&(e=this.h.seekable)&&e.length){var t=this.g?this.g.playRangeStart:0;t=Math.max(e.start(0),t);var n=this.g?this.g.playRangeEnd:1/0;return{start:t,end:e=Math.min(e.end(e.length-1),n)}}return{start:0,end:0}},p.ek=function(){this.U()&&(this.h.currentTime=this.Ma().end)},p.ik=function(){return this.Ra},p.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},p.drmInfo=function(){return this.D?this.D.g:null},p.Sd=function(){return this.D?this.D.Sd():1/0},p.Fg=function(){return this.D?this.D.Fg():[]},p.Se=function(){return this.D?this.D.Se():{}},p.Ng=function(){return this.P?this.P.g==r7:!!this.Y},p.ib=function(){return this.h?this.J?this.J.h:1:0},p.Hh=function(e){this.m==dy&&this.j&&sZ(this.j,e)},p.ke=function(e,t){if(t=void 0===t||t,0==e)Y("A trick play rate of 0 is unsupported!");else{var n=this.h.playbackRate,i=this.J.h;this.J.set(e),this.m==dy&&(this.u.playbackRateChanged(e),this.Hh(t&&1!=e)),l$(this,e),0===n&&0===this.h.playbackRate&&e!=i&&lQ(this)}},p.Ld=function(){var e=this.J.jd();this.m==db&&this.J.set(e),this.m==dy&&(this.J.set(e),this.u.playbackRateChanged(e),this.Hh(!1)),this.$b.Ua()},p.Kb=function(){if(this.i&&!this.wa()){for(var e=this.j?this.j.o:null,t=[],n=0,i=S(this.i.variants),r=i.next();!r.done;r=i.next())if(iE(r=r.value)){var a=i_(r);a.active=r==e,a.active||1==n||null==e||r.video!=e.video||r.audio!=e.audio||(a.active=!0),a.active&&n++,t.push(a)}return t}if(this.h&&this.h.audioTracks){var o=l8(this);return(e=Array.from(this.h.audioTracks)).length?e.map(function(e){return iA(e,o)}):o?[iA(null,o)]:[]}return[]},p.Cc=function(){if(this.i){if(this.wa())return[];for(var e=this.j?this.j.B:null,t=[],n=S(this.i.textStreams),i=n.next();!i.done;i=n.next()){var r=iw(i=i.value);r.active=i==e,t.push(r)}return t}return this.h&&this.h.src&&this.h.textTracks?lK(this).map(function(e){return ix(e)}):[]},p.Jj=function(){var e=this.ye;return this.i&&(e=this.i.imageStreams),e.map(function(e){return iT(e)})},p.xj=function(e){var t,n,i=this;return L(function(r){return 1==r.h?r.g(lH(i,e),2):(t=r.i)?(n=[],t.segmentIndex.pb(function(e){var i=lV(e.tilesLayout||t.tilesLayout);if(i)for(var r=i.rows*i.columns,a=(e.j-e.startTime)/r,o=0;o<r;o++){var s=lq(e,t,e.startTime+o*a,i);if(!s)break;n.push(s)}}),r.return(n)):r.return(null)})},p.Yj=function(e,t){var n,i,r,a,o=this;return L(function(s){return 1==s.h?s.g(lH(o,e),2):(n=s.i)&&null!=(i=n.segmentIndex.find(t))&&(a=lV((r=n.segmentIndex.get(i)).tilesLayout||n.tilesLayout))?s.return(lq(r,n,t,a)):s.return(null)})},p.oh=function(e){var t;if((!this.i||!this.F||((t=this.i.textStreams.find(function(t){return t.id==e.id}))&&t!=this.j.B&&(uR(this.B.h,t,!1),s1(this.j,t),dn(this),da(this),this.Ed=t.language),this.wa()))&&this.h&&this.h.textTracks){var n=lK(this),i=n.find(function(t){return iS(t)===e.id});if(i){if(this.o instanceof u5){n=S(n);for(var r=n.next();!r.done;r=n.next()){var a=(r=r.value)===i?this.ia?"showing":"hidden":"disabled";r.mode!==a&&(r.mode=a)}}else(n=n.find(function(e){return"disabled"!==e.mode}))!==i&&(n&&(n.mode="disabled",this.l.Na(n,"cuechange"),this.o.remove(0,1/0)),i&&lG(this,i));dn(this),da(this)}}},p.Gf=function(e,t,n){var i=this;if(t=void 0!==t&&t,n=void 0===n?0:n,(!this.i||!this.F||(function(){var r=i.i.variants.find(function(t){return t.id==e.id});if(r&&iE(r)){var a=i.j.o;i.g.abr.enabled&&(a.video!=r.video||a.audio&&r.audio&&a.audio.language==r.audio.language&&a.audio.channelsCount==r.audio.channelsCount&&a.audio.label==r.audio.label)&&Y("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack()."),i.wa()?l5(i,r,!1,!1,0):l5(i,r,!1,t||!1,n||0),i.N.configure({language:r.language,role:r.audio&&r.audio.roles&&r.audio.roles[0]||"",channelCount:r.audio&&r.audio.channelsCount?r.audio.channelsCount:0,Dc:r.video&&r.video.hdr?r.video.hdr:"",spatialAudio:!!r.audio&&!!r.audio.spatialAudio&&r.audio.spatialAudio,videoLayout:r.video&&r.video.videoLayout?r.video.videoLayout:"",Jc:r.audio&&r.audio.label?r.audio.label:"",Fd:"",codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:r.audio&&r.audio.codecs?r.audio.codecs:"",Jd:a.audio&&a.audio.codecs?a.audio.codecs:"",Ce:a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,preferredAudioCodecs:i.g.preferredAudioCodecs,preferredAudioChannelCount:i.g.preferredAudioChannelCount}),l3(i)}}(),this.wa()))&&e.originalAudioId&&i.h&&i.h.audioTracks){var r=Array.from(i.h.audioTracks);r=S(r);for(var a=r.next();!a.done;a=r.next())if(iS(a=a.value)==e.id){l6(i,a);break}}},p.Vk=function(e,t){var n,i=this;t=void 0===t?0:t,(!this.i||!this.F||((n=i.N.getConfiguration()).audioCodec=e.codecs||"",n.Jc=e.label||"",n.channelCount=e.channelsCount||0,n.language=e.language,n.role=e.roles[0]||"",n.spatialAudio=e.spatialAudio,i.N.configure(n),l4(i,!0,t,!1,!1),this.wa()))&&function(){if(i.h&&i.h.audioTracks){var t=ir(e.language),n=Array.from(i.h.audioTracks),r=null;n=S(n);for(var a=n.next();!a.done;a=n.next()){var o=(a=a.value).language||"und";if(a.label==e.label&&ir(o)==t&&a.kind==e.roles[0]){r=a;break}}r&&l6(i,r)}}()},p.getAudioTracks=function(){if(this.i&&!this.wa()){var e=this.Kb();if(!e.length)return[];var t=e.find(function(e){return e.active});if(!t)return[];var n=e;if(this.m!=dy||this.wa()||(n=e.filter(function(e){return e.originalVideoId===t.originalVideoId&&(e.audioCodec||nY.includes(e.audioMimeType||""))})),!n.length)return[];e=new Map,n=S(n);for(var i=n.next();!i.done;i=n.next()){var r=i.value;i=[r.language,r.originalLanguage,r.label||"",(r.audioRoles||[]).join(","),r.channelsCount,r.spatialAudio,r.audioCodec||"",r.accessibilityPurpose||""].join("_"),r={active:r.active,language:r.language,label:r.label,mimeType:r.audioMimeType,codecs:r.audioCodec,primary:r.primary,roles:r.audioRoles||[],accessibilityPurpose:r.accessibilityPurpose,channelsCount:r.channelsCount,audioSamplingRate:r.audioSamplingRate,spatialAudio:r.spatialAudio,originalLanguage:r.originalLanguage},e.has(i)?!e.get(i).active&&r.active&&e.set(i,r):e.set(i,r)}return Array.from(e.values())}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(e){var t=e.language;return t={active:e.enabled,language:ir(t||"und"),label:e.label,mimeType:null,codecs:null,primary:"main"==e.kind,roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:t},e.kind&&("description"==e.kind&&(t.accessibilityPurpose="visually impaired"),t.roles.push(e.kind)),e.configuration&&(e.configuration.codec&&(t.codecs=e.configuration.codec),e.configuration.sampleRate&&(t.audioSamplingRate=e.configuration.sampleRate),e.configuration.numberOfChannels&&(t.channelsCount=e.configuration.numberOfChannels)),t}):[]},p.Xk=function(e,t,n){t=void 0!==t&&t,n=void 0===n?0:n;var i=this.Kb();if(i.length){var r=i.find(function(e){return e.active});r&&(i=i.find(function(t){return t.audioId===r.audioId&&(t.videoBandwidth||t.bandwidth)==e.bandwidth&&t.width==e.width&&t.height==e.height&&t.frameRate==e.frameRate&&t.pixelAspectRatio==e.pixelAspectRatio&&t.hdr==e.hdr&&t.colorGamut==e.colorGamut&&t.videoLayout==e.videoLayout&&t.videoMimeType==e.mimeType&&t.videoCodec==e.codecs}))&&!i.active&&this.Gf(i,t,n)}},p.getVideoTracks=function(){if(this.m==db||this.wa())return[];var e=this.Kb();if(!e.length)return[];var t=e.find(function(e){return e.active});if(!t)return[];var n=e.filter(function(e){return e.originalAudioId===t.originalAudioId&&e.audioId===t.audioId&&e.audioGroupId===t.audioGroupId&&e.videoCodec});if(!n.length)return[];e=new Map,n=S(n);for(var i=n.next();!i.done;i=n.next()){var r=(i=i.value).originalVideoId;r||null==i.videoId||(r=String(i.videoId)),r&&e.set(r,{active:i.active,bandwidth:i.videoBandwidth||i.bandwidth,width:i.width,height:i.height,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,colorGamut:i.colorGamut,videoLayout:i.videoLayout,mimeType:i.videoMimeType,codecs:i.videoCodec})}return Array.from(e.values())},p.zj=function(){return dg(this.Kb())},p.Wj=function(){return dg(this.Cc())},p.yj=function(){return Array.from(df(this.Kb()))},p.Vj=function(){return Array.from(df(this.Cc()))},p.Ni=function(e,t,n,i,r,a,o){var s=this;if(n=void 0===n?0:n,i=void 0===i?0:i,r=void 0===r?"":r,a=void 0!==a&&a,o=void 0===o?"":o,(!this.i||!this.F||(function(){function u(e,t){return e.video||t.video?e.video&&t.video?Math.abs((e.video.height||0)-(t.video.height||0))+Math.abs((e.video.width||0)-(t.video.width||0)):1/0:0}var l=s.j.o;s.N=s.g.adaptationSetCriteriaFactory(),s.N.configure({language:e,role:t||"",channelCount:n||0,Dc:"",spatialAudio:a||!1,videoLayout:"",Jc:o||"",Fd:"",codecSwitchingStrategy:s.g.mediaSource.codecSwitchingStrategy,audioCodec:r||"",Jd:l.audio&&l.audio.codecs?l.audio.codecs:"",Ce:l.audio&&l.audio.channelsCount?l.audio.channelsCount:0,preferredAudioCodecs:s.g.preferredAudioCodecs,preferredAudioChannelCount:s.g.preferredAudioChannelCount});var d=s.N.create(s.i.variants),c=null;d=S(d.values());for(var h=d.next();!h.done;h=d.next())iE(h=h.value)&&(!c||u(c,l)>
1u(h,l))&&(c=h);c!=l&&(c?(l=i_(c),s.Gf(l,!0,i||0)):l4(s))}(),this.wa()))&&s.h&&s.h.audioTracks){var u=iI(s.Kb(),e,t||"",!1)[0];u&&s.Gf(u)}},p.nh=function(e,t,n){var i,r;n=void 0!==n&&n,(!this.i||!this.F||(this.Ed=e,this.Hd=t||"",this.Gd=n||!1,(i=iI(this.i.textStreams,this.Ed,this.Hd,this.Gd)[0]||null)&&i!=this.j.B&&(uR(this.B.h,i,!1),this.g.streaming.alwaysStreamText||this.Qg())&&(s1(this.j,i),dn(this),da(this)),this.wa()))&&(r=iI(this.Cc(),e,t||"",n||!1)[0])&&this.oh(r)},p.Wk=function(e,t,n){var i=this;if(t=void 0===t||t,n=void 0===n?0:n,(!this.i||!this.F||(function(){for(var r=null,a=S(i.i.variants),o=a.next();!o.done;o=a.next())if((o=o.value).audio.label==e){r=o;break}null!=r&&(i.N=i.g.adaptationSetCriteriaFactory(),i.N.configure({language:r.language,role:"",channelCount:0,Dc:"",spatialAudio:!1,videoLayout:"",Fd:"",Jc:e,codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Jd:"",Ce:0,preferredAudioCodecs:i.g.preferredAudioCodecs,preferredAudioChannelCount:i.g.preferredAudioChannelCount}),l4(i,t,n))}(),this.wa()))&&i.h&&i.h.audioTracks){var r=Array.from(i.h.audioTracks),a=null;r=S(r);for(var o=r.next();!o.done;o=r.next())(o=o.value).label==e&&(a=o);a&&l6(i,a)}},p.Qg=function(){var e=this.ia;return this.o?this.o.isTextVisible():e},p.Dj=function(){return this.Vb.map(function(e){return iw(e)})},p.Bj=function(e){if(el("getChapters","Please use an getChaptersAsync."),!this.Vb.length)return[];var t=ir(e);if(!(e=this.Vb.filter(function(e){return ir(e.language)==t})).length)return[];var n=[],i=new Set;e=S(e);for(var r=e.next();!r.done;r=e.next())(r=r.value).segmentIndex&&r.segmentIndex.pb(function(e){var t=e.R()[0],r=e.startTime+"-"+e.endTime+"-"+t;e={id:r,title:t,startTime:e.startTime,endTime:e.endTime},i.has(r)||(n.push(e),i.add(r))});return n},p.Cj=function(e){var t,n,i,r,a,o,s,u=this;return L(function(l){switch(l.h){case 1:if(!u.Vb.length||(t=ir(e),!(n=u.Vb.filter(function(e){return ir(e.language)==t})).length))return l.return([]);i=[],r=new Set,o=(a=S(n)).next();case 2:if(o.done){l.A(4);break}if((s=o.value).segmentIndex){l.A(5);break}return l.g(s.createSegmentIndex(),5);case 5:s.segmentIndex.pb(function(e){var t=e.R()[0],n=e.startTime+"-"+e.endTime+"-"+t;e={id:n,title:t,startTime:e.startTime,endTime:e.endTime},r.has(n)||(i.push(e),r.add(n))}),o=a.next(),l.A(2);break;case 4:return l.return(i)}})},p.sh=function(e){var t,n;e=!!e,this.ia!=e&&(this.ia=e,this.m==dy?(this.o.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.j.B||(e=iI(this.i.textStreams,this.Ed,this.Hd,this.Gd)).length>0&&(s1(this.j,e[0]),dn(this),da(this)):((n=(t=this.j).h.get(e5))&&(uo(n),us(n).catch(function(){}),t.F=t.h.get(e5),t.h.delete(e5),n.stream&&n.stream.closeSegmentIndex&&n.stream.closeSegmentIndex()),t.B=null))):this.h&&this.h.src&&this.h.textTracks&&this.o.setTextVisibility(e),di(this))},p.Pj=function(){if(this.F)var e=this.F.Id();else{if(null==this.O)return new Date;if(this.O instanceof Date)return this.O;e=this.O}if(this.i&&!this.wa()){var t=this.i.presentationTimeline;return new Date(((t.m||t.i)+e)*1e3)}return this.h&&this.h.getStartDate&&(t=this.h.getStartDate())instanceof Date&&!isNaN(t.getTime())?new Date(t.getTime()+1e3*e):null},p.gi=function(){if(this.i&&!this.wa()){var e=this.i.presentationTimeline;return null===(e=e.m||e.i)?null:new Date(1e3*e)}return this.h&&this.h.getStartDate&&(e=this.h.getStartDate())instanceof Date&&!isNaN(e.getTime())?e:null},p.We=function(){return this.U()&&this.i?this.i.presentationTimeline.We():null},p.Qb=function(){if(this.m==dy)return this.H.Qb();var e={total:[],audio:[],video:[],text:[]};return this.m==db&&(e.total=a0(this.h.buffered)),e},p.Te=function(){if(!this.h||!this.h.currentTime)return null;var e=this.gi();return e?Math.floor(Date.now()-(e.getTime()+1e3*this.h.currentTime)):null},p.getStats=function(){if(this.m!=dy&&this.m!=db)return{width:NaN,height:NaN,currentCodecs:"",streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],stateHistory:[]};lZ(this);var e,t,n=this.h,i=n.currentTime/n.duration;if(isNaN(i)||this.U()||(r=this.B,a=Math.round(100*i),r.i=isNaN(r.i)?a:Math.max(r.i,a)),this.F&&(this.B.T=this.F.Ih(),this.B.V=this.F.Kh()),n.getVideoPlaybackQuality&&(i=n.getVideoPlaybackQuality(),o=this.B,s=Number(i.droppedVideoFrames),u=Number(i.totalVideoFrames),o.P=s,o.O=u,this.B.N=Number(i.corruptedVideoFrames)),d=this.B,(c=this.D&&(l=this.D).J?l.J:NaN)>=0&&(d.o=c),h=this.B,p=n.videoWidth||NaN,f=n.videoHeight||NaN,h.Y=p,h.C=f,this.B.l="",this.U()&&null!=(n=this.Te())&&(g=this.B,(m=n/1e3)>=0&&(g.D=m)),i=this.Kb().find(function(e){return e.active}),n=this.Cc().find(function(e){return e.active}),i){if(i.bandwidth){var r,a,o,s,u,l,d,c,h,p,f,g,m,v,y,b,w=this.J?this.J.h:1,T=w*i.bandwidth;n&&n.bandwidth&&(T+=w*n.bandwidth),this.B.B=T}i.width&&i.height&&(v=this.B,y=i.width||NaN,b=i.height||NaN,v.Y=y,v.C=b),i=i.codecs,n&&(i+=","+(n.codecs||n.mimeType)),i&&(this.B.l=i)}return this.m!=dy||this.wa()||(this.i&&(this.B.I=this.i.periodCount,this.B.H=this.i.gapCount,this.i.presentationTimeline&&(e=this.B,(t=this.i.presentationTimeline.h)>=0&&(e.K=t))),n=this.u.getBandwidthEstimate(),this.B.u=n),this.m==db&&uO(this.B,NaN),function(e){var t=e.Y,n=e.C,i=e.l,r=e.B,a=e.O,o=e.P,s=e.N,u=e.V,l=e.T,d=e.u,c=e.i,h=e.F,p=e.J,f=e.m,g=uP(e.g,"playing"),m=uP(e.g,"paused"),v=uP(e.g,"buffering"),y=e.o,b=e.D,w=e.K,T=e.pi,x=e.j,A=e.M,E=e.I,k=e.H,I=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],i=S(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}(e.g),C=[];e=S(e.h.g);for(var M=e.next();!M.done;M=e.next())C.push({timestamp:(M=M.value).timestamp,id:M.id,type:M.type,fromAdaptation:M.fromAdaptation,bandwidth:M.bandwidth});
1return{width:t,height:n,currentCodecs:i,streamBandwidth:r,decodedFrames:a,droppedFrames:o,corruptedFrames:s,stallsDetected:u,gapsJumped:l,estimatedBandwidth:d,completionPercent:c,loadLatency:h,manifestTimeSeconds:p,drmTimeSeconds:f,playTime:g,pauseTime:m,bufferingTime:v,licenseTime:y,liveLatency:b,maxSegmentDuration:w,manifestSizeBytes:T,bytesDownloaded:x,nonFatalErrorCount:A,manifestPeriodCount:E,manifestGapCount:k,stateHistory:I,switchHistory:C}}(this.B)},p.Kd=function(e,t,n,i,r,a,o){o=void 0!==o&&o;var s,u,l,d,c,h,p,f=this;return L(function(g){switch(g.h){case 1:if(f.m!=dy&&f.m!=db)throw new eN(1,7,7004);if("subtitles"!=n&&"captions"!=n&&Y("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),i){g.A(2);break}return g.g(lW(f,e),3);case 3:i=g.i;case 2:var m,v,y,b,w,T;if(s=[],f.C&&(s=f.C.getCuePoints()),f.m!=db){g.A(4);break}return u=er(),o&&"WEBKIT"===u.Ea()&&(n="forced"),g.g((m=e,v=n,y=i,b=a||"",w=s,L(function(e){if(1==e.h)return"text/vtt"!=y||w.length?e.g(lz(f,m),3):e.A(2);2!=e.h&&(m=o3(new Blob([lX(f,e.i,y,w)],{type:"text/vtt"})),y="text/vtt"),T=document.createElement("track");e:{var n=f.M,i=m;try{if(!n.g.enabled){var r=i;break e}var a=lr(n);a.ot="c",a.su=!0,r=lu(i,ls(a));break e}catch(e){J("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),r=i;break e}}return T.src=r,T.label=b,T.kind=v,T.srclang=t,f.h.getAttribute("crossorigin")||f.h.setAttribute("crossorigin","anonymous"),f.h.appendChild(T),f.Yf.push(T),e.return(T)})),5);case 5:if((l=g.i).track)return l9(f),dn(f),g.return(ix(l.track));throw new eN(1,2,2012);case 4:if(d=e6,h=(c=f.Ma()).end-c.start,f.i&&(h=f.i.presentationTimeline.getDuration()),h==1/0)throw new eN(1,4,4033);if(!s.length){g.A(6);break}return g.g(lz(f,e),7);case 7:e=o3(new Blob([lX(f,g.i,i,s)],{type:"text/vtt"})),i="text/vtt";case 6:if(p={id:f.se++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:sS(0,h,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:a||null,type:d.Va,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([nB(i||"",r||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},!nZ(nB(p.mimeType,p.codecs)))throw new eN(2,2,2014,i);return f.i.textStreams.push(p),l9(f),dn(f),g.return(iw(p))}})},p.Ee=function(e,t){var n,i,r,a,o,s,u,l,d,c,h,p,f,g,m,v,y,b,w=this;return L(function(T){switch(T.h){case 1:if(w.m!=dy&&w.m!=db)throw new eN(1,7,7004);if(t){T.A(2);break}return T.g(lW(w,e),3);case 3:t=T.i;case 2:if("text/vtt"!=t)throw new eN(1,2,2017,e);if(n=e6,r=(i=w.Ma()).end-i.start,w.i&&(r=w.i.presentationTimeline.getDuration()),r==1/0)throw new eN(1,4,4045);return T.g(lz(w,e),4);case 4:if(a=T.i,!(o=n$(t)))throw new eN(2,2,2014,t);for(s=o(),u={periodStart:0,segmentStart:0,segmentEnd:r,vttOffset:0},l=eD(a),d=s.parseMedia(l,u,e,[]),c=[],p=(h=S(d)).next(),f={};!p.done;f={Sf:void 0,dd:void 0},p=h.next())f.dd=p.value,f.Sf=null,g=function(t){return function(){return null!=t.Sf||(t.Sf=eZ([e],[t.dd.payload])),t.Sf||[]}}(f),m=new aK(f.dd.startTime,f.dd.endTime,g,0,null,null,0,0,1/0),f.dd.payload.includes("#xywh")&&4===(v=f.dd.payload.split("#xywh=")[1].split(",")).length&&m.Jf({height:parseInt(v[3],10),positionX:parseInt(v[0],10),positionY:parseInt(v[1],10),width:parseInt(v[2],10)}),c.push(m);if(y=t,!c.length){T.A(5);break}return T.g(lW(w,c[0].R()[0]),6);case 6:y=T.i;case 5:return b={id:w.se++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new sT(c),mimeType:y||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.Vf,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([nB(y||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},w.m==db?w.ye.push(b):w.i.imageStreams.push(b),l9(w),T.return(iT(b))}})},p.De=function(e,t,n){var i,r,a,o,s,u,l,d,c,h,p,f,g,m,v,y=this;return L(function(b){switch(b.h){case 1:if(y.m!=dy&&y.m!=db)throw new eN(1,7,7004);if(n){b.A(2);break}return b.g(lW(y,e),3);
1case 3:n=b.i;case 2:if(i=e6,a=(r=y.Ma()).end-r.start,y.i&&(a=y.i.presentationTimeline.getDuration()),a==1/0)throw new eN(1,4,4055);if(!(o=n$(n)))throw new eN(2,2,2014,n);return b.g(lz(y,e),4);case 4:for(s=b.i,u=o(),l={periodStart:0,segmentStart:0,segmentEnd:a,vttOffset:0},d=eD(s),c=u.parseMedia(d,l,e,[]),h=[],f=(p=S(c)).next(),g={};!f.done;g={Ne:void 0},f=p.next())g.Ne=f.value,m=new aK(g.Ne.startTime,g.Ne.endTime,function(e){return function(){return[e.Ne.payload]}}(g),0,null,null,0,0,1/0),h.push(m);return v={id:y.se++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new sT(h),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:null,type:i.Va,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([nB("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},y.Vb.push(v),l9(y),b.return(iw(v))}})},p.cl=function(e,t){this.ya.width=e,this.ya.height=t},p.jh=function(e){if(this.m==dy){var t=this.j;if(e=void 0===e?.1:e,t.l.g)t=!1;else if(t.D)t=!1;else{for(var n=S(t.h.values()),i=n.next();!i.done;i=n.next())!(i=i.value).md||i.Pa||i.xb||(i.md=!1,ua(t,i,e));t=!0}}else t=!1;return t},p.Gg=function(){return Y("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees.  It may change at any time!  Please consider filing a feature request for whatever you use getManifest() for."),this.i},p.Mj=function(){return this.xd},p.Hj=function(){var e={video:null,audio:null,text:null};if(this.m!=dy)return e;var t=this.j.o,n=this.h.currentTime;t=S([t.video,t.audio,this.j.B]);for(var i=t.next();!i.done;i=t.next())if((i=i.value)&&i.segmentIndex){var r=i.segmentIndex.find(n);r={codecs:(r=i.segmentIndex.get(r)).codecs||i.codecs,mimeType:r.mimeType||i.mimeType,bandwidth:r.bandwidth||i.bandwidth},"video"==i.type?(r.width=i.width,r.height=i.height,e.video=r):"audio"==i.type?e.audio=r:i.type==e5&&(e.text=r)}return e},p.Vi=function(e){this.ue=e},p.disableStream=function(e,t){if(!this.g.abr.enabled||this.m===dm||!navigator.onLine||0==t||!this.i)return!1;if(this.i.variants.some(function(t){var n=t[e.type];return!!n&&n.id!==e.id&&!t.disabledUntilTime&&("audio"!=e.type||e.language===n.language)})){for(var n=!1,i=!1,r=S(this.i.variants),a=r.next();!a.done;a=r.next()){var o=(a=a.value)[e.type];o&&(o.id===e.id?(a.disabledUntilTime=Date.now()/1e3+t,n=!0):o.trickModeVideo&&o.trickModeVideo.id==e.id&&(i=!0))}return(!!n||!i)&&(this.ve.Ha(1),l4(this,!1,t=this.Qb().video.reduce(function(e,t){return e+t.end-t.start},0),!0,!1),!0)}return!1},p.addFont=function(t,n){var i,r,a,o;return L(function(s){if(1==s.h)return"fonts"in document&&"FontFace"in e?s.g(document.fonts.ready,2):s.return();if(!("entries"in document.fonts))return s.return();for(r=(i=S(function(e){e=e.entries();for(var t=[],n=e.next();!1===n.done;)t.push(n.value),n=e.next();return t}(document.fonts))).next();!r.done;r=i.next())if((a=r.value).family===t&&"swap"===a.display)return s.return();o=new FontFace(t,"url("+n+")",{display:"swap"}),document.fonts.add(o),s.j()})},p.wa=function(){return!!this.h&&!!this.h.remote&&"disconnected"!=this.h.remote.state},p.Xd=function(){return!this.h||!!this.h.ended||this.Ra&&!this.U()&&this.h.currentTime>=this.Ma().end},q("shaka.Player",l_),l_.prototype.isEnded=l_.prototype.Xd,l_.prototype.isRemotePlayback=l_.prototype.wa,l_.prototype.addFont=l_.prototype.addFont,l_.prototype.setVideoContainer=l_.prototype.Vi,l_.prototype.getFetchedPlaybackInfo=l_.prototype.Hj,l_.prototype.getManifestParserFactory=l_.prototype.Mj,l_.prototype.getManifest=l_.prototype.Gg,l_.prototype.retryStreaming=l_.prototype.jh,l_.prototype.setMaxHardwareResolution=l_.prototype.cl,l_.prototype.addChaptersTrack=l_.prototype.De,l_.prototype.addThumbnailsTrack=l_.prototype.Ee,l_.prototype.addTextTrackAsync=l_.prototype.Kd,l_.prototype.getStats=l_.prototype.getStats,l_.prototype.getBufferedInfo=l_.prototype.Qb,l_.prototype.getSegmentAvailabilityDuration=l_.prototype.We,l_.prototype.getPresentationStartTimeAsDate=l_.prototype.gi,l_.prototype.getPlayheadTimeAsDate=l_.prototype.Pj,l_.prototype.setTextTrackVisibility=l_.prototype.sh,l_.prototype.getChaptersAsync=l_.prototype.Cj,l_.prototype.getChapters=l_.prototype.Bj,l_.prototype.getChaptersTracks=l_.prototype.Dj,l_.prototype.isTextTrackVisible=l_.prototype.Qg,l_.prototype.selectVariantsByLabel=l_.prototype.Wk,l_.prototype.selectTextLanguage=l_.prototype.nh,l_.prototype.selectAudioLanguage=l_.prototype.Ni,l_.prototype.getTextLanguages=l_.prototype.Vj,l_.prototype.getAudioLanguages=l_.prototype.yj,l_.prototype.getTextLanguagesAndRoles=l_.prototype.Wj,l_.prototype.getAudioLanguagesAndRoles=l_.prototype.zj,l_.prototype.getVideoTracks=l_.prototype.getVideoTracks,l_.prototype.selectVideoTrack=l_.prototype.Xk,l_.prototype.getAudioTracks=l_.prototype.getAudioTracks,l_.prototype.selectAudioTrack=l_.prototype.Vk,l_.prototype.selectVariantTrack=l_.prototype.Gf,l_.prototype.selectTextTrack=l_.prototype.oh,l_.prototype.getThumbnails=l_.prototype.Yj,l_.prototype.getAllThumbnails=l_.prototype.xj,l_.prototype.getImageTracks=l_.prototype.Jj,l_.prototype.getTextTracks=l_.prototype.Cc,l_.prototype.getVariantTracks=l_.prototype.Kb,l_.prototype.cancelTrickPlay=l_.prototype.Ld,l_.prototype.trickPlay=l_.prototype.ke,l_.prototype.useTrickPlayTrackIfAvailable=l_.prototype.Hh,l_.prototype.getPlaybackRate=l_.prototype.ib,l_.prototype.isBuffering=l_.prototype.Ng,l_.prototype.getKeyStatuses=l_.prototype.Se,l_.prototype.getActiveSessionsMetadata=l_.prototype.Fg,l_.prototype.getExpiration=l_.prototype.Sd,l_.prototype.drmInfo=l_.prototype.drmInfo,l_.prototype.keySystem=l_.prototype.keySystem,l_.prototype.isFullyLoaded=l_.prototype.ik,l_.prototype.goToLive=l_.prototype.ek,l_.prototype.seekRange=l_.prototype.Ma,l_.prototype.isVideoOnly=l_.prototype.qk,l_.prototype.isAudioOnly=l_.prototype.hk,l_.prototype.isInProgress=l_.prototype.Pc,l_.prototype.isLive=l_.prototype.U,l_.prototype.getQueueManager=l_.prototype.ii,l_.prototype.getAdManager=l_.prototype.$h,l_.prototype.getAssetUri=l_.prototype.hd,l_.prototype.getNetworkingEngine=l_.prototype.Jb,l_.prototype.getMediaElement=l_.prototype.Ve,l_.prototype.getManifestType=l_.prototype.ci,l_.prototype.getLoadMode=l_.prototype.Ue,l_.prototype.resetConfiguration=l_.prototype.Ii,l_.prototype.getBufferFullness=l_.prototype.ai,l_.prototype.getNonDefaultConfiguration=l_.prototype.ei,l_.prototype.getConfigurationForLowLatency=l_.prototype.Ej,l_.prototype.getConfiguration=l_.prototype.getConfiguration,l_.prototype.configurationForLowLatency=l_.prototype.uj,l_.prototype.configure=l_.prototype.configure,l_.prototype.releaseAllMutexes=l_.prototype.Nk,l_.prototype.destroyAllPreloads=l_.prototype.og,l_.prototype.preload=l_.prototype.preload,l_.prototype.detachAndSavePreload=l_.prototype.Wh,l_.prototype.unloadAndSavePreload=l_.prototype.il,l_.prototype.load=l_.prototype.load,l_.prototype.updateStartTime=l_.prototype.ol,l_.prototype.unload=l_.prototype.vc,l_.prototype.detach=l_.prototype.detach,l_.prototype.attachCanvas=l_.prototype.mj,l_.prototype.attach=l_.prototype.Pb,l_.probeSupport=function(t){var n,i,r,a,o,s;return t=void 0===t||t,L(function(u){switch(u.h){case 1:var l,d,c,h,p,f,g,m,v,y,b,w,T,A,E,k,I,C,M,P,D,R,O,N;if(n={},!t){u.A(2);break}return u.g(L(function(t){if(1==t.h){if(l="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" "),!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration)){for(d={},h=(c=S(l)).next();!h.done;h=c.next())d[h.value]=null;return t.return(d)}for(p="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" "),g={"com.widevine.alpha":f=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"],"com.widevine.alpha.experiment":f,"com.microsoft.playready.recommendation":["150","2000","3000"]},m={videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],audioCapabilities:[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],initDataTypes:["cenc","sinf","skd","keyids"]},v=[null,"cenc","cbcs"],y=new Map,b=er(),w=function(e,t,n){var i,r,a,o,s,u,l,d,c,h,f,g;return L(function(m){switch(m.h){case 1:return m.m(2),m.g(t.createMediaKeys(),5);case 5:i=m.i;case 4:m.o(3);break;case 2:return m.l(),m.return();case 3:if(a=!!(r=t.getConfiguration().sessionTypes)&&r.includes("persistent-license"),b.wi()&&(a=!1),o=t.getConfiguration().videoCapabilities,s=t.getConfiguration().audioCapabilities,u={persistentState:a,encryptionSchemes:[],videoRobustnessLevels:[],audioR
1obustnessLevels:[],minHdcpVersions:[]},y.get(e)?u=y.get(e):y.set(e,u),(l=o[0].encryptionScheme)&&!u.encryptionSchemes.includes(l)&&u.encryptionSchemes.push(l),(d=o[0].robustness)&&!u.videoRobustnessLevels.includes(d)&&u.videoRobustnessLevels.push(d),(c=s[0].robustness)&&!u.audioRobustnessLevels.includes(c)&&u.audioRobustnessLevels.push(c),!(n&&"getStatusForPolicy"in i)){m.A(0);break}f=(h=S(p)).next();case 7:if(f.done){m.A(0);break}if(g=f.value,u.minHdcpVersions.includes(g)){m.A(8);break}return m.g(i.getStatusForPolicy({minHdcpVersion:g}),10);case 10:if("usable"==m.i)u.minHdcpVersions.includes(g)||u.minHdcpVersions.push(g);else{m.A(0);break}case 8:f=h.next(),m.A(7)}})},T=function(e,t,n,i,r){var a,o,s,u,l,d,c,h,p,f;return r=void 0!==r&&r,L(function(g){switch(g.h){case 1:for(g.m(2),s=(o=S((a=tO(m)).videoCapabilities)).next();!s.done;s=o.next())(u=s.value).encryptionScheme=t,u.robustness=n;for(d=(l=S(a.audioCapabilities)).next();!d.done;d=l.next())(c=d.value).encryptionScheme=t,c.robustness=i;return(h=tO(a)).persistentState="required",h.sessionTypes=["persistent-license"],p=[h,a],"MOBILE"==er().Ta()?g.g(n9(5,navigator.requestMediaKeySystemAccess(e,p)),7):g.g(navigator.requestMediaKeySystemAccess(e,p),6);case 6:f=g.i,g.A(5);break;case 7:f=g.i;case 5:return g.g(w(e,f,r),8);case 8:g.o(0);break;case 2:g.l(),g.j()}})},A=[],k=(E=S(l)).next();!k.done;k=E.next())if(I=k.value,y.set(I,null),!("WEBKIT"===er().Ea()&&iG(I))){for(C=!0,P=(M=S(v)).next();!P.done;P=M.next())D=P.value,A.push(T(I,D,"","",C)),C=!1;for(O=(R=S(g[I]||[])).next();!O.done;O=R.next())N=O.value,A.push(T(I,null,N,"")),A.push(T(I,null,"",N))}return t.g(Promise.all(A),2)}return t.return(ry(y))}),3);case 3:n=u.i;case 2:return i=function(){var e={};if(er(),p7())for(var t=S(td.keys()),n=t.next();!n.done;n=t.next())e[n.value]=!0;for(n=(t=S(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","audio/x-mpegurl","application/vnd.ms-sstr+xml"])).next();!n.done;n=t.next())e[n=n.value]=p7()?td.has(n):""!=a5().canPlayType(n);return e}(),r=function(){var e='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",audio/mp4; codecs="apac.31.00",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(nY)),t={};er(),e=S(e);for(var n=e.next();!n.done;n=e.next()){if(nZ(n=n.value))t[n]=!0;else if(p7()){var i=nK(n),r=iy(nW(n),i);i=nB(i,r),t[n]=ti(i)||!!nD(i)}else t[n]=""!=a5().canPlayType(n);t[i=n.split(";")[0]]=t[i]||t[n]}return t}(),a=er(),u.g(a.fc(),4);case 4:return o=u.i,s={manifest:i,media:r,drm:n,hardwareResolution:o},d_.forEach(function(e,t){s[t]=e()}),u.return(s)}})},l_.isBrowserSupported=function(){return e.Promise||Y("A Promise implementation or polyfill is required"),!(!(e.Promise&&e.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/"))&&(er(),!!p7()||""!=a5().canPlayType("application/x-mpegurl"))},l_.setQueueManagerFactory=function(e){dT=e},l_.setAdManagerFactory=function(e){dw=e},l_.registerSupportPlugin=lS,l_.prototype.destroy=l_.prototype.destroy;var dm=0,dv=1,dy=2,db=3;l_.LoadMode={DESTROYED:0,NOT_LOADED:1,MEDIA_SOURCE:2,SRC_EQUALS:3},l_.version="v4.15.58";eh=new function(e){this.g=e,this.i=ed,this.h=ec}(new eu(Number("4"),Number("15")));var d_=new Map,dw=null,dT=null;function dS(){this.g=[],this.i=this.m=this.l=this.j=this.h=0}
1function dx(e,t,n){var i=this;this.g=e,this.h=t,this.m=n,this.i=!1,this.j=this.h.getVolume(),this.l=new ee,this.l.G(this.h,google.ima.AdEvent.Type.PAUSED,function(){i.i=!0}),this.l.G(this.h,google.ima.AdEvent.Type.RESUMED,function(){i.i=!1})}function dA(){}function dE(e,t){var n=[];e=S(tq(e,"Ad"));for(var i=e.next();!i.done;i=e.next())if((i=tz(i.value,"InLine"))&&(i=tz(i,"Creatives"))){i=S(tq(i,"Creative"));for(var r=i.next();!r.done;r=i.next()){var a=tz(r=r.value,"Linear");if(a&&function(e,t,n){var i=0;null!=t&&(i=t);var r=null;if(n.attributes.skipoffset&&isNaN(r=tD(n.attributes.skipoffset))&&(r=null),n=tz(n,"MediaFiles")){var a=tq(n,"MediaFile");for(n=a,(a=a.filter(function(e){return"streaming"==e.attributes.delivery})).length&&(n=a),a=(n=S(n=n.sort(function(e,t){return(parseInt(t.attributes.height,10)||0)-(parseInt(e.attributes.height,10)||0)}))).next();!a.done;a=n.next())if(!(a=a.value).attributes.apiFramework){var o=tK(a);if(o){e.push({id:null,groupId:null,startTime:i,endTime:null,uri:o,mimeType:a.attributes.type||null,isSkippable:null!=r,skipOffset:r,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==t,post:t==1/0,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});break}}}}(n,t,a),r=tz(r,"NonLinearAds")){r=S(r=tq(r,"NonLinear"));for(var o=r.next();!o.done;o=r.next())e:{a=n;var s=o.value,u=tz(s,"StaticResource");if(u)o=u.attributes.creativeType;else{if(!(u=tz(s,"HTMLResource")))break e;o="text/html"}if(u=tK(u)){"text/html"===o&&(u="data:text/html;charset=UTF-8,"+encodeURIComponent(u));var l=tY(s,"width",t2)||tY(s,"expandedWidth",t2),d=tY(s,"height",t2)||tY(s,"expandedHeight",t2);if(l||d){var c=null;(s=s.attributes.minSuggestedDuration)&&(c=tD(s)),s=0,null!=t&&(s=t),a.push({id:null,groupId:null,startTime:s,endTime:null,uri:u,mimeType:o,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:c,once:!0,pre:null==t,post:t==1/0,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:l||0,y:d||0}},displayOnBackground:!1,currentVideo:null,background:null})}}}}}}return n}function dk(t,n,i,r,a){var o=this;this.u=t,this.i=n,this.F=!1,this.B=this.o=null,this.H=NaN,this.l=a,this.j=null,this.h=new ee,google.ima.settings.setLocale(i),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.D=new google.ima.AdDisplayContainer(this.u,this.i),this.D.initialize(),this.m=new google.ima.AdsLoader(this.D),this.m.getSettings().setPlayerType("shaka-player"),this.m.getSettings().setPlayerVersion("v4.15.58"),this.g=null,this.C=r||new google.ima.AdsRenderingSettings,this.h.G(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(t){var n=o,i=t;if(n.l(new i9("ads-loaded",new Map().set("loadTime",Date.now()/1e3-n.H))),n.o.customPlayheadTracker){var r={currentTime:n.i.currentTime};n.g=i.getAdsManager(r,n.C),n.i.muted?n.g.setVolume(0):n.g.setVolume(n.i.volume),n.h.G(n.i,"timeupdate",function(){n.i.duration&&(r.currentTime=n.i.currentTime)}),n.h.G(n.i,"volumechange",function(){n.j&&(n.j.setVolume(n.i.volume),n.i.muted&&n.j.setMuted(!0))})}else n.g=i.getAdsManager(n.i,n.C);n.l(new i9("ima-ad-manager-loaded",new Map().set("imaAdManager",n.g)));var a=n.g.getCuePoints();if(a.length){i=[],a=S(a);for(var s=a.next();!s.done;s=a.next())i.push({start:s.value,end:null});n.l(new i9("ad-cue-points-changed",new Map().set("cuepoints",i)))}function u(e,t){e=new Map().set("originalEvent",e),n.l(new i9(t,e))}n.h.G(n.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(e){dI(n,e)}),n.h.G(n.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(e){dC(n,e)}),n.h.G(n.g,google.ima.AdEvent.Type.STARTED,function(e){dC(n,e)}),n.h.G(n.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(e){u(e,"ad-first-quartile")}),n.h.G(n.g,google.ima.AdEvent.Type.MIDPOINT,function(e){u(e,"ad-midpoint")}),n.h.G(n.g,google.ima.AdEvent.Type.THIRD_QUARTILE,function(e){u(e,"ad-third-quartile")}),n.h.G(n.g,google.ima.AdEvent.Type.COMPLETE,function(e){u(e,"ad-complete")}
1),n.h.G(n.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(e){dM(n,e)}),n.h.G(n.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(e){u(e,"all-ads-completed"),dM(n,e)}),n.h.G(n.g,google.ima.AdEvent.Type.SKIPPED,function(e){u(e,"ad-skipped")}),n.h.G(n.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(e){u(e,"ad-volume-changed")}),n.h.G(n.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(e){u(e,"ad-muted")}),n.h.G(n.g,google.ima.AdEvent.Type.PAUSED,function(e){n.j&&(n.j.i=!0,u(e,"ad-paused"))}),n.h.G(n.g,google.ima.AdEvent.Type.RESUMED,function(e){n.j&&(n.j.i=!1,u(e,"ad-resumed"))}),n.h.G(n.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(e){n.j&&u(e,"ad-skip-state-changed")}),n.h.G(n.g,google.ima.AdEvent.Type.CLICK,function(e){u(e,"ad-clicked")}),n.h.G(n.g,google.ima.AdEvent.Type.AD_PROGRESS,function(e){u(e,"ad-progress")}),n.h.G(n.g,google.ima.AdEvent.Type.AD_BUFFERING,function(e){u(e,"ad-buffering")}),n.h.G(n.g,google.ima.AdEvent.Type.IMPRESSION,function(e){u(e,"ad-impression")}),n.h.G(n.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(e){u(e,"ad-duration-changed")}),n.h.G(n.g,google.ima.AdEvent.Type.USER_CLOSE,function(e){u(e,"ad-closed")}),n.h.G(n.g,google.ima.AdEvent.Type.LOADED,function(e){u(e,"ad-loaded")}),n.h.G(n.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(e){u(e,"ad-linear-changed")}),n.h.G(n.g,google.ima.AdEvent.Type.AD_METADATA,function(e){u(e,"ad-metadata")}),n.h.G(n.g,google.ima.AdEvent.Type.LOG,function(e){u(e,"ad-recoverable-error")}),n.h.G(n.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(e){u(e,"ad-break-ready")}),n.h.G(n.g,google.ima.AdEvent.Type.INTERACTION,function(e){u(e,"ad-interaction")});try{n.g.init(n.i.offsetWidth,n.i.offsetHeight),n.h.G(n.i,"loadeddata",function(){n.g.resize(n.i.offsetWidth,n.i.offsetHeight)}),"ResizeObserver"in e?(n.B=new ResizeObserver(function(){n.g.resize(n.i.offsetWidth,n.i.offsetHeight)}),n.B.observe(n.i)):n.h.G(document,"fullscreenchange",function(){n.g.resize(n.i.offsetWidth,n.i.offsetHeight)}),n.F||n.o.skipPlayDetection?n.g.start():n.h.Ba(n.i,"play",function(){n.F=!0,n.g.start()})}catch(e){dM(n,null)}}),this.h.G(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(e){dI(o,e)}),this.h.G(this.i,"ended",function(){o.m.contentComplete()}),this.h.Ba(this.i,"play",function(){o.F=!0})}function dI(e,t){t.getError(),t=new Map().set("originalEvent",t),e.l(new i9("ad-error",t)),dM(e,null),e.l(new i9("ad-cue-points-changed",new Map().set("cuepoints",[])))}function dC(e,t){var n=t.getAd();n?(e.j=new dx(n,e.g,e.i),t.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||e.o.supportsMultipleMediaElements||e.l(new i9("ad-content-pause-requested")),t=new Map().set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new i9("ad-started",t)),e.j.isLinear()&&(e.u.setAttribute("ad-active","true"),e.o.customPlayheadTracker||e.i.pause(),e.i.muted?((t=e.j).j=e.i.volume,t.h.setVolume(0)):e.j.setVolume(e.i.volume))):Y("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function dM(e,t){t&&t.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!e.o.supportsMultipleMediaElements&&e.l(new i9("ad-content-resume-requested")),e.l(new i9("ad-stopped",new Map().set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.u.removeAttribute("ad-active"),e.o.customPlayheadTracker||e.i.ended||e.i.play())}function dP(e,t,n,i,r,a){this.g=e,this.h=t,this.j=(this.i=t.isSkippable)?t.skipOffset||0:t.skipOffset,this.l=t.skipFor,this.B=n,this.o=i,this.m=r,this.u=a,this.C=t.overlay}function dD(e,t,n){this.g=e,this.j=t,this.h=n,this.i=null==e.overlay}function dR(e,t,n,i){function r(e){return!!e&&(!!e.overlay||(a.g.ended?e.post:!a.g.paused))}var a=this;this.N=null,this.D=e,this.C=t,this.g=n,this.H=null,this.u=!0,this.h=this.g,this.i=i,this.na=new Set,this.V=new Set,this.I=new Set,this.F=new Map,this.M=new Map,this.j=new l_,dH(this),this.J=new ee,this.l=new ee,this.K=!1,this.ka=this.o=this.B=this.m=null,this.ma=!1,this.P=-1,this.ia=function(){if(!a.K&&a.m&&!a.C.wa()){a.m=a.g.currentTime;var e=dj(a);e&&r(e)&&dU(a,e,1,1,Date.now())}},this.Y=function(){if(!(a.K||a.m||a.C.wa())){a.g.paused||(a.m=a.g.currentTime);var e=dj(a,!0);e||(e=dj(a)),e&&r(e)&&dU(a,e,1,1,Date.now())}},this.ua=function(){if(!a.K&&a.m&&!a.C.wa()){var e=a.g.currentTime;a.B&&!a.B.pre&&!a.B.post&&e<(a.B.endTime||a.B.startTime)&&(a.B=null)}},this.T=new n4(this.ia),this.O=new n4(function(){var e,t,n,i,r,o,s,u,l,d,c;return L(function(h){switch(h.h){case 1:if(!a.I.size||null==a.m){h.A(0);break}if((e=a.C.Ue())==dm||e==dv)return h.return();t=!1,n=Array.from(a.I),i=a.C.Ma(),o=(r=S(n)).next();case 3:if(o.done){h.A(5);break}if((s=o.value)==a.B){h.A(4);break}if(u=s.endTime||s.startTime,!(i.start-u>=1)){(l=s.startTime-a.m)>0&&l<=10&&(!a.F.has(s)&&dG(s)&&a.F.set(s,a.j.preload(s.uri,null,s.mimeType||void 0)),dW(a,s)),h.A(4);break}if(!a.F.has(s)){h.A(7);break}return h.g(a.F.get(s),8);case 8:(d=h.i)&&d.destroy(),a.F.delete(s);case 7:dz(a,s),c=s.id||JSON.stringify(s),a.V.has(c)&&a.V.delete(c),a.I.delete(s),dL(a),s.overlay||(t=!0);case 4:o=r.next(),h.A(3);break;case 5:t&&dV(a),h.j()}})}),this.configure(this.C.getConfiguration().ads)}function dL(e){e.ma&&!e.I.size&&(e.J.Na(e.g,"playing",e.Y),e.J.Na(e.g,"timeupdate",e.Y),e.J.Na(e.g,"seeked",e.ua),e.J.Na(e.g,"ended",e.ia),-1!=e.P&&(e.g.cancelVideoFrameCallback(e.P),e.P=-1),e.T&&e.T.stop(),e.O&&e.O.stop(),e.ma=!1)}function dO(e){if(e.D&&e.N){var t=e.N.supportsMultipleMediaElements,n=e.g;n.controls?t=!1:n.webkitPresentationMode&&"inline"!==n.webkitPresentationMode&&(t=!1),e.u==t&&(e.u=!t,e.u?(e.h=e.g,e.H&&(e.H.parentElement&&e.D.removeChild(e.H),e.H=null)):(e.H||((t=document.createElement(e.g.tagName)).autoplay=!0,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.display="none",t.setAttribute("playsinline",""),e.H=t),e.h=e.H))}else e.u=!0}function dN(e,t){var n,i,r,a,o,s,u,l;L(function(d){switch(d.h){case 1:n=!1,r=(i=S(t)).next();case 2:if(r.done){d.A(4);break}if(!(a=r.value).uri){Y("Missing URL in interstitial",a),d.A(3);break}if(a.mimeType){d.A(5);break}return d.m(6),o=e.j.Jb(),d.g(sX(a.uri,o,e.C.getConfiguration().streaming.retryParameters),8);case 8:a.mimeType=d.i,d.o(5);break;case 6:d.l();case 5:if(s=a.id||JSON.stringify(a),e.V.has(s)){d.A(3);break}a.loop&&!a.overlay&&Y("Loop is only supported in overlay interstitials",a),a.overlay||(n=!0),e.V.add(s),e.I.add(a),u=!1,a.pre&&null==e.m?u=!0:0!=a.startTime||a.canJump?null!=e.m&&(l=a.startTime-e.m)>0&&l<=10&&(u=!0):u=!0,u&&(!e.F.has(a)&&dG(a)&&e.F.set(a,e.j.preload(a.uri,null,a.mimeType||void 0)),dW(e,a));case 3:r=i.next(),d.A(2);break;case 4:n&&dV(e),function(e){if(!e.ma&&e.I.size){if(e.J.G(e.g,"playing",e.Y),e.J.G(e.g,"timeupdate",e.Y),e.J.G(e.g,"seeked",e.ua),e.J.G(e.g,"ended",e.ia),"requestVideoFrameCallback"in e.g&&!dK()){var t=e.g,n=function(){-1!=e.P&&(e.ia(),-1!=e.P&&(e.P=t.requestVideoFrameCallback(n)))};e.P=t.requestVideoFrameCallback(n)}else e.T.Ha(.025);e.O&&e.O.Ha(1),e.ma=!0}}(e),d.j()}})}function dj(e,t,n){t=void 0!==t&&t,n=void 0===n?null:n;var i=0,r=null;if(e.I.size&&null!=e.m){var a=e.g.ended,o=Array.from(e.I).sort(function(e,t){return t.startTime-e.startTime}),s=o;for(s=(o=S(s=t?o.filter(function(e){return e.pre}):a?o.filter(function(e){return e.post}):o.filter(function(e){return!e.pre&&!e.post}))).next();!s.done;s=o.next()){s=s.value;var u=!1;if(t)u=s.pre;else if(a)u=s.post;else if(!s.pre&&!s.post){var l=e.m-Math.round(1e3*s.startTime)/1e3,d=1;e.N.allowStartInMiddleOfInterstitial&&s.endTime&&s.endTime!=1/0&&(d=s.endTime-s.startTime),(l>0||0==l&&0==e.m)&&(l<=d||!s.canJump)&&(u=null!=n||!e.B||!!e.B.pre||!!e.B.post||!(e.B.startTime>=s.startTime))}u&&(!e.B||s.startTime>=e.B.startTime)&&(i==(n||0)?r=s:r&&!s.canJump&&Math.round(1e3*s.startTime)/1e3-Math.round(1e3*r.startTime)/1e3>.001&&(r=s,i=0),i++)}}return r}function dU(e,t,n,i,r,a){var o,s,u,l,d,c,h,p,f,g,m,v,y,b,w,T,S,x,A,E,k,I,C,M;a=void 0===a?0:a,e.B=t,dO(e),e.u||!e.D||e.h.parentElement||e.D.appendChild(e.h),1==i&&1==n&&(n=Array.from(e.I).filter(function(e){return t.pre?e.pre==t.pre:t.post?e.post==t.post:.001>Math.abs(e.startTime-t.startTime)}).length),t.once&&(a++,e.I.delete(t),dL(e),t.overlay||dV(e)),t.mimeType&&(t.mimeType.startsWith("image/")||"text/html"===t.mimeType)?t.overlay?function(e,t,n,i,r){function a(){e.o&&(e.o.stop(),e.o=null),e.D.removeChild(u),dF(e,t),e.i(new i9("ad-stopped")),e.l.Ua();var a=dj(e,t.pre,i-r);a?dU(e,a,n,++i,Date.now(),r):e.K=!1}e.K=!0;var o=t.overlay,s="text/html"==t.mimeType?"iframe":"img",u=document.createElement(s);u.style.objectFit="contain",u.style.position="absolute",u.style.border="none",dB(e,t),e.i(new i9("ad-started",new Map().set("ad",new dD(t,n,i)))),"iframe"==s?u.src=t.uri:(u.src=t.uri,u.onerror=function(t){e.i(new i9("ad-error",new Map().set("originalEvent",t))),a()});var l=o.viewport,d=o.topLeft;o=o.size,0==l.x&&0==l.y?(u.width=t.overlay.size.x,u.height=t.overlay.size.y,u.style.bottom="10%",u.style.left="0",u.style.right="0",u.style.width="100%",t.overlay.size.y||"iframe"!=s||(u.style.height="auto")):(u.style.height=o.y/l.y*100+"%",u.style.left=d.x/l.x*100+"%",u.style.top=d.y/l.y*100+"%",u.style.width=o.x/l.x*100+"%"),e.D.appendChild(u);var c=Date.now();e.o&&e.o.stop(),e.o=new n4(function(){t.playoutLimit&&(Date.now()-c)/1e3>t.playoutLimit||t.endTime&&e.g.currentTime>t.endTime?(e.i(new i9("ad-complete")),a()):e.g.currentTime<t.startTime&&(e.i(new i9("ad-skipped")),a())}),t.playoutLimit&&!t.endTime?e.o.ea(t.playoutLimit):t.endTime&&e.o.Ha(.025),e.l.G(e.g,"seeked",function(){var n=e.g.currentTime;(n<t.startTime||t.endTime&&n>t.endTime)&&(e.o&&e.o.stop(),e.i(new i9("ad-skipped")),a())})}(e,t,n,i,a):Y("Unsupported interstitial",t):e.u&&t.overlay?Y("Unsupported interstitial",t):(o=n,s=i,u=r,l=a,L(function(n){switch(n.h){case 1:if(d=Date.now(),e.K=!0,c=!1,h=function(){if(!e.u&&!t.overlay&&null==t.resumeOffset)if(t.timelineRange&&t.endTime&&t.endTime!=1/0)e.g.currentTime!=t.endTime&&(e.g.currentTime=t.endTime);else{var n=Date.now();e.g.currentTime+=(n-u)/1e3,u=n}},p=function(n){var i,r;
1return L(function(a){if(1==a.h){if(h(),i=dj(e,t.pre,s-l),n&&t.groupId)for(;i&&i.groupId==t.groupId;)s++,i=dj(e,t.pre,s-l);return(e.o&&(!t.groupId||i&&i.groupId!=t.groupId)&&(e.o.stop(),e.o=null),dF(e,t),i&&!i.overlay)?a.A(2):(t.post&&(e.m=null,e.B=null),e.u?a.g(e.j.detach(),4):a.g(e.j.vc(),4))}2!=a.h&&(e.u&&(null!=(r=t.resumeOffset)||(r=t.timelineRange&&t.endTime&&t.endTime!=1/0?t.endTime-(e.m||0):(Date.now()-u)/1e3),e.i(new i9("ad-content-resume-requested",new Map().set("offset",r)))),e.i(new i9("ad-stopped")),e.l.Ua(),e.K=!1,e.u?dV(e):(e.h.style.display="none",h(),e.g.ended||e.g.play())),dO(e),i&&(e.i(new i9("ad-stopped")),e.l.Ua(),dU(e,i,o,++s,u,l)),a.j()})},f=function(t){return L(function(n){return c?n.return():(c=!0,e.i(new i9("ad-error",new Map().set("originalEvent",t))),n.g(p(!1),0))})},g=function(){return L(function(t){if(1==t.h)return c?t.return():(c=!0,t.g(p(!1),2));e.i(new i9("ad-complete")),t.j()})},e.ka=function(){return L(function(t){return c?t.return():(c=!0,e.i(new i9("ad-skipped")),t.g(p(!0),0))})},m=new dP(e.h,t,e.ka,o,s,!e.u),e.u||(m.setMuted(e.g.muted),m.setVolume(e.g.volume)),e.i(new i9("ad-started",new Map().set("ad",m))),(v=m.canSkipNow())&&e.i(new i9("ad-skip-state-changed")),e.l.Ba(e.j,"error",f),e.l.G(e.h,"timeupdate",function(){if(e.h.duration){var n=m.canSkipNow();v!=n&&m.getRemainingTime()>0&&m.getDuration()>0&&e.i(new i9("ad-skip-state-changed")),v=n,!e.u&&!t.overlay&&null==t.resumeOffset&&t.timelineRange&&t.endTime&&t.endTime!=1/0&&e.g.currentTime!=t.endTime&&e.C.Ma().end>=t.endTime&&(e.g.currentTime=t.endTime)}}),e.l.Ba(e.j,"firstquartile",function(){h(),e.i(new i9("ad-first-quartile"))}),e.l.Ba(e.j,"midpoint",function(){h(),e.i(new i9("ad-midpoint"))}),e.l.Ba(e.j,"thirdquartile",function(){h(),e.i(new i9("ad-third-quartile"))}),e.l.Ba(e.j,"complete",g),e.l.G(e.h,"play",function(){e.i(new i9("ad-resumed"))}),e.l.G(e.h,"pause",function(){var t=e.j.getConfiguration();e.h.currentTime>=t.playRangeEnd?g():e.i(new i9("ad-paused"))}),e.l.G(e.h,"volumechange",function(){e.h.muted?e.i(new i9("ad-muted")):e.i(new i9("ad-volume-changed")),e.u||(e.g.volume=e.h.volume,e.g.muted=e.h.muted)}),!e.u||1!=s){n.A(2);break}return e.i(new i9("ad-content-pause-requested",new Map().set("saveLivePosition",!0))),y=new i1,b=function(t){return L(function(n){if(1==n.h)return"detach"!=t.state?n.A(0):dK()?n.g(new Promise(function(e){return new n4(e).ea(.1)}),3):n.A(3);y.resolve(),e.l.Na(e.C,"onstatechange",b),n.j()})},e.l.G(e.C,"onstatechange",b),n.g(y,2);case 2:return dB(e,t),e.u||(e.h.style.display="",t.overlay?(e.h.loop=t.loop,w=t.overlay.viewport,T=t.overlay.topLeft,S=t.overlay.size,e.h.style.height=S.y/w.y*100+"%",e.h.style.left=T.x/w.x*100+"%",e.h.style.top=T.y/w.y*100+"%",e.h.style.width=S.x/w.x*100+"%"):(e.g.pause(),null!=t.resumeOffset&&0!=t.resumeOffset&&(e.g.currentTime+=t.resumeOffset),e.h.loop=!1,e.h.style.height="100%",e.h.style.left="0",e.h.style.top="0",e.h.style.width="100%")),n.m(4),dH(e),t.startTime&&t.endTime&&t.endTime!=1/0&&t.startTime!=t.endTime&&(x=t.endTime-t.startTime)>0&&e.j.configure("playRangeEnd",x),t.playoutLimit&&!e.o&&(e.o=new n4(function(){e.ka()}).ea(t.playoutLimit),e.j.configure("playRangeEnd",t.playoutLimit)),n.g(e.j.Pb(e.h),6);case 6:return A=null,t.pre||t.post||!e.N.allowStartInMiddleOfInterstitial||null==e.m||Math.abs(E=e.m-t.startTime)>.25&&(A=E),e.F.has(t)?n.g(e.F.get(t),10):n.g(e.j.load(t.uri,A,t.mimeType||void 0),8);case 10:return k=n.i,e.F.delete(t),k?n.g(e.j.load(k),8):n.g(e.j.load(t.uri,A,t.mimeType||void 0),8);case 8:e.h.play(),I=(Date.now()-d)/1e3,e.i(new i9("ads-loaded",new Map().set("loadTime",I))),e.u&&e.g.play(),t.overlay&&(t.pre||t.post||e.C.U()&&!(t.startTime>0)||(C=function(){var n=e.g.currentTime-t.startTime;Math.abs(n-e.h.currentTime)>.1&&(e.h.currentTime=n)},e.l.Ba(e.h,"playing",C),e.l.G(e.g,"seeking",C)),e.l.G(e.g,"seeked",function(){var n=e.g.currentTime;(n<t.startTime||t.endTime&&n>t.endTime)&&e.ka()})),n.o(0);break;case 4:if(M=n.l(),!e.K)return n.return();f(M),n.j()}}))}function dB(e,t){if(t.displayOnBackground&&(e.g.style.zIndex="1"),null!=t.currentVideo){var n=t.currentVideo;e.g.style.transformOrigin="top left";var i=!0,r=[],a=n.topLeft.x/n.viewport.x*100;a>0&&a<=100&&(r.push("translateX("+a+"%)"),i=!1),(a=n.topLeft.y/n.viewport.y*100)>0&&a<=100&&(r.push("translateY("+a+"%)"),i=!1),(a=n.size.x/n.viewport.x)<1&&r.push("scaleX("+a+")"),n=n.size.y/n.viewport.y,a<1&&r.push("scaleY("+n+")"),r.length&&(e.g.style.transform=r.join(" ")),i&&(e.g.style.transition="transform 250m
1s")}e.D&&(e.D.style.pointerEvents="none",t.background&&(e.D.style.background=t.background)),e.H&&(e.H.style.background=t.overlay?"":"rgb(0, 0, 0)")}function dF(e,t){(!t||t.displayOnBackground)&&(e.g.style.zIndex=""),t&&null==t.currentVideo||(e.g.style.transformOrigin="",e.g.style.transition="",e.g.style.transform=""),e.D&&(e.D.style.pointerEvents="",!t||t.background)&&(e.D.style.background=""),e.H&&(e.H.style.background="")}function dV(e){for(var t=[],n=S(e.I),i=n.next(),r={};!i.done;r={uc:void 0},i=n.next())(i=i.value).overlay||(r.uc={start:i.startTime,end:null},i.pre?(r.uc.start=0,r.uc.end=null):i.post?(r.uc.start=-1,r.uc.end=null):i.timelineRange&&(r.uc.end=i.endTime),t.find(function(e){return function(t){return e.uc.start==t.start&&e.uc.end==t.end}}(r))||t.push(r.uc));e.i(new i9("ad-cue-points-changed",new Map().set("cuepoints",t)))}function dH(e){e.j.configure(e.C.ei()),e.j.configure("ads.disableHLSInterstitial",!0),e.j.configure("ads.disableDASHInterstitial",!0),e.j.configure("playRangeEnd",1/0),ro(e.C.Jb(),e.j.Jb())}function dq(e,t,n){var i,r,a;return L(function(o){return 1==o.h?(i=rs([t],i0()),r=e.C.Jb().request(7,i,n),o.g(r.promise,2)):(a=o.i,o.return(a.data))})}function dG(e){return!(e=e.mimeType)||!e.startsWith("image/")&&"text/html"!==e}function dK(){var e=er().Ta();return"TV"==e||"CONSOLE"==e||"CAST"==e}function dW(e,t){if(!(e.M.has(t)||e.N&&!e.N.allowPreloadOnDomElements)){var n=function(e){var t=document.createElement("link");return t.rel="preload",t.href=e,t.as="image",document.head.appendChild(t),t},i=[];if(t.background){var r=t.background.match(/url\(('|")?([^'"()]+)('|")\)?/);r&&i.push(n(r[2]))}t.mimeType&&t.mimeType.startsWith("image/")&&i.push(n(t.uri)),e.M.set(t,i)}}function dz(e,t){if(e.M.has(t)){var n=e.M.get(t);n=S(n);for(var i=n.next();!i.done;i=n.next())(i=i.value).parentNode.removeChild(i);e.M.delete(t)}}function dX(e,t,n,i,r){this.h=e,this.j=tD(this.h.skipOffset),this.g=r,this.i=t,this.l=n,this.o=i,this.m=!1}function dY(e,t,n,i){this.C=e,this.K=t,this.h=n,this.l=null,this.P=NaN,this.i=i,this.J=!1,this.B=null,this.j=[],this.N=[],this.M=this.D=this.g=null,this.F=new Map,this.m=[],this.u=[],this.H="",this.O=!0,this.I="",this.o=new ee}function dJ(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function dQ(e){var t=e.h.currentTime;if(0!=t&&null==e.B){for(var n,i,r=S(e.j),a=r.next();!a.done;a=r.next()){a=a.value;for(var o=S(a.ads),s=o.next();!s.done;s=o.next())if(s=s.value,i){if(s.startTimeInSeconds<t&&s.startTimeInSeconds>i.startTimeInSeconds+i.durationInSeconds){i=s,n=a;break}}else s.startTimeInSeconds<t&&(i=s,n=a)}n&&i&&!e.N.includes(i.adId)&&(e.B=t,e.h.currentTime=n.startTimeInSeconds)}}function d$(e){if(e.h.duration&&(e.g||e.j.length)){var t=e.h.currentTime,n=!1;if(e.g){n=!0;var i=e.D,r=i.startTimeInSeconds+.5*i.durationInSeconds,a=i.startTimeInSeconds+.75*i.durationInSeconds;t>=i.startTimeInSeconds+.25*i.durationInSeconds&&!e.u.includes("firstQuartile")?(e.u.push("firstQuartile"),d1(e,"firstQuartile")):t>=r&&!e.u.includes("midpoint")?(e.u.push("midpoint"),d1(e,"midpoint")):t>=a&&!e.u.includes("thirdQuartile")&&(e.u.push("thirdQuartile"),d1(e,"thirdQuartile")),i=e.g.getRemainingTime(),r=e.g.getDuration(),e.g.canSkipNow()&&i>0&&r>0&&d1(e,"skipStateChanged"),r>0&&(i<=0||i>r)&&dZ(e)}if(!e.g||!e.g.isLinear()){e:for(r=(i=S(e.j)).next();!r.done&&(r=r.value,!(e.g&&e.g.isLinear()));r=i.next())for(a=0;a<r.ads.length;a++){var o=r.ads[a],s=o.startTimeInSeconds+o.durationInSeconds;if(o.startTimeInSeconds<=t&&s>t){if(e.N.includes(o.adId)){if(e.h.ended)continue;e.h.currentTime=s;break e}dZ(e),e.M=r,e.g=new dX(o,a+1,r.ads.length,!0,e.h),e.D=o,0===a&&d1(e,"breakStart"),d0(e);break}}if(!e.g){for(r=(i=S(e.j)).next();!r.done&&(r=r.value,!e.g);r=i.next())for(a=0;a<r.nonLinearAdsList.length;a++)if((o=r.nonLinearAdsList[a]).nonLinearAdList.length){s=r.startTimeInSeconds;var u=e.F.get(dJ(o.nonLinearAdList[0]));if(s<=t&&u&&u.length){dZ(e),s=e,u=S(u);for(var l=u.next();!l.done;l=u.next())if((l=l.value).data.source.length){var d=document.createElement("img");d.src=l.data.source[0].url,d.style.top=(l.placeholder.top||0)+"%",d.style.height=100-(l.placeholder.top||0)+"%",d.style.left=(l.placeholder.left||0)+"%",d.style.maxWidth=100-(l.placeholder.left||0)+"%",d.style.objectFit="contain",d.style.position="absolute",s.C.appendChild(d)}e.M=r,e.g=new dX(o,a+1,r.ads.length,!1,e.h),e.D=o,0===a&&d1(e,"breakStart"),d0(e);break}}}n&&!e.g&&(t=e.h.currentTime,e.B&&e.B>t&&(e.h.currentTime=e.B),e.B=null)}}}function dZ(e){if(e.g){for(;e.C.lastChild;)e.C.removeChild(e.C.firstChild);e.J||e.N.push(e.D.adId);var t=e.g.m;(void 0===t?0:t)?d1(e,"skip"):d1(e,"complete"),t=S(e.m);for(var n=t.next();!n.done;n=t.next())n=n.value,e.o.Na(n.target,n.type,n.listener);e.m=[],e.u=[],(t=e.g.getPositionInSequence())===(n=e.g.getSequenceLength())&&d1(e,"breakEnd"),e.g=null,e.D=null,e.M=null}}function d0(e){var t=!1;e.h.paused?t=!0:(d1(e,"impression"),d1(e,"start")),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted&&d1(e,"mute")}}),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted||d1(e,"unmute")}}),e.m.push({target:e.h,type:"play",listener:function(){t?(d1(e,"impression"),d1(e,"start"),t=!1):d1(e,"resume")}}),e.m.push({target:e.h,type:"pause",listener:function(){d1(e,"pause")}});for(var n=S(e.m),i=n.next();!i.done;i=n.next())i=i.value,e.o.G(i.target,i.type,i.listener)}function d1(e,t){var n=e.D.trackingEvents.find(function(e){return e.eventType==t});if(n||(n=e.M.adBreakTrackingEvents.find(function(e){return e.eventType==t})),n){var i={type:10};n=S(n.beaconUrls);for(var r=n.next();!r.done;r=n.next())(r=r.value)&&""!=r&&((r=rs([r],i0())).method="POST",e.K.request(7,r,i))}switch(t){case"impression":e.i(new i9("ad-impression"));break;case"start":e.i(new i9("ad-started",new Map().set("ad",e.g)));break;case"mute":e.i(new i9("ad-muted"));break;case"unmute":e.i(new i9("ad-volume-changed"));break;case"resume":e.i(new i9("ad-resumed"));break;case"pause":e.i(new i9("ad-paused"));break;case"firstQuartile":e.i(new i9("ad-first-quartile"));break;case"midpoint":e.i(new i9("ad-midpoint"));break;case"thirdQuartile":e.i(new i9("ad-third-quartile"));break;case"complete":e.i(new i9("ad-complete")),e.i(new i9("ad-stopped"));break;case"skip":e.i(new i9("ad-skipped")),e.i(new i9("ad-stopped"));break;case"breakStart":e.C.setAttribute("ad-active","true");break;case"breakEnd":e.C.removeAttribute("ad-active");break;case"skipStateChanged":e.i(new i9("ad-skip-state-changed"))}}function d2(e,t){this.g=e,this.i=null,this.h=t}function d3(e,t,n,i){var r=this;this.u=e,this.l=t,this.j=null,this.F=NaN,this.i=i,this.H=!1,this.B=this.m=this.o=null,this.C="",this.D=[],this.h=new ee,(e=new google.ima.dai.api.UiSettings).setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.u,e),this.i(new i9("ima-stream-manager-loaded",new Map().set("imaStreamManager",this.g))),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(e){var t;t=e,r.i(new i9("ads-loaded",new Map().set("loadTime",Date.now()/1e3-r.F))),t=t.getStreamData().url,r.j.resolve(t),r.j=null,r.H||r.h.G(r.l,"seeked",function(){var e=r.l.currentTime;if(0!=e){r.g.streamTimeForContentTime(e);var t=r.g.previousCuePointForStreamTime(e);
1t&&!t.played&&(r.o=e,r.l.currentTime=t.start)}})}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){r.C.length?r.j.resolve(r.C):r.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),r.j=null}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(e){r.m=new d2(e=e.getAd(),r.l),r.B&&(r.m.i=r.B),r.i(new i9("ad-started",new Map().set("ad",r.m))),r.u.setAttribute("ad-active","true")}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){r.u.removeAttribute("ad-active");var e=r.l.currentTime;r.o&&r.o>e&&(r.l.currentTime=r.o,r.o=null)}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(e){r.B=e.getStreamData().adProgressData,r.m&&(r.m.i=r.B)}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){r.i(new i9("ad-first-quartile"))}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){r.i(new i9("ad-midpoint"))}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){r.i(new i9("ad-third-quartile"))}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){r.i(new i9("ad-complete")),r.i(new i9("ad-stopped")),r.u.removeAttribute("ad-active"),r.m=null}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){r.i(new i9("ad-skipped")),r.i(new i9("ad-stopped"))}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(e){var t=e.getStreamData();e=[],t=S(t.cuepoints);for(var n=t.next();!n.done;n=t.next())n=n.value,e.push({start:n.start,end:n.end});r.D=e,r.i(new i9("ad-cue-points-changed",new Map().set("cuepoints",e)))})}function d4(){rt.call(this),this.h=this.i=this.j=this.g=null,this.m=new dS,this.o=navigator.language,this.l=null}function d5(e,t){if(t&&t.type)switch(t.type){case"ads-loaded":e.m.g.push(t.loadTime);break;case"ad-started":e.m.h++;var n=t.ad;n&&!n.isLinear()&&e.m.j++;break;case"ad-complete":e.m.l++;break;case"ad-skipped":e.m.m++;break;case"ad-error":e.m.i++}e.dispatchEvent(t)}function d6(e){return JSON.stringify(e,function(e,t){if("function"!=typeof t){if(e=t instanceof i9,t instanceof Event||e){var n={};for(r in t){var i=t[r];i&&"object"==typeof i?"detail"==r?n[r]=i:i instanceof Event||i instanceof i9?n[r]=d6(i):e&&Array.isArray(i)&&(n[r]=i):r in Event||(n[r]=i)}return n}if(t instanceof Error){var r=new Set(["name","message","stack"]);for(n in t)r.add(n);for(n=(e=S(Object.getOwnPropertyNames(t))).next();!n.done;n=e.next())r.add(n.value);for(e={},n=(r=S(r)).next();!n.done;n=r.next())e[n=n.value]=t[n];t={__type__:"Error",contents:e}}else if(t instanceof TimeRanges){for(r={__type__:"TimeRanges",length:t.length,start:[],end:[]},e=(t=S(a0(t))).next();!e.done;e=t.next())n=(e=e.value).end,r.start.push(e.start),r.end.push(n);t=r}else t=ArrayBuffer.isView(t)&&1===t.BYTES_PER_ELEMENT?{__type__:"Uint8Array",entries:Array.from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:t<0?"-Infinity":"Infinity":t;return t}})}function d8(e){return JSON.parse(e,function(e,t){if("NaN"==t)var n,i=NaN;else if("-Infinity"==t)i=-1/0;else if("Infinity"==t)i=1/0;else if(t&&"object"==typeof t&&"TimeRanges"==t.__type__)i={length:(n=t).length,start:function(e){return n.start[e]},end:function(e){return n.end[e]}};else if(t&&"object"==typeof t&&"Uint8Array"==t.__type__)i=new Uint8Array(t.entries);else if(t&&"object"==typeof t&&"Error"==t.__type__){for(i in t=Error((e=t.contents).message),e)t[i]=e[i];i=t}else i=t;return i})}(p=dx.prototype).needsSkipUI=function(){return!1},p.isClientRendering=function(){return!0},p.hasCustomClick=function(){return!0},p.isUsingAnotherMediaElement=function(){return!0},p.getDuration=function(){return this.g.getDuration()},p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},p.getRemainingTime=function(){return this.h.getRemainingTime()},p.isPaused=function(){return this.i},p.isSkippable=function(){return this.g.getSkipTimeOffset()>=0},p.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return Math.max(e=this.getRemainingTime()-e,0)},p.canSkipNow=function(){return this.h.getAdSkippableState()},p.skip=function(){return this.h.skip()},p.pause=function(){return this.h.pause()},p.play=function(){return this.h.resume()},p.getVolume=function(){return this.h.getVolume()},p.setVolume=function(e){return this.m.volume=e,this.h.setVolume(e)},p.isMuted=function(){return 0==this.h.getVolume()},p.isLinear=function(){return this.g.isLinear()},p.resize=function(e,t){this.h.resize(e,t)},p.setMuted=function(e){(this.m.muted=e)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)},p.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},p.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},p.getTitle=function(){return this.g.getTitle()},p.getDescription=function(){return this.g.getDescription()},p.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},p.getVastAdId=function(){return""},p.getAdId=function(){return this.g.getAdId()},p.getCreativeAdId=function(){return this.g.getCreativeAdId()},p.getAdvertiserName=function(){return this.g.getAdvertiserName()},p.getMediaUrl=function(){return this.g.getMediaUrl()},p.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},p.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},p.release=function(){this.h=this.g=null},q("shaka.ads.ClientSideAd",dx),dx.prototype.release=dx.prototype.release,dx.prototype.getPodIndex=dx.prototype.getPodIndex,dx.prototype.getTimeOffset=dx.prototype.getTimeOffset,dx.prototype.getMediaUrl=dx.prototype.getMediaUrl,dx.prototype.getAdvertiserName=dx.prototype.getAdvertiserName,dx.prototype.getCreativeAdId=dx.prototype.getCreativeAdId,dx.prototype.getAdId=dx.prototype.getAdId,dx.prototype.getVastAdId=dx.prototype.getVastAdId,dx.prototype.getVastMediaWidth=dx.prototype.getVastMediaWidth,dx.prototype.getVastMediaHeight=dx.prototype.getVastMediaHeight,dx.prototype.getVastMediaBitrate=dx.prototype.getVastMediaBitrate,dx.prototype.getDescription=dx.prototype.getDescription,dx.prototype.getTitle=dx.prototype.getTitle,dx.prototype.getPositionInSequence=dx.prototype.getPositionInSequence,dx.prototype.getSequenceLength=dx.prototype.getSequenceLength,dx.prototype.setMuted=dx.prototype.setMuted,dx.prototype.resize=dx.prototype.resize,dx.prototype.isLinear=dx.prototype.isLinear,dx.prototype.isMuted=dx.prototype.isMuted,dx.prototype.setVolume=dx.prototype.setVolume,dx.prototype.getVolume=dx.prototype.getVolume,dx.prototype.play=dx.prototype.play,dx.prototype.pause=dx.prototype.pause,dx.prototype.skip=dx.prototype.skip,dx.prototype.canSkipNow=dx.prototype.canSkipNow,dx.prototype.getTimeUntilSkippable=dx.prototype.getTimeUntilSkippable,dx.prototype.isSkippable=dx.prototype.isSkippable,dx.prototype.isPaused=dx.prototype.isPaused,dx.prototype.getRemainingTime=dx.prototype.getRemainingTime,dx.prototype.getMinSuggestedDuration=dx.prototype.getMinSuggestedDuration,dx.prototype.getDuration=dx.prototype.getDuration,dx.prototype.isUsingAnotherMediaElement=dx.prototype.isUsingAnotherMediaElement,dx.prototype.hasCu
1stomClick=dx.prototype.hasCustomClick,dx.prototype.isClientRendering=dx.prototype.isClientRendering,dx.prototype.needsSkipUI=dx.prototype.needsSkipUI,q("shaka.ads.Utils",dA),dA.ADS_LOADED="ads-loaded",dA.AD_STARTED="ad-started",dA.AD_FIRST_QUARTILE="ad-first-quartile",dA.AD_MIDPOINT="ad-midpoint",dA.AD_THIRD_QUARTILE="ad-third-quartile",dA.AD_COMPLETE="ad-complete",dA.AD_STOPPED="ad-stopped",dA.AD_SKIPPED="ad-skipped",dA.AD_VOLUME_CHANGED="ad-volume-changed",dA.AD_MUTED="ad-muted",dA.AD_PAUSED="ad-paused",dA.AD_RESUMED="ad-resumed",dA.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",dA.CUEPOINTS_CHANGED="ad-cue-points-changed",dA.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",dA.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",dA.AD_CLICKED="ad-clicked",dA.AD_PROGRESS="ad-progress",dA.AD_BUFFERING="ad-buffering",dA.AD_IMPRESSION="ad-impression",dA.AD_DURATION_CHANGED="ad-duration-changed",dA.AD_CLOSED="ad-closed",dA.AD_LOADED="ad-loaded",dA.ALL_ADS_COMPLETED="all-ads-completed",dA.AD_LINEAR_CHANGED="ad-linear-changed",dA.AD_METADATA="ad-metadata",dA.AD_RECOVERABLE_ERROR="ad-recoverable-error",dA.AD_ERROR="ad-error",dA.AD_BREAK_READY="ad-break-ready",dA.AD_INTERACTION="ad-interaction",dA.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",dA.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",dA.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",dk.prototype.configure=function(e){this.o=e},dk.prototype.stop=function(){this.g&&this.g.stop(),this.u&&a4(this.u)},dk.prototype.release=function(){this.stop(),this.B&&this.B.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.m.destroy(),this.D.destroy()},(p=dP.prototype).needsSkipUI=function(){return!0},p.isClientRendering=function(){return!0},p.hasCustomClick=function(){return!1},p.isUsingAnotherMediaElement=function(){return this.u},p.getDuration=function(){var e=this.g.duration;return isNaN(e)?-1:e},p.getMinSuggestedDuration=function(){return this.getDuration()},p.getRemainingTime=function(){var e=this.g.duration;return isNaN(e)?-1:e-this.g.currentTime},p.isPaused=function(){return this.g.paused},p.isSkippable=function(){return this.i&&null!=this.l?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.i},p.getTimeUntilSkippable=function(){return this.isSkippable()?Math.max(this.getRemainingTime()+this.j-this.getDuration(),0):Math.max(this.getRemainingTime(),0)},p.canSkipNow=function(){return this.i&&0==this.getTimeUntilSkippable()},p.skip=function(){this.canSkipNow()&&this.B()},p.pause=function(){return this.g.pause()},p.play=function(){return this.g.play()},p.getVolume=function(){return this.g.volume},p.setVolume=function(e){this.g.volume=e},p.isMuted=function(){return this.g.muted},p.isLinear=function(){return null==this.C},p.resize=function(){},p.setMuted=function(e){this.g.muted=e},p.getSequenceLength=function(){return this.o},p.getPositionInSequence=function(){return this.m},p.getTitle=function(){return""},p.getDescription=function(){return""},p.getVastMediaBitrate=function(){return 0},p.getVastMediaHeight=function(){return 0},p.getVastMediaWidth=function(){return 0},p.getVastAdId=function(){return""},p.getAdId=function(){return this.h.id||""},p.getCreativeAdId=function(){return""},p.getAdvertiserName=function(){return""},p.getMediaUrl=function(){return this.h.uri},p.getTimeOffset=function(){return this.h.pre?0:this.h.post?-1:this.h.startTime},p.getPodIndex=function(){return 0},p.release=function(){this.g=null},q("shaka.ads.InterstitialAd",dP),dP.prototype.release=dP.prototype.release,dP.prototype.getPodIndex=dP.prototype.getPodIndex,dP.prototype.getTimeOffset=dP.prototype.getTimeOffset,dP.prototype.getMediaUrl=dP.prototype.getMediaUrl,dP.prototype.getAdvertiserName=dP.prototype.getAdvertiserName,dP.prototype.getCreativeAdId=dP.prototype.getCreativeAdId,dP.prototype.getAdId=dP.prototype.getAdId,dP.prototype.getVastAdId=dP.prototype.getVastAdId,dP.prototype.getVastMediaWidth=dP.prototype.getVastMediaWidth,dP.prototype.getVastMediaHeight=dP.prototype.getVastMediaHeight,dP.prototype.getVastMediaBitrate=dP.prototype.getVastMediaBitrate,dP.prototype.getDescription=dP.prototype.getDescription,dP.prototype.getTitle=dP.prototype.getTitle,dP.prototype.getPositionInSequence=dP.prototype.getPositionInSequence,dP.prototype.getSequenceLength=dP.prototype.getSequenceLength,dP.prototype.setMuted=dP.prototype.setMuted,dP.prototype.resize=dP.prototype.resize,dP.prototype.isLinear=dP.prototype.isLinear,dP.prototype.isMuted=dP.prototype.isMuted,dP.prototype.setVolume=dP.prototype.setVolume,dP.prototype.getVolume=dP.prototype.getVolume,dP.prototype.play=dP.prototype.play,dP.prototype.pause=dP.prototype.pause,dP.prototype.skip=dP.prototype.skip,dP.prototype.canSkipNow=dP.prototype.canSkipNow,dP.prototype.getTimeUntilSkippable=dP.prototype.getTimeUntilSkippable,dP.prototype.isSkippable=dP.prototype.isSkippable,dP.prototype.isPaused=dP.prototype.isPaused,dP.prototype.getRemainingTime=dP.prototype.getRemainingTime,dP.prototype.getMinSuggestedDuration=dP.prototype.getMinSuggestedDuration,dP.prototype.getDuration=dP.prototype.getDuration,dP.prototype.isUsingAnotherMediaElement=dP.prototype.isUsingAnotherMediaElement,dP.prototype.hasCu
1stomClick=dP.prototype.hasCustomClick,dP.prototype.isClientRendering=dP.prototype.isClientRendering,dP.prototype.needsSkipUI=dP.prototype.needsSkipUI,(p=dD.prototype).needsSkipUI=function(){return!0},p.isClientRendering=function(){return!0},p.hasCustomClick=function(){return!1},p.isUsingAnotherMediaElement=function(){return!1},p.getDuration=function(){return -1},p.getMinSuggestedDuration=function(){return this.getDuration()},p.getRemainingTime=function(){return -1},p.isPaused=function(){return!1},p.isSkippable=function(){return!1},p.getTimeUntilSkippable=function(){return 0},p.canSkipNow=function(){return!1},p.skip=function(){},p.pause=function(){},p.play=function(){},p.getVolume=function(){return 1},p.setVolume=function(){},p.isMuted=function(){return!1},p.isLinear=function(){return this.i},p.resize=function(){},p.setMuted=function(){},p.getSequenceLength=function(){return this.j},p.getPositionInSequence=function(){return this.h},p.getTitle=function(){return""},p.getDescription=function(){return""},p.getVastMediaBitrate=function(){return 0},p.getVastMediaHeight=function(){return 0},p.getVastMediaWidth=function(){return 0},p.getVastAdId=function(){return""},p.getAdId=function(){return this.g.id||""},p.getCreativeAdId=function(){return""},p.getAdvertiserName=function(){return""},p.getMediaUrl=function(){return this.g.uri},p.getTimeOffset=function(){return this.g.pre?0:this.g.post?-1:this.g.startTime},p.getPodIndex=function(){return 0},p.release=function(){},q("shaka.ads.InterstitialStaticAd",dD),dD.prototype.release=dD.prototype.release,dD.prototype.getPodIndex=dD.prototype.getPodIndex,dD.prototype.getTimeOffset=dD.prototype.getTimeOffset,dD.prototype.getMediaUrl=dD.prototype.getMediaUrl,dD.prototype.getAdvertiserName=dD.prototype.getAdvertiserName,dD.prototype.getCreativeAdId=dD.prototype.getCreativeAdId,dD.prototype.getAdId=dD.prototype.getAdId,dD.prototype.getVastAdId=dD.prototype.getVastAdId,dD.prototype.getVastMediaWidth=dD.prototype.getVastMediaWidth,dD.prototype.getVastMediaHeight=dD.prototype.getVastMediaHeight,dD.prototype.getVastMediaBitrate=dD.prototype.getVastMediaBitrate,dD.prototype.getDescription=dD.prototype.getDescription,dD.prototype.getTitle=dD.prototype.getTitle,dD.prototype.getPositionInSequence=dD.prototype.getPositionInSequence,dD.prototype.getSequenceLength=dD.prototype.getSequenceLength,dD.prototype.setMuted=dD.prototype.setMuted,dD.prototype.resize=dD.prototype.resize,dD.prototype.isLinear=dD.prototype.isLinear,dD.prototype.isMuted=dD.prototype.isMuted,dD.prototype.setVolume=dD.prototype.setVolume,dD.prototype.getVolume=dD.prototype.getVolume,dD.prototype.play=dD.prototype.play,dD.prototype.pause=dD.prototype.pause,dD.prototype.skip=dD.prototype.skip,dD.prototype.canSkipNow=dD.prototype.canSkipNow,dD.prototype.getTimeUntilSkippable=dD.prototype.getTimeUntilSkippable,dD.prototype.isSkippable=dD.prototype.isSkippable,dD.prototype.isPaused=dD.prototype.isPaused,dD.prototype.getRemainingTime=dD.prototype.getRemainingTime,dD.prototype.getMinSuggestedDuration=dD.prototype.getMinSuggestedDuration,dD.prototype.getDuration=dD.prototype.getDuration,dD.prototype.isUsingAnotherMediaElement=dD.prototype.isUsingAnotherMediaElement,dD.prototype.hasCustomClick=dD.prototype.hasCustomClick,dD.prototype.isClientRendering=dD.prototype.isClientRendering,dD.prototype.needsSkipUI=dD.prototype.needsSkipUI,(p=dR.prototype).configure=function(e){this.N=e,this.K||dO(this)},p.stop=function(){if(this.l&&this.l.Ua(),this.na.clear(),this.V.clear(),this.I.clear(),this.j.og(),this.F.size){var e=Array.from(this.F.values());e=S(e);for(var t=e.next();!t.done;t=e.next())(t=t.value)&&t.then(function(e){e&&e.destroy()})}if(this.F.clear(),this.M.size)for(t=(e=S(e=Array.from(this.M.keys()))).next();!t.done;t=e.next())dz(this,t.value);this.M.clear(),this.j.detach(),this.K=!1,this.B=this.m=null,this.u=!0,this.h=this.g,this.H=null,dF(this),dL(this),this.D&&a4(this.D),this.o&&(this.o.stop(),this.o=null)},p.release=function(){this.stop(),this.J&&this.J.release(),this.l&&this.l.release(),this.T&&(this.T.stop(),this.T=null),this.O&&(this.O.stop(),this.O=null),this.j.destroy()},p.kd=function(){return this.j},p.addAdUrlInterstitial=function(e){var t,n,i,r,a,o,s,u,l=this;return L(function(d){if(1==d.h)return t={type:12},d.g(dq(l,e,t),2);if(3!=d.h){if(!(n=tU(d.i,"VAST,vmap:VMAP")))throw new eN(2,10,10007);if(i=[],"VAST"==n.tagName)return i=dE(n,l.m),d.A(3);if("vmap:VMAP"!=n.tagName)return d.A(3);for(r=function(e){var n;return L(function(r){if(1==r.h)return r.g(dq(l,e.uri,t),2);if(!(n=tU(r.i,"VAST")))throw new eN(2,10,10007);i.push.apply(i,x(dE(n,e.time))),r.j()})},a=[],s=(o=S(function(e){var t=[];e=S(tq(e,"vmap:AdBreak"));for(var n=e.next();!n.done;n=e.next()){var i=n.value,r=i.attributes.timeOffset;r&&(n=null,n="start"==r?null:"end"==r?1/0:tD(r),(i=tz(i,"vmap:AdSource"))&&(i=tz(i,"vmap:AdTagURI"))&&(i=tG(i))&&t.pu
1sh({time:n,uri:i}))}return t}(n))).next();!s.done;s=o.next())u=s.value,a.push(r(u));return a.length?d.g(Promise.all(a),3):d.A(3)}dN(l,i),d.j()})},(p=dX.prototype).needsSkipUI=function(){return!0},p.isClientRendering=function(){return!1},p.hasCustomClick=function(){return!1},p.isUsingAnotherMediaElement=function(){return!1},p.getDuration=function(){return this.h.durationInSeconds},p.getMinSuggestedDuration=function(){return this.getDuration()},p.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},p.isPaused=function(){return this.g.paused},p.isSkippable=function(){return"number"==typeof this.j},p.getTimeUntilSkippable=function(){return"number"!=typeof this.j?this.getRemainingTime():Math.max(this.getRemainingTime()+this.j-this.getDuration(),0)},p.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},p.skip=function(){this.m=!0,this.g.currentTime+=this.getRemainingTime()},p.pause=function(){return this.g.pause()},p.play=function(){return this.g.play()},p.getVolume=function(){return this.g.volume},p.setVolume=function(e){this.g.volume=e},p.isMuted=function(){return this.g.muted},p.isLinear=function(){return this.o},p.resize=function(){},p.setMuted=function(e){this.g.muted=e},p.getSequenceLength=function(){return this.l?this.l:1},p.getPositionInSequence=function(){return this.i?this.i:1},p.getTitle=function(){return this.h.adTitle},p.getDescription=function(){return""},p.getVastMediaBitrate=function(){return 0},p.getVastMediaHeight=function(){return 0},p.getVastMediaWidth=function(){return 0},p.getVastAdId=function(){return this.h.vastAdId||""},p.getAdId=function(){return this.h.adId},p.getCreativeAdId=function(){return this.h.creativeId},p.getAdvertiserName=function(){return""},p.getMediaUrl=function(){return null},p.getTimeOffset=function(){return 0},p.getPodIndex=function(){return 0},p.release=function(){this.l=this.i=this.g=this.h=null},q("shaka.ads.MediaTailorAd",dX),dX.prototype.release=dX.prototype.release,dX.prototype.getPodIndex=dX.prototype.getPodIndex,dX.prototype.getTimeOffset=dX.prototype.getTimeOffset,dX.prototype.getMediaUrl=dX.prototype.getMediaUrl,dX.prototype.getAdvertiserName=dX.prototype.getAdvertiserName,dX.prototype.getCreativeAdId=dX.prototype.getCreativeAdId,dX.prototype.getAdId=dX.prototype.getAdId,dX.prototype.getVastAdId=dX.prototype.getVastAdId,dX.prototype.getVastMediaWidth=dX.prototype.getVastMediaWidth,dX.prototype.getVastMediaHeight=dX.prototype.getVastMediaHeight,dX.prototype.getVastMediaBitrate=dX.prototype.getVastMediaBitrate,dX.prototype.getDescription=dX.prototype.getDescription,dX.prototype.getTitle=dX.prototype.getTitle,dX.prototype.getPositionInSequence=dX.prototype.getPositionInSequence,dX.prototype.getSequenceLength=dX.prototype.getSequenceLength,dX.prototype.setMuted=dX.prototype.setMuted,dX.prototype.resize=dX.prototype.resize,dX.prototype.isLinear=dX.prototype.isLinear,dX.prototype.isMuted=dX.prototype.isMuted,dX.prototype.setVolume=dX.prototype.setVolume,dX.prototype.getVolume=dX.prototype.getVolume,dX.prototype.play=dX.prototype.play,dX.prototype.pause=dX.prototype.pause,dX.prototype.skip=dX.prototype.skip,dX.prototype.canSkipNow=dX.prototype.canSkipNow,dX.prototype.getTimeUntilSkippable=dX.prototype.getTimeUntilSkippable,dX.prototype.isSkippable=dX.prototype.isSkippable,dX.prototype.isPaused=dX.prototype.isPaused,dX.prototype.getRemainingTime=dX.prototype.getRemainingTime,dX.prototype.getMinSuggestedDuration=dX.prototype.getMinSuggestedDuration,dX.prototype.getDuration=dX.prototype.getDuration,dX.prototype.isUsingAnotherMediaElement=dX.prototype.isUsingAnotherMediaElement,dX.prototype.hasCustomClick=dX.prototype.hasCustomClick,dX.prototype.isClientRendering=dX.prototype.isClientRendering,dX.prototype.needsSkipUI=dX.prototype.needsSkipUI,dY.prototype.stop=function(){for(var e=S(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.Na(t.target,t.type,t.listener);dZ(this),this.m=[],this.u=[],this.H="",this.O=!0,this.I="",this.B=null,this.j=[],this.N=[],this.F.clear()},dY.prototype.release=function(){this.stop(),this.o&&this.o.release()},dY.prototype.onManifestUpdated=function(e){var t,n,i,r,a,o,s,u,l,d,c,h,p,f,g;this.J=e,""!=this.H&&(t=this,n=this.H,i=this.O,L(function(e){if(1==e.h)return r={type:8},a=rs([n],i0()),o=t.K.request(7,a,r),e.m(2),e.g(o.promise,4);if(2!=e.h){if(s=e.i,u=[],(l=JSON.parse(eU(s.data))).avails.length>0){if(JSON.stringify(t.j)!=JSON.stringify(l.avails)){for(t.j=l.avails,c=(d=S(t.j)).next();!c.done;c=d.next())for(p=(h=S(c.value.nonLinearAdsList)).next();!p.done;p=h.next())for(g=(f=S(p.value.nonLinearAdList)).next();!g.done;g=f.next())!function(e,t){var n,i,r,a,o;L(function(s){return 1==s.h?!t.staticResource||(n=dJ(t),e.F.get(n))?s.return():(i={type:9},r=rs([t.staticResource],i0()),a=e.K.request(7,r,i),s.m(2),e.F.set(n,[]),s.g(a.promise,4)):2!=s.h?(o=JSON.parse(eU(s.i.data)).apps,e.F.set(n,o),s.o(0)):void(s.l(),e.F.delete(n),s.j())})}(t,g.value);u=t.getCuePoints(),t.i(new i9("ad-cue-points-changed",new Map().set("cuepoints",u)))}}else t.j.length&&t.i(new i9("ad-cue-points-changed",new Map().set("cuepoints",u))),dZ(t),t.j=[];return i&&(t.J||u.length>0)&&(d$(t),t.J||(dQ(t),t.o.G(t.h,"seeked",function(){dQ(t)}),t.o.G(t.h,"ended",function(){dZ(t)})),t.o.G(t.h,"timeupdate",function(){d$(t)})),e.o(0)}e.l(),e.j()}),this.O=!1)},dY.prototype.getCuePoints=function(){for(var e=[],t=S(this.j),n=t.next();!n.done;n=t.next()){n=S(n.value.ads);for(var i=n.next();!i.done;i=n.next())i=i.value,e.push({start:i.startTimeInSeconds,end:i.startTimeInSeconds+i.durationInSeconds})}return e},(p=d2.prototype).needsSkipUI=function(){return!0},p.isClientRendering=function(){return!1},p.hasCustomClick=function(){return!0},p.isUsingAnotherMediaElement=function(){return!1},p.getDuration=function(){return this.i?this.i.duration:-1},p.getMinSuggestedDuration=function(){return this.getDuration()},p.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},p.isPaused=function(){return this.h.paused},p.isSkippable=function(){return this.g.isSkippable()},p.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return Math.max(e=this.getRemainingTime()-e,0)},p.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},p.skip=function(){this.h.currentTime+=this.getRemainingTime()},p.pause=function(){return this.h.pause()},p.play=function(){return this.h.play()},p.getVolume=function(){return this.h.volume},p.setVolume=function(e){this.h.volume=e},p.isMuted=function(){return this.h.muted},p.isLinear=function(){return!0},p.resize=function(){},p.setMuted=function(e){this.h.muted=e},p.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},p.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},p.getTitle=function(){return this.g.getTitle()},p.getDescription=function(){return this.g.getDescription()},p.getVastMediaBitrate=function(){return 0},p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},p.getVastAdId=function(){return""},p.getAdId=function(){return this.g.getAdId()},p.getCreativeAdId=function(){return this.g.getCreativeAdId()},p.getAdvertiserName=function(){return this.g.getAdvertiserName()},p.getMediaUrl=function(){return null},p.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},p.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},p.release=function(){this.h=this.i=this.g=null},q("shaka.ads.ServerSideAd",d2),d2.prototype.release=d2.prototype.release,d2.prototype.getPodIndex=d2.prototype.getPodIndex,d2.prototype.getTimeOffset=d2.prototype.getTimeOffset,d2.prototype.getMediaUrl=d2.prototype.getMediaUrl,d2.prototype.getAdvertiserName=d2.prototype.getAdvertiserName,d2.prototype.getCreativeAdId=d2.prototype.getCreativeAdId,d2.prototype.getAdId=d2.prototype.getAdId,d2.prototype.getVastAdId=d2.prototype.getVastAdId,d2.prototype.getVastMediaWidth=d2.prototype.getVastMediaWidth,d2.prototype.getVastMediaHeight=d2.prototype.getVastMediaHeight,d2.prototype.getVastMediaBitrate=d2.prototype.getVastMediaBitrate,d2.prototype.getDescription=d2.prototype.getDescription,d2.prototype.getTitle=d2.prototype.getTitle,d2.prototype.getPositionInSequence=d2.prototype.getPositionInSequence,d2.prototype.getSequenceLength=d2.prototype.getSequenceLength,d2.prototype.setMuted=d2.prototype.setMuted,d2.prototype.resize=d2.prototype.resize,d2.prototype.isLinear=d2.prototype.isLinear,d2.prototype.isMuted=d2.prototype.isMuted,d2.prototype.setVolume=d2.prototype.setVolume,d2.prototype.getVolume=d2.prototype.getVolume,d2.prototype.play=d2.prototype.play,d2.prototype.pause=d2.prototype.pause,d2.prototype.skip=d2.prototype.skip,d2.prototype.canSkipNow=d2.prototype.canSkipNow,d2.prototype.getTimeUntilSkippable=d2.prototype.getTimeUntilSkippable,d2.prototype.isSkippable=d2.prototype.isSkippable,d2.prototype.isPaused=d2.prototype.isPaused,d2.prototype.getRemainingTime=d2.prototype.getRemainingTime,d2.prototype.getMinSuggestedDuration=d2.prototype.getMinSuggestedDuration,d2.prototype.getDuration=d2.prototype.getDuration,d2.prototype.isUsingAnotherMediaElement=d2.prototype.isUsingAnotherMediaElement,d2.prototype.hasCu
1stomClick=d2.prototype.hasCustomClick,d2.prototype.isClientRendering=d2.prototype.isClientRendering,d2.prototype.needsSkipUI=d2.prototype.needsSkipUI,(p=d3.prototype).configure=function(){},p.stop=function(){this.C="",this.o=null,this.D=[]},p.release=function(){this.stop(),this.h&&this.h.release()},p.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},p.getCuePoints=function(){return this.D},w(d4,rt),(p=d4.prototype).setLocale=function(e){this.o=e},p.configure=function(e){this.l=e,this.g&&this.g.configure(this.l),this.j&&this.j.configure(this.l),this.h&&this.h.configure(this.l)},p.initInterstitial=function(e,t,n){var i=this;this.g&&this.g.release(),this.g=new dR(e,t,n,function(e){return d5(i,e)}),this.g.configure(this.l)},p.initClientSide=function(t,n,i){var r=this;if(!e.google||!google.ima||!google.ima.AdsLoader)throw new eN(2,10,1e4);this.j&&this.j.release(),this.j=new dk(t,n,this.o,i,function(e){return d5(r,e)}),this.j.configure(this.l)},p.release=function(){this.g&&(this.g.release(),this.g=null),this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.h&&(this.h.release(),this.h=null),rt.prototype.release.call(this)},p.onAssetUnload=function(){this.g&&this.g.stop(),this.j&&this.j.stop(),this.i&&this.i.stop(),this.h&&this.h.stop(),this.dispatchEvent(new i9("ad-stopped")),this.dispatchEvent(new i9("ad-content-attach-requested")),this.m=new dS},p.requestClientSideAds=function(e){if(!this.j)throw new eN(1,10,10001);var t=this.j;t.g&&t.g.destroy(),t.m&&t.m.contentComplete(),t.H=Date.now()/1e3,t.m.requestAds(e)},p.updateClientSideAdsRenderingSettings=function(e){if(!this.j)throw new eN(1,10,10001);var t=this.j;t.C=e,t.g&&t.g.updateAdsRenderingSettings(t.C)},p.initMediaTailor=function(e,t,n){var i=this;this.i&&this.i.release(),this.i=new dY(e,t,n,function(e){return d5(i,e)})},p.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new eN(1,10,10005);var i,r,a,o,s,u,l,d,c,h=this.i;return n=void 0===n?"":n,h.l?e=Promise.reject(new eN(1,10,10004)):(h.l=new i1,i=e,L(function(e){if(1==e.h)return r={type:7},(a=rs([i],i0())).method="POST",t&&(a.body=eV(JSON.stringify(t))),o=h.K.request(7,a,r),e.m(2),e.g(o.promise,4);if(2!=e.h){if((s=JSON.parse(eU(e.i.data))).manifestUrl&&s.trackingUrl)u=new ef(i),l=new ef(s.trackingUrl),h.H=u.resolve(l).toString(),d=Date.now()/1e3-h.P,h.i(new i9("ads-loaded",new Map().set("loadTime",d))),c=new ef(s.manifestUrl),h.l.resolve(u.resolve(c).toString()),h.l=null;else throw Error("Insufficient data from MediaTailor.");return e.o(0)}if(e.l(),!h.I.length)return h.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),h.l=null,e.return();h.l.resolve(h.I),h.l=null,e.j()}),h.I=n||"",h.P=Date.now()/1e3,e=h.l),e},p.addMediaTailorTrackingUrl=function(e){if(!this.i)throw new eN(1,10,10005);var t=this.i;t.H=e,t.i(new i9("ads-loaded",new Map().set("loadTime",0)))},p.initServerSide=function(t,n){var i=this;if(!e.google||!google.ima||!google.ima.dai)throw new eN(2,10,10002);this.h&&this.h.release(),this.h=new d3(t,n,this.o,function(e){return d5(i,e)}),this.h.configure(this.l)},p.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.h)throw new eN(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&Y('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v4.15.58",(n=this.h).j?e=Promise.reject(new eN(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.H=!0),n.j=new i1,n.g.requestStream(e),n.C=t||"",n.F=Date.now()/1e3,e=n.j),e},p.replaceServerSideAdTagParameters=function(e){if(!this.h)throw new eN(1,10,10003);(e.mpt||e.mpv)&&Y('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.mpt="Shaka Player",e.mpv="v4.15.58",this.h.g.replaceAdTagParameters(e)}
1,p.getServerSideCuePoints=function(){return el("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},p.getCuePoints=function(){var e=[];return this.h&&(e=e.concat(this.h.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},p.getStats=function(){var e=this.m;return{loadTimes:e.g,averageLoadTime:e.g.length?e.g.reduce(function(e,t){return e+t},0)/e.g.length:0,started:e.h,overlayAds:e.j,playedCompletely:e.l,skipped:e.m,errors:e.i}},p.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},p.onDashTimedMetadata=function(e){this.h&&"urn:google:dai:2018"==e.schemeIdUri&&this.h.g.processMetadata(e.schemeIdUri,e.eventNode?e.eventNode.attributes.messageData:null,e.startTime)},p.onHlsTimedMetadata=function(e,t){this.h&&this.h.g.processMetadata("ID3",e.data,t)},p.onCueMetadataChange=function(e){this.h&&this.h.onCueMetadataChange(e)},p.onHLSInterstitialMetadata=function(e,t,n){var i,r,a,o;this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,e,t),this.g&&(i=this.g,L(function(e){if(1==e.h){var t,s,u,l,d,c,h,p,f,g,m,v,y,b,w,T,S,x,A,E,k,I,C,M,P,D,R,O,N,j,U,B,F,V,H;if(r=null,(a=n.values.find(function(e){return"ID"==e.key}))&&(r=a.data),r){if(i.na.has(r))return e.return();i.na.add(r)}return dH(i),e.g(L(function(e){switch(e.h){case 1:if(t=[],!n||(s=n.values.find(function(e){return"X-ASSET-URI"==e.key}),u=n.values.find(function(e){return"X-ASSET-LIST"==e.key}),!s&&!u))return e.return(t);if(l=null,(d=n.values.find(function(e){return"ID"==e.key}))&&(l=d.data),c=null==l?Math.floor(10*n.startTime)/10:n.startTime,(h=n.endTime)&&n.endTime!=1/0&&"number"==typeof n.endTime&&(h=null==l?Math.floor(10*n.endTime)/10:n.endTime),p=n.values.find(function(e){return"X-RESTRICT"==e.key}),g=f=!0,p&&p.data&&(f=!(m=p.data).includes("SKIP"),g=!m.includes("JUMP")),v=f?0:null,(y=n.values.find(function(e){return"X-ENABLE-SKIP-AFTER"==e.key}))&&isNaN(v=parseFloat(y.data))&&(v=f?0:null),b=null,(w=n.values.find(function(e){return"X-ENABLE-SKIP-FOR"==e.key}))&&(b=parseFloat(w.data),isNaN(v)&&(b=null)),T=null,(S=n.values.find(function(e){return"X-RESUME-OFFSET"==e.key}))&&isNaN(T=parseFloat(S.data))&&(T=null),x=null,(A=n.values.find(function(e){return"X-PLAYOUT-LIMIT"==e.key}))&&isNaN(x=parseFloat(A.data))&&(x=null),I=k=E=!1,(C=n.values.find(function(e){return"CUE"==e.key}))&&(E=(M=C.data).includes("ONCE"),k=M.includes("PRE"),I=M.includes("POST")),P=!1,(D=n.values.find(function(e){return"X-TIMELINE-OCCUPIES"==e.key}))?P=D.data.includes("RANGE"):!S&&i.C.U()&&(P=!k&&!I),s){if(!(R=s.data))return e.return(t);t.push({id:l,groupId:null,startTime:c,endTime:h,uri:R,mimeType:null,isSkippable:f,skipOffset:v,skipFor:b,canJump:g,resumeOffset:T,playoutLimit:x,once:E,pre:k,post:I,timelineRange:P,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}),e.A(2);break}if(!u){e.A(2);break}if(!(O=u.data))return e.return(t);return e.m(4),N={type:11},e.g(dq(i,O,N),6);case 6:for((U=(j=JSON.parse(eU(e.i)))["SKIP-CONTROL"])&&("number"==typeof(B=U["ENABLE-SKIP-AFTER"])&&(v=parseFloat(B),isNaN(B)&&(v=f?0:null)),"number"==typeof(F=U["ENABLE-SKIP-FOR"])&&(b=parseFloat(F),isNaN(F)&&(b=null))),V=0;V<j.ASSETS.length;V++)(H=j.ASSETS[V]).URI&&t.push({id:l+"_shaka_asset_"+V,groupId:l,startTime:c,endTime:h,uri:H.URI,mimeType:null,isSkippable:f,skipOffset:v,skipFor:b,canJump:g,resumeOffset:T,playoutLimit:x,once:E,pre:k,post:I,timelineRange:P,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});e.o(2);break;case 4:e.l();case 2:return e.return(t)}}),2)}(o=e.i).length?dN(i,o):Y("Unsupported HLS interstitial",n),e.j()})))},p.onDASHInterstitialMetadata=function(e,t,n){if(!this.l||!this.l.disableDASHInterstitial){var i=n.schemeIdUri;if("urn:mpeg:dash:event:alternativeMPD:insert:2025"==i||"urn:mpeg:dash:event:alternativeMPD:replace:2025"==i){if(this.g||this.initInterstitial(null,e,t),this.g&&(e=this.g,t="urn:mpeg:dash:event:alternativeMPD:replace:2025"==n.schemeIdUri,i="urn:mpeg:dash:event:alternativeMPD:insert:2025"==n.schemeIdUri,t||i)){for(var r,a=n.startTime,o=n.endTime,s=null,u=0,l=S(n.eventNode.children),d=l.next();!d.done;d=l.next())if("AlternativeMPD"==(d=d.value).tagName){if(d=d.attributes.uri){r=d;break}}else if("InsertPresentation"==d.tagName||"ReplacePresentation"==d.tagName){var c=d.attributes.url;if(c){r=eq(c),(l=tY(d,"maxDuration",t2))&&(s=l/n.timescale),(l=tY(d,"returnOffset",t2))&&(u=l/n.timescale),t&&u&&(o=a+u);break}}
1r&&dN(e,[{id:n.id,groupId:null,startTime:a,endTime:o,uri:r,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:i?u:null,playoutLimit:s,once:!1,pre:!1,post:!1,timelineRange:t&&!i,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}])}}else("urn:mpeg:dash:event:2012"==i||"urn:scte:dash:scte214-events"==i)&&n.eventNode&&tz(n.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,e,t),this.g&&function(e,t){var n=tz(t.eventNode,"OverlayEvent"),i=n.attributes.uri,r=n.attributes.mimeType,a="true"==n.attributes.loop,o=tY(n,"z",t2);if(i&&0!=o){var s=null,u=tz(n,"Background");if(u){var l=u.attributes.uri;s=l?"center / contain no-repeat url('"+l+"')":tK(u)}u=1920,l=1080;var d=tz(n,"Viewport");if(d&&(null==(u=tY(d,"x",t2))||null==(l=tY(d,"y",t2))))return;var c={viewport:{x:u,y:l},topLeft:{x:0,y:0},size:{x:u,y:l}},h=tz(n,"Overlay");if(d&&h){var p=tz(h,"TopLeft"),f=tz(h,"Size");if(p&&f){if(null==(h=tY(p,"x",t2))||null==(p=tY(p,"y",t2)))return;var g=tY(f,"x",t2);if(null==g||null==(f=tY(f,"y",t2)))return;c.topLeft.x=h,c.topLeft.y=p,c.size.x=g,c.size.y=f}}if(h=null,n=tz(n,"Squeeze"),d&&n&&(f=tz(n,"TopLeft"),n=tz(n,"Size"),f&&n)){if(null==(d=tY(f,"x",t2))||null==(h=tY(f,"y",t2))||null==(f=tY(n,"x",t2))||null==(n=tY(n,"y",t2)))return;h={viewport:{x:u,y:l},topLeft:{x:d,y:h},size:{x:f,y:n}}}dN(e,[{id:t.id,groupId:null,startTime:t.startTime,endTime:t.endTime,uri:i,mimeType:r,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:a,overlay:c,displayOnBackground:-1==o,currentVideo:h,background:s}])}}(this.g,n))}},p.addCustomInterstitial=function(e){if(!this.g)throw new eN(1,10,10006);dN(this.g,[e])},p.addAdUrlInterstitial=function(e){if(!this.g)throw new eN(1,10,10006);return this.g.addAdUrlInterstitial(e)},p.getInterstitialPlayer=function(){if(!this.g)throw new eN(1,10,10006);return this.g.kd()},q("shaka.ads.AdManager",d4),d4.prototype.getInterstitialPlayer=d4.prototype.getInterstitialPlayer,d4.prototype.addAdUrlInterstitial=d4.prototype.addAdUrlInterstitial,d4.prototype.addCustomInterstitial=d4.prototype.addCustomInterstitial,d4.prototype.onDASHInterstitialMetadata=d4.prototype.onDASHInterstitialMetadata,d4.prototype.onHLSInterstitialMetadata=d4.prototype.onHLSInterstitialMetadata,d4.prototype.onCueMetadataChange=d4.prototype.onCueMetadataChange,d4.prototype.onHlsTimedMetadata=d4.prototype.onHlsTimedMetadata,d4.prototype.onDashTimedMetadata=d4.prototype.onDashTimedMetadata,d4.prototype.onManifestUpdated=d4.prototype.onManifestUpdated,d4.prototype.getStats=d4.prototype.getStats,d4.prototype.getCuePoints=d4.prototype.getCuePoints,d4.prototype.getServerSideCuePoints=d4.prototype.getServerSideCuePoints,d4.prototype.replaceServerSideAdTagParameters=d4.prototype.replaceServerSideAdTagParameters,d4.prototype.requestServerSideStream=d4.prototype.requestServerSideStream,d4.prototype.initServerSide=d4.prototype.initServerSide,d4.prototype.addMediaTailorTrackingUrl=d4.prototype.addMediaTailorTrackingUrl,d4.prototype.requestMediaTailorStream=d4.prototype.requestMediaTailorStream,d4.prototype.initMediaTailor=d4.prototype.initMediaTailor,d4.prototype.updateClientSideAdsRenderingSettings=d4.prototype.updateClientSideAdsRenderingSettings,d4.prototype.requestClientSideAds=d4.prototype.requestClientSideAds,d4.prototype.onAssetUnload=d4.prototype.onAssetUnload,d4.prototype.release=d4.prototype.release,d4.prototype.initClientSide=d4.prototype.initClientSide,d4.prototype.initInterstitial=d4.prototype.initInterstitial,d4.prototype.configure=d4.prototype.configure,d4.prototype.setLocale=d4.prototype.setLocale,d4.ADS_LOADED="ads-loaded",d4.AD_STARTED="ad-started",d4.AD_FIRST_QUARTILE="ad-first-quartile",d4.AD_MIDPOINT="ad-midpoint",d4.AD_THIRD_QUARTILE="ad-third-quartile",d4.AD_COMPLETE="ad-complete",d4.AD_STOPPED="ad-stopped",d4.AD_SKIPPED="ad-skipped",d4.AD_VOLUME_CHANGED="ad-volume-changed",d4.AD_MUTED="ad-muted",d4.AD_PAUSED="ad-paused",d4.AD_RESUMED="ad-resumed",d4.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",d4.CUEPOINTS_CHANGED="ad-cue-points-changed",d4.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",d4.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",d4.AD_CLICKED="ad-clicked",d4.AD_PROGRESS="ad-progress",d4.AD_BUFFERING="ad-buffering",d4.AD_IMPRESSION="ad-impression",d4.AD_DURATION_CHANGED="ad-duration-changed",d4.AD_CLOSED="ad-closed",d4.AD_LOADED="ad-loaded",d4.ALL_ADS_COMPLETED="all-ads-completed",d4.AD_LINEAR_CHANGED="ad-linear-changed",d4.AD_METADATA="ad-metadata",d4.AD_RECOVERABLE_ERROR="ad-recoverable-error",d4.AD_ERROR="ad-error",d4.AD_BREAK_READY="ad-break-ready",d4.AD_INTERACTION="ad-interaction",d4.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",d4.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",d4.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",dw=function(){return new d4};var d9="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),d7="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),ce=["loop","playbackRate"],ct=["pause","play"],cn=new Map().set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",4).set("getTextLanguagesAndRoles",4).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("isVideoOnly",10).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1),ci=new Map().set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("get
1Stats",5).set("getAudioTracks",2).set("getChaptersTracks",2).set("getImageTracks",2).set("getVideoTracks",2).set("getTextTracks",2).set("getVariantTracks",2),cr=new Map().set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),ca=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],co=[["isTextTrackVisible","setTextTrackVisibility"]],cs="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "),cu="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function cl(e,t,n,i,r,a,o){var s=this;this.H=e,this.K=o,this.l=new n4(t),this.M=n,this.u=!1,this.B=i,this.F=r,this.N=a,this.i=this.m=!1,this.J="",this.o=null,this.C=function(){return cp(s)},this.D=function(e,t){switch((e=d8(t)).type){case"event":var n=e.targetName,i=i7(e.event);s.B(n,i);break;case"update":for(i in n=e.update)for(var r in e=s.g[i]||{},n[i])e[r]=n[i][r];s.u&&(s.M(),s.u=!1);break;case"asyncComplete":if(r=e.id,i=e.error,t=e.res,e=s.h.get(r),s.h.delete(r),e)if(i){for(n in r=new eN(i.severity,i.category,i.code),i)r[n]=i[n];e.reject(r)}else e.resolve(t)}},this.g={video:{},player:{}},this.I=0,this.h=new Map,this.j=null,c_.add(this)}function cd(e,t){var n=e.N();cy=t,t.addUpdateListener(e.C),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.D),cp(e),cg(e,{type:"init",initState:n,appData:e.o}),e.j.resolve()}function cc(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.j.reject(new eN(2,8,n,t))}function ch(e){var t=cy;t.removeUpdateListener(e.C),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.D)}function cp(e){var t=!!cy&&"connected"==cy.status;if(e.i&&!t){for(var n in e.F(),e.g)e.g[n]={};cf(e)}e.i=t,e.J=t?cy.receiver.friendlyName:"",e.l.wb()}function cf(e){if(e.h)for(var t=S(e.h.keys()),n=t.next();!n.done;n=t.next()){n=n.value;var i=e.h.get(n);e.h.delete(n),i.reject(new eN(1,7,7e3))}}function cg(e,t){t=d6(t);var n=cy;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},Q)}catch(i){throw t=new eN(2,8,8005,i),n=new i9("error",new Map().set("detail",t)),e.B("player",n),e.gd(),t}}(p=cl.prototype).destroy=function(){return c_.delete(this),cf(this),cy&&ch(this),this.l&&(this.l.stop(),this.l=null),this.F=this.B=null,this.i=this.m=!1,this.D=this.C=this.j=this.h=this.g=this.o=null,Promise.resolve()},p.rb=function(){return this.i},p.bh=function(){return this.J},p.init=function(){if(this.H.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.wb();var t=new chrome.cast.SessionRequest(this.H,[],null,this.K,null);t=new chrome.cast.ApiConfig(t,function(e){for(var t=S(c_),n=t.next();!n.done;n=t.next())(n=n.value).j=new i1,n.u=!0,cd(n,e)},function(e){for(var t=S(c_),n=t.next();!n.done;n=t.next())n=n.value,cv="available"==e,n.l.wb()},"origin_scoped"),chrome.cast.initialize(t,function(){},function(){}),cv&&this.l.ea(cm),(t=cy)&&t.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new i1,this.u=!0,cd(this,t)):cy=null}else e.__onGCastApiAvailable!==cw&&(cb=e.__onGCastApiAvailable||null,e.__onGCastApiAvailable=cw)},p.ph=function(e){this.o=e,this.i&&cg(this,{type:"appData",appData:this.o})},p.cast=function(){var e=this;return L(function(t){if(!e.m)throw new eN(1,8,8e3);if(!cv)throw new eN(1,8,8001);if(e.i)throw new eN(1,8,8002);return e.j=new i1,chrome.cast.requestSession(function(t){return cd(e,t)},function(t){return cc(e,t)}),t.g(e.j,0)})},p.gd=function(){if(this.i){if(cf(this),cy){ch(this);try{cy.stop(function(){},function(){})}catch(e){}cy=null}cp(this)}},p.get=function(e,t){var n=this;if("video"==e){if(ct.includes(t))return function(){return n.Gi.apply(n,[e,t].concat(x(O.apply(0,arguments))))}}else if("player"==e){if(cr.has(t)&&!this.get("player","isLive")())return function(){};if(cs.includes(t))return function(){return n.Gi.apply(n,[e,t].concat(x(O.apply(0,arguments))))};if(cu.includes(t))return function(){return n.Ok.apply(n,[e,t].concat(x(O.apply(0,arguments))))};if(cn.has(t)||ci.has(t))return function(){return n.g[e][t]}}return this.g[e][t]},p.set=function(e,t,n){this.g[e][t]=n,cg(this,{type:"set",targetName:e,property:t,value:n})},p.Gi=function(e,t){cg(this,{type:"call",targetName:e,methodName:t,args:O.apply(2,arguments)})},p.Ok=function(e,t){var n=O.apply(2,arguments),i=new i1,r=this.I.toString();this.I++,this.h.set(r,i);try{cg(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:r})}catch(e){i.reject(e)}return i};var cm=.02,cv=!1,cy=null,cb=null,c_=new Set;function cw(t){if(cb?e.__onGCastApiAvailable=cb:delete e.__onGCastApiAvailable,cb=null,t)for(var n=S(c_),i=n.next();!i.done;
1i=n.next())i.value.init();"function"==typeof e.__onGCastApiAvailable&&e.__onGCastApiAvailable(t)}function cT(t,n,i,r){r=void 0!==r&&r,rt.call(this);var a=this;this.i=t,this.h=n,this.l=this.o=this.m=this.u=this.j=null,this.I=i,this.H=r,this.D=[],this.C=[],this.B=[],this.F=new Map,this.g=null,e.chrome?(this.g=new cl(i,function(){return cA(a)},function(){return cE(a)},function(e,t){return cI(a,e,t)},function(){return ck(a)},function(){return cx(a)},r),function(e){e.g.init(),e.l=new ee;for(var t,n=S(d9),i=n.next();!i.done;i=n.next())e.l.G(e.i,i.value,function(t){e.g.rb()||(t=i7(t),e.m.dispatchEvent(t))});for(var r in re)e.l.G(e.h,re[r],function(t){e.g.rb()||e.o.dispatchEvent(t)});for(var a in e.j={},n={},e.i)(n={Yd:n.Yd}).Yd=a,Object.defineProperty(e.j,n.Yd,{configurable:!1,enumerable:!0,get:function(t){return function(){return function(e,t){if("addEventListener"==t)return function(t,n,i){return e.m.addEventListener(t,n,i)};if("removeEventListener"==t)return function(t,n,i){return e.m.removeEventListener(t,n,i)};if(e.g.rb()&&0==Object.keys(e.g.g.video).length){var n=e.i[t];if("function"!=typeof n)return n}return e.g.rb()?e.g.get("video",t):("function"==typeof(t=e.i[t])&&(t=t.bind(e.i)),t)}(e,t.Yd)}}(n),set:function(t){return function(n){var i=t.Yd;e.g.rb()?e.g.set("video",i,n):e.i[i]=n}}(n)});e.u={},cS(e,function(t){Object.defineProperty(e.u,t,{configurable:!1,enumerable:!0,get:function(){return function e(t,n,i){if(i=void 0!==i&&i,t.F.has(n)&&(n=t.F.get(n)),"addEventListener"==n)return function(e,n,i){return t.o.addEventListener(e,n,i)};if("removeEventListener"==n)return function(e,n,i){return t.o.removeEventListener(e,n,i)};if("getMediaElement"==n)return function(){return t.j};if("getSharedConfiguration"==n)return t.g.get("player","getConfiguration");if("getNetworkingEngine"==n)return function(){return t.h.Jb()};if("getDrmEngine"==n)return function(){return t.h.D};if("getAdManager"==n)return function(){return t.h.$h()};if("getQueueManager"==n)return function(){return t.h.ii()};if("setVideoContainer"==n)return function(e){return t.h.Vi(e)};if(!i){if("addThumbnailsTrack"==n)return function(){var i=O.apply(0,arguments);return t.D.push(i),e(t,n,!0).apply(null,x(i))};if("addTextTrackAsync"==n)return function(){var i=O.apply(0,arguments);return t.C.push(i),e(t,n,!0).apply(null,x(i))};if("addChaptersTrack"==n)return function(){var i=O.apply(0,arguments);return t.B.push(i),e(t,n,!0).apply(null,x(i))}}if(t.g.rb()){if("getManifest"==n||"drmInfo"==n)return function(){return Y(n+"() does not work while casting!"),null};if("attach"==n||"detach"==n)return function(){return Y(n+"() does not work while casting!"),Promise.resolve()};if("getChapters"==n)return function(){return Y(n+"() does not work while casting!"),[]}}return t.g.rb()&&0==Object.keys(t.g.g.video).length&&(cn.has(n)||ci.has(n))||!t.g.rb()?t.h[n].bind(t.h):t.g.get("player",n)}(e,t)}})}),t=new Map,cS(e,function(n,i){t.has(i)?(i=t.get(i),n.length<i.length?e.F.set(n,i):e.F.set(i,n)):t.set(i,n)}),e.m=new rt,e.m.xe=e.j,e.o=new rt,e.o.xe=e.u,e.l.G(e.h,"unloading",function(){e.g&&e.g.rb()||cC(e)})}(this)):(this.j=this.i,this.u=this.h)}function cS(e,t){function n(e){return"constructor"!=e&&"function"==typeof r[e]&&!a.has(e)}var i,r=e.h,a=new Set;for(i in r)n(i)&&(a.add(i),t(i,r[i]));for(e=Object.getPrototypeOf(r),i=Object.getPrototypeOf({});e&&e!=i;){for(var o=S(Object.getOwnPropertyNames(e)),s=o.next();!s.done;s=o.next())n(s=s.value)&&(a.add(s),t(s,r[s]));e=Object.getPrototypeOf(e)}}function cx(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.hd(),startTime:null,addThumbnailsTrackCalls:e.D,addTextTrackAsyncCalls:e.C,addChaptersTrackCalls:e.B};e.i.pause();for(var n=S(ce),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.i[i];for(e.i.ended||(t.startTime=e.i.currentTime),i=(n=S(ca)).next();!i.done;i=n.next()){var r=i.value;i=r[1],r=e.h[r[0]](),t.player[i]=r}for(i=(n=S(co)).next();!i.done;i=n.next())i=(r=i.value)[1],r=e.h[r[0]](),t.playerAfterLoad[i]=r;return t}function cA(e){var t=new i9("caststatuschanged");e.dispatchEvent(t)}function cE(e){var t=new i9(e.j.paused?"pause":"play");e.m.dispatchEvent(t)}function ck(e){for(var t,n=S(ca),i=n.next();!i.done;i=n.next()){var r=i.value;i=r[1],r=e.g.get("player",r[0])(),e.h[i](r)}var a=e.D,o=e.C,s=e.B;cC(e);var u=e.g.get("player","getAssetUri")();r=e.g.get("video","ended"),n=Promise.resolve();var l=e.i.autoplay;i=null,r||(i=e.g.get("video","currentTime")),(r=e.g.get("player","getTextTracks")())&&r.length&&(t=r.find(function(e){return e.active}));var d=e.g.get("player","isTextTrackVisible")();u&&(e.i.autoplay=!1,n=e.h.load(u,i));var c={};for(r=(i=S(ce)).next();!r.done;r=i.next())c[r=r.value]=e.g.get("video",r);n.then(function(){if(e.i){for(var n,i,r,h=S(a),p=h.next();!p.done;p=h.next())p=p.value,(n=e.kd()).Ee.apply(n,x(p));for(n=(h=S(o)).next();!n.done;n=h.next())n=n.value,(i=e.kd()).Kd.apply(i,x(n));for(h=(i=S(s)).next();!h.done;h=i.next())h=h.value,(r=e.kd()).De.apply(r,x(h));for(i=(r=S(ce)).next();!i.done;i=r.next())i=i.value,e.i[i]=c[i];for(i=(r=S(co)).next();!i.done;i=r.next())i=(h=i.value)[1],h=e.g.get("player",h[0])(),e.h[i](h);e.h.sh(d),t&&e.h.nh(t.language,t.roles,t.forced),e.i.autoplay=l,u&&e.
1i.play()}},function(t){t=new i9("error",t=new Map().set("detail",t)),e.h.dispatchEvent(t)})}function cI(e,t,n){e.g.rb()&&("video"==t?e.m.dispatchEvent(n):"player"==t&&("unloading"==n.type&&cC(e),e.o.dispatchEvent(n)))}function cC(e){e.D=[],e.C=[],e.B=[]}function cM(e,t,n,i){rt.call(this);var r=this;this.h=e,this.g=t,this.j=new ee,this.I={video:e,player:t},this.F=n||function(){},this.J=i||function(e){return e},this.i=null,this.H=!1,this.o=!0,this.m=0,this.C=!1,this.B=!0,this.u=this.l=null,this.D=new n4(function(){cL(r)}),function(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return cP(e)},t.onSenderDisconnected=function(){return cP(e)},t.onSystemVolumeChanged=function(){var t=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();t&&cU(e,{type:"update",update:{video:{volume:t.level,muted:t.muted}}},e.l),cU(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.u=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.u.onMessage=function(t){var n=t,i=d8(n.data);switch(i.type){case"PLAY":e.h.play(),cB(e);break;case"PAUSE":e.h.pause(),cB(e);break;case"SEEK":n=i.currentTime;var r=i.resumeState;null!=n&&(e.h.currentTime=Number(n)),r&&"PLAYBACK_START"==r?(e.h.play(),cB(e)):r&&"PLAYBACK_PAUSE"==r&&(e.h.pause(),cB(e));break;case"STOP":e.g.vc().then(function(){e.g&&cB(e)});break;case"GET_STATUS":cN(e,Number(i.requestId));break;case"VOLUME":n=(r=i.volume).level,r=r.muted;var a=e.h.volume,o=e.h.muted;null!=n&&(e.h.volume=Number(n)),null!=r&&(e.h.muted=r),a==e.h.volume&&o==e.h.muted||cB(e);break;case"LOAD":e.m=0,e.C=!1,e.B=!1,n=i.media,r=i.currentTime,a=e.J(n.contentId),o=i.autoplay||!0,e.F(n.customData),o&&(e.h.autoplay=!0),e.g.load(a,r).then(function(){e.g&&cN(e)}).catch(function(t){var n="LOAD_FAILED";7==t.category&&7e3==t.code&&(n="LOAD_CANCELLED"),cU(e,{requestId:Number(i.requestId),type:n},e.u)});break;default:cU(e,{requestId:Number(i.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.u)}},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(t){return function(e,t){var n,i,r,a,o,s,u,l,d,c,h,p,f,g,m,v,y,b,w,T,A=d8(t.data);switch(A.type){case"init":e.m=0,e.C=!1,e.B=!0,n=A.initState,i=A.appData,L(function(t){switch(t.h){case 1:for(r in n.player)a=n.player[r],e.g[r](a);return e.F(i),o=e.h.autoplay,n.manifest?(e.h.autoplay=!1,t.m(5),t.g(e.g.load(n.manifest,n.startTime),7)):t.g(Promise.resolve(),3);case 7:if(n.addThumbnailsTrackCalls)for(u=(s=S(n.addThumbnailsTrackCalls)).next();!u.done;u=s.next())l=u.value,e.g.Ee.apply(e.g,x(l));if(n.addTextTrackAsyncCalls)for(c=(d=S(n.addTextTrackAsyncCalls)).next();!c.done;c=d.next())h=c.value,e.g.Kd.apply(e.g,x(h));if(n.addChaptersTrackCalls)for(f=(p=S(n.addChaptersTrackCalls)).next();!f.done;f=p.next())g=f.value,e.g.De.apply(e.g,x(g));t.o(3);break;case 5:return m=t.l(),v=new i9("error",new Map().set("detail",m)),e.g&&e.g.dispatchEvent(v),t.return();case 3:if(!e.g)return t.return();for(y in n.video)b=n.video[y],e.h[y]=b;for(w in n.playerAfterLoad)T=n.playerAfterLoad[w],e.g[w](T);e.h.autoplay=o,n.manifest&&(e.h.play(),cB(e)),t.j()}}),cL(e);break;case"appData":e.F(A.appData);break;case"set":var E=A.targetName,k=A.property;if(A=A.value,"video"==E){if(t=cast.receiver.CastReceiverManager.getInstance(),"volume"==k){t.setSystemVolumeLevel(A);break}else if("muted"==k){t.setSystemVolumeMuted(A);break}}e.I[E][k]=A;break;case"call":(E=e.I[A.targetName])[A.methodName].apply(E,A.args);break;case"asyncCall":E=A.targetName,k=A.methodName,"player"==E&&"load"==k&&(e.m=0,e.C=!1);var I=A.id,C=t.senderId;A=(t=e.I[E])[k].apply(t,A.args),"player"==E&&"load"==k&&(A=A.then(function(){e.B=!0})),A.then(function(t){return cj(e,C,I,null,t)},function(t){return cj(e,C,I,t,null)})}}(e,t)},t.start(),t=S(d9);for(var n=t.next();!n.done;n=t.next())e.j.G(e.h,n.value,function(t){return cR(e,"video",t)});for(var i in re)e.j.G(e.g,re[i],function(t){return cR(e,"player",t)});e.j.G(e.h,"loadeddata",function(){e.C=!0}),e.j.G(e.g,"loading",function(){e.o=!1,cD(e)}),e.j.G(e.h,"playing",function(){e.o=!1,cD(e)}),e.j.G(e.h,"pause",function(){cD(e)}),e.j.G(e.g,"unloading",function(){e.o=!0,cD(e)}),e.j.G(e.h,"ended",function(){new n4(function(){e.h&&e.h.ended&&(e.o=!0,cD(e))}).ea(cV)})}(this)}function cP(e){e.m=0,e.B=!0,e.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,cD(e)}function cD(e){var t;L(function(n){return 1==n.h?n.g(Promise.resolve(),2):e.g?void(t=new i9("caststatuschanged"),e.dispatchEvent(t),cO(e)||cB(e),n.j()):n.return()})}function cR(e,t,n){e.g&&(cL(e),cU(e,{type:"event",targetName:t,event:n},e.l))}function cL(e){e.D.ea(cF);for(var t={video:{},player:{}},n=S(d7),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.h[i];e.g.U()&&cr.forEach(function(n,i){e.m%n==0&&(t.player[i]=e.g[i]())}),cn.forEach(function(n,i){e.m%n==0&&(t.player[i]=e.g[i]())}),(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),cU(e,{type:"update",update:t},e.l),ci.forEach(function(t,n){e.m%t==0&&((t={player:{}}).player[n]=e.g[n](),cU(e,{type:"update",update:t},e.l))}),e.C&&(e.m+=1),cO(e)}function cO(e){return!!(e.B&&(e.h.duration||e.g.U()))&&(cN(e),e.B=!1,!0)}function cN(e,t){var n={contentId:e.g.hd(),streamType:e.g.U()?"LIVE":"BUFFERED",contentType:""};e.g.U()||(n.duration=e.h.duration),e.i&&(n.metadata=e.i),cB(e,void 0===t?0:t,n)}function cj(e,t,n,i,r){e.g&&cU(e,{type:"asyncComplete",id:n,error:i,res:r},e.l,t)}function cU(e,t,n,i){e.H&&(e=d6(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function cB(e,t,n){n=void 0===n?null:n;var i={mediaSessionId:0,playbackRate:e.h.playbackRate,playerState:e.o?cH:e.g.Ng()?cG:e.h.paused?cK:cq,currentTime:e.h.currentTime,supportedMediaCommands:63,volume:{level:e.h.volume,muted:e.h.muted}};n&&(i.media=n),cU(e,{requestId:void 0===t?0:t,type:"MEDIA_STATUS",status:[i]},e.u)}w(cT,rt),(p=cT.prototype).destroy=function(e){return this.g&&void 0!==e&&e&&this.g.gd(),this.l&&(this.l.release(),this.l=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.u=this.j=this.i=null,rt.prototype.release.call(this),Promise.all(e)},p.ck=function(){return this.j},p.kd=function(){return this.u},p.oj=function(){return!!this.g&&this.g.m&&cv},p.rb=function(){return!!this.g&&this.g.rb()},p.bh=function(){return this.g?this.g.bh():""},p.cast=function(){var e=this;return L(function(t){return 1==t.h?e.g?t.g(e.g.cast(),2):t.return():e.h?t.g(e.h.vc(),0):t.return()})},p.ph=function(e){this.g&&this.g.ph(e)},p.fl=function(){var e;this.g&&(e=this.g).i&&chrome.cast.requestSession(function(t){return cd(e,t)},function(t){return cc(e,t)})},p.gd=function(){this.g&&this.g.gd()},p.pj=function(e,t){t=void 0!==t&&t;var n=this;return L(function(i){if(1==i.h)return(e!=n.I||t!=n.H)&&(n.I=e,n.H=t,n.g)?(n.g.gd(),i.g(n.g.destroy(),2)):i.return();n.g=null,n.g=new cl(e,function(){return cA(n)},function(){return cE(n)},function(e,t){return cI(n,e,t)},function(){return ck(n)},function(){return cx(n)},t),n.g.init(),i.j()})},q("shaka.cast.CastProxy",cT),cT.prototype.changeReceiverId=cT.prototype.pj,cT.prototype.forceDisconnect=cT.prototype.gd,cT.prototype.suggestDisconnect=cT.prototype.fl,cT.prototype.setAppData=cT.prototype.ph,cT.prototype.cast=cT.prototype.cast,cT.prototype.receiverName=cT.prototype.bh,cT.prototype.isCasting=cT.prototype.rb,cT.prototype.canCast=cT.prototype.oj,cT.prototype.getPlayer=cT.prototype.kd,cT.prototype.getVideo=cT.prototype.ck,cT.prototype.destroy=cT.prototype.destroy,w(cM,rt),(p=cM.prototype).isConnected=function(){return this.H},p.jk=function(){return this.o},p.$k=function(e){this.i=e},p.tj=function(){this.i=null},p.al=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},p.Zk=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},p.Yk=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},p.destroy=function(){var e,t=this;return L(function(n){if(1==n.h)return t.j&&(t.j.release(),t.j=null),e=[],t.g&&(e.push(t.g.destroy()),t.g=null),t.D&&(t.D.stop(),t.D=null),t.h=null,t.I=null,t.F=null,t.H=!1,t.o=!0,t.l=null,t.u=null,rt.prototype.release.call(t),n.g(Promise.all(e),2);cast.receiver.CastReceiverManager.getInstance().stop(),n.j()})},q("shaka.cast.CastReceiver",cM),cM.prototype.destroy=cM.prototype.destroy,cM.prototype.setContentArtist=cM.prototype.Yk,cM.prototype.setContentImage=cM.prototype.Zk,cM.prototype.setContentTitle=cM.prototype.al,cM.prototype.clearContentMetadata=cM.prototype.tj,cM.prototype.setContentMetadata=cM.prototype.$k,cM.prototype.isIdle=cM.prototype.jk,cM.prototype.isConnected=cM.prototype.isConnected;var cF=.5,cV=5,cH="IDLE",cq="PLAYING",cG="BUFFERING",cK="PAUSED";function cW(e,t,n,i,r){if(i>=r)return null;for(var a=-1,o=-1,s=0;s<n.length;s++)if(n[s].some(function(e){return null!=e&&""!=e.g.trim()})){a=s;break}for(s=n.length-1;s>=0;s--)if(n[s].some(function(e){return null!=e&&""!=e.g.trim()})){o=s;break}if(-1===a||-1===o)return null;for(var u=s=!1,l="white",d="black",c=cz(i,r,s,u,l,d);a<=o;a++){for(var h=n[a],p=-1,f=-1,g=0;g<h.length;g++)if(null!=h[g]&&""!==h[g].g.trim()){p=g;break}for(g=h.length-1;g>=0;g--)if(null!=h[g]&&""!==h[g].g.trim()){f=g;break}if(-1===p||-1===f)h=cX(i,r),e.nestedCues.push(h);else{for(;p<=f;p++)if(g=h[p]){var m=g.l,v=g.i,y=g.j,b=g.h;(m!=s||v!=u||y!=l||b!=d)&&(c.payload&&e.nestedCues.push(c),c=cz(i,r,m,v,y,b),s=m,u=v,l=y,d=b),c.payload+=g.g}else c.payload+=" ";c.payload&&e.nestedCues.push(c),a!==o&&(c=cX(i,r),e.nestedCues.push(c)),c=cz(i,r,s,u,l,d)}}return e.nestedCues.length?{cue:e,stream:t}:null}function cz(e,t,n,i,r,a){return e=new na(e,t,""),n&&e.textDecoration.push(nI),i&&(e.fontStyle=nE),e.color=r,e.backgroundColor=a,e}function cX(e,t){return(e=new na(e,t,"")).lineBreak=!0,e}function cY(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function cJ(e,t){this.i=[],this.g=1,this.h=0,this.D=e,this.C=t,this.j=this.m=!1,this.l="white",this.o="black",this.u=this.B=null,c$(this)}
1function cQ(e,t,n){var i="CC"+((e.D<<1|e.C)+1),r=new na(t,n,"");r.lineInterpretation=1;var a=c6.get(e.g);return a&&(r.line=a),null!=e.u&&null!=e.B&&(r.position=10+Math.min(70,10*e.u)+2.5*e.B),(t=cW(r,i,e.i,t,n))&&e.g+t.cue.nestedCues.length-3>15&&(a=c6.get(e.g+3-t.cue.nestedCues.length))&&(r.line=a),t}function c$(e){c1(e,0,15),e.g=1}function cZ(e,t,n){if(!(n<32||n>127)){var i="";switch(t){case 0:i=c2.has(n)?c2.get(n):String.fromCharCode(n);break;case 1:i=c3.get(n);break;case 2:e.i[e.g].pop(),i=c4.get(n);break;case 3:e.i[e.g].pop(),i=c5.get(n)}i&&e.i[e.g].push(new cY(i,e.m,e.j,e.o,e.l))}}function c0(e,t,n,i){if(!(n<0||t<0))if(t>=n)for(--i;i>=0;i--)e.i[t+i]=e.i[n+i].map(function(e){return e});else for(var r=0;r<i;r++)e.i[t+r]=e.i[n+r].map(function(e){return e})}function c1(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var c2=new Map([[39,"’"],[42,"á"],[92,"é"],[92,"é"],[94,"í"],[95,"ó"],[96,"ú"],[123,"ç"],[124,"÷"],[125,"Ñ"],[126,"ñ"],[127,"█"]]),c3=new Map([[48,"®"],[49,"°"],[50,"½"],[51,"¿"],[52,"™"],[53,"¢"],[54,"£"],[55,"♪"],[56,"à"],[57," "],[58,"è"],[59,"â"],[60,"ê"],[61,"î"],[62,"ô"],[63,"û"]]),c4=new Map([[32,"Á"],[33,"É"],[34,"Ó"],[35,"Ú"],[36,"Ü"],[37,"ü"],[38,"‘"],[39,"¡"],[40,"*"],[41,"'"],[42,"─"],[43,"©"],[44,"℠"],[45,"·"],[46,"“"],[47,"”"],[48,"À"],[49,"Â"],[50,"Ç"],[51,"È"],[52,"Ê"],[53,"Ë"],[54,"ë"],[55,"Î"],[56,"Ï"],[57,"ï"],[58,"Ô"],[59,"Ù"],[60,"ù"],[61,"Û"],[62,"«"],[63,"»"]]),c5=new Map([[32,"Ã"],[33,"ã"],[34,"Í"],[35,"Ì"],[36,"ì"],[37,"Ò"],[38,"ò"],[39,"Õ"],[40,"õ"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"Ä"],[49,"ä"],[50,"Ö"],[51,"ö"],[52,"ß"],[53,"¥"],[54,"¤"],[55,"│"],[56,"Å"],[57,"å"],[58,"Ø"],[59,"ø"],[60,"┌"],[61,"┐"],[62,"└"],[63,"┘"]]),c6=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function c8(e,t){this.h=0,this.o=new cJ(e,t),this.i=new cJ(e,t),this.g=this.j=new cJ(e,t),this.l=0,this.m=null}function c9(e,t,n){e.g=e.i;var i=e.g,r=null;return 3!==e.h&&4!==e.h&&(r=cQ(i,e.l,n),(n=e.i).g=n.h>0?n.h:0,c1(n,0,15),(n=e.j).g=n.h>0?n.h:0,c1(n,0,15),i.g=15),e.h=3,i.h=t,r}function c7(e){e.h=1,e.g=e.j,e.g.h=0}function he(e){J("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=4}var ht="black green blue cyan red yellow magenta black".split(" "),hn="white green blue cyan red yellow magenta white_italics".split(" ");function hi(e,t){this.J=t,this.N=e,this.K=this.l=!1,this.m=this.o=this.H=this.M=this.I=0,this.F=2,this.i=[],this.g=this.h=this.j=0,this.D=this.B=!1,this.C="white",this.u="black",hr(this)}function hr(e){e.i=[];for(var t=0;t<16;t++)e.i.push(ha())}function ha(){for(var e=[],t=0;t<42;t++)e.push(null);return e}function ho(e,t){hs(e)&&(e.i[e.h][e.g]=new cY(t,e.D,e.B,e.u,e.C),e.g++)}function hs(e){var t=e.g<e.m&&e.g>=0;return e.h<e.o&&e.h>=0&&t}function hu(e,t,n){var i=new na(e.j,t,"");i.textAlign=0===e.F?"left":1===e.F?"right":nh;var r=i.region;switch(e.J&&(r.id+="svc"+e.J),r.id+="win"+e.N,r.height=e.o,r.width=e.m,r.heightUnits=2,r.widthUnits=2,r.viewportAnchorX=e.I,r.viewportAnchorY=e.M,r.viewportAnchorUnits=e.K?t_:2,e.H){case 0:r.regionAnchorX=0,r.regionAnchorY=0;break;case 1:r.regionAnchorX=50,r.regionAnchorY=0;break;case 2:r.regionAnchorX=100,r.regionAnchorY=0;break;case 3:r.regionAnchorX=0,r.regionAnchorY=50;break;case 4:r.regionAnchorX=50,r.regionAnchorY=50;break;case 5:r.regionAnchorX=100,r.regionAnchorY=50;break;case 6:r.regionAnchorX=0,r.regionAnchorY=100;break;case 7:r.regionAnchorX=50,r.regionAnchorY=100;break;case 8:r.regionAnchorX=100,r.regionAnchorY=100}return(n=cW(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}function hl(){this.i=[],this.h=null,this.g=0}function hd(e){this.g=0,this.h=e}function hc(e){if(!e.Ka())throw new eN(2,2,3e3);return e.h[e.g++]}function hh(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function hp(e,t){for(var n=[],i=0;i<8;i++)(1&t)==1&&e.h[i]&&n.push(i),t>>=1;return n}function hf(e,t,n){var i=[];t=S(hp(e,t));for(var r=t.next();!r.done;r=t.next()){r=r.value;var a=e.h[r];a.isVisible()&&(a=hu(a,n,e.i))&&i.push(a),e.h[r]=null}return i}function hg(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function hm(e,t,n){var i={0:0,1:0,2:1,3:1};return hy[(e=i[e])<<2|(t=i[t])<<1|(n=i[n])]}hi.prototype.isVisible=function(){return this.l},hi.prototype.display=function(){this.l=!0},hd.prototype.Ka=function(){return this.g<this.h.length},hd.prototype.Oa=function(){return this.g},hd.prototype.skip=function(e){if(this.g+e>this.h.length)throw new eN(2,2,3e3);this.g+=e},hd.prototype.Ki=function(e){if(this.g-e<0)throw new eN(2,2,3e3);this.g-=e};var hv=new Map([[32," "],[33," "],[37,"…"],[42,"Š"],[44,"Œ"],[48,"█"],[49,"‘"],[50,"’"],[51,"“"],[52,"”"],[53,"•"],[57,"™"],[58,"š"],[60,"œ"],[61,"℠"],[63,"Ÿ"],[118,"⅛"],[119,"⅜"],[120,"⅝"],[121,"⅞"],[122,"│"],[123,"┐"],[124,"└"],[125,"─"],[126,"┘"],[127,"┌"]]),hy="black blue green cyan red magenta yellow white".split(" ");function hb(){this.h=[],this.g=[],this.i=new hl,this.l=0,this.m=new Map([["CC1",new c8(0,0)],["CC2",new c8(0,1)],["CC3",new c8(1,0)],["CC4",new c8(1,1)]]),this.u=this.o=0,this.j=new Map,this.C=!0,this.B=new Set,h_(this)}function h_(e){e.o=0,e.u=0;for(var t=S(e.m.values()),n=t.next();!n.done;n=t.next())(n=n.value).h=0,n.g=n.j,n.m=null,c$(n.i),c$(n.j),c$(n.o);e.C=!0}function hw(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function hT(e){for(var t=[],n=e,i=e=0;i<n.length;)2==e&&3==n[i]?(e=0,(n=[].concat(x(n))).splice(i,1),n=new Uint8Array(n)):0==n[i]?e++:e=0,i++;for(e=n,i=0;i<e.length;){for(n=0;255==e[i];)n+=255,i++;n+=e[i++];for(var r=0;255==e[i];)r+=255,i++;r+=e[i++],4==n&&t.push(e.subarray(i,i+r)),i+=r}return t}function hS(){this.j=new Map,this.i=this.h=0,this.g=hx}hb.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,h_(this),e=S(this.j.values());for(var t=e.next();!t.done;t=e.next())hg(t.value)},hb.prototype.extract=function(e,t){if(this.C){for(var n=S(this.m.values()),i=n.next();!i.done;i=n.next())i.value.l=t;this.C=!1}if(!(8>(e=new rb(e,0)).getLength())&&181===e.Z()&&49===e.Da()&&0x47413934===e.W()&&3===e.Z()&&(64&(n=e.Z()))!=0)for(n&=31,e.skip(1),i=0;i<n;i++){var r=e.Z(),a=(4&r)>>2,o=e.Z(),s=e.Z();a&&(0==(r&=3)||1===r?this.h.push({pts:t,type:r,zb:o,ec:s,order:this.h.length}):(this.g.push({pts:t,type:r,value:o,order:this.g.length}),this.g.push({pts:t,type:2,value:s,order:this.g.length})))}},hb.prototype.decode=function(){function e(e,t){return e.pts-t.pts||e.order-t.order}var t,n,i=[];this.h.sort(e),this.g.sort(e);for(var r=S(this.h),a=r.next();!a.done;a=r.next())(a=function(e,t){var n=t.type;if((112&t.zb)==16){var i=t.zb>>3&1;0===n?e.o=i:e.u=i}if(i="CC"+((n<<1|(n?e.u:e.o))+1),n=e.m.get(i),255===t.zb&&255===t.ec||!t.zb&&!t.ec||!hw(t.zb)||!hw(t.ec))return++e.l>=45&&h_(e),null;e.l=0,t.zb&=127,t.ec&=127;var r=t.zb;if(r>=1&&r<=15||!t.zb&&!t.ec)return null;
1if(r=null,(112&t.zb)==16)e:{if(e.B.add(i),i=t.zb,e=t.ec,n.m===(i<<8|e))n.m=null;else if(n.m=i<<8|e,(240&i)==16&&(192&e)==64){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&i)<<1|e>>5&1],i="white",r=!1;var a=null,o=e>95?e-96:e-64;o<=13?i=hn[Math.floor(o/2)]:o<=15?r=!0:a=Math.floor((o-16)/2),e=(1&e)==1,4!==n.h&&(o=n.g,3===n.h&&t!==o.g&&(n=1+t-o.h,c0(o,n,1+o.g-o.h,o.h),c1(o,0,n-1),c1(o,t+1,15-t)),o.g=t,o.m=e,o.j=r,o.l=i,o.u=a,o.o="black")}else if((247&i)==17&&(240&e)==32)n.g.m=!1,n.g.j=!1,n.g.l="white",cZ(n.g,0,32),i=!1,"white_italics"===(t=hn[(14&e)>>1])&&(t="white",i=!0),n.g.m=(1&e)==1,n.g.j=i,n.g.l=t;else if((247&i)==16&&(240&e)==32||(247&i)==23&&(255&e)==45)t="black",7&i||(t=ht[(14&e)>>1]),n.g.o=t;else if((247&i)==17&&(240&e)==48)cZ(n.g,1,e);else if((246&i)==18&&(224&e)==32)cZ(n.g,1&i?3:2,e);else{if((246&i)==20&&(240&e)==32){switch(e=t.pts,i=null,t.ec){case 32:c7(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:i=c9(n,2,e);break;case 38:i=c9(n,3,e);break;case 39:i=c9(n,4,e);break;case 40:cZ(n.g,0,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:c$(n.o),he(n);break;case 43:he(n);break;case 44:t=n.i,i=null,4!==n.h&&(i=cQ(t,n.l,e)),c1(t,0,15);break;case 45:t=n.g,3!==n.h?i=null:(i=cQ(t,n.l,e),r=t.g-t.h+1,c0(t,r-1,r,t.h),c1(t,0,r-1),c1(t,t.g,15-t.g),n.l=e);break;case 46:c1(n.j,0,15);break;case 47:t=null,4!==n.h&&(t=cQ(n.i,n.l,e)),i=n.j,n.j=n.i,n.i=i,c7(n),n.l=e,i=t}r=i;break e}(23==i||31==i)&&e>=33&&e<=35&&(n.g.B=e-32)}r=null}else e=t.ec,cZ(n.g,0,t.zb),cZ(n.g,0,e);return r}(this,a.value))&&i.push(a);for(a=(r=S(this.g)).next();!a.done;a=r.next())t=this.i,3===(n=a.value).type?(t.g=(63&n.value)*2-1,t.h=[]):t.h&&(t.g>0&&(t.h.push(n),t.g--),0===t.g&&(t.i.push(new hd(t.h)),t.h=null,t.g=0));for(a=(r=S(this.i.i)).next();!a.done;a=r.next())a=function(e,t){var n=[];try{for(;t.Ka();){var i=hc(t).value,r=(224&i)>>5,a=31&i;if(7===r&&0!=a&&(r=63&hc(t).value),0!=r){e.B.add("svc"+r),e.j.has(r)||e.j.set(r,new hh(r));for(var o=e.j.get(r),s=t.Oa();t.Oa()-s<a;){r=o;var u=t,l=hc(u),d=l.value,c=l.pts;if(16===d){var h=hc(u);d=d<<16|h.value}if(d>=0&&d<=31)var p=function(e,t,n,i){if(!e.g)return[];if(24==n)return n=[n=hc(t).value,i=hc(t).value].map(function(e){return("0"+(255&e).toString(16)).slice(-2)}).join(""),ho(e.g,String.fromCharCode(parseInt(n,16))),[];t=e.g;var r=null;switch(n){case 8:!hs(t)||t.g<=0&&t.h<=0||(t.g<=0?(t.g=t.m-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(r=hu(t,i,e.i)),t.h+1>=t.o?function(e){for(var t=0,n=1;n<16;n++,t++)e.i[t]=e.i[n];for(n=0;n<1;n++,t++)e.i[t]=ha()}(t):t.h++,t.g=0;break;case 14:t.isVisible()&&(r=hu(t,i,e.i)),t.i[t.h]=ha(),t.g=0;break;case 12:t.isVisible()&&(r=hu(t,i,e.i)),hr(t),t.h=0,t.g=0}return r?[r]:[]}(r,u,d,c);else if(d>=128&&d<=159)p=function(e,t,n,i){if(n>=128&&n<=135)i=7&n,e.h[i]&&(e.g=e.h[i]);else{if(136===n){n=hc(t).value,t=[],n=S(hp(e,n));for(var r=n.next();!r.done;r=n.next()){if((r=e.h[r.value]).isVisible()){var a=hu(r,i,e.i);a&&t.push(a)}hr(r)}return t}if(137===n)for(n=(t=S(hp(e,t=hc(t).value))).next();!n.done;n=t.next())(n=e.h[n.value]).isVisible()||(n.j=i),n.display();else{if(138===n){for(n=hc(t).value,t=null,r=(n=S(hp(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=hu(r,i,e.i)),r.l=!1;return t?[t]:[]}if(139===n){for(n=hc(t).value,t=null,r=(n=S(hp(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()?t=hu(r,i,e.i):r.j=i,r.l=!r.l;return t?[t]:[]}if(140===n)return hf(e,t=hc(t).value,i);if(143===n)return i=hf(e,255,i),hg(e),i;if(144===n)t.skip(1),i=hc(t).value,e.g&&(e.g.B=(128&i)>0,e.g.D=(64&i)>0);
1else if(145===n)i=hc(t).value,n=hc(t).value,t.skip(1),e.g&&(t=hm((48&n)>>4,(12&n)>>2,3&n),e.g.C=hm((48&i)>>4,(12&i)>>2,3&i),e.g.u=t);else if(146===n)i=hc(t).value,t=hc(t).value,e.g&&((e=e.g).h=15&i,e.g=63&t);else if(151===n)t.skip(1),t.skip(1),i=hc(t).value,t.skip(1),e.g&&(e.g.F=3&i);else if(n>=152&&n<=159){n=(15&n)-8,(r=null!==e.h[n])||((a=new hi(n,e.i)).j=i,e.h[n]=a),i=hc(t).value,a=hc(t).value;var o=hc(t).value,s=hc(t).value,u=hc(t).value;t=hc(t).value,r&&!(7&t)||((t=e.h[n]).h=0,t.g=0,t.D=!1,t.B=!1,t.C="white",t.u="black"),(t=e.h[n]).l=(32&i)>0,t.M=127&a,t.I=o,t.H=(240&s)>>4,t.K=(128&a)>0,t.o=(15&s)+1,t.m=(63&u)+1,e.g=e.h[n]}}}return[]}(r,u,d,c);else{if(d>=4096&&d<=4127)r=u,(u=255&d)>=8&&u<=15?r.skip(1):u>=16&&u<=23?r.skip(2):u>=24&&u<=31&&r.skip(3);else if(d>=4224&&d<=4255)r=u,(u=255&d)>=128&&u<=135?r.skip(4):u>=136&&u<=143&&r.skip(5);else if(d>=32&&d<=127)u=d,r.g&&(127===u?ho(r.g,"♪"):ho(r.g,String.fromCharCode(u)));else if(d>=160&&d<=255)r.g&&ho(r.g,String.fromCharCode(d));else if(d>=4128&&d<=4223){if(u=255&d,r.g)if(hv.has(u)){var f=hv.get(u);ho(r.g,f)}else ho(r.g,"_")}else d>=4256&&d<=4351&&r.g&&((255&d)!=160?ho(r.g,"_"):ho(r.g,"[CC]"));p=[]}n.push.apply(n,x(p))}}}}catch(e){if(e instanceof eN&&3e3===e.code)J("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw e}return n}(this,a.value),i.push.apply(i,x(a));return this.i.i=[],this.h=[],this.g=[],i},hb.prototype.getStreams=function(){return Array.from(this.B)},q("shaka.cea.CeaDecoder",hb),ty=function(){return new hb},hS.prototype.init=function(e){function t(e){e=e.name,hI.has(e)&&(n.g=hI.get(e))}var n=this,i=[],r=[];if(new rT().box("moov",rS).box("mvex",rS).S("trex",function(e){var t=e.reader;t.skip(4),t.skip(4),e=t.W(),t=t.W(),n.h=e,n.i=t}).box("trak",rS).S("tkhd",function(e){var t=e.reader;1==(e=e.version)?(t.skip(8),t.skip(8)):(t.skip(4),t.skip(4));var n=t.W();1==e?t.skip(8):t.skip(4),t.skip(4),t.skip(8),t.skip(2),t.skip(2),t.skip(2),t.skip(2),t.skip(36),t.Da(),t.Da(),t.Da(),t.Da(),i.push(n)}).box("mdia",rS).S("mdhd",function(e){e=ad(e.reader,e.version),r.push(e.timescale)}).box("minf",rS).box("stbl",rS).S("stsd",rx).box("avc1",t).box("avc3",t).box("dvav",t).box("dva1",t).box("hev1",t).box("hvc1",t).box("dvh1",t).box("dvhe",t).box("vvc1",t).box("vvi1",t).box("dvc1",t).box("dvi1",t).box("encv",rA).box("sinf",rS).box("frma",function(e){e=ap(e.reader).codec,hI.has(e)&&(n.g=hI.get(e))}).parse(e,!0,!0),!i.length||!r.length||i.length!=r.length)throw new eN(2,2,2010);this.g==hx&&Y("Unable to determine bitstream format for CEA parsing!"),i.forEach(function(e,t){n.j.set(e,r[t])})},hS.prototype.parse=function(e){var t=this;if(this.g==hx)return[];var n=[],i=0,r=[];return new rT().box("moof",function(e){i=e.start,r=[],rS(e)}).box("traf",function(e){r.push({baseMediaDecodeTime:null,Pd:t.h,Qd:t.i,Ci:[],timescale:9e4}),rS(e)}).S("trun",function(e){var t=r[r.length-1];e=ac(e.reader,e.version,e.flags),t.Ci.push(e)}).S("tfhd",function(e){var n=r[r.length-1];n.Pd=(e=au(e.reader,e.flags)).Pd||t.h,n.Qd=e.Qd||t.i,e=e.trackId,t.j.has(e)&&(n.timescale=t.j.get(e))}).S("tfdt",function(e){r[r.length-1].baseMediaDecodeTime=(e=al(e.reader,e.version)).baseMediaDecodeTime}).box("mdat",function(e){for(var a=i-e.start-8,o=e.reader.Oa(),s=S(r),u=s.next();!u.done;u=s.next())null===(u=u.value).baseMediaDecodeTime?Y("Unable to find base media decode time for CEA captions!"):(e.reader.seek(o),function(e,t,n,i,r,a,o,s,u){var l=0,d=a,c=s.map(function(e){return e.kh});for((c=[].concat.apply([],x(c))).length&&(d=c[0].sampleSize||a),t.skip(o+s[0].ng);t.Ka();){o=t.W();var h=t.Z(),p=null;switch(p=!1,s=1,e.g){case hA:p=6==(p=31&h);break;case hE:s=2,t.skip(1),p=39==(p=h>>1&63)||40==p;break;case hk:s=2,t.skip(1),p=23==(p=h>>1&63)||24==p;break;default:return}if(p)for(h=0,l<c.length&&(h=c[l].Df||0),h=(n+h)/i,p=(s=S(hT(s=t.Ob(o-s,!1)))).next();!p.done;p=s.next())u.push({packet:p.value,pts:h});else try{t.skip(o-s)}catch(e){break}0==(d-=o+4)&&(n=l<c.length?n+(c[l].mh||r):n+r,d=++l<c.length&&c[l].sampleSize||a)}}(t,e.reader,u.baseMediaDecodeTime,u.timescale,u.Pd,u.Qd,a,u.Ci,n))}).parse(e,!1,!0),n},q("shaka.cea.Mp4CeaParser",hS);var hx=0,hA=1,hE=2,hk=3,hI=new Map().set("avc1",hA).set("avc3",hA).set("dvav",hA).set("dva1",hA).set("hev1",hE).set("hvc1",hE).set("dvh1",hE).set("dvhe",hE).set("vvc1",hk).set("vvi1",hk).set("dvc1",hk).set("dvi1",hk);function hC(){this.g=null}function hM(e){return(e=(function(e){var t=0,n=eL(e),i=n.getUint32(t,!0);if(i!=e.byteLength)return[];e:{for(e=t+4+2,t=[];e<n.byteLength-1;){i=n.getUint16(e,!0),e+=2;var r=n.getUint16(e,!0);if(e+=2,(1&r)!=0||r+e>n.byteLength){n=[];break e}var a=eD(n,e,r);t.push({type:i,value:a}),e+=r}n=t}return n})(e=eX(tG(e))).filter(function(e){return e.type===hD})[0])&&(e=tB(e=eB(e.value,!0),"WRMHEADER"))?e:null}function hP(e){try{var t=hM(e);if(t)e:{for(var n=S(tW(t,"DATA")),i=n.next();!i.done;i=n.next()){var r=i.value;if(r.children)for(var a=S(r.children),o=a.next();!o.done;o=a.next()){var s=o.value;if("LA_URL"==s.tagName){var u=tG(s);break e}}}u=""}else u="";return u}catch(e){return""}}tg("video/mp4",function(){return new hS}),hC.prototype.init=function(){},hC.prototype.parse=function(e){this.g?this.g.clearData():this.g=new ov;var t=[];if(!oA(e=eD(e)))return t;var n=(e=this.g.parse(e)).Rd(),i=e.Xe();switch(e=[],n.video){case"avc":e.push(6);break;case"hvc":e.push(39),e.push(40)}if(!e.length)return t;for(i=(n=S(i)).next();!i.done;i=n.next())if(i=i.value,e.includes(i.type)&&null!=i.time)for(var r=S(hT(i.data)),a=r.next();!a.done;a=r.next())t.push({packet:a.value,pts:i.time});return t},q("shaka.cea.TsCeaParser",hC),tg("video/mp2t",function(){return new hC});var hD=1;function hR(){this.g=new Map}function hL(t,n,i,r){var a=function(e,t){var n=[];t=S(t);for(var i=t.next();!i.done;i=t.next())(i=function(e,t){var n=t.attributes.schemeIdUri,i=tJ(t,"urn:mpeg:cenc:2013","default_KID"),r=tQ(t,"urn:mpeg:cenc:2013","pssh").map(tK),a=t.attributes.value;if(!n)return null;if(n=n.toLowerCase(),i&&(i=i.replace(/-/g,"").toLowerCase()).includes(" "))throw new eN(2,4,4009);var o=[];try{o=r.map(function(t){if(!e.g.has(t)){var n=eX(t);e.g.set(t,n)}return{initDataType:"cenc",initData:e.g.get(t),keyId:null}})}catch(e){throw new eN(2,4,4007)}return{node:t,yd:n,keyId:i,init:o.length>0?o:null,encryptionScheme:a}}(e,i.value))&&n.push(i);return n}(t,n),o=null;t=[];var s=[];n=null;var u=new Set(a.map(function(e){return e.keyId}));u.delete(null);var l="cenc";if(u.size>1)throw new eN(2,4,4010);if(!i){if((s=a.filter(function(e){return"urn:mpeg:dash:sea:2012"==e.yd})).length>1)throw new eN(2,4,4050);s.length&&(n=function(t){if(!e.crypto||!e.crypto.subtle)throw Y("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new eN(2,4,4042);var n=tX(t.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!n||"urn:mpeg:dash:sea:aes128-cbc:2013"!=n.attributes.schemeIdUri||!(n=tX(t.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"))||(t=n.attributes.IV,n=eq(n.attributes.keyUriTemplate),!t||!n))throw new eN(2,4,4051);if(16!=(t=eY(t.substr(2))).byteLength)throw new eN(2,4,4048);return{rk:n,iv:t}}(s[0])),(s=a.find(function(e){return"urn:mpeg:dash:mp4protection:2011"==e.yd}))&&s.encryptionScheme&&(l=s.encryptionScheme),(s=a.filter(function(e){return"urn:mpeg:dash:mp4protection:2011"==e.yd?(o=e.init||o,!1):"urn:mpeg:dash:sea:2012"!=e.yd})).length&&0==(t=function(e,t,n,i,r){var a=[];n=S(n);for(var o=n.next();!o.done;o=n.next()){var s,u=i[(o=o.value).yd];if(u){if((s=tX(o.node,"urn:microsoft:playready","pro"))&&tG(s)){s=eX(s=tG(s));var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);s=[{initData:rL(s,l,new Set,0),initDataType:"cenc",keyId:o.keyId}]}else s=null;if(l=null,"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===o.yd)if(l=o,0==r.size)l=null;else{var d=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]);l=[{initData:rL(new Uint8Array([]),d,r,1),initDataType:"cenc",keyId:l.keyId}]}s=e0(u,t,o.init||e||s||l),(u=hN.get(u))&&(s.licenseServerUri=u(o)),a.push(s)}}return a}(o,l,s,r,u)).length&&(t=[e0("",l,o)])}if(a.length&&!n&&(i||!s.length))for(t=[],r=(i=S(Object.values(r))).next();!r.done;r=i.next())"org.w3.clearkey"!=(r=r.value)&&t.push(e0(r,l,o));if(u=Array.from(u)[0]||null)for(i=(l=S(t)).next();!i.done;i=l.next())for(r=(i=S(i.value.initData)).next();!r.done;r=i.next())r.value.keyId=u;return{Uh:u,Dm:o,drmInfos:t,dg:n,Zh:!0}}function hO(e){var t=tX(e.node,"https://dashif.org/CPS","Laurl");if(t&&(t=tG(t)))return t;if((t=tX(e.node,"urn:microsoft:playready","pro"))&&tG(t))return hP(t);if((e=tX(e.node,"urn:mpeg:cenc:2013","pssh"))&&(e=tG(e))){t=eX(e),e=8;var n=(t=eL(t)).getUint8(e);return e+=20,n>0&&(e+=4+16*t.getUint32(e)),hP(e=tB("<pro>"+(e=eW(e=eD(t,e+4)))+"</pro>"))}return""}hR.prototype.release=function(){this.g.clear()};var hN=new Map().set("com.apple.fps",function(t){if("apple"===e.shakaMediaKeysPolyfill)throw new eN(2,4,4054);return(t=tX(t.node,"https://dashif.org/CPS","Laurl"))&&(t=tG(t))?t:""}).set("com.widevine.alpha",function(e){var t=tX(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=tG(t))?t:(e=tX(e.node,"urn:microsoft","laurl"))&&eq(e.attributes.licenseUrl)||""}).set("com.microsoft.playready",hO).set("com.microsoft.playready.recommendation",hO).set("com.microsoft.playready.softw
1are",hO).set("com.microsoft.playready.hardware",hO).set("org.w3.clearkey",function(e){var t=tX(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=tG(t))?t:(e=tX(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===e.attributes.Lic_type&&e&&(e=tG(e))?e:""});function hj(t,n,i,r,a,o){var s=new Map().set("RepresentationID",n).set("Number",i).set("SubNumber",r).set("Bandwidth",a).set("Time",o);return t.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(t,n,i,r){if("$$"==t)return"$";var a=s.get(n);if(null==a)return t;switch("RepresentationID"==n&&i&&(i=void 0),"Time"==n&&"bigint"!=typeof a&&(Math.abs(a-Math.round(a))>=.2&&Y("Calculated $Time$ values must be close to integers"),a=Math.round(a)),r){case void 0:case"d":case"i":case"u":default:t=a.toString();break;case"o":t=a.toString(8);break;case"x":t=a.toString(16);break;case"X":t=a.toString(16).toUpperCase()}return Array(Math.max(0,(i=e.parseInt(i,10)||1)-t.length)+1).join("0")+t})}function hU(e,t){var n=hF(e,t,"timescale"),i=1;n&&(i=t3(n)||1);var r=(n=t3((n=hF(e,t,"duration"))||""))?n/i:null,a=hF(e,t,"startNumber"),o=Number(hF(e,t,"presentationTimeOffset"))||0,s=t4(a||"");if((null==a||null==s)&&(s=1),a=null,t=hV(e,t,"SegmentTimeline")){t=tq(t,"S"),a=i,e=e.oa.duration||1/0;for(var u=s,l=[],d=-o,c=0;c<t.length;++c){var h=t[c],p=t[c+1],f=tY(h,"t",t4),g=tY(h,"d",t4),m=tY(h,"r",t2);if(h=tY(h,"k",t2)||0,null!=f&&(f-=o),g){if(f=null!=f?f:d,(m=m||0)<0)if(p){if(null==(p=tY(p,"t",t4))||f>=p)break;m=Math.ceil((p-f)/g)-1}else{if(e==1/0||f/a>=e)break;m=Math.ceil((e*a-f)/g)-1}for(l.length>0&&f!=d&&(l[l.length-1].end=f/a),p=0;p<=m;++p)d=f+g,l.push({start:f/a,Dd:f,end:d/a,Gh:d,qc:h,Uk:l.length+u}),f=d}}a=l}return{timescale:i,Mf:n,hb:r,ie:s,ac:o/i||0,Yc:o,timeline:a}}function hB(e,t){return[t(e.L),t(e.qa),t(e.va)].filter(n8)}function hF(e,t,n){t=hB(e,t),e=null,t=S(t);for(var i=t.next();!i.done&&!(e=i.value.attributes[n]);i=t.next());return e}function hV(e,t,n){t=hB(e,t),e=null,t=S(t);for(var i=t.next();!i.done&&!(e=tz(i.value,n));i=t.next());return e}function hH(e){this.h=eL(e),this.g=new rb(this.h,0)}function hq(e){var t=hG(e);if(t.length>7)throw new eN(2,3,3002);var n=0;t=S(t);for(var i=t.next();!i.done;i=t.next())n=256*n+i.value;t=hG(e);e:{i=S(hK);for(var r=i.next();!r.done;r=i.next())if(eM(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.Oa();else{if(8==t.length&&224&t[1])throw new eN(2,3,3001);for(r=i=0;r<t.length;r++){var a=t[r];i=0==r?a&(1<<8-t.length)-1:256*i+a}t=i}return t=e.g.Oa()+t<=e.h.byteLength?t:e.h.byteLength-e.g.Oa(),i=eL(e.h,e.g.Oa(),t),e.g.skip(t),new hW(n,i)}function hG(e){var t=e.g.Oa(),n=e.g.Z();if(0==n)throw new eN(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),eD(e.h,t,n)}hH.prototype.Ka=function(){return this.g.Ka()};var hK=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function hW(e,t){this.id=e,this.g=t}function hz(e){if(e.g.byteLength>8)throw new eN(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new eN(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++)t=256*t+e.g.getUint8(n);return t}function hX(e,t,n){if(!(t=hV(e,t,"Initialization")))return null;var i=e.L.bb(),r=t.attributes.sourceURL;r&&(i=eZ(i,[eq(r)],e.Gb())),r=0;var a=null;return(t=tY(t,"range",t1))&&(r=t.start,a=t.end),(n=new aq(function(){return i},r,a,hZ(e),null,null,n,e.qa.encrypted)).codecs=e.L.codecs,n.mimeType=e.L.mimeType,e.oa&&!e.oa.df&&(n.g=e.oa.start+e.oa.duration),n}function hY(e,t,n,i,r,a,o){var s,u,l,d,c,h,p,f,g,m,v,y,b,w,T,x,A,E,k,I;return L(function(C){if(1==C.h)return s=e.presentationTimeline,u=!e.ob||!e.oa.df,l=e.oa.start,d=e.oa.duration,c=e.L.mimeType.split("/")[1],p=null,f=[(h=t)(i,r,a,!1),"webm"==c?h(n.R(),n.startByte,n.endByte,!0):null],h=null,C.g(Promise.all(f),2);for(m=(g=C.i)[0],v=g[1]||null,y=null,b=l-o,w=l,T=d?l+d:1/0,A=(x=e.L.bb()).length!=i.length||x.some(function(e,t){return e!=i[t]}),k=(E=S(y="mp4"==c?function(e,t,n,i,r,a,o,s){var u,l=new rT().S("sidx",function(e){u=function(e,t,n,i,r,a,o,s){s=void 0!==s&&s;var u=[];o.reader.skip(4);var l=o.reader.W();if(0==l)throw new eN(2,3,3005);if(0==o.version)var d=o.reader.W(),c=o.reader.W();else d=o.reader.vd(),c=o.reader.vd();o.reader.skip(2);var h=o.reader.Da();for(e=(s?-o.size:e)+o.size+c,s=0;s<h;s++){var p=o.reader.W();c=(0x80000000&p)>>>31,p&=0x7fffffff;var f=o.reader.W();if(o.reader.skip(4),1==c)throw new eN(2,3,3006);
1u.push(new aK(d/l+n,(d+f)/l+n,function(){return a},e,e+p-1,t,n,i,r)),d+=f,e+=p}return o.parser.stop(),u}(t,i,r,a,o,n,e,s)});if(e&&l.parse(e),u)return u;throw new eN(2,3,3004)}(m,r,x,n,b,w,T,A):function(e,t,n,i,r,a,o){if(0x1a45dfa3!=hq(t=new hH(t)).id)throw new eN(2,3,3008);var s=hq(t);if(0x18538067!=s.id)throw new eN(2,3,3009);t=s.g.byteOffset,s=new hH(s.g);for(var u=null;s.Ka();){var l=hq(s);if(0x1549a966==l.id){u=l;break}}if(!u)throw new eN(2,3,3010);for(u=new hH(u.g),l=1e6,s=null;u.Ka();){var d=hq(u);if(2807729==d.id)l=hz(d);else if(17545==d.id)if(4==d.g.byteLength)s=d.g.getFloat32(0);else if(8==d.g.byteLength)s=d.g.getFloat64(0);else throw new eN(2,3,3003)}if(null==s)throw new eN(2,3,3011);if(s*=u=l/1e9,0x1c53bb6b!=(e=hq(new hH(e))).id)throw new eN(2,3,3007);return function(e,t,n,i,r,a,o,s,u){function l(){return r}var d=[];e=new hH(e.g);for(var c=null,h=null;e.Ka();){var p=hq(e);if(187==p.id){var f=function(e){var t=new hH(e.g);if(179!=(e=hq(t)).id)throw new eN(2,3,3013);if(e=hz(e),183!=(t=hq(t)).id)throw new eN(2,3,3012);t=new hH(t.g);for(var n=0;t.Ka();){var i=hq(t);if(241==i.id){n=hz(i);break}}return{ll:e,Mk:n}}(p);f&&(p=n*f.ll,f=t+f.Mk,null!=c&&d.push(new aK(c+o,p+o,l,h,f-1,a,o,s,u)),c=p,h=f)}}return null!=c&&d.push(new aK(c+o,i+o,l,h,null,a,o,s,u)),d}(e,t,u,s,n,i,r,a,o)}(m,v,x,n,b,w,T))).next();!k.done;k=E.next())(I=k.value).codecs=e.L.codecs,I.mimeType=e.L.mimeType,I.bandwidth=e.bandwidth;return s.ae(y),p=new sT(y),u&&p.fd(w,T,!0),C.return(p)})}function hJ(e){return e.zd}function hQ(e){var t=hV(e,hJ,"RepresentationIndex");return e=t1((e=hF(e,hJ,"indexRange"))||""),t&&(e=tY(t,"range",t1,e)),e}function h$(e,t){var n=e.L.mimeType.split("/")[1];if(e.L.contentType!=e5&&"mp4"!=n&&"webm"!=n)throw new eN(2,4,4006);if("webm"==n&&!t)throw new eN(2,4,4005)}function hZ(e){var t=e.L;return{bandwidth:e.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate||null,height:t.height||null,mimeType:t.mimeType,channelsCount:t.tf,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null,label:e.qa.label||null,roles:e.roles||null,language:e.qa.language||null}}function h0(e){return e.tc}function h1(t,n,i,r,a,o,s,u,l,d){l||t.L.$e||(t.L.$e=hF(t,h2,"initialization"));var c,h,p,f,g,m=t.L.$e?function(e,t){var n=e.L.$e;if(n||(n=hF(e,h2,"initialization")),!n)return null;n=eq(n);var i=e.L.originalId,r=e.bandwidth||null,a=e.L.bb,o=e.Gb;return(t=new aq(function(){var e=hj(n,i,null,null,r,null);return eZ(a(),[e],o())},0,null,hZ(e),null,null,t,e.qa.encrypted)).codecs=e.L.codecs,t.mimeType=e.L.mimeType,e.oa&&!e.oa.df&&(t.g=e.oa.start+e.oa.duration),t}(t,s):null,v=(c=hU(t,h2),h=hF(t,h2,"media"),p=hF(t,h2,"index"),f=hF(t,h2,"k"),g=0,f&&(g=parseInt(f,10)),{Mf:c.Mf,hb:c.hb,timescale:c.timescale,ie:c.ie,ac:c.ac,Yc:c.Yc,timeline:c.timeline,Wb:h&&eq(h),Wd:p,mimeType:t.L.mimeType,codecs:t.L.codecs,bandwidth:t.bandwidth,Bk:g}),y=+!!v.Wd;if(0==(y+=+!!v.timeline+ +!!v.hb)||(1!=y&&(v.Wd&&(v.timeline=null),v.Mf=null,v.hb=null),!v.Wd&&!v.Wb))throw new eN(2,4,4002);var b=tN(t);if(v.Wd)return h$(t,m),{endTime:-1,timeline:-1,Nc:function(){var e=hj(v.Wd,b.L.originalId,null,null,b.bandwidth||null,null);return e=eZ(b.L.bb(),[e]),hY(b,n,m,e,0,null,v.ac)},timescale:v.timescale};if(v.hb)return r||"image"===t.qa.contentType||"text"===t.qa.contentType||(r=t.oa.start,d=t.va.id,i=t.oa.duration,d=(d=null!=d&&o.get(d)||i)?r+d:1/0,t.presentationTimeline.Ug(v.hb),t.presentationTimeline.Ai(r,d)),{endTime:-1,timeline:-1,Nc:function(){return function(t,n,i,r,a,o,s,u){function l(i){var a=i-v,s=a*m,l=n.Mf,d=a*l;"BigInt"in e&&d>Number.MAX_SAFE_INTEGER&&(d=BigInt(a)*BigInt(l)),s+=p,l=Math.min(a=s+m,c());var h=[],f=n.Bk;if(f)for(var g=(l-s)/f,S={},E=0;E<f;S={Yi:void 0},E++){var k=s+g*E,I=k+g;S.Yi=E,(S=new aK(k,I,function(e){return function(){var t=hj(y,w,i,e.Yi,b,d);return eZ(T(),[t],x())}}(S),0,null,r,A,p,c(),[],"",null,null,az,o)).codecs=t.L.codecs,S.mimeType=t.L.mimeType,0==u?E>0&&S.od():E%u!=0&&S.od(),h.push(S)}return(s=new aK(s,l,function(){if(f)return[];var e=hj(y,w,i,null,b,d);return eZ(T(),[e],x())},0,null,r,A,p,c(),h,"",null,null,az,o,h.length>0)).codecs=t.L.codecs,s.mimeType=t.L.mimeType,s.bandwidth=t.bandwidth,s.j=a,s}function d(){var e=[Math.max(h.Db(),p),Math.min(h.Ac(),c())].map(function(e){return e-p});return e=[Math.ceil(e[0]/m),Math.ceil(e[1]/m)-1],t.L.kb&&e[1]++,e.map(function(e){return e+v})}function c(){var e=null!=f&&a.get(f)||g;return e?p+e:1/0}var h=t.presentationTimeline,p=t.oa.start,f=t.va.id,g=t.oa.duration,m=n.hb,v=n.ie,y=n.Wb,b=t.bandwidth||null,w=t.L.originalId,T=t.L.bb,x=t.Gb,A=p-n.ac,E=d(),k=new h3(i=t.ob?Math.max(E[0],E[1]-i+1):E[0],s=s||E[1],v,p,m,l);E=h.Ac()<c();var I=h.U();if(E||I){var C=Math.max(i,s+1);i=m,t.L.kb&&(i=.1),k.Nf(i,function(){var e=h.Db();k.Sa(e);var t=S(d());t.next(),t=t.next().value;for(var n=[];C<=t;){var i=l(C);n.push(i),C++}return e>c()&&!n.length?null:n})}return Promise.resolve(k)}(b,v,a,m,o,s,u,t.L.Ff)},timescale:v.timescale};var w=null;r=r=null,t.va.id&&t.L.id&&(r=t.va.id+","+t.L.id,r=i.get(r))&&(w=r.segmentIndex);var T=t.oa.start,x=t.oa.duration?T+t.oa.duration:1/0;
1if(w)h5(d=w,v,T,x,m,t.ob),d.Sa(t.presentationTimeline.Db());else{if(i=0,l=-1,null!=t.va.id&&null!=t.L.id){var A=d.get(t.va.id);if(A)l=A.timeline;else for(A=(d=S(d.values())).next();!A.done;A=d.next())if(A=A.value,Math.abs(v.ac-A.endTime)<=e8&&A.fh.includes(t.L.id)){l=A.timeline;break}else A.timeline>=i&&(i=A.timeline+1)}-1==l&&(l=i),w=new h4(t.ob,v,t.L.originalId,t.bandwidth,t.L.bb,t.Gb,T,x,m,s,t.L.Ff,l)}return v.timeline&&"image"!==t.qa.contentType&&"text"!==t.qa.contentType&&t.presentationTimeline.Bi(w.h?w.h.timeline:[],T),r&&t.ob&&(r.segmentIndex=w),r=(r=(r=v.timeline)&&r[r.length-1])?r.end+v.ac:-1,d=-1,w instanceof h4&&(d=w.Me()),{endTime:r,timeline:d,Nc:function(){return w instanceof h4&&0==w.getNumReferences()&&h5(w,v,T,x,m,t.ob),Promise.resolve(w)},timescale:v.timescale}}function h2(e){return e.Gc}function h3(e,t,n,i,r,a){sT.call(this,Array(Math.max(0,t-e+1))),this.h=e,this.u=n,this.j=i,this.l=r,this.B=a}function h4(e,t,n,i,r,a,o,s,u,l,d,c){sT.call(this,[]),this.D=e,this.h=t,this.H=n,this.C=i,this.F=r,this.J=a,this.j=o,this.l=s,this.u=u,this.B=l,this.I=d,this.K=c,h6(this)}function h5(e,t,n,i,r,a){if(function(e,t){if(e.u!==t){e.u=t,e=S(e.g);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&function e(t,n){t.$=n,t=S(t.g);for(var i=t.next();!i.done;i=t.next())e(i.value,n)}(n,t)}}(e,r),e.D=a,e.h){if(e.h.Yc!==t.Yc)for(n=t.Yc-e.h.Yc,r=0;r<t.timeline.length;r++)a=t.timeline[r],a.Dd+=n,a.Gh+=n,a.start=(a.Dd+n)/t.timescale,a.end=(a.Gh+n)/t.timescale;if(e.h.Wb!==t.Wb&&(e.h.Wb=t.Wb),(n=e.h.timeline).length){var o=n[n.length-1];t=t.timeline.filter(function(e){return e.end>o.end})}else t=t.timeline.slice();t.length>0&&e.h.timeline.push.apply(e.h.timeline,x(t)),e.l!==i&&(e.l=i)}else e.h=t,e.j=n,e.l=i;h6(e)}function h6(e){if(e.h&&!e.o){for(var t=[],n=S(e.h.timeline),i=n.next();!i.done;i=n.next())(i=i.value).start>=e.l||i.end<=0||t.push(i);e.h.timeline=t,e.Sa(e.j)}}function h8(e,t,n,i,r,a,o,s){return e=hj(e,t,n,a,i||null,r),eZ(o(),[e],s()).map(function(e){return e.toString()})}function h9(e){this.o=null,this.B=e,this.H=new rn,this.i=[],this.h=null,this.m=[],this.C=null,this.F=[],this.D=300,this.l=new Map,this.j=new Map,this.g=null,this.u="UNKNOWN"}function h7(e,t){var n,i,r,a,o;return L(function(s){var u,l;return 1==s.h?(n=rs(eZ(e.i,[function(e,t){if(!e.m.length)return t;t=new ef(t);var n=e.C||e.m[0],i=Math.round(e.B.getBandwidthEstimate()),r=t.g;return"DASH"==e.u?(r.add("_DASH_pathway",n),r.add("_DASH_throughput",String(i))):"HLS"==e.u&&(r.add("_HLS_pathway",n),r.add("_HLS_throughput",String(i))),eI(r),r.Od&&ey(t,r),t.toString()}(e,t)]),e.o.retryParameters),i=e.B.networkingEngine.request(8,n),ri(e.H,i),s.m(2),s.g(i.promise,4)):2!=s.h?(1==(a=JSON.parse(eU((r=s.i).data))).VERSION&&(u=r.uri,null!=e.g&&(e.g.stop(),e.g=null),l=a["RELOAD-URI"]||u,e.g=new n4(function(){h7(e,l)}),(u=a.TTL)&&(e.D=u),e.g.ea(e.D),e.m=a["PATHWAY-PRIORITY"]||[],e.F=a["PATHWAY-CLONES"]||[]),s.o(0)):(o=s.l())&&7001==o.code?s.return():void(null!=e.g&&(e.g.stop(),e.g=null),e.g=new n4(function(){h7(e,t)}),e.g.ea(e.D),s.j())})}function pe(e,t,n,i){var r=e.l.get(t);r||(r=new Map),r.set(n,i),e.l.set(t,r)}function pt(e,t,n){n=void 0!==n&&n,t=e.l.get(t)||new Map;for(var i=[],r=S(e.m),a=r.next(),o={};!a.done;o={sd:void 0},a=r.next())if(o.sd=a.value,a=t.get(o.sd))i.push({Zg:o.sd,location:a});else if(a=e.F.find(function(e){return function(t){return t.Nl==e.sd}}(o))){var s=t.get(a["BASE-ID"]);s&&(a["URI-REPLACEMENT"].jj?(em(s=new ef(s),a["URI-REPLACEMENT"].jj),i.push({Zg:o.sd,location:s.toString()})):i.push({Zg:o.sd,location:s}))}for(r=Date.now(),a=(o=S(e.j.keys())).next();!a.done;a=o.next())a=a.value,r>(s=e.j.get(a))&&e.j.delete(a);if((i=i.filter(function(t){for(var n=S(e.j.keys()),i=n.next();!i.done;i=n.next())if(i.value.includes(new ef(t.location).Ab))return!1;return!0})).length&&(e.C=i[0].Zg),!(i=i.map(function(e){return e.location})).length&&e.h)for(o=(r=S(e.h.split(","))).next();!o.done;o=r.next())(o=t.get(o.value))&&(e.C=e.h,i.push(o));
1if(!i.length)for(r=(t=S(t.values())).next();!r.done;r=t.next())i.push(r.value);return n?i:eZ(e.i,i)}function pn(){this.l=[],this.h=[],this.g=[],this.j=[],this.i=[],this.u=this.o=!1,this.m=new Set}function pi(e,t){var n=[],i=[],r=[],a=[];e=S(e);for(var o=e.next();!o.done;o=e.next()){var s=o.value;o=new Map(s.audioStreams.map(function(e){return[pI(e),e]}));var u=new Map(s.videoStreams.map(function(e){return[pk(e),e]})),l=new Map(s.textStreams.map(function(e){return[pC(e),e]}));if(s=new Map(s.imageStreams.map(function(e){return[pM(e),e]})),t){var d=pT(e5);l.set(pC(d),d),d=pT("image"),s.set(pM(d),d)}n.push(o),i.push(u),r.push(l),a.push(s)}return{Oh:n,hj:i,dj:r,li:a}}function pr(e){var t,n,i,r,a,o,s,u,l,d,c,h,p,f,g,m,v,y,b,w,T,x,A,E,k,I,C,M;return L(function(P){switch(P.h){case 1:if(t=e6,1==e.length)return P.return(e[0]);for(n=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.ha}).map(function(e){return[pI(e),e]}))}),i=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.xa}).map(function(e){return[pk(e),e]}))}),r=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.Va}).map(function(e){return[pC(e),e]}))}),a=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.Vf}).map(function(e){return[pM(e),e]}))}),s=(o=S(r)).next();!s.done;s=o.next())u=s.value,l=pw(t.Va),u.set(pC(l),l);for(c=(d=S(a)).next();!c.done;c=d.next())h=c.value,p=pw(t.Vf),h.set(pM(p),p);return f=new pn,P.g(pa(f,[],n,0,pl,pc,0),2);case 2:return g=P.i,P.g(pa(f,[],i,0,pl,pc,0),3);case 3:return m=P.i,P.g(pa(f,[],r,0,pl,pc,0),4);case 4:return v=P.i,P.g(pa(f,[],a,0,pl,pc,0),5);case 5:if(y=P.i,b=0,m.length&&g.length)for(A=(x=S(g)).next();!A.done;A=x.next())for(E=A.value,I=(k=S(m)).next();!I.done;I=k.next())C=I.value,M=b++,C.variantIds.push(M),E.variantIds.push(M);else for(T=(w=S(m.concat(g))).next();!T.done;T=w.next())T.value.variantIds=[b++];return P.return(m.concat(g).concat(v).concat(y))}})}function pa(e,t,n,i,r,a,o){var s,u,l,d,c,h,p,f,g,m,v,y,b,w,T;return L(function(x){switch(x.h){case 1:for(u=0,s=[];u<n.length;u++)u>=i?s.push(new Set(n[u].values())):s.push(new Set);d=(l=S(t)).next();case 2:var A;if(d.done){x.A(4);break}return c=d.value,x.g((A=s,L(function(t){return 1==t.h?(ph(e,n,c,o>0),c.matchedStreams?c.segmentIndex?t.g(po(c,i+o),2):t.A(2):t.return(!1)):(ps(c,i,a,A,o),t.return(!0))})),5);case 5:if(!x.i)throw new eN(2,4,4037);d=l.next(),x.A(2);break;case 4:for(p=(h=S(s)).next();!p.done;p=h.next())for(g=(f=S(p.value)).next();!g.done;g=f.next())(m=function(e,t,n,i,r,a,o){if(pE(n))return null;var s=r(n);return(ph(e,i,s),s.createSegmentIndex&&(s.createSegmentIndex=function(){return L(function(e){return s.segmentIndex?e.A(0):(s.segmentIndex=new sA,e.g(po(s,0),0))})},s.closeSegmentIndex=function(){if(s.segmentIndex&&(s.segmentIndex.release(),s.segmentIndex=null),s.matchedStreams)for(var e=S(s.matchedStreams),n=e.next();!n.done;n=e.next()){if(i=(n=n.value).segmentIndex){e:{i=S(t);for(var i,r=i.next();!r.done;r=i.next())if((r=r.value)!==s&&r.segmentIndex&&r.matchedStreams&&r.matchedStreams.includes(n)){i=!0;break e}i=!1}i=!i}i&&(n.segmentIndex.release(),n.segmentIndex=null)}}),s.matchedStreams&&s.matchedStreams.length)?(ps(s,0,a,o,0),s):null}(e,t,g.value,n,r,a,s))&&t.push(m);for(y=(v=S(s)).next();!y.done;y=v.next())for(w=(b=S(y.value)).next(),T={};!w.done;T={wh:void 0},w=b.next())if(T.wh=w.value,!pE(T.wh)&&t.some(function(t){return function(n){return pf(e,t.wh,n)}}(T)))throw new eN(2,4,4037);return x.return(t)}})}function po(e,t){var n,i,r,a,o,s;return L(function(u){if(1==u.h){for(n=[],i=e.matchedStreams,r=t;r<i.length;r++)a=i[r],n.push(a.createSegmentIndex()),a.trickModeVideo&&!a.trickModeVideo.segmentIndex&&n.push(a.trickModeVideo.createSegmentIndex()),a.dependencyStream&&!a.dependencyStream.segmentIndex&&n.push(a.dependencyStream.createSegmentIndex());return u.g(Promise.all(n),2)}if(e.segmentIndex instanceof sA)for(o=t;o<i.length;o++)(s=i[o]).segmentIndex&&e.segmentIndex.h.push(s.segmentIndex);u.j()})}function ps(e,t,n,i,r){var a=e.matchedStreams;for(t+=r;t<a.length;t++){var o=a[t];n(e,o);var s=!0;if("audio"==e.type&&0==ia(e.language,o.language)&&(s=!1),s&&((s=i[t-r])&&s.delete(o),o.fullMimeTypes))for(s=(o=S(o.fullMimeTypes.values())
1).next();!s.done;s=o.next())e.fullMimeTypes.add(s.value)}}function pu(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){},t.roles=t.roles.slice(),t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set(e.keyIds),t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t.trickModeVideo=null,t.dependencyStream=null,t}function pl(e){var t=Object.assign({},e);return t.roles=t.roles.slice(),t.keyIds=new Set(e.keyIds),t.segments=[],t.variantIds=[],t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t}function pd(e,t){function n(e,t){e||(e=[]),t=S(t);for(var n=t.next();!n.done;n=t.next())n=n.value,e.includes(n)||e.push(n);return e}e.roles=n(e.roles,t.roles),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=n(e.emsgSchemeIdUris,t.emsgSchemeIdUris));for(var i=S(t.keyIds),r=i.next();!r.done;r=i.next())e.keyIds.add(r.value);if(null==e.originalId?e.originalId=t.originalId:(i=t.originalId||"")&&!e.originalId.endsWith(i)&&(e.originalId+=","+i),i=iq(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!i.length)throw new eN(2,4,4038);if(e.drmInfos=i,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),r=(i=S(t.closedCaptions)).next();!r.done;r=i.next()){var a=S(r.value);r=a.next().value,a=a.next().value,e.closedCaptions.set(r,a)}e.bandwidth&&t.bandwidth&&(e.bandwidth=Math.max(e.bandwidth,t.bandwidth)),t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=pu(t.trickModeVideo),e.trickModeVideo.matchedStreams=[],e.trickModeVideo.createSegmentIndex=function(){if(e.trickModeVideo.segmentIndex)return Promise.resolve();for(var t=new sA,n=S(e.trickModeVideo.matchedStreams),i=n.next();!i.done;i=n.next())t.h.push(i.value.segmentIndex);return e.trickModeVideo.segmentIndex=t,Promise.resolve()}),e.trickModeVideo.matchedStreams.push(t.trickModeVideo),pd(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&(e.trickModeVideo.matchedStreams.push(t),pd(e.trickModeVideo,t)),t.dependencyStream?(e.dependencyStream||(e.dependencyStream=pu(t.dependencyStream),e.dependencyStream.matchedStreams=[],e.dependencyStream.createSegmentIndex=function(){if(e.dependencyStream.segmentIndex)return Promise.resolve();for(var t=new sA,n=S(e.dependencyStream.matchedStreams),i=n.next();!i.done;i=n.next())t.h.push(i.value.segmentIndex);return e.dependencyStream.segmentIndex=t,Promise.resolve()}),e.dependencyStream.matchedStreams.push(t.dependencyStream),pd(e.dependencyStream,t.dependencyStream)):e.dependencyStream&&(e.dependencyStream.matchedStreams.push(t),pd(e.dependencyStream,t))}function pc(e,t){var n=e.roles;n||(n=[]);for(var i=S(t.roles),r=i.next();!r.done;r=i.next())r=r.value,n.includes(r)||n.push(r);for(e.roles=n,i=(n=S(t.keyIds)).next();!i.done;i=n.next())e.keyIds.add(i.value);if(e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,x(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),n=(t=S(t.closedCaptions)).next();!n.done;n=t.next())n=(i=S(n.value)).next().value,i=i.next().value,e.closedCaptions.set(n,i)}function ph(e,t,n,i){i=(void 0===i?0:i)?n.matchedStreams:[],t=S(t);for(var r=t.next();!r.done;r=t.next()){if(!(r=function(e,t,n){var i={audio:pI,video:pk,text:pC,image:pM}[n.type],r=null,a=i(n);if(t.has(a))r=t.get(a);else{a=({audio:function(t,n){return pf(e,t,n)},video:function(t,n){return pf(e,t,n)},text:pg,image:pm})[n.type];for(var o={audio:pv,video:py,text:pb,image:p_}[n.type],s=S(t.values()),u=s.next();!u.done;u=s.next())a(n,u=u.value)&&n.fastSwitching==u.fastSwitching&&(!r||o(n,r,u))&&(r=u)}return e.u&&!pE(r)&&t.delete(i(r)),r}(e,r.value,n)))return;i.push(r)}n.matchedStreams=i}function pp(e,t){return e.mimeType==t.mimeType&&pD(e.codecs)===pD(t.codecs)}function pf(e,t,n){return(!!pp(t,n)||!!e.o)&&(!t.drmInfos||!!iH(t.drmInfos,n.drmInfos))}function pg(e,t){return!t.language||e.forced===t.forced&&0!=ia(e.language,t.language)&&t.kind==e.kind}function pm(){return!0}function pv(e,t,n){var i=px(e,t,n);if(i===pR)return!0;if(i===pO)return!1;i=ia(e.language,t.language);var r=ia(e.language,n.language);if(r>i)return!0;
1if(r<i)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(i=t.roles.filter(function(t){return e.roles.includes(t)}),(r=n.roles.filter(function(t){return e.roles.includes(t)})).length>i.length)return!0;if(r.length<i.length)return!1;if(n.roles.length!==t.roles.length)return n.roles.length<t.roles.length}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!t.primary&&!!n.primary||(!t.primary||!!n.primary)&&((i=pS(e.channelsCount,t.channelsCount,n.channelsCount))==pR||i!=pO&&((i=pS(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate))==pR||i!=pO&&!!e.bandwidth&&pA(e.bandwidth,t.bandwidth,n.bandwidth)==pR))}function py(e,t,n){var i=px(e,t,n);if(i===pR)return!0;if(i===pO)return!1;if((i=pS(e.width*e.height,t.width*t.height,n.width*n.height))==pR)return!0;if(i==pO)return!1;if(e.frameRate){if((i=pS(e.frameRate,t.frameRate,n.frameRate))==pR)return!0;if(i==pO)return!1}return!!e.bandwidth&&pA(e.bandwidth,t.bandwidth,n.bandwidth)==pR}function pb(e,t,n){var i=ia(e.language,t.language),r=ia(e.language,n.language);if(r>i)return!0;if(r<i)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(i=t.roles.filter(function(t){return e.roles.includes(t)}),(r=n.roles.filter(function(t){return e.roles.includes(t)})).length>i.length)return!0;if(r.length<i.length)return!1}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return n.mimeType==e.mimeType&&n.codecs==e.codecs&&(t.mimeType!=e.mimeType||t.codecs!=e.codecs)}function p_(e,t,n){return pS(e.width*e.height,t.width*t.height,n.width*n.height)==pR}function pw(e){return{id:0,originalId:"",groupId:null,primary:!1,type:e,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1,baseOriginalId:null}}function pT(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new sT([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:e,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null}}function pS(e,t,n){if(t==e&&e!=n)return pO;if(n==e&&e!=t)return pR;if(t>e){if(n<=e||n-e<t-e)return pR;if(n-e>t-e)return pO}else{if(n>e)return pO;if(e-n<e-t)return pR;if(e-n>e-t)return pO}return pL}function px(e,t,n){var i=e.mimeType===t.mimeType&&e.codecs===t.codecs,r=e.mimeType===n.mimeType&&e.codecs===n.codecs;return i&&!r?pO:!i&&r?pR:(t=pp(e,t),e=pp(e,n),t&&!e?pO:!t&&e?pR:pL)}function pA(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))<t?pR:t<e?pO:pL}function pE(e){switch(e.type){case e5:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function pk(e){return pP([e.fastSwitching,e.width,e.frameRate,e.codecs,e.mimeType,e.label,e.roles,e.closedCaptions?Array.from(e.closedCaptions.entries()):null,e.bandwidth,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function pI(e){return pP([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,e.codecs,e.mimeType,e.roles,e.audioSamplingRate,e.primary,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function pC(e){return pP([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function pM(e){return pP([e.width,e.codecs,e.mimeType])}function pP(e){return JSON.stringify(e)}function pD(e){if(!pN.has(e)){var t=nq(e);pN.set(e,t)}return pN.get(e)}w(h3,sT),(p=h3.prototype).find=function(e){var t=this.g.length-1;if(t<0)return null;var n=this.get(this.i);if(!n)return null;if(e<n.startTime)return this.i;if((n=Math.floor((e-this.j)/this.l)+this.u-this.h)<this.i)return null;var i=this.get(n);return i?(t=(t=n-this.i<t?this.get(n+1):null)?t.startTime:i.endTime,e>=i.startTime&&e<t?n:null):null},p.get=function(e){var t=e-this.i;if(t<0||t>=this.g.length)return null;var n=this.g[t];return n||(n=this.B(this.h+e),this.g[t]=n),n},p.Bb=function(){return this.get(this.i)},p.pb=function(e){for(var t=0;t<this.g.length;t++){var n=this.get(t+this.i);n&&e(n)}},p.Sa=function(e){if(!this.o){var t=this.g.length-1;if(!(t<0)){var n=this.get(this.i);!n||n.endTime>e||(e=(t=this.get(this.i+t))&&t.endTime<=e?this.g.length:Math.max(0,Math.min(this.g.length,Math.floor((e-this.j)/this.l+this.u-1)-(this.h+this.i)+1)))>0&&(this.i+=e,this.g=this.g.slice(e))}}},w(h4,sT),(p=h4.prototype).getNumReferences=function(){return this.h?this.h.timeline.length:0},p.release=function(){sT.prototype.release.call(this),this.h=null},p.Sa=function(e){if(this.h){var t=this.h.timeline;if(t){for(var n=0;n<t.length&&t[n].end+this.j<=e;)n++;n>0&&(this.h.timeline=t.slice(n),this.g.length>=n&&(this.g=this.g.slice(n)),this.i+=n,0===this.getNumReferences()&&this.release()
1)}}},p.find=function(e){var t=this;if(this.h&&this.h.timeline&&this.h.timeline.length&&e<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var n=this.h.timeline;if(e<this.j||e>=this.l)return null;var i=n.length-1,r=tA(n,function(n){return n.start+t.j<=e})-1;if(r<0)return null;var a=n[r],o=a.start+this.j;return n=r<i?n[r+1].start+this.j:this.l===1/0?a.end+this.j:this.l,e>=o&&e<n?r+this.i:null},p.get=function(e){var t=this;if((e-=this.i)<0||e>=this.getNumReferences()||!this.h)return null;var n=this.g[e];if(!n){var i=(n=this.h.timeline[e]).Uk,r=n.Dd+this.h.Yc,a=this.j-this.h.ac,o=this.j+n.end,s=o;e===this.getNumReferences()-1&&this.l!==1/0&&(s=this.D&&Math.abs(s-this.l)>.1?Math.min(s,this.l):this.l);var u=this.h.codecs,l=this.h.mimeType,d=this.h.bandwidth,c=[],h=!1;if(n.qc&&this.h&&this.h.Wb&&(h=this.h.Wb.includes("$SubNumber$")),h){h=(n.end-n.start)/n.qc;for(var p={},f=0;f<n.qc;p={Pf:void 0,Zi:void 0},f++){var g=n.start+h*f,m=g+h;p.Zi=f,p.Pf=null,(p=new aK(this.j+g,this.j+m,function(e){return function(){return t.h?(null!=e.Pf||(e.Pf=h8(t.h.Wb,t.H,i,t.C,r,e.Zi,t.F,t.J)),e.Pf):[]}}(p),0,null,this.u,a,this.j,this.l,[],"",null,null,az,this.B)).codecs=u,p.mimeType=l,p.bandwidth=d,0==this.I?f>0&&p.od():f%this.I!=0&&p.od(),c.push(p)}}(n=new aK(this.j+n.start,s,function(){return c.length>0||!t.h?[]:h8(t.h.Wb,t.H,i,t.C,r,null,t.F,t.J)},0,null,this.u,a,this.j,this.l,c,"",null,null,az,this.B,c.length>0)).codecs=u,n.mimeType=l,n.j=o,n.bandwidth=d,this.g[e]=n}return n},p.pb=function(e){h6(this);for(var t=0;t<this.getNumReferences();t++){var n=this.get(t+this.i);n&&e(n)}},p.Me=function(){return this.K},h9.prototype.configure=function(e){this.o=e},h9.prototype.destroy=function(){return this.B=this.o=null,this.i=[],this.h=null,this.m=[],this.F=[],this.l.clear(),null!=this.g&&(this.g.stop(),this.g=null),this.H.destroy()},h9.prototype.setManifestType=function(e){this.u=e},h9.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)},(p=pn.prototype).release=function(){for(var e=S(this.h.concat(this.g,this.j,this.i)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();this.h=[],this.g=[],this.j=[],this.i=[],this.l=[],this.u=this.o=!1,this.m.clear()},p.bk=function(){return this.l},p.Ig=function(){return this.j.slice()},p.Ij=function(){return this.i},p.Vh=function(e,t){if(e){if("audio"==e.type)for(var n=S(this.h),i=n.next();!i.done;i=n.next())(i=i.value).matchedStreams=i.matchedStreams.filter(function(t){return t!==e});else if("video"==e.type)for(i=(n=S(this.g)).next();!i.done;i=n.next())(i=i.value).matchedStreams=i.matchedStreams.filter(function(t){return t!==e}),i.trickModeVideo&&(i.trickModeVideo.matchedStreams=i.trickModeVideo.matchedStreams.filter(function(t){return t!==e})),i.dependencyStream&&(i.dependencyStream.matchedStreams=i.dependencyStream.matchedStreams.filter(function(t){return t!==e}));else if(e.type==e5)for(i=(n=S(this.j)).next();!i.done;i=n.next())(i=i.value).matchedStreams=i.matchedStreams.filter(function(t){return t!==e});else if("image"==e.type)for(i=(n=S(this.i)).next();!i.done;i=n.next())(i=i.value).matchedStreams=i.matchedStreams.filter(function(t){return t!==e});e.segmentIndex&&e.closeSegmentIndex(),this.m.delete(t)}},p.hg=function(e,t,n){n=void 0!==n&&n;var i,r,a,o,s,u,l,d,c,h,p,f,g,m,v,y,b,w,T,x,A,E,k,I,C,M,P,D,R,O,N,j=this;return L(function(L){if(1==L.h){if(i=e6,!t&&1==e.length)return a=(r=pi(e,!1)).Oh,o=r.hj,s=r.dj,u=r.li,j.h=Array.from(a[0].values()),j.g=Array.from(o[0].values()),j.j=Array.from(s[0].values()),j.i=Array.from(u[0].values()),L.A(2);for(l=n?j.m.size:0,d=-1,c=0;c<e.length;c++)h=e[c],j.m.has(h.id)||(j.m.add(h.id),-1==d&&(d=c));return -1==d?L.return():(f=(p=pi(e,!0)).Oh,g=p.hj,m=p.dj,v=p.li,L.g(Promise.all([pa(j,j.h,f,d,pu,pd,l),pa(j,j.g,g,d,pu,pd,l),pa(j,j.j,m,d,pu,pd,l),pa(j,j.i,v,d,pu,pd,l)]),2))}if(y=0,b=[],j.g.length&&j.h.length)for(I=(k=S(j.h)).next();!I.done;I=k.next())for(C=I.value,P=(M=S(j.g)).next();!P.done;P=M.next())D=P.value,R=iq(C.drmInfos,D.drmInfos),C.drmInfos.length&&D.drmInfos.length&&!R.length||(O=(C.bandwidth||0)+(D.bandwidth||0),C.dependencyStream&&(O+=C.dependencyStream.bandwidth||0),D.dependencyStream&&(O+=D.dependencyStream.bandwidth||0),N=y++,b.push({id:N,language:C.language,disabledUntilTime:0,primary:C.primary,audio:C,video:D,bandwidth:O,drmInfos:R,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(T=(w=S(j.g.length?j.g:j.h)).next();!T.done;T=w.next())x=T.value,A=y++,E=x.bandwidth||0,x.dependencyStream&&(E+=x.dependencyStream.bandwidth||0),b.pu
1sh({id:A,language:x.language,disabledUntilTime:0,primary:x.primary,audio:x.type==i.ha?x:null,video:x.type==i.xa?x:null,bandwidth:E,drmInfos:x.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});j.l=b,L.j()})},p.Oi=function(e){this.o=e},p.Ti=function(e){this.u=e},q("shaka.util.PeriodCombiner",pn),pn.prototype.setUseStreamOnce=pn.prototype.Ti,pn.prototype.setAllowMultiTypeVariants=pn.prototype.Oi,pn.prototype.combinePeriods=pn.prototype.hg,pn.prototype.deleteStream=pn.prototype.Vh,pn.prototype.getImageStreams=pn.prototype.Ij,pn.prototype.getTextStreams=pn.prototype.Ig,pn.prototype.getVariants=pn.prototype.bk;var pR=1,pL=0,pO=-1,pN=new Map;function pj(e,t){try{var n=eF(e),i=t,r=new DOMParser,a=pU.value()(n);n=null;try{n=r.parseFromString(a,"text/xml")}catch(e){return null}if(!(r=n.documentElement)||r.getElementsByTagName("parsererror").length||r.tagName!=i)return null;if(!("createNodeIterator"in document))return r;for(i=document.createNodeIterator(n,NodeFilter.SHOW_ALL);n=i.nextNode();)if(n instanceof HTMLElement||n instanceof SVGElement)return null;return r}catch(e){return null}}var pU=new ei(function(){if("u">typeof trustedTypes){var e=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(e){return e}});return function(t){return e.createHTML(t)}}return function(e){return e}});function pB(){var e=this;this.j=this.g=null,this.B=[],this.h=null,this.Ja=1,this.I=[],this.l={pf:"",type:"",profiles:[],mc:null,kb:0,bb:null,ce:0},this.u=new Map,this.C=new Map,this.H=new Map,this.o=new Map,this.F=new Map,this.Aa=new Map,this.m=new pn,this.M=0,this.Fa=new G(5),this.N=new n4(function(){e.K&&!e.g.continueLoadingWhenPaused&&(e.J.Na(e.K,"timeupdate"),e.K.paused)?e.J.Ba(e.K,"timeupdate",function(){return pY(e)}):pY(e)}),this.V=new rn,this.T=null,this.D=[],this.ma=1/0,this.ya=!1,this.i=null,this.O=0,this.Y=!1,this.J=new ee,this.K=null,this.P=!1,this.ka="",this.ua=function(){return!1},this.ia=[],this.na=new Set,this.za=new hR}function pF(e){var t,n,i,r,a,o,s,u,l;return L(function(d){if(1==d.h)return t=4,n="MPD",i=function(e){var t=e.l.ce;if(!e.l.pf||!t||!e.I.length)return[];var n=Date.now()/1e3,i=e.I.filter(function(e){return!(e=t4(e.attributes.ttl))||t+e>n}).map(tK).filter(n8);return i.length?eZ(e.B,i):[]}(e),r=e.B,i.length?(r=i,n="Patch",t=6):e.B.length>1&&e.i&&(a=pt(e.i,"Location",!0)).length&&(r=a),o=rs(r,e.g.retryParameters),s=Date.now(),d.g(p1(e,o,0,{type:t}),2);if(3!=d.h){var c,h,p,f,g,m,v,y,b,w,T;return(u=d.i,e.j)?(u.uri&&u.uri!=u.originalUri&&!e.B.includes(u.uri)&&e.B.unshift(u.uri),e.ka=new ef(u.uri).g.toString(),d.g((c=u.data,h=u.uri,p=n,L(function(t){if(1==t.h){var n,i,r,a,o,s,u,l,d,A,E,k,I,C,M,P,D,R,O,N,j,U,B;if(f=c,(g=e.g.dash.manifestPreprocessor)!=uI){if(el("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead."),!(m=pj(f,p)))throw new eN(2,4,4001,h);g(m),f=eV(m.outerHTML)}if(!(v=tU(f,p)))throw new eN(2,4,4001,h);return((y=e.g.dash.manifestPreprocessorTXml)!=uC&&y(v),"Patch"===p)?t.return(L(function(t){if(1==t.h){if(n=v.attributes.mpdId,i=tY(v,"originalPublishTime",tZ),!n||n!==e.l.pf||i!==e.l.ce)throw e.I=[],new eN(1,4,4052);for(r=[],a=[],o=new Set,u=(s=S(tH(v))).next();!u.done;u=s.next())if(A=(d=t9((l=u.value).attributes.sel||""))[d.length-1],E=tK(l)||"","MPD"===A.name)if("mediaPresentationDuration"===A.wc){var c=t0(tK(l)||"");if(null!=c){e.l.mc=c;for(var h=S(e.u.values()),p=h.next();!p.done;p=h.next())p.value.mc=c}}else if("type"===A.wc){for(e.h.presentationTimeline.Uc("static"==E),e.l.type=E,h=(c=S(e.u.values())).next();!h.done;h=c.next())h.value.ob="dynamic"==E;"static"==E&&(e.M=-1)}else"publishTime"===A.wc?e.l.ce=tZ(E)||0:null===A.wc&&"add"===l.tagName&&a.push(l);else if("PatchLocation"===A.name)t7(e.I,l);else if("Period"===A.name)"add"===l.tagName?a.push(l):"remove"===l.tagName&&A.id&&function(e,t){e.h.periodCount--;for(var n=S(e.u.keys()),i=n.next();!i.done;i=n.next())(i=i.value).startsWith(t)&&(hV(e.u.get(i),h2,"SegmentTimeline").children=[],pG(e,i),e.u.delete(i));e.D=e.D.filter(function(e){return e!==t}),e.H.delete(t)}(e,A.id);else if("SegmentTemplate"===A.name){if((c=(h=t9(l.attributes.sel||""))[h.length-1]).wc){h=pq(e,h),p=tK(l)||"";for(var f=S(h),g=f.next();!g.done;g=f.next())nt((g=e.u.get(g.value)).L.Gc,l.tagName,c.wc,p);c=h}else c=[];for(I=(k=S(c)).next();!I.done;I=k.next())C=I.value,o.add(C)}else if("SegmentTimeline"===A.name||"S"===A.name){for(p=(h=S(c=pq(e,c=t9(l.attributes.sel||"")))).next();!p.done;p=h.next())t7(f=tq(p=hV(p=e.u.get(p.value),h2,"SegmentTimeline"),"S"),l),p.children=f;for(P=(M=S(c)).next();!P.done;P=M.next())D=P.value,o.add(D)}for(O=(R=S(o)).next();!O.done;O=R.next())pG(e,O.value);for(j=(N=S(a)).next();!j.done;j=N.next())U=j.value,r.push.apply(r,x(pK(e,{ob:"dynamic"==e.l.type,presentationTimeline:e.h.presentationTimeline,va:null,oa:null,qa:null,
1L:null,bandwidth:0,Kg:!1,kb:e.l.kb,profiles:e.l.profiles,mc:e.l.mc,roles:null,Gb:p2},e.l.bb,U,!0).periods));return r.length?(e.h.periodCount+=r.length,e.h.gapCount=e.O,t.g(pH(e,r,!0),2)):t.A(2)}"static"==e.l.type&&(B=e.l.mc,e.h.presentationTimeline.ub(B||1/0)),t.j()})):e.g.dash.disableXlinkProcessing?t.return(pV(e,v,h)):(b=e.g.dash.xlinkFailGracefully,w=function e(t,n,i,r,a,o){if(o=void 0===o?0:o,tJ(t,"http://www.w3.org/1999/xlink","href")){var s=function(t,n,i,r,a,o){for(var s=tJ(t,"http://www.w3.org/1999/xlink","href"),u=tJ(t,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=S(Object.keys(t.attributes)),d=l.next();!d.done;d=l.next()){var c=(d=d.value).split(":"),h=tF("http://www.w3.org/1999/xlink");c[0]==h&&delete t.attributes[d]}if(o>=5)return i3(new eN(2,4,4028));if("onLoad"!=u)return i3(new eN(2,4,4027));var p=eZ([r],[s]);return a.request(0,rs(p,n)).Xa(function(r){if(!(r=tU(r.data,t.tagName)))return i3(new eN(2,4,4001,s));for(t.children=[];r.children.length;){var u=r.children.shift();t.children.push(u)}u=S(Object.keys(r.attributes));for(var l=u.next();!l.done;l=u.next())l=l.value,t.attributes[l]=r.attributes[l];return e(t,n,i,p[0],a,o+1)})}(t,n,i,r,a,o);return i&&(s=s.Xa(void 0,function(){return e(t,n,i,r,a,o)})),s}s=[];for(var u=S(tH(t)),l=u.next(),d={};!l.done;d={Md:void 0},l=u.next())d.Md=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==tJ(d.Md,"http://www.w3.org/1999/xlink","href")?t.children=t.children.filter(function(e){return function(t){return t!==e.Md}}(d)):"SegmentTimeline"!=d.Md.tagName&&s.push(e(d.Md,n,i,r,a,o));return i8(s).Xa(function(){return t})}(v,e.g.retryParameters,b,h,e.j.networkingEngine),ri(e.V,w),t.g(w.promise,2))}return T=t.i,t.return(pV(e,T,h))})),3)):d.return(0)}return l=(Date.now()-s)/1e3,e.Fa.sample(1,l),e.na.clear(),d.return(l)})}function pV(e,t,n){var i,r,a,o,s,u,l,d,c,h,p,f,g,m,v,y,b,w,T,A,E,k,I,C,M,P,D,R,O,N,j,U,B,F,V,H,q,G,K,W,z,X,J,Q,$,Z,ee,et,en,ei,er,ea;return L(function(eo){switch(eo.h){case 1:for(e.i&&e.i.l.clear(),i=[n],r=[],a=new Map,s=(o=S(tq(t,"Location"))).next();!s.done;s=o.next())l=(u=s.value).attributes.serviceLocation,(d=tK(u))&&(c=eZ(i,[d])[0],l&&(e.i?pe(e.i,"Location",l,c):a.set(l,c)),r.push(c));if(e.i?(h=pt(e.i,"Location",!0)).length>0&&(i=e.B=h):r.length&&(i=e.B=r),e.l.pf=t.attributes.id||"",e.l.ce=tY(t,"publishTime",tZ)||0,e.I=tq(t,"PatchLocation"),p=Promise.resolve(),(f=tz(t,"ContentSteering"))&&e.j)for(g=f.attributes.defaultServiceLocation,e.i?(e.i.i=i,e.i.h=g):(e.i=new h9(e.j),e.i.configure(e.g),e.i.setManifestType("DASH"),e.i.i=i,e.i.h=g,(m=tK(f))&&(tY(f,"queryBeforeStart",t6,!1)?p=h7(e.i,m):h7(e.i,m))),y=(v=S(a.keys())).next();!y.done;y=v.next())b=y.value,w=a.get(b),pe(e.i,"Location",b,w);if(T=tq(t,"BaseURL"),A=!1,e.i)for(k=(E=S(T)).next();!k.done;k=E.next())C=(I=k.value).attributes.serviceLocation,M=tK(I),C&&M&&(pe(e.i,"BaseURL",C,M),A=!0);if(e.ia.splice(0),A&&e.i||(P=T.map(tK),e.ia.push.apply(e.ia,x(eZ(i,P)))),D=e.i,R=e.ia,O=p3.call(pB,D,A,R),e.l.bb=O,N=0,T&&T.length&&(N=tY(T[0],"availabilityTimeOffset",t5)||0),e.l.kb=N,e.M=tY(t,"minimumUpdatePeriod",t0,-1),j=tY(t,"availabilityStartTime",tZ),U=tY(t,"timeShiftBufferDepth",t0),B=e.g.dash.ignoreSuggestedPresentationDelay,F=null,B||(F=tY(t,"suggestedPresentationDelay",t0)),V=e.g.dash.ignoreMaxSegmentDuration,H=null,V||(H=tY(t,"maxSegmentDuration",t0)),q=t.attributes.type||"static",e.h&&e.h.presentationTimeline&&(e.P=e.h.presentationTimeline.U()&&"static"==q),e.l.type=q,e.h)for(K=(G=e.h.presentationTimeline).Db(
1),z=(W=S(e.o.values())).next();!z.done;z=W.next())(X=z.value).segmentIndex&&X.segmentIndex.Sa(K);else J=e.g.dash.ignoreMinBufferTime,Q=0,J||(Q=tY(t,"minBufferTime",t0)||0),G=new o9(j,null!=F?Math.min(F,U||1/0):e.g.defaultPresentationDelay>0?e.g.defaultPresentationDelay:Math.min(1.5*Q,U||1/0),e.g.dash.autoCorrectDrift);return G.Uc("static"==q),G.U()&&!isNaN(e.g.availabilityWindowOverride)&&(U=e.g.availabilityWindowOverride),null!=U||(U=1/0),G.If(U),$=t.attributes.profiles||"",e.l.profiles=$.split(","),Z={ob:"static"!=q,presentationTimeline:G,va:null,oa:null,qa:null,L:null,bandwidth:0,Kg:!1,kb:N,mc:null,profiles:$.split(","),roles:null,Gb:p2},eo.g(p,2);case 2:if(e.O=0,et=(ee=pK(e,Z,O,t,!1)).duration,en=ee.periods,("static"!=q||e.P)&&ee.Xh||G.ub(et||1/0),e.Y&&e.ya&&G.Pi(e.ma),G.Ug(H||1),e.Y&&e.ya&&(ei=null!=F?F:e.g.defaultPresentationDelay,G.qh(ei)),!e.h)return eo.g(e.m.hg(en,Z.ob),6);return e.h.periodCount=en.length,e.h.gapCount=e.O,eo.g(pH(e,en,!1),4);case 6:var es,eu,el,ed,ec,eh,ep,ef,eg,em=G,ev=e.m.l,ey=e.m.Ig(),eb=e.m.i,e_=e.g.dash.sequenceMode,ew=tz(t,"ServiceDescription");if(ew){var eT=tz(ew,"Latency");if(ew=tz(ew,"PlaybackRate"),eT||ew){var eS={};eT&&("target"in eT.attributes&&(eS.targetLatency=parseInt(eT.attributes.target,10)/1e3),"max"in eT.attributes&&(eS.maxLatency=parseInt(eT.attributes.max,10)/1e3),"min"in eT.attributes&&(eS.minLatency=parseInt(eT.attributes.min,10)/1e3)),ew&&("max"in ew.attributes&&(eS.maxPlaybackRate=parseFloat(ew.attributes.max)),"min"in ew.attributes&&(eS.minPlaybackRate=parseFloat(ew.attributes.min))),eT=eS}else eT=null}else eT=null;e:{if((ew=tq(t,"SupplementalProperty")).length){for(eS=(ew=S(ew)).next();!eS.done;eS=ew.next())if("urn:mpeg:dash:chaining:2016"==(eS=eS.value).attributes.schemeIdUri){ew=eS.attributes.value;break e}}ew=null}if(e.h={presentationTimeline:em,variants:ev,textStreams:ey,imageStreams:eb,offlineSessionIds:[],sequenceMode:e_,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:eT,nextUrl:ew,periodCount:en.length,gapCount:e.O,isLowLatency:e.Y,startTime:null},!G.gj()){eo.A(7);break}return er=tq(t,"UTCTiming"),eo.g((es=O,L(function(t){switch(t.h){case 1:eu=er.map(function(e){return{scheme:e.attributes.schemeIdUri,value:e.attributes.value}}),el=e.g.dash.clockSyncUri,!eu.length&&el&&eu.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:el}),ec=(ed=S(eu)).next();case 2:if(ec.done){t.A(4);break}switch(eh=ec.value,t.m(5),ep=eh.scheme,ef=eh.value,ep){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return t.A(7);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":return t.A(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return eg=Date.parse(ef),t.return(isNaN(eg)?0:eg-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":Y("NTP UTCTiming scheme is not supported");break;default:Y("Unrecognized scheme in UTCTiming element",ep)}t.A(9);break;case 7:return t.g(p$(e,es,ef,"HEAD"),10);case 10:case 11:return t.return(t.i);case 8:return t.g(p$(e,es,ef,"GET"),11);case 9:t.o(3);break;case 5:t.l();case 3:ec=ed.next(),t.A(2);break;case 4:return Y("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),t.return(0)}})),8);case 8:if(ea=eo.i,!e.j)return eo.return();G.Qi(ea);case 7:G.kf(),e.m&&!e.h.presentationTimeline.U()&&e.m.release();case 4:e.j.makeTextStreamsForClosedCaptions(e.h),function(e){var t=Array.from(e.F.keys()).filter(function(t){return!e.D.includes(t)});t=S(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;for(var i=!0,r=S(e.F.get(n)),a=r.next();!a.done;a=r.next()){a=a.value;var o=e.o.get(a);o&&(o.segmentIndex&&0!=o.segmentIndex.getNumReferences()?i=!1:(e.m&&e.m.Vh(o,n),e.o.delete(a)))}i&&e.F.delete(n)}}(e),function(e,t){t=new Set(t.map(function(e){return e.id}));for(var n=S(e.C.keys()),i=n.next();!i.done;i=n.next())i=i.value,t.has(i)||e.C.delete(i)}(e,en),eo.j()}})}function pH(e,t,n){var i;return L(function(r){if(1==r.h)return r.g(e.m.hg(t,!0,n),2);e.h.variants=e.m.l,(i=e.m.Ig()).length>0&&(e.h.textStreams=i),e.h.imageStreams=e.m.i,e.j.filter(e.h),r.j()})}function pq(e,t){var n="",i="",r=-1,a="";t=S(t);for(var o=t.next();!o.done;o=t.next())"Period"===(o=o.value).name?n=o.id:"AdaptationSet"===o.name?(i=o.id,null!==o.position&&(r=o.position)):"Representation"===o.name&&(a=o.id);if(t=[],a)t.push(n+","+a);
1else if(i)for(e=(r=S(e.u.values())).next();!e.done;e=r.next())(e=e.value).va.id===n&&e.qa.id===i&&e.L.id&&t.push(n+","+e.L.id);else if(r>-1)for(e=(i=S(e.u.values())).next();!e.done;e=i.next())(e=e.value).va.id===n&&e.qa.position===r&&e.L.id&&t.push(n+","+e.L.id);return t}function pG(e,t){var n=e.u.get(t),i=e.o.get(t);i.segmentIndex&&i.segmentIndex.Sa(e.h.presentationTimeline.Db());try{var r=h1(n,function(t,n,i,r){return pZ(e,t,n,i,r)},e.o,!0,e.g.dash.initialSegmentLimit,e.Aa,n.L.aesKey,null,!0,e.C);i.createSegmentIndex=function(){return L(function(e){if(1==e.h)return i.segmentIndex?e.A(0):e.g(r.Nc(),3);i.segmentIndex=e.i,e.j()})}}catch(e){if((t=n.L.contentType)!=e5&&"application"!=t&&"image"!=t||4002!=e.code)throw e}}function pK(e,t,n,i,r){var a=t.mc;a||(a=tY(i,"mediaPresentationDuration",t0),e.l.mc=a);var o=0;e.h&&e.h.presentationTimeline&&e.P&&(o=e.h.presentationTimeline.Sb());var s=[],u=o;i=tq(i,"Period");var l=t.ob;l||e.H.clear();for(var d=0,c=l&&!r?new Set(e.D.slice(1,-1)):null,h=0;h<i.length;h++){var p=i[h],f=i[h+1],g=tY(p,"start",t0,null),m=p.attributes.id,v=tY(p,"duration",t0);0==h&&e.P&&(d=o-(g||0)),null==g?g=u:e.P&&(g+=d);var y=null;if(f){var b=tY(f,"start",t0);null!=b&&(y=b-g+o)}else null!=a&&(y=a-g+o);if(b=e8,y&&v&&Math.abs(y-v)>b&&y>v&&e.O++,null!=y||(y=v),!(null!==e.T&&null!=m&&null!==g&&g<e.T)||e.D.includes(m)||h+1==i.length){if(null!==g&&(null===e.T||g>e.T)&&(e.T=g),u={start:g,duration:y,node:p,df:null==y||!f},p=null,f=h>0&&h<i.length-1,l&&c&&f&&!r&&(null!=m||(m="__shaka_period_"+g),c.has(m)&&(m=e.H.get(m))&&(p=m)),p||(p=function(e,t,n,i){t.va=pQ(e,i.node,null,n),t.oa=i,t.va.kb=t.kb,t.va.id||(t.va.id="__shaka_period_"+i.start);var r=tq(i.node,"EventStream");n=t.presentationTimeline.Db(),r=S(r);for(var a=r.next();!a.done;a=r.next())!function(e,t,n,i,r){var a=i.attributes.schemeIdUri||"",o=i.attributes.value||"",s=tY(i,"timescale",t4)||1,u=tY(i,"presentationTimeOffset",t4)||0;i=S(tq(i,"Event"));for(var l=i.next();!l.done;l=i.next()){var d=tY(l=l.value,"presentationTime",t4)||0,c=tY(l,"duration",t4)||0;c=(d=Math.max((d-u)/s+t,t))+c/s,null!=n&&(d=Math.min(d,t+n),c=Math.min(c,t+n)),c<r||(l={schemeIdUri:a,value:o,startTime:d,endTime:c,id:l.attributes.id||"",timescale:s,eventElement:function e(t){var n="",i=t.tagName.split(":");for(var r in i.length>0&&(n=i[0],n=nr.has(n)?nr.get(n):""),n=document.createElementNS(n,t.tagName),t.attributes)n.setAttribute(r,t.attributes[r]);for(r=(t=S(t.children)).next();!r.done;r=t.next())r=r.value,i=void 0,i="string"==typeof r?new Text(r):e(r),n.appendChild(i);return n}(l),eventNode:nn(l)},e.j.onTimelineRegionAdded(l))}}(e,i.start,i.duration,a.value,n);for(r=(n=S(n=tq(i.node,"SupplementalProperty"))).next();!r.done;r=n.next())"urn:mpeg:dash:urlparam:2014"==(r=r.value).attributes.schemeIdUri&&(r=pX(e,r))&&(t.Gb=r);if(n=tq(i.node,"AdaptationSet").map(function(n,i){return pz(e,t,i,n)}).filter(n8),t.ob){r=[],a=S(n);for(var o=a.next();!o.done;o=a.next()){o=S(o.value.Qk);for(var s=o.next();!s.done;s=o.next())r.push(s.value)}if(r.length!=new Set(r).size)throw new eN(2,4,4018)}for(r=new Map,o=(a=S(n)).next();!o.done;o=a.next())for(s=(o=S(o.value.wj)).next();!s.done;s=o.next()){var u=S(s.value);s=u.next().value,u=u.next().value,r.set(s,u)}if(r.size)for(a=null,s=(o=S(n)).next();!s.done;s=o.next()){s=s.value,u=[];for(var l=S(s.streams),d=l.next(),c={};!d.done;c={xh:void 0},d=l.next())if(c.xh=d.value,r.has(c.xh.originalId)){a||(a=tq(i.node,"AdaptationSet").map(function(n,i){return pz(e,t,i,n)}).filter(n8)),d=S(a);for(var h=d.next();!h.done;h=d.next())(h=h.value.streams.find(function(e){return function(t){return t.originalId==e.xh.originalId}}(c)))&&(h.dependencyStream=r.get(h.originalId),h.originalId+=h.dependencyStream.originalId,u.push(h))}u.length&&s.streams.push.apply(s.streams,x(u))}if(n=(i=S(function(e,t){var n=[],i=[];e=S(e);for(var r=e.next();!r.done;r=e.next())t(r=r.value)?n.push(r):i.push(r);return[n,i]}(n,function(e){return!!e.fj}))).next().value,i=i.next().value,!e.g.disableIFrames){for(r=(n=S(n)).next();!r.done;r=n.next())for(a=(r=r.value).fj.split(" "),s=(o=S(i)).next();!s.done;
1s=o.next())if(s=s.value,a.includes(s.id))for(u=(s=S(s.streams)).next();!u.done;u=s.next())iM(u.value,r.streams)}if(n=pW(e.g.disableAudio,i,"audio"),r=pW(e.g.disableVideo,i,"video"),a=pW(e.g.disableText,i,e5),i=pW(e.g.disableThumbnails,i,"image"),0===r.length&&0===n.length)throw new eN(2,4,4004);return{id:t.va.id,audioStreams:n,videoStreams:r,textStreams:a,imageStreams:i}}(e,t,n,u),l&&p.id&&e.H.set(p.id,p)),s.push(p),p.id&&y&&e.Aa.set(p.id,y),null==y){u=null;break}u=g+y}}if(l&&!r&&function(e,t){t=new Set(t.map(function(e){return e.id}));for(var n=S(Array.from(e.H.keys())),i=n.next();!i.done;i=n.next())i=i.value,t.has(i)||e.H.delete(i)}(e,s),r)for(n=(t=S(s)).next();!n.done;n=t.next())n=n.value.id,e.D.includes(n)||e.D.push(n);else e.D=s.map(function(e){return e.id});return null!=a?{periods:s,duration:a+o,Xh:!1}:{periods:s,duration:u,Xh:!0}}function pW(e,t,n){return e||!t.length?[]:t.reduce(function(e,t){return t.contentType!=n||e.push.apply(e,x(t.streams)),e},[])}function pz(t,n,i,r){function a(e){var i=e.attributes["dvb:fontFamily"];e=e.attributes["dvb:url"],i&&e&&(e=eZ(n.qa.bb(),[e],n.Gb()),t.j.addFont(i,e[0]))}function o(e){switch(e){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function s(e){switch(e){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}n.qa=pQ(t,r,n.va,null),n.qa.position=i;var u=!1,l=(i=tq(r,"Role")).map(function(e){return e.attributes.value}).filter(n8),d=void 0,c=n.qa.contentType==e5;c&&(d="subtitle"),i=S(i);for(var h=i.next();!h.done;h=i.next()){var p=(h=h.value).attributes.schemeIdUri;if(null==p||"urn:mpeg:dash:role:2011"==p)switch(h=h.attributes.value){case"main":u=!0;break;case"caption":case"subtitle":d=h}}var f=tq(r,"EssentialProperty");i=null;var g=!1;h=null,p=!1,f=S(f);for(var m=f.next();!m.done;m=f.next()){var v=(m=m.value).attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==v)i=m.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"==v)var y=s(parseInt(m.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==v)var b=o(parseInt(m.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=v&&("urn:mpeg:dash:ssr:2023"==v&&t.g.dash.enableFastSwitching?g=!0:"urn:dvb:dash:fontdownload:2014"==v?a(m):"urn:mpeg:dash:urlparam:2014"==v&&(h=pX(t,m))||(p=!0))}if(p)return null;var w=null;for(f=(p=S(p=tq(r,"SupplementalProperty"))).next();!f.done;f=p.next())"http://dashif.org/guidelines/last-segment-number"==(m=(f=f.value).attributes.schemeIdUri)?w=parseInt(f.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==m?y=s(parseInt(f.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==m?b=o(parseInt(f.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==m?a(f):"urn:mpeg:dash:urlparam:2014"==m&&(h=pX(t,f));h&&(n.Gb=h),h=tq(r,"Accessibility");var T,A=new Map;for(p=(h=S(h)).next();!p.done;p=h.next())if(p=(f=p.value).attributes.schemeIdUri,f=f.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=p||t.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!=p||t.g.disableText)"urn:mpeg:dash:role:2011"==p?null!=f&&(l.push(f),"captions"==f&&(d="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==f?T="visually impaired":"2"==f?T="hard of hearing":"9"==f&&(T="spoken subtitles"));else if(p=1,null!=f)for(m=(f=S(f.split(";"))).next();!m.done;m=f.next()){v=m.value;var E=m=void 0;
1v.includes("=")?(m="svc"+(v=v.split("="))[0],E=v[1].split(",")[0].split(":").pop()):(m="svc"+p,p++,E=v),A.set(m,ir(E))}else A.set("svc1","und");else if(p=1,null!=f)for(v=(m=S(f=f.split(";"))).next();!v.done;v=m.next()){E=v.value;var k=v=void 0;E.includes("=")?(v=(E=E.split("="))[0].startsWith("CC")?E[0]:"CC"+E[0],k=E[1]||"und"):(v="CC"+p,2==f.length?p+=2:p++,k=E),A.set(v,ir(k))}else A.set("CC1","und");h=tq(r,"ContentProtection");var I=hL(t.za,h,t.g.ignoreDrmInfo,t.g.dash.keySystemsByURI);n.qa.encrypted=h.length>0;var C=ir(n.qa.language||"und"),M=n.qa.label,P=new Map;if(r=tq(r,"Representation"),!t.g.ignoreSupplementalCodecs){for(h=[],f=(p=S(r)).next();!f.done;f=p.next())(f=tJ(m=f.value,"urn:scte:dash:scte214-extensions","supplementalCodecs"))&&((m=tO(m)).attributes.codecs=f.split(" ").join(","),m.attributes.id&&(m.attributes.supplementalId=m.attributes.id+"_supplementalCodecs"),h.push(m));r.push.apply(r,x(h))}if(0==(h=r.map(function(i){var r=function(t,n,i,r,a,o,s,u,l,d,c,h){n.L=pQ(t,d,n.qa,null);var p,f,g=n.L.id;if(t.ma=Math.min(t.ma,n.L.kb),t.Y=t.ma>0,!(0==(k=+!!(E=n.L).zd+(+!!E.tc+ +!!E.Gc))?E.contentType==e5||"application"==E.contentType:(1!=k&&(E.zd&&(E.tc=null),E.Gc=null),!0)))return null;var m=n.oa.start;n.bandwidth=tY(d,"bandwidth",t3)||0,n.roles=u;var v=tq(d,"SupplementalProperty"),y=tq(d,"EssentialProperty"),b=tq(d,"ContentProtection");d=null;var w=y.find(function(e){return"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri});w?d=pX(t,w):(w=v.find(function(e){return"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri}))&&(d=pX(t,w)),d&&(n.Gb=d),d=(w=n.L.contentType)==e5||"application"==w,w="image"==w,b.length&&(n.qa.encrypted=!0);try{var T=void 0;if(i.dg){var S=n.L.bb,x=n.Gb,A=rs(eZ(S(),[i.dg.rk],x()),t.g.retryParameters);T={bitsKey:128,blockCipherMode:"CBC",iv:i.dg.iv,firstMediaSequenceNumber:0,fetchKey:function(){var n,i,r;return L(function(a){if(1==a.h)return a.g(p1(t,A,6),2);if(3!=a.h){if(!(n=a.i).data||16!=n.data.byteLength)throw new eN(2,4,4049);return i={name:"AES-CBC"},r=T,a.g(e.crypto.subtle.importKey("raw",n.data,i,!0,["decrypt"]),3)}r.cryptoKey=a.i,T.fetchKey=void 0,a.j()})}}}if(n.L.aesKey=T,S=function(e,n,i,r){return pZ(t,e,n,i,r)},n.L.zd)var E,k,I,C,M,P,D,R,O,N,j,U=(I=n,C=S,M=T,P=Number(hF(I,hJ,"presentationTimeOffset"))||0,D=hF(I,hJ,"timescale"),R=1,D&&(R=t3(D)||1),O=P/R||0,N=hX(I,hJ,M),function(e,t){if(h$(e,t),!hQ(e))throw new eN(2,4,4002)}(I,N),j=tN(I),{endTime:-1,timeline:-1,Nc:function(){var e=hV(j,hJ,"RepresentationIndex"),t=j.L.bb();return e&&(e=eq(e.attributes.sourceURL))&&(t=eZ(t,[e],j.Gb())),e=hQ(j),hY(j,C,N,t,e.start,e.end,O)},timescale:R});else if(n.L.tc)U=function(e,t,n){var i,r,a,o,s,u=hX(e,h0,n),l=(a=[(r=i=e).L.tc,r.qa.tc,r.va.tc].filter(n8).map(function(e){return tq(e,"SegmentURL")}).reduce(function(e,t){return e.length>0?e:t}).map(function(e){return e.attributes.indexRange&&!r.Kg&&(r.Kg=!0),{zk:eq(e.attributes.media),start:(e=tY(e,"mediaRange",t1,{start:0,end:null})).start,end:e.end}}),o=(i=hU(i,h0)).ie,0==o&&(o=1),s=0,i.hb?s=i.hb*(o-1):i.timeline&&i.timeline.length>0&&(s=i.timeline[0].start),{hb:i.hb,startTime:s,ie:o,ac:i.ac,timescale:i.timescale,timeline:i.timeline,qd:a});if(!l.hb&&!l.timeline&&l.qd.length>1||!l.hb&&!e.oa.duration&&!l.timeline&&1==l.qd.length||l.timeline&&0==l.timeline.length)throw new eN(2,4,4002);var d=null,c=null;e.va.id&&e.L.id&&(c=t.get(e.va.id+","+e.L.id))&&(d=c.segmentIndex);var h=function(e,t,n,i,r,a,o,s,u,l){var d=i.qd.length;i.timeline&&i.timeline.length!=i.qd.length&&(d=Math.min(i.timeline.length,i.qd.length));for(var c=e-i.ac,h=t?e+t:1/0,p=[],f=i.startTime,g={},m=0;m<d;g={Of:void 0,Ef:void 0},m++){g.Ef=i.qd[m];var v=f;f=void 0,f=null!=i.hb?v+i.hb:i.timeline?i.timeline[m].end:v+t,g.Of=null,(g=new aK(e+v,e+f,function(e){return function(){return null!=e.Of||(e.Of=eZ(n(),[e.Ef.zk],l())),e.Of}}(g),g.Ef.start,g.Ef.end,r,c,e,h,[],"",null,null,az,a)).codecs=s,g.mimeType=o,g.bandwidth=u,p.push(g)}return p}(e.oa.start,e.oa.duration,e.L.bb,l,u,n,e.L.mimeType,e.L.codecs,e.bandwidth,e.Gb);return t=!d,d?d.Zd(h,e.presentationTimeline.Db()):d=new sT(h),e.presentationTimeline.ae(h),e.ob&&e.oa.df||d.fd(e.oa.start,e.oa.duration?e.oa.start+e.oa.duration:1/0,t),c&&
1(c.segmentIndex=d),{endTime:-1,timeline:-1,Nc:function(){return d&&0!=d.getNumReferences()||d.mf(h),Promise.resolve(d)},timescale:l.timescale}}(n,t.o,T);else if(n.L.Gc)U=h1(n,S,t.o,!!t.h,t.g.dash.initialSegmentLimit,t.Aa,T,h,!1,t.C);else{var B=n.oa.duration||0,F=n.L.bb,V=n.L.mimeType,H=n.L.codecs;U={endTime:-1,timeline:-1,Nc:function(){var e=sS(m,B,F());return e.pb(function(e){e.mimeType=V,e.codecs=H}),Promise.resolve(e)},timescale:1}}}catch(e){if((d||w)&&4002==e.code)return null;throw e}if(h=new Set((h=function(e,t,n,i,r){var a=hL(e,t,i,r);if(n.Zh)e=1==n.drmInfos.length&&!n.drmInfos[0].keySystem,t=0==a.drmInfos.length,(0==n.drmInfos.length||e&&!t)&&(n.drmInfos=a.drmInfos),n.Zh=!1;else if(a.drmInfos.length>0&&(n.drmInfos=n.drmInfos.filter(function(e){return a.drmInfos.some(function(t){return t.keySystem==e.keySystem})}),0==n.drmInfos.length))throw new eN(2,4,4008);return a.Uh||n.Uh}(t.za,b,i,t.g.ignoreDrmInfo,t.g.dash.keySystemsByURI))?[h]:[]),b=v.some(function(e){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==e.attributes.schemeIdUri&&"JOC"==e.attributes.value}),v=v.some(function(e){return"tag:dolby.com,2016:dash:virtualized_content:2016"==e.attributes.schemeIdUri&&"1"==e.attributes.value}),v=b||v,b=!1,d&&(b=u.includes("forced_subtitle")||u.includes("forced-subtitle")),w&&((y=y.find(function(e){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(e.attributes.schemeIdUri)}))&&(p=y.attributes.value),!p))return null;d=n.L.codecs,n.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(d.includes("hvc1.2.4.L153.B0")||d.includes("hev1.2.4.L153.B0"))&&(f="PQ"),y=n.L.id?n.va.id+","+n.L.id:"",t.I.length&&g&&t.u.set(n.va.id+","+g,function(e){function t(e){return e?((e=tN(e)).zd=null,e.tc=null,e.Gc=nn(e.Gc),e.zf=null,e):null}return(e=tN(e)).va=t(e.va),e.qa=t(e.qa),e.L=t(e.L),e.oa&&(e.oa=tN(e.oa),e.oa.node=null),e}(n)),n.L.zf&&function(e,t,n,i){if(!e.na.has(t)){e.na.add(t);var r,a=tY(t,"presentationTime",t4)||0,o=tz(t,"UTCTiming");(r=o&&o.attributes.schemeIdUri)&&(r="urn:mpeg:dash:utc:http-ntp:2014"!==(o=o.attributes.schemeIdUri)&&"urn:mpeg:dash:utc:ntp:2014"!==o&&"urn:mpeg:dash:utc:sntp:2014"!==o),isNaN(a=(n=new Date((t=r?1e3*(tY(t,"wallClockTime",tZ)||0):oa(t=tY(t,"wallClockTime",t4)||0))-a/n.timescale*1e3)).getTime()/1e3)||(i.o||i.rh(a),i=new i9("prft",i=new Map().set("detail",{wallClockTime:t,programStartDate:n})),e.j.onEvent(i))}}(t,n.L.zf,U,n.presentationTimeline),-1!=U.endTime&&null!=n.va.id&&null!=n.L.id&&((g=t.C.get(n.va.id))?(g.endTime=U.endTime,g.fh.includes(n.L.id)||g.fh.push(n.L.id),t.C.set(n.va.id,g)):t.C.set(n.va.id,{endTime:U.endTime,timeline:U.timeline,fh:[n.L.id]}));var q=y&&t.o.has(y)?t.o.get(y):{id:t.Ja++,originalId:n.L.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){q.segmentIndex&&(q.segmentIndex.release(),q.segmentIndex=null)},segmentIndex:null,mimeType:n.L.mimeType,codecs:d,frameRate:n.L.frameRate,pixelAspectRatio:n.L.pixelAspectRatio,bandwidth:n.bandwidth,width:n.L.width,height:n.L.height,kind:r,encrypted:i.drmInfos.length>0,drmInfos:i.drmInfos,keyIds:h,language:a,originalLanguage:n.qa.language,label:o,type:n.qa.contentType,primary:s,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:n.L.emsgSchemeIdUris,roles:u,forced:b,channelsCount:n.L.tf,audioSamplingRate:n.L.audioSamplingRate,spatialAudio:v,closedCaptions:l,hdr:f,colorGamut:void 0,videoLayout:void 0,tilesLayout:p,accessibilityPurpose:c,external:!1,fastSwitching:!1,fullMimeTypes:new Set([nB(n.L.mimeType,n.L.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};return q.createSegmentIndex=function(){var e;return L(function(t){if(1==t.h)return q.segmentIndex?t.A(0):(e=q,t.g(U.Nc(),3));e.segmentIndex=t.i,t.j()})},y&&n.ob&&!t.o.has(y)&&(n=n.va.id||"",t.F.has(n)||t.F.set(n,[]),t.o.set(y,q),t.F.get(n).push(y)),q}(t,n,I,d,C,M,u,l,A,i,T,w);return r&&(r.hdr=r.hdr||y,r.colorGamut=r.colorGamut||b,r.fastSwitching=g,i=i.attributes.dependencyId)?(r.baseOriginalId=i,P.set(i,r),null):r}).filter(function(e){return!!e})).length&&0==P.size){if(i="image"==n.qa.contentType,t.g.dash.ignoreEmptyAdaptationSet||c||i)return null;throw new eN(2,4,4003)}if(!n.qa.contentType||"application"==n.qa.contentType)for(n.qa.contentType=p0(h[0].mimeType,h[0].codecs),p=(c=S(h)).next();!p.done;p=c.next())p.value.type=n.qa.contentType;for(c=n.qa.id||"__fake__"+t.Ja++,f=(p=S(h)).next();!f.done;f=p.next()){for(f=f.value,v=(m=S(I.drmInfos)).next();!v.done;v=m.next())(v=v.value).keyIds=v.keyIds&&f.keyIds?new Set([].concat(x(v.ke
1yIds),x(f.keyIds))):v.keyIds||f.keyIds;f.groupId=c}return r=r.map(function(e){return e.attributes.supplementalId||e.attributes.id}).filter(n8),{id:c,contentType:n.qa.contentType,language:C,Em:u,streams:h,drmInfos:I.drmInfos,fj:i,Qk:r,wj:P}}function pX(e,t){if((t=tX(t,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&tY(t,"useMPDUrlQuery",t6,!1)){var n=t.attributes.queryTemplate;if(n)return function(){return"$querypart$"==n?e.ka:n.split("&").map(function(t){if("$querypart$"==t)return e.ka;var n=/\$query:(.*?)\$/g.exec(t);if(n&&2==n.length){n=n[1];var i=new ek(e.ka).get(n);if(i.length)return n+"="+i[0]}return t}).join("&")}}return null}function pY(e){var t,n;return L(function(i){switch(i.h){case 1:return t=0,i.m(2),i.g(pF(e),4);case 4:t=i.i,i.o(3);break;case 2:if(n=i.l(),e.j){if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.j.onError(n),i.return();n.severity=1,e.j.onError(n)}case 3:if(!e.j)return i.return();e.j.onManifestUpdated(),pJ(e,t),i.j()}})}function pJ(e,t){if(!(e.M<0)){var n=e.M;e.g.updatePeriod>=0&&(n=e.g.updatePeriod),e.N.ea(Math.max(n-t,K(e.Fa)))}}function pQ(e,t,n,i){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,tf:null,audioSamplingRate:null,kb:0,Ff:1,encrypted:!1},i=i||n.bb;var r,a=t.attributes.id,o=t.attributes.supplementalId,s=tq(t,"BaseURL"),u=!1;if(e.i)for(var l=S(s),d=l.next();!d.done;d=l.next()){var c=d.value;d=c.attributes.serviceLocation,c=tK(c),d&&c&&(pe(e.i,a,d,c),u=!0)}u&&e.i||(r=s.map(tK));var h=e.i;e=t.attributes.contentType||n.contentType,l=t.attributes.mimeType||n.mimeType,d=sW([t.attributes.codecs||n.c
1odecs]).join(","),c=tY(t,"frameRate",t8)||n.frameRate;var p=t.attributes.sar||n.pixelAspectRatio,f=function(e,t){t=t.slice(),e=S(e);for(var n=e.next();!n.done;n=e.next())n=n.value.attributes.schemeIdUri,t.includes(n)||t.push(n);return t}(tq(t,"InbandEventStream"),n.emsgSchemeIdUris),g=tq(t,"AudioChannelConfiguration");g=function(e){e=S(e);for(var t=e.next();!t.done;t=e.next()){var n=(t=t.value).attributes.schemeIdUri;if(n&&(t=t.attributes.value))switch(n){case"urn:mpeg:dash:outputChannelPositionList:2012":return t.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(t=parseInt(t,10)))continue;return t;case"tag:dolby.com,2015:dash:audio_channel_configuration:2015":if(n=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2],!(t=parseInt(t,16)))continue;for(var i=0,r=0;r<n.length;r++)t&1<<r&&(i+=n[r]);if(i)return i;continue;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(n=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse(),!(t=parseInt(t,16)))continue;for(r=i=0;r<n.length;r++)t&1<<r&&(i+=n[r]);if(i)return i;continue;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(n=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(t=parseInt(t,10))&&t>0&&t<n.length)return n[t]}}return null}(g)||n.tf;var m=tY(t,"audioSamplingRate",t4)||n.audioSamplingRate;e||(e=p0(l,d));var v=tz(t,"SegmentBase"),y=tz(t,"SegmentTemplate"),b=v&&tY(v,"availabilityTimeOffset",t5)||0,w=y&&tY(y,"availabilityTimeOffset",t5)||0,T=s&&s.length&&tY(s[0],"availabilityTimeOffset",t5)||0;b=n.kb+T+b+w,w=null,(T=tz(t,"SegmentSequenceProperties"))&&(T=tY(T,"cadence",t3))&&(w=T),T=t.attributes.label;var x=tq(t,"Label");return x&&x.length&&tG(x=x[0])&&(T=tG(x)),{bb:function(){return eZ(i(),s.length?h&&u?pt(h,a):r||[]:[])},zd:v||n.zd,tc:tz(t,"SegmentList")||n.tc,Gc:y||n.Gc,zf:tz(t,"ProducerReferenceTime")||n.zf,width:tY(t,"width",t4)||n.width,height:tY(t,"height",t4)||n.height,contentType:e,mimeType:l,codecs:d,frameRate:c,pixelAspectRatio:p,emsgSchemeIdUris:f,id:o||a,originalId:a,language:t.attributes.lang,tf:g,audioSamplingRate:m,kb:b,$e:null,Ff:w||n.Ff,label:T||null,encrypted:!1}}function p$(e,t,n,i){var r,a,o,s,u,l;return L(function(d){if(1==d.h)return r=[eq(n)],(a=rs(eZ(t(),r),e.g.retryParameters)).method=i,o=e.j.networkingEngine.request(4,a,{isPreload:e.ua()}),ri(e.V,o),d.g(o.promise,2);if(s=d.i,"HEAD"==i){if(!s.headers||!s.headers.date)return d.return(0);u=s.headers.date}else u=eU(s.data);return isNaN(l=Date.parse(u))?d.return(0):d.return(l-Date.now())})}function pZ(e,t,n,i,r){var a,o,s,u;return L(function(l){return 1==l.h?(a=rc,o=+!r,s=sJ(t,n,i,e.g.retryParameters),l.g(p1(e,s,a,{type:o}),2)):(u=l.i,l.return(u.data))})}function p0(e,t){return nZ(t=nB(e,t))?e5:e.split("/")[0]}function p1(e,t,n,i){return i||(i={}),i.isPreload=e.ua(),t=e.j.networkingEngine.request(n,t,i),ri(e.V,t),t.promise}function p2(){return""}function p3(e,t,n){return function(){return e&&t?pt(e,"BaseURL"):n.slice()}}function p4(){}(p=pB.prototype).configure=function(e,t){var n=this.j&&e.updatePeriod!=this.g.updatePeriod&&e.updatePeriod>=0;this.g=e,t&&(this.ua=t),n&&this.h&&this.h.presentationTimeline.U()&&this.N.wb(),this.i&&this.i.configure(this.g),this.m&&(this.m.Oi(this.g.dash.multiTypeVariantsAllowed&&tr()),this.m.Ti(this.g.dash.useStreamOnceInPeriodFlattening))},p.start=function(e,t){var n,i=this;return L(function(r){if(1==r.h)return i.ya=t.isLowLatencyMode(),i.B=[e],i.j=t,r.g(pF(i),2);if(n=r.i,i.j&&pJ(i,n),!i.j)throw new eN(2,7,7001);return r.return(i.h)})},p.stop=function(){for(var e=S(this.o.values()),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();return this.m&&this.m.release(),this.g=this.j=null,this.B=[],this.h=null,this.o.clear(),this.F.clear(),this.u.clear(),this.C.clear(),this.H.clear(),this.l={pf:"",type:"",profiles:[],mc:null,kb:0,bb:null,ce:0},this.m=null,null!=this.N&&(this.N.stop(),this.N=null),this.i&&this.i.destroy(),this.J&&(this.J.release(),this.J=null),this.na.clear(),this.za.release(),this.V.destroy()},p.update=function(){var e,t=this;return L(function(n){return 1==n.h?(n.m(2),n.g(pF(t),4)):2!=n.h?n.o(0):(e=n.l(),t.j&&e)?void(t.j.onError(e),n.j()):n.return()})},p.onExpirationUpdated=function(){},p.onInitialVariantChosen=function(e){if(this.h&&this.h.presentationTimeline.U()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.h.presentationTimeline.Ac();var n=t.segmentIndex.find(e);
1null!=n&&(t=t.segmentIndex.get(n))&&(this.M=t.endTime-e,pJ(this,0))}}},p.banLocation=function(e){this.i&&this.i.banLocation(e)},p.setMediaElement=function(e){this.K=e},q("shaka.dash.DashParser",pB),tu("application/dash+xml",function(){return new pB}),tu("video/vnd.mpeg.dash.mpd",function(){return new pB}),q("shaka.dependencies",p4),p4.has=function(e){return p8.has(e)},p4.add=function(e,t){if(!p6[e])throw Error(e+" is not supported");e==p5?el("mux.js","mux.js is no longer used in Shaka Player."):p8.set(e,function(){return t})};var p5="muxjs",p6={Fm:p5,ISOBoxer:"ISOBoxer"};p4.Allowed=p6;var p8=new Map([["ISOBoxer",function(){return e.ISOBoxer}]]);function p9(){this.j=new ei(function(){for(var e,t=navigator.userAgent.toLowerCase(),n=S([{type:"VR",eh:/oculus|quest/},{type:"TV",eh:/smart[ _]?tv|android ?tv/},{type:"MOBILE",eh:/iphone|ipad|ipod|android/}]),i=n.next();!i.done;i=n.next())if((i=i.value).eh.test(t))return i.type;if(n=(null==(t=navigator.userAgentData)||null==(e=t.platform)?void 0:e.toLowerCase())||"",t){if(t.mobile)return"MOBILE";if(n.includes("android"))return"TV"}return"DESKTOP"}),this.l=new ei(function(){var e=navigator.userAgent;return navigator.vendor.includes("Apple")&&(e.includes("Version/")||e.includes("OS/"))?"WEBKIT":e.includes("Edge/")?"EDGE":e.includes("Chrome/")?"CHROMIUM":e.includes("Firefox/")?"GECKO":"UNKNOWN"})}function p7(){var t=e.ManagedMediaSource||e.MediaSource;return!!t&&!!t.isTypeSupported}function fe(t){return er(),void 0!==e.matchMedia&&(e.matchMedia("(color-gamut: p3)").matches||e.matchMedia("(dynamic-range: high)").matches)?t?"HLG":"PQ":"SDR"}function ft(){p9.call(this),this.g=new ei(function(){var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}),this.h=new ei(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}function fn(){if(!fi())throw Error("Not a Chromecast device!");p9.call(this),this.h=new ei(function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null}),this.g=new ei(function(){var e=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;return(e=e.toLowerCase()).includes("android")?fr:e.includes("fuchsia")?fa:fo})}function fi(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}(p=p9.prototype).cc=function(){return!!navigator.mediaCapabilities},p.Ta=function(){return this.j.value()},p.Ea=function(){return this.l.value()},p.wd=function(){return!1},p.hh=function(){return!1},p.bf=function(){return!1},p.Hi=function(){return!1},p.fe=function(){return!1},p.Wc=function(){return!0},p.Xc=function(){return!0},p.je=function(){return!0},p.Mi=function(){return 0},p.fc=function(){return Promise.resolve({width:1/0,height:1/0})},p.Wi=function(){return!1},p.uh=function(){return!1},p.Wa=function(e){var t=this.Ta();return("TV"===t||"CONSOLE"===t||"CAST"===t)&&(e.ads.customPlayheadTracker=!0,e.ads.skipPlayDetection=!0,e.ads.supportsMultipleMediaElements=!1),e},p.Ah=function(){return!!e.indexedDB},p.Fi=function(){return[]},p.cj=function(){return!1},p.ui=function(){return!1},p.Cf=function(){return!1},p.Kf=function(){return!0},p.wi=function(){return!1},p.bj=function(){return!0},p.Vc=function(){return!1},p.Tg=function(e){return"com.apple.fps"===e},p.toString=function(){return"Device: "+this.Ib()+" v"+this.Ca()+"; Type: "+this.Ta()},w(ft,p9),(p=ft.prototype).Ca=function(){return this.g.value()},p.Ib=function(){return"Apple Browser"},p.Ta=function(){return this.h.value()},p.Ea=function(){return"WEBKIT"},p.cc=function(){return!1},p.wd=function(e,t){return"audio"===t},p.bf=function(){return!0},p.Hi=function(e){return"audio"===e},p.Wa=function(e){return p9.prototype.Wa.call(this,e),e.abr.minTimeToSwitch=.5,e},p.cj=function(){return!0},(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&"macos"==navigator.userAgentData.platform.toLowerCase()||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(ea=function(){return new ft}),w(fn,p9),(p=fn.prototype).Ca=function(){return this.h.value()},p.Ib=function(){return"Chromecast with "+this.g.value()},p.Ta=function(){return"CAST"},p.Ea=function(){return"CHROMIUM"},p.cc=function(){return p9.prototype.cc.call(this)&&this.g.value()!==fo},p.Xc=function(){return this.g.value()!==fo},p.Mi=function(){switch(this.g.value()){case fr:return 0;case fa:return 3;default:return 1}},p.fc=function(){var t,n,i,r,a;return L(function(o){switch(o.h){case 1:if(t=e.cast&&cast.__platform__&&cast.__platform__.canDisplayType,n={width:1280,height:720},o.m(2),!(i=t)){o.A(4);break}return o.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:i=o.i;case 4:if(i){n.width=3840,n.height=2160,o.A(6);break}if(!(r=t)){o.A(7);break}return o.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:r=o.i;case 7:r&&(n.width=1920,n.height=1080);case 6:o.o(3);break;case 2:a=o.l(),X("Failed to check canDisplayType:",a);case 3:return o.return(n)}})},p.Wa=function(e){return p9.prototype.Wa.call(this,e),e.streaming.stallSkip=0,e},p.Ah=function(){return!1},p.Vc=function(){return!0};var fr="Android",fa="Fuchsia",fo="Linux";function fs(){p9.call(this);var e=this;this.i=new ei(function(){var e=navigator.userAgent.match(/Edge?\/(\d+)/);return e?parseInt(e[1],10):(e=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/))?parseInt(e[2],10):null}),this.g=new ei(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"}),this.h=new ei(function(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():!!navigator.platform&&navigator.platform.toLowerCase().includes("win32")}),this.u=new ei(function(){return!navigator.userAgent.match(/Edge?\//)||!e.h.value()}),this.o=new ei(function(){return navigator.userAgent.includes("sony.hbbtv.tv")}),this.m=new ei(function(){return navigator.userAgentData&&navigator.userAgentData.platform?"android"==navigator.userAgentData.platform.toLowerCase():!!navigator.userAgent.includes("Android")})}function fu(){p9.apply(this,arguments)}function fl(){p9.call(this),this.g=new ei(function(){var e=navigator.userAgent.match(/PlayStation (\d+)/);return e?parseInt(e[1],10):null})}function fd(){p9.call(this);var e=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.g=e?parseInt(e[1],10):null,this.h=e?parseInt(e[2],10):null}function fc(){p9.apply(this,arguments)}function fh(){p9.call(this),this.i=new ei(function(){return navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")}),this.h=new ei(function(){return navigator.userAgent.includes("SOPOpenBrowser")}),this.g=new ei(function(){if(navigator.userAgent.includes("DT_STB_BCM"))return 11;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null})}function fp(){p9.call(this),this.g=function(){var e=null,t=navigator.userAgent.match(/Chrome\/(\d+)/);switch(t&&(e=parseInt(t[1],10)),e){case 38:return 3;case 53:return 4;case 68:return 5;case 79:return 6;case 87:return 22;case 94:return 23;case 108:return 24;case 120:return 25;case 132:return 26;default:return null}}()}function ff(){p9.call(this),this.g=navigator.userAgent.includes("Edge/");var e=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=e?parseInt(e[1],10):null}function fg(){var e=null;try{e="u">typeof Windows?Windows:chrome.webview.hostObjects.sync.Windows}catch(e){}return e}function fm(e,t,n){this.type=e,this.ba=t,this.segments=n||null}function fv(e,t,n,i){this.id=e,this.name=t,this.attributes=n,this.value=void 0===i?null:i}function fy(e,t){return t?e.toString():(t=new Set().add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI"),e.toString(t))}function fb(e,t){return e.attributes.find(function(e){return e.name===t})||null}function f_(e,t,n){return(e=fb(e,t))?e.value:n||null}function fw(e,t){if(!(e=fb(e,t)))throw new eN(2,4,4023,t);return e.value}function fT(e,t,n){n=void 0===n?[]:n,this.ba=t,this.g=e,this.qc=n}function fS(e,t){this.name=e,this.value=t}function fx(e,t){return e.filter(function(e){return e.name==t})}function fA(e,t){return e.filter(function(e){return fw(e,"TYPE")==t})}function fE(e,t){e=S(e);for(var n=e.next();!n.done;n=e.next())if((n=n.value).name===t)return n;return null}
1function fk(e,t,n){return n=void 0===n?0:n,(e=fE(e,t))?Number(e.value):n}function fI(e,t,n){return t?fC(e,[t],n):[]}function fC(e,t,n){if(!t.length)return[];var i=t;return n&&n.size&&(i=t.map(function(e){return fM(e,n)})),eZ(e,i)}function fM(e,t){if(!t||!t.size)return e;var n=(e=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}")).match(/{\$\w*}/g);if(n){n=S(n);for(var i=n.next();!i.done;i=n.next()){var r=(i=i.value).slice(2,i.length-1),a=t.get(r);if(a)e=e.replace(i,a);else throw new eN(2,4,4039,r)}}return e}function fP(e){var t=(e=e.value).indexOf(",");return Number(-1===t?e:e.substring(0,t))}function fD(){this.g=0}function fR(e,t){var n=eU(t).trim().split(/[\r\n]+/);if(!n[0].startsWith("#EXTM3U"))throw new eN(2,4,4015);t=0;for(var i=!1,r=[],a=!0,o=0;o<n.length;o++){var s=n[o],u=n[o+1];if(s.startsWith("#")&&!s.startsWith("#EXT")||a)a=!1;else{if(s=fL(e,s),i||(fO.has(s.name)?(t=1,i=!0):"EXT-X-STREAM-INF"==s.name||"EXT-X-MEDIA"==s.name?i=!0:fN.has(s.name)&&(t=1,i=!0)),fN.has(s.name)){if(1!=t)throw new eN(2,4,4017);a=e,e=Array(Math.max(100,Math.floor((n.length-o)/2))),i=0,s=[];var l=[];for(u=null;o<n.length;o++){var d=n[o];d.startsWith("#EXT")?(d=fL(a,d),fO.has(d.name)?r.push(d):"EXT-X-MAP"==d.name?u=d:"EXT-X-PART"==d.name?l.push(d):"EXT-X-PRELOAD-HINT"==d.name?"PART"==f_(d,"TYPE")?l.push(d):"MAP"==f_(d,"TYPE")&&(d.name="EXT-X-MAP",u=d):s.push(d)):(!d.startsWith("#")||d.startsWith("#EXT"))&&(d=d.trim(),u&&s.push(u),s=new fT(d,s,l),i<e.length?e[i++]=s:(e.push(s),i++),s=[],l=[])}return l.length&&(u&&s.push(u),n=new fT("",s,l),i<e.length?e[i++]=n:(e.push(n),i++)),new fm(t,r,i<e.length?e.slice(0,i):e)}r.push(s),"EXT-X-STREAM-INF"==s.name&&(s.attributes.push(new fS("URI",u)),a=!0)}}return new fm(t,r)}function fL(e,t){e=e.g++;var n=t.indexOf(":"),i=-1===n?t.substring(1):t.substring(1,n);if(!i.startsWith("EXT"))throw new eN(2,4,4016,t);if(null===(t=-1===n?null:t.substring(n+1)))e=new fv(e,i,[]);else if(-1===t.indexOf("="))e=new fv(e,i,[],t);else{n=[];var r=null,a=0,o=t.indexOf(","),s=t.indexOf("=");for(-1!==o&&o<s&&(r=t.substring(0,o),a=o+1);a<t.length;){for(;" "===t[a];)a++;if(-1===(s=t.indexOf("=",a)))break;if(o=t.substring(a,s),'"'===t[a=s+1]){a++;var u=t.indexOf('"',a);s=-1===u?t.substring(a):t.substring(a,u),a=-1===u?t.length:u+1}else s=-1===(u=t.indexOf(",",a))?t.substring(a):t.substring(a,u),a=-1===u?t.length:u;a<t.length&&","===t[a]&&a++,n.push(new fS(o,s))}e=new fv(e,i,n,r)}return e}fi()&&(ea=function(){return new fn}),w(fs,p9),(p=fs.prototype).Ca=function(){return this.i.value()},p.Ib=function(){return this.g.value()},p.wd=function(e){return!!iW(e)&&"Edge"===this.g.value()&&this.h.value()},p.hh=function(){return"Edge"===this.g.value()&&this.h.value()},p.bf=function(){return"Edge"===this.g.value()&&this.h.value()},p.Xc=function(){return this.u.value()},p.Wa=function(e){if(p9.prototype.Wa.call(this,e),this.h.value())switch(this.g.value()){case"Firefox":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case"Chrome":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}return this.m.value()&&(e.drm.defaultAudioRobustnessForWidevine="SW_SECURE_CRYPTO",e.drm.defaultVideoRobustnessForWidevine="SW_SECURE_CRYPTO"),e},p.Cf=function(){return"Edge"===this.g.value()||this.o.value()},p.Vc=function(){if("GECKO"===this.Ea()){var e=this.Ca();return null!==e?e>=100:p9.prototype.Vc.call(this)}return p9.prototype.Vc.call(this)},p.Tg=function(e){return"GECKO"===this.Ea()?e.startsWith("com.microsoft.playready.recommendation"):p9.prototype.Tg.call(this,e)},eo=function(){return new fs},w(fu,p9),(p=fu.prototype).Ca=function(){return null},p.Ib=function(){return"Hisense"},p.Ta=function(){return"TV"},p.cc=function(){return!1},p.Xc=function(){return!1},p.fc=function(){var t={width:1920,height:1080},n=null;if(e.Hisense_Get4KSupportState)try{n=e.Hisense_Get4KSupportState()}catch(e){}return null!=n||(n=navigator.userAgent.includes("UHD")),n&&(t.width=3840,t.height=2160),Promise.resolve(t)},p.Wa=function(e){return p9.prototype.Wa.call(this,e),e.streaming.stallSkip=0,e},(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))&&(ea=function(){return new fu}),w(fl,p9),(p=fl.prototype).Ib=function(){return"PlayStation"},p.Ta=function(){return"CONSOLE"},p.Ea=function(){return"WEBKIT"},p.Ca=function(){return this.g.value()},p.cc=function(){return!1},p.Wc=function(){return!1},p.Xc=function(){return!1},p.uh=function(){return 4===this.Ca()},p.fc=function(){var t,n,i;return L(function(r){switch(r.h){case 1:return t={width:1920,height:1080},n=!1,r.m(2),r.g(e.msdk.device.getDisplayInfo(),4);case 4:case 7:n="4K"===r.i.resolution,r.o(3);break;case 2:return r.l(),r.m(5),r.g(e.msdk.device.getDisplayInfoImmediate(),7);case 5:i=r.l(),Y("PlayStation: Failed to get the display info:",i);case 3:return n&&(t.width=3840,t.height=2160),r.return(t)}})},p.Wa=function(e){return p9.prototype.Wa.call(this,e),4===this.Ca()&&e.drm.preferredKeySystems.push("com.microsoft.playready"),e.streaming.clearDecodingCache=!0,e},p.Cf=function(){return 4===this.Ca()},p.Kf=function(){return 4!==this.Ca()},navigator.userAgent.includes("PlayStation")&&(ea=function(){return new fl}),w(fd,p9),(p=fd.prototype).Ca=function(){return this.g},p.Ib=function(){return"Tizen"},p.Ea=function(){return"CHROMIUM"},p.Ta=function(){return"TV"},p.wd=function(){return!0},p.fe=function(){return 3===this.Ca()},p.cc=function(){return!1},p.Wc=function(){var e=this.Ca();return null!==e?e>=4:p9.prototype.Wc.call(this)}
1,p.Xc=function(){return!1},p.je=function(){return this.g&&this.h?5===this.g?this.h>=5:this.g>5:p9.prototype.je.call(this)},p.fc=function(){var t=e.devicePixelRatio;t={width:e.screen.width*t>1920?3840:1920,height:e.screen.height*t>1080?2160:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var n=webapis.systeminfo.getMaxVideoResolution();t.width=n.width,t.height=n.height}else webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(t.width=7680,t.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(t.width=3840,t.height=2160)}catch(e){Y("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(t)},p.Wa=function(e){return p9.prototype.Wa.call(this,e),e.drm.ignoreDuplicateInitData=2!==this.Ca(),3===this.Ca()&&(e.streaming.crossBoundaryStrategy="reset_to_encrypted"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e.streaming.gapPadding=2,e},p.Fi=function(){var e=[];return null!==this.g&&this.g<5&&e.push("opus"),e},p.ui=function(){return!0},p.wi=function(){return 3===this.Ca()},navigator.userAgent.includes("Tizen")&&(ea=function(){return new fd}),w(fc,p9),fc.prototype.Ca=function(){return null},fc.prototype.Ib=function(){return"Vizio"},fc.prototype.Ta=function(){return"TV"},fc.prototype.cc=function(){return!1},navigator.userAgent.includes("VIZIO SmartCast")&&(ea=function(){return new fc}),w(fh,p9),(p=fh.prototype).Ca=function(){return this.g.value()},p.Ib=function(){return"WebKit STB"},p.Ta=function(){return"TV"},p.Ea=function(){return"WEBKIT"},p.cc=function(){return!1},p.Wc=function(){var e=this.g.value();return null===e||e>=15},p.wd=function(){return this.h.value()},p.fc=function(){return Promise.resolve({width:e.screen.width*e.devicePixelRatio,height:e.screen.height*e.devicePixelRatio})},p.Kf=function(){return!this.i.value()},(navigator.userAgent.includes("PlayStation")?0:navigator.userAgent.includes("SOPOpenBrowser")||navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&"macos"==navigator.userAgentData.platform.toLowerCase()||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))&&(ea=function(){return new fh}),w(fp,p9),(p=fp.prototype).Ca=function(){return this.g},p.Ib=function(){return"WebOS"},p.Ta=function(){return"TV"},p.Ea=function(){return"CHROMIUM"},p.cc=function(){return!1},p.Wc=function(){var e=this.Ca();return null!==e?e>3:p9.prototype.Wc.call(this)},p.Xc=function(){return!1},p.je=function(){var e=this.Ca();return null!==e?e>3:p9.prototype.je.call(this)},p.fc=function(){var t={width:1920,height:1080};try{var n=JSON.parse(e.PalmSystem.deviceInfo);t.width=Math.max(1920,n.screenWidth),t.height=Math.max(1080,n.screenHeight)}catch(e){Y("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(t)},p.Wa=function(e){return p9.prototype.Wa.call(this,e),3===this.Ca()&&(e.streaming.crossBoundaryStrategy="reset"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e},p.bj=function(){return!1},p.Vc=function(){var e=this.Ca();return null!==e?e>=6:p9.prototype.Vc.call(this)},navigator.userAgent.includes("Web0S")&&(ea=function(){return new fp}),w(ff,p9),(p=ff.prototype).Ca=function(){return this.h},p.Ib=function(){return"Xbox"},p.Ta=function(){return"CONSOLE"},p.Ea=function(){return this.g?"EDGE":"CHROMIUM"},p.wd=function(){return!0},p.hh=function(){return!0},p.bf=function(){return!0},p.Wi=function(){return this.g},p.fc=function(){var e={width:1920,height:1080},t=fg();if(t)try{var n=new t.Media.Protection.ProtectionCapabilities,i=t.Media.Protection.ProtectionCapabilityResult;t=null;do t=n.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");
1while(t===i.maybe)t===i.probably&&(e.width=3840,e.height=2160)}catch(e){Y("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},p.Wa=function(e){return p9.prototype.Wa.call(this,e),e.drm.parseInbandPsshEnabled=this.g,e.drm.preferredKeySystems.push("com.microsoft.playready"),this.g&&(e.streaming.gapPadding=.01),e},p.Cf=function(){return!0},p.Ah=function(){return!1},(navigator.userAgent.includes("Xbox One")||null!==fg())&&(ea=function(){return new ff}),fv.prototype.toString=function(e){var t="#"+this.name,n=this.attributes?this.attributes.filter(function(t){return!e||!e.has(t.name)}).map(function(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}):[];return this.value&&n.unshift(this.value),n.length>0&&(t+=":"+n.join(",")),t};var fO=new Set("EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" ")),fN=new Set("EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" "));function fj(){}function fU(e,t){try{var n=fB(e);return i5({uri:e,originalUri:e,data:n.data,headers:{"content-type":n.contentType},originalRequest:t})}catch(e){return i3(e)}}function fB(e){if(!e.startsWith("data:"))throw new eN(2,1,1004,e);var t=e.substring(5),n=t.indexOf(",");if(n<0)throw new eN(2,1,1004,e);e=t.substring(0,n),t=decodeURIComponent(t.substring(n+1)),e=(n=e.split(";"))[0];var i=!1;return n.length>1&&"base64"==n[n.length-1].toLowerCase()&&(i=!0,n.pop()),{data:i?eX(t):eV(t),contentType:e,Fh:n}}function fF(){var t=this;this.g=this.i=null,this.F=1,this.D=new Map,this.M=new Map,this.o=new Map,this.o.set("video",new Map),this.o.set("audio",new Map),this.o.set(e5,new Map),this.o.set("image",new Map),this.Yb=new Map().set("com.apple.streamingkeydelivery",function(n,i,r){var a,o,s,u,l;return L(function(d){if(1==d.h){if("video/mp2t"==i)throw new eN(2,4,4040);if("apple"===e.shakaMediaKeysPolyfill)throw new eN(2,4,4041);if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a=fw(n,"METHOD")))return d.return(null);o="cenc","SAMPLE-AES"==a&&(o="cbcs"),s=fw(n,"URI"),u=e0("com.apple.fps",o,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],s);var c=new ef(s).Ab.replace(/-/g,"").toLowerCase();return(l=32===c.length&&/^[0-9a-f]+$/.test(c)?c:null)||!r?d.A(2):d.g(gg(t,r),3)}return 2!=d.h&&(l=d.i),l&&u.keyIds.add(l),d.return(u)})}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(e){var n=fw(e,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";"SAMPLE-AES"==n&&(i="cbcs");var r=fw(e,"URI");if(n=fB(r.split("?")[0]),r=r.split("?")[0],!t.I.has(r)){var a=eD(n.data);t.I.set(r,a)}i=e0("com.widevine.alpha",i,[{initDataType:"cenc",initData:t.I.get(r)}],void 0,n.Fh),(e=f_(e,"KEYID"))&&i.keyIds.add(e.toLowerCase().substr(2)),e=Promise.resolve(i)}else e=Promise.resolve(null);return e}).set("com.microsoft.playready",function(e){var t=fw(e,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)){var n="cenc";"SAMPLE-AES"==t&&(n="cbcs"),e=eD((t=fB((e=fw(e,"URI")).split("?")[0])).data);var i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);n=e0("com.microsoft.playready",n,[{initDataType:"cenc",initData:i=rL(e,i,new Set,0)}],void 0,t.Fh),(e=tB(["<PLAYREADY>",ez(e),"</PLAYREADY>"].join("\n")))&&(n.licenseServerUri=hP(e)),n=Promise.resolve(n)}else n=Promise.resolve(null);return n}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(e){var n=fw(e,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";"SAMPLE-AES"==n&&(i="cbcs");var r=fw(e,"URI");if(n=fB(r.split("?")[0]),r=r.split("?")[0],!t.I.has(r)){var a=eD(n.data);t.I.set(r,a)}i=e0("com.huawei.wiseplay",i,[{initDataType:"cenc",initData:t.I.get(r)}],void 0,n.Fh),(e=f_(e,"KEYID"))&&i.keyIds.add(e.toLowerCase().substr(2)),e=Promise.resolve(i)}else e=Promise.resolve(null);return e}),this.eb=new Set,this.j=new Map,this.m=null,this.H="",this.ab=new fD,this.N=-1,this.ma=1/0,this.P=this.sc=this.cb=!1,this.C=new n4(function(){t.i
1a&&!t.g.continueLoadingWhenPaused&&(t.Y.Na(t.ia,"timeupdate"),t.ia.paused)?t.Y.Ba(t.ia,"timeupdate",function(){return gl(t)}):gl(t)}),this.Fa=gx,this.h=null,this.Za=0,this.B=1/0,this.Ra=this.Ja=this.V=0,this.ka=new rn,this.J=new Map,this.K=new Map,this.Aa=new Map,this.ua=new Map,this.O=new Map,this.ya=new Map,this.za=new Map,this.$b=this.na=!1,this.Vb=new G(5),this.l=null,this.T=!0,this.Y=new ee,this.u=this.ia=null,this.Xb=function(){return!1},this.I=new Map}function fV(e,t){return gd(e)?e.o.get(t.type):t.lf}function fH(e,t,n){n=void 0!==n&&n;for(var i=-1==e.N,r=S(t),a=r.next();!a.done;a=r.next()){var o=(a=a.value).stream.segmentIndex,s=fV(e,a);if(o=o.Bb()){s=S(s);for(var u=s.next();!u.done;u=s.next()){var l=(u=S(u.value)).next().value;if(u.next().value==o.startTime){i&&(e.N=Math.max(e.N,l)),a.pg=l;break}}}}if(!(e.N<0))for(i=(t=S(t)).next();!i.done;i=t.next())(f1(e,(i=i.value).type)||n)&&(r=i.stream.segmentIndex)&&(a=e.N-i.pg)>0&&(r.g.splice(0,a),r=r.Bb())&&(r=-r.startTime,i.stream.segmentIndex.offset(r),fq(e,i,r))}function fq(e,t,n){if(!(.001>Math.abs(n))){t.Qc+=n,t.Ec+=n,e=fV(e,t);for(var i=S(e),r=i.next();!r.done;r=i.next()){var a=S(r.value);r=a.next().value,a=a.next().value,e.set(r,a+n)}t.R()}}function fG(e,t,n){var i,r,a,o,s,u;return L(function(l){switch(l.h){case 1:if(!t)return l.return({mimeType:null,data:null});return i=rc,r=sJ(t.R(),t.Bc(),t.zc(),e.g.retryParameters),a=+(t instanceof aK),l.g(gh(e,r,i,{type:a}).promise,2);case 2:if(s=(o=l.i).data,!t.aesKey){l.A(3);break}return l.g(sz(s,t.aesKey,n),4);case 4:s=l.i;case 3:return t instanceof aK?t.ge(s,!0):t.ge(s),(u=o.headers["content-type"])&&(u=u.split(";")[0].toLowerCase()),l.return({mimeType:u,data:s})}})}function fK(e){if(gd(e)){if(e.Fa==gE){for(var t=1/0,n=1/0,i=S(e.j.values()),r=i.next();!r.done;r=i.next())(r=r.value).stream.segmentIndex&&"text"!=r.stream.type&&!r.stream.isAudioMuxedInVideo&&(t=Math.min(t,r.Ec),n=Math.min(n,r.Qc));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.m.If(t)}}else e.m.ub(f$(e));if(!e.m.o)for(n=(t=S(e.j.values())).next();!n.done;n=t.next())!(n=n.value).stream.segmentIndex||"audio"!=n.type&&"video"!=n.type||(n=n.stream.segmentIndex.Bb())&&null!=n.h&&e.m.rh(n.h);e.m.kf()}function fW(e,t,n){n=new ef(n).g;var i=new Map;t=S(t);for(var r=t.next();!r.done;r=t.next()){var a=r.value,o=f_(a,"NAME"),s=f_(a,"VALUE");r=f_(a,"QUERYPARAM"),a=f_(a,"IMPORT"),o&&s&&(i.has(o)||i.set(o,s)),r&&(o=n.get(r)[0])&&!i.has(o)&&i.set(r,o),a&&(r=e.D.get(a))&&i.set(a,r)}return i}function fz(e){var t=new Set([nB(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.pb(function(n){n.mimeType&&t.add(nB(n.mimeType,e.codecs))}),e.fullMimeTypes=t}function fX(e,t){return e.P=(t=f_(t,"CODECS")||"").length>0,e.P||e.g.hls.disableCodecGuessing||(t=[],e.g.disableVideo||t.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||t.push(e.g.hls.defaultAudioCodec),t=t.join(",")),sW(t.split(/\s*,\s*/))}function fY(e,t,n,i){i=void 0===i||i;for(var r,a,o,s,u=[],l=[],d=new Map,c=S(t),h=c.next(),p={};!h.done;p={ki:void 0},h=c.next()){h=h.value,p.ki=++e.F,p=function(e){return function(){return"shaka://hls-muxed"+e.ki}}(p);var f=i?fw(h,"URI"):f_(h,"URI")||p();p=fw(h,"GROUP-ID"),u.push(f),l.push(p),d.set(p,f),(h=f_(h,"PATHWAY-ID"))&&n.set(p,h)}if(i=l.sort().join(","),h=t[0],t="","subtitles"==(r=fw(r=h,"TYPE").toLowerCase())&&(r=e5),(c=r)==e5)t=f_(h,"CODECS")||"";else for(p=(l=S(l)).next();!p.done;p=l.next())if(p=p.value,e.K.has(p)){t=e.K.get(p);break}if(l=u.sort().join(","),"audio"==c&&i&&(l+=i),e.j.has(l))return e.j.get(l);if(p=e.F++,e.l)for(f=(d=S(d)).next();!f.done;f=d.next()){var g=S(f.value);f=g.next().value,g=g.next().value,(f=n.get(f))&&pe(e.l,p,f,g)}n=f_(h,"LANGUAGE"),d=f_(h,"NAME"),f="YES"==f_(h,"DEFAULT"),g="audio"==c&&(a=f_(a=h,"CHANNELS"))?parseInt(a.split("/")[0],10):null;var m="audio"==c&&!!(o=f_(o=h,"CHANNELS"))&&2==(o=o.split("/")).length&&("JOC"===o[1]||o[1].includes("ATMOS")||o[1].includes("IMSA")),v=f_(h,"CHARACTERISTICS"),y="YES"==f_(h,"FORCED");return h="audio"==c&&(s=f_(s=h,"SAMPLE-RATE"))?parseInt(s,10):null,(u=fQ(e,p,u,t,c,n,f,d,g,null,v,y,h,m)).stream&&(u.stream.groupId=i),e.M.has(i)?e.M.get(i).push(u):e.M.set(i,[u]),e.j.set(l,u),u}function fJ(e,t){var n="video",i=fw(t,"URI"),r=f_(t,"CODECS")||"";if("mjpg"==r&&(n="image"),e.j.has(i))return e.j.get(i);var a=f_(t,"LANGUAGE"),o=f_(t,"NAME"),s=f_(t,"CHARACTERISTICS");
1return n=fQ(e,e.F++,[i],r,n,a,!1,o,null,null,s,!1,null,!1),r=(a=S((r=f_(t,"RESOLUTION"))?r.split("x"):[null,null])).next().value,a=a.next().value,n.stream.width=Number(r)||void 0,n.stream.height=Number(a)||void 0,(t=f_(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.j.set(i,n),n}function fQ(e,t,n,i,r,a,o,s,u,l,d,c,h,p){function f(){return e.l&&n.length>1?pt(e.l,t):v.Af.concat(fC([e.H],n,e.D))}var g=f4(e,i,r,a,o,s,u,l,d,c,h,p);n.some(function(e){return e.startsWith("shaka://hls-muxed")})&&(g.isAudioMuxedInVideo=!0,g.mimeType="video/mp2t",fz(g));var m,v={stream:g,type:r,Af:[],Qc:0,Ec:0,lf:new Map,Ke:!1,Je:!1,Ud:!1,pg:-1,Mb:-1,Nb:-1,R:f},y=null;return g.createSegmentIndex=function(){return y||(g.isAudioMuxedInVideo?(g.segmentIndex=new sT([]),Promise.resolve()):(m=gu(e,v.R(),!0),y=new Promise(function(t){var n,y,b,w,T,x,A,E,k,I,C,M,P,D,R,O,N;t((n=m,L(function(t){switch(t.h){case 1:return y=e6,t.m(2),t.g(n.promise,4);case 4:if(b=t.i,n.aborted)return t.return();if((w=b.uri)!=b.originalUri&&(v.R().includes(w)||v.Af.push(w)),1!=(T=fR(e.ab,b.data)).type)throw new eN(2,4,4017);return x=fW(e,fx(T.ba,"EXT-X-DEFINE"),w),A=!1,(!e.P&&e.g.hls.disableCodecGuessing||e.T&&r==y.xa&&!e.g.hls.disableClosedCaptionsDetection)&&T.segments.length>0&&(e.T=!1,A=!0),E=!e.P&&e.g.hls.disableCodecGuessing,k=gd(e),t.g(f2(e,0,x,T,f,i,r,a,o,s,u,l,d,c,h,p,void 0,A,E),5);case 5:if(I=t.i,n.aborted)return t.return();C=I.stream,f8(e,T),gd(e)&&!k&&f7(e,T),v.Qc=I.Qc,v.Ec=I.Ec,v.Ke=I.Ke,v.Je=I.Je,v.Ud=I.Ud,v.lf=I.lf,v.Mb=I.Mb,v.Nb=I.Nb,g.segmentIndex=C.segmentIndex,g.encrypted=C.encrypted,g.drmInfos=C.drmInfos,g.keyIds=C.keyIds,g.mimeType=C.mimeType,g.bandwidth=g.bandwidth||C.bandwidth,g.codecs=g.codecs||C.codecs,g.closedCaptions=g.closedCaptions||C.closedCaptions,g.width=g.width||C.width,g.height=g.height||C.height,g.hdr=g.hdr||C.hdr,g.colorGamut=g.colorGamut||C.colorGamut,g.frameRate=g.frameRate||C.frameRate,"und"==g.language&&"und"!=C.language&&(g.language=C.language),g.language=g.language||C.language,g.channelsCount=g.channelsCount||C.channelsCount,g.audioSamplingRate=g.audioSamplingRate||C.audioSamplingRate,fz(g),v.type!=y.xa||I.type!=y.ha||e.P&&!nY.includes(g.mimeType)||function(e,t,n){var i=t.stream,r=n.type,a=t.type;if(gd(e)&&(e.o.set(r,e.o.get(a)),e.o.set(a,new Map)),t.type=r,i.type=r,i.codecs=e3(r,n.codecs.split(/\s*,\s*/))||"",fz(i),e.h){for(n=(t=S(e.h.variants)).next();!n.done;n=t.next())n=n.value,"audio"==r&&n.video==i&&(n.video=null,n.audio||(n.audio=i,n.language=i.language));e.h.variants=e.h.variants.filter(function(e){return e.audio||e.video})}}(e,v,C),g.drmInfos.length&&e.i.newDrmInfo(g),M=!1,(!l&&g.closedCaptions||l&&g.closedCaptions&&l.size!=g.closedCaptions.size)&&(M=!0),e.h&&M&&e.i.makeTextStreamsForClosedCaptions(e.h),r==y.Va&&(P=C.segmentIndex.Bb())&&P.$&&(g.mimeType="application/mp4",fz(g)),D=sD(g),g.segmentIndex.pb(function(e){e.$&&(e.$.pd=D)}),function(e){if(!e.h||!e.h.variants.length)return!1;var t=[],n=[];e=S(e.h.variants);for(var i=e.next();!i.done;i=e.next())(i=i.value).video&&t.push(i.video),i.audio&&n.push(i.audio);return(!(t.length>0)||!!t.some(function(e){return e.segmentIndex}))&&(!(n.length>0)||!!n.some(function(e){return e.segmentIndex}))}(e)&&(e.sc?f0(e,[v]):(e.sc=!0,R=Array.from(e.j.values()).filter(function(e){return e.stream.segmentIndex}),f0(e,R),fK(e),(O=e.B)>0&&e.C.ea(O))),gn(e,T.ba,g.type,x,f),e.h&&(e.h.startTime=e.u),t.o(0);break;case 2:if(N=t.l(),g.closeSegmentIndex(),7001===N.code)return t.return();if(!e.i.disableStream(g))throw N;t.j()}})))})))},g.closeSegmentIndex=function(){y&&!g.segmentIndex&&m.abort(),g.segmentIndex&&(g.segmentIndex.release(),g.segmentIndex=null),y=null},v}function f$(e){var t=1/0;e=S(e.j.values());for(var n=e.next();!n.done;n=e.next())(n=n.value).stream.segmentIndex&&"text"!=n.stream.type&&!n.stream.isAudioMuxedInVideo&&(t=Math.min(t,n.Ec));return t}function fZ(e,t){var n=[];t=S(t);for(var i=t.next();!i.done;i=t.next())(i=i.value).segmentIndex&&i.segmentIndex.pb(function(e){n.push(e)});e.m.ae(n)}function f0(e,t){if(!gd(e))for(var n=f$(e),i=S(t),r=i.next();!r.done;r=i.next())r.value.stream.segmentIndex.fd(0,n);fZ(e,t.map(function(e){return e.stream})),n=(i=Array.from(e.j.values()).filter(function(e){return e.stream.segmentIndex})).some(function(e){return"audio"==e.stream.type}),r=i.some(function(e){return"video"==e.stream.type}),i=gd(e)&&!e.cb,n=!gd(e)&&e.cb&&!(n&&r),e.g.hls.ignoreManifestProgramDateTime||i||n?fH(e,t,i):(function(e,t){if(e.ma==1/0){t=S(t);for(var n=t.next();!n.done;n=t.next())null!=(n=n.value.stream.segmentIndex.Bb())&&null!=n.h&&(e.ma=Math.min(e.ma,n.h))}if((t=e.ma)!=1/0){n=S(e.j.values());for(var i=n.next();!i.done;i=n.next())if(!f1(e,(i=i.value).type)){var r=i.stream.segmentIndex;if(null!=r){var a=r.Bb();if(a)if(null==a.h)X("Missing EXT-X-PROGRAM-DATE-TIME for stream",i.R(),"Expect AV sync issues!");else for(fq(e,i,a.h-t-a.startTime),r=(i=S(r)).next();!r.done;r=i.next())r.value.Bh(t)}}}}(e,t),e.g.hls.ignoreManifestProgramDateTimeForTypes.length>0&&fH(e,t))}function f1(e,t){return!!e.g.hls.ignoreManifestProgramDateTime||e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function f2(e,t,n,i,r,a,o,s,u,l,d,c,h,p,f,g,m,v,y){var b,w,T,x,A,E,k,I,C,M,P,D,R,O,N,j,U,B,F,V,H,q,G,K,W,z,X;return v=void 0===v||v,y=void 0===y||y,L(function(t){var Y,J,Q,$,Z,ee,et,en,ei,er,ea,eo,es,eu,el,ed,ec,eh,ep,ef,eg,em,ev,ey,eb,e_,ew,eT,eS,ex,eA,eE;switch(t.h){case 1:if(b=o,T=(w=i.segments||[]).every(function(e){return!!fE(e.ba,"EXT-X-GAP")}),!w.length||T)throw new eN(2,4,4053);if(J=fE((Y=i).ba,"EXT-X-PLAYLIST-TYPE"),Y=fE(Y.ba,"EXT-X-ENDLIST"),Y=J&&"VOD"==J.value||Y,J=J&&"EVENT"==J.value&&!Y,J=!Y&&!J,Y?gc(e,gx):J?gc(e,gE):gc(e,gA),gd(e)&&f9(e,i),x=gd(e)?e.o.get(o):new Map,E=(A=gi(e,i,x,n,r,o)).segments,k=A.bandwidth,D=P=M=C=I=null,!(E.length>
10&&v)){t.A(2);break}return t.g((Q=E,L(function(t){if(1==t.h)return($=sK(e.g.hls.mediaPlaylistFullMimeType),Q.length)?(ee=(Z=go(e,Q)).segment,et=Z.segmentIndex,(en=sY(ee.R()[0]))&&(ei=gm.get(en)))?t.return(sK(ei)):t.g(Promise.all([fG(e,ee.$,0),fG(e,ee,et)]),2):t.return($);if(ea=(er=t.i)[1].mimeType,eo=er[0].data,es=er[1].data,eu="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),el=["audio/mp4","video/mp4","video/iso.segment"],!(ed=ee.$||el.includes(ea))&&oA(eD(es))){var n=es,i=e.g.disableAudio,r=e.g.disableVideo,a=e.g.disableText,o=eD(n),s=new ov().parse(o),u=s.Rd();o=s.Jg();var l=[],d=!1,c=!1;if(!i)switch(u.audio){case"aac":case"aac-loas":s.qb().length&&(l.push("mp4a.40.2"),d=!0);break;case"mp3":s.qb().length&&(l.push("mp4a.40.34"),d=!0);break;case"ac3":s.qb().length&&(l.push("ac-3"),d=!0);break;case"ec3":s.qb().length&&(l.push("ec-3"),d=!0);break;case"opus":s.qb().length&&(l.push("opus"),d=!0)}if(!r)switch(u.video){case"avc":o.codec?l.push(o.codec):l.push("avc1.42E01E"),c=!0;break;case"hvc":o.codec?l.push(o.codec):l.push("hvc1.1.6.L93.90"),c=!0;break;case"av1":l.push("av01.0.01M.08"),c=!0}if(l.length){if(i=d&&!c,r=new Map,c&&!a){for(tf(a=new tp("video/mp2t"),n),c=(n=S(a.g.getStreams())).next();!c.done;c=n.next())c=c.value,r.set(c,c);a.g.clear()}o={type:i?"audio":"video",mimeType:"video/mp2t",codecs:l.join(", "),language:null,height:o.height,width:o.width,channelCount:null,sampleRate:null,closedCaptions:r,le:null,colorGamut:null,frameRate:o.frameRate}}else o=null;if(ec=o)return t.return(ec)}else if((ed||eu.includes(en))&&(eh=function(e,t,n){function i(e){o=e.name;var t=e.reader;t.skip(24);var n=t.Da(),i=t.Da();t.skip(50),p=String(n),h=String(i),e.reader.Ka()&&rS(e)}function r(e){var t=ah(e.reader);f=t.channelCount,g=t.sampleRate,a(e.name)}function a(e){switch(e=e.toLowerCase()){case"avc1":case"avc3":u.push(e+".42E01E"),d=!0;break;case"hev1":case"hvc1":u.push(e+".1.6.L93.90"),d=!0;break;case"dvh1":case"dvhe":u.push(e+".05.04"),d=!0;break;case"vp09":u.push(e+".00.10.08"),d=!0;break;case"av01":u.push(e+".0.01M.08"),d=!0;break;case"mp4a":s.push("mp4a.40.2"),l=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":s.push(e),l=!0;break;case"apac":s.push("apac.31.00"),l=!0}}var o,s=[],u=[],l=!1,d=!1,c=null,h=null,p=null,f=null,g=null,m=null,v=null;if(new rT().box("moov",rS).box("trak",rS).box("mdia",rS).S("mdhd",function(e){c=ad(e.reader,e.version).language}).box("minf",rS).box("stbl",rS).S("stsd",rx).box("mp4a",function(e){var t=ah(e.reader);f=t.channelCount,g=t.sampleRate,e.reader.Ka()?rS(e):a(e.name)}).box("esds",function(e){e=e.reader;for(var t,n,i="mp4a";e.Ka();){t=e.Z();for(var r=e.Z();128&r;)r=e.Z();if(3==t)e.Da(),128&(r=e.Z())&&e.Da(),64&r&&e.skip(e.Z()),32&r&&e.Da();else if(4==t)n=e.Z(),e.skip(12);else if(5==t)break}n&&(i+="."+af(n),5==t&&e.Ka()&&(31==(n=(248&(t=e.Z()))>>3)&&e.Ka()&&(n=32+((7&t)<<3)+((224&e.Z())>>5)),i+="."+n)),s.push(i),l=!0}).box("ac-3",r).box("ec-3",r).box("ac-4",r).box("Opus",r).box("fLaC",r).box("apac",r).box("avc1",i).box("avc3",i).box("hev1",i).box("hvc1",i).box("dva1",i).box("dvav",i).box("dvh1",i).box("dvhe",i).box("vp09",i).box("av01",i).box("avcC",function(e){var t=o||"";switch(o){case"dvav":t="avc3";break;case"dva1":t="avc1"}(e=e.reader).skip(1),e=t+"."+af(e.Z())+af(e.Z())+af(e.Z()),u.push(e),d=!0}).box("hvcC",function(e){var t=o||"";switch(o){case"dvh1":t="hvc1";break;case"dvhe":t="hev1"}var n=e.reader;n.skip(1);var i=["","A","B","C"][(e=n.Z())>>6],r=31&e,a=n.W(),s=(32&e)>>5?"H":"L";e=[n.Z(),n.Z(),n.Z(),n.Z(),n.Z(),n.Z()],n=n.Z();for(var l=0,c=0;c<32&&(l|=1&a,31!=c);c++)l<<=1,a>>=1;for(t=t+"."+i+r+"."+af(l,!0)+"."+s+n,i="",r=e.length;r--;)((s=e[r])||i)&&(i="."+s.toString(16).toUpperCase()+i);t+=i,u.push(t),d=!0}).box("dvcC",function(e){var t=o||"";switch(o){case"hvc1":t="dvh1";break;case"hev1":t="dvhe";break;case"avc1":t="dva1";break;case"avc3":t="dvav";break;case"av01":t="dav1"}var n=e.reader;n.skip(2),e=n.Z(),n=n.Z(),u.push(t+"."+ag(e>>1&127)+"."+ag(e<<5&32|n>>3&31)),d=!0}).box("dvvC",function(e){var t=o||"";switch(o){case"hvc1":t="dvh1";break;case"hev1":t="dvhe";break;case"avc1":t="dva1";break;case"avc3":t="dvav";break;case"av01":t="dav1"}var n=e.reader;n.skip(2),e=n.Z(),n=n.Z(),u.push(t+"."+ag(e>>1&127)+"."+ag(e<<5&32|n>>3&31)),d=!0}).S("vpcC",function(e){var t=o||"",n=e.reader;e=n.Z();var i=n.Z();n=n.Z()>>4&15,u.push(t+"."+ag(e)+"."+ag(i)+"."+ag(n)),d=!0}).box("av1C",function(e){var t=o||"";"dav1"===o&&(t="av01");var n=e.reader;n.skip(1),e=n.Z(),n=n.Z();var i=e>>>5,r=(64&n)>>6;u.push(t+"."+i+"."+ag(31&e)+(n>>>7?"H":"M")+"."+ag(2===i&&r?(32&n)>>5?12:10:r?10:8)+"."+((16&n)>>4)+"."+((8&n)>>3)+((4&n)>>2)+(3&n)+"."+ag(1)+"."+ag(1)+"."+ag(1)+".0"),d=!0}).box("enca",rE).box("encv",rA).box("sinf",rS).box("frma",function(e){a(e=ap(e.reader).codec)}).box("colr",function(e){u=u.map(function(t){if(t.startsWith("av01.")){var n=e.reader,i=n.Oa(),r=n.Ob(4,!1),a=String.fromCharCode(r[0]);if(a+=String.fromCharCode(r[1]),a+=String.fromCharCode(r[2]),"nclx"===(a+=String.fromCharCode(r[3]))){r=n.Da(),a=n.Da();var o=n.Da(),s=n.Z()>>7,u=t.split(".");10==u.length&&(u[6]=ag(r),u[7]=ag(a),u[8]=ag(o),u[9]=String(s),t=u.join("."))}n.seek(i)}return t});var t=function(e){var t=null,n=null,i=e.Ob(4,!1),r=String.fromCharCode(i[0]);if(r+=String.fromCharCode(i[1]),r+=String.fromCharCode(i[2]),"nclx"===(r+=String.fromCharCode(i[3]))){switch(e.Da()){case 1:case 5:case 
16:case 7:t="srgb";break;case 9:t="rec2020";break;case 11:case 12:t="p3"}switch(i=e.Da(),e.Da(),i){case 1:case 6:case 13:case 14:case 15:n="SDR";break;case 16:n="PQ";break;case 18:n="HLG"}}return{colorGamut:t,le:n}}(e.reader),n=t.colorGamut;m=t.le,v=n}).parse(e||t,!0,!0),!s.length&&!u.length)return null;var y=l&&!d,b=new Map;if(d&&!n){n=new tp("video/mp4"),e&&n.init(e);try{tf(n,t);for(var w=S(n.g.getStreams()),T=w.next();!T.done;T=w.next()){var x=T.value;b.set(x,x)}}catch(e){}n.g.clear()}return{type:y?"audio":"video",mimeType:y?"audio/mp4":"video/mp4",codecs:sW(s.concat(u)).join(", "),language:c,height:h,width:p,channelCount:f,sampleRate:g,closedCaptions:b,le:m,colorGamut:v,frameRate:null}}(eo,es,e.g.disableText)))return t.return(eh);return ea?t.return(sK(ea)):t.return($)})),3);case 3:R=t.i,o!=R.type&&gd(e)&&(e.o.set(R.type,e.o.get(o)),e.o.set(o,new Map)),o=R.type,s=R.language,d=R.channelCount,f=R.sampleRate,e.g.disableText||(c=R.closedCaptions),C=R.height,I=R.width,M=R.le,P=R.colorGamut,D=R.frameRate,y&&(m=R.mimeType,a=R.codecs);case 2:if(m){t.A(4);break}return t.g((ep=o,ef=a,eg=E,L(function(t){switch(t.h){case 1:if(em=rc,2==(ev=go(e,eg).segment).status)return t.return(ga(ep));if((e_=sY((eb=ev.R())[0]))&&((ew=gw.get(ep).get(e_))||(ew=gm.get(e_))))return t.return(ew);if(ey=gr(ep,ef))return t.return(ey);return eS=1,ex=rs(eb,e.g.retryParameters),t.m(2),ex.method="HEAD",t.g(gh(e,ex,em,{type:eS}).promise,4);case 4:eT=(eA=t.i).headers["content-type"],t.o(3);break;case 2:if(!(eE=t.l())||1002!=eE.code&&1001!=eE.code){t.A(3);break}return ex.method="GET",e.g.hls.allowRangeRequestsToGuessMimeType&&(ex.headers.Range="bytes=0-0"),t.g(gh(e,ex,em,{type:eS}).promise,6);case 6:eT=(eA=t.i).headers["content-type"];case 3:if(!eT){t.A(7);break}if(!gS.includes(ey=eT.toLowerCase().split(";")[0])){t.A(8);break}
1if(eA.data.byteLength){t.A(9);break}return ex.method="GET",t.g(gh(e,ex,em,{type:eS}).promise,10);case 10:eA=t.i;case 9:oA(eD(eA.data))&&(ey="video/mp2t");case 8:if(!gS.includes(ey))return t.return(ey);case 7:return t.return(ga(ep))}})),5);case 5:m=t.i,o!=e5||a||"application/mp4"!=m||!E[0]||E[0].$||(m="text/vtt");case 4:return"video"==b&&nY.includes(m)&&(o="audio"),t.g(f5(e,i,m,r,n),6);case 6:if(N=(O=t.i).drmInfos,j=O.keyIds,U=O.encrypted,B=O.Nh,U&&!N.length&&!B)throw new eN(2,4,4026);return(F=f4(e,a,o,s,u,l,d,c,h,p,f,g)).encrypted=U&&!B,F.drmInfos=N,F.keyIds=j,F.mimeType=m,k&&(F.bandwidth=k),fz(F),"video"==o&&(I||C||M||P)&&gs(F,I,C,D,M,null,P),gd(e)&&f9(e,i),V=E[0].startTime,H=E[E.length-1].endTime,F.segmentIndex=new sT(E),G=!!(q=fE(i.ba,"EXT-X-SERVER-CONTROL"))&&null!=fb(q,"CAN-SKIP-UNTIL"),K=!!q&&null!=fb(q,"CAN-BLOCK-RELOAD"),z=(W=f3(fk(i.ba,"EXT-X-MEDIA-SEQUENCE",0),E)).Mb,X=W.Nb,t.return({stream:F,type:o,Af:[],R:r,Qc:V,Ec:H,Ke:G,Je:K,Ud:!1,pg:-1,Mb:z,Nb:X,lf:x})}})}function f3(e,t){e=e+t.length-1;var n=-1;if(!t.length)return{Mb:++e,Nb:n};var i=(t=t[t.length-1]).g;return t.g.length?(n=i.length-1,i[i.length-1].isPreload()||(e++,n=0)):(e++,t.o&&(n=0)),{Mb:e,Nb:n}}function f4(e,t,n,i,r,a,o,s,u,l,d,c){var h=gr(n,t)||ga(n),p=[];if(u){u=S(u.split(","));for(var f=u.next();!f.done;f=u.next())p.push(f.value)}return f=void 0,u=null,n==e5?f=p.includes("public.accessibility.transcribes-spoken-dialog")&&p.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":p.includes("public.accessibility.describes-video")&&(u="visually impaired"),p.length||"subtitle"!==f||p.push("subtitle"),f=null,"video"!=n&&(f=a),fz(e={id:e.F++,originalId:a,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:h,codecs:t,kind:n==e5?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:ir(i||"und"),originalLanguage:i,label:f,type:n,primary:r,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:p,forced:l,channelsCount:o,audioSamplingRate:d,spatialAudio:c,closedCaptions:s,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null}),e}function f5(e,t,n,i,r){var a,o,s,u,l,d,c,h,p,f,g,m,v,y,b,w,T,x,A,E,k,I,C,M,P,D,R,O;return L(function(L){switch(L.h){case 1:if(a=new Map,!e.g.ignoreDrmInfo&&t.segments){for(s=(o=S(t.segments)).next();!s.done;s=o.next())if(l=fx((u=s.value).ba,"EXT-X-KEY"),d=null,l.length)for(d=ge(e,t,u.ba,i,r),h=(c=S(l)).next();!h.done;h=c.next())p=h.value,a.set(p,d)}g=f=!1,m=[],v=new Set,b=(y=S(a)).next();case 2:if(b.done){L.A(4);break}if(T=(w=S(b.value)).next().value,x=w.next().value,A=T,E=x,"NONE"==(k=fw(A,"METHOD"))){L.A(3);break}if(f=!0,I=f_(A,"KEYFORMAT")||"identity",C=null,gp(k)){g=!0,L.A(3);break}if("identity"==I)return L.g(gf(e,A,n,i,E,r),11);if(!(M=e.Yb.get(I))){P=null,L.A(9);break}return L.g(M(A,n,E),10);case 10:P=L.i;case 9:C=P,L.A(6);break;case 11:C=L.i;case 6:if(C){if(C.keyIds)for(R=(D=S(C.keyIds)).next();!R.done;R=D.next())O=R.value,v.add(O);m.push(C)}case 3:b=y.next(),L.A(2);break;case 4:return L.return({drmInfos:m,keyIds:v,encrypted:f,Nh:g})}})}function f6(t,n,i,r,a){if(!e.crypto||!e.crypto.subtle)throw Y("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new eN(2,4,4042);var o=0,s=f_(n,"IV","");if(s){var u=eY(s.substr(2));if(16!=u.byteLength)throw new eN(2,4,4048)}else o=fk(i.ba,"EXT-X-MEDIA-SEQUENCE",0);var l=fI(r(),fw(n,"URI"),a),d=l.sort().join("");if(i=n.toString()+"-"+o+"-"+d,!t.ua.has(i)){var c={bitsKey:128,blockCipherMode:"CBC",iv:u,firstMediaSequenceNumber:o};switch(fw(n,"METHOD")){case"AES-256":c.bitsKey=256;break;case"AES-256-CTR":c.bitsKey=256,c.blockCipherMode="CTR"}c.fetchKey=function(){var n,i,r,a;return L(function(o){if(1==o.h)return t.O.has(d)||(n=rs(l,t.g.retryParameters),i=gh(t,n,6).promise,t.O.set(d,i)),o.g(t.O.get(d),2);if(3!=o.h){if(!(r=o.i).data||r.data.byteLength!=c.bitsKey/8)throw new eN(2,4,4049);return a={name:"CTR"==c.blockCipherMode?"AES-CTR":"AES-CBC",length:c.bitsKey},o.g(e.crypto.subtle.importKey("raw",r.data,a,!0,["decrypt"]),3)}c.cryptoKey=o.i,c.fetchKey=void 0,o.j()})},t.ua.set(i,c)}return t.ua.get(i)}function f8(e,t){null==e.u&&(t=fE(t.ba,"EXT-X-START"))&&(e.u=Number(fw(t,"TIME-OFFSET")))}function f9(e,t){var n=1/0,i=t.segments;if(i.length)for(var r=i.length-1;r>=0;){var a=fE(i[r].ba,"EXTINF");if(a){n=fP(a);break}r--}if(!(i=fE(t.ba,"EXT-X-TARGETDURATION")))throw new eN(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),(r=fE(t.ba,"EXT-X-PART-INF"))&&(e.V=Number(fw(r,"PART-TARGET"))),t=fE(t.ba,"EXT-X-SERVER-CONTROL"),e.na&&e.V?(e.B=e.$b?5*e.V<=n?Math.min(e.V,e.B):Math.min(n,e.B):Math.min(e.V,e.B),e.Ra=t?Number(fw(t,"PART-HOLD-BACK")):0):(e.B=Math.min(n,e.B),e.Ja=(n=t?fb(t,"HOLD-BACK"):null)?Number(n.value):0),e.Za=Math.max(i,e.Za)}function f7(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.Ra)n=e.Ra;else if(e.Ja)n=e.Ja;else for(var i=t.segments.length,r=i-Math.min(i,e.g.hls.liveSegmentsDelay);r<i;r++){var a=fE(t.segments[r].ba,"EXTINF");n=a?n+fP(a):n+e.Za}e.u&&e.u<0&&(n=Math.min(-e.u,n),e.u+=n),e.m.Ri(0),e.m.qh(n),e.m.Uc(!1)}function ge(e,t,n,i,r){var a=fE(n,"EXT-X-MAP");if(!a)return null;var o=fw(a,"URI"),s=fI(i(),o,r);if(o=[s.toString(),f_(a,"BYTERANGE","")].join("-"),!e.Aa.has(o)){var u,l,d,c,h,p,f=void 0,g=null,m=!1;n=S(n);for(var v=n.next();!v.done;
1v=n.next())"EXT-X-KEY"==(v=v.value).name?gp(m=fw(v,"METHOD"))&&v.id<a.id?(m=!1,f=f6(e,v,t,i,r)):m="NONE"!=m:"EXT-X-BYTERANGE"==v.name&&v.id<a.id&&(g=v);u=a,l=g,d=f,c=m,h=0,p=null,(u=f_(u,"BYTERANGE"))||!l||(u=l.value),u&&(p=Number((h=u.split("@"))[0]),p=(h=Number(h[1]))+p-1,d&&(l=p+1-h)%16&&(p+=16-l%16)),t=new aq(function(){return s},h,p,null,null,null,d,c),e.Aa.set(o,t)}return e.Aa.get(o)}function gt(e,t){var n=0,i=null;return t&&(t=Number((n=t.split("@"))[0]),i=(n=n[1]?Number(n[1]):e.endByte+1)+t-1),[n,i]}function gn(e,t,n,i,r){if("video"==n||"audio"==n){var a=e.m.m;if(null!=a&&!f1(e,n))for(t=(t=fx(t,"EXT-X-DATERANGE")).filter(function(e){return null!=fb(e,"START-DATE")}).sort(function(e,t){return(e=fw(e,"START-DATE"))<(t=fw(t,"START-DATE"))?-1:+(e>t)}),n=0;n<t.length;n++){var o=t[n];try{var s=tZ(fw(o,"START-DATE"));if(!isNaN(s)){var u=Math.max(0,s-a),l=null,d=f_(o,"END-DATE");if(d){var c=tZ(d);if(!isNaN(c)&&(l=c-a)<0)continue}if(null==l){var h=f_(o,"DURATION")||f_(o,"PLANNED-DURATION");if(h){var p=parseFloat(h);if(isNaN(p)||(l=u+p),s-a+p<0)continue}}var f=f_(o,"CLASS")||"com.apple.quicktime.HLS",g="YES"==f_(o,"END-ON-NEXT");if(null==l&&g){for(var m=n+1;m<t.length;m++)if(f==(f_(t[m],"CLASS")||"com.apple.quicktime.HLS")){var v=tZ(fw(t[m],"START-DATE"));if(!isNaN(v)&&v&&v>s){l=Math.max(0,v-a);break}}if(null==l)continue}m=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var y=[],b=S(o.attributes),w=b.next();!w.done;w=b.next()){var T=w.value;if(!m.includes(T.name)){var x=fM(T.value,i);("X-ASSET-URI"==T.name||"X-ASSET-LIST"==T.name)&&(x=fI(r(),T.value,i)[0]),y.push({key:T.name,description:"",data:x,mimeType:null,pictureType:null})}}y.length>1&&e.i.onMetadata(f,u,l,y)}}catch(e){}}}}function gi(t,n,i,r,a,o){var s=n.segments,u=void 0,l=fk(n.ba,"EXT-X-DISCONTINUITY-SEQUENCE",-1),d=fk(n.ba,"EXT-X-MEDIA-SEQUENCE",0),c=fE(n.ba,"EXT-X-SKIP"),h=c?Number(f_(c,"SKIPPED-SEGMENTS")):0,p=d+h,f=0;gd(t)&&i.has(p)&&(f=i.get(p)),0===f&&t.Fa==gE&&i.size>0&&!i.has(p)&&null!=t.m.i&&(f=t.m.Db());var g=[],m=null;c=[];for(var v=0;v<s.length;v++){var y=s[v],b=0==v?f:m.endTime;p=d+h+v,fE(y.ba,"EXT-X-DISCONTINUITY")&&(l++,m&&m.$&&(m.$.g=b));for(var w=S(y.ba),T=w.next();!T.done;T=w.next())"EXT-X-KEY"==(T=T.value).name&&(u=gp(fw(T,"METHOD"))?f6(t,T,n,a,r):void 0);if(i.set(p,b),w=ge(t,n,y.ba,a,r),b=function(t,n,i,r,a,o,s,u,l){function d(e){if(!(e=sY(e)))return null;var t=gw.get(s).get(e);return t||(t=gm.get(e)),t}var c=r.ba,h=fE(c,"EXTINF"),p=0,f=0,g=null;r.qc.length&&(t.h.isLowLatency=!0);var m=null;if(!t.g.hls.ignoreManifestProgramDateTime){var v=fE(c,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(m=tZ(v.value),t.cb=!0)}var y=az;if(fE(c,"EXT-X-GAP")&&(t.h.gapCount++,y=2),!h){if(0==r.qc.length)throw new eN(2,4,4024,"EXTINF");if(!t.na)return null}v=d(r.g);var b=[],w=!1,T=null,x=!1,A=!1;if(t.na&&r.qc.length){p=n&&e.ReadableStream&&t.g.hls.allowLowLatencyByteRangeOptimization;for(var E=m,k={},I=0;I<r.qc.length;k={Qf:void 0,wf:void 0},I++){var C=r.qc[I],M=0==I?i:b[b.length-1],P=0==I?a:M.endTime,D=Number(f_(C,"DURATION"))||t.V;if(D){var R=P+D,L=0,O=null;if("EXT-X-PRELOAD-HINT"==C.name?(L=(L=f_(C,"BYTERANGE-START"))?Number(L):0,(M=f_(C,"BYTERANGE-LENGTH"))?O=L+Number(M)-1:L&&(O=Number.MAX_SAFE_INTEGER)):(L=(O=S(gt(M,L=f_(C,"BYTERANGE")))).next().value,O=O.next().value),k.wf=f_(C,"URI"),k.wf){M=az,"YES"==f_(C,"GAP")&&(t.h.gapCount++,M=2,x=!0),k.Qf=null;var N=function(e){return function(){return null!=e.Qf||(e.Qf=fI(u(),e.wf,o)),e.Qf}}(k);p&&L>=0&&null!=O&&(T=N,w=!0),P=new aK(P,R,N,L,O,n,0,0,1/0,[],"",null,E,M,l),"EXT-X-PRELOAD-HINT"==C.name&&(P.Sg(),A=!0),"YES"!=f_(C,"INDEPENDENT")&&I>0&&P.od(),(C=v)||(C=b.length?b[0].mimeType:d(k.wf)),C&&(P.mimeType=C,gT.has(C)&&(P.$=null)),b.push(P),E&&(E+=D)}}}}if(h){if(0==(h=fP(h)))return null;p=a+h}else{if(!b.length)return null;p=b[b.length-1].endTime}w&&(x||0!=b[0].startByte?(w=!1,T=null):b=[]),(h=fE(c,"EXT-X-BYTERANGE"))?(f=(g=S(gt(i,h.value))).next().value,g=g.next().value):b.length&&(f=b[0].startByte,g=b[b.length-1].endByte),i="",h=null,"image"==s&&(i="1x1",c=fE(c,"EXT-X-TILES"))&&(i=fw(c,"LAYOUT"),(c=f_(c,"DURATION"))&&(h=Number(c)));var j=null;return n=new aK(a,p,function(){return T?T():(null!=j||(j=fI(u(),r.g,o)),j||[])},f,g,n,0,0,1/0,b,i,h,m,y,l,b.length>0&&!!r.g),v&&(n.mimeType=v,gT.has(v)&&(n.$=null)),w&&(t.$b=!0,n.ri(),A&&n.Sg()),n}(t,w,m,y,b,r,o,a,u)){if((m=fk(y.ba,"EXT-X-BITRATE"))?(c.push({bitrate:m,duration:b.endTime-b.startTime}),b.bandwidth=m):b.endByte?(y=aW(b))&&(y=8*y/(m=b.endTime-b.startTime)/1e3,c.push({bitrate:y,duration:m}),b.bandwidth=y):c.length&&(m=c[c.length-1],m.duration+=b.endTime-b.startTime,b.bandwidth=m.bitrate),b.bandwidth)for(y=(m=S(b.g)).next();!y.done;y=m.next())y.value.bandwidth=b.bandwidth;m=b,b.i=l,f1(t,o)&&null!=t.N&&p<t.N||g.push(b)}}if(n=void 0,c.length&&(n=c.reduce(function(e,t){return e+t.duration},0),n=Math.round(c.reduce(function(e,t){return e+t.bitrate*t.duration},0)/n*1e3)),c=g.some(function(e){return null!=e.h})){for(i={},r=0;r<g.length;i={Re:void 0,Qe:void 0,Ge:void 0,Rc:void 0,Fe:void 0},r++)if(i.Rc=g[r],null==i.Rc.h)for(i.Qe=0,i.Re=r,a=function(e){return function(){var t=g[e.Re];if(t){if(null!=t.h)return t.h+e.Qe;e.Qe-=t.endTime-t.startTime,e.Re+=1}return null}}(i),i.Fe=0,i.Ge=r,s=function(e){return function(){var t=g[e.Ge];
1if(t){if(t!=e.Rc&&(e.Fe+=t.endTime-t.startTime),null!=t.h)return t.h+e.Fe;--e.Ge}return null}}(i);null==i.Rc.h;)i.Rc.h=s(),null!=i.Rc.h||(i.Rc.h=a())}if(c)for(r=(i=S(g)).next();!r.done;r=i.next())for(r=(a=r.value).h,s=(a=S(a.g)).next();!s.done;s=a.next())(s=s.value).h=r,r+=s.endTime-s.startTime;if(i=t.ma,c&&i!=1/0&&!f1(t,o))for(o=(t=S(g)).next();!o.done;o=t.next())o.value.Bh(i);return{segments:g,bandwidth:n}}function gr(e,t){if(e==e5){if("vtt"==t||"wvtt"==t)return"text/vtt";if(t&&""!==t)return"application/mp4"}return"image"!=e||t&&"jpeg"!=t?"audio"==e&&"mp4a.40.34"==t?"audio/mpeg":"mjpg"==t?"application/mp4":null:"image/jpeg"}function ga(e){return e==e5?"text/vtt":gw.get(e).get("mp4")}function go(e,t){e=gd(e)?Math.trunc((t.length-1)/2):0;for(var n=t[e];2==n.Ub()&&e+1<t.length;)n=t[++e];return{segment:n,segmentIndex:e}}function gs(e,t,n,i,r,a,o){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=Number(i)||void 0,e.hdr=r||void 0,e.videoLayout=a||void 0,e.colorGamut=o||void 0)}function gu(e,t,n){return gh(e,rs(t,e.g.retryParameters),0,{type:n?2:3})}function gl(e){var t,n,i,r,a;return L(function(o){switch(o.h){case 1:if(!e.i)return o.return();return o.m(2),t=Date.now(),o.g(e.update(),4);case 4:n=Date.now(),gd(e)&&(i=(n-t)/1e3,e.Vb.sample(1,i),isFinite(r=Math.max(0,(e.g.updatePeriod>0?e.g.updatePeriod:e.B)-K(e.Vb)))?e.C.ea(r):e.C.ea(1)),o.o(3);break;case 2:if(a=o.l(),!e.i)return o.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.i.onError(a),o.return();a.severity=1,e.i.onError(a),e.C.ea(.1);case 3:if(!e.i)return o.return();e.i.onManifestUpdated(),o.j()}})}function gd(e){return e.Fa!=gx}function gc(e,t){e.Fa=t,e.m&&e.m.Uc(!gd(e)),gd(e)||e.C.stop()}function gh(e,t,n,i){if(!e.ka)throw new eN(2,7,7001);return i||(i={}),i.isPreload=e.Xb(),t=e.i.networkingEngine.request(n,t,i),ri(e.ka,t),t}function gp(e){return"AES-128"==e||"AES-256"==e||"AES-256-CTR"==e}function gf(t,n,i,r,a,o){var s,u,l,d,c,h,p,f,g,m;return L(function(v){switch(v.h){case 1:if("video/mp2t"==i)throw new eN(2,4,4040);if("apple"===e.shakaMediaKeysPolyfill)throw new eN(2,4,4041);if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(s=fw(n,"METHOD")))return v.return(null);if((u=fI(r(),fw(n,"URI"),o))[0].startsWith("data:text/plain;base64,")){l=eJ(eX(u[0].split("data:text/plain;base64,").pop())),v.A(2);break}return d=u.sort().join(""),t.ya.has(d)||(c=rs(u,t.g.retryParameters),h=gh(t,c,6).promise,t.ya.set(d,h)),v.g(t.ya.get(d),3);case 3:l=eJ(v.i.data);case 2:if(p="00000000000000000000000000000000",!a){v.A(4);break}return v.g(gg(t,a),5);case 5:(f=v.i)&&(p=f);case 4:return(g=new Map).set(p,l),m="cenc","SAMPLE-AES"==s&&(m="cbcs"),v.return(e1(g,m))}})}function gg(e,t){var n,i,r,a;return L(function(o){var s,u;return 1==o.h?(n=null,e.za.has(t))?(n=e.za.get(t),o.A(2)):(i=sJ(t.R(),t.Bc(),t.zc(),e.g.retryParameters),r=rc,o.g(gh(e,i,r,{type:0}).promise,3)):(2!=o.h&&(a=o.i,t.ge(a.data),s=a.data,u=null,new rT().box("moov",rS).box("trak",rS).box("mdia",rS).box("minf",rS).box("stbl",rS).S("stsd",rx).box("encv",rA).box("enca",rE).box("sinf",rS).box("schi",rS).S("tenc",function(e){(e=e.reader).Z(),e.Z(),e.Z(),e.Z(),u=eJ(e=e.Ob(16,!1))}).parse(s,!0),n=u,e.za.set(t,n)),o.return(n))})}q("shaka.net.DataUriPlugin",fj),fj.parse=fU,ra("data",fU),(p=fF.prototype).configure=function(e,t){var n=this.i&&e.updatePeriod!=this.g.updatePeriod&&e.updatePeriod>=0;this.g=e,t&&(this.Xb=t),this.l&&this.l.configure(this.g),n&&this.h&&this.h.presentationTimeline.U()&&this.C.wb()},p.start=function(e,t){var n,i=this;return L(function(r){var a,o,s,u,l,d,c,h,p,f,g,m,v,y,b,w,T,A,E,k,I,C,M,P,D,R,O,N,j,U,B,F,V,H,q,G,K,W,z,X,Y,J,Q;return 1==r.h?(i.i=t,i.na=t.isLowLatencyMode(),r.g(gu(i,[e]).promise,2)):3!=r.h?(i.H=(n=r.i).uri,r.g((a=n.data,L(function(e){var t,n,r,$,Z,ee,et,en,ei,er,ea,eo,es,eu,el,ed,ec,eh,ep,eg,em,ev,ey,eb,e_,ew,eT,eS,ex,eA,eE,ek,eI,eC,eM,eP,eD,eR,eL,eO,ej,eU,eB,eF,eV,eH,eq,eG,eK,eW;switch(e.h){case 1:if(o=e6,u=fx((s=fR(i.ab,a)).ba,"EXT-X-DEFINE"),l=[],d=[],c=[],i.m=new o9(null,0),i.m.Uc(!0),h=function(){return[i.H]},p=null,f=new Map,i.h={presentationTimeline:i.m,variants:l,textStreams:d,imageStreams:c,offlineSessionIds:[],sequenceMode:i.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:i.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:i.u},1==s.type)return i.T=!1,f=fW(i,fx(s.ba,"EXT-X-DEFINE"),i.H),p=o.xa,V="",H=new Map,e.g(f2(i,i.F++,f,s,h,"",p,V,!0,"Media Playlist",null,H,null,!1,null,!1),7);return function(e,t){var n=new ef(e.H).g;t=S(t);for(var i=t.next();!i.done;i=t.next()){var r=i.value;i=f_(r,"NAME");var a=f_(r,"VALUE");r=f_(r,"QUERYPARAM"),i&&a&&(e.D.has(i)||e.D.set(i,a)),r&&(i=n.get(r)[0])&&!e.D.has(i)&&e.D.set(r,i)}}(i,u),g=fx(s.ba,"EXT-X-MEDIA"),m=fx(s.ba,"EXT-X-STREAM-INF"),v=fx(s.ba,"EXT-X-IMAGE-STREAM-INF"),y=fx(s.ba,"EXT-X-I-FRAME-STREAM-INF"),b=fx(s.ba,"EXT-X-SESSION-KEY"),w=fx(s.ba,"EXT-X-SESSION-DATA"),T=fx(s.ba,"EXT-X-CONTENT-STEERING"),function(e,t){t=S(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=f_(i,"DATA-ID");n=f_(i,"URI");var a=f_(i,"LANGUAGE");i=f_(i,"VALUE"),r=new Map().set("id",r),n&&r.set("uri",fI([e.H],n,e.D)[0]),a&&r.set("language",a),i&&r.set("value",i),n=new i9("sessiondata",r),e.i&&e.i.onEvent(n)}}(i,w),e.g(L(function(e){if(!i.i||!i.g)return e.return();for(r=(n=S(T)).next();!r.done;r=n.next())if(Z=f_($=r.value,"PATHWAY-ID"),ee=f_($,"SERVER-URI"),Z&&ee){i.l=new h9(i.i),i.l.configure(i.g),i.l.i=[i.H],i.l.setManifestType("HLS"),i.l.h=Z,t=h7(i.l,ee);break}return e.g(t,0)}),4);case 4:if(!i.g.ignoreSupplementalCodecs){for(A=[],k=(E=S(m)).next(),I={};!k.done;I={$i:void 0},k=E.next())(M=f_(C=k.value,"SUPPLEMENTAL-CODECS"))&&(I.$i=M.split(/\s*,\s*/).map(function(e){return e.split("/")[0]}),P=C.attributes.map(function(e){return function(t){var n=t.name,i=t.value;return"CODECS"==n&&(i=e.$i.join(","),(t=t.value.split(",")).length>1&&(t=e3("audio",t))&&(i+=","+t)),new fS(n,i)}}(I)),A.push(new fv(C.id,C.name,P,null)));for(m.push.apply(m,x(A)),D=[],O=(R=S(y)).next(),N={};!O.done;N={aj:void 0},O=R.next())(U=f_(j=O.value,"SUPPLEMENTAL-CODECS"))&&(N.aj=U.split(/\s*,\s*/).map(function(e){return e.split("/")[0]}),B=j.attributes.map(function(e){return function(t){var n=t.name;return t=t.value,"CODECS"==n&&(t=e.aj.join(",")),new fS(n,t)}}(N)),D.push(new fv(j.id,j.name,B,null)));y.push.apply(y,x(D))}return function(e,t){t=S(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=f_(i,"AUDIO");n=f_(i,"VIDEO");var a=f_(i,"SUBTITLES");if(i=fX(e,i),a){var o=e3(e5,i);e.K.set(a,o),tS(i,o)}r&&((a=e3("audio",i))||(a=e.g.hls.defaultAudioCodec),e.K.set(r,a)),n&&((r=e3("video",i))||(r=e.g.hls.defaultVideoCodec),e.K.set(n,r))}}(i,m),function(e,t){e.T=0==(t=fA(t,"CLOSED-CAPTIONS")).length,t=S(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=f_(i,"LANGUAGE");n=ir(r||"und"),r||(r=f_(i,"NAME"))&&(n=r),r=fw(i,"GROUP-ID"),i=fw(i,"INSTREAM-ID").replace("SERVICE","svc"),e.J.get(r)||e.J.set(r,new Map),e.J.get(r).set(i,n)}}(i,g),F=y.map(function(e){return"video"!==(e=fJ(i,e)).stream.type?null:e.stream}).filter(function(e){return e}),e.g((et=m,en=b,ei=g,er=h,ea=i.D,L(function(e){switch(e.h){case 1:if(eo=[],es=new Set,i.g.ignoreDrmInfo||!(en.length>0)){e.A(2);break}el=(eu=S(en)).next();case 3:if(el.done){e.A(2);break}if(ec=fw(ed=el.value,"METHOD"),eh=f_(ed,"KEYFORMAT")||"identity",ep=null,"NONE"==ec){e.A(4);break}
1if(gp(ec)){em=(eg=fI(er(),fw(ed,"URI"),ea)).sort().join(""),i.O.has(em)||(ev=rs(eg,i.g.retryParameters),ey=gh(i,ev,6).promise,i.O.set(em,ey)),e.A(4);break}if("identity"==eh)return e.g(gf(i,ed,"",er,null,ea),12);if(!(eb=i.Yb.get(eh))){e_=null,e.A(10);break}return e.g(eb(ed,"",null),11);case 11:e_=e.i;case 10:ep=e_,e.A(6);break;case 12:ep=e.i;case 6:if(ep){if(ep.keyIds)for(eT=(ew=S(ep.keyIds)).next();!eT.done;eT=ew.next())eS=eT.value,es.add(eS);eo.push(ep)}case 4:el=eu.next(),e.A(3);break;case 2:for(ex={},eE=(eA=S(et)).next();!eE.done;eE=eA.next())ex[eI=fy(ek=eE.value,!i.l)]?ex[eI].push(ek):ex[eI]=[ek];for(eM in eC=[],ex)eR=f_(eD=(eP=ex[eM])[0],"FRAME-RATE"),eL=Number(fw(eD,"BANDWIDTH"))||Number(f_(eD,"AVERAGE-BANDWIDTH")),eU=(ej=S((eO=f_(eD,"RESOLUTION"))?eO.split("x"):[null,null])).next().value,eB=ej.next().value,eF=f_(eD,"VIDEO-RANGE"),(eV=f_(eD,"REQ-VIDEO-LAYOUT"))&&eV.includes(",")&&(eV=eV.split(",").filter(function(e){return"CH-STEREO"==e||"CH-MONO"==e})[0]),eV=eV||"CH-MONO",eH=function(e,t,n){for(var i={audio:[],video:[]},r=new Map,a=[],o=!1,s=!1,u=S(t),l=u.next();!l.done;l=u.next()){var d=l.value;l=f_(d,"AUDIO");var c=f_(d,"VIDEO"),h=l||c;h&&(a.includes(h)||a.push(h),(d=f_(d,"PATHWAY-ID"))&&r.set(h,d),l?o=!0:c&&(s=!0))}a.length&&n.length&&function(e,t,n){t=t.filter(function(e){var t=f_(e,"URI")||"";return"SUBTITLES"!=(e=f_(e,"TYPE"))&&(""!=t||"AUDIO"==e)});var i={};t=S(t);for(var r=t.next();!r.done;r=t.next()){var a=fy(r=r.value,!e.l);i[a]?i[a].push(r):i[a]=[r]}for(var o in i)fY(e,i[o],n,!1)}(e,n=n.filter(function(e){return a.includes(fw(e,"GROUP-ID"))}),r),n=(r=a.sort().join(","))&&e.M.has(r)?e.M.get(r):[],o?i.audio.push.apply(i.audio,x(n)):s&&i.video.push.apply(i.video,x(n)),s=!1;var p=t.map(function(e){return fw(e,"URI")});return o=i.audio.find(function(e){return e&&e.R().find(function(e){return p.includes(e)})}),u=e3("video",n=fX(e,t[0])),(l=e3("audio",n))&&!u?(o="audio",s=i.audio.length>0&&!i.audio.some(function(e){return e.stream.isAudioMuxedInVideo})):!i.audio.length&&!i.video.length&&l&&u?(o="video",n=[[u,l].join()]):i.audio.length&&o?(o="audio",s=!0):o=i.video.length&&!i.audio.length?"audio":"video",s||(e=function(e,t,n,i){for(var r=e.F++,a=[],o=S(t),s=o.next();!s.done;s=o.next()){var u=s.value;s=fw(u,"URI"),u=f_(u,"PATHWAY-ID"),e.l&&u&&pe(e.l,r,u,s),a.push(s)}if(o=a.sort().join(",")+n.sort().join(","),e.j.has(o))return e.j.get(o);s=a.join(",");e:{if(t=f_(t[0],"CLOSED-CAPTIONS"),"video"==i){if(e.g.disableText){e.T=!1,t=null;break e}if(t){if("NONE"!=t){t=e.J.get(t);break e}e.T=!1}else if(!t&&e.J.size)for(t=(t=S(e.J.keys())).next();!t.done;t=t.next()){t=e.J.get(t.value);break e}}t=null}return i=fQ(e,r,a,n=e2(i,n),i,null,!1,s,null,t,null,!1,null,!1),e.j.set(o,i),i}(e,t,n,o),r&&(e.stream.groupId=r),"audio"==e.stream.type&&"audio"===o&&i.audio.some(function(e){return e.stream.isAudioMuxedInVideo})&&(t=i.audio[0].stream,e.stream.language=t.language,e.stream.channelsCount=t.channelsCount,e.stream.label=t.label,e.stream.audioSamplingRate=t.audioSamplingRate,e.stream.originalId=t.originalId,e.stream.originalLanguage=t.originalLanguage),i[e.stream.type]=[e]),i}(i,eP,ei),eC.push.apply(eC,x(function(e,t,n,i,r,a,o,s,u,l,d,c){for(var h=S(n),p=h.next();!p.done;p=h.next())gs(p.value.stream,r,a,o,s,u,null);for(r=e.g.disableVideo,(!n.length||r)&&(n=[null]),r&&(t=t.filter(function(e){return!e.stream.isAudioMuxedInVideo})),r=e.g.disableAudio,(!t.length||r)&&(t=[null]),r=[],a=(t=S(t)).next();!a.done;a=t.next())for(a=a.value,s=(o=S(n)).next();!s.done;s=o.next()){var f=s.value;(s=a?a.stream:null)&&(s.drmInfos=l,s.keyIds=d),(u=f?f.stream:null)&&(u.drmInfos=l,u.keyIds=d,e.g.disableIFrames||iM(u,c)),u&&!s&&(u.bandwidth=i),!u&&s&&(s.bandwidth=i),h=a?a.stream.drmInfos:null,p=f?f.stream.drmInfos:null,f=f?f.R().sort().join(","):"";var g=a?a.R().sort().join(","):"",m=[];s&&s.codecs&&m.push(s.codecs),u&&u.codecs&&m.push(u.codecs),f=[f,g,m.sort()].join("-"),s&&u&&!iH(h,p)||e.eb.has(f)||(s={id:e.F++,language:s?s.language:"und",disabledUntilTime:0,primary:!!s&&s.primary||!!u&&u.primary,audio:s,video:u,bandwidth:i,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},r.push(s),e.eb.add(f))}return r}
1(i,eH.audio,eH.video,eL,eU,eB,eR,eF,eV,eo,es,F)));return e.return(eC.filter(function(e){return null!=e}))}})),5);case 5:return l=e.i,d=function(e,t){var n=fA(t,"SUBTITLES"),i={};t=S(n);for(var r=t.next();!r.done;r=t.next()){var a=fy(r=r.value,!e.l);i[a]?i[a].push(r):i[a]=[r]}if(t=[],!e.g.disableText)for(var o in i)try{t.push(fY(e,i[o],new Map).stream)}catch(t){if(!e.g.hls.ignoreTextStreamFailures)throw t}for(n=(o=S(n)).next();!n.done;n=o.next())if(i=fw(n.value,"GROUP-ID"),(n=e.K.get(i))&&(i=e.M.get(i)))for(r=(i=S(i)).next();!r.done;r=i.next())(r=r.value).stream.codecs=n,r.stream.mimeType=gr(e5,n)||ga(e5),fz(r.stream);return t.filter(function(e){return e})}(i,g),e.g((eq=v,eG=y,L(function(e){return 1==e.h?(eK=eq.map(function(e){var t,n;return L(function(r){if(1==r.h){var a,o,s,u,l,d,c,h,p;return i.g.disableThumbnails?r.return(null):(r.m(2),r.g(L(function(t){return 1==t.h?(a=fw(e,"URI"),o=f_(e,"CODECS","jpeg")||"",i.j.has(a))?t.return(i.j.get(a)):(s=f_(e,"LANGUAGE"),u=f_(e,"NAME"),l=f_(e,"CHARACTERISTICS"),d=fQ(i,i.F++,[a],o,"image",s,!1,u,null,null,l,!1,null,!1),(c=f_(e,"RESOLUTION"))?t.g(d.stream.createSegmentIndex(),3):t.A(2)):(2!=t.h&&((h=d.stream.segmentIndex.Bb().tilesLayout)&&(d.stream.width=Number(c.split("x")[0])*Number(h.split("x")[0]),d.stream.height=Number(c.split("x")[1])*Number(h.split("x")[1])),d.stream.closeSegmentIndex()),(p=f_(e,"BANDWIDTH"))&&(d.stream.bandwidth=Number(p)),i.j.set(a,d),t.return(d))}),4))}if(2!=r.h)return t=r.i,r.return(t.stream);if(n=r.l(),i.g.hls.ignoreImageStreamFailures)return r.return(null);throw n})}).concat(eG.map(function(e){if(i.g.disableThumbnails)return null;try{var t=fJ(i,e);return"image"!==t.stream.type?null:t.stream}catch(e){if(i.g.hls.ignoreImageStreamFailures)return null;throw e}})),e.g(Promise.all(eK),2)):(eW=e.i,e.return(eW.filter(function(e){return e})))})),6);case 6:c=e.i,e.A(3);break;case 7:q=e.i,i.j.set(i.H,q),q.stream&&(G=sD(q.stream),q.stream.segmentIndex.pb(function(e){e.$&&(e.$.pd=G)})),p=q.stream.type,K=!0,i.g.disableAudio&&"audio"==q.type?K=!1:i.g.disableVideo&&"video"==q.type&&!q.stream.codecs.includes(",")&&(K=!1),K&&l.push({id:0,language:ir(V||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==q.type?q.stream:null,video:"video"==q.type?q.stream:null,bandwidth:q.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!i.i)throw new eN(2,7,7001);if(f8(i,s),1==s.type&&(gd(i)&&(f7(i,s),W=i.B,i.C.ea(W)),z=Array.from(i.j.values()),f0(i,z),fK(i),gn(i,s.ba,p,f,h)),i.h.variants=l,i.h.textStreams=d,i.h.imageStreams=c,i.h.startTime=i.u,i.P||!i.g.hls.disableCodecGuessing){e.A(8);break}for(X=[],J=(Y=S(i.h.variants)).next();!J.done;J=Y.next())(Q=J.value).audio&&""===Q.audio.codecs&&X.push(Q.audio.createSegmentIndex()),Q.video&&""===Q.video.codecs&&X.push(Q.video.createSegmentIndex());return e.g(Promise.all(X),8);case 8:i.i.makeTextStreamsForClosedCaptions(i.h),e.j()}})),3)):r.return(i.h)})},p.stop=function(){this.C&&(this.C.stop(),this.C=null);var e=[];return this.ka&&(e.push(this.ka.destroy()),this.ka=null),this.g=this.i=null,this.eb.clear(),this.h=null,this.j.clear(),this.M.clear(),this.K.clear(),this.D.clear(),this.Aa.clear(),this.ua.clear(),this.O.clear(),this.ya.clear(),this.za.clear(),this.I.clear(),this.l&&this.l.destroy(),this.Y&&(this.Y.release(),this.Y=null),Promise.all(e)},p.update=function(){var e,t,n,i,r,a,o,s,u,l=this;return L(function(d){if(1==d.h){if(!gd(l)||(e=[],0===(t=Array.from(l.j.values()).filter(function(e){return!e.stream.isAudioMuxedInVideo&&e.stream.segmentIndex})).length))return d.return();for(l.B=1/0,l.h.gapCount=0,i=(n=S(t)).next();!i.done;i=n.next())r=i.value,e.push(function(e,t){var n,i,r,a,o,s,u,l,d,c,h,p,f,g,m,v,y,b,w,T,A,E,k,I,C,M,P,D,R,O,N,j;return L(function(L){switch(L.h){case 1:if(t.stream.isAudioMuxedInVideo)return L.return();for(n=[],r=(i=S(t.R())).next();!r.done;r=i.next())o=(a=new ef(r.value)).g,t.Je&&(t.Mb>=0&&o.add("_HLS_msn",String(t.Mb)),t.Nb>=0&&o.add("_HLS_part",String(t.Nb))),t.Ke&&o.add("_HLS_skip","YES"),n.push(a.toString());return L.m(2),L.g(gu(e,n,!0).promise,4);case 4:s=L.i,L.o(3);break;case 2:throw u=L.l(),e.i&&e.i.disableStream(t.stream),u;
1case 3:if(!t.stream.segmentIndex)return L.return();if(1!=(l=fR(e.ab,s.data)).type)throw new eN(2,4,4017);return(d=s.uri)==s.originalUri||t.R().includes(d)||t.Af.push(d),c=fW(e,fx(l.ba,"EXT-X-DEFINE"),d),h=t.stream,p=fV(e,t),L.g(f5(e,l,h.mimeType,t.R,c),5);case 5:var U;for(g=(f=L.i).keyIds,m=f.drmInfos,v=f.encrypted,y=f.Nh,h.encrypted||!v||y||(h.encrypted=!0),U=h.keyIds,U.size===g.size&&[].concat(x(U)).every(function(e){return g.has(e)})||(h.keyIds=g,h.drmInfos=m,e.i.newDrmInfo(h)),w=(b=gi(e,l,p,c,t.R,t.type)).segments,(T=b.bandwidth)&&(h.bandwidth=T),A=sD(h),k=(E=S(w)).next();!k.done;k=E.next())(I=k.value).$&&(I.$.pd=A);h.segmentIndex.Zd(w,e.m.Db()),w.length&&(C=fk(l.ba,"EXT-X-MEDIA-SEQUENCE",0),P=(M=fE(l.ba,"EXT-X-SKIP"))?Number(f_(M,"SKIPPED-SEGMENTS")):0,R=(D=f3(C,w)).Mb,O=D.Nb,t.Mb=R+P,t.Nb=O,N=p.get(C),h.segmentIndex.Sa(N)),(j=h.segmentIndex.Bb())&&(t.Qc=j.startTime,t.Ec=w[w.length-1].endTime),fE(l.ba,"EXT-X-ENDLIST")&&(t.Ud=!0),f9(e,l),gn(e,l.ba,h.type,c,t.R),L.j()}})}(l,r));return d.g(Promise.all(e),2)}for(fZ(l,t.map(function(e){return e.stream})),a=t.some(function(e){return 0==e.Ud}),t.length&&!a&&(gc(l,gx),fK(l)),a&&fK(l),s=(o=S(t)).next();!s.done;s=o.next())(u=s.value).stream.isAudioMuxedInVideo||!u.stream.segmentIndex||u.stream.segmentIndex.Bb()||l.i.disableStream(u.stream);d.j()})},p.onExpirationUpdated=function(){},p.onInitialVariantChosen=function(){},p.banLocation=function(e){this.l&&this.l.banLocation(e)},p.setMediaElement=function(e){this.ia=e},q("shaka.hls.HlsParser",fF);
1var gm=new Map().set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),gv=new Map().set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),gy=new Map().set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts","video/mp2t").set("tsv","video/mp2t"),gb=new Map().set("mp4","application/mp4").set("m4s","application/mp4").set("m4i","application/mp4").set("m4f","application/mp4").set("cmft","application/mp4").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml"),g_=new Map().set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),gw=new Map().set("audio",gv).set("video",gy).set("text",gb).set("image",g_),gT=new Set(["video/mp2t"].concat(x(nY))),gS=["application/octet-stream","binary/octet-stream"],gx="VOD",gA="EVENT",gE="LIVE";function gk(e){return hP(e)}tu("application/x-mpegurl",function(){return new fF}),tu("application/vnd.apple.mpegurl",function(){return new fF}),tu("audio/x-mpegurl",function(){return new fF});var gI=new Map().set("com.microsoft.playready",gk).set("com.microsoft.playready.recommendation",gk).set("com.microsoft.playready.software",gk).set("com.microsoft.playready.hardware",gk);function gC(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.u=1,this.i=null,this.D=new G(5),this.o=new n4(function(){var t;L(function(n){switch(n.h){case 1:return n.m(2),n.g(gM(e),4);case 4:n.o(3);break;case 2:t=n.l(),e.h&&(t.severity=1,e.h.onError(t));case 3:if(!e.h)return n.return();n.j()}})}),this.C=new rn,this.m=new Map,this.B=function(){return!1}}function gM(e){var t,n,i,r,a,o;return L(function(s){if(1==s.h)return t=rs(e.l,e.g.retryParameters),n=e.h.networkingEngine,i=Date.now(),r=n.request(0,t,{type:5,isPreload:e.B()}),ri(e.C,r),s.g(r.promise,2);if(a=s.i,!e.h)return s.return();a.uri&&!e.l.includes(a.uri)&&e.l.unshift(a.uri);var u=a.uri,l=a.data,d=e.g.mss.manifestPreprocessor;if(d!=uI){if(el("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead."),!(l=pj(l,"SmoothStreamingMedia")))throw new eN(2,4,4046,u);d(l),l=eV(l.outerHTML)}var c=tU(l,"SmoothStreamingMedia");if(!c)throw new eN(2,4,4046,u);if((u=e.g.mss.manifestPreprocessorTXml)!=uC&&u(c),e.i||(e.i=new o9(null,0)),u=tY(c,"IsLive",t6,!1))throw new eN(2,4,4047);e.i.Uc(!u),d=tY(c,"TimeScale",t4,1e7),l=tY(c,"DVRWindowLength",t4),u&&(0===l||isNaN(l))&&(l=1/0);var h=tY(c,"CanSeek",t6,!1);for(0===l&&h&&(l=1/0),h=null,l&&l>0&&(h=l/d),u&&!isNaN(e.g.availabilityWindowOverride)&&(h=e.g.availabilityWindowOverride),null!=h||(h=1/0),e.i.If(h),l=tY(c,"Duration",t4,1/0),u||e.i.ub(l/d),u={variants:[],textStreams:[],timescale:d,duration:l/d},h=tq(c,"Protection"),d=e.g.mss.keySystemsBySystemId,l=[],p=(h=S(h)).next();!p.done;p=h.next())l=l.concat(tq(p.value,"ProtectionHeader"));if(l.length){for(p=0,h=[];p<l.length;p++){var p,f,g=l[p],m=g.attributes.SystemID.toLowerCase(),v=d[m];if(v){e:{if(f=hM(g)){f=S(tW(f,"DATA"));for(var y=f.next();!y.done;y=f.next())if(y=tz(y.value,"KID")){f=eJ(f=new Uint8Array([(f=eX(tG(y)))[3],f[2],f[1],f[0],f[5],f[4],f[7],f[6]].concat(x(f.slice(8)))));break e}}f=null}m=e0(v,"cenc",m=[{initData:rL(y=eX(tG(g)),m=eY(m.replace(/-/g,"")),new Set,0),initDataType:"cenc",keyId:f}]),f&&m.keyIds.add(f),(v=gI.get(v))&&(m.licenseServerUri=v(g)),h.push(m)}}d=h}else d=[];for(p=d,h=[],d=[],l=[],g=(c=S(c=tq(c,"StreamIndex"))).next();!g.done;g=c.next()){v=tq(g=g.value,"QualityLevel"),m=u.timescale,f=u.duration,y=tq(g,"c");for(var b=[],w=0,T=0;T<y.length;++T){var A=y[T],E=y[T+1],k=tY(A,"t",t4),I=tY(A,"d",t4);if(A=tY(A,"r",t2),!I)break;if(k=null!=k?k:w,(A=A||0)&&A--,A<0)if(E){if(null==(E=tY(E,"t",t4))||k>=E)break;A=Math.ceil((E-k)/I)-1}else{if(f==1/0||k/m>=f)break;A=Math.ceil((f*m-k)/I)-1}for(E=0;E<=A;++E)w=k+I,b.push({start:k/m,end:w/m,Dd:k}),k=w}for(m=b,f=(v=S(v)).next();!f.done;f=v.next())(f=function(e,t,n,i,r,a){var o=t.attributes.Type;if("audio"!==o&&"video"!==o&&"text"!==o)return Y("Ignoring unrecognized type:",o),null;var s=t.attributes.Language,u=e.u++,l=tY(n,"Bitrate",t3),d=tY(n,"MaxWidth",t3),c=tY(n,"MaxHeight",t3),h=tY(n,"Channels",t3),p=tY(n,"SamplingRate",t3),f=a.duration;i.length&&(f=i[i.length-1].end-i[0].start);var g=e.i.getDuration();e.i.ub(Math.min(f,g)),(g=t.attributes.Name)&&(g+=n.attributes.Index),g||(g=String(u));var m={id:u,originalId:g,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:d||void 0,height:c||void 0,kind:"",encrypted:r.length>0,drmInfos:r,keyIds:new Set,language:ir(s||"und"),originalLanguage:s,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:h,audioSamplingRate:p,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:f,timescale:a.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if((r=t.attributes.Subtype)&&((r=gD.get(r))&&m.roles.push(r),"main"===r&&(m.primary=!0)),(null===(r=n.attributes.FourCC)||""===r)&&(r=t.attributes.FourCC),!r){if("audio"===o)r="AAC";else if("video"===o)return Y('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null}if(!gP.includes(r.toUpperCase()))return Y("Codec not supported:",r),null;
1switch(n=function(e,t,n,i){if(e=e.attributes.CodecPrivateData)return e;if("audio"!==t)return null;t=i.channelsCount||2;var r={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12};return(i=r[e=i.audioSamplingRate||44100],"AACH"===n)?(n=new Uint8Array(4),e=r[2*e],n[0]=40|i>>1,n[1]=i<<7|t<<3|e>>1,n[2]=e<<7|8,n[3]=0,(t=new Uint16Array(2))[0]=(n[0]<<8)+n[1],t[1]=(n[2]<<8)+n[3],t[0].toString(16)+t[1].toString(16)):((n=new Uint8Array(2))[0]=16|i>>1,n[1]=i<<7|t<<3,(t=new Uint16Array(1))[0]=(n[0]<<8)+n[1],t[0].toString(16))}(n,o,r,m),m.mssPrivateData.codecPrivateData=n,o){case"audio":if(!n)return Y("Quality unsupported without CodecPrivateData",o),null;m.type="audio",m.mimeType="mss/audio/mp4",m.codecs=function(e,t){var n=0;return"AACH"===e&&(n=5),t?0===n&&(n=(248&parseInt(t.substr(0,2),16))>>3):(n=2,"AACH"===e&&(n=5)),"mp4a.40."+n}(r,n);break;case"video":if(!n)return Y("Quality unsupported without CodecPrivateData",o),null;m.type="video",m.mimeType="mss/video/mp4",m.codecs=function(e){var t=/00000001[0-9]7/.exec(e);return t.length&&e?"avc1."+e.substr(e.indexOf(t[0])+10,6):""}(n);break;case"text":m.type=e5,m.mimeType="application/mp4",("TTML"===r||"DFXP"===r)&&(m.codecs="stpp")}return m.fullMimeTypes.add(nB(m.mimeType,m.codecs)),m.createSegmentIndex=function(){if(m.segmentIndex)return Promise.resolve();if(e.m.has(m.id))var n=e.m.get(m.id);else n=[],"video"==m.type&&(n=m.mssPrivateData.codecPrivateData.split("00000001").slice(1)),n=av(new am([n={id:m.id,type:m.type,codecs:m.codecs,encrypted:m.encrypted,timescale:m.mssPrivateData.timescale,duration:m.mssPrivateData.duration,yb:n,Ia:new Uint8Array([]),Qa:new Uint8Array([]),Ya:0,$a:0,data:null,stream:m}])),e.m.set(m.id,n);return n=function(e,t,n,i,r){var a=i.attributes.Url.replace("{bitrate}",String(n.bandwidth));i=[],r=S(r);for(var o=r.next(),s={};!o.done;s={Lf:void 0},o=r.next())s.Lf=o.value,i.push(new aK(s.Lf.start,s.Lf.end,function(t){return function(){return eZ(e.l,[a.replace("{start time}",String(t.Lf.Dd))])}}(s),0,null,t,0,0,n.mssPrivateData.duration));return i}(e,new aq(function(){return[]},0,null,sD(m),m.mssPrivateData.timescale,n,null,m.encrypted),m,t,i),m.segmentIndex=new sT(n),Promise.resolve()},m.closeSegmentIndex=function(){m.segmentIndex&&(m.segmentIndex.release(),m.segmentIndex=null)},m}(e,g,f.value,m,p,u))&&("audio"!=f.type||e.g.disableAudio?"video"!=f.type||e.g.disableVideo?f.type!=e5||e.g.disableText||l.push(f):d.push(f):h.push(f))}for(c=[],p=(h=S(h.length>0?h:[null])).next();!p.done;p=h.next())for(p=p.value,b=(g=S(d.length>0?d:[null])).next();!b.done;b=g.next())m=(v=c).push,f=e,y=p,b=b.value,T=0,y&&y.bandwidth&&y.bandwidth>0&&(T+=y.bandwidth),b&&b.bandwidth&&b.bandwidth>0&&(T+=b.bandwidth),f={id:f.u++,language:y?y.language:"und",disabledUntilTime:0,primary:!!y&&y.primary||!!b&&b.primary,audio:y,video:b,bandwidth:T,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},m.call(v,f);u.variants=c,u.textStreams=l,e.j?(e.j.variants=u.variants,e.j.textStreams=u.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:u.variants,textStreams:u.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:e.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},e.i.kf()),Promise.resolve(),o=(Date.now()-i)/1e3,e.D.sample(1,o),s.j()})}(p=gC.prototype).configure=function(e,t){this.g=e,t&&(this.B=t)},p.start=function(e,t){var n=this;return L(function(i){if(1==i.h)return n.l=[e],n.h=t,i.g(gM(n),2);if(!n.h)throw new eN(2,7,7001);return i.return(n.j)})},p.stop=function(){return this.g=this.h=null,this.l=[],this.j=null,null!=this.o&&(this.o.stop(),this.o=null),this.m.clear(),this.C.destroy()},p.update=function(){var e,t=this;return L(function(n){return 1==n.h?(n.m(2),n.g(gM(t),4)):2!=n.h?n.o(0):(e=n.l(),t.h&&e)?void(t.h.onError(e),n.j()):n.return()})},p.onExpirationUpdated=function(){},p.onInitialVariantChosen=function(){},p.banLocation=function(){},p.setMediaElement=function(){},q("shaka.mss.MssParser",gC);var gP="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),gD=new Map().set("CAPT","main").set("SUBT","alternate").set("DESC","main");function gR(e,t,n,i,r,a,o){if(n>=200&&n<=299&&202!=n||304==n)return{uri:r||i,originalUri:i,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"],originalRequest:a};a=null;try{a=eF(t)}catch(e){}throw new eN(401==n||403==n?2:1,1,1001,i,n,a,e,o,r||i)}function gL(){}function gO(e,t,n,i,r,a){var o,s,u,l,d,c,h,p,f,g,m,v,y,b,w,T,S,x,A=new gF;
1try{rv(t.headers).forEach(function(e,t){A.append(t,e)})}catch(t){return i3(new eN(1,1,1002,e,t,n))}var E=new gU,k={Rh:!1,ej:!1};if(e=new i2((o=e,s=t,u={body:t.body||void 0,headers:A,method:t.method,signal:E.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},l=t.streamDataCallback,d=a.minBytesForProgressEvents||0,e=L(function(e){switch(e.h){case 1:return c=gj,h=gB,f=new ArrayBuffer(0),m=g=0,v={},y=Date.now(),e.m(2),e.g(c(o,u),4);case 4:var t,a;if(r((t=(p=e.i).headers,a={},t.forEach(function(e,t){a[t.trim()]=e}),v=a)),"HEAD"==u.method){e.A(5);break}if(w=(b=p.headers.get("Content-Length"))?parseInt(b,10):0,!p.body)return e.g(p.arrayBuffer(),9);return T=p.clone().body.getReader(),new h({start:function(e){!function t(){var n,r,a,o;return L(function(s){switch(s.h){case 1:return s.m(2),s.g(T.read(),4);case 4:n=s.i,s.o(3);break;case 2:return s.l(),s.return();case 3:if(n.done||(g+=n.value.byteLength,!l)){s.A(5);break}return s.g(l(n.value),5);case 5:r=Date.now(),a=g-m,(r-y>100&&a>=d||n.done)&&(o=n.done?0:w-g,i(r-y,a,o),m=g,y=r),n.done?e.close():(e.enqueue(n.value),t()),s.j()}})}()}}),e.g(p.arrayBuffer(),8);case 8:f=e.i,e.A(5);break;case 9:f=e.i,i(Date.now()-y,f.byteLength,0);case 5:s.headers.Range&&2==(S=s.headers.Range.replace("bytes=","").split("-").filter(function(e){return e}).map(function(e){return parseInt(e,10)})).length&&f.byteLength!=S[1]-S[0]+1&&Y("Payload length does not match range requested bytes",s,p),e.o(3);break;case 2:if(x=e.l(),k.Rh)throw new eN(1,1,7001,o,n);if(k.ej)throw new eN(1,1,1003,o,n);throw new eN(1,1,1002,o,x,n);case 3:return e.return(gR(v,f,p.status,o,p.url,s,n))}})),function(){return k.Rh=!0,E.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var I=new n4(function(){k.ej=!0,E.abort()});I.ea(t/1e3),e.finally(function(){I.stop()})}return e}function gN(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!!e.Response&&!!new Response("").body&&!(!e.fetch||"polyfill"in e.fetch||!e.AbortController)}tu("application/vnd.ms-sstr+xml",function(){return new gC}),q("shaka.net.HttpFetchPlugin",gL),gL.isSupported=gN,gL.parse=gO;var gj=e.fetch,gU=e.AbortController,gB=e.ReadableStream,gF=e.Headers;function gV(){}function gH(e,t,n,i,r,a){var o=new gq,s=Date.now(),u=0;return new i2(new Promise(function(l,d){o.open(t.method,e,!0),o.responseType="arraybuffer",o.timeout=t.retryParameters.timeout,o.withCredentials=t.allowCrossSiteCredentials;var c={};for(var h in o.onabort=function(){d(new eN(1,1,7001,e,n))},o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.HEADERS_RECEIVED){var e=o.getAllResponseHeaders().trim().split("\r\n"),t={};e=S(e);for(var n=e.next();!n.done;n=e.next()){var i=(n=n.value).indexOf(": ");-1!==i&&(t[n.slice(0,i).toLowerCase()]=n.slice(i+2))}r(c=t)}},o.onload=function(){var i=o.response;try{l(gR(c,i,o.status,e,o.responseURL,t,n))}catch(e){d(e)}},o.onerror=function(t){d(new eN(1,1,1002,e,t,n))},o.ontimeout=function(){d(new eN(1,1,1003,e,n))},o.onprogress=function(e){var t=Date.now(),n=a.minBytesForProgressEvents||0,r=e.loaded-u;(t-s>100&&r>=n||e.lengthComputable&&e.loaded==e.total)&&(i(t-s,r,4==o.readyState?0:e.total-e.loaded),u=e.loaded,s=t)},t.headers)try{o.setRequestHeader(h.toLowerCase(),t.headers[h])}catch(t){throw new eN(1,1,1002,e,t,n)}o.send(t.body)}),function(){return o.abort(),Promise.resolve()})}gN()&&(ra("http",gO,2,!0),ra("https",gO,2,!0),ra("blob",gO,2,!0)),q("shaka.net.HttpXHRPlugin",gV),gV.parse=gH;var gq=e.XMLHttpRequest;function gG(e,t,n,i,r){this.g=e,this.i=t,this.groupId=n,this.h=i,this.j=r}function gK(e){var t=e.Tb(!1);return t?ez(t):e.R().map(function(e){return"{"+encodeURI(e.split("#xywh=")[0])+"}"}).join("")+":"+e.startByte+":"+e.endByte}function gW(){this.g=this.j=this.i=0,this.h=new Map,this.l=0}function gz(e,t){e.i+=t;var n=e.l;return e.l++,e.h.set(n,t),n}function gX(e){return 0==e.i?0:e.j/e.i}function gY(e){var t=this;this.u=e,this.i=new Map,this.h=new rf(function(){return gJ(t).catch(function(){})}),this.j=[],this.o=function(){},this.m=function(){},this.g=new gW,this.l=!1}function gJ(e){e.l=!0;var t=e.j.map(function(e){return e()});return e.j=[],Promise.all(t)}function gQ(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new i1,e.onabort=function(e){e.preventDefault(),n.g.reject()},e.onerror=function(e){e.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}function g$(e,t){return new Promise(function(n,i){var r=e.h.openCursor();r.onerror=i,r.onsuccess=function(){var e;return L(function(i){if(1==i.h)return null==r.result?(n(),i.return()):(e=r.result,i.g(t(e.key,e.value,e),2));e.continue(),i.j()})}})}function gZ(e){this.h=e,this.g=[]}function g0(e,t){return g1(e,t,"readwrite")}
1function g1(e,t,n){var i=new gQ(n=e.h.transaction([t],n),t);return e.g.push(i),i.promise().then(function(){tS(e.g,i)},function(){tS(e.g,i)}),i}function g2(e,t,n){this.h=new gZ(e),this.i=t,this.g=n}function g3(e){return Promise.reject(new eN(2,9,9011,"Cannot add new value to "+e))}function g4(e,t,n,i){t=(e=g0(e.h,t)).store(),n=S(n);for(var r=n.next(),a={};!r.done;a={Rg:void 0},r=n.next())a.Rg=r.value,t.delete(a.Rg).onsuccess=function(e){return function(){return i(e.Rg)}}(a);return e.promise()}function g5(e,t,n){var i,r,a,o,s,u,l;return L(function(d){if(1==d.h){for(r=(i=g1(e.h,t,"readonly")).store(),a={},o=[],u=(s=S(n)).next(),l={};!u.done;l={Bf:void 0,ef:void 0},u=s.next())l.ef=u.value,l.Bf=r.get(l.ef),l.Bf.onsuccess=function(e){return function(){void 0==e.Bf.result&&o.push(e.ef),a[e.ef]=e.Bf.result}}(l);return d.g(i.promise(),2)}if(o.length)throw new eN(2,9,9012,"Could not find values for "+o);return d.return(n.map(function(e){return a[e]}))})}function g6(e){this.g=new gZ(e)}function g8(){this.g=new Map}function g9(e){var t=null;
1if(e.g.forEach(function(e,n){e.getCells().forEach(function(e,i){e.hasFixedKeySpace()||t||(t={path:{Lb:n,fb:i},fb:e})})}),t)return t;throw new eN(2,9,9013,"Could not find a cell that supports add-operations")}function g7(e,t,n){if(!(e=e.g.get(t)))throw new eN(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new eN(2,9,9013,"Could not find cell with name "+n);return t}function me(e,t){mt.set(e,t)}ra("http",gH,1,!0),ra("https",gH,1,!0),ra("blob",gH,1,!0),gW.prototype.close=function(e,t){if(this.h.has(e)){var n=this.h.get(e);this.h.delete(e),this.j+=n,this.g+=t}},gY.prototype.destroy=function(){return this.h.destroy()},gY.prototype.queue=function(e,t,n,i,r){var a=this;rg(this.h);var o=(this.i.get(e)||Promise.resolve()).then(function(){var e,o,s,u,l,d;return L(function(c){if(1==c.h){var h,p,f,g;return c.g(L(function(e){return 1==e.h?(h=rc,p=a.u.request(h,t),f=function(){return p.abort()},a.j.push(f),e.g(p.promise,2)):(g=e.i,tS(a.j,f),e.return(g.data))}),2)}if(e=c.i,a.h.g)throw new eN(2,9,7001);if(i)for(s in(o=new rR(eD(e))).data)u=Number(s),l=o.data[u],d=o.g[u],a.m(l,d);return a.g.close(n,e.byteLength),a.o(gX(a.g),a.g.g),c.return(r(e))})});return this.i.set(e,o),o},gQ.prototype.abort=function(){var e=this;return L(function(t){if(1==t.h){try{e.i.abort()}catch(e){}return t.m(2),t.g(e.g,4)}if(2!=t.h)return t.o(0);t.l(),t.j()})},gQ.prototype.store=function(){return this.h},gQ.prototype.promise=function(){return this.g},gZ.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))},(p=g2.prototype).destroy=function(){return this.h.destroy()},p.hasFixedKeySpace=function(){return!0},p.addSegments=function(){return g3(this.i)},p.removeSegments=function(e,t){return g4(this,this.i,e,t)}
1,p.getSegments=function(e){var t,n=this;return L(function(i){return 1==i.h?i.g(g5(n,n.i,e),2):(t=i.i,i.return(t.map(function(e){return n.Th(e)})))})},p.addManifests=function(){return g3(this.g)},p.updateManifest=function(){return Promise.reject(new eN(2,9,9016,"Cannot modify values in "+this.g))},p.updateManifestExpiration=function(e,t){var n=g0(this.h,this.g),i=n.store();return i.get(e).onsuccess=function(n){(n=n.target.result)&&(n.expiration=t,i.put(n,e))},n.promise()},p.removeManifests=function(e,t){return g4(this,this.g,e,t)},p.getManifests=function(e){var t,n=this;return L(function(i){return 1==i.h?i.g(g5(n,n.g,e),2):(t=i.i,i.return(Promise.all(t.map(function(e){return n.Nd(e)}))))})},p.getAllManifests=function(){var e,t,n=this;return L(function(i){return 1==i.h?(e=g1(n.h,n.g,"readonly"),t=new Map,i.g(g$(e,function(e,i){var r;return L(function(a){if(1==a.h)return a.g(n.Nd(i),2);r=a.i,t.set(e,r),a.j()})}),2)):3!=i.h?i.g(e.promise(),3):i.return(t)})},p.Th=function(e){return e},p.Nd=function(e){return Promise.resolve(e)},p.add=function(e,t){var n,i,r,a,o,s,u,l=this;return L(function(d){if(1==d.h){for(i=(n=g0(l.h,e)).store(),r=[],o=(a=S(t)).next(),s={};!o.done;s={gh:void 0},o=a.next())u=o.value,s.gh=i.add(u),s.gh.onsuccess=function(e){return function(){r.push(e.gh.result)}}(s);return d.g(n.promise(),2)}return d.return(r)})},g6.prototype.destroy=function(){return this.g.destroy()},g6.prototype.getAll=function(){var e,t,n=this;return L(function(i){return 1==i.h?(e=g1(n.g,"session-ids","readonly"),t=[],i.g(g$(e,function(e,n){t.push(n)}),2)):3!=i.h?i.g(e.promise(),3):i.return(t)})},g6.prototype.add=function(e){var t=g0(this.g,"session-ids"),n=t.store();e=S(e);for(var i=e.next();!i.done;i=e.next())n.add(i.value);return t.promise()},g6.prototype.remove=function(e){var t,n=this;return L(function(i){return 1==i.h?(t=g0(n.g,"session-ids"),i.g(g$(t,function(t,n,i){e.includes(n.sessionId)&&i.delete()}),2)):i.g(t.promise(),0)})},g8.prototype.destroy=function(){for(var e=[],t=S(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},g8.prototype.init=function(){var e=this;mt.forEach(function(t,n){(t=t())&&e.g.set(n,t)});for(var t=[],n=S(this.g.values()),i=n.next();!i.done;i=n.next())t.push(i.value.init());return Promise.all(t)},q("shaka.offline.StorageMuxer",g8),g8.unregister=function(e){mt.delete(e)},g8.register=me,g8.prototype.destroy=g8.prototype.destroy;var mt=new Map;function mn(){g2.apply(this,arguments)}function mi(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new eN(2,9,9004,"Could not parse uri "+e)}function mr(){g2.apply(this,arguments)}function ma(){g2.apply(this,arguments)}function mo(){this.l=null,this.o=!1,this.m=this.j=this.i=this.h=this.g=null}w(mn,g2),mn.prototype.updateManifestExpiration=function(e,t){var n,i,r,a=this;return L(function(o){return i=(n=g0(a.h,a.g)).store(),r=new i1,i.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,i.put(n),r.resolve()):r.reject(new eN(2,9,9012,"Could not find values for "+e))},o.g(Promise.all([n.promise(),r]),0)})},mn.prototype.Nd=function(e){var t,n,i,r,a;return L(function(o){if(1==o.h){for(n=0,t=[];n<e.periods.length;++n)i=(n==e.periods.length-1?e.duration:e.periods[n+1].startTime)-e.periods[n].startTime,r=function(e,t){!function(e){var t=e.streams.filter(function(e){return"audio"==e.contentType});if(e=e.streams.filter(function(e){return"video"==e.contentType}),!t.every(function(e){return e.variantIds})||!e.every(function(e){return e.variantIds})){for(var n=S(t),i=n.next();!i.done;i=n.next())i.value.variantIds=[];for(i=(n=S(e)).next();!i.done;i=n.next())i.value.variantIds=[];if(n=0,e.length&&!t.length){i=n++;for(var r=S(e),a=r.next();!a.done;a=r.next())a.value.variantIds.push(i)}if(!e.length&&t.length)for(i=n++,a=(r=S(t)).next();!a.done;a=r.next())a.value.variantIds.push(i);if(e.length&&t.length)for(i=(t=S(t)).next();!i.done;i=t.next())for(i=i.value,a=(r=S(e)).next();!a.done;a=r.next()){a=a.value;var o=n++;i.variantIds.push(o),a.variantIds.push(o)}}}(e);for(var n=S(e.streams),i=n.next();!i.done;i=n.next());return e.streams.map(function(n){return function(e,t,n){var i=e.initSegmentUri?mi(e.initSegmentUri):null,r=t+e.presentationTimeOffset,a=t+n;return{id:e.id,originalId:null,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,initSegmentKey:i,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(e){var n=mi(e.uri);return{startTime:t+e.startTime,endTime:t+e.endTime,dataKey:n,initSegmentKey:i,appendWindowStart:t,appendWindowEnd:a,timestampOffset:r,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}(n,e.startTime,t)})}(e.periods[n],i),t.push(r);return o.g(pr(t),2)}return a=o.i,o.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,streams:a,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})})},mn.prototype.Th=function(e){return{data:e.data}},w(mr,g2),mr.prototype.Nd=function(e){var t,n,i,r,a;
1return L(function(o){if(1==o.h){for(n=0,t=[];n<e.periods.length;++n){i=(n==e.periods.length-1?e.duration:e.periods[n+1].startTime)-e.periods[n].startTime;for(var s=e.periods[n],u=[],l=S(s.streams),d=l.next();!d.done;d=l.next())0!=(d=d.value).variantIds.length&&u.push(function(e,t,n){return{id:e.id,originalId:e.originalId,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(i){return{startTime:t+i.startTime,endTime:t+i.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:i.dataKey,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}(d,s.startTime,s.startTime+i));r=u,t.push(r)}return o.g(pr(t),2)}return a=o.i,o.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:null==e.expiration?1/0:e.expiration,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:a,sequenceMode:!1})})},w(ma,g2),(p=ma.prototype).hasFixedKeySpace=function(){return!1},p.addSegments=function(e){return this.add(this.i,e)},p.addManifests=function(e){return this.add(this.g,e)},p.updateManifest=function(e,t){var n,i;return n=this,(i=(n=g0(n.h,n.g)).store()).get(e).onsuccess=function(){i.put(t,e)},n.promise()},p.Nd=function(e){return null!=e.expiration||(e.expiration=1/0),Promise.resolve(e)},(p=mo.prototype).init=function(){var t=this,n=new i1,i=!1,r=new n4(function(){i=!0,n.reject(new eN(2,9,9017))});"number"==typeof ms&&ms>0&&r.ea(ms);var a=e.indexedDB.open("shaka_offline_db",5);return a.onsuccess=function(){r.stop();var e,o,s,u,l=a.result;i||t.o?l.close():(t.l=l,l.onversionchange=function(){l.close()},t.g=(e=l.objectStoreNames).contains("manifest")&&e.contains("segment")?new mn(l,"segment","manifest"):null,t.h=(o=l.objectStoreNames).contains("manifest-v2")&&o.contains("segment-v2")?new mr(l,"segment-v2","manifest-v2"):null,t.i=(s=l.objectStoreNames).contains("manifest-v3")&&s.contains("segment-v3")?new mr(l,"segment-v3","manifest-v3"):null,t.j=(u=l.objectStoreNames).contains("manifest-v5")&&u.contains("segment-v5")?new ma(l,"segment-v5","manifest-v5"):null,t.m=l.objectStoreNames.contains("session-ids")?new g6(l):null),n.resolve()},a.onupgradeneeded=function(){for(var e=a.result,t=S(["segment-v5","manifest-v5","session-ids"]),n=t.next();!n.done;n=t.next())n=n.value,e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},a.onerror=function(e){i||(r.stop(),n.reject(new eN(2,9,9001,a.error)),e.preventDefault())},n},p.destroy=function(){var e=this;return L(function(t){switch(t.h){case 1:if(e.o=!0,!e.g){t.A(2);break}return t.g(e.g.destroy(),2);case 2:if(!e.h){t.A(4);break}return t.g(e.h.destroy(),4);case 4:if(!e.i){t.A(6);break}return t.g(e.i.destroy(),6);case 6:if(!e.j){t.A(8);break}return t.g(e.j.destroy(),8);case 8:if(!e.m){t.A(10);break}return t.g(e.m.destroy(),10);case 10:e.l&&e.l.close(),t.j()}})},p.getCells=function(){var e=new Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),this.j&&e.set("v5",this.j),e},p.getEmeSessionCell=function(){return this.m},p.erase=function(){var t=this;return L(function(n){switch(n.h){case 1:if(!t.g){n.A(2);break}return n.g(t.g.destroy(),2);case 2:if(!t.h){n.A(4);break}return n.g(t.h.destroy(),4);case 4:if(!t.i){n.A(6);break}return n.g(t.i.destroy(),6);case 6:if(!t.j){n.A(8);break}return n.g(t.j.destroy(),8);case 8:var i,r;return t.l&&t.l.close(),n.g((i=new i1,(r=e.indexedDB.deleteDatabase("shaka_offline_db")).onblocked=function(){},r.onsuccess=function(){i.resolve()},r.onerror=function(e){i.reject(new eN(2,9,9001,r.error)),e.preventDefault()},i),10);case 10:return t.l=null,t.g=null,t.h=null,t.i=null,t.j=null,n.g(t.init(),0)}})};var ms=5;function mu(e,t,n,i){this.g=e,this.i=t,this.h=n,this.l=i,this.j=["offline:",e,"/",t,"/",n,"/",i].join("")}function ml(e){if(null==(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e)))return null;var t=e[1];if("manifest"!=t&&"segment"!=t)return null;var n=e[2];if(!n)return null;var i=e[3];return i&&null!=t?new mu(t,n,i,Number(e[4])):null}function md(e,t){this.h=e,this.g=t}function mc(e,t){var n=new o9(null,0);n.ub(t.duration);var i=t.streams.filter(function(e){return"audio"==e.type}),r=t.streams.filter(function(e){return"video"==e.type});i=function(e,t,n,i){for(var r=new Set,a=S(t),o=a.next();!o.done;o=a.next()){o=S(o.value.variantIds);for(var s=o.next();!s.done;s=o.next())r.add(s.value)}for(o=(a=S(n)).next();!o.done;o=a.next())for(s=(o=S(o.value.variantIds)).next();!s.done;s=o.next())r.add(s.value);for(a=new Map,o=(r=S(r)).next();!o.done;o=r.next())o=o.value,a.set(o,{id:o,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(r=(t=S(t)).next();!r.done;r=t.next())for(r=mh(e,o=r.value,i),s=(o=S(o.variantIds)).next();!s.done;s=o.next())(s=a.get(s.value)).language=r.language,s.primary=s.primary||r.primary,s.audio=r;for(t=(n=S(n)).next();!t.done;t=n.next())for(t=mh(e,r=t.value,i),o=(r=S(r.variantIds)).next();!o.done;o=r.next())(o=a.get(o.value)).primary=o.primary||t.primary,o.video=t;return a}(e,i,r,n),r=t.streams.filter(function(e){return e.type==e5}).map(function(t){return mh(e,t,n)});var a=t.streams.filter(function(e){return"image"==e.type}).map(function(t){return mh(e,t,n)}),o=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var s=S(i.values()),u=s.next();!u.done;u=s.next())(u=u.value).audio&&u.audio.encrypted&&(u.audio.drmInfos=o),u.video&&u.video.encrypted&&(u.video.drmInfos=o);return{presentationTimeline:n,offlineSessionIds:t.sessionIds,variants:Array.from(i.values()),textStreams:r,imageStreams:a,sequenceMode:t.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:t.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}function mh(e,t,n){var i=t.segments.map(function(n){var i,r,a,o,s;return r=new mu("segment",(i=e).h,i.g,n.dataKey),(i=new aK(n.startTime,n.endTime,function(){return[r.toString()]},0,null,null!=n.initSegmentKey?(a=i,o=n.initSegmentKey,s=new mu("segment",a.h,a.g,o),new aq(function(){return[s.toString()]},0,null)):null,n.timestampOffset,n.appendWindowStart,n.appendWindowEnd,[],n.tilesLayout||"")).mimeType=n.mimeType||t.mimeType||"",i.codecs=n.co
1decs||t.codecs||"",n.thumbnailSprite&&i.Jf(n.thumbnailSprite),i});return n.ae(i),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new sT(i),mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:t.hdr,colorGamut:t.colorGamut,videoLayout:t.videoLayout,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,originalLanguage:t.originalLanguage||null,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout,mssPrivateData:t.mssPrivateData,accessibilityPurpose:null,external:t.external,fastSwitching:t.fastSwitching,fullMimeTypes:new Set([nB(t.mimeType,t.codecs)]),isAudioMuxedInVideo:t.isAudioMuxedInVideo||!1,baseOriginalId:null}}function mp(){this.g=null}function mf(){}function mg(e,t){var n,i=ml(e);return i&&"manifest"==i.g?i5(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:t}):i&&"segment"==i.g?(i.key(),n=new g8,i5(void 0).Xa(function(){return n.init()}).Xa(function(){return g7(n,i.Lb(),i.fb())}).Xa(function(e){return e.getSegments([i.key()])}).Xa(function(e){return{uri:i,data:e[0].data,headers:{},originalRequest:t}}).finally(function(){return n.destroy()})):i3(new eN(2,1,9004,e))}function mm(e,t,n){var i,r,a,o,s;return L(function(u){switch(u.h){case 1:i=[];for(var l,d,c,h=[],p=S(n),f=p.next();!f.done;f=p.next()){f=f.value;for(var g=!1,m=S(h),v=m.next();!v.done;v=m.next())if(function(e,t){function n(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&tx(e.audioCapabilities,t.audioCapabilities,n)&&tx(e.videoCapabilities,t.videoCapabilities,n)}((v=v.value).info,f)){v.sessionIds.push(f.sessionId),g=!0;break}g||h.push({info:f,sessionIds:[f.sessionId]})}a=(r=S(h)).next();case 2:if(a.done){u.A(4);break}return l=a.value,o=L(function(n){switch(n.h){case 1:var i,r,a,o,s,u,h,p,f,g,m;return d=new rO({nc:t,onError:function(){},uf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),n.m(2),d.configure(e),n.g((i=d,r=l.info.keySystem,a=l.info.licenseUri,o=l.info.serverCertificate,s=l.info.audioCapabilities,u=l.info.videoCapabilities,L(function(e){return 1==e.h?(h=[],u.length&&h.push(u[0].contentType),s.length&&h.push(s[0].contentType),p=function(e){return(e=e0(r,e,null)).licenseServerUri=a,e.serverCertificate=o,e.persistentStateRequired=!0,e.sessionType="persistent-license",e},(f=iR(h)).video&&(g=p(u[0].encryptionScheme||""),f.video.drmInfos.push(g)),f.audio&&(m=p(s[0].encryptionScheme||""),f.audio.drmInfos.push(m)),e.g(im([f],!0,i.O,[]),2)):(rg(i.j),e.return(rH(i,[f])))})),4);case 4:n.o(3);break;case 2:return n.l(),n.g(d.destroy(),5);case 5:return n.return([]);case 3:return c=[],n.g(Promise.all(l.sessionIds.map(function(e){return L(function(t){if(1==t.h){var n,i,r,a;return t.m(2),t.g((n=d,L(function(t){return 1==t.h?t.g(rK(n,e,{initData:null,initDataType:null}),2):3!=t.h?(i=t.i)?(r=[],(a=n.i.get(i))&&(a.Fb=new i1,r.push(a.Fb)),r.push(i.remove()),t.g(Promise.all(r),3)):t.return():void(n.i.delete(i),t.j())})),4)}if(2!=t.h)return c.push(e),t.o(0);t.l(),t.j()})})),6);case 6:return n.g(d.destroy(),7);case 7:return n.return(c)}}),u.g(o,5);case 5:s=u.i,i=i.concat(s),a=r.next(),u.A(2);break;case 4:return u.return(i)}})}function mv(e,t){var n=mc(new md(e.Lb(),e.fb()),t),i=t.appMetadata||{};return n=my(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:i,isIncomplete:t.isIncomplete||!1}}function my(e){var t=[],n=ik(e.variants);n=S(n);for(var i=n.next();!i.done;i=n.next())t.push(i_(i.value));for(n=(e=S(e.textStreams)).next();!n.done;n=e.next())t.push(iw(n.value));return t}function mb(){this.g=new Map}function m_(e,t){return null!=(e=e.g.get(t))||(e=0),e}function mw(e){var t=this;if(e&&e.constructor!=l_)throw new eN(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.Jb()):(this.h=uA(),this.g=new rr,this.g.configure(this.h.networking)),this.i=[],this.l=[];var n=!e;this.j=new rf(function(){var e,i,r,a,o;return L(function(s){switch(s.h){case 1:return s.g(Promise.all(t.l.map(function(e){return gJ(e)})),2);case 2:for(e=function(){},i=[],a=(r=S(t.i)).next();!a.done;a=r.next())o=a.value,i.push(o.then(e,e));return s.g(Promise.all(i),3);case 3:if(!n){s.A(4);break}return s.g(t.g.destroy(),4);case 4:t.h=null,t.g=null,s.j()}})}),this.m=1e9}function mT(){if(p7(er()))e:{for(var e=S(mt.values()),t=e.next();!t.done;t=e.next())if(t=(t=t.value)()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function mS(e){var t,n,i,r;return L(function(a){switch(a.h){case 1:return t=new g8,a.g(t.init(),2);case 2:return a.g(g9(t),3);case 3:return i=new mu("manifest",(n=a.i).path.Lb,n.path.fb,e),a.g(t.destroy(),4);case 4:return r=new mw,a.g(r.remove(i.toString()),0)}})}function mx(e,t,n,i,r,a){var o,s,u,l,d,c,h,p,f,g;return L(function(m){switch(m.h){case 1:for(o=!1,m.m(2),s=!0,l=(u=S(n.streams)).next();!l.done;l=u.next())for(c=(d=S(l.value.segments)).next();!c.done;c=d.next())null!=(p=(h=c.value).pendingSegmentRefId?i[h.pendingSegmentRefId]:null)&&(h.dataKey=p,h.pendingSegmentRefId=void 0),null!=(p=h.pendingInitSegmentRefId?i[h.pendingInitSegmentRefId]:null)&&(h.initSegmentKey=p,h.pendingInitSegmentRefId=void 0),h.pendingSegmentRefId&&(s=!1),h.pendingInitSegmentRefId&&(s=!1);return n.size+=r,s&&(n.isIncomplete=!1),m.g(e.updateManifest(t,n),4);case 4:o=!0,a(),m.o(0);break;case 2:return f=m.l(),m.g(mS(t),5);case 5:if(o){m.A(6);break}return g=Object.values(i),m.g(e.removeSegments(g,function(){}),6);case 6:throw f}})}function mA(e){return e.variants.some(function(e){var t=e.audio&&e.audio.encrypted;return e.video&&e.video.encrypted||t})}function mE(e){return e.variants.some(function(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]).some(function(e){return e.initData&&e.initData.length})})}function mk(e,t,n,i){if(t.expiration=n.Sd(),n=rV(n),t.sessionIds=i?n:[],mA(e)&&i&&!n.length)throw new eN(2,9,9007)}function mI(e,t){for(var n=[],i=S(e.streams),r=i.next();!r.done;r=i.next())r=r.value,t&&"video"==r.type?n.push({contentType:nB(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=r.type||n.push({contentType:nB(r.mimeType,r.codecs),robustness:e.drmInfo.audioR
1obustness});return n}function mC(e,t){var n;return L(function(i){switch(i.h){case 1:return i.m(2),i.g(sX(t,e.g,e.h.streaming.retryParameters),4);case 4:n=i.i,i.o(3);break;case 2:i.l();case 3:if(n)return i.return(n);throw new eN(1,2,2011,t)}})}function mM(e){if(e.j.g)throw new eN(2,9,7001)}function mP(){if(!mT())throw new eN(2,9,9e3)}function mD(e,t){return L(function(n){return 1==n.h?(e.i.push(t),n.D(2),n.g(t,4)):2!=n.h?n.return(n.i):(n.u(),tS(e.i,t),n.B(0))})}function mR(e){for(var t=new Set,n=S(e.variants),i=n.next();!i.done;i=n.next())(i=i.value).audio&&t.add(i.audio),i.video&&t.add(i.video);for(i=(n=S(e.textStreams)).next();!i.done;i=n.next())t.add(i.value);for(n=(e=S(e.imageStreams)).next();!n.done;n=e.next())t.add(n.value);return t}q("shaka.offline.indexeddb.StorageMechanismOpenTimeout",5),me("idb",function(){return er().Ah()?new mo:null}),mu.prototype.Lb=function(){return this.i},mu.prototype.fb=function(){return this.h},mu.prototype.key=function(){return this.l},mu.prototype.toString=function(){return this.j},(p=mp.prototype).configure=function(){},p.start=function(e,t){var n,i,r,a,o,s=this;return L(function(u){switch(u.h){case 1:if(s.g=n=ml(e),null==n||"manifest"!=n.g)throw new eN(2,1,9004,e);return i=new g8,u.D(2),u.g(i.init(),4);case 4:return u.g(g7(i,n.Lb(),n.fb()),5);case 5:return r=u.i,u.g(r.getManifests([n.key()]),6);case 6:return a=u.i[0],o=mc(new md(n.Lb(),n.fb()),a),t.makeTextStreamsForClosedCaptions(o),u.return(o);case 2:return u.u(),u.g(i.destroy(),7);case 7:u.B(0)}})},p.stop=function(){return Promise.resolve()},p.update=function(){},p.onExpirationUpdated=function(e,t){var n,i,r,a,o,s,u=this;return L(function(l){switch(l.h){case 1:return n=u.g,i=new g8,l.m(2,3),l.g(i.init(),5);case 5:return l.g(g7(i,n.Lb(),n.fb()),6);case 6:return r=l.i,l.g(r.getManifests([n.key()]),7);case 7:if(o=(a=l.i[0]).sessionIds.includes(e),s=void 0==a.expiration||a.expiration>t,!o||!s){l.A(3);break}return l.g(r.updateManifestExpiration(n.key(),t),3);case 3:return l.u(),l.g(i.destroy(),10);case 10:l.B(0);break;case 2:l.l(),l.A(3)}})},p.onInitialVariantChosen=function(){},p.banLocation=function(){},p.setMediaElement=function(){},tu("application/x-offline-manifest",function(){return new mp}),q("shaka.offline.OfflineScheme",mf),mf.plugin=mg,ra("offline",mg),(p=mw.prototype).destroy=function(){return this.j.destroy()},p.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=um(e,t)),uk(this.h,e)},p.getConfiguration=function(){var e=uA();return uk(e,this.h,uA()),e},p.Jb=function(){return this.g},p.store=function(e,t,n,i,r){var a,o,s,u,l,d,c,h,p,f,g,m,v,y,b,w,T,x,A,E,k,I,C,M,P,D,R,O,N,j,U,B=this,F=this.getConfiguration(),V=new gY(this.g);return this.l.push(V),(t=new i2((a=this,o=t||{},s=i||[],u=r||[],l=function(){var t;return L(function(i){return 1==i.h?n?i.A(2):i.g(sX(e,B.g,F.manifest.retryParameters),3):(2!=i.h&&(n=i.i),t=tl(e,n||null),i.return(t()))})},t=L(function(t){var n,i,r,N,j,U,B,H,q,G,K,W,z,X,Y,J,Q,$,Z,ee,et,en,ei,er,ea,eo,es,eu,el,ed,ec,eh,ep,ef,eg,em,ev,ey,eb,e_,ew,eT,eS,ex,eA,eE,ek,eI,eC,eM,eP,eR,eL,eO,ej,eU,eB,eF,eV,eH,eq,eG,eK,eW,ez,eX,eY,eJ,eQ,e$,e0,e1,e2,e3;switch(t.h){case 1:return mP(),c=d=null,h=new g8,g=f=p=null,t.m(2,3),t.g(l(),5);case 5:return d=t.i,t.g((n=d,L(function(t){if(1==t.h)return i=null,r={networkingEngine:a.g,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){i=e},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return F.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},addFont:function(){}},n.configure(F.manifest),mM(a),t.g(n.start(e,r),2);if(3!=t.h)return N=t.i,mM(a),j=mR(N),t.g(Promise.all(rm(j,function(e){return e.createSegmentIndex()})),3);if(mM(a),i)throw i;return t.return(N)})),6);case 6:if(m=t.i,mM(a),!(!m.presentationTimeline.U()&&!m.presentationTimeline.Pc()))throw new eN(2,9,9005,e);y=(v=S(s)).next();case 7:if(y.done){t.A(9);break}return b=y.value,t.g((U=m,L(function(e){switch(e.h){case 1:return e.g(mC(a,b),2);case 2:var t,n,i,r,o;
1if("text/vtt"!=(B=e.i))throw new eN(1,2,2017,b);return e.g((t=a.g,n=a.h.streaming.retryParameters,L(function(e){return 1==e.h?(i=rc,(r=rs([b],n)).method="GET",e.g(t.request(i,r).promise,2)):(o=e.i,e.return(o.data))})),3);case 3:if(H=e.i,!(q=n$(B)))throw new eN(2,2,2014,B);for(G=q(),K={periodStart:0,segmentStart:0,segmentEnd:U.presentationTimeline.getDuration(),vttOffset:0},W=eD(H),z=G.parseMedia(W,K,b,[]),X=[],J=(Y=S(z)).next(),Q={};!J.done;Q={Rf:void 0,ed:void 0},J=Y.next())Q.ed=J.value,Q.Rf=null,$=function(e){return function(){return null!=e.Rf||(e.Rf=eZ([b],[e.ed.payload])),e.Rf||[]}}(Q),Z=new aK(Q.ed.startTime,Q.ed.endTime,$,0,null,null,0,0,1/0),Q.ed.payload.includes("#xywh")&&4===(ee=Q.ed.payload.split("#xywh=")[1].split(",")).length&&Z.Jf({height:parseInt(ee[3],10),positionX:parseInt(ee[0],10),positionY:parseInt(ee[1],10),width:parseInt(ee[2],10)}),X.push(Z);if(et=B,!X.length){e.A(4);break}return e.g(sX(X[0].R()[0],a.g,a.h.manifest.retryParameters),5);case 5:et=e.i;case 4:return e.return({id:a.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new sT(X),mimeType:et||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([nB(et||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})),10);case 10:w=t.i,m.imageStreams.push(w),mM(a),y=v.next(),t.A(7);break;case 9:x=(T=S(u)).next();case 11:if(x.done)return r0(F.drm.clearKeys,m.variants),k=m.variants.some(function(e){if(e.audio){for(var t=S(e.audio.drmInfos),n=t.next();!n.done;n=t.next())if(n.value.licenseServerUri.startsWith("data:"))return!0}if(e.video){for(t=(e=S(e.video.drmInfos)).next();!t.done;t=e.next())if(t.value.licenseServerUri.startsWith("data:"))return!0}return!1}),I=F.offline.usePersistentLicense,k&&(I=!1),t.g(a.cd(m,function(e){g=g||e},F,I),15);return A=x.value,t.g((en=m,ei=A.uri,er=A.language,ea=A.kind,eo=A.mime,es=A.codecs,L(function(e){if(1==e.h)return eo?e.A(2):e.g(mC(a,ei),3);if(2!=e.h&&(eo=e.i),eu={id:a.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:sS(0,en.presentationTimeline.getDuration(),[ei]),mimeType:eo||"",codecs:es||"",kind:ea,encrypted:!1,drmInfos:[],keyIds:new Set,language:er,originalLanguage:er,label:null,type:e5,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([nB(eo||"",es||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},!nZ(nB(eu.mimeType,eu.codecs)))throw new eN(2,2,2014,eo);return e.return(eu)})),14);case 14:E=t.i,m.textStreams.push(E),mM(a),x=T.next(),t.A(11);break;case 15:if(c=t.i,mM(a),g)throw g;return t.g((el=m,ed=c,ec=I,L(function(e){switch(e.h){case 1:var t;return eh={width:1/0,height:1/0},t=F.restrictions,el.variants=el.variants.filter(function(e){return ih(e,t,eh)}),e.g(ip(ed,el,ec,F.drm.preferredKeySystems,F.drm.keySystemsMapping),2);case 2:for(ep=[],ef=F.preferredDecodingAttributes,ic(el,F.preferredVideoCodecs,F.preferredAudioCodecs,ef,F.preferredTextFormats),em=(eg=S(el.variants)
1).next();!em.done;em=eg.next())ev=em.value,ep.push(i_(ev));for(eb=(ey=S(el.textStreams)).next();!eb.done;eb=ey.next())e_=eb.value,ep.push(iw(e_));for(eT=(ew=S(el.imageStreams)).next();!eT.done;eT=ew.next())eS=eT.value,ep.push(iT(eS));return e.g(F.offline.trackSelectionCallback(ep),3);case 3:for(ex=e.i,eA=el.presentationTimeline.getDuration(),eE=0,eI=(ek=S(ex)).next();!eI.done;eI=ek.next())eC=eI.value.bandwidth*eA/8,eE+=eC;return e.m(4),e.g(F.offline.downloadSizeCallback(eE),6);case 6:if(!e.i)throw new eN(2,9,9014);e.o(5);break;case 4:if((eM=e.l())instanceof eN)throw eM;throw new eN(2,9,9015);case 5:for(eP=new Set,eR=new Set,eL=new Set,ej=(eO=S(ex)).next();!ej.done;ej=eO.next())"variant"==(eU=ej.value).type&&eP.add(eU.id),"text"==eU.type&&eR.add(eU.id),"image"==eU.type&&eL.add(eU.id);el.variants=el.variants.filter(function(e){return eP.has(e.id)}),el.textStreams=el.textStreams.filter(function(e){return eR.has(e.id)}),el.imageStreams=el.imageStreams.filter(function(e){return eL.has(e.id)}),function(e){e.variants.map(function(e){return e.video});var t=new Set(e.variants.map(function(e){return e.audio}));e=e.textStreams;for(var n=S(t),i=n.next();!i.done;i=n.next()){i=S(t);for(var r=i.next();!r.done;r=i.next());}for(n=(t=S(e)).next();!n.done;n=t.next())for(i=(n=S(e)).next();!i.done;i=n.next());}(el),e.j()}})),16);case 16:return t.g(h.init(),17);case 17:return mM(a),t.g(g9(h),18);case 18:return p=t.i,mM(a),M=(C=function(e,t,n,i,r,a,o){var s,u,l,d,c={offlineUri:null,originalManifestUri:n,duration:(s=t).presentationTimeline.getDuration(),size:0,expiration:1/0,tracks:s=my(s),appMetadata:i,isIncomplete:!1},h=r.offline.progressCallback;u=a,u.o=function(e,t){c.size=t,h(c,e)},u.m=function(t,n){p&&o&&f==n&&rF(e,"cenc",t)};var p=mA(t)&&!mE(t),f=null;p&&(f=mL.get(e.g.keySystem));for(var g=new mb,m=S(t.textStreams),v=m.next();!v.done;v=m.next())g.g.set(v.value.id,52);for(v=(m=S(t.imageStreams)).next();!v.done;v=m.next())l=g,d=v.value,l.g.set(d.id,d.bandwidth||2048);for(v=(m=S(t.variants)).next();!v.done;v=m.next())!function(e,t){var n=t.audio,i=t.video;
1if(n&&!i&&e.g.set(n.id,n.bandwidth||t.bandwidth),!n&&i&&e.g.set(i.id,i.bandwidth||t.bandwidth),n&&i){var r=n.bandwidth||393216,a=i.bandwidth||t.bandwidth-r;a<=0&&(a=t.bandwidth),e.g.set(n.id,r),e.g.set(i.id,a)}}(g,v.value);return r=(a=function(e,t,n,i){var r=new Map,a=mR(n),o=new Map;a=S(a);for(var s=a.next();!s.done;s=a.next()){var u=function(e,t,n,i,r,a){var o={id:i.id,originalId:i.originalId,groupId:i.groupId,primary:i.primary,type:i.type,mimeType:i.mimeType,codecs:i.codecs,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,colorGamut:i.colorGamut,videoLayout:i.videoLayout,kind:i.kind,language:i.language,originalLanguage:i.originalLanguage,label:i.label,width:i.width||null,height:i.height||null,encrypted:i.encrypted,keyIds:i.keyIds,segments:[],variantIds:[],roles:i.roles,forced:i.forced,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,closedCaptions:i.closedCaptions,tilesLayout:i.tilesLayout,mssPrivateData:i.mssPrivateData,external:i.external,fastSwitching:i.fastSwitching,isAudioMuxedInVideo:i.isAudioMuxedInVideo},s=r.offline.numberOfParallelDownloads,u=0===s?i.id:0;return function(e,t,n){if(null!=(t=e.segmentIndex.find(t)))for(var i=e.segmentIndex.get(t);i;)n(i,t),i=e.segmentIndex.get(++t)}(i,n.presentationTimeline.Db(),function(n,r){var l=gK(n),d=void 0;if(!a.has(l)){var c=n.endTime-n.startTime;c=m_(t,i.id)*c,c=gz(e.g,c),a.set(l,new gG(n,c,u,!1,r))}n.$&&(d=gK(n.$),a.has(d)||(c=.5*m_(t,i.id),c=gz(e.g,c),a.set(d,new gG(n.$,c,u,!0,r)))),o.segments.push({pendingInitSegmentRefId:d,initSegmentKey:d?0:null,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,pendingSegmentRefId:l,dataKey:0,mimeType:n.mimeType,codecs:n.codecs,thumbnailSprite:n.thumbnailSprite}),0!==s&&(u=(u+1)%s)}),o}(e,t,n,s=s.value,i,r);o.set(s.id,u)}for(t=(e=S(n.variants)).next();!t.done;t=e.next())(t=t.value).audio&&o.get(t.audio.id).variantIds.push(t.id),t.video&&o.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(o.values()),Eh:Array.from(r.values())}}(a,g,t,r)).streams,a=a.Eh,(g=e.g)&&o&&(g.initData=[]),{tk:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.Sd(),streams:r,sessionIds:o?rV(e):[],drmInfo:g,appMetadata:i,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},Eh:a}}(c,m,e,o,F,V,I)).tk,P=C.Eh,t.g(p.fb.addManifests([M]),19);case 19:if(D=t.i,mM(a),f=D[0],mM(a),g)throw g;return t.g((eB=P,eF=f,eV=M,eH=p.fb,eq=m,eG=c,eK=I,L(function(e){switch(e.h){case 1:if(eW={},ez=0,eX=function(){if(a.j.g||V.l)throw new eN(2,9,7001)},eY=function(e,t){var n,i,r,a,o,s,u,l;return L(function(d){if(1==d.h){var c;for(i=(n=S(e)).next(),r={};!i.done;r={hc:void 0},i=n.next())r.hc=i.value,eX(),c=r.hc,a=sJ(c.g.R(),c.g.startByte,c.g.endByte,F.streaming.retryParameters),o=r.hc.i,s=r.hc.h,u=function(e){return function(t){var n,i,r,a;return L(function(o){switch(o.h){case 1:if(i=(n=e.hc.g).Tb(!1),!n.aesKey||i){o.A(2);break}return o.g(sz(t,n.aesKey,e.hc.j),3);case 3:t=o.i;case 2:return r=gK(n),o.g(eH.addSegments([{data:t}]),4);case 4:a=o.i,eX(),eW[r]=a[0],ez+=t.byteLength,o.j()}})}}(r),(l=r.hc.g.Tb(!1))?function(e,t,n,i,r,a){rg(e.h);var o=(e.i.get(t)||Promise.resolve()).then(function(){if(e.h.g)throw new eN(2,9,7001);if(r){var t=eD(n);for(var o in(t=new rR(t)).data){var s=Number(o);e.m(t.data[s],t.g[s])}}return e.g.close(i,n.byteLength),e.o(gX(e.g),e.g.g),a(n)});e.i.set(t,o)}(V,r.hc.groupId,l,o,s,u):V.queue(r.hc.groupId,a,o,s,u);return d.g(L(function(e){return 1==e.h?e.g(Promise.all(V.i.values()),2):e.return(V.g.g)}),2)}return(eX(),!t||V.l)?d.A(0):(mk(eq,eV,eG,eK),d.g(eH.updateManifest(eF,eV),0))})},eJ=!1,e.m(2),!mA(eq)||!eJ||mE(eq)){e.A(4);break}return e.g(eY(eB.filter(function(e){return e.h}),!0),5);case 5:return eX(),eB=eB.filter(function(e){return!e.h}),eQ=eW,e$=ez,eW={},ez=0,e.g(mx(eH,eF,eV,eQ,e$,function(){return mM(a)}),6);case 6:eX();case 4:if(eJ){e.A(7);break}return e.g(eY(eB,!1),8);case 8:return eX(),e0=eW,e1=ez,eW={},ez=0,e.g(mx(eH,eF,eV,e0,e1,function(){return eX()}),9);case 9:eX();case 7:e.o(0);break;case 2:return e2=e.l(),e3=Object.values(eW),e.g(eH.removeSegments(e3,function(){}),10);case 10:throw e2}})),20);case 20:return mM(a),mk(m,M,c,I),t.g(p.fb.updateManifest(f,M),21);case 21:return mM(a),R=new mu("manifest",p.path.Lb,p.path.fb,f),t.return(mv(R,M));case 3:return t.u(),t.g(h.destroy(),22);case 22:if(!d){t.A(23);break}return t.g(d.stop(),23);
1case 23:if(!c){t.A(25);break}return t.g(c.destroy(),25);case 25:t.B(0);break;case 2:if(O=t.l(),null==f){t.A(27);break}return t.g(mS(f),27);case 27:throw g||O}})),function(){return gJ(V)})).finally(function(){tS(B.l,V)}),N=this,U=(j=t).promise,N.i.push(U),j.finally(function(){tS(N.i,U)})},p.remove=function(e){var t,n,i,r,a,o;return mD(this,(t=this,L(function(s){switch(s.h){case 1:if(mP(),null==(n=ml(e))||"manifest"!=n.g)throw new eN(2,9,9004,e);return i=n,r=new g8,s.D(2),s.g(r.init(),4);case 4:return s.g(g7(r,i.Lb(),i.fb()),5);case 5:return a=s.i,s.g(a.getManifests([i.key()]),6);case 6:var u;return o=s.i[0],s.g(Promise.all([(u=r,L(function(e){var n,i,r,a,s;return e.g((n=t.g,i=t.h.drm,L(function(e){return 1==e.h?o.drmInfo?(r=function(e){var t=Array.from(e.g.keys());if(!t.length)throw new eN(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}(u),a=o.sessionIds.map(function(e){return{sessionId:e,keySystem:o.drmInfo.keySystem,licenseUri:o.drmInfo.licenseServerUri,serverCertificate:o.drmInfo.serverCertificate,audioCapabilities:mI(o,!1),videoCapabilities:mI(o,!0)}}),e.g(mm(i,n,a),2)):e.return():3!=e.h?(s=e.i,e.g(r.remove(s),3)):e.g(r.add(a.filter(function(e){return!s.includes(e.sessionId)})),0)})),0)})),function(e,t,n){function i(){}var r=function(e){var t=new Set;e=S(e.streams);for(var n=e.next();!n.done;n=e.next()){n=S(n.value.segments);for(var i=n.next();!i.done;i=n.next())null!=(i=i.value).initSegmentKey&&t.add(i.initSegmentKey),t.add(i.dataKey)}return Array.from(t)}(n);return mv(t,n),Promise.all([e.removeSegments(r,i),e.removeManifests([t.key()],i)])}(a,i,o)]),2);case 2:return s.u(),s.g(r.destroy(),8);case 8:s.B(0)}})))},p.Pk=function(){var e,t,n,i,r,a,o,s,u,l,d;return mD(this,(e=this,L(function(c){switch(c.h){case 1:return mP(),t=e.g,n=e.h.drm,i=new g8,r=!1,c.D(2),c.g(i.init(),4);case 4:var h;a=[],h=i,h.g.forEach(function(e){(function(e){a.push(e)})(e.getEmeSessionCell())}),s=(o=S(a)).next();case 5:if(s.done){c.A(2);break}return u=s.value,c.g(u.getAll(),8);case 8:return l=c.i,c.g(mm(n,t,l),9);case 9:return d=c.i,c.g(u.remove(d),10);case 10:d.length!=l.length&&(r=!0),s=o.next(),c.A(5);break;case 2:return c.u(),c.g(i.destroy(),11);case 11:c.B(3);break;case 3:return c.return(!r)}})))},p.list=function(){var e,t,n;return mD(this,L(function(i){switch(i.h){case 1:return mP(),e=[],t=new g8,i.D(2),i.g(t.init(),4);case 4:var r,a;return n=Promise.resolve(),r=t,a=function(t,i){n=n.then(function(){return L(function(n){if(1==n.h)return n.g(i.getAllManifests(),2);n.i.forEach(function(n,i){n=mv(new mu("manifest",t.Lb,t.fb,i),n),e.push(n)}),n.j()})})}
1,r.g.forEach(function(e,t){e.getCells().forEach(function(e,n){a({Lb:t,fb:n},e)})}),i.g(n,2);case 2:return i.u(),i.g(t.destroy(),6);case 6:i.B(3);break;case 3:return i.return(e)}}))},p.cd=function(e,t,n,i){var r,a=this;return L(function(o){var s,u;return 1==o.h?((r=new rO({nc:a.g,onError:t,uf:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(n.drm),o.g((s=r,u=e.variants,s.ia=!0,s.C=new Map,s.P=i,rj(s,u,!1)),2)):3!=o.h?i?o.g(rB(r),3):o.A(3):o.return(r)})},q("shaka.offline.Storage",mw),mw.deleteAll=function(){var e;return L(function(t){var n,i,r;return 1==t.h?(e=new g8,t.D(2),t.g((n=e,L(function(e){return 1==e.h?((r=(i=Array.from(n.g.values())).length>0)||mt.forEach(function(e){(e=e())&&i.push(e)}),e.g(Promise.all(i.map(function(e){return e.erase()})),2)):r?e.A(0):e.g(Promise.all(i.map(function(e){return e.destroy()})),0)})),2)):5!=t.h?(t.u(),t.g(e.destroy(),5)):t.B(0)})},mw.prototype.list=mw.prototype.list,mw.prototype.removeEmeSessions=mw.prototype.Pk,mw.prototype.remove=mw.prototype.remove,mw.prototype.store=mw.prototype.store,mw.prototype.getNetworkingEngine=mw.prototype.Jb,mw.prototype.getConfiguration=mw.prototype.getConfiguration,mw.prototype.configure=mw.prototype.configure,mw.prototype.destroy=mw.prototype.destroy,mw.support=mT;var mL=new Map().set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c");function mO(){}function mN(e,t){for(e={priority:t||0,callback:e},t=0;t<mj.length;t++)if(mj[t].priority<e.priority)return void mj.splice(t,0,e);mj.push(e)}lS("offline",mT),q("shaka.polyfill",mO),mO.register=mN,mO.installAll=function(){for(var e=S(mj),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(e){Y("Error installing polyfill!",e)}}};var mj=[];function mU(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}function mB(e){return iz(e)?"cbcs":iK(e)||iW(e)||iG(e)||"com.huawei.wiseplay"===e?"cenc":(Y("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function mF(e){if(!e)return!1;var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)&&void 0!==e.encryptionScheme}function mV(e,t){return!!(!e||e==t||("cbcs"==e||"cbcs-1-9"==e)&&er().Vc())}function mH(){}function mq(){er().Kf()&&!a&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(a=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=mG,navigator.emeEncryptionSchemePolyfilled=!0)}function mG(e,t){var n,i=this;return L(function(r){return 1==r.h?r.g(a.call(i,e,t),2):mF(n=r.i)?(navigator.requestMediaKeySystemAccess=a,r.return(n)):(navigator.requestMediaKeySystemAccess=mK,r.return(mK.call(i,e,t)))})}function mK(e,t){var n,i,r,o,s,u,l,d,c,h,p,f,g=this;return L(function(m){if(1==m.h){for(n=mB(e),i=[],o=(r=S(t)).next();!o.done;o=r.next())u=mW((s=o.value).videoCapabilities,n),l=mW(s.audioCapabilities,n),s.videoCapabilities&&s.videoCapabilities.length&&!u.length||s.audioCapabilities&&s.audioCapabilities.length&&!l.length||((d=Object.assign({},s)).videoCapabilities=u,d.audioCapabilities=l,i.push(d));if(!i.length)throw(c=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",c.code=DOMException.NOT_SUPPORTED_ERR,c;return m.g(a.call(g,e,i),2)}return h=m.i,f=p=null,i[0]&&(i[0].videoCapabilities&&(p=i[0].videoCapabilities[0].encryptionScheme),i[0].audioCapabilities&&(f=i[0].audioCapabilities[0].encryptionScheme)),m.return(new mU(h,p,f))})}function mW(e,t){return e?e.filter(function(e){return mV(e.encryptionScheme,t)}):e}function mz(){}function mX(){er().Kf()&&!o&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(o=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=mY,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}function mY(e){var t,n,i=this;return L(function(r){switch(r.h){case 1:return r.g(o.call(i,e),2);case 2:if(!(t=r.i).supported||!e.keySystemConfiguration)return r.return(t);if(mF(n=t.keySystemAccess))return navigator.mediaCapabilities.decodingInfo=o,r.return(t);if(navigator.mediaCapabilities.decodingInfo=mJ,n){r.A(3);break}return r.g(mQ(e),4);case 4:return t.keySystemAccess=r.i,r.return(t);case 3:return r.return(mJ.call(i,e))}})}function mJ(e){var t,n,i,r,a,s,u,l=this;return L(function(d){switch(d.h){case 1:return n=t=null,!e.keySystemConfiguration||(r=(i=e.ke
1ySystemConfiguration).keySystem,n=i.audio&&i.audio.encryptionScheme,t=i.video&&i.video.encryptionScheme,a=mB(r),s={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},mV(n,a)&&mV(t,a))?d.g(o.call(l,e),2):d.return(s);case 2:if((u=d.i).keySystemAccess){u.keySystemAccess=new mU(u.keySystemAccess,t,n),d.A(3);break}if(!e.keySystemConfiguration){d.A(3);break}return d.g(mQ(e),5);case 5:u.keySystemAccess=d.i;case 3:return d.return(u)}})}function mQ(e){var t,n;return L(function(i){if(1==i.h){var r=e.keySystemConfiguration,a=[],o=[];return r.audio&&a.push({robustness:r.audio.robustness||"",contentType:e.audio.contentType,encryptionScheme:r.audio.encryptionScheme}),r.video&&o.push({robustness:r.video.robustness||"",contentType:e.video.contentType,encryptionScheme:r.video.encryptionScheme}),r={initDataTypes:r.initDataType?[r.initDataType]:[],distinctiveIdentifier:r.distinctiveIdentifier,persistentState:r.persistentState,sessionTypes:r.sessionTypes},a.length&&(r.audioCapabilities=a),o.length&&(r.videoCapabilities=o),t=r,i.g(navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=i.i,i.return(n)})}function m$(){}function mZ(){er().cc()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),m$.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=m0)}function m0(t){var n,i,r,a,o,s,u;return L(function(l){var d,c,h,p,f,g,m,v,y,b,w,T,S,x,A,E,k,I,C,M,P;switch(l.h){case 1:if(n={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:t},er(),i=t.video,r=t.audio,"media-source"!=t.type){if("file"!=t.type||i&&(a=i.contentType,""==a5().canPlayType(a))||r&&(o=r.contentType,""==a5().canPlayType(o)))return l.return(n);l.A(2);break}if(!p7())return l.return(n);if(!i){l.A(3);break}return l.g((d=i,L(function(t){var n,i,r,a;return 1==t.h?"CAST"!==er().Ta()?t.A(2):t.g(L(function(t){if(1==t.h){if(!(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return t.return(ti(d.contentType));switch(n=d.contentType,d.width&&d.height&&d.width>1280&&d.height>720&&(n+="; width="+d.width+"; height="+d.height),d.framerate&&((i=Math.round(d.framerate))<24||i>30)&&(n+="; framerate="+d.framerate),d.transferFunction||""){case"":case"srgb":break;case"pq":n+="; eotf=smpte2084";break;case"hlg":n+="; eotf=arib-std-b67";break;default:return t.return(!1)}return r=!1,(a=m1).has(n)?(r=a.get(n),t.A(2)):t.g(cast.__platform__.canDisplayType(n),3)}return 2!=t.h&&(r=t.i,a.set(n,r)),t.return(r)}),3):2!=t.h?(c=t.i,t.return(c)):t.return(ti(d.contentType))})),4);case 4:if(!l.i)return l.return(n);case 3:if(!r){l.A(2);break}return l.g((h=r,L(function(t){switch(t.h){case 1:if(p=er().Ta(),f=h.contentType,"CAST"!==p||!h.spatialRendering||(f+="; spatialRendering=true",!(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType))){t.A(2);break}if(g=!1,(m=m1).has(f)){g=m.get(f),t.A(4);break}return t.g(cast.__platform__.canDisplayType(f),5);case 5:g=t.i,m.set(f,g);case 4:return t.return(g);case 2:return t.return(ti(f))}})),6);case 6:if(!l.i)return l.return(n);case 2:if(!t.keySystemConfiguration)return n.supported=!0,l.return(n);return s=t.keySystemConfiguration,l.g((v=i,y=r,L(function(e){switch(e.h){case 1:b=[],w=[],T=[],s.audio&&(S={robustness:s.audio.robustness||"",contentType:y.contentType},er().ui()&&y.contentType.includes('codecs="ac-3"')&&(S.contentType='audio/mp4; codecs="ec-3"'),s.audio.encryptionScheme&&(S.encryptionScheme=s.audio.encryptionScheme,T.push(s.audio.encryptionScheme)),b.push(S)),s.video&&(x={robustness:s.video.robustness||"",contentType:v.contentType},s.video.encryptionScheme&&(x.encryptionScheme=s.video.encryptionScheme,T.push(s.video.encryptionScheme)),w.push(x)),A={initDataTypes:[s.initDataType],distinctiveIdentifier:s.distinctiveIdentifier,persistentState:s.persistentState,sessionTypes:s.sessionTypes},b.length&&(A.audioCapabilities=b),w.length&&(A.videoCapabilities=w),E=v?v.contentType:"",k=y?y.contentType:"",I=nK(E)+";"+nG(E),C=nK(k)+";"+nG(k),M=s.keySystem,P=null,e.m(2);var t=iY(I,C,M,T);if(iQ.has(t)){t=iY(I,C,M,T),P=iQ.get(t)||null,e.A(4);break}return e.g(navigator.requestMediaKeySystemAccess(s.keySystem,[A]),5);case 5:t=P=e.i;var n=iY(I,C,M,T);iQ.set(n,t);case 4:e.o(3);break;case 2:e.l();case 3:return e.return(P)}})),8);case 8:(u=l.i)&&(n.supported=!0,n.keySystemAccess=u);case 7:return l.return(n)}})}mU.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=S(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(n=(t=S(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},mU.prototype.createMediaKeys=function(){return this.g.createMediaKeys()},mO.EmeEncryptionScheme=mH,mH.install=mq,mN(mq),mO.MCapEncryptionScheme=mz,mz.install=mX,mN(mX,-2),mO.MediaCapabilities=m$,m$.install=mZ,m$.originalMcap=null;var m1=new Map;function m2(){}function m3(){var t,n,i=er(),r="WEBKIT"===i.Ea()?i.Ca():null;for((e.MediaSource||e.ManagedMediaSource)&&r&&e.MediaSource&&(r<=12?(m4(),t=SourceBuffer.prototype.remove,SourceBuffer.prototype.remove=function(e,n){return t.call(this,e,n-.001)}):r<=15&&m4()),r=(i=S(i.Fi())).next();!r.done;
1r=i.next())!function(t){var n=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(e){return nG(e)!=t&&n(e)},e.ManagedMediaSource){var i=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);e.ManagedMediaSource.isTypeSupported=function(e){return nG(e)!=t&&i(e)}}}(r.value);(e.MediaSource||e.ManagedMediaSource)&&function(){if(e.MediaSource){var t=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(e){return"mp2t"!=nH(e)&&t(e)}}if(e.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);e.ManagedMediaSource.isTypeSupported=function(e){return"mp2t"!=nH(e)&&n(e)}}}(),e.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&(n=MediaSource.isTypeSupported,er().bj()&&(MediaSource.isTypeSupported=function(e){var t=e.split(/ *; */),i=t.findIndex(function(e){return e.startsWith("codecs=")});if(i<0)return n(e);var r=t[i].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),a=r.findIndex(function(e){return e.startsWith("vp09")});return a>=0&&(r[a]="vp9",t[i]='codecs="'+r.join(",")+'"',e=t.join("; ")),n(e)}))}function m4(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,O.apply(0,arguments));return t.abort=function(){},t}}function m5(){}function m6(t){e.HTMLVideoElement&&e.WebKitMediaKeys&&e.shakaMediaKeysPolyfill!=vo&&((void 0===t?0:t)&&(s=!0,u=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),l=HTMLMediaElement.prototype.setMediaKeys,d=e.MediaKeys,c=e.MediaKeySystemAccess,h=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=m9,e.MediaKeys=vt,e.MediaKeySystemAccess=ve,navigator.requestMediaKeySystemAccess=m8,e.shakaMediaKeysPolyfill=vo,iL.clear(),iQ.clear())}function m8(e,t){try{var n=new ve(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function m9(e){var t=this.mediaKeys;return t&&t!=e&&vn(t,null),delete this.mediaKeys,(this.mediaKeys=e)?vn(e,this):Promise.resolve()}function m7(e){if(eL(e=eD(e.initData)).getUint32(0,!0)+4!=e.byteLength)throw RangeError("Malformed FairPlay init data");e=eV(e=eB(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=eP(e),this.dispatchEvent(t)}function ve(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(t=(e=S(t)).next();!t.done;t=e.next()){var n=t.value;if("required"==n.persistentState)t=null;else{t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label};var i=!1,r=!1;if(n.audioCapabilities)for(var a=S(n.audioCapabilities),o=a.next();!o.done;o=a.next())(o=o.value).contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,o.contentType.split(";")[0])&&(t.audioCapabilities.push(o),r=!0));if(n.videoCapabilities)for(a=(n=S(n.videoCapabilities)).next();!a.done;a=n.next())(a=a.value).contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,a.contentType.split(";")[0])&&(t.videoCapabilities.push(a),r=!0));i||(r=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=r?t:null}if(t){this.g=t;return}}throw(e=Error("Unsupported keySystem")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function vt(e){this.h=new WebKitMediaKeys(e),this.g=new ee}function vn(e,t){if(e.g.Ua(),!t)return Promise.resolve();e.g.G(t,"webkitneedkey",m7);try{return sa(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(e){return Promise.reject(e)}}function vi(e){rt.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new ee,this.sessionId="",this.expiration=NaN,this.closed=new i1,this.keyStatuses=new va,this.onkeystatuseschange=null}function vr(e,t){var n=e.keyStatuses;n.size=+(void 0!=t),n.g=t,t=new i9("keystatuseschange"),e.dispatchEvent(t),e.onkeystatuseschange&&e.onkeystatuseschange(t)}function va(){this.size=0,this.g=void 0}mN(mZ,-1),mO.MediaSource=m2,m2.install=m3,mN(m3),mO.PatchedMediaKeysApple=m5,m5.uninstall=function(){e.shakaMediaKeysPolyfill==vo&&s&&(s=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",u),HTMLMediaElement.prototype.setMediaKeys=l,e.MediaKeys=d,e.MediaKeySystemAccess=c,navigator.requestMediaKeySystemAccess=h,u=h=l=c=d=null,e.shakaMediaKeysPolyfill="",iL.clear(),iQ.clear())},m5.install=m6,ve.prototype.createMediaKeys=function(){return Promise.resolve(new vt(this.keySystem))},ve.prototype.getConfiguration=function(){return this.g},vt.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw TypeError("Session type "+e+" is unsupported on this platform.");return new vi(this.h,e)},vt.prototype.setServerCertificate=function(){return Promise.resolve(!1)},vt.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")}
1,w(vi,rt),(p=vi.prototype).generateRequest=function(e,t){var n=this;this.h=new i1;try{var i=this.l.createSession("video/mp4",eD(t));this.i=i,this.sessionId=i.sessionId||"",this.j.G(this.i,"webkitkeymessage",function(e){n.h&&(n.h.resolve(),n.h=null),e=new Map().set("messageType",void 0==n.keyStatuses.Ub()?"license-request":"license-renewal").set("message",eP(e.message)),e=new i9("message",e),n.dispatchEvent(e)}),this.j.G(i,"webkitkeyadded",function(){n.g&&(vr(n,"usable"),n.g.resolve(),n.g=null)}),this.j.G(i,"webkitkeyerror",function(){var e=Error("EME PatchedMediaKeysApple key error");if(e.errorCode=n.i.error,null!=n.h)n.h.reject(e),n.h=null;else if(null!=n.g)n.g.reject(e),n.g=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:vr(n,"output-not-allowed");break;default:vr(n,"internal-error")}}),vr(this,"status-pending")}catch(e){this.h.reject(e)}return this.h},p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},p.update=function(e){this.g=new i1;try{this.i.update(eD(e))}catch(e){this.g.reject(e)}return this.g},p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ua()}catch(e){this.closed.reject(e)}return this.closed},p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(p=va.prototype).Ub=function(){return this.g},p.forEach=function(e){this.g&&e(this.g,iJ.value())},p.get=function(e){if(this.has(e))return this.g},p.has=function(e){var t=iJ.value();return!!(this.g&&eM(e,t))},p.entries=function(){},p.keys=function(){},p.values=function(){};var vo="apple";function vs(){}function vu(){if(e.MediaKeys){var t=er();MediaKeys.prototype.setServerCertificate&&t.je()||(MediaKeys.prototype.setServerCertificate=vl)}}function vl(){return Promise.resolve(!1)}function vd(){}function vc(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)vS="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=vp,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=vf,e.MediaKeys=vm,e.MediaKeySystemAccess=vg,e.shakaMediaKeysPolyfill=vx}}function vh(e){var t=vS;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function vp(e,t){try{var n=new vg(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function vf(e){var t=this.mediaKeys;return t&&t!=e&&vv(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&vv(e,this),Promise.resolve()}function vg(e,t){this.g=this.keySystem=e;var n=!1;"org.w3.clearkey"==e&&(this.g="webkit-org.w3.clearkey",n=!1);var i=!1,r=document.getElementsByTagName("video");r=r.length?r[0]:document.createElement("video"),t=S(t);for(var a=t.next();!a.done;a=t.next()){var o={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:(a=a.value).initDataTypes,sessionTypes:["temporary"],label:a.label},s=!1;if(a.audioCapabilities)for(var u=S(a.audioCapabilities),l=u.next();!l.done;l=u.next())(l=l.value).contentType&&(s=!0,r.canPlayType(l.contentType.split(";")[0],this.g)&&(o.audioCapabilities.push(l),i=!0));if(a.videoCapabilities)for(l=(u=S(a.videoCapabilities)).next();!l.done;l=u.next())(l=l.value).contentType&&(s=!0,r.canPlayType(l.contentType,this.g)&&(o.videoCapabilities.push(l),i=!0));if(s||(i=r.canPlayType("video/mp4",this.g)||r.canPlayType("video/webm",this.g)),"required"==a.persistentState&&(n?(o.persistentState="required",o.sessionTypes=["persistent-license"]):i=!1),i){this.h=o;return}}throw n="Unsupported keySystem",("org.w3.clearkey"==e||"com.widevine.alpha"==e)&&(n="None of the requested configurations were supported."),(e=Error(n)).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function vm(e){this.l=e,this.h=null,this.g=new ee,this.i=[],this.j=new Map}function vv(e,t){e.h=t,e.g.Ua();var n=vS;t&&(e.g.G(t,n+"needkey",function(t){var n=new CustomEvent("encrypted");n.initDataType="cenc",n.initData=eP(t.initData),e.h.dispatchEvent(n)}),e.g.G(t,n+"keymessage",function(t){var n=vy(e,t.sessionId);n&&(t=new i9("message",t=new Map().set("messageType",void 0==n.keyStatuses.Ub()?"licenserequest":"licenserenewal").set("message",t.message)),n.h&&(n.h.resolve(),n.h=null),n.dispatchEvent(t))}
1),e.g.G(t,n+"keyadded",function(t){(t=vy(e,t.sessionId))&&t.ready()}),e.g.G(t,n+"keyerror",function(t){var n=vy(e,t.sessionId);if(n){var i=Error("EME v0.1b key error"),r=t.errorCode;r.systemCode=t.systemCode,i.errorCode=r,!t.sessionId&&n.h?(45==t.systemCode&&(i.message="Unsupported session type."),n.h.reject(i),n.h=null):t.sessionId&&n.g?(n.g.reject(i),n.g=null):(i=t.systemCode,t.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?vw(n,"output-restricted"):1==i?vw(n,"expired"):vw(n,"internal-error"))}}))}function vy(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}function vb(e,t,n){rt.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new i1,this.keyStatuses=new vT,this.onkeystatuseschange=null}function v_(e,t,n){if(e.m)return Promise.reject(Error("The session is already initialized."));e.m=!0;try{if("persistent-license"==e.l)if(n)var i=eD(eV("LOAD_SESSION|"+n));else i=eQ(eV("PERSISTENT|"),t);else i=eD(t)}catch(e){return Promise.reject(e)}e.h=new i1;var r=vh("generateKeyRequest");try{e.j[r](e.i,i)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,Promise.reject(t);new n4(function(){try{e.j[r](e.i,i)}catch(t){e.h.reject(t),e.h=null}}).ea(.01)}return e.h}function vw(e,t){var n=e.keyStatuses;n.size=+(void 0!=t),n.g=t,t=new i9("keystatuseschange"),e.dispatchEvent(t),e.onkeystatuseschange&&e.onkeystatuseschange(t)}function vT(){this.size=0,this.g=void 0}mN(function(){e.HTMLVideoElement&&e.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||m6())}),mO.PatchedMediaKeysCert=vs,vs.install=vu,mN(vu),mO.PatchedMediaKeysWebkit=vd,vd.install=vc,vg.prototype.createMediaKeys=function(){return Promise.resolve(new vm(this.g))},vg.prototype.getConfiguration=function(){return this.h},vm.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new vb(t,this.l,e),this.i.push(e),e},vm.prototype.setServerCertificate=function(){return Promise.resolve(!1)},vm.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},w(vb,rt),(p=vb.prototype).ready=function(){vw(this,"usable"),this.g&&this.g.resolve(),this.g=null},p.generateRequest=function(e,t){return v_(this,t,null)},p.load=function(e){return"persistent-license"==this.l?v_(this,null,e):Promise.reject(Error("Not a persistent session."))},p.update=function(e){var t=new i1;return!function e(t,n,i){if(t.g)t.g.then(function(){return e(t,n,i)}).catch(function(){return e(t,n,i)});else{if(t.g=n,"webkit-org.w3.clearkey"==t.i){var r=eU(i),a=JSON.parse(r);"oct"!=a.keys[0].kty&&(t.g.reject(Error("Response is not a valid JSON Web Key Set.")),t.g=null),r=eX(a.keys[0].k),a=eX(a.keys[0].kid)}else r=eD(i),a=null;var o=vh("addKey");try{t.j[o](t.i,r,a,t.sessionId)}catch(e){t.g.reject(e),t.g=null}}}(this,t,e),t},p.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=vh("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},p.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()},(p=vT.prototype).Ub=function(){return this.g},p.forEach=function(e){this.g&&e(this.g,iJ.value())},p.get=function(e){if(this.has(e))return this.g},p.has=function(e){var t=iJ.value();return!!(this.g&&eM(e,t))},p.entries=function(){},p.keys=function(){},p.values=function(){};var vS="",vx="webkit";function vA(){}function vE(){e.crypto&&("randomUUID"in e.crypto||(e.crypto.randomUUID=vk))}function vk(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}function vI(){}function vC(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:vM})}function vM(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}function vP(){}function vD(){for(var e=S([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array
1]),t=e.next();!t.done;t=e.next())(t=t.value).prototype.indexOf||(t.prototype.indexOf=vR),t.prototype.lastIndexOf||(t.prototype.lastIndexOf=vL),t.prototype.includes||(t.prototype.includes=vO)}function vR(e,t){return Array.prototype.indexOf.call(this,e,t)}function vL(e,t){return Array.prototype.lastIndexOf.call(this,e,t)}function vO(e,t){return -1!==this.indexOf(e,t)}function vN(){}function vj(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch(function(){}),e}}}function vU(){}function vB(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in t||"number"==typeof a5().webkitDroppedFrameCount)&&(t.getVideoPlaybackQuality=vF)}}function vF(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function vV(){}function vH(){if(!e.VTTCue&&e.TextTrackCue){var t=null,n=TextTrackCue.length;if(3==n)t=vq;else if(6==n)t=vG;else{try{var i=!!vq(1,2,"")}catch(e){i=!1}i&&(t=vq)}t&&(e.VTTCue=function(e,n,i){return t(e,n,i)})}}function vq(t,n,i){return new e.TextTrackCue(t,n,i)}function vG(t,n,i){return new e.TextTrackCue(t+"-"+n+"-"+i,t,n,i)}function vK(e){rt.call(this),this.h=e,this.l=null,this.g=[],this.i=-1,this.j=null,this.m=new ee}function vW(){}mN(vc),mO.RandomUUID=vA,vA.install=vE,mN(vE),mO.Symbol=vI,vI.install=vC,mN(vC),mO.TypedArray=vP,vP.install=vD,mN(vD),mO.VideoPlayPromise=vN,vN.install=vj,mN(vj),mO.VideoPlaybackQuality=vU,vU.install=vB,mN(vB),mO.VTTCue=vV,vV.install=vH,mN(vH),w(vK,rt),(p=vK.prototype).destroy=function(){var e=this;return L(function(t){if(1==t.h)return t.g(e.removeAllItems(),2);e.h=null,e.m&&(e.m.release(),e.m=null),rt.prototype.release.call(e),t.j()})},p.configure=function(e){this.l=e},p.getConfiguration=function(){return this.l},p.getCurrentItem=function(){return this.g.length&&this.i>=0&&this.i<this.g.length?this.g[this.i]:null},p.getCurrentItemIndex=function(){return this.i},p.getItems=function(){return this.g.slice()},p.insertItems=function(e){this.g.push.apply(this.g,x(e)),this.dispatchEvent(new i9("itemsinserted"))},p.removeAllItems=function(){var e=this;return L(function(t){switch(t.h){case 1:if(e.m.Ua(),!(e.g.length&&e.i>=0)){t.A(2);break}return t.g(e.h.vc(),2);case 2:if(!e.j){t.A(4);break}if(e.j.yf.u){t.A(5);break}return t.g(e.j.yf.destroy(),5);case 5:e.j=null;case 4:e.g=[],e.i=-1,e.dispatchEvent(new i9("itemsremoved")),t.j()}})},p.playItem=function(e){var t,n,i,r,a,o,s,u,l,d,c,h,p,f,g=this;return L(function(m){if(1==m.h){if(g.m.Ua(),!g.g.length||e>=g.g.length)throw new eN(2,7,7007);return t=g.g[e],g.i!=e&&(g.i=e,g.dispatchEvent(new i9("currentitemchanged"))),n=g.h.Ve(),(i=g.l?g.l.preloadNextUrlWindow:0)>0&&(r=!1,g.m.G(n,"timeupdate",function(){var e,t,a,o;return L(function(s){switch(s.h){case 1:if(g.j||g.g.length<=1||r||g.h.U()||!n.duration)return s.return();if(isNaN(e=g.h.Ma().end-n.currentTime)||!(e<=i)||(t=g.l&&g.l.repeatMode,a=null,g.i+1<g.g.length?a=g.g[g.i+1]:1==t&&(a=g.g[0]),!a)){s.A(0);break}return r=!0,o=null,s.m(5),s.g(g.h.preload(a.manifestUri,a.startTime,a.mimeType,a.config),7);case 7:o=s.i,s.o(6);break;case 5:s.l(),o=null;case 6:g.j={item:a,yf:o},r=!1,s.j()}})})),g.m.G(g.h,"complete",function(){var e=g.l&&g.l.repeatMode,t=!1;if(2==e)t=!0;else{var i=g.i+1;i<g.g.length?g.playItem(i):1==e&&(1==g.g.length?t=!0:g.playItem(0))}t&&(n.paused?(n.currentTime=g.h.Ma().start,n.play()):g.m.G(n,"paused",function(){n.currentTime=g.h.Ma().start,n.play()}))}),t.config&&(g.h.Ii(),g.h.configure(t.config)),a=t.manifestUri,g.j&&g.j.item==t&&g.j.yf&&(a=g.j.yf),m.g(g.h.load(a,t.startTime,t.mimeType),2)}if(g.j=null,t.extraText)for(s=(o=S(t.extraText)).next();!s.done;s=o.next())(u=s.value).mime?g.h.Kd(u.uri,u.language,u.kind,u.mime,u.codecs):g.h.Kd(u.uri,u.language,u.kind);if(t.extraThumbnail)for(d=(l=S(t.extraThumbnail)).next();!d.done;d=l.next())c=d.value,g.h.Ee(c);if(t.extraChapter)for(p=(h=S(t.extraChapter)).next();!p.done;p=h.next())f=p.value,g.h.De(f.uri,f.language,f.mime);m.j()})},q("shaka.queue.QueueManager",vK),vK.prototype.playItem=vK.prototype.playItem,vK.prototype.removeAllItems=vK.prototype.removeAllItems,vK.prototype.insertItems=vK.prototype.insertItems,vK.prototype.getItems=vK.prototype.getItems,vK.prototype.getCurrentItemIndex=vK.prototype.getCurrentItemIndex,vK.prototype.getCurrentItem=vK.prototype.getCurrentItem,vK.prototype.getConfiguration=vK.prototype.getConfiguration,vK.prototype.configure=vK.prototype.configure,vK.prototype.destroy=vK.prototype.destroy,dT=function(e){return new vK(e)},vW.prototype.parseInit=function(){},vW.prototype.setSequenceMode=function(){},vW.prototype.setManifestType=function(){},vW.prototype.parseMedia=function(e,t){var n=null,i=[];e=S(e=eU(e).split(/\r?\n/));for(var r=e.next();!r.done;r=e.next())if((r=r.value)&&!/^\s+$/.test(r)&&(r=vz.exec(r))){var a=vX.exec(r[1]);r=new na(a=60*parseInt(a[1],10)+parseFloat(a[2].replace(",",".")),t.segmentEnd?t.segmentEnd:a+2,r[2]),n&&(n.endTime=a,i.push(n)),n=r}return n&&i.push(n),i},q("shaka.text.LrcTextParser",vW),vW.prototype.parseMedia=vW.prototype.parseMedia,vW.prototype.setManifestType=vW.prototype.setManifestType,vW.prototype.setSequenceMode=vW.prototype.setSequenceMode,vW.prototype.parseInit=vW.prototype.parseInit;var vz=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,vX=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function vY(){this.g="UNKNOWN"}function vJ(e){var t=e.match(/rgba\(([^)]+)\)/);return t&&4==(t=t[1].split(",")).length?(t[3]=String(Number(t[3])/255),"rgba("+t.join(",")+")"):e}function vQ(e,t){t=S(t.split(" "));for(var n=t.next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes(nI)||e.textDecoration.push(nI);break;case"noUnderline":e.textDecoration.includes(nI)&&tS(e.textDecoration,nI);break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;
1case"noLineThrough":e.textDecoration.includes("lineThrough")&&tS(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&tS(e.textDecoration,"overline")}}function v$(e,t,n,i,r,a){return a=void 0===a||a,(t=v0(e,t,i,r))?t:a?vZ(e,n,i,r):null}function vZ(e,t,n,i){return t?t$(t,yd,i)||v1(e,t,n,i):null}function v0(e,t,n,i){return t$(t,yd,i)||v1(e,t,n,i)}function v1(e,t,n,i){t=v2(t,"style",n,"");for(var r=null,a=0;a<t.length;a++){var o=tJ(t[a],"urn:ebu:tt:style",i);o||(o=t$(t[a],yd,i)),o||(o=v0(e,t[a],n,i)),o&&(r=o)}return r}function v2(e,t,n,i,r){var a=[];if(!e||n.length<1)return a;var o=e;for(e=null;!e&&!(e=r?tJ(o,r,t):o.attributes[t])&&(o=o.parent););if(t=e){for(r=(t=S(t.split(" "))).next();!r.done;r=t.next())for(r=r.value,o=(e=S(n)).next();!o.done;o=e.next())if(i+(o=o.value).attributes["xml:id"]==r){a.push(o);break}}return a}function v3(e,t){var n=v4(e.attributes.begin,t),i=v4(e.attributes.end,t);return e=v4(e.attributes.dur,t),null==i&&null!=e&&(i=n+e),{start:n,end:i}}function v4(e,t){var n=null;if(yt.test(e)){n=Number((e=yt.exec(e))[1]);var i=Number(e[2]),r=Number(e[3]),a=Number(e[4]);a+=(Number(e[5])||0)/t.h,r+=a/t.frameRate,n=r+60*i+3600*n}else if(yn.test(e))n=v5(yn,e);else if(yi.test(e))n=v5(yi,e);else if(yr.test(e))n=Number((e=yr.exec(e))[1])/t.frameRate;else if(ya.test(e))n=Number((e=ya.exec(e))[1])/t.g;else if(yo.test(e))n=v5(yo,e);else if(e)throw new eN(2,2,2001,"Could not parse cue time range in TTML");return n}function v5(e,t){return null==(e=e.exec(t))||""==e[0]?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+60*(Number(e[2])||0)+3600*(Number(e[1])||0)}function v6(e,t,n,i){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(i),0==this.g&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}nQ("application/x-subtitle-lrc",function(){return new vW}),vY.prototype.parseInit=function(){},vY.prototype.setSequenceMode=function(){},vY.prototype.setManifestType=function(e){this.g=e},vY.prototype.parseMedia=function(e,t,n,i){var r,a=eU(e);if(e=[],""==a)return e;var o=tB(a,"tt",!0);if(!o)throw new eN(2,2,2005,"Failed to parse TTML.");if(!(a=tW(o,"body")[0]))return[];var s=t$(o,yl,"frameRate"),u=t$(o,yl,"subFrameRate"),l=t$(o,yl,"frameRateMultiplier"),d=t$(o,yl,"tickRate"),c=t$(o,yl,"cellResolution"),h=o.attributes["xml:space"]||"default",p=t$(o,yd,"extent");if("default"!=h&&"preserve"!=h)throw new eN(2,2,2005,"Invalid xml:space value: "+h);h="default"==h,s=new v6(s,u,l,d),c=(r=c)&&(r=/^(\d+) (\d+)$/.exec(r))?{columns:parseInt(r[1],10),rows:parseInt(r[2],10)}:null,u=((u=tW(o,"metadata")[0])?u.children:[]).filter(function(e){return"\n"!=e}),l=tW(o,"style"),o=tW(o,"region"),d=[];for(var f=S(o),g=f.next();!g.done;g=f.next())(g=function(e,t,n,i){var r=new tb,a=t.attributes["xml:id"];if(!a)return null;r.id=a,a=null,i&&(a=v8.exec(i)||ye.exec(i)),i=a?Number(a[1]):null,a=a?Number(a[2]):null;var o,s=vZ(e,t,n,"extent");if(s){var u=(o=v8.exec(s))||ye.exec(s);null!=u&&(r.width=Number(u[1]),r.height=Number(u[2]),o||(null!=i&&(r.width=100*r.width/i),null!=a&&(r.height=100*r.height/a)),r.widthUnits=o||null!=i?t_:0,r.heightUnits=o||null!=a?t_:0)}return(e=vZ(e,t,n,"origin"))&&null!=(u=(o=v8.exec(e))||ye.exec(e))&&(r.viewportAnchorX=Number(u[1]),r.viewportAnchorY=Number(u[2]),o?s||(r.width=100-r.viewportAnchorX,r.widthUnits=t_,r.height=100-r.viewportAnchorY,r.heightUnits=t_):(null!=a&&(r.viewportAnchorY=100*r.viewportAnchorY/a),null!=i&&(r.viewportAnchorX=100*r.viewportAnchorX/i)),r.viewportAnchorUnits=o||null!=i?t_:0),r}(this,g.value,l,p))&&d.push(g);if(tq(a,"p").length)throw new eN(2,2,2001,"<p> can only be inside <div> in TTML");for(f=(p=S(tq(a,"div"))).next();!f.done;f=p.next())if(tq(f.value,"span").length)throw new eN(2,2,2001,"<span> can only be inside <p> in TTML");return(t=function e(t,n,i,r,a,o,s,u,l,d,c,h,p,f){var g,m,v,y,b=c;if(tV(n)){if(!h)return null;var w={tagName:"span",children:[tG(n)],attributes:{},parent:null}}else w=n;for(var T=null,x=S(yc),A=x.next();!A.done&&!(T=v2(w,"backgroundImage",a,"#",A.value)[0]);A=x.next());x=null;var E=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if((A=t$(w,yc,"backgroundImage"))&&E.test(A)){if((x=parseInt(A.split(":").pop(),10)-1)>=f.length)return null;x=f[x]}else p&&A&&!A.startsWith("#")&&(E=new ef(p),A=new ef(A),(A=E.resolve(A).toString())&&
1(x=A));if(("p"==n.tagName||T||x)&&(h=!0),n=h,A="default"==(w.attributes["xml:space"]||(l?"default":"preserve")),E=w.children.every(tV),l=[],!E)for(var k=S(w.children),I=k.next();!I.done;I=k.next())(I=e(t,I.value,i,r,a,o,s,u,A,d,w,h,p,f))&&l.push(I);if(a=null!=c,p=tG(w),p=w.children.length&&p&&/\S/.test(p),!((k=w.attributes.begin||w.attributes.end||w.attributes.dur)||p||"br"==w.tagName||0!=l.length||a&&!A))return null;for(p=(f=v3(w,r)).start,f=f.end;b&&b.tagName&&"tt"!=b.tagName;)p=(g=b,m=r,v=p,y=f,g=v3(g,m),null==v?v=g.start:null!=g.start&&(v+=g.start),null==y?y=g.end:null!=g.start&&(y+=g.start),f={start:v,end:y}).start,f=f.end,b=b.parent;if(null!=p||(p=0),p+=i.periodStart,f=null==f?1/0:f+i.periodStart,"HLS"!==t.g&&(p=Math.max(p,i.segmentStart),f=Math.min(f,i.segmentEnd)),!k&&l.length>0)for(p=1/0,f=0,r=(i=S(l)).next();!r.done;r=i.next())p=Math.min(p,(r=r.value).startTime),f=Math.max(f,r.endTime);if("br"==w.tagName)return(t=new na(p,f,"")).lineBreak=!0,t;if(i="",E&&(i=eq(tG(w)||""),A&&(i=i.replace(/\s+/g," "))),(i=new na(p,f,i)).nestedCues=l,h||(i.isContainer=!0),d&&(i.cellResolution=d),d=v2(w,"region",s,"")[0],w.attributes.region&&d&&d.attributes["xml:id"]){var C=d.attributes["xml:id"];i.region=u.filter(function(e){return e.id==C})[0]}return u=d,c&&a&&!w.attributes.region&&!w.attributes.style&&(u=v2(c,"region",s,"")[0]),function(e,t,n,i,r,a,o,s,u){if("rtl"==v$(e,n,i,o,"direction",s=s||u)&&(t.direction="rtl"),"tb"==(u=v$(e,n,i,o,"writingMode",s))||"tblr"==u?t.writingMode="vertical-lr":"tbrl"==u?t.writingMode="vertical-rl":"rltb"==u||"rl"==u?t.direction="rtl":u&&(t.direction=nm),(u=v$(e,n,i,o,"textAlign",!0))?(t.positionAlign=yu.get(u),t.lineAlign=ys.get(u),t.textAlign=np[u.toUpperCase()]):t.textAlign=nh,(u=v$(e,n,i,o,"displayAlign",!0))&&(t.displayAlign=ng[u.toUpperCase()]),(u=v$(e,n,i,o,"color",s))&&(t.color=vJ(u)),(u=v$(e,n,i,o,"backgroundColor",s))&&(t.backgroundColor=vJ(u)),(u=v$(e,n,i,o,"border",s))&&(t.border=u),u=v$(e,n,i,o,"fontFamily",s))switch(u){case"monospaceSerif":t.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case"proportionalSansSerif":t.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case"sansSerif":t.fontFamily="sans-serif";break;case"monospaceSansSerif":t.fontFamily="Consolas,monospace";break;case"proportionalSerif":t.fontFamily="serif";break;default:t.fontFamily=u.split(",").filter(function(e){return"default"!=e}).join(",")}switch((u=v$(e,n,i,o,"fontWeight",s))&&"bold"==u&&(t.fontWeight=nx),t.wrapLine=!(u=v$(e,n,i,o,"wrapOption",s))||"noWrap"!=u,(u=v$(e,n,i,o,"lineHeight",s))&&u.match(v7)&&(t.lineHeight=u),(u=v$(e,n,i,o,"fontSize",s))&&(u.match(v7)||u.match(v9))&&(t.fontSize=u),(u=v$(e,n,i,o,"fontStyle",s))&&(t.fontStyle=nk[u.toUpperCase()]),r?(a=r.attributes.imageType||r.attributes.imagetype,u=r.attributes.encoding,r=tG(r).trim(),"PNG"==a&&"Base64"==u&&r&&(t.backgroundImage="data:image/png;base64,"+r)):a&&(t.backgroundImage=a),(r=v$(e,n,i,o,"textOutline",s))&&((r=r.split(" "))[0].match(v7)?t.textStrokeColor=t.color:(t.textStrokeColor=vJ(r[0]),r.shift()),r[0]&&r[0].match(v7)?t.textStrokeWidth=r[0]:t.textStrokeColor=""),(r=v$(e,n,i,o,"letterSpacing",s))&&r.match(v7)&&(t.letterSpacing=r),(r=v$(e,n,i,o,"linePadding",s))&&r.match(v7)&&(t.linePadding=r),(r=v$(e,n,i,o,"opacity",s))&&(t.opacity=parseFloat(r)),(r=vZ(e,i,o,"textDecoration"))&&vQ(t,r),(r=v0(e,n,o,"textDecoration"))&&vQ(t,r),(r=v$(e,n,i,o,"textCombine",s))&&(t.textCombineUpright=r),v$(e,n,i,o,"ruby",s)){case"container":t.rubyTag="ruby";break;case"text":t.rubyTag="rt"}}(t,i,w,u,T,x,o,n,0==l.length),i}(this,a,t,s,u,l,o,d,h,c,null,!1,n,i))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e},q("shaka.text.TtmlTextParser",vY),vY.prototype.parseMedia=vY.prototype.parseMedia,vY.prototype.setManifestType=vY.prototype.setManifestType,vY.prototype.setSequenceMode=vY.prototype.setSequenceMode,vY.prototype.parseInit=vY.prototype.parseInit;var v8=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,v9=/^(\d{1,4}(?:\.\d+)?|100)%$/,v7=/^(\d+px|\d+em|\d*\.?\d+c)$/,ye=/^(\d+)px (\d+)px$/,yt=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,yn=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,yi=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,yr=/^(\d*(?:\.\d*)?)f$/,ya=/^(\d*(?:\.\d*)?)t$/,yo=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),ys=new Map().set("left",nb).set("center","center").set("right","end").set("start",nb).set("end","end"),yu=new Map().set("left","line-left").set("center","center").set("right","line-right").set("start","line-left").set("end","line-right"),yl=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],yd=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],yc=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function yh(){this.g=new vY}function yp(){this.g="UNKNOWN"}function yf(e,t,n){var i,r,a;(i=ym.exec(t))?"middle"==(t=i[1])?e.textAlign=nh:e.textAlign=np[t.toUpperCase()]:(i=yv.exec(t))?e.writingMode="lr"==i[1]?"vertical-lr":"vertical-rl":(i=yy.exec(t))?e.size=Number(i[1]):(i=yb.exec(t))?(e.position=Number(i[1]),i[2]&&(e.positionAlign="line-left"==(t=i[2])||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center"==t||"middle"==t?"center":nc)):(i=y_.exec(t))?(r=n,a=i[1],(t=(r=r.filter(function(e){return e.id==a})).length?r[0]:null)&&(e.region=t)):(n=yw.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=n_[n[2].toUpperCase()])):(n=yT.exec(t))&&(e.lineInterpretation=ny,e.line=Number(n[1]),n[2]&&(e.lineAlign=n_[n[2].toUpperCase()]))}nQ("application/ttml+xml",function(){return new vY}),yh.prototype.parseInit=function(e){var t=!1;if(new rT().box("moov",rS).box("trak",rS).box("mdia",rS).box("minf",rS).box("stbl",rS).S("stsd",rx).box("stpp",function(e){t=!0,e.parser.stop()}).parse(e),!t)throw new eN(2,2,2007)},yh.prototype.setSequenceMode=function(e){this.g.setSequenceMode(e)},yh.prototype.setManifestType=function(e){this.g.setManifestType(e)},yh.prototype.parseMedia=function(e,t,n){var i=[],r=null,a=[],o=new Map,s=[];if(new rT().box("moof",rS).box("traf",rS).S("tfhd",function(e){r=au(e.reader,e.flags).Qd}).S("trun",function(e){e=S((e=ac(e.reader,e.version,e.flags)).kh);for(var t=e.next();!t.done;t=e.next())s.push(t.value.sampleSize||r||0)}).S("subs",function(e){for(var t=e.reader,n=t.W(),i=-1,r=0;r<n;r++){var a=t.W();i+=a,a=t.Da();for(var s=[],u=0;u<a;
1u++)1==e.version?s.push(t.W()):s.push(t.Da()),t.Z(),t.Z(),t.W();o.set(i,s)}}).box("mdat",rk(function(e){a.push(e)},!1)).parse(e,!1),0==a.length)throw new eN(2,2,2007);e=eQ.apply(eK,x(a));for(var u=0,l=0;l<s.length;l++){var d=eD(e,u,s[l]);u+=s[l];var c=o.get(l);if(c&&c.length){for(var h=eD(d,0,c[0]),p=[],f=c[0],g=1;g<c.length;g++){var m=eD(d,f,c[g]);m=eW(m),p.push("data:image/png;base64,"+m),f+=c[g]}i=i.concat(this.g.parseMedia(h,t,n,p))}else i=i.concat(this.g.parseMedia(d,t,n,[]))}return i},q("shaka.text.Mp4TtmlParser",yh),yh.prototype.parseMedia=yh.prototype.parseMedia,yh.prototype.setManifestType=yh.prototype.setManifestType,yh.prototype.setSequenceMode=yh.prototype.setSequenceMode,yh.prototype.parseInit=yh.prototype.parseInit,nQ('application/mp4; codecs="stpp"',function(){return new yh}),nQ('application/mp4; codecs="stpp.ttml"',function(){return new yh}),nQ('application/mp4; codecs="stpp.ttml.im1i"',function(){return new yh}),nQ('application/mp4; codecs="stpp.ttml.im1t"',function(){return new yh}),nQ('application/mp4; codecs="stpp.ttml.im2i"',function(){return new yh}),nQ('application/mp4; codecs="stpp.ttml.im2t"',function(){return new yh}),nQ('application/mp4; codecs="stpp.ttml.etd1"',function(){return new yh}),nQ('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new yh}),nQ('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new yh}),nQ('application/mp4; codecs="stpp.TTML.im1t"',function(){return new yh}),yp.prototype.parseInit=function(){},yp.prototype.setSequenceMode=function(){},yp.prototype.setManifestType=function(e){this.g=e},yp.prototype.parseMedia=function(e,t){var n=(e=(e=eU(e)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new eN(2,2,2e3);if(e=t.vttOffset,"HLS"==this.g&&n[0].includes("X-TIMESTAMP-MAP")){var i=n[0];if(e=i.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),i=i.match(/MPEGTS:(\d+)/m),!e||!i||null==(e=tD(e[1])))throw new eN(2,2,2e3);i=Number(i[1]);for(var r=t.segmentStart-t.periodStart;r>=95443.7176888889;)r-=95443.7176888889,i+=0x200000000;e=t.periodStart+i/9e4-e}for(t=[],r=(i=S(n[0].split("\n"))).next();!r.done;r=i.next())if(r=r.value,/^Region:/.test(r)){r=new tk(r);var a=new tb;tM(r),tI(r);for(var o=tM(r);o;){var s=a,u=o;(o=/^id=(.*)$/.exec(u))?s.id=o[1]:(o=/^width=(\d{1,2}|100)%$/.exec(u))?s.width=Number(o[1]):(o=/^lines=(\d+)$/.exec(u))?(s.height=Number(o[1]),s.heightUnits=2):(o=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(s.regionAnchorX=Number(o[1]),s.regionAnchorY=Number(o[2])):(o=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(s.viewportAnchorX=Number(o[1]),s.viewportAnchorY=Number(o[2])):/^scroll=up$/.exec(u)&&(s.scroll="up"),tI(r),o=tM(r)}t.push(a)}for(nl(i=new Map),r=[],a=(n=S(n.slice(1))).next();!a.done;a=n.next()){if((1!=(a=a.value.split("\n")).length||a[0])&&!yg.test(a[0])&&"STYLE"==a[0]){for(u=1,s=[],o=-1;u<a.length;u++)a[u].includes("::cue")&&(s.push([]),o=s.length-1),-1!=o&&(s[o].push(a[u]),a[u].includes("}")&&(o=-1));for(o=(s=S(s)).next();!o.done;o=s.next()){var l=o.value;o="global",(u=l[0].match(/\((.*)\)/))&&(o=u.pop()),u=l.slice(1,-1),l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(u=l[1].split(";")),(l=i.get(o))||(l=new na(0,0,""));for(var d=!1,c=0;c<u.length;c++){var h=/^\s*([^:]+):\s*(.*)/.exec(u[c]);if(h){var p=h[2].trim().replace(";","");switch(h[1].trim()){case"background-color":case"background":d=!0,l.backgroundColor=p;break;case"color":d=!0,l.color=p;break;case"font-family":d=!0,l.fontFamily=p;break;case"font-size":d=!0,l.fontSize=p;break;case"font-weight":(parseInt(p,10)>=700||"bold"==p)&&(d=!0,l.fontWeight=nx);break;case"font-style":switch(p){case"normal":d=!0,l.fontStyle=nA;break;case"italic":d=!0,l.fontStyle=nE;break;case"oblique":d=!0,l.fontStyle="oblique"}break;case"opacity":d=!0,l.opacity=parseFloat(p);break;case"text-combine-upright":d=!0,l.textCombineUpright=p;break;case"text-shadow":d=!0,l.textShadow=p;break;case"white-space":d=!0,l.wrapLine="noWrap"!=p}}}d&&i.set(o,l)}}if(l=a,c=e,1==l.length&&!l[0]||yg.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])a=null;else if(a=null,d=0,l[0].includes("-->")||(a=l[0],d=1),o=tP(s=new tk(l[d])),h=tC(s,/[ \t]+--\x3e[ \t]+/g),u=tP(s),null==o||null==h||null==u)Y("Failed to parse VTT time code. Cue skipped:",a,l),a=null;else{for(o+=c,u+=c,o<0&&(o=0),c="",h=d+1;h<l.length;h++)h>d+1&&(c+="\n"),c+=l[h];for(c=c.trim(),i.has("global")?((l=i.get("global").clone()).startTime=o,l.endTime=u,l.payload=c):l=new na(o,u,c),tI(s),o=tM(s);o;)yf(l,o,t),tI(s),o=tM(s);nu(l,i),null!=a&&(l.id=a),a=l}a&&r.push(a)}return r}
1,q("shaka.text.VttTextParser",yp),yp.prototype.parseMedia=yp.prototype.parseMedia,yp.prototype.setManifestType=yp.prototype.setManifestType,yp.prototype.setSequenceMode=yp.prototype.setSequenceMode,yp.prototype.parseInit=yp.prototype.parseInit;var yg=/^NOTE($|[ \t])/,ym=/^align:(start|middle|center|end|left|right)$/,yv=/^vertical:(lr|rl)$/,yy=/^size:([\d.]+)%$/,yb=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/,y_=/^region:(.*)$/,yw=/^line:([\d.]+)%(?:,(start|end|center))?$/,yT=/^line:(-?\d+)(?:,(start|end|center))?$/;function yS(){this.g=null}function yx(){}function yA(){this.g=new yp}function yE(){}function yk(e){return(e=parseInt(e.replace("&H",""),16))>=0?"rgba("+(255&e)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function yI(e){return((e=yD.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)*3600+60*parseInt(e[2],10)+parseFloat(e[3])}nQ("text/vtt",function(){return new yp}),nQ('text/vtt; codecs="vtt"',function(){return new yp}),nQ('text/vtt; codecs="wvtt"',function(){return new yp}),yS.prototype.parseInit=function(e){var t=this,n=!1;if(new rT().box("moov",rS).box("trak",rS).box("mdia",rS).S("mdhd",function(e){t.g=(e=ad(e.reader,e.version)).timescale}).box("minf",rS).box("stbl",rS).S("stsd",rx).box("wvtt",function(){n=!0}).parse(e),!this.g||!n)throw new eN(2,2,2008)},yS.prototype.setSequenceMode=function(){},yS.prototype.setManifestType=function(){},yS.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new eN(2,2,2008);var n,i=0,r=[],a=[],o=!1,s=!1,u=!1,l=null;if(new rT().box("moof",rS).box("traf",rS).S("tfdt",function(e){o=!0,i=al(e.reader,e.version).baseMediaDecodeTime}).S("tfhd",function(e){l=au(e.reader,e.flags).Pd}).S("trun",function(e){s=!0,r=ac(e.reader,e.version,e.flags).kh}).box("mdat",rk(function(e){u=!0,n=e},!1)).parse(e,!1),!u&&!o&&!s)throw new eN(2,2,2008);e=i;for(var d=new rb(n,0),c=S(r),h=c.next();!h.done;h=c.next()){var p=(h=h.value).mh||l,f=h.Df?i+h.Df:e;e=f+(p||0);var g=0;do{var m=d.W();g+=m;var v=d.W(),y=null;"vttc"==rC(v)?m>8&&(y=d.Ob(m-8,!1)):d.skip(m-8),p&&y&&(m=function(e,t,n){var i,r,a;return new rT().box("payl",rk(function(e){i=eU(e)},!1)).box("iden",rk(function(e){r=eU(e)},!1)).box("sttg",rk(function(e){a=eU(e)},!1)).parse(e),i?function(e,t,n,i,r){if(nu(e=new na(i,r,e)),t&&(e.id=t),n)for(n=tM(t=new tk(n));n;)yf(e,n,[]),tI(t),n=tM(t);return e}(i,r,a,t,n):null}(y,t.periodStart+f/this.g,t.periodStart+e/this.g),a.push(m))}while(h.sampleSize&&g<h.sampleSize)}return a.filter(n8)},q("shaka.text.Mp4VttParser",yS),yS.prototype.parseMedia=yS.prototype.parseMedia,yS.prototype.setManifestType=yS.prototype.setManifestType,yS.prototype.setSequenceMode=yS.prototype.setSequenceMode,yS.prototype.parseInit=yS.prototype.parseInit,nQ('application/mp4; codecs="wvtt"',function(){return new yS}),yx.prototype.parseInit=function(){},yx.prototype.setSequenceMode=function(){},yx.prototype.setManifestType=function(){},yx.prototype.parseMedia=function(e){var t=eU(e).replace(/\r+/g,"");if(t=t.trim(),e=[],""==t)return e;t=S(t.split("\n\n"));for(var n=t.next();!n.done;n=t.next()){var i=new tk((n=n.value.split("\n"))[0]),r=tP(i),a=tC(i,/,/g);if(i=tP(i),null==r||null==a||null==i)throw new eN(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new na(r,i,n.slice(1).join("\n").trim()))}return e},q("shaka.text.SbvTextParser",yx),yx.prototype.parseMedia=yx.prototype.parseMedia,yx.prototype.setManifestType=yx.prototype.setManifestType,yx.prototype.setSequenceMode=yx.prototype.setSequenceMode,yx.prototype.parseInit=yx.prototype.parseInit,nQ("text/x-subviewer",function(){return new yx}),yA.prototype.parseInit=function(){},yA.prototype.setSequenceMode=function(){},yA.prototype.setManifestType=function(){},yA.prototype.parseMedia=function(e,t,n){var i=eU(e);if(e="WEBVTT\n\n",""!=i){i=S((i=(i=i.replace(/\r+/g,"")).trim()).split("\n\n"));for(var r=i.next();!r.done;r=i.next())(r=r.value.split(/\n/))[0].match(/\d+/)&&r.shift(),r[0]=r[0].replace(/,/g,"."),e+=r.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n"}return e=eD(eV(e)),this.g.parseMedia(e,t,n,[])},q("shaka.text.SrtTextParser",yA),yA.prototype.parseMedia=yA.prototype.parseMedia,yA.prototype.setManifestType=yA.prototype.setManifestType,yA.prototype.setSequenceMode=yA.prototype.setSequenceMode,yA.prototype.parseInit=yA.prototype.parseInit,nQ("text/srt",function(){return new yA}),yE.prototype.parseInit=function(){},yE.prototype.setSequenceMode=function(){},yE.prototype.setManifestType=function(){},yE.prototype.parseMedia=function(e){var t="",n="",i=null,r=null;for(r=(e=S(r=eU(e).split(/\r?\n\s*\r?\n/))).next();!r.done;r=e.next()){var a=r.value;
1r=a,(a=yC.exec(a))&&(i=a[1],r=a[2]),"V4 Styles"==i||"V4+ Styles"==i?(t=r,t=n?t+"\n"+r:r):"Events"==i&&(n=n?n+"\n"+r:r)}for(i=[],r=null,e=(t=S(t.split(/\r?\n/))).next();!e.done;e=t.next())if(e=e.value,!/^\s*;/.test(e)&&(a=yM.exec(e))){if(e=a[1].trim(),a=a[2].trim(),"Format"==e)r=a.split(yP);else if("Style"==e){e=a.split(yP),a={};for(var o=0;o<r.length&&o<e.length;o++)a[r[o]]=e[o];i.push(a)}}for(r=[],t=null,a=(n=S(n.split(/\r?\n/))).next(),e={};!a.done;e={Xi:void 0},a=n.next())if(a=a.value,!/^\s*;/.test(a)&&(o=yM.exec(a))){if(a=o[1].trim(),o=o[2].trim(),"Format"==a)t=o.split(yP);else if("Dialogue"==a){o=o.split(yP),a={};for(var s=0;s<t.length&&s<o.length;s++)a[t[s]]=o[s];o=new na(s=yI(a.Start),yI(a.End),o.slice(t.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,"")),e.Xi=a.Style,(e=i.find(function(e){return function(t){return t.Name==e.Xi}}(e)))&&function(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=yk(n))&&(e.color=n),(n=t.BackColour)&&(n=yk(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=nx),t.Italic&&(e.fontStyle=nE),t.Underline&&e.textDecoration.push(nI),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=nf,e.textAlign="start";break;case 2:e.displayAlign=nf,e.textAlign=nh;break;case 3:e.displayAlign=nf,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=nh;break;case 7:e.displayAlign="before",e.textAlign="end";break;case 9:e.displayAlign="center",e.textAlign="start";break;case 10:e.displayAlign="center",e.textAlign=nh;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}(o,e),r.push(o)}}return r},q("shaka.text.SsaTextParser",yE),yE.prototype.parseMedia=yE.prototype.parseMedia,yE.prototype.setManifestType=yE.prototype.setManifestType,yE.prototype.setSequenceMode=yE.prototype.setSequenceMode,yE.prototype.parseInit=yE.prototype.parseInit;var yC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,yM=/^\s*([^:]+):\s*(.*)/,yP=/\s*,\s*/,yD=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;function yR(e,t){var n=1&e[t+1]?7:9;return t+n<=e.length&&(e=((3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5)-n)>0?{Vd:n,ra:e}:null}function yL(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=(60&e[t+2])>>>2;if(i>n.length-1)return null;var r=((192&e[t+2])>>>6)+1,a=(1&e[t+2])<<2;return{sampleRate:n[i],channelCount:a|=(192&e[t+3])>>>6,codec:"mp4a.40."+r}}function yO(e,t){if(t+1<e.length&&255===e[t]&&(246&e[t+1])==240){var n=1&e[t+1]?7:9;if(t+n>=e.length)return!1;var i=(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5;return!(i<=n)&&((t+=i)===e.length||t+1<e.length&&255===e[t]&&(246&e[t+1])==240)}return!1}nQ("text/x-ssa",function(){return new yE});var yN=Object.freeze({Og:0,cf:0,Ye:0,Oe:0,Pe:2,Pg:0}),yj=Object.freeze({Og:0,cf:0,Ye:0,Oe:0,Pe:2,Pg:0}),yU=Object.freeze({Og:0,cf:0,Ye:0,Oe:0,Pe:1,Pg:1});function yB(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function yF(e,t){if(t+8>e.length||11!==e[t]||119!==e[t+1])return null;var n=e[t+4]>>6;if(n>=3)return null;var i=63&e[t+4],r=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*i+n];if(t+r>e.length)return null;var a=e[t+6]>>5,o=0;2===a?o+=2:(1&a&&1!==a&&(o+=2),4&a&&(o+=2)),o=(e[t+6]<<8|e[t+7])>>12-o&1;var s=7&e[t+5];return e=new Uint8Array([n<<6|e[t+5]>>3<<1|s>>2,(3&s)<<6|a<<3|o<<2|i>>4,i<<4&224]),{sampleRate:[48e3,44100,32e3][n],channelCount:[2,1,2,3,3,4,4,5][a]+o,Ia:e,ra:r}}function yV(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function yH(e,t){if(t+8>e.length||(e[t]<<8|e[t+1])!=2935)return null;var n=new oo(e.subarray(t+2));ou(n,2),ou(n,3);var i=ol(n,11)+1<<1,r=ol(n,2);if(3==r){r=[24e3,22060,16e3][r=ol(n,2)];var a=3}else r=[48e3,44100,32e3][r],a=ol(n,2);var o=ol(n,3),s=ol(n,1);return(n=ol(n,5),t+i>
1e.byteLength)?null:(e=new Uint8Array([(8160&(e=Math.floor(i*r/(16*[1,2,3,6][a]))))>>5,(31&e)<<3,r<<6|n<<1,s|o<<1,0]),{sampleRate:r,channelCount:[2,1,2,3,3,4,4,5][o]+s,Ia:e,ra:i})}function yq(e){this.j=e,this.h=0,this.g=new Map,this.i=null}(p=yB.prototype).destroy=function(){this.g.clear()},p.isSupported=function(e){return"audio/aac"==e.toLowerCase().split(";")[0]&&ti(this.convertCodecs("audio",e))},p.convertCodecs=function(e,t){return"audio/aac"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(nW(t)||"mp4a.40.2")+'"':t},p.getOriginalMimeType=function(){return this.j},p.transmux=function(e,t,n,i){for(var r=eD(e),a=oi(r),o=a.length;o<r.length&&!yO(r,o);o++);if(e=1e3*n.endTime,(a=on(a)).length&&n&&(a=a.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&(e=a.data),!(a=yL(r,o)))return Promise.reject(new eN(2,3,3018,n?n.R()[0]:null));t.audioSamplingRate=a.sampleRate,t.channelsCount=a.channelCount;for(var s=[];o<r.length;){var u=yR(r,o);if(!u)return Promise.reject(new eN(2,3,3018,n?n.R()[0]:null));var l=u.Vd+u.ra;o+l<=r.length&&s.push({data:r.subarray(o+u.Vd,o+l),size:u.ra,duration:1024,mb:0,flags:yN}),o+=l}return e=Math.floor(e*(r=a.sampleRate)/1e3),i=new am([i={id:t.id,type:"audio",codecs:a.codec,timescale:r,duration:i,yb:[],Ia:new Uint8Array([]),Qa:new Uint8Array([]),Ya:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,sb:s},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=av(i),this.g.set(n,t)),n=this.i!==t,i=aS(i),this.i=t,this.h++,n?Promise.resolve(t=eQ(t,i)):Promise.resolve(i)},q("shaka.transmuxer.AacTransmuxer",yB),yB.prototype.transmux=yB.prototype.transmux,yB.prototype.getOriginalMimeType=yB.prototype.getOriginalMimeType,yB.prototype.convertCodecs=yB.prototype.convertCodecs,yB.prototype.isSupported=yB.prototype.isSupported,yB.prototype.destroy=yB.prototype.destroy,nP("audio/aac",function(){return new yB("audio/aac")},nL),(p=yV.prototype).destroy=function(){this.g.clear()},p.isSupported=function(e){return"audio/ac3"==e.toLowerCase().split(";")[0]&&ti(this.convertCodecs("audio",e))},p.convertCodecs=function(e,t){return"audio/ac3"==t.toLowerCase().split(";")[0]?er().fe()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':t},p.getOriginalMimeType=function(){return this.j},p.transmux=function(e,t,n,i){e=eD(e);for(var r=oi(e),a=r.length;a<e.length&&!function(e,t){if(11===e[t]&&119===e[t+1]){var n,i,r=0,a=5;for(t+=5;a>0;){i=e[t];var o=Math.min(a,8),s=8-o;n=(i&(n=0xff000000>>>24+s<<s))>>s,r=r?r<<o|n:n,t+=1,a-=o}if(r<16)return!0}return!1}(e,a);a++);var o=1e3*n.endTime;(r=on(r)).length&&n&&(r=r.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&(o=r.data),r=0;for(var s=new Uint8Array([]),u=[];a<e.length;){var l=yF(e,a);if(!l)return Promise.reject(new eN(2,3,3018,n?n.R()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,s=l.Ia,u.push({data:e.subarray(a,a+l.ra),size:l.ra,duration:1536,mb:0,flags:yN}),a+=l.ra}return e=Math.floor(o*r/1e3),i=new am([i={id:t.id,type:"audio",codecs:"ac-3",timescale:r,duration:i,yb:[],Ia:s,Qa:new Uint8Array([]),Ya:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,sb:u},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=av(i),this.g.set(n,t)),n=this.i!==t,i=aS(i),this.i=t,this.h++,n?Promise.resolve(t=eQ(t,i)):Promise.resolve(i)},q("shaka.transmuxer.Ac3Transmuxer",yV),yV.prototype.transmux=yV.prototype.transmux,yV.prototype.getOriginalMimeType=yV.prototype.getOriginalMimeType,yV.prototype.convertCodecs=yV.prototype.convertCodecs,yV.prototype.isSupported=yV.prototype.isSupported,yV.prototype.destroy=yV.prototype.destroy,nP("audio/ac3",function(){return new yV("audio/ac3")},nL),(p=yq.prototype).destroy=function(){this.g.clear()},p.isSupported=function(e){return"audio/ec3"==e.toLowerCase().split(";")[0]&&ti(this.convertCodecs("audio",e))},p.convertCodecs=function(e,t){return"audio/ec3"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':t},p.getOriginalMimeType=function(){return this.j},p.transmux=function(e,t,n,i){e=eD(e);for(var r=oi(e),a=r.length;a<e.length&&(e[a]<<8|e[a+1])!=2935;a++);var o=1e3*n.endTime;(r=on(r)).length&&n&&(r=r.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&(o=r.data),r=0;for(var s=new Uint8Array([]),u=[];a<e.length;){var l=yH(e,a);if(!l)return Promise.reject(new eN(2,3,3018,n?n.R()[0]:null));
1t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,s=l.Ia,u.push({data:e.subarray(a,a+l.ra),size:l.ra,duration:1536,mb:0,flags:yN}),a+=l.ra}return e=Math.floor(o*r/1e3),i=new am([i={id:t.id,type:"audio",codecs:"ec-3",timescale:r,duration:i,yb:[],Ia:s,Qa:new Uint8Array([]),Ya:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,sb:u},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=av(i),this.g.set(n,t)),n=this.i!==t,i=aS(i),this.i=t,this.h++,n?Promise.resolve(t=eQ(t,i)):Promise.resolve(i)},q("shaka.transmuxer.Ec3Transmuxer",yq),yq.prototype.transmux=yq.prototype.transmux,yq.prototype.getOriginalMimeType=yq.prototype.getOriginalMimeType,yq.prototype.convertCodecs=yq.prototype.convertCodecs,yq.prototype.isSupported=yq.prototype.isSupported,yq.prototype.destroy=yq.prototype.destroy,nP("audio/ec3",function(){return new yq("audio/ec3")},nL);var yG=[100,110,122,244,44,83,86,118,128,138,139,134];function yK(e,t){var n=e[t+1]>>3&3,i=e[t+1]>>1&3,r=e[t+2]>>4&15,a=e[t+2]>>2&3;if(1!==n&&0!==r&&15!==r&&3!==a){var o=e[t+3]>>6;r=1e3*yX[(3===n?3-i:3===i?3:4)*14+r-1],a=yY[(3===n?0:2===n?1:2)*3+a],n=yJ[n][i];var s=yQ[i],u=Math.floor(n*r/a+(e[t+2]>>1&1))*s,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(l=l?parseInt(l[1],10):0)&&l<=87&&2===i&&r>=224e3&&0===o&&(e[t+3]|=128),{sampleRate:a,channelCount:3===o?1:2,ra:u,Rk:8*n*s}}return null}function yW(e,t){return 255===e[t]&&(224&e[t+1])==224&&(6&e[t+1])!=0}function yz(e,t){if(t+1<e.length&&yW(e,t)){var n=yK(e,t),i=4;return n&&n.ra&&(i=n.ra),(t+=i)===e.length||t+1<e.length&&yW(e,t)}return!1}var yX=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],yY=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],yJ=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],yQ=[0,1,1,4];function y$(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function yZ(e){this.h=e,this.g=null}function y0(e){this.h=e,(this.g=p8.get("ISOBoxer")())&&function(e){function t(){this._procFullBox(),1&this.flags&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8)),this._procField("sample_count","uint",32),this._procEntries("entry",this.sample_count,function(e){this._procEntryField(e,"InitializationVector","data",8),2&this.flags&&(this._procEntryField(e,"NumberOfEntries","uint",16),this._procSubEntries(e,"clearAndCryptedData",e.NumberOfEntries,function(e){this._procEntryField(e,"BytesOfClearData","uint",16),this._procEntryField(e,"BytesOfEncryptedData","uint",32)}))})}e.g.addBoxProcessor("saio",function(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("entry_count","uint",32),this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)}),e.g.addBoxProcessor("saiz",function(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("default_sample_info_size","uint",8),this._procField("sample_count","uint",32),0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)}),e.g.addBoxProcessor("senc",t),e.g.addBoxProcessor("uuid",function(){for(var e=!0,n=0;n<16;n++)this.usertype[n]!==y2[n]&&(e=!1);e&&(this._parsing&&(this.type="sepiff"),t.call(this))})}(this)}function y1(e,t){for(var n=8,i=0;i<e.boxes.length&&e.boxes[i].type!==t;i++)n+=e.boxes[i].size;return n}(p=y$.prototype).destroy=function(){this.g.clear()},p.isSupported=function(e){return"audio/mpeg"==e.toLowerCase().split(";")[0]&&ti(this.convertCodecs("audio",e))},p.convertCodecs=function(e,t){return"audio/mpeg"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':t},p.getOriginalMimeType=function(){return this.j},p.transmux=function(e,t,n,i){for(var r,a=eD(e),o=oi(a).length;o<a.length&&!yz(a,o);o++);for(e=[];o<a.length;){var s=yK(a,o);if(!s)return Promise.reject(new eN(2,3,3018,n?n.R()[0]:null));r||(r=s),o+s.ra<=a.length&&e.push({data:a.subarray(o,o+s.ra),size:s.ra,duration:1152,mb:0,flags:yN}),o+=s.ra}return r?(a=9e4*r.Rk/r.sampleRate*this.h,i=new am([i={id:t.id,type:"audio",codecs:"mp3",timescale:r.sampleRate,duration:i,yb:[],Ia:new Uint8Array([]),Qa:new Uint8Array([]),Ya:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,sb:e},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=av(i),this.g.set(n,t)),n=this.i!==t,i=aS(i),this.i=t,this.h++,n?Promise.resolve(t=eQ(t,i)):Promise.resolve(i)):Promise.reject(new eN(2,3,3018,n?n.R()[0]:null))},q("shaka.transmuxer.Mp3Transmuxer",y$),y$.prototype.transmux=y$.prototype.transmux,y$.prototype.getOriginalMimeType=y$.prototype.getOriginalMimeType,y$.prototype.convertCodecs=y$.prototype.convertCodecs,y$.prototype.isSupported=y$.prototype.isSupported,y$.prototype.destroy=y$.prototype.destroy,nP("audio/mpeg",function(){return new y$("audio/mpeg")},nL),(p=yZ.prototype).destroy=function(){},p.isSupported=function(e){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var t=nW(e).split(","),n=e3("audio",t);return t=e3("video",t),!!n&&!t&&"mp3"==nq(n)&&ti(this.convertCodecs("audio",e))},p.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?"audio/mpeg":t},p.getOriginalMimeType=function(){return this.h},p.transmux=function(e,t,n,i,r){if(this.g?this.g.clearData():this.g=new ov,this.g.Hf(n.i),e=eD(e),"mp3"!=(e=this.g.parse(e)).Rd().audio||"audio"!=r)return Promise.reject(new eN(2,3,3018,n?n.R()[0]:null));for(n=new Uint8Array([]),e=(r=S(e.qb())).next();!e.done;e=r.next())if(e=e.value.data)for(t=0;t<e.length;)(i=yK(e,t))?(t+i.ra<=e.length&&(n=eQ(n,e.subarray(t,t+i.ra))),t+=i.ra):t++;return Promise.resolve(n)},q("shaka.transmuxer.MpegTsTransmuxer",yZ),yZ.prototype.transmux=yZ.prototype.transmux,yZ.prototype.getOriginalMimeType=yZ.prototype.getOriginalMimeType,yZ.prototype.convertCodecs=yZ.prototype.convertCodecs,yZ.prototype.isSupported=yZ.prototype.isSupported,yZ.prototype.destroy=yZ.prototype.destroy,nP("video/mp2t",function(){return new yZ("video/mp2t")},nO),(p=y0.prototype).destroy=function(){},p.isSupported=function(e,t){var n=e.startsWith("mss/");return!!this.g&&!!n&&(t?ti(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),ti(t)||ti(e)))},p.convertCodecs=function(e,t){return t.replace("mss/","")},p.getOriginalMimeType=function(){return this.h},p.transmux=function(e,t,n){if(!n)return Promise.resolve(eD(e));if(!t.mssPrivateData)return Promise.reject(new eN(2,3,3020,n?n.R()[0]:null));try{var i,r=this.g.parseBuffer(e),a=r.fetch("tfhd");a.track_ID=t.id+1;var o=r.fetch("tfdt"),s=r.fetch("traf");null===o&&((o=this.g.createFullBox("tfdt",s,a)).version=1,o.flags=0,o.baseMediaDecodeTime=Math.floor(n.startTime*t.mssPrivateData.timescale));var u=r.fetch("trun"),l=r.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var d=r.fetch("tfrf");d&&d._parent.boxes.splice(d._parent.boxes.indexOf(d),1);var c=r.fetch("sepiff");if(null!==c){c.type="senc",c.usertype=void 0;var h=r.fetch("saio");if(null===h){(h=this.g.createFullBox("saio",s)).version=0,h.flags=0,h.entry_count=1,h.offset=[0];var p=this.g.createFullBox("saiz",s);if(p.version=0,p.flags=0,p.sample_count=c.sample_count,p.default_sample_info_size=0,p.sample_info_size=[],2&c.flags)for(i=0;i<c.sample_count;i+=1)p.sample_info_size[i]=10+6*c.entry[i].NumberOfEntries;else p.default_sample_info_size=8}}a.flags&=0xfffffe,a.flags|=131072,u.flags|=1;var f=r.fetch("moof");u.data_offset=f.getLength()+8;var g=r.fetch("saio");null!==g&&(g.offset[0]=y1(f,"traf")+y1(s,"senc")+16);var m=eD(r.write());return Promise.resolve(m)}catch(e){return e instanceof eN?Promise.reject(e):Promise.reject(new eN(2,3,3022,n?n.R()[0]:null))}},q("shaka.transmuxer.MssTransmuxer",y0),y0.prototype.transmux=y0.prototype.transmux,y0.prototype.getOriginalMimeType=y0.prototype.getOriginalMimeType,y0.prototype.convertCodecs=y0.prototype.convertCodecs,y0.prototype.isSupported=y0.prototype.isSupported,y0.prototype.destroy=y0.prototype.destroy;var y2=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);function y3(e){this.m=e,this.g=0,this.j=new Map,this.l=this.i=this.h=null}function y4(e){return"video/mp2t"==(e=e.toLowerCase().split(";")[0])||"audio/mp2t"==e}nP("mss/audio/mp4",function(){return new y0("mss/audio/mp4")},nL),nP("mss/video/mp4",function(){return new y0("mss/video/mp4")},nL),(p=y3.prototype).destroy=function(){this.j.clear(),this.i&&this.i.destroy()},p.isSupported=function(e,t){if(!y4(e))return!1;var n=e;t&&(n=this.convertCodecs(t,e));var i=nW(n).split(",");return n=e3("audio",i),i=e3("video",i),(!n||!!y5.includes(n=nq(n)))&&(!i||!!y6.includes(n=nq(i)))&&(t?ti(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),ti(t)||ti(e)))},p.convertCodecs=function(e,t){return y4(t)?(t=nW(t).replace("mp4a.40.34","mp3").split(",").map(function(e){return iy(e,"audio/mp4")}).map(ib).join(","),"audio"==e?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},p.getOriginalMimeType=function(){return this.m},p.transmux=function(e,t,n,i,r){var a=eD(e);if("audio"==r&&!oA(a)){for(var o=oi(a),s=o.length;s<a.length;s++)if(yz(a,s))return Promise.reject(new eN(2,3,3018,n?n.R()[0]:null));for(s=o.length;s<a.length;s++)if(yO(a,s))return this.i||(this.i=new yB("audio/aac")),this.i.transmux(e,t,n,i,r);return Promise.reject(new eN(2,3,3018,n?n.R()[0]:null))}this.h?this.h.clearData():this.h=new ov,this.h.Hf(n.i);var u=this.h.parse(a),l=[],d=u.Rd();try{var c=null;if("video"==r){switch(d.video){case"avc":var h=[],p=null,f=u.ld(),g=function(e){function t(e){r={data:o,frame:!1,isKeyframe:!1,pts:e.pts,dts:e.dts,nalus:[]}}function n(){if(r&&r.nalus.length&&r.frame){for(var e=4*r.nalus.length,t=S(r.nalus),n=t.next();!n.done;n=t.next())e+=n.value.fullData.byteLength;
1e=new Uint8Array(e),t=0,n=S(r.nalus);for(var a=n.next();!a.done;a=n.next()){var o=(a=a.value).fullData.byteLength;e[t]=o>>24&255,e[t+1]=o>>16&255,e[t+2]=o>>8&255,e[t+3]=255&o,e.set(a.fullData,t+4),t+=4+o}r.data=e,i.push(r)}}for(var i=[],r=null,a=!1,o=new Uint8Array(0),s=0;s<e.length;s++){var u=e[s],l=u.nalus,d=!1;r&&l.length&&!a&&(n(),t(u)),l=S(u.nalus);for(var c=l.next();!c.done;c=l.next()){c=c.value;var h=!1;switch(c.type){case 1:var p,f=!1;h=!0;var g=c.data;d&&g.length>4&&(oh(p=new oo(g)),2===(g=oh(p))||4===g||7===g||9===g)&&(f=!0),f&&r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(u),r.frame=!0,r.isKeyframe=f;break;case 5:h=!0,r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(u),r.frame=!0,r.isKeyframe=!0;break;case 6:case 8:case 12:h=!0;break;case 7:d=h=!0;break;case 9:a=h=!0,r&&r.frame&&(n(),r=null),r||t(u);break;default:h=!1}r&&h&&r.nalus.push(c)}}return n(),i}(f);if(!g.length)throw new eN(2,3,3023,n?n.R()[0]:null);for(var m=0;m<g.length;m++){var v=g[m];null!=p||(p=v.dts);var y=void 0;y=m+1<g.length?(g[m+1].dts||0)-(v.dts||0):g.length>1?(v.dts||0)-(g[m-1].dts||0):(n.endTime-n.startTime)*9e4,h.push({data:v.data,size:v.data.byteLength,duration:y,mb:Math.round((v.pts||0)-(v.dts||0)),flags:v.isKeyframe?yj:yU})}for(var b=[],w=S(f),T=w.next();!T.done;T=w.next())b.push.apply(b,x(T.value.nalus));var A=function(e){if(!e.length)return null;var t=e.find(function(e){return 7==e.type});if(e=e.find(function(e){return 8==e.type}),!t||!e)return null;var n=new oo(t.data),i=og(n);if(og(n),og(n),oc(n),yG.includes(i)&&(3===(i=oh(n))&&ou(n,1),oc(n),oc(n),ou(n,1),of(n))){i=3!==i?8:12;for(var r=0;r<i;r++)of(n)&&(r<6?om(n,16):om(n,64))}if(oc(n),0===(i=oh(n)))oh(n);else if(1===i)for(ou(n,1),oc(n),oc(n),i=oh(n),r=0;r<i;r++)oc(n);oc(n),ou(n,1);var a=oh(n),o=oh(n),s=ol(n,1);0===s&&ou(n,1),ou(n,1);var u=0,l=0,d=0,c=0;if(of(n)&&(u=oh(n),l=oh(n),d=oh(n),c=oh(n)),r=i=1,of(n)&&of(n)){var h=og(n);h>0&&h<=16?(i=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][h-1],r=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][h-1]):255===h&&(i=ol(n,16),r=ol(n,16))}return n=(2-s)*(o+1)*16-2*d-2*c,a=(a+1)*16-2*u-2*l,u=(t=t.fullData).byteLength,l=(e=e.fullData).byteLength,o=0,(s=new Uint8Array(11+u+l))[o++]=1,s[o++]=t[1],s[o++]=t[2],s[o++]=t[3],s[o++]=255,s[o++]=225,s[o++]=u>>>8&255,s[o++]=255&u,s.set(t,o),o+=u,s[o++]=1,s[o++]=l>>>8&255,s[o++]=255&l,s.set(e,o),{height:n,width:a,Qa:s,Ya:i,$a:r}}(b);if(!A||null==p)throw new eN(2,3,3018,n?n.R()[0]:null);t.height=t.height||A.height,t.width=t.width||A.width,c={id:t.id,type:"video",codecs:"avc1",timescale:9e4,duration:i,yb:[],Ia:new Uint8Array([]),Qa:A.Qa,Ya:A.Ya,$a:A.$a,data:{sequenceNumber:this.g,baseMediaDecodeTime:p,sb:h},stream:t};break;case"hvc":var E=[],k=null,I=[],C=u.ld();if(!C.length)throw new eN(2,3,3023,n?n.R()[0]:null);for(var M=0;M<C.length;M++){var P=C[M],D=P.nalus;I.push.apply(I,x(D));for(var R=!1,L=[],O=!1,N=S(D),j=N.next();!j.done;j=N.next()){var U=j.value;switch(U.type){case 1:case 0:var B=O=!0;break;case 19:case 20:case 21:R=B=O=!0;break;case 32:case 33:case 34:case 39:case 40:B=!0;break;case 35:O=B=!0;break;default:B=!1}if(O&&B){var F=U.fullData.byteLength,V=new Uint8Array(4);V[0]=F>>24&255,V[1]=F>>16&255,V[2]=F>>8&255,V[3]=255&F,L.push(V),L.push(U.fullData)}}var H=L.length?{data:eQ.apply(eK,x(L)),isKeyframe:R}:null;if(H){null==k&&null!=P.dts&&(k=P.dts);var q=void 0;q=M+1<C.length?(C[M+1].dts||0)-(P.dts||0):C.length>1?(P.dts||0)-(C[M-1].dts||0):(n.endTime-n.startTime)*9e4,E.push({data:H.data,size:H.data.byteLength,duration:q,mb:Math.round((P.pts||0)-(P.dts||0)),flags:H.isKeyframe?yj:yU})}}var G=function(e){if(!e.length)return null;var t,n,i,r,a,o,s,u,l,d,c=e.find(function(e){return 32==e.type}),h=e.find(function(e){return 33==e.type}),p=e.find(function(e){return 34==e.type});if(!c||!h||!p)return null;var f=(t=c.fullData,n=new oo(t,!0),og(n),og(n),ol(n,4),ol(n,2),ol(n,6),{Vg:(t=ol(n,3))+1,Ch:n=of(n)});e=function(e){og(e=new oo(e,!0)),og(e);var t=0,n=0,i=0,r=0;ol(e,4);var a=ol(e,3);of(e);for(var o=ol(e,2),s=ol(e,1),u=ol(e,5),l=og(e),d=og(e),c=og(e),h=og(e),p=og(e),f=og(e),g=og(e),m=og(e),v=og(e),y=og(e),b=og(e),w=[],T=[],S=0;S<a;S++)w.push(of(e)),T.push(of(e));if(a>0)for(S=a;
1S<8;S++)ol(e,2);for(S=0;S<a;S++)w[S]&&ol(e,88),T[S]&&og(e);oh(e),3==(w=oh(e))&&ol(e,1),T=oh(e),S=oh(e),of(e)&&(t+=oh(e),n+=oh(e),i+=oh(e),r+=oh(e));var x=oh(e),A=oh(e),E=oh(e);if(of(e))for(var k=0;k<=a;k++)oh(e),oh(e),oh(e);else oh(e),oh(e),oh(e);if(oh(e),oh(e),oh(e),oh(e),oh(e),oh(e),of(e)&&of(e))for(k=0;k<4;k++)for(var I=0;I<(3===k?2:6);I++)if(of(e)){var C=Math.min(64,1<<4+(k<<1));k>1&&op(e);for(var M=0;M<C;M++)op(e)}else oh(e);for(of(e),of(e),of(e)&&(og(e),oh(e),oh(e),of(e)),k=oh(e),C=I=0;C<k;C++)if(M=!1,0!==C&&(M=of(e)),M){C===k&&oh(e),of(e),oh(e);for(var P=M=0;P<=I;P++){var D=of(e),R=!1;D||(R=of(e)),(D||R)&&M++}I=M}else{for(I=(P=oh(e))+(M=oh(e)),D=0;D<P;D++)oh(e),of(e);for(P=0;P<M;P++)oh(e),of(e)}if(of(e))for(k=oh(e),I=0;I<k;I++){for(C=0;C<E+4;C++)ol(e,1);ol(e,1)}if(k=E=1,I=0,of(e),of(e),of(e)){if(of(e)&&(C=og(e),M=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],P=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],C>0&&C<=16?(E=M[C-1],k=P[C-1]):255===C&&(E=ol(e,16),k=ol(e,16))),of(e)&&of(e),of(e)&&(ol(e,3),of(e),of(e)&&(og(e),og(e),og(e))),of(e)&&(oh(e),oh(e)),of(e),of(e),of(e),(C=of(e))&&(oh(e),oh(e),oh(e),oh(e)),of(e)&&(ol(e,32),ol(e,32),of(e)&&oh(e),of(e)))for(P=!1,C=of(e),M=of(e),(C||M)&&((P=of(e))&&(og(e),ol(e,5),of(e),ol(e,5)),ol(e,4),ol(e,4),P&&ol(e,4),ol(e,5),ol(e,5),ol(e,5)),D=0;D<=a;D++){var L=!0;R=1,of(e)||(L=of(e));var O=!1;if(L?oh(e):O=of(e),O||(R=oh(e)+1),C){for(L=0;L<R;L++)oh(e),oh(e),P&&(oh(e),oh(e));of(e)}if(M){for(L=0;L<R;L++)oh(e),oh(e),P&&(oh(e),oh(e));of(e)}}of(e)&&(of(e),of(e),of(e),I=oh(e),oh(e),oh(e),oh(e),oh(e))}return{xg:b,Dg:o,Eg:s,Cg:u,yg:l,zg:d,Ag:c,Bg:h,qg:p,rg:f,sg:g,ug:m,vg:v,wg:y,nf:I,ig:0,gg:w,fg:x,eg:A,width:T-(t+n)*(1===w||2===w?2:1),height:S-(i+r)*(1===w?2:1),Tk:E,Sk:k}}(h.fullData);var g=(i=p.fullData,r=new oo(i,!0),og(r),og(r),oh(r),oh(r),of(r),of(r),ol(r,3),of(r),of(r),oh(r),oh(r),op(r),of(r),of(r),of(r)&&oh(r),op(r),op(r),of(r),of(r),of(r),of(r),i=of(r),r=of(r),a=1,r&&i?a=0:r?a=3:i&&(a=2),{Xg:a});return o=c.fullData,s=h.fullData,u=p.fullData,l={Vg:f.Vg,Ch:f.Ch,Dg:e.Dg,Eg:e.Eg,xg:e.xg,Cg:e.Cg,yg:e.yg,zg:e.zg,Ag:e.Ag,Bg:e.Bg,qg:e.qg,rg:e.rg,sg:e.sg,ug:e.ug,vg:e.vg,wg:e.wg,ig:e.ig,nf:e.nf,gg:e.gg,fg:e.fg,eg:e.eg,Xg:g.Xg},(d=new Uint8Array(23+(5+o.byteLength)+(5+s.byteLength)+(5+u.byteLength)))[0]=1,d[1]=(3&l.Dg)<<6|!!l.Eg<<5|31&l.Cg,d[2]=l.yg,d[3]=l.zg,d[4]=l.Ag,d[5]=l.Bg,d[6]=l.qg,d[7]=l.rg,d[8]=l.sg,d[9]=l.ug,d[10]=l.vg,d[11]=l.wg,d[12]=l.xg,d[13]=240|(3840&l.nf)>>8,d[14]=255&l.nf,d[15]=252|3&l.Xg,d[16]=252|3&l.gg,d[17]=248|7&l.fg,d[18]=248|7&l.eg,d[19]=0,d[20]=0,d[21]=(3&l.ig)<<6|(7&l.Vg)<<3|!!l.Ch<<2|3,d[22]=3,d[23]=160,d[24]=0,d[25]=1,d[26]=(65280&o.byteLength)>>8,d[27]=255&o.byteLength,d.set(o,28),d[23+(5+o.byteLength)]=161,d[23+(5+o.byteLength)+1]=0,d[23+(5+o.byteLength)+2]=1,d[23+(5+o.byteLength)+3]=(65280&s.byteLength)>>8,d[23+(5+o.byteLength)+4]=255&s.byteLength,d.set(s,23+(5+o.byteLength)+5),d[23+(5+o.byteLength+5+s.byteLength)]=162,d[23+(5+o.byteLength+5+s.byteLength)+1]=0,d[23+(5+o.byteLength+5+s.byteLength)+2]=1,d[23+(5+o.byteLength+5+s.byteLength)+3]=(65280&u.byteLength)>>8,d[23+(5+o.byteLength+5+s.byteLength)+4]=255&u.byteLength,d.set(u,23+(5+o.byteLength+5+s.byteLength)+5),c=d,{height:e.height,width:e.width,Qa:c,Ya:e.Tk,$a:e.Sk}}(I);if(!G||null==k)throw new eN(2,3,3018,n?n.R()[0]:null);t.height=t.height||G.height,t.width=t.width||G.width,c={id:t.id,type:"video",codecs:"hvc1",timescale:9e4,duration:i,yb:[],Ia:new Uint8Array([]),Qa:G.Qa,Ya:G.Ya,$a:G.$a,data:{sequenceNumber:this.g,baseMediaDecodeTime:k,sb:E},stream:t}}c&&(l.push(c),c=null)}if("audio"==r){switch(d.audio){case"aac":for(var K,W=[],z=null,X=null,Y=null,J=S(u.qb()),Q=J.next();!Q.done;Q=J.next()){var $=Q.value,Z=$.data;if(Z){var ee=0;if(-1==X&&Y)Z=eQ(Y,$.data),X=null;else if(null!=X&&Y){ee=Math.max(0,X);var et=eQ(Y,Z.subarray(0,ee));W.push({data:et,size:et.byteLength,duration:1024,mb:0,flags:yN}),X=Y=null}if(!(K=yL(Z,ee)))throw new eN(2,3,3018,n?n.R()[0]:null);for(t.audioSamplingRate=K.sampleRate,t.channelsCount=K.channelCount,null==z&&null!==$.pts&&(z=$.pts);ee<Z.length;){var en=yR(Z,ee);if(!en){Y=Z.subarray(ee,Z.length),X=-1;break}var ei=en.Vd+en.ra;X=Math.max(0,ee+ei-Z.length),0!=X?Y=Z.subarray(ee+en.Vd,ee+ei):ee+ei<=Z.length&&W.push({data:Z.subarray(ee+en.Vd,ee+ei),size:en.ra,duration:1024,mb:0,flags:yN}
1),ee+=ei}}}if(!K||null==z){z=9e4*n.startTime;var er=e3("audio",t.codecs.split(","));if(!er||!t.channelsCount||!t.audioSamplingRate)throw new eN(2,3,3018,n?n.R()[0]:null);K={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,codec:er};var ea=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t||3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}(er,t.channelsCount);if(!ea)throw new eN(2,3,3018,n?n.R()[0]:null);for(var eo=z+(n.endTime-n.startTime)*9e4,es=z;es<eo;)W.push({data:ea,size:ea.byteLength,duration:1024,mb:0,flags:yN}),es+=1024/K.sampleRate*9e4}var eu=K.sampleRate,el=z/9e4*eu;c={id:t.id,type:"audio",codecs:K.codec,timescale:eu,duration:i,yb:[],Ia:new Uint8Array([]),Qa:new Uint8Array([]),Ya:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:el,sb:W},stream:t};break;case"ac3":for(var ed=[],ec=0,eh=new Uint8Array([]),ep=null,ef=S(u.qb()),eg=ef.next();!eg.done;eg=ef.next()){var em=eg.value,ev=em.data;null==ep&&null!==em.pts&&(ep=em.pts);for(var ey=0;ey<ev.length;){var eb=yF(ev,ey);eb?(t.audioSamplingRate=eb.sampleRate,t.channelsCount=eb.channelCount,ec=eb.sampleRate,eh=eb.Ia,ed.push({data:ev.subarray(ey,ey+eb.ra),size:eb.ra,duration:1536,mb:0,flags:yN}),ey+=eb.ra):ey++}}if(0==ec||0==eh.byteLength||null==ep)throw new eN(2,3,3018,n?n.R()[0]:null);var e_=ep/9e4*ec;c={id:t.id,type:"audio",codecs:"ac-3",timescale:ec,duration:i,yb:[],Ia:eh,Qa:new Uint8Array([]),Ya:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:e_,sb:ed},stream:t};break;case"ec3":for(var ew=[],eT=0,eS=new Uint8Array([]),ex=null,eA=S(u.qb()),eE=eA.next();!eE.done;eE=eA.next()){var ek=eE.value,eI=ek.data;null==ex&&null!==ek.pts&&(ex=ek.pts);for(var eC=0;eC<eI.length;){var eM=yH(eI,eC);eM?(t.audioSamplingRate=eM.sampleRate,t.channelsCount=eM.channelCount,eT=eM.sampleRate,eS=eM.Ia,ew.push({data:eI.subarray(eC,eC+eM.ra),size:eM.ra,duration:1536,mb:0,flags:yN}),eC+=eM.ra):eC++}}if(0==eT||0==eS.byteLength||null==ex)throw new eN(2,3,3018,n?n.R()[0]:null);var eP=ex/9e4*eT;c={id:t.id,type:"audio",codecs:"ec-3",timescale:eT,duration:i,yb:[],Ia:eS,Qa:new Uint8Array([]),Ya:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:eP,sb:ew},stream:t};break;case"mp3":for(var eR,eL=[],eO=null,ej=S(u.qb()),eU=ej.next();!eU.done;eU=ej.next()){var eB=eU.value,eF=eB.data;if(eF){null==eO&&null!==eB.pts&&(eO=eB.pts);for(var eV=0;eV<eF.length;){var eH=yK(eF,eV);eH?(eR||(eR=eH),eV+eH.ra<=eF.length&&eL.push({data:eF.subarray(eV,eV+eH.ra),size:eH.ra,duration:1152,mb:0,flags:yN}),eV+=eH.ra):eV++}}}if(!eR||null==eO)throw new eN(2,3,3018,n?n.R()[0]:null);var eq=eR.sampleRate,eG=eO/9e4*eq;c={id:t.id,type:"audio",codecs:"mp3",timescale:eq,duration:i,yb:[],Ia:new Uint8Array([]),Qa:new Uint8Array([]),Ya:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:eG,sb:eL},stream:t};break;case"opus":var eW=[],ez=null,eX=u.J;if(!eX)throw new eN(2,3,3018,n?n.R()[0]:null);var eY=[];switch(eX.qj){case 1:case 2:eY=[0];break;case 0:eY=[255,1,1,0,1];break;case 128:eY=[255,2,0,0,1];break;case 3:eY=[1,2,1,0,2,1];break;case 4:eY=[1,2,2,0,1,2,3];break;case 5:eY=[1,3,2,0,4,1,2,3];break;case 6:eY=[1,4,2,0,4,1,2,3,5];break;case 7:eY=[1,4,2,0,4,1,2,3,5,6];break;case 8:eY=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:eY=[1,1,2,0,1];break;case 131:eY=[1,1,3,0,1,2];break;case 132:eY=[1,1,4,0,1,2,3];break;case 133:eY=[1,1,5,0,1,2,3,4];break;case 134:eY=[1,1,6,0,1,2,3,4,5];break;case 135:eY=[1,1,7,0,1,2,3,4,5,6];break;case 136:eY=[1,1,8,0,1,2,3,4,5,6,7]}for(var eJ=new Uint8Array([0,eX.channelCount,0,0,eX.sampleRate>>>24&255,eX.sampleRate>>>17&255,eX.sampleRate>>>8&255,eX.sampleRate>>>0&255,0,0].concat(x(eY))),e$=eX.sampleRate,eZ=S(u.qb()),e0=eZ.next();!e0.done;e0=eZ.next()){var e1=e0.value,e2=e1.data;null==ez&&null!==e1.pts&&(ez=e1.pts);for(var e4=0;e4<e2.length;){for(var e5=(16&e2[e4+1])!=0,e6=(8&e2[e4+1])!=0,e8=e4+2,e9=0;
1255===e2[e8];)e9+=255,e8+=1;e9+=e2[e8],e8+=1,e8+=2*!!e5,e8+=2*!!e6;var e7=e2.slice(e8,e8+e9);eW.push({data:e7,size:e7.byteLength,duration:960,mb:0,flags:yN}),e4=e8+e9}}if(0==eJ.byteLength||null==ez)throw new eN(2,3,3018,n?n.R()[0]:null);t.audioSamplingRate=eX.sampleRate,t.channelsCount=eX.channelCount;var te=ez/9e4*e$;c={id:t.id,type:"audio",codecs:"opus",timescale:e$,duration:i,yb:[],Ia:eJ,Qa:new Uint8Array([]),Ya:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:te,sb:eW},stream:t}}c&&(l.push(c),c=null)}}catch(e){return e&&3023==e.code?Promise.resolve(new Uint8Array([])):Promise.reject(e)}if(!l.length)return Promise.reject(new eN(2,3,3018,n?n.R()[0]:null));var tt=new am(l),tn=t.id+"_"+n.i;if(this.j.has(tn))var ti=this.j.get(tn);else ti=av(tt),this.j.set(tn,ti);var tr=this.l!==ti,ta=aS(tt);return(this.l=ti,this.g++,tr)?Promise.resolve(eQ(ti,ta)):Promise.resolve(ta)},q("shaka.transmuxer.TsTransmuxer",y3),y3.prototype.transmux=y3.prototype.transmux,y3.prototype.getOriginalMimeType=y3.prototype.getOriginalMimeType,y3.prototype.convertCodecs=y3.prototype.convertCodecs,y3.prototype.isSupported=y3.prototype.isSupported,y3.prototype.destroy=y3.prototype.destroy;var y5=["aac","ac-3","ec-3","mp3","opus"],y6=["avc","hevc"];function y8(){}nP("video/mp2t",function(){return new y3("video/mp2t")},nN),nP("audio/mp2t",function(){return new y3("audio/mp2t")},nN),w(y8,uy),q("shaka.util.FairPlayUtils",y8)}).call(i,n,n,void 0),void 0!==t)for(var r in i.shaka)t[r]=i.shaka[r];else if("function"==typeof define&&define.amd){let t;e.r,exports,module,void 0!==(t=i.shaka)&&e.v(t)}else n.shaka=i.shaka},()=>(n||(t((n={exports:{}}).exports,n),t=null),n.exports)),n6=(e=>{let t={};for(var n in e)nJ(t,n,{get:e[n],enumerable:!0});return nJ(t,Symbol.toStringTag,{value:"Module"}),t})({});r=n1(nJ(null!=(i=n5())?nY(nZ(i)):{},"default",{value:i,enumerable:!0}),i),n1(n6,r,"default");let n8=O.l.create("AutoplayManager");var n9=class{unmute(){this.player_.isStarted&&(this.status=O.f.ALLOWED)}isAllowed(e){if(e&&this.status!==O.f.ALLOWED){let e=this.player_.getElements();for(let t of[e.video,e.adVideo])t.pause();this.status=O.f.ALLOWED}return this.status===O.f.ALLOWED||this.status===O.f.MUTED&&!this.player_.volume}async probe_(){let{video:e}=this.player_.getElements();e.volume=1,e.muted=!1;let t=URL.createObjectURL(new Blob([n7.value],{type:"video/mp4"}));e.src=t;try{await e.play(),this.status=O.f.ALLOWED}catch(t){e.muted=!0;try{await e.play(),this.status=O.f.MUTED}catch(e){}}e.src="",e.load(),URL.revokeObjectURL(t),e.muted=!1,n7.reset(),n8.info('Probed "'.concat(this.status,'"'))}constructor(e){(0,L._)(this,"player_",void 0),(0,L._)(this,"promise",void 0),(0,L._)(this,"status",O.f.DISABLED),this.player_=e,"browser"===e.device.name?this.promise=this.probe_():(n8.info("Device is not capable of autoplay probing, set to allow."),this.status=O.f.ALLOWED,this.promise=Promise.resolve())}};let n7=(o=()=>new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,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,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,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,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,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,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,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,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,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,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,55,167,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,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,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,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,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,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,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,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,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,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,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,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,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,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,55,167,128,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,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,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,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,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,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,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,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,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,0,0,1,15,109,105,110,
1102,0,0,0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49]),{get value(){return void 0===a&&(a=o(),(0,O.u)(a,"Unable to create lazy value")),a},reset(){a=void 0}}),ie=O.l.create("AdCompanionManager");var it=class{destroy(){this.eventManager_.removeAll(),this.pauseAdContainer_.style.display="none"}addPauseAds(e){this.pauseAds_.push(...e)}get pauseAd(){var e,t;return null!=(e=null==(t=this.pauseAdState_)?void 0:t.ad)?e:null}onPlayheadStateChange_(e){if(e.playheadState===O.h.PAUSED){if(!e.userGesture||this.controller_.adBreak)return;let t=this.pauseAds_[this.pauseAdIndex_];t&&(this.showPauseAd_(t),this.pauseAdIndex_+=1)}e.playheadState===O.h.PLAY&&this.clearPauseAd_()}showPauseAd_(e){let{clickThroughUrl:t}=e,n={click:t?()=>{this.firePauseAdImpressions_(e,"click"),window.open(t,"_blank")}:void 0};this.pauseAdState_={adParams:e,ad:n},this.pauseAdContainer_.style.backgroundImage='url("'.concat(e.imageUrl,'")'),this.pauseAdContainer_.style.display="block",this.firePauseAdImpressions_(e,"impression"),this.firePauseAdImpressions_(e,"start"),this.controller_.getPlayer().emit(n2.PauseAdStarted,{pauseAd:n})}clearPauseAd_(){if(!this.pauseAdState_)return;let{adParams:e,ad:t}=this.pauseAdState_;this.pauseAdState_=null,this.pauseAdContainer_.innerHTML="",this.pauseAdContainer_.style.display="none",this.firePauseAdImpressions_(e,"complete"),this.controller_.getPlayer().emit(n2.PauseAdEnded,{pauseAd:t})}firePauseAdImpressions_(e,t){var n;let i=null!=(n=e.impressionUrls[t])?n:[];for(let e of i)new Image().src=e;ie.info('PauseAd impression "'.concat(t,'" (').concat(i.length,")"))}constructor(e){(0,L._)(this,"controller_",void 0),(0,L._)(this,"eventManager_",new O.r),(0,L._)(this,"pauseAdContainer_",void 0),(0,L._)(this,"pauseAdIndex_",0),(0,L._)(this,"pauseAds_",[]),(0,L._)(this,"pauseAdState_",null),this.controller_=e;const t=e.getPlayer(),n=t.getElements();this.pauseAdContainer_=n.pauseAd;const i=this.eventManager_.listen(t);i(n2.PlayheadStateChange,e=>this.onPlayheadStateChange_(e)),i(n2.AdBreakStarted,()=>{this.clearPauseAd_()})}};let ii=O.l.create("AdExtensions");var ir=(m=class e{static mapAdInstance(e){return[]}static mapTimelineAdRegion(t,n){let i=i=>{if("brandmetrics_survey"===i.type){let r=e.parseSchema_(i.type,e.findJSON_(i.content)),a=r.questions[0];return a?{type:"survey",text:a.text,options:a.options,submitAnswer:e=>{O.a.post("https://collector.brandmetrics.com/api/v1/ctv/survey",{measurementId:r.measurementId,suid:r.suid,answers:{[a.id]:e}},{"x-api-key":"6e074a27-8325-45a2-a793-d85f57887812"}),t.end-t.start>4&&n.primary.seekTo(t.end-4)}}:null}return"dpg_addtomylist"===i.type?{type:"addToMyList",id:e.parseSchema_(i.type,e.findJSON_(i.content)).id}:null},r=[];for(let e of t.extensions)try{let t=i(e);t&&r.push(t)}catch(t){ii.info("Failed to parse ad feature",{error:t,extension:e})}return r}static parseSchema_(t,n){return(function(e){J(e)||H(!1);var t=Object.freeze(q({},e));function n(e,n){return void 0===n&&(n=!1),function(e,t,n){void 0===n&&(n=!1);for(var i={},r=W(e),a=J(t)?t:{},o=0;o<r.length;o++){var s=r[o],u=et(e[s],a[s],n);if(Q(u)&&(i[s]=u,n))return i}return ee(i)}(t,e,n)}function i(e){return!!J(e)&&null==n(e,!0)}return{source:t,validate:n,embed:function(e){return void 0===e&&(e={optional:!1}),q({type:G,shape:t},e)},produce:function(e){if(!i(e))throw TypeError("invalid-data");return e},is:i}})(e.EXTENSIONS_[t]).produce(n)}static findJSON_(e){let t=e.match(/<Json>\s*<!\[CDATA\[\s*([\s\S]*?)\s*\]\]>\s*<\/Json>/);if(!(null==t?void 0:t[1]))return null;try{return JSON.parse(t[1])}catch(e){return null}}},(0,L._)(m,"EXTENSIONS_",{brandmetrics_survey:{measurementId:ea(),suid:ea(),questions:eo(es({id:ea(),text:ea(),options:eo(es({text:ea(),value:ea()}))}))},dpg_addtomylist:{id:ea()}}),m),ia=class{destroy(){this.observe_.disconnect()}constructor(e,t){(0,L._)(this,"observe_",void 0),(0,L._)(this,"rect",void 0),this.observe_=new ek(e=>{var n;let i=null==(n=e[0])?void 0:n.contentRect;i&&(this.rect.width!==i.width||this.rect.height!==i.height)&&(this.rect.width=i.width,this.rect.height=i.height,t(this.rect))}),this.observe_.observe(e);const n=e.getBoundingClientRect();this.rect={width:n.width,height:n.height},t(this.rect)}};let io=O.l.create("ScriptLoader");var is=class{async load(){return null!=this.promise_||(this.promise_=this.addScript_()),await this.promise_}async addScript_(){if(!(this.promise_||document.querySelector('script[src="'.concat(this.params_.src,'"]')))){if(this.params_.template){let e=document.createElement("script");e.innerHTML=this.params_.template,document.body.appendChild(e)}await new Promise(e=>{let t=document.createElement("script");t.src=this.params_.src,t.addEventListener("load",e),t.addEventListener("error",e),document.body.appendChild(t),io.info("Added script tag",this.params_.src),setTimeout(e,5e3)})}}constructor(e){(0,L._)(this,"params_",void 0),(0,L._)(this,"promise_",null),this.params_=e}},iu=(v=class e{static async load(t){await Promise.all(t.map(t=>e.scripts_[t].load()))}},(0,L._)(v,"GEMIUS_PLAYER_TEMPLATE_",'\n    function gemiusPlayerPending(obj, fun) {\n      obj[fun] =\n        obj[fun] ||\n        function () {\n          const x = (window["gemius_player_data"] =\n            window["gemius_player_data"] || []);\n          x[x.length] = [this, fun, arguments];\n        };\n    }\n    gemiusPlayerPending(window, "GemiusPlayer");\n    gemiusPlayerPending(GemiusPlayer.prototype, "newProgram");\n    gemiusPlayerPending(GemiusPlayer.prototype, "newAd");\n    gemiusPlayerPending(GemiusPlayer.prototype, "adEvent");\n    gemiusPlayerPending(GemiusPlayer.prototype, "programEvent");\n    gemiusPlayerPending(GemiusPlayer.prototype, "setVideoObject");\n  '),(0,L._)(v,"scripts_",{[O.g.FREEWHEEL]:new is({src:"https://mssl.fwmrm.net/libs/adm/7.11.0/AdManager.js"}),[O.g.GEMIUS_PLAYER]:new is({src:"https://gabe.hit.gemius.pl/gplayer.js",template:v.GEMIUS_PLAYER_TEMPLATE_})}),v);let il=O.l.create("AdManager"),id=1;var ic=class e{static async create(t,n){var i,r,a,o;let s=!!n.startTime;if((null==(i=n.advertising)?void 0:i.type)!=="client")return null;await iu.load([O.g.FREEWHEEL]);let u=null==(a=window.tv)||null==(r=a.freewheel)?void 0:r.SDK;return u?(u.setLogLevel(u.LOG_LEVEL_QUIET),Object.assign(u,{AdManagerImageRenderer:(o=u,class{start(e){var t,n;let i=e.getAdInstance(),r=null==(n=i.getActiveCreativeRendition())||null==(t=n.getPrimaryCreativeRenditionAsset())?void 0:t.getUrl();r&&(this.img_.src=r,i.getSlot().getBase().appendChild(this.img_)),e.handleStateTransition(o.RENDERER_STATE_STARTED),this.rendererController_=e}stop(){var e;this.img_.src="",this.img_.remove(),null==(e=this.rendererController_)||e.handleStateTransition(o.RENDERER_STATE_COMPLETED)}
1info(){return{moduleType:o.MODULE_TYPE_RENDERER}}getPlayheadTime(){return -1}getDuration(){return -1}constructor(e){(0,L._)(this,"rendererController_",void 0),(0,L._)(this,"img_",document.createElement("img")),this.rendererController_=e,this.img_.style.position="absolute",this.img_.style.left="0",this.img_.style.right="0",this.img_.style.top="0",this.img_.style.bottom="0",this.img_.style.width="100%",this.img_.style.height="100%",this.img_.style.objectFit="contain"}})}),new e(u,t,n.advertising,s)):(il.info("Tried to load FW SDK but failed"),null)}get adBreak(){var e,t;return null!=(e=null==(t=this.adBreakState_)?void 0:t.adBreak)?e:null}get ad(){var e,t;return null!=(e=null==(t=this.adState_)?void 0:t.ad)?e:null}get pauseAd(){var e,t;return null!=(e=null==(t=this.pauseAdState_)?void 0:t.pauseAd)?e:null}destroy(){this.destroyed_=!0,this.pauseSlotTimer_.stop(),this.resizeObserver_.destroy(),this.eventManager_.removeAll(),this.container_.id="",this.container_.style.display="none",this.adManager_.dispose();try{this.context_.dispose()}catch(e){}il.info("Ad manager and context disposed")}play(){if(null===this.requestStatus_)return il.info("Requesting ads"),this.context_.submitRequest(),this.requestStatus_=!1,!0;if(!1===this.requestStatus_)return il.info("Pending ad request, play discarded"),!0;if(this.adBreakState_){var e;return null==(e=this.adState_)||e.adInstance.resume(),!0}return!1}pause(){if(this.adBreakState_){var e;return null==(e=this.adState_)||e.adInstance.pause(),!0}return!1}bindListeners_(){let e=this.controller_.getPlayer(),t=this.eventManager_.listen(this.context_);t(this.sdk_.EVENT_REQUEST_COMPLETE,e=>{if(this.destroyed_||e.target!==this.context_)return;if(this.requestStatus_=!0,!e.success){il.error("Ad request failed, resuming primary",e),this.resumePrimary_();return}il.info("Ad request successful",e);let t=this.context_.getTemporalSlots();this.linearSlots_=t.filter(e=>this.isSlot_(e,"linear")),this.linearSlots_.sort((e,t)=>e.getTimePosition()-t.getTimePosition()),this.pauseSlots_=t.filter(e=>e.getTimePositionClass()===this.sdk_.TIME_POSITION_CLASS_PAUSE_MIDROLL&&e.getAdCount()>0),this.ignorePauseAds_&&this.pauseSlots_.length&&(il.info("Got ".concat(this.pauseSlots_.length," pause ads from ad response, but we explicitly ignore them")),this.pauseSlots_=[]);let n=this.linearSlots_.find(e=>e.getTimePositionClass()===this.sdk_.TIME_POSITION_CLASS_PREROLL);!n||this.skipPreroll_?(n||il.info("No preroll, resume primary"),this.resumePrimary_()):this.playSlot_(n)}),t(this.sdk_.EVENT_SLOT_STARTED,t=>{if(this.container_.style.display="block",this.isSlot_(t.slot,"linear")){let n;try{n=t.slot.getTotalDuration()}catch(e){n=0}let i=t.slot.getTimePosition();t.slot.getTimePositionClass()===this.sdk_.TIME_POSITION_CLASS_PREROLL&&(i=0),this.lastAdIndex_=0;let r={startsAt:i,time:0,duration:n,maxAds:t.slot.getAdCount(),skip:()=>this.stopSlot_("linear")};this.adBreakState_={slot:t.slot,adBreak:r},e.emit(n2.AdBreakStarted,{adBreak:r})}}),t(this.sdk_.EVENT_SLOT_ENDED,t=>{if(this.container_.style.display="none",this.watchedSlots_.add(t.slot),this.isSlot_(t.slot,"linear")&&this.adBreakState_){let{adBreak:t}=this.adBreakState_;if(0===t.startsAt&&this.controller_.isLive){il.info("Preroll and live, seek to live edge");let{primary:e}=this.controller_;e.seekTo(e.end)}this.adBreakState_=null,e.emit(n2.AdBreakEnded,{adBreak:t}),this.resumePrimary_()}}),t(this.sdk_.EVENT_AD,t=>{let n=t.adInstance.getSlot();if(this.isSlot_(n,"linear")&&this.adBreakState_){if(t.subType===this.sdk_.EVENT_AD_INITIATED&&this.video_.src&&(this.video_.src="",this.video_.load()),t.subType===this.sdk_.EVENT_AD_IMPRESSION){if(this.destroyed_){this.video_.src="";return}if(!this.adBreakState_)return;this.lastAdIndex_+=1;let n={index:this.lastAdIndex_,click:this.mapClickThrough_(t.adInstance),features:ir.mapAdInstance(t.adInstance)};this.adState_={ad:n,adInstance:t.adInstance},e.emit(n2.AdStarted,{ad:n}),this.controller_.setPlayheadState(O.h.PLAYING)}if(t.subType===this.sdk_.EVENT_AD_IMPRESSION_END){if(!this.adState_)return;let{ad:t}=this.adState_;this.adState_=null,e.emit(n2.AdEnded,{ad:t})}t.subType===this.sdk_.EVENT_AD_PAUSE&&this.controller_.setPlayheadState(O.h.PAUSED),t.subType===this.sdk_.EVENT_AD_RESUME&&this.controller_.playheadState===O.h.PAUSED&&(this.controller_.setPlayheadState(O.h.PLAY),this.controller_.setPlayheadState(O.h.PLAYING))}
1if(this.isSlot_(n,"pause")){if(t.subType===this.sdk_.EVENT_AD_IMPRESSION){let i={click:this.mapClickThrough_(t.adInstance)};this.pauseAdState_={slot:n,adInstance:t.adInstance,pauseAd:i},e.emit(n2.PauseAdStarted,{pauseAd:i})}if(t.subType===this.sdk_.EVENT_AD_IMPRESSION_END){if(!this.pauseAdState_)return;let{pauseAd:t}=this.pauseAdState_;this.pauseAdState_=null,e.emit(n2.PauseAdEnded,{pauseAd:t})}}});let n=this.eventManager_.listen(this.video_);n("contextmenu",e=>(e.preventDefault(),!1)),n("playing",()=>{this.adState_&&!this.video_.paused&&this.controller_.setPlayheadState(O.h.PLAYING)}),n("timeupdate",()=>{if(!this.adState_||!this.adBreakState_)return;let{slot:t}=this.adBreakState_;this.adBreakState_.adBreak.time=t.getPlayheadTime(),e.emit(n2.TimesChange)});let i=this.eventManager_.listen(e);i(n2.TimesChange,()=>{let{time:e}=this.controller_.primary;this.adBreakState_||this.playClosestMidSlot_(e)}),i(n2.SeekingChange,e=>{e.isSeeking&&this.stopSlot_("pause"),e.isSeeking&&e.time&&this.playClosestMidSlot_(e.time),e.isSeeking||(r=!1)});let r=!1;i(n2.PlayheadStateChange,e=>{this.adBreakState_||(e.playheadState===O.h.PLAY&&(this.resumePrimary_(),r=!1),e.playheadState===O.h.PLAYING&&this.setPrimaryPlaying_(!0),e.playheadState===O.h.PAUSED&&(this.setPrimaryPlaying_(!1),!r&&e.userGesture&&this.pauseSlotTimer_.tickAfter(.25)),e.playheadState===O.h.ENDED&&(r=!0))}),i(n2.VolumeChange,()=>{let{volume:e}=this.controller_.getPlayer();this.context_.setAdVolume(e)})}resumePrimary_(){this.stopSlot_(),this.controller_.play(),this.setPrimaryPlaying_(!0)}stopSlot_(e){if((!e||"linear"===e)&&this.adBreakState_&&(this.adBreakState_.slot.stop(),this.adBreakState_&&il.warn("Stopped adBreak but state is not cleared in sync"),this.video_.getAttribute("src"))){il.warn("A linear break is stopped, but FW SDK did not clear the video element. We'll handle this ourselves, patching bug in FW SDK."),this.video_.src="";try{this.video_.load()}catch(e){}}if((!e||"pause"===e)&&this.pauseAdState_){var t;null==(t=this.pauseAdState_)||t.slot.stop(),this.pauseSlotTimer_.stop(),this.pauseAdState_&&il.warn("Stopped pauseAd but state is not cleared in sync")}}playSlot_(e){this.controller_.pause(!1),this.setPrimaryPlaying_(!1);try{e.play()}catch(e){this.resumePrimary_()}}playClosestMidSlot_(e){if(e===this.time_)return;let t=this.time_;this.time_=e;let n=this.linearSlots_.filter(e=>e.getTimePositionClass()===this.sdk_.TIME_POSITION_CLASS_MIDROLL).reverse().find(n=>{let i=n.getTimePosition();return t<=i&&e>=i});n&&!this.watchedSlots_.has(n)&&(il.info("Play midSlot at",e),this.playSlot_(n))}getCuePoints(){let e=[];for(let t of this.linearSlots_){let n=t.getTimePosition();e.push({start:n,isWatched:this.watchedSlots_.has(t)})}return e}setPrimaryPlaying_(e){if(this.requestStatus_&&e!==this.primaryPlaying_){this.primaryPlaying_=e,il.info("Primary playing",e);try{this.context_.setVideoState(e?this.sdk_.VIDEO_STATE_PLAYING:this.sdk_.VIDEO_STATE_PAUSED)}catch(e){il.warn("Failed to resume videoState",e)}}}isSlot_(e,t){if(!e.getAdCount())return!1;let n=e.getTimePositionClass();return"linear"===t&&(n===this.sdk_.TIME_POSITION_CLASS_PREROLL||n===this.sdk_.TIME_POSITION_CLASS_MIDROLL)||"pause"===t&&n===this.sdk_.TIME_POSITION_CLASS_PAUSE_MIDROLL}mapClickThrough_(e){var t;let n;return(null==(t=e.getEventCallbackUrls(this.sdk_.EVENT_AD_CLICK,this.sdk_.EVENT_TYPE_CLICK))?void 0:t.length)&&(n=()=>{this.controller_.pause(),e.getRendererController().processEvent({name:this.sdk_.EVENT_AD_CLICK})}),n}constructor(e,t,n,i){(0,L._)(this,"sdk_",void 0),(0,L._)(this,"controller_",void 0),(0,L._)(this,"skipPreroll_",void 0),(0,L._)(this,"adManager_",void 0),(0,L._)(this,"context_",void 0),(0,L._)(this,"requestStatus_",null),(0,L._)(this,"container_",void 0),(0,L._)(this,"video_",void 0),(0,L._)(this,"linearSlots_",[]),(0,L._)(this,"pauseSlots_",[]),(0,L._)(this,"eventManager_",new O.r),(0,L._)(this,"destroyed_",!1),(0,L._)(this,"time_",0),(0,L._)(this,"watchedSlots_",new Set),(0,L._)(this,"resizeObserver_",void 0),(0,L._)(this,"lastAdIndex_",0),(0,L._)(this,"primaryPlaying_",!1),(0,L._)(this,"pauseSlotTimer_",void 0),(0,L._)(this,"adBreakState_",null),(0,L._)(this,"adState_",null),(0,L._)(this,"pauseAdState_",null),(0,L._)(this,"ignorePauseAds_",!1),this.sdk_=e,this.controller_=t,this.skipPreroll_=i,this.adManager_=new this.sdk_.AdManager,this.adManager_.setNetwork(n.networkId),this.adManager_.setServer(n.serverUrl),il.info("Ad manager created",this.adManager_),n.pauseAds&&(this.ignorePauseAds_=!0,il.info("Ignoring pause ads, we have explicitly set them."));const r=t.getPlayer().getElements();this.container_=r.adContainer,this.container_.id="freewheel_".concat(id++),this.video_=r.adVideo,this.context_=this.adManager_.newContext(),this.context_.registerVideoDisplayBase(this.container_.id),this.context_.setAdVolume(this.video_.volume),this.resizeObserver_=new ia(t.getPlayer().container,e=>{this.context_.resize(e.width,e.height)}),this.context_.addRenderer("class://AdManagerImageRenderer",null,"image/jpg,image/jpeg,image/png"),this.context_.setParameter(this.sdk_.PARAMETER_RENDERER_VIDEO_DISPLAY_CONTROLS_WHEN_PAUSE,!1,this.sdk_.PARAMETER_LEVEL_GLOBAL),this.context_.setParameter(this.sdk_.PARAMETER_USE_GDPR_TCFAPI,!1,this.sdk_.PARAMETER_LEVEL_GLOBAL),this.context_.setParameter(this.sdk_.PARAMETER_AUTO_PAUSE_AD_ONVISIBILITYCHANGE,!1,this.sdk_.PARAMETER_LEVEL_GLOBAL),this.context_.setParameter(this.sdk_.PARAMETER_DESIRED_BITRATE,2e3,this.sdk_.PARAMETER_LEVEL_OVERRIDE),this.context_.setParameter(this.sdk_.PARAMETER_EXTENSION_OMSDK_ENABLED,!0,this.sdk_.PARAMETER_LEVEL_GLOBAL);const a=Date.now();if(this.context_.setVideoAsset(n.assetId,n.duration,n.networkId,void 0,void 0,a),this.context_.setProfile(n.profileId),this.context_.setSiteSection(n.siteSectionId,n.networkId,a),this.context_.addKeyValue("_fw_site_page",location.href),n.userId&&this.context_.addKeyValue("_fw_vcid2",n.userId),n.userConsentString&&(this.context_.addKeyValue("_fw_gdpr","1"),this.context_.addKeyValue("_fw_gdpr_consent",n.userConsentString)),n.customKeyValues)for(const[e,t]of Object.entries(n.customKeyValues))this.context_.addKeyValue(e,t);il.info("Ad context created",this.context_),this.pauseSlotTimer_=new O.n(()=>{let e=this.pauseSlots_.find(e=>!this.watchedSlots_.has(e));e&&this.playSlot_(e)}
1),this.bindListeners_()}};(s=A||(A={})).Full="full",s.Creative="creative",s.Limited="limited";var ih=A;(u=E||(E={})).PreRoll="preroll",u.MidRoll="midroll",u.PostRoll="postroll",u.Standalone="standalone";var ip=E;(l=k||(k={})).Video="video",l.Audio="audio";var ig=k;(d=I||(I={})).Generic="generic",d.Video="video",d.Media="media",(c=C||(C={})).Unspecified="unspecified",c.Loaded="loaded",c.BeginToRender="beginToRender",c.OnePixel="onePixel",c.Viewable="viewable",c.Audible="audible",c.Other="other";var im=C;(h=M||(M={})).Click="click",h.InvitationAccept="invitationAccept";var iv=M;(p=P||(P={})).Minimized="minimized",p.Collapsed="collapsed",p.Normal="normal",p.Expanded="expanded",p.Fullscreen="fullscreen",(f=D||(D={}))[f.Ok=1]="Ok",f[f.WrongLicense=2]="WrongLicense";var iy=D,ib="u">typeof globalThis?globalThis:"u">typeof window?window:e.g,i_={};(function(e,t,n){if("object"==typeof n&&"string"!=typeof n.nodeName)t(e,n);else{n={};var i=["1.5.0-iab4484"],r="default";for(var a in i.push(r),t(e,n),n)n.hasOwnProperty(a)&&(null!=Object.getOwnPropertyDescriptor(e,a)||Object.defineProperty(e,a,{value:{}}),i.forEach(function(t){if(null==Object.getOwnPropertyDescriptor(e[a],t)){var i=function e(t){for(var n in t)t.hasOwnProperty(n)&&(t[n]=e(t[n]));return Object.freeze(t)}(n[a]);Object.defineProperty(e[a],t,{get:function(){return i},enumerable:!0})}}))}})(ib,function(e,t){var n=n||{};n.scope={},n.createTemplateTagFirstArg=function(e){return e.raw=e},n.createTemplateTagFirstArgWithRaw=function(e,t){return e.raw=t,e},n.arrayIteratorImpl=function(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}},n.arrayIterator=function(e){return{next:n.arrayIteratorImpl(e)}},n.makeIterator=function(e){var t="u">typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if("number"==typeof e.length)return n.arrayIterator(e);throw Error(String(e)+" is not an iterable or ArrayLike")},n.arrayFromIterator=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},n.arrayFromIterable=function(e){return e instanceof Array?e:n.arrayFromIterator(n.makeIterator(e))},n.ASSUME_ES5=!1,n.ASSUME_NO_NATIVE_MAP=!1,n.ASSUME_NO_NATIVE_SET=!1,n.SIMPLE_FROUND_POLYFILL=!1,n.ISOLATE_POLYFILLS=!1,n.FORCE_POLYFILL_PROMISE=!1,n.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1,n.objectCreate=n.ASSUME_ES5||"function"==typeof Object.create?Object.create:function(e){var t=function(){};return t.prototype=e,new t},n.defineProperty=n.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e},n.getGlobal=function(e){e=["object"==typeof globalThis&&globalThis,e,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof ib&&ib];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")},n.global=n.getGlobal(this),n.IS_SYMBOL_NATIVE="function"==typeof Symbol&&"symbol"==typeof Symbol("x"),n.TRUST_ES6_POLYFILLS=!n.ISOLATE_POLYFILLS||n.IS_SYMBOL_NATIVE,n.polyfills={},n.propertyToPolyfillSymbol={},n.POLYFILL_PREFIX="$jscp$",n.polyfill=function(e,t,i,r){t&&(n.ISOLATE_POLYFILLS?n.polyfillIsolated(e,t,i,r):n.polyfillUnisolated(e,t,i,r))},n.polyfillUnisolated=function(e,t,i,r){for(i=n.global,e=e.split("."),r=0;r<e.length-1;r++){var a=e[r];if(!(a in i))return;i=i[a]}(t=t(r=i[e=e[e.length-1]]))!=r&&null!=t&&n.defineProperty(i,e,{configurable:!0,writable:!0,value:t})},n.polyfillIsolated=function(e,t,i,r){var a=e.split(".");e=1===a.length,r=a[0],r=!e&&r in n.polyfills?n.polyfills:n.global;for(var o=0;o<a.length-1;o++){var s=a[o];if(!(s in r))return;r=r[s]}a=a[a.length-1],null!=(t=t(i=n.IS_SYMBOL_NATIVE&&"es6"===i?r[a]:null))&&(e?n.defineProperty(n.polyfills,a,{configurable:!0,writable:!0,value:t}):t!==i&&(void 0===n.propertyToPolyfillSymbol[a]&&(i=1e9*Math.random()>>>0,n.propertyToPolyfillSymbol[a]=n.IS_SYMBOL_NATIVE?n.global.Symbol(a):n.POLYFILL_PREFIX+i+"$"+a),n.defineProperty(r,n.propertyToPolyfillSymbol[a],{configurable:!0,writable:!0,value:t})))},n.getConstructImplementation=function(){if(n.TRUST_ES6_POLYFILLS&&"u">typeof Reflect&&Reflect.construct){if(function(){function e(){}return Reflect.construct(e,[],function(){}),new e instanceof e}())return Reflect.construct;var e=Reflect.construct;return function(t,n,i){return t=e(t,n),i&&Reflect.setPrototypeOf(t,i.prototype),t}}return function(e,t,i){return void 0===i&&(i=e),i=n.objectCreate(i.prototype||Ob
1ject.prototype),Function.prototype.apply.call(e,i,t)||i}},n.construct=n.getConstructImplementation(),n.underscoreProtoCanBeSet=function(){var e={};try{return e.__proto__={a:!0},e.a}catch(e){}return!1},n.setPrototypeOf=n.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:n.underscoreProtoCanBeSet()?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw TypeError(e+" is not extensible");return e}:null,n.inherits=function(e,t){if(e.prototype=n.objectCreate(t.prototype),e.prototype.constructor=e,n.setPrototypeOf){var i=n.setPrototypeOf;i(e,t)}else for(i in t)if("prototype"!=i)if(Object.defineProperties){var r=Object.getOwnPropertyDescriptor(t,i);r&&Object.defineProperty(e,i,r)}else e[i]=t[i];e.superClass_=t.prototype},n.getRestArguments=function(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t},n.polyfill("Reflect",function(e){return e||{}},"es6","es3"),n.polyfill("Reflect.construct",function(e){return n.construct},"es6","es3"),n.polyfill("Reflect.setPrototypeOf",function(e){if(e)return e;if(n.setPrototypeOf){var t=n.setPrototypeOf;return function(e,n){try{return t(e,n),!0}catch(e){return!1}}}return null},"es6","es5"),n.initSymbol=function(){},n.polyfill("Symbol",function(e){if(e)return e;var t=function(e,t){this.$jscomp$symbol$id_=e,n.defineProperty(this,"description",{configurable:!0,writable:!0,value:t})};t.prototype.toString=function(){return this.$jscomp$symbol$id_};var i="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",r=0,a=function(e){if(this instanceof a)throw TypeError("Symbol is not a constructor");return new t(i+(e||"")+"_"+r++,e)};return a},"es6","es3"),n.polyfill("Symbol.iterator",function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),i=0;i<t.length;i++){var r=n.global[t[i]];"function"==typeof r&&"function"!=typeof r.prototype[e]&&n.defineProperty(r.prototype,e,{configurable:!0,writable:!0,value:function(){return n.iteratorPrototype(n.arrayIteratorImpl(this))}})}return e},"es6","es3"),n.iteratorPrototype=function(e){return(e={next:e})[Symbol.iterator]=function(){return this},e},n.iteratorFromArray=function(e,t){e instanceof String&&(e+="");var n=0,i=!1,r={next:function(){if(!i&&n<e.length){var r=n++;return{value:t(r,e[r]),done:!1}}return i=!0,{done:!0,value:void 0}}};return r[Symbol.iterator]=function(){return r},r},n.polyfill("Array.prototype.keys",function(e){return e||function(){return n.iteratorFromArray(this,function(e){return e})}},"es6","es3"),n.owns=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.polyfill("Object.values",function(e){return e||function(e){var t,i=[];for(t in e)n.owns(e,t)&&i.push(e[t]);return i}},"es8","es3"),n.checkEs6ConformanceViaProxy=function(){try{var e={},t=Object.create(new n.global.Proxy(e,{get:function(n,i,r){return n==e&&"q"==i&&r==t}}));return!0===t.q}catch(e){return!1}},n.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1,n.ES6_CONFORMANCE=n.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&n.checkEs6ConformanceViaProxy(),n.polyfill("WeakMap",function(e){function t(){}function i(e){var t=typeof e;return"object"===t&&null!==e||"function"===t}function r(e){if(!n.owns(e,o)){var i=new t;n.defineProperty(e,o,{value:i})}}function a(e){if(!n.ISOLATE_POLYFILLS){var i=Object[e];i&&(Object[e]=function(e){return e instanceof t?e:(Object.isExtensible(e)&&r(e),i(e))})}}if(n.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(e&&n.ES6_CONFORMANCE)return e}else if(function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}),n=Object.seal({}),i=new e([[t,2],[n,3]]);return 2==i.get(t)&&3==i.get(n)&&(i.delete(t),i.set(n,4),!i.has(t)&&4==i.get(n))}catch(e){return!1}}())return e;var o="$jscomp_hidden_"+Math.random();a("freeze"),a("preventExtensions"),a("seal");var s=0,u=function(e){if(this.id_=(s+=Math.random()+1).toString(),e){e=n.makeIterator(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}};return u.prototype.set=function(e,t){if(!i(e))throw Error("Invalid WeakMap key");if(r(e),!n.owns(e,o))throw Error("WeakMap key fail: "+e);return e[o][this.id_]=t,this},u.prototype.get=function(e){return i(e)&&n.owns(e,o)?e[o][this.id_]:void 0},u.prototype.has=function(e){return i(e)&&n.owns(e,o)&&n.owns(e[o],this.id_)},u.prototype.delete=function(e){return!!(i(e)&&n.owns(e,o)&&n.owns(e[o],this.id_))&&delete e[o][this.id_]},u},"es6","es3"),n.MapEntry=function(){},n.polyfill("Map",function(e){if(n.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(e&&n.ES6_CONFORMANCE)return e}else if(function(){if(n.ASSUME_NO_NATIVE_MAP||!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),i=new e(n.makeIterator([[t,"s"]]));if("s"!=i.get(t)||1!=i.size||i.get({x:4})||i.set({x:4},"t")!=i||2!=i.size)return!1;var r=i.entries(),a=r.next();return!a.done&&a.value[0]==t&&"s"==a.value[1]&&!((a=r.next()).done||4!=a.value[0].x||"t"!=a.value[1]||!r.next().done)}catch(e){return!1}}())return e;var t=new WeakMap,i=function(e){if(this.data_={},this.head_=o(),this.size=0,e){e=n.makeIterator(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}};i.prototype.set=function(e,t){var n=r(this,e=0===e?0:e);return n.list||(n.list=this.data_[n.id]=[]),n.entry?n.entry.value=t:(n.entry={next:this.head_,previous:this.head_.previous,head:this.head_,key:e,value:t},n.list.push(n.entry),this.head_.previous.next=n.entry,this.head_.previous=n.entry,this.size++),this},i.prototype.delete=function(e){return!(!(e=r(this,e)).entry||!e.list||(e.list.splice(e.index,1),e.list.length||delete this.data_[e.id],e.entry.previous.next=e.entry.next,e.entry.next.previous=e.entry.previous,e.entry.head=null,this.size--,0))},i.prototype.clear=function(){this.data_={},this.head_=this.head_.previous=o(),this.size=0},i.prototype.has=function(e){return!!r(this,e).entry},i.prototype.get=function(e){return(e=r(this,e).entry)&&e.value},i.prototype.entries=function(){return a(this,function(e){return[e.key,e.value]})},i.prototype.keys=function(){return a(this,function(e){return e.key})},i.prototype.values=function(){return a(this,function(e){return e.value})},i.prototype.forEach=function(e,t){for(var n,i=this.entries();!(n=i.next()).done;)n=n.value,e.call(t,n[1],n[0],this)},i.prototype[Symbol.iterator]=i.prototype.entries;var r=function(e,i){var r=i&&typeof i;"object"==r||"function"==r?t.has(i)?r=t.get(i):(r=""+ ++s,t.set(i,r)):r="p_"+i;var a=e.data_[r];if(a&&n.owns(e.data_,r))for(e=0;e<a.length;e++){var o=a[e];if(i!=i&&o.key!=o.key||i===o.key)return{id:r,list:a,index:e,entry:o}}return{id:r,list:a,index:-1,entry:void 0}},a=function(e,t){var i=e.head_;return n.iteratorPrototype(function(){if(i){for(;i.head!=e.head_;)i=i.previous;for(;i.next!=i.head;)return{done:!1,value:t(i=i.next)};i=null}return{done:!0,value:void 0}})},o=function(){var e={};return e.previous=e.next=e.head=e},s=0;return i},"es6","es3");var i="sessionStart",r="sessionFinish",a={LOADED:"loaded",START:"start",FIRST_QUARTILE:"firstQuartile",MIDPOINT:"midpoint",THIRD_QUARTILE:"thirdQuartile",COMPLETE:"complete",PAUSE:"pause",RESUME:"resume",BUFFER_START:"bufferStart",BUFFER_FINISH:"bufferFinish",SKIPPED:"skipped",VOLUME_CHANGE:"volumeChange",PLAYER_STATE_CHANGE:"playerStateChange",AD_USER_INTERACTION:"adUserInteraction"},o="definedByJavaScript",s="generic",u="full",l={APP:"app",WEB:"web"},d="definedByJavaScript",c="NONE",h="DIRECT",p="POST_MESSAGE",f="identifyServiceWindow",g="omid_message_guid",m="omid_message_method",v="omid_message_version",y="omid_message_args",b=function(e,t,n,i){this.guid=e,this.method=t,this.version=n,this.args=i};b.isValidSerializedMessage=function(e){return!!e&&void 0!==e[g]&&void 0!==e[m]&&void 0!==e[v]&&"string"==typeof e[g]&&"string"==typeof e[m]&&"string"==typeof e[v]&&(void 0===e[y]||void 0!==e[y])},b.deserialize=function(e){return new b(e[g],e[m],e[v],e[y])},b.prototype.serialize=function(){var e={};return e[g]=this.guid,e[m]=this.method,e[v]=this.version,void 0!==this.args&&(e[y]=this.args),e};var w=function(e){this.to=e,this.communicationType_=c};function T(e,t){if(!t)throw Error("Value for "+e+" is undefined, null or blank.");
1if("string"!=typeof t&&!(t instanceof String))throw Error("Value for "+e+" is not a string.");if(""===t.trim())throw Error("Value for "+e+" is empty string.")}function S(e,t){if(null==t)throw Error("Value for "+e+" is undefined or null")}function x(e,t){if(null==t)throw Error(e+" must not be null or undefined.");if("number"!=typeof t||isNaN(t))throw Error("Value for "+e+" is not a number")}function A(e,t,n,i){if(x(e,t),t<n||t>i)throw Error("Value for "+e+" is outside the range ["+n+","+i+"]")}function E(e,t){return e&&(e[t]||(e[t]={}))}function k(e,n,i){(i=void 0===i?void 0===t?null:t:i)&&((e=e.split(".")).slice(0,e.length-1).reduce(E,i)[e[e.length-1]]=n)}w.prototype.sendMessage=function(e,t){},w.prototype.handleMessage=function(e,t){this.onMessage&&this.onMessage(e,t)},w.prototype.serialize=function(e){return JSON.stringify(e)},w.prototype.deserialize=function(e){return JSON.parse(e)},w.prototype.isDirectCommunication=function(){return this.communicationType_===h},w.prototype.isCrossOrigin=function(){},k("OmidSessionClient.Partner",function(e,t){T("Partner.name",e),T("Partner.version",t),this.name=e,this.version=t});var I=function(e,t,n,i){i=void 0===i?u:i,T("VerificationScriptResource.resourceUrl",e),this.resourceUrl=e,this.vendorKey=t,this.verificationParameters=n,this.accessMode=i};I.prototype.toJSON=function(){return{accessMode:this.accessMode,resourceUrl:this.resourceUrl,vendorKey:this.vendorKey,verificationParameters:this.verificationParameters}},k("OmidSessionClient.VerificationScriptResource",I);var C=function(e,t,n,i){n=void 0===n?null:n,i=void 0===i?null:i,S("Context.partner",e),this.partner=e,this.verificationScriptResources=t,this.videoElement=this.slotElement=null,this.contentUrl=n,this.customReferenceData=i,this.underEvaluation=!1,this.serviceWindow=null};C.prototype.setVideoElement=function(e){S("Context.videoElement",e),this.videoElement=e},C.prototype.setSlotElement=function(e){S("Context.slotElement",e),this.slotElement=e},C.prototype.setServiceWindow=function(e){S("Context.serviceWindow",e),this.serviceWindow=e},k("OmidSessionClient.Context",C);var M={};M.omidGlobal=function(){if(void 0!==e&&e)return e;if(void 0!==ib&&ib)return ib;if("u">typeof window&&window)return window;if("u">typeof globalThis&&globalThis)return globalThis;var t=Function("return this")();if(t)return t;throw Error("Could not determine global object context.")}();var P={sessionError:"reportError"},D=Object.keys(a).map(function(e){return a[e]}),R=["impressionOccurred"],L=function(e){e=void 0===e?M.omidGlobal:e,this.interfaceRoot_=e.omidSessionInterface};function O(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return"y"===e?(3&t|8).toString(16):t.toString(16)})}function N(){var e=n.getRestArguments.apply(0,arguments);"u">typeof jasmine&&jasmine?function(){throw new(Function.prototype.bind.apply(Error,[null,"Could not complete the test successfully - "].concat(n.arrayFromIterable(e))))}():"u">typeof console&&console&&console.error&&function(){console.error.apply(console,n.arrayFromIterable(e))}()}L.prototype.isSupported=function(){return null!=this.interfaceRoot_},L.prototype.sendMessage=function(e,t,i){if("registerSessionObserver"==e&&(i=[t]),P[e]&&(e=P[e]),t=this.interfaceRoot_,0<=R.indexOf(e)&&(t=t.adEvents),0<=D.indexOf(e)&&(t=t.mediaEvents),!(t=t[e]))throw Error("Unrecognized method name: "+e+".");t.apply(null,n.arrayFromIterable(i))};var j="1.5.0-iab4484";function U(e){return/\d+\.\d+\.\d+(-.*)?/.test(e)}function B(e,t){e=e.split("-")[0].split("."),t=t.split("-")[0].split(".");for(var n=0;n<3;n++){var i=parseInt(e[n],10),r=parseInt(t[n],10);if(i>r)break;if(i<r)return!1}return!0}var F="1.0.3";function V(e){return null!=e&&void 0!==e.top&&null!=e.top}function H(e){if(e===M.omidGlobal)return!1;try{if(void 0===e.location.hostname)return!0;""===e.x||e.x}catch(e){return!0}return!1}function q(e){return void 0===e&&"u">typeof window&&window&&(e=window),V(e)?e:M.omidGlobal}var G=function(e){w.call(this,e),this.communicationType_=h,this.handleExportedMessage=G.prototype.handleExportedMessage.bind(this)};n.inherits(G,w),G.prototype.sendMessage=function(e,t){if(!(t=void 0===t?this.to:t))throw Error("Message destination must be defined at construction time or when sending the message.");t.handleExportedMessage(e.serialize(),this)},G.prototype.handleExportedMessage=function(e,t){b.isValidSerializedMessage(e)&&this.handleMessage(b.deserialize(e),t)},G.prototype.isCrossOrigin=function(){return!1};var K=function(e,t){t=void 0===t?M.omidGlobal:t,w.call(this,t);var n=this;this.communicationType_=p,e.addEventListener("message",function(e){if("object"==typeof e.data){var t=e.data;b.isValidSerializedMessage(t)&&(t=b.deserialize(t),e.source&&n.handleMessage(t,e.source))}})};n.inherits(K,w),K.isCompatibleContext=function(e){return!!(e&&e.addEventListener&&e.postMessage)},K.prototype.sendMessage=function(e,t){if(!(t=void 0===t?this.to:t))throw Error("Message destination must be defined at construction time or when sending the message.");t.postMessage(e.serialize(),"*")},K.prototype.isCrossOrigin=function(){return!this.to||H(this.to)};var W={OMID_PRESENT_FRAME_NAME:"omid_v1_present",OMID_PRESENT_FRAME_NAME_WEB:"omid_v1_present_web",OMID_PRESENT_FRAME_NAME_APP:"omid_v1_present_app",getEnvironmentIframeName:function(e){var t={};return(t[l.APP]=W.OMID_PRESENT_FRAME_NAME_APP,t[l.WEB]=W.OMID_PRESENT_FRAME_NAME_WEB,t)[e]}};function z(e,t){try{return e.frames&&!!e.frames[t]}catch(e){return!1}}
1function X(e,t){e.document.write('<iframe style="display:none" id="'+t+'" name="'+t+'" sandbox></iframe>')}W.isOmidPresent=function(e){return[W.OMID_PRESENT_FRAME_NAME,W.OMID_PRESENT_FRAME_NAME_WEB,W.OMID_PRESENT_FRAME_NAME_APP].some(function(t){return z(e,t)})},W.getOmidEnvironment=function(e){for(var t=n.makeIterator(Object.values(l)),i=t.next();!i.done;i=t.next())if(i=i.value,z(e,W.getEnvironmentIframeName(i)))return i;return null},W.declareOmidPresence=function(e,t){e.frames&&e.document&&![W.OMID_PRESENT_FRAME_NAME,W.OMID_PRESENT_FRAME_NAME_WEB,W.OMID_PRESENT_FRAME_NAME_APP].some(function(t){return!!e.frames[t]})&&(null==e.document.body&&W.isMutationObserverAvailable_(e)?W.registerMutationObserver_(e,t):(t=W.getEnvironmentIframeName(t),e.document.body?(W.appendPresenceIframe_(e,W.OMID_PRESENT_FRAME_NAME),W.appendPresenceIframe_(e,t)):(X(e,W.OMID_PRESENT_FRAME_NAME),X(e,t))))},W.appendPresenceIframe_=function(e,t){var n=e.document.createElement("iframe");n.id=t,n.name=t,n.style.display="none",n.sandbox="",e.document.body.appendChild(n)},W.isMutationObserverAvailable_=function(e){return"MutationObserver"in e},W.registerMutationObserver_=function(e,t){var n=new MutationObserver(function(i){i.forEach(function(i){"BODY"===i.addedNodes[0].nodeName&&(i=W.getEnvironmentIframeName(t),W.appendPresenceIframe_(e,W.OMID_PRESENT_FRAME_NAME),W.appendPresenceIframe_(e,i),n.disconnect())})});n.observe(e.document.documentElement,{childList:!0})};var Y=["omid","v1_SessionServiceCommunication"],J=function(e,t,i){S("AdSession.context",e),this.adSessionId_=O(),this.context_=e,this.impressionOccurred_=!1;var r,a,o,s=this.context_.serviceWindow||void 0;this.communication_=t||(r=q(),a=void 0===a?W.isOmidPresent:a,o=[r,V(r)?r.top:M.omidGlobal],s&&o.unshift(s),function(e,t,i,r){for(var a=(t=n.makeIterator(t)).next();!a.done;a=t.next())if(a=function(e,t,n,i){if(!H(t))try{var r=n.reduce(function(e,t){return e&&e[t]},t);if(r)return new G(r)}catch(e){}return i(t)?new K(e,t):null}(e,a.value,i,r))return a;return null}(r,o,Y,a)),this.sessionInterface_=i||new L,this.isSessionRunning_=this.hasMediaEvents_=this.hasAdEvents_=!1,this.impressionType_=this.creativeType_=null,this.creativeLoaded_=!1,this.callbackMap_={},this.communication_&&(this.communication_.onMessage=this.handleInternalMessage_.bind(this)),this.setClientInfo_(),this.injectVerificationScripts_(e.verificationScriptResources),this.sendSlotElement_(e.slotElement),this.sendVideoElement_(e.videoElement),this.sendContentUrl_(e.contentUrl),this.watchSessionEvents_()};J.prototype.getAdSessionId=function(){return this.adSessionId_},J.prototype.setCreativeType=function(e){if(e===d)throw Error("Creative type cannot be redefined with value "+d);if(this.impressionOccurred_)throw Error("Impression has already occurred");if(this.creativeLoaded_)throw Error("Creative has already loaded");if(this.creativeType_&&this.creativeType_!==d)throw Error("Creative type cannot be redefined");if(void 0===this.creativeType_)throw Error("Native integration is using OMID 1.2 or earlier");this.sendOneWayMessage("setCreativeType",e,this.adSessionId_),this.creativeType_=e},J.prototype.setImpressionType=function(e){if(e===o)throw Error("Impression type cannot be redefined with value "+o);if(this.impressionOccurred_)throw Error("Impression has already occurred");if(this.creativeLoaded_)throw Error("Creative has already loaded");if(this.impressionType_&&this.impressionType_!==o)throw Error("Impression type cannot be redefined");if(void 0===this.impressionType_)throw Error("Native integration is using OMID 1.2 or earlier");this.sendOneWayMessage("setImpressionType",e,this.adSessionId_),this.impressionType_=e},J.prototype.isSupported=function(){return!!this.communication_||this.sessionInterface_.isSupported()},J.prototype.isSendingElementsSupported_=function(){return this.communication_?this.communication_.isDirectCommunication():this.sessionInterface_.isSupported()},J.prototype.registerSessionObserver=function(e){this.sendMessage("registerSessionObserver",e,this.adSessionId_)},J.prototype.start=function(){this.sendOneWayMessage("startSession",{customReferenceData:this.context_.customReferenceData,underEvaluation:this.context_.underEvaluation},this.adSessionId_)},J.prototype.finish=function(){this.sendOneWayMessage("finishSession",this.adSessionId_)},J.prototype.error=function(e,t){this.sendOneWayMessage("sessionError",e,t,this.adSessionId_)},J.prototype.registerAdEvents=function(){if(this.hasAdEvents_)throw Error("AdEvents already registered.");this.hasAdEvents_=!0,this.sendOneWayMessage("registerAdEvents",this.adSessionId_)},J.prototype.registerMediaEvents=function(){if(this.hasMediaEvents_)throw Error("MediaEvents already registered.");this.hasMediaEvents_=!0,this.sendOneWayMessage("registerMediaEvents",this.adSessionId_)},J.prototype.sendOneWayMessage=function(e){var t=n.getRestArguments.apply(1,arguments);this.sendMessage.apply(this,[e,null].concat(n.arrayFromIterable(t)))},J.prototype.sendMessage=function(e,t){var i=n.getRestArguments.apply(2,arguments);this.communication_?this.sendInternalMessage_(e,t,i):this.sessionInterface_.isSupported()&&this.sendInterfaceMessage_(e,t,i)},J.prototype.sendInternalMessage_=function(e,t,n){var i=O();t&&(this.callbackMap_[i]=t),e=new b(i,"SessionService."+e,j,U(j)&&B(j,F)?n:JSON.stringify(n)),this.communication_.sendMessage(e)},J.prototype.handleInternalMessage_=function(e,t){t=e.method;var n=e.guid;if(e=e.args,"response"===t&&this.callbackMap_[n]){var i,r=(i=e,U(j)&&B(j,F)?i||[]:i&&"string"==typeof i?JSON.parse(i):[]);this.callbackMap_[n].apply(this,r)}"error"===t&&window.console&&N(e)},J.prototype.sendInterfaceMessage_=function(e,t,n){try{this.sessionInterface_.sendMessage(e,t,n)}catch(e){N("Failed to communicate with SessionInterface with error:"),N(e)}},J.prototype.assertSessionRunning=function(){if(!this.isSessionRunning_)throw Error("Session not started.")},J.prototype.impressionOccurred=function(){if(this.creativeType_===d)throw Error("Creative type has not been redefined");if(this.impressionType_===o)throw Error("Impression type has not been redefined");this.impressionOccurred_=!0},J.prototype.creativeLoaded=function(){if(this.creativeType_===d)throw Error("Creative type has not been redefined");if(this.impressionType_===o)throw Error("Impression type has not been redefined");this.creativeLoaded_=!0},J.prototype.setClientInfo_=function(){this.sendOneWayMessage("setClientInfo",j,this.context_.partner.name,this.context_.partner.version,this.adSessionId_)}
1,J.prototype.injectVerificationScripts_=function(e){e&&(e=e.map(function(e){return e.toJSON()}),this.sendOneWayMessage("injectVerificationScriptResources",e,this.adSessionId_))},J.prototype.sendSlotElement_=function(e){this.sendElement_(e,"setSlotElement")},J.prototype.sendVideoElement_=function(e){this.sendElement_(e,"setVideoElement")},J.prototype.sendElement_=function(e,t){e&&(this.isSendingElementsSupported_()?this.sendOneWayMessage(t,e,this.adSessionId_):this.error(s,"Session Client "+t+" called when communication is cross-origin"))},J.prototype.sendContentUrl_=function(e){e&&this.sendOneWayMessage("setContentUrl",e,this.adSessionId_)},J.prototype.setElementBounds=function(e){S("AdSession.elementBounds",e),this.sendOneWayMessage("setElementBounds",e,this.adSessionId_)},J.prototype.watchSessionEvents_=function(){var e=this;this.registerSessionObserver(function(t){t.type===i&&(e.isSessionRunning_=!0,e.creativeType_=t.data.creativeType,e.impressionType_=t.data.impressionType),t.type===r&&(e.isSessionRunning_=!1)})},k("OmidSessionClient.AdSession",J);var Q=function(e,t,n,i){this.isSkippable=e,this.skipOffset=t,this.isAutoPlay=n,this.position=i};Q.prototype.toJSON=function(){return{isSkippable:this.isSkippable,skipOffset:this.skipOffset,isAutoPlay:this.isAutoPlay,position:this.position}};var $=function(e){S("AdEvents.adSession",e),this.adSessionId_=e.getAdSessionId();try{e.registerAdEvents(),this.adSession=e}catch(e){throw Error("AdSession already has an ad events instance registered")}};$.prototype.impressionOccurred=function(){this.adSession.assertSessionRunning(),this.adSession.impressionOccurred(),this.adSession.sendOneWayMessage("impressionOccurred",this.adSessionId_)},$.prototype.loaded=function(e){e=void 0===e?null:e,this.adSession.creativeLoaded(),e=e?e.toJSON():null,this.adSession.sendOneWayMessage("loaded",e,this.adSessionId_)},k("OmidSessionClient.AdEvents",$);var Z=function(e){S("MediaEvents.adSession",e),this.adSessionId_=e.getAdSessionId();try{e.registerMediaEvents(),this.adSession=e}catch(e){throw Error("AdSession already has a media events instance registered")}};Z.prototype.start=function(e,t){x("MediaEvents.start.duration",e),A("MediaEvents.start.mediaPlayerVolume",t,0,1),this.adSession.sendOneWayMessage("start",e,t,this.adSessionId_)},Z.prototype.firstQuartile=function(){this.adSession.sendOneWayMessage("firstQuartile",this.adSessionId_)},Z.prototype.midpoint=function(){this.adSession.sendOneWayMessage("midpoint",this.adSessionId_)},Z.prototype.thirdQuartile=function(){this.adSession.sendOneWayMessage("thirdQuartile",this.adSessionId_)},Z.prototype.complete=function(){this.adSession.sendOneWayMessage("complete",this.adSessionId_)},Z.prototype.pause=function(){this.adSession.sendOneWayMessage("pause",this.adSessionId_)},Z.prototype.resume=function(){this.adSession.sendOneWayMessage("resume",this.adSessionId_)},Z.prototype.bufferStart=function(){this.adSession.sendOneWayMessage("bufferStart",this.adSessionId_)},Z.prototype.bufferFinish=function(){this.adSession.sendOneWayMessage("bufferFinish",this.adSessionId_)},Z.prototype.skipped=function(){this.adSession.sendOneWayMessage("skipped",this.adSessionId_)},Z.prototype.volumeChange=function(e){A("MediaEvents.volumeChange.mediaPlayerVolume",e,0,1),this.adSession.sendOneWayMessage("volumeChange",e,this.adSessionId_)},Z.prototype.playerStateChange=function(e){S("MediaEvents.playerStateChange.playerState",e),this.adSession.sendOneWayMessage("playerStateChange",e,this.adSessionId_)},Z.prototype.adUserInteraction=function(e){S("MediaEvents.adUserInteraction.interactionType",e),this.adSession.sendOneWayMessage("adUserInteraction",e,this.adSessionId_)},k("OmidSessionClient.MediaEvents",Z),k("OmidSessionClient.OmidVersion",function(e,t){T("OmidVersion.semanticVersion",e),T("OmidVersion.apiLevel",t)}),k("OmidSessionClient.listenForServiceWindow",function(e){new K(q()).onMessage=function(t,n){t.method===f&&e(n)}}),k("OmidSessionClient.VastProperties",Q);var ee={VerificationVendorId:{OTHER:1,MOAT:2,DOUBLEVERIFY:3,INTEGRAL_AD_SCIENCE:4,PIXELATE:5,NIELSEN:6,COMSCORE:7,MEETRICS:8,GOOGLE:9}};function et(e){for(var t=n.makeIterator(en.keys()),i=t.next();!i.done;i=t.next()){i=i.value;for(var r=n.makeIterator(en.get(i)),a=r.next();!a.done;a=r.next())if(a.value.test(e))return i}
1return ee.VerificationVendorId.OTHER}var en=new Map([[ee.VerificationVendorId.MOAT,[/^(https?:\/\/|\/\/)?[-a-zA-Z0-9.]+\.moatads\.com\/.*$/]],[ee.VerificationVendorId.DOUBLEVERIFY,[/^(https?:\/\/|\/\/)?[-a-zA-Z0-9.]+\.doubleverify\.com\/.*$/,/^(https?:\/\/|\/\/)?c\.[\w\-]+\.com\/vfw\/dv\/.*$/,/^(https?:\/\/|\/\/)?(www\.)?[\w]+\.tv\/r\/s\/d\/.*$/,/^(https?:\/\/|\/\/)?(\w\.?)+\.dv\.tech\/.*$/]],[ee.VerificationVendorId.INTEGRAL_AD_SCIENCE,[/^(https?:\/\/|\/\/)?[-a-zA-Z0-9.]+\.adsafeprotected\.com\/.*$/]],[ee.VerificationVendorId.PIXELATE,[/^https?:\/\/(q|cdn)\.adrta\.com\/s\/.*\/(aa|aanf)\.js.*$/,/^https:\/\/cdn\.rta247\.com\/s\/.*\/(aa|aanf)\.js.*$/]],[ee.VerificationVendorId.NIELSEN,[]],[ee.VerificationVendorId.COMSCORE,[/^(https?:\/\/|\/\/)?[-a-zA-Z0-9.]+\.voicefive\.com\/.*$/,/^(https?:\/\/|\/\/)?[-a-zA-Z0-9.]+\.measuread\.com\/.*$/,/^(https?:\/\/|\/\/)?[-a-zA-Z0-9.]+\.scorecardresearch\.com\/.*$/]],[ee.VerificationVendorId.MEETRICS,[/^(https?:\/\/|\/\/)?s418\.mxcdn\.net\/bb-serve\/omid-meetrics.*\.js$/]],[ee.VerificationVendorId.GOOGLE,[/^(https?:\/\/|\/\/)?pagead2\.googlesyndication\.com\/.*$/,/^(https?:\/\/|\/\/)?www\.googletagservices\.com\/.*$/]]]);k("OmidSessionClient.verificationVendorIdForScriptUrl",et),k("OmidSessionClient.VerificationVendorId",ee.VerificationVendorId),ee.verificationVendorIdForScriptUrl=et},i_),(g=R||(R={}
1)).Created="created",g.Started="started",g.Finished="finished";var iw=R,iT=class{createOmidAdSession(e,t,n){let i=t.contentUrl||null,r=t.customReferenceData||null,a=new i_.OmidSessionClient.Partner("castlabs","1.2.0"),o=this.createOmidVerificationScriptResources(n),s=new i_.OmidSessionClient.Context(a,o,i,r);s.setVideoElement(e),s.underEvaluation=!!t.underEvaluation,t.serviceWindow&&s.setServiceWindow(t.serviceWindow.window);let u=new i_.OmidSessionClient.AdSession(s);return u.setCreativeType(t.creativeType||ig.Video),u.setImpressionType(t.impressionType||im.BeginToRender),t.elementBounds&&u.setElementBounds(t.elementBounds),u}createOmidVerificationScriptResources(e){return e.map(e=>{let t;switch(e.accessMode){case ih.Limited:t=ih.Limited;break;case ih.Creative:case ih.Full:default:t=ih.Full}return new i_.OmidSessionClient.VerificationScriptResource(e.resourceUrl,e.vendorKey,e.verificationParameters,t)})}createOmidAdEvents(e){return new i_.OmidSessionClient.AdEvents(e)}createOmidMediaEvents(e){return new i_.OmidSessionClient.MediaEvents(e)}isSupported(){return this.omidAdSession.isSupported()}start(){this.state===iw.Created&&(this.state=iw.Started,this.omidAdSession.start())}impressionOccurred(){this.state===iw.Started&&this.omidAdEvents.impressionOccurred()}error(e,t){this.state===iw.Started&&this.omidAdSession.error(e,t)}loaded(e){if(this.state===iw.Started)if(e){let t=new i_.OmidSessionClient.VastProperties(e.skippable,e.skipOffset,e.autoPlay,e.adPosition);this.omidAdEvents.loaded(t)}else this.omidAdEvents.loaded()}adPlaybackStart(e,t){this.state===iw.Started&&this.omidMediaEvents.start(e,t)}adPlaybackFirstQuartile(){this.state===iw.Started&&this.omidMediaEvents.firstQuartile()}adPlaybackMidpoint(){this.state===iw.Started&&this.omidMediaEvents.midpoint()}adPlaybackThirdQuartile(){this.state===iw.Started&&this.omidMediaEvents.thirdQuartile()}adPlaybackPaused(){this.state===iw.Started&&this.omidMediaEvents.pause()}adPlaybackCompleted(){this.state===iw.Started&&this.omidMediaEvents.complete()}adPlaybackBufferingStarted(){this.state===iw.Started&&this.omidMediaEvents.bufferStart()}adPlaybackBufferingFinished(){this.state===iw.Started&&this.omidMediaEvents.bufferFinish()}adPlaybackResumed(){this.state===iw.Started&&this.omidMediaEvents.resume()}adPlaybackVisualStateChange(e){this.state===iw.Started&&this.omidMediaEvents.playerStateChange(e)}adPlaybackVolumeChanged(e){this.state===iw.Started&&this.omidMediaEvents.volumeChange(e)}adSkipped(){this.state===iw.Started&&this.omidMediaEvents.skipped()}adUserInteraction(e){this.state===iw.Started&&this.omidMediaEvents.adUserInteraction(e)}finish(){return this.state===iw.Started?(this.state=iw.Finished,new Promise(e=>{setTimeout(()=>{this.omidAdSession.finish(),e()},3e3)})):Promise.resolve()}dispose(){return this.finish()}constructor(e,t,n=[]){this.state=iw.Created,this.omidAdSession=this.createOmidAdSession(e,t,n),this.omidAdEvents=this.createOmidAdEvents(this.omidAdSession),this.omidMediaEvents=this.createOmidMediaEvents(this.omidAdSession)}},iS=class{get window(){var e;if(!(null==(e=this.iframe)?void 0:e.contentWindow))throw Error("OM Web iframe content window not available.");return this.iframe.contentWindow}dispose(){this.iframe&&(document.body.removeChild(this.iframe),this.iframe=void 0)}constructor(e){this.iframe=e}},ix=class{get window(){return window}dispose(){this.script&&(document.head.removeChild(this.script),this.script=void 0)}constructor(e){this.script=e}},iA=class{static buildRelativeServiceWindow(e){return new Promise(t=>{let n=document.createElement("script");n.src=e,n.addEventListener("load",()=>{t(new ix(n))}),document.head.appendChild(n)})}static buildIsolatedServiceWindow(e){return new Promise(t=>{let n=document.createElement("iframe");n.sandbox.add("allow-scripts"),n.sandbox.add("allow-same-origin"),n.style.display="none",n.srcdoc="<script src=".concat(e,"></script>"),n.addEventListener("load",()=>{t(new iS(n))}),document.body.appendChild(n)})}};let iE=O.l.create("Omid");var ik=(y=class e{async handleImpression(e,t){var n,i,r,a,o,s,u,l;let d=this.controller_.getPlayer();if("start"===e){if((0,O.u)(t,"Missing region for start impression"),this.session_=await this.createSession_(t),!this.session_)return;iE.info("Created session",this.session_);let e=ip.MidRoll;t.start||(e=ip.PreRoll),this.session_.loaded({skippable:!1,skipOffset:0,autoPlay:!0,adPosition:e}),this.session_.impressionOccurred();let n=t.end-t.start;this.session_.adPlaybackStart(n,d.volume)}"complete"===e&&(this.session_&&(this.session_.adPlaybackCompleted(),this.session_.finish(),this.session_.dispose(),iE.info("Session finished")),this.session_=null),"pause"===e&&(null==(n=this.session_)||n.adPlaybackPaused()),"resume"===e&&(null==(i=this.session_)||i.adPlaybackResumed()),"click"===e&&(null==(r=this.session_)||r.adUserInteraction(iv.Click)),"firstQuartile"===e&&(null==(a=this.session_)||a.adPlaybackFirstQuartile()),"midpoint"===e&&(null==(o=this.session_)||o.adPlaybackMidpoint()),"thirdQuartile"===e&&(null==(s=this.session_)||s.adPlaybackThirdQuartile()),"mute"===e&&(null==(u=this.session_)||u.adPlaybackVolumeChanged(0)),"unmute"===e&&(null==(l=this.session_)||l.adPlaybackVolumeChanged(1))}destroy(){var e;null==(e=this.session_)||e.dispose(),this.session_=null}async createSession_(t){let n=t.verifications.map(e=>({resourceUrl:e.scriptUrl,vendorKey:e.vendor,verificationParameters:e.params,accessMode:ih.Full}));
1this.params_.debugResource&&n.push({resourceUrl:e.VALIDATION_SCRIPT_URL_});let i=new iT(this.controller_.getPlayer().getElements().video,{contentUrl:location.href,creativeType:ig.Video,impressionType:im.BeginToRender,serviceWindow:await e.servicePromise_},n);return i.isSupported()?(i.start(),i):null}constructor(e,t){(0,L._)(this,"controller_",void 0),(0,L._)(this,"params_",void 0),(0,L._)(this,"session_",null),this.controller_=e,this.params_=t,function(e,t){e&&e.length>0?Promise.resolve(iy.Ok):Promise.reject(iy.WrongLicense)}(t.licenseKey,t.debugResource)}},(0,L._)(y,"servicePromise_","u"<typeof window?Promise.resolve(void 0):iA.buildIsolatedServiceWindow("https://videoplayer.dpgmedia.net/static/omweb-v1.js")),(0,L._)(y,"VALIDATION_SCRIPT_URL_","https://videoplayer.dpgmedia.net/static/omid-validation-verification-script-v1.js"),y),iI=class{static ms(e){return Math.trunc(1e3*e)}static s(e){return e/1e3}static clamp(e,t,n){return Math.max(t,Math.min(e,n))}static precise(e){return Math.round((e+Number.EPSILON)*1e3)/1e3}};let iC=O.l.create("TimelineManager");var iM=class e{get adBreak(){var e,t;return null!=(e=null==(t=this.adBreakState_)?void 0:t.adBreak)?e:null}get ad(){var e,t;return null!=(e=null==(t=this.adState_)?void 0:t.ad)?e:null}async prepare(t){let{adUrl:n}=t;if(n){let{adBreakRegions:t,adRegions:i}=await e.fetchBreakRegions_(n);this.adBreakRegions_=t,this.adRegions_=i,this.preparedRegions_=!0,iC.info("Prepared regions",this.adBreakRegions_,this.adRegions_)}}async load(t,n){var i;let r=this.controller_.getPlayer();if((null==(i=t.advertising)?void 0:i.type)==="server"){let{pollSeconds:i,omid:r}=t.advertising;if(i){let{adUrl:t}=n;(0,O.u)(t,"Missing adUrl"),this.adPoller_=new O.t(async()=>{let{adBreakRegions:n,adRegions:i}=await e.fetchBreakRegions_(t);this.adBreakRegions_=n,this.adRegions_=i},i),iC.info("Polling breaks every ".concat(i,"s"));let r=!this.preparedRegions_;await this.adPoller_.start(r)}r&&(this.adOmid_=new ik(this.controller_,r),iC.info("Created omid tracker"))}if(t.schedule){let{path:e,pollSeconds:n}=t.schedule,i=e=>{let t=this.controller_.startDate;return t?(e-t.getTime())/1e3:0};this.schedulePoller_=new O.t(async()=>{let{butterParams:n}=t;(0,O.u)(n,"Missing butterParams");let a=await O.i.getSchedule(r.device,n,e);this.broadcasts_=a.broadcasts.map(e=>({id:e.id,get start(){return i(e.startTime)},get end(){return i(e.endTime)},canSeek:e.canSeek,...O.i.mapSharedBroadcastParams(e)})),a.adBreaks&&(this.adBreakRegions_=a.adBreaks.map(e=>({id:e.id,get start(){return i(e.startTime)},get end(){return i(e.endTime)},impressionUrls:{},maxAds:0})))},n),iC.info("Polling schedule every ".concat(n,"s")),await this.schedulePoller_.start()}}destroy(){var e,t,n;iC.info("Destroy"),this.adState_&&this.fireAdImpressions_(this.adState_.adRegion,"close"),null==(e=this.adPoller_)||e.stop(),null==(t=this.schedulePoller_)||t.stop(),null==(n=this.adOmid_)||n.destroy(),this.eventManager_.removeAll()}bindListeners_(){let e=this.controller_.getPlayer(),t=this.eventManager_.listen(e);t(n2.PlayheadStateChange,e=>{if(!this.adState_)return;let{adRegion:t}=this.adState_;e.playheadState===O.h.PLAY&&this.fireAdImpressions_(t,"resume"),e.playheadState===O.h.PAUSED&&this.fireAdImpressions_(t,"pause")}),t(n2.VolumeChange,()=>{if(!this.adState_)return;let{volume:e}=this.controller_.getPlayer(),{muted:t,adRegion:n}=this.adState_;this.adState_.muted=0===e,!t&&this.adState_.muted?this.fireAdImpressions_(n,"mute"):t&&!this.adState_.muted&&this.fireAdImpressions_(n,"unmute")}),t(n2.UiIntent,e=>{var t;let n=null==(t=this.adState_)?void 0:t.adRegion;n&&"changeFullscreen"===e.type&&this.fireAdImpressions_(n,e.isFullscreen?"expand":"collapse")})}update(){this.updateBreaksState_(),this.updateBroadcastState_()}updateBreaksState_(){var t,n,i,r;let a=this.controller_.getPlayer(),{time:o,end:s}=this.controller_.primary;if(!this.controller_.isStarted)return;let u=this.adBreakRegions_.find(t=>e.inRange_(o,t)),l=this.adRegions_.find(t=>e.inRange_(o,t));if(u&&s>u.end&&this.watchedAdBreakRegionIds_.has(u.id)){this.controller_.primary.seekTo(u.end),iC.info("In break regi
1on that has been watched before, shift to ".concat(u.end));return}if(e.isDifferent_(null==(t=this.adState_)?void 0:t.adRegion,l)&&this.adState_){let{ad:e,adRegion:t}=this.adState_;this.fireAdQuartiles_(),this.fireAdImpressions_(t,"complete"),this.adState_=null,a.emit(n2.AdEnded,{ad:e})}if(e.isDifferent_(null==(n=this.adBreakState_)?void 0:n.adBreakRegion,u)&&this.adBreakState_){let{adBreak:e,adBreakRegion:t}=this.adBreakState_;this.watchedAdBreakRegionIds_.add(t.id),this.fireAdBreakImpressions_(t,"breakEnd"),this.adBreakState_=null,a.emit(n2.AdBreakEnded,{adBreak:e}),null!==this.primaryAfterBreak_&&(iC.info("Seeking to target time due to break end",this.primaryAfterBreak_),this.controller_.primary.seekTo(this.primaryAfterBreak_),this.primaryAfterBreak_=null)}if(e.isDifferent_(null==(i=this.adBreakState_)?void 0:i.adBreakRegion,u)&&u){this.fireAdBreakImpressions_(u,"breakStart");let e=u.end<this.controller_.primary.end,t={startsAt:u.start,time:0,duration:u.end-u.start,maxAds:u.maxAds,skip:e?()=>this.controller_.primary.seekTo(u.end):void 0};this.adBreakState_={adBreakRegion:u,adBreak:t},a.emit(n2.AdBreakStarted,{adBreak:t})}if(e.isDifferent_(null==(r=this.adState_)?void 0:r.adRegion,l)&&l){this.fireAdImpressions_(l,"start"),this.fireAdImpressions_(l,"impression");let e={index:l.index+1,click:this.mapClickThrough_(l),features:ir.mapTimelineAdRegion(l,this.controller_)};this.adState_={adRegion:l,ad:e,firedImpressions:new Set,muted:0===a.volume},a.emit(n2.AdStarted,{ad:e})}if(this.adBreakState_){let{adBreak:e,adBreakRegion:t}=this.adBreakState_;e.time=iI.clamp(o,t.start,t.end)-t.start}this.adState_&&this.fireAdQuartiles_()}updateBroadcastState_(){var t;let n=this.controller_.getPlayer(),{time:i}=this.controller_.primary;if(!this.controller_.isStarted)return;let r=null!=(t=this.broadcasts_.find(t=>e.inRange_(i,t)))?t:null,a=this.broadcast;e.isDifferent_(a,r,!0)&&(this.broadcast=r,iC.info("Broadcast changed",r),n.emit(n2.BroadcastChange,{oldBroadcast:a,broadcast:r}))}mapClickThrough_(e){if(e.clickThroughUrl)return()=>{this.controller_.pause(),this.fireAdImpressions_(e,"click"),window.open(e.clickThroughUrl,"_blank")}}getCuePoints(e){let t=new Map;for(let n of this.adBreakRegions_)n.end<e.start||n.start>e.end||t.set(n.start,{start:n.start,end:n.end,isWatched:this.watchedAdBreakRegionIds_.has(n.id)});return Array.from(t.values())}toIntegrated(e,t){let n=iI.ms(t.start),i=iI.ms(t.end),r=iI.ms(e),a=(r=iI.clamp(r,n,i))-n,o=0;for(let e of this.adBreakRegions_){let t=iI.ms(e.start),a=iI.ms(e.end);if(a<n||t>i)continue;let s=Math.max(t,n),u=Math.min(a,i);s<=r&&(o+=Math.min(u,r)-s)}return iI.s(a-o)}toPrimary(e,t){let n=iI.ms(e),i=iI.ms(t.start),r=iI.ms(t.end);0===r&&(r=Number.MAX_SAFE_INTEGER);let a=i,o=0;for(let e of this.adBreakRegions_){let t=iI.ms(e.start),s=iI.ms(e.end);if(s<=i)continue;let u=Math.max(t,i);if(u>=r)break;let l=u-a;if(o+l>=n)break;o+=l,a=Math.min(s,r)}return iI.s(a+(n-o))}adjustPrimary(e){let t=this.adBreakRegions_.find(t=>e>=t.start&&e<t.end);if(!t)return null;if(this.adState_){let{adRegion:t}=this.adState_;if(e>=t.start&&e<t.end)return null}return this.watchedAdBreakRegionIds_.has(t.id)&&t.end<=this.controller_.primary.end?t.end:t.start}setPrimaryAfterBreak(e){iC.info("Set pendingTargetTime",e),this.primaryAfterBreak_=e}static isDifferent_(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(null==e?void 0:e.id)!==(null==t?void 0:t.id)||!!n&&((null==e?void 0:e.start)!==(null==t?void 0:t.start)||(null==e?void 0:e.end)!==(null==t?void 0:t.end))}fireAdBreakImpressions_(e,t){var n;let i=null!=(n=e.impressionUrls[t])?n:[];for(let e of i)new Image().src=e;iC.info('AdBreak impression "'.concat(t,'" (').concat(i.length,")"))}fireAdImpressions_(e,t){var n,i;let r=null!=(n=e.impressionUrls[t])?n:[];for(let e of r)new Image().src=e;null==(i=this.adOmid_)||i.handleImpression(t,e),iC.info('Ad impression "'.concat(t,'" (').concat(r.length,")"))}fireAdQuartiles_(){if(!this.adState_)return;let{time:e}=this.controller_.primary,{adRegion:t,firedImpressions:n}=this.adState_,i=(iI.clamp(e,t.start,t.end)-t.start)/(t.end-t.start),r=(e,r)=>{i>e&&!n.has(r)&&(n.add(r),this.fireAdImpressions_(t,r))};r(.25,"firstQuartile"),r(.5,"midpoint"),r(.75,"thirdQuartile")}static inRange_(e,t){return e>=t.start&&e<t.end}static async fetchBreakRegions_(e){let{avails:t}=await O.a.get(e),n=[];return{adBreakRegions:t.map(e=>{let t={id:e.availId,start:iI.precise(e.startTimeInSeconds),end:iI.precise(e.startTimeInSeconds+e.durationInSeconds),maxAds:e.ads.length,impressionUrls:e.adBreakTrackingEvents.reduce((e,t)=>
1{switch(t.eventType){case"breakStart":case"breakEnd":e[t.eventType]=t.beaconUrls}return e},{})};return e.ads.forEach((e,t)=>{var i;let r=null==(i=e.trackingEvents.find(e=>"clickThrough"===e.eventType))?void 0:i.beaconUrls[0],a={id:e.adId,index:t,start:iI.precise(e.startTimeInSeconds),end:iI.precise(e.startTimeInSeconds+e.durationInSeconds),impressionUrls:e.trackingEvents.reduce((e,t)=>{switch(t.eventType){case"close":case"complete":case"firstQuartile":case"midpoint":case"pause":case"resume":case"start":case"thirdQuartile":case"expand":case"collapse":case"mute":case"unmute":case"impression":e[t.eventType]=t.beaconUrls;break;case"clickTracking":e.click=t.beaconUrls}return e},{}),verifications:e.adVerifications.reduce((e,t)=>{for(let n of t.javaScriptResource)"omid"===n.apiFramework&&e.push({scriptUrl:n.uri,vendor:t.vendor,params:t.verificationParameters});return e},[]),extensions:e.extensions,clickThroughUrl:r};n.push(a)}),t}),adRegions:n}}constructor(e){(0,L._)(this,"controller_",void 0),(0,L._)(this,"eventManager_",new O.r),(0,L._)(this,"adBreakRegions_",[]),(0,L._)(this,"adRegions_",[]),(0,L._)(this,"watchedAdBreakRegionIds_",new Set),(0,L._)(this,"primaryAfterBreak_",null),(0,L._)(this,"adPoller_",null),(0,L._)(this,"adOmid_",null),(0,L._)(this,"adBreakState_",null),(0,L._)(this,"adState_",null),(0,L._)(this,"schedulePoller_",null),(0,L._)(this,"broadcasts_",[]),(0,L._)(this,"preparedRegions_",!1),(0,L._)(this,"broadcast",null),this.controller_=e,this.bindListeners_()}},iP=class e{static applyStyles(e,t){if(e)for(let[n,i]of Object.entries(t))void 0!==i&&("inset"===n?(e.style.left=i.toString(),e.style.right=i.toString(),e.style.top=i.toString(),e.style.bottom=i.toString()):e.style[n]=i.toString())}static createElement(t,n){let i=document.createElement(t);return n&&e.applyStyles(i,n),i}static createVideoElement(){let t=document.createElement("video");return e.applyStyles(t,{width:"100%",height:"100%"}),t.playsInline=!0,t.disablePictureInPicture=!0,t.disableRemotePlayback=!0,t.setAttribute("x-webkit-airplay","deny"),t}static fitToBox(e,t){if(e.width/e.height>t){let n=e.height;return{width:n*t,height:n}}let n=e.width;return{width:n,height:n/t}}static replaceElement(e,t){e.parentNode&&e.parentNode.replaceChild(t,e)}},iD=(b=class e{static async parse(t){let n=[],i=document.createElement("div"),r=null,a=t.split("\n"),o=0,s=a.length;for(let t=0;t<s;t++){var u,l;o===e.LINES_PER_BATCH_?(o=0,await e.yieldToMain_()):o++;let s=null==(u=a[t])?void 0:u.trim();if(s){if(s.includes("-->")){r&&(n.push(r),r=null);let t=s.split(" ");if(t.length<3||void 0===t[0]||void 0===t[2])continue;let i=e.textToSeconds_(t[0]),a=e.textToSeconds_(t[2]);if(null===i||null===a)continue;r={start:i,end:a,lines:[]};continue}if(r){i.innerHTML=s;let e=null==(l=i.textContent)?void 0:l.trim();!e&&s&&(e=s),e&&r.lines.push(e)}}}return r&&(n.push(r),r=null),n}static toSprites(e){let t=[];for(let n of e){let e=n.lines[0];if(!e)continue;let i=e.split("#");if(!i[0]||!i[1])continue;let[r,a]=i;if(!a.startsWith("xywh="))continue;let o=a.substring(5).split(",");if(!o[0]||!o[1]||!o[2]||!o[3])continue;let s=+o[0];if(Number.isNaN(s))continue;let u=+o[1];if(Number.isNaN(u))continue;let l=o[2]-o[0];if(Number.isNaN(l))continue;let d=o[3]-o[1];Number.isNaN(d)||t.push({start:n.start,end:n.end,url:r,x:s,y:u,w:l,h:d})}return t}static textToSeconds_(e){var t,n,i,r;let a=e.split(":").reverse();if(!a[0])return null;let o=null!=(t=a[2])?t:"00",s=null!=(n=a[1])?n:"00",u=a[0].split("."),l=60*o*60+60*s+ +(null!=(i=u[0])?i:"00")+(null!=(r=u[1])?r:"000")/1e3;return Number.isNaN(l)?null:l}static yieldToMain_(){return new Promise(e=>setTimeout(e,20))}},(0,L._)(b,"LINES_PER_BATCH_",50),b);let iR=O.l.create("TrackManager");var iL=(w=class e{destroy(){this.destroyed_=!0,this.textContainer_.remove()}getThumbnail(t,n){var i;if(!this.thumbnailsData_)return null;let r=this.thumbnailsData_.sprites,a=null!=(i=r.find(e=>t>=e.start&&t<e.end))?i:r[r.length-1];if(!a)return null;let o=n/a.w,s=e.SYNTHETIC_THUMBNAIL_;return s.url=a.url,s.width=this.thumbnailsData_.width*o,s.height=this.thumbnailsData_.height*o,s.tile.x=a.x*o,s.tile.y=a.y*o,s.tile.width=n,s.tile.height=a.h*o,s}async loadThumbnails(e){let t=await O.a.get(e.url),n=await iD.parse(t);this.destroyed_||(this.thumbnailsData_={sprites:iD.toSprites(n),width:e.width,height:e.height},iR.info("Parsed thumbnails"))}setTextTracks(e,t){if(this.textTracks=e.map((e,t)=>({id:t,language:e.language,roles:e.isCaptions?["caption"]:[],isActive:!1,src:e.src})),(null==t?void 0:t.textLanguage)||(null==t?void 0:t.textRole)){let e=this.textTracks;
1if(t.textLanguage){let n=t.textLanguage;e=e.filter(e=>e.language.startsWith(n))}if(t.textRole){let n=t.textRole;e=e.filter(e=>e.roles.includes(n))}let n=e[0];n&&(this.selectTextTrack(n.id),iR.info("Found initial textTrack",n))}}selectTextTrack(e){(0,O.u)(this.textTracks);let t=this.textTracks.map(t=>({...t,isActive:t.id===e}));if((0,V.default)(t,this.textTracks))return;this.textTracks=t,this.controller_.getPlayer().emit(n2.TextTracksChange,{textTracks:t});let n=t.find(e=>e.isActive);n?this.loadTrack_(n):this.textContainer_.innerHTML=""}update(){let e=this.getCue_();if(this.controller_.adBreak&&(e=null),this.lastCue_!==e&&(this.lastCue_=e,this.textContainer_.innerHTML="",e)){let t=iP.createElement("div",{position:"absolute",left:0,right:0,bottom:0});for(let n of e.lines){let e=iP.createElement("div",{textAlign:"center",color:"#ffffff"});e.innerHTML=n,t.appendChild(e)}this.textContainer_.appendChild(t)}}getCue_(){var e;let t=null==(e=this.textTracks)?void 0:e.find(e=>e.isActive);if(!t)return null;let{time:n}=this.controller_.content,i=this.cuesMap_.get(t.id);if(!i)return null;let r=i.find(e=>n>=e.start&&n<e.end);return r||null}async loadTrack_(e){if(this.cuesMap_.has(e.id))return void this.update();let t=await O.a.get(e.src),n=await iD.parse(t);this.destroyed_||(this.cuesMap_.set(e.id,n),this.update())}constructor(e){(0,L._)(this,"controller_",void 0),(0,L._)(this,"thumbnailsData_",null),(0,L._)(this,"textTracks",[]),(0,L._)(this,"textContainer_",void 0),(0,L._)(this,"cuesMap_",new Map),(0,L._)(this,"lastCue_",null),(0,L._)(this,"destroyed_",!1),this.controller_=e,this.textContainer_=iP.createElement("div");const{textContainer:t}=e.getPlayer().getElements();t.appendChild(this.textContainer_)}},(0,L._)(w,"SYNTHETIC_THUMBNAIL_",{url:"",width:0,height:0,tile:{x:0,y:0,width:0,height:0}}),w);let iO=O.l.create("ShakaUtils");var iN=(T=class e{static patchForDevice(t){e.installedPolyfillsAll_||(e.installedPolyfillsAll_=!0,n6.polyfill.EmeEncryptionScheme.install(),n6.polyfill.MediaSource.install(),n6.polyfill.MediaCapabilities.install(),n6.polyfill.MCapEncryptionScheme.install(),n6.polyfill.PatchedMediaKeysCert.install(),n6.polyfill.PatchedMediaKeysWebkit.install(),n6.polyfill.TypedArray.install(),n6.polyfill.VideoPlayPromise.install(),n6.polyfill.VideoPlaybackQuality.install(),n6.polyfill.VTTCue.install(),iO.info("Installed shaka polyfills")),("webos"===t.name&&(t.version.startsWith("3")||t.version.startsWith("4"))||"tizen"===t.name&&(t.version.startsWith("3")||t.version.startsWith("4")))&&!e.installedXHR_&&(e.installedXHR_=!0,n6.net.NetworkingEngine.registerScheme("https",n6.net.HttpXHRPlugin.parse,n6.net.NetworkingEngine.PluginPriority.APPLICATION,!0),iO.info("Force using XHR for https"))}static patchForStream(t){let{drm:n}=t;(null==n?void 0:n.licenseUrls["com.apple.fps.1_0"])&&(n6.polyfill.PatchedMediaKeysApple.install(!0),e.installedPolyfillsApple_=!0,iO.info("Using legacy Apple MediaKeys, installed polyfill"))}static resetPatchForStream(){e.installedPolyfillsApple_&&n6.polyfill.PatchedMediaKeysApple.uninstall()}},(0,L._)(T,"installedPolyfillsAll_",!1),(0,L._)(T,"installedPolyfillsApple_",!1),(0,L._)(T,"installedXHR_",!1),T),ij=class{static selectStream(e,t){for(let n of O.o.isApple(e)?[O._.HLS,O._.MP4]:[O._.DASH,O._.HLS,O._.MP4]){let e=t.find(e=>e.type===n);if(e)return e}throw new O.s(O.c.NO_SUPPORTED_STREAM_FOUND)}};function iU(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=1e3*t,r=n?Date.now():0,a=null,o=()=>{null!==a||Date.now()-r<i||(r=Date.now(),e())};return o.suspend=()=>{a=Date.now()-r},o.resume=()=>{null!==a&&(r=Date.now()-a,a=null)},o}let iB=O.l.create("Controller");var iF=(S=class e{static create(t,n){let i=ij.selectStream(t.device,n.streams);return iB.info("Selected stream",i),new e(t,i,n)}get adBreak(){var e,t;return null!=(e=null==(t=this.adManager_)?void 0:t.adBreak)?e:this.timelineManager_.adBreak}get ad(){var e,t;return null!=(e=null==(t=this.adManager_)?void 0:t.ad)?e:this.timelineManager_.ad}get pauseAd(){var e,t,n,i;return null!=(e=null!=(t=null==(n=this.adCompanionManager_)?void 0:n.pauseAd)?t:null==(i=this.adManager_)?void 0:i.pauseAd)?e:null}get broadcast(){return this.timelineManager_.broadcast}get isAutoVideoQuality(){var e,t;return null!=(e=null==(t=this.shaka_.getConfiguration().abr)?void 0:t.enabled)&&e}get startDate(){return this.shaka_.getPresentationStartTimeAsDate()}get textTracks(){return this.loadParams.unstable_textMode===O.v.STREAM?this.textTracks_:this.trackManager_.textTracks}get stats(){var e,t,n,i,r,a,o,s,u;let l=this.shaka_.getAssetUri();(0,O.u)(l,"Asset uri is empty when requesting stats");let d=this.shaka_.getStats(),c=this.shaka_.getMediaElement(),h=this.mediaQualityInfos_.get("video"),p=this.mediaQualityInfos_.get("audio"),f=this.shaka_.getBufferedInfo();return{uri:l,keySystem:null!=(e=this.shaka_.keySystem())?e:void 0,liveLatency:d.liveLatency,gapsJumped:d.gapsJumped,estimatedBandwidth:d.estimatedBandwidth,width:d.width,height:d.height,videoWidth:null!=(t=null==h?void 0:h.width)?t:NaN,videoHeight:null!=(n=null==h?void 0:h.height)?n:NaN,videoBitrate:null!=(i=null==h?void 0:h.bandwidth)?i:NaN,videoCodec:null!=(r=null==h?void 0:h.codecs)?r:"",videoFps:null!=(a=null==h?void 0:h.frameRate)?a:NaN,audioBitrate:null!=(o=null==p?void 0:p.bandwidth)?o:NaN,audioCodec:null!=(s=null==p?void 0:p.codecs)?s:"",decodedFrames:d.decodedFrames,droppedFrames:d.droppedFrames,corruptedFrames:d.corruptedFrames,time:null!=(u=null==c?void 0:c.currentTime)?u:NaN,bufferFullness:this.shaka_.getBufferFullness(),buffer:f.total,videoBuffer:f.video,audioBuffer:f.audio,manifestTime:d.manifestTimeSeconds,drmTime:d.drmTimeSeconds,licenseTime:d.licenseTime,nonFatalErrorCount:d.nonFatalErrorCount,manifestPeriodCount:d.manifestPeriodCount,manifestGapCount:d.manifestGapCount}}get isTimeTrustable_(){let e=this.video_.readyState>HTMLMediaElement.HAVE_NOTHING;return!this.isSeeking&&e}get video_(){let{video:e}=this.player_.getElements();return e}async load(){let t=this.loadParams;await this.timelineManager_.prepare(this.stream_);let{startTime:n}=t;void 0!==n&&(n=this.timelineManager_.toPrimary(n,this.primary),this.leastTime_=n),t.preferences&&this.setConfigurationForPreferences_(t.preferences);try{await this.shaka_.load(this.stream_.url,n)}catch(t){if(t instanceof n6.util.Error)throw e.mapShakaError_(t);throw t}this.bindLoadedListeners_(),this.adManager_=await ic.create(this,t),await this.timelineManager_.load(t,this.stream_),null===this.leastTime_&&(this.leastTime_=this.video_.currentTime),this.resetTimer_();let{thumbnails:i,textTracks:r,advertising:a}=this.loadParams;i&&this.trackManager_.loadThumbnails(i),r&&this.trackManager_.setTextTracks(r,t.preferences),(null==a?void 0:a.pauseAds)&&this.adCompanionManager_.addPauseAds(a.pauseAds),i
1B.info("Loaded")}async destroy(){var e;this.eventManager_.removeAll(),this.timer_.stop(),null==(e=this.adManager_)||e.destroy(),this.timelineManager_.destroy(),this.trackManager_.destroy(),this.adCompanionManager_.destroy(),await this.shaka_.destroy(),iN.resetPatchForStream()}play(){var e;let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];if(this.setPlayheadState(O.h.PLAY,t),null==(e=this.adManager_)?void 0:e.play())return;let n=this.video_.play();(null==n?void 0:n.catch)&&n.catch(e=>{e instanceof Error&&"AbortError"===e.name||iB.info("An error occured in the play promise, we will ignore it.",e)})}pause(){var e;let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0],n=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=!0;(null==(e=this.adManager_)?void 0:e.pause())&&(i=!1),i&&this.video_.pause(),t&&this.setPlayheadState(O.h.PAUSED,n)}startSeeking(e){let t=this.playheadState===O.h.PAUSED;e&&!t&&(this.resumeAfterSeek_=!0,this.pause(!0,!1))}get isLive(){return this.shaka_.isLive()}bindListeners_(){let e=this.eventManager_.listen(this.shaka_);e("trackschanged",()=>{if(this.mapVideoQualities_(),this.mapTextTracks_(),this.mapAudioTracks_(),!this.isStarted&&this.loadParams.preferences){let{videoHeight:e}=this.loadParams.preferences;if(e){let t=this.videoQualities.reduce((t,n)=>{let i=t=>t.height<=e?t.height:-t.height;return i(n)>i(t)?n:t});t&&!t.isActive&&(iB.info("Found initial video quality:",t.height),this.selectVideoQuality(t.id))}}}),e("buffering",e=>{this.setBuffering_(e.buffering)}),e("boundarycrossed",()=>{this.setBuffering_(!0),iB.info("Crossed boundary")}),e("adaptation",()=>{this.mapVideoQualities_()});let t=e=>{var t;if(void 0===e.$requestType||!e.requestStartTime||!e.uris[0])return null;let{RequestType:n}=n6.net.NetworkingEngine;return{requestType:({[n.LICENSE]:"license",[n.MANIFEST]:"manifest",[n.SEGMENT]:"segment"})[e.$requestType],contentType:({video:"video",audio:"audio",text:"text"})[null!=(t=e.contentType)?t:""],url:e.uris[0],startTime:e.requestStartTime}};e("downloadcompleted",e=>{let{request:n,response:i}=e;if(i.fromCache||!i.timeMs)return;let r=t(n);!r||i.data instanceof ArrayBuffer&&this.player_.emit(n2.Network,{type:"completed",...r,endTime:r.startTime+i.timeMs,bytes:i.data.byteLength})}),e("downloadfailed",e=>{if(!e.error)return;let n=e.error.code===n6.util.Error.Code.OPERATION_ABORTED,{request:i}=e,r=t(i);r&&this.player_.emit(n2.Network,{type:n?"canceled":"failed",...r,statusCode:e.httpResponseCode})}),e("mediaqualitychanged",e=>{let{contentType:t}=e.mediaQuality;this.mediaQualityInfos_.set(t,e.mediaQuality),("video"===t||"audio"===t)&&this.player_.emit(n2.StatsChange,{type:t})}),e("audiotrackchanged",e=>{this.mediaQualityInfos_.set(e.mediaQuality.contentType,e.mediaQuality),this.player_.emit(n2.StatsChange,{type:"audio"})})}bindLoadedListeners_(){let t=this.eventManager_.listen(this.video_);t("loadeddata",()=>{this.setSeeking_(!1)}),t("playing",()=>{this.setPlayheadState(O.h.PLAYING)}),t("ended",()=>{this.leastTime_=null,this.setPlayheadState(O.h.ENDED)}),t("seeked",()=>{this.setSeeking_(!1)}),t("play",()=>{if(this.shaka_.isLive()&&!this.isStarted){let{end:t}=this.shaka_.seekRange();t-this.video_.currentTime>e.LIVE_EDGE_THRESHOLD_&&(this.video_.currentTime=t)}}),t("timeupdate",iU(()=>{this.video_.paused||this.video_.seeking||this.resetTimer_()},e.TIME_SYNC_TICK_RATE_)),this.eventManager_.listen(this.shaka_)("error",t=>{let n=e.mapShakaError_(t.detail);t.detail.severity===n6.util.Error.Severity.RECOVERABLE?this.player_.emit(n2.Warning,{error:n}):(this.player_.emit(n2.Error,{error:n}),this.pause(!1),this.player_.setVolume(0))})}setConfiguration_(e){this.shaka_.configure({abr:{removeLatencyFromFirstPacketTime:!1,minTimeToSwitch:8},streaming:{bufferingGoal:30,bufferBehind:10,retryParameters:{maxAttempts:4},observeQualityChanges:!0},manifest:{retryParameters:{maxAttempts:4},dash:{autoCorrectDrift:!1,ignoreMinBufferTime:!0}},mediaSource:{codecSwitchingStrategy:n6.config.CodecSwitchingStrategy.RELOAD}}),this.setConfigurationForDevice_(e),this.setConfigurationForText_(),this.stream_.drm&&this.setConfigurationForDrm_(this.stream_.drm,this.loadParams.unstable_preferPlayReady)}setConfigurationForDevice_(e){let t=n6.config.CrossBoundaryStrategy.KEEP;O.o.isTV(e)&&(t=n6.config.CrossBoundaryStrategy.RESET_TO_ENCRYPTED,("webos"===e.name&&e.version.startsWith("3")||"tizen"===e.name&&e.version.startsWith("3"))&&(t=n6.config.CrossBoundaryStrategy.RESET)),"tivoauto"===e.name&&(t=n6.config.CrossBoundaryStrategy.RESET_TO_ENCRYPTED,"linux"===e.os&&(t=n6.config.CrossBoundaryStrategy.RESET)),this.shaka_.configure({streaming:{crossBoundaryStrategy:t}}),"tizen"===e.name&&this.shaka_.configure({streaming:{gapPadding:3.9}}
1),O.o.isTV(e)&&(this.shaka_.configure({streaming:{stallEnabled:!1,stallThreshold:4},abr:{useNetworkInformation:!1,defaultBandwidthEstimate:55e5,minTimeToSwitch:30,advanced:{fastHalfLife:3,slowHalfLife:8}}}),("webos"===e.name&&(e.version.startsWith("3")||e.version.startsWith("4"))||"tizen"===e.name&&(e.version.startsWith("3")||e.version.startsWith("4")))&&(this.shaka_.configure({streaming:{bufferingGoal:12,bufferBehind:4,segmentPrefetchLimit:0}}),iB.info("Applied specific low CPU TV settings")))}setConfigurationForText_(){let e=t=>{for(let n of(t.backgroundColor="transparent",t.fontFamily="",t.fontWeight="",t.fontSize="",t.color="",t.textShadow="",t.region.height+2*t.region.viewportAnchorY===100&&(t.region.height=100,t.region.viewportAnchorY=0),t.region.width+2*t.region.viewportAnchorX===100&&(t.region.width=100,t.region.viewportAnchorX=0),t.nestedCues))e(n)};this.shaka_.configure({mediaSource:{modifyCueCallback:(t,n,i)=>e(t)},textDisplayFactory:()=>{if(this.loadParams.unstable_textMode===O.v.STREAM){let e=this.player_.getElements();return new n6.text.UITextDisplayer(e.video,e.textContainer)}return new n6.text.StubTextDisplayer}})}setConfigurationForDrm_(e,t){let n=t=>{let n=e.certificateUrls[t];return n?n6.util.Uint8ArrayUtils.fromBase64(n):void 0},i=["com.widevine.alpha","com.microsoft.playready"];t&&(i=["com.microsoft.playready","com.widevine.alpha"]),this.shaka_.configure({drm:{preferredKeySystems:i,servers:e.licenseUrls,advanced:{"com.widevine.alpha":{headers:{"x-dt-auth-token":e.authToken}},"com.microsoft.playready":{headers:{"x-dt-auth-token":e.authToken,"content-type":"text/xml; charset=utf-8"}},"com.apple.fps.1_0":{headers:{"x-dt-auth-token":e.authToken,"content-type":"application/x-www-form-urlencoded"},serverCertificate:n("com.apple.fps.1_0")},"com.apple.fps":{headers:{"x-dt-auth-token":e.authToken},serverCertificate:n("com.apple.fps")}},initDataTransform:this.initDataTransform_}})}setConfigurationForPreferences_(e){let t=2;e.audioChannels===O.d.SURROUND&&(t=6),this.shaka_.configure({preferredAudioLanguage:e.audioLanguage,preferredAudioChannelCount:t});let n="";e.textRole===O.y.CAPTION&&(n=this.stream_.type===O._.HLS?"captions":"caption"),this.shaka_.configure({preferredTextLanguage:e.textLanguage,preferredTextRole:n}),iB.info("Added preferences",e)}resetTimer_(){var t;let n=(null!=(t=this.loadParams.unstable_timeSyncTick)?t:e.TIME_SYNC_TICK_RATE_)*2;this.timer_.tickNow().tickEvery(n)}onTimerTick_(){let t=this.time_,n=this.seekRangeStart_,i=this.seekRangeEnd_,r=this.shaka_.seekRange();this.seekRangeStart_=iI.precise(r.start),this.seekRangeEnd_=iI.precise(r.end),this.isTimeTrustable_&&(this.time_=iI.precise(this.video_.currentTime)),this.isSeeking||null===this.leastTime_||(Math.max(this.time_-this.leastTime_,0)>e.LEAST_TIME_DELTA_THRESHOLD_?this.leastTime_=null:this.time_=this.leastTime_),this.setMarker_(),this.setChapter_(),this.trackManager_.update(),this.timelineManager_.update(),(t!==this.time_||n!==this.seekRangeStart_||i!==this.seekRangeEnd_)&&this.player_.emit(n2.TimesChange)}setPlayheadState(e,t){if(this.playheadState===e||this.playheadState===O.h.PLAYING&&e===O.h.PLAY)return;this.playheadState=e;let n=!1;this.isStarted||e!==O.h.PLAYING||(this.isStarted=!0,n=!0),this.resetTimer_(),(e===O.h.PLAYING||e===O.h.ENDED)&&this.setBuffering_(!1),e===O.h.PAUSED&&this.setLiveEdge_(!1),n&&this.setLiveEdge_(),this.player_.emit(n2.PlayheadStateChange,{playheadState:e,userGesture:t}),n&&(iB.info("Started"),this.player_.emit(n2.Started))}setSeeking_(e,t){this.isSeeking!==e&&(this.isSeeking=e,this.resetTimer_(),e?this.setBuffering_(!0):(this.setLiveEdge_(),this.setBuffering_(!1)),this.player_.emit(n2.SeekingChange,{isSeeking:e,time:t}),!e&&this.resumeAfterSeek_&&(this.resumeAfterSeek_=!1,iB.info("Resume play now that we seeked"),this.play(!1)))}setBuffering_(e){this.isBuffering!==e&&(this.isBuffering=e,this.player_.emit(n2.BufferingChange,{isBuffering:e}))}getPlayer(){return this.player_}seekTo_(e){if(this.video_.readyState===HTMLMediaElement.HAVE_NOTHING)return void iB.info("No buffer, discarded seekTo");let t=e;if(!this.isLive){let e=this.video_.duration-.4;Number.isFinite(this.video_.duration)&&t>e&&(t=e,iB.info("Too close near end, adjusted playhead to ",t))}let{start:n,end:i}=this.shaka_.seekRange();(n||i)&&(t<n?t=n:t>i&&(t=i)),this.leastTime_=t,this.video_.currentTime=t,this.setSeeking_(!0,e),this.playheadState===O.h.ENDED&&this.setPlayheadState(O.h.PAUSED)}createPrimaryTimeline_(e){let t=()=>Math.max(e.seekRangeStart_,e.seekRangeEnd_,e.time_);return{get time(){return iI.clamp(e.time_,e.seekRangeStart_,t())},get start(){return e.seekRangeStart_},get end(){return t()},seekTo(n){let i,r;i=iI.clamp(n,e.seekRangeStart_,t()),null!==(r=e.timelineManager_.adjustPrimary(i))&&(i=r),e.seekTo_(i)},get cuePoints(){return e.adManager_?e.adManager_.getCuePoints():e.timelineManager_.getCuePoints(e.primary)}}}createContentTimeline_(t){let n=()=>{var e;return null!=(e=t.broadcast)?e:t.primary},i=()=>t.timelineManager_.toIntegrated(t.primary.time,n()),r=()=>t.timelineManager_.toIntegrated(t.primary.start,n()),a=()=>t.timelineManager_.toIntegrated(t.primary.end,n()),o=()=>{let e=n();return t.timelineManager_.getCuePoints(e).map(n=>({start:t.timelineManager_.toIntegrated(n.start,e),isWatched:n.isWatched}))};return{get time(){return i()},get start(){return r()},get end(){return a()},get duration(){let e;return e=n(),t.timelineManager_.toIntegrated(e.end,e)-t.timelineManager_.toIntegrated(e.start,e)},seekTo(s){(s=>{if(t.adBreak)return iB.info("Discard seekTo on content timeline, not allowed during adBreak");let u=i(),l=iI.clamp(s,r()+e.CONTENT_TIME_FUDGE_,a()),d=n(),c=o().sort((e,t)=>
1e.start-t.start).reverse().find(e=>u<=e.start&&l>=e.start);if(c&&!c.isWatched){iB.info("Seeked over unwatched break at ".concat(c.start,", enforcing..."));let e=t.timelineManager_.toPrimary(l,d);t.timelineManager_.setPrimaryAfterBreak(e),l=c.start}let h=t.timelineManager_.toPrimary(l,d);t.primary.seekTo(h)})(s)},get cuePoints(){if(t.adManager_)return t.adManager_.getCuePoints();return o()}}}mapVideoQualities_(){let e=this.shaka_.getVideoTracks().map((e,t)=>{var n,i;return{id:t,width:null!=(n=e.width)?n:0,height:null!=(i=e.height)?i:0,isActive:e.active}});e.sort((e,t)=>t.height-e.height),(0,V.default)(e,this.videoQualities)||(this.videoQualities=e,this.player_.emit(n2.VideoQualitiesChange,{videoQualities:e}),iB.info("Video qualities",e))}mapTextTracks_(){if(this.loadParams.unstable_textMode!==O.v.STREAM)return;let e=this.shaka_.getTextTracks().filter(e=>"und"!==e.language).map((e,t)=>{var n;let i=e.active;this.shaka_.isTextTrackVisible()||(i=!1);let r=[];for(let t of e.roles)("caption"===t||"captions"===t||"public.accessibility.transcribes-spoken-dialog"===t)&&r.push(O.y.CAPTION);return{id:t,language:null!=(n=e.language)?n:"und",roles:r,isActive:i}});(0,V.default)(e,this.textTracks)||(this.textTracks_=e,this.player_.emit(n2.TextTracksChange,{textTracks:e}),iB.info("Text tracks",e))}mapAudioTracks_(){let e=this.shaka_.getAudioTracks().filter(e=>"und"!==e.language).map((e,t)=>{let n=[];for(let t of e.roles)"description"===t&&n.push(O.y.DESCRIPTION);let i=6!==e.channelsCount?O.d.STEREO:O.d.SURROUND;return{id:t,language:e.language,roles:n,channels:i,isActive:e.active}});(0,V.default)(e,this.audioTracks)||(this.audioTracks=e,this.player_.emit(n2.AudioTracksChange,{audioTracks:e}),iB.info("Audio tracks",e))}selectVideoQuality(e){let t=this.isAutoVideoQuality,n=null===e;if(this.shaka_.configure({abr:{enabled:n}}),t!==n&&this.player_.emit(n2.AutoVideoQualityChange,{isAutoVideoQuality:n}),null!==e){let t=this.shaka_.getVideoTracks()[e];(0,O.u)(t),this.shaka_.selectVideoTrack(t)}this.mapVideoQualities_()}selectTextTrack(e){if(this.loadParams.unstable_textMode===O.v.STREAM){if(null===e)this.shaka_.setTextTrackVisibility(!1);else{let t=this.shaka_.getTextTracks()[e];(0,O.u)(t),this.shaka_.setTextTrackVisibility(!0),this.shaka_.selectTextTrack(t)}this.mapTextTracks_()}else this.trackManager_.selectTextTrack(e)}selectAudioTrack(e){let t=this.shaka_.getAudioTracks()[e];(0,O.u)(t),this.shaka_.selectAudioTrack(t),this.mapAudioTracks_()}getThumbnail(e,t){return this.trackManager_.getThumbnail(e,t)}getChapter(e){let{metadata:t}=this.loadParams,n=null==t?void 0:t.chapters;if(!n)return null;let i=null;for(let t=n.length-1;t>=0;t--){let r=n[t];if(r&&e>=r.startsAt){i=r;break}}return i}setLiveEdge_(t){if(!this.isLive)return;let n=t;void 0===n&&(n=this.primary.end-this.primary.time<=e.LIVE_EDGE_THRESHOLD_),this.isLiveEdge!==n&&(this.isLiveEdge=n,this.player_.emit(n2.LiveEdgeChange,{isLiveEdge:n}))}setMarker_(){var e;let{metadata:t}=this.loadParams;if(!(null==t?void 0:t.markers))return;let{time:n}=this.content,i=null!=(e=t.markers.find(e=>n>=e.startsAt&&n<e.startsAt+e.duration))?e:null,r=t.markers[t.markers.length-1];!i&&r&&n>r.startsAt&&(i=r),i!==this.marker&&(this.marker=i,this.player_.emit(n2.MarkerChange,{marker:i}))}setChapter_(){let{time:e}=this.content,t=this.getChapter(e);t!==this.chapter&&(this.chapter=t,this.player_.emit(n2.ChapterChange,{chapter:t}))}internal_getShaka(){return this.shaka_}static isSupported(){return n6.Player.isBrowserSupported()}static mapShakaError_(e){return e.code===n6.util.Error.Code.CONTENT_UNSUPPORTED_BY_BROWSER?new O.s(O.c.NO_SUPPORTED_STREAM_FOUND):new O.s(O.c.SHAKA_ERROR,e)}constructor(e,t,n){(0,L._)(this,"player_",void 0),(0,L._)(this,"stream_",void 0),(0,L._)(this,"loadParams",void 0),(0,L._)(this,"shaka_",void 0),(0,L._)(this,"eventManager_",new O.r),(0,L._)(this,"playheadState",O.h.IDLE),(0,L._)(this,"isStarted",!1),(0,L._)(this,"isSeeking",!1),(0,L._)(this,"isBuffering",!1),(0,L._)(this,"leastTime_",null),(0,L._)(this,"timer_",void 0),(0,L._)(this,"adManager_",null),(0,L._)(this,"trackManager_",void 0),(0,L._)(this,"adCompanionManager_",void 0),(0,L._)(this,"timelineManager_",void 0),(0,L._)(this,"time_",0),(0,L._)(this,"seekRangeStart_",0),(0,L._)(this,"seekRangeEnd_",0),(0,L._)(this,"resumeAfterSeek_",!1),(0,L._)(this,"mediaQualityInfos_",new Map),(0,L._)(this,"isLiveEdge",!1),(0,L._)(this,"primary",void 0),(0,L._)(this,"content",void 0),(0,L._)(this,"videoQualities",[]),(0,L._)(this,"audioTracks",[]),(0,L._)(this,"textTracks_",[]),(0,L._)(this,"marker",null),(0,L._)(this,"chapter",null),(0,L._)(this,"onRequest_",(e,t)=>{if(t.$requestType=e,e===n6.net.NetworkingEngine.RequestType.LICENSE){var n;if((null==(n=t.drmInfo)?void 0:n.keySystem)==="com.apple.fps.1_0"&&t.body){let e=encodeURIComponent(n6.util.Uint8ArrayUtils.toStandardBase64(new Uint8Array(t.body)));t.body=n6.util.StringUtils.toUTF8("spc=".concat(e))}}}),(0,L._)(this,"onResponse_",(e,t)=>{if(e===n6.net.NetworkingEngine.RequestType.LICENSE){var n;let e=null==(n=t.originalRequest.drmInfo)?void 0:n.keySystem;if("com.widevine.alpha"===e){let{license:e}=JSON.parse(n6.util.StringUtils.fromUTF8(t.data));t.data=n6.util.Uint8ArrayUtils.fromBase64(e).buffer}if("com.apple.fps.1_0"===e||"com.apple.fps"===e){let e=n6.util.StringUtils.fromUTF8(t.data);t.data=n6.util.Uint8ArrayUtils.fromBase64(e).buffer}}if(O.o.isApple(this.player_.device)&&e===n6.net.NetworkingEngine.RequestType.MANIFEST){let e="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",n=n6.util.StringUtils.fromUTF8(t.data);if(!n.includes(e)){let i=n.replace(/<ContentProtection[^>]*mp4protection[^>]*\/>/g,t=>t.includes('value="cbcs"')?"".concat(t,'<ContentProtection schemeIdUri="urn:uuid:').concat(e,'" value="FairPlay"/>'):t);t.data=n6.util.StringUtils.toUTF8(i)}}}),(0,L._)(this,"initDataTransform_",(e,t,n)=>{if("skd"===t&&(null==n?void 0:n.keySystem)==="com.apple.fps.1_0"){(0,O.u)(n.serverCertificate);let t=n6.util.StringUtils.fromBytesAutoDetect(e);return n6.util.FairPlayUtils.initDataTransform(e,t,n.serverCertificate)}return e}),this.player_=e,this.stream_=t,this.loadParams=n,iN.patchForStream(this.stream_),this.shaka_=new n6.Player,this.shaka_.attach(this.video_),this.setConfiguration_(e.device);const i=this.shaka_.getNetworkingEngine();i.registerRequestFilter((e,t)=>
1this.onRequest_(e,t)),i.registerResponseFilter((e,t)=>this.onResponse_(e,t)),this.timelineManager_=new iM(this),this.trackManager_=new iL(this),this.adCompanionManager_=new it(this),this.timer_=new O.n(()=>this.onTimerTick_()),this.primary=this.createPrimaryTimeline_(this),this.content=this.createContentTimeline_(this),this.bindListeners_()}},(0,L._)(S,"CONTENT_TIME_FUDGE_",.001),(0,L._)(S,"LEAST_TIME_DELTA_THRESHOLD_",.25),(0,L._)(S,"LIVE_EDGE_THRESHOLD_",20),(0,L._)(S,"TIME_SYNC_TICK_RATE_",.25),S);let iV=O.l.create("CimPlugin"),iH=O.l.create("GtmPlugin");function iq(e){return null==e?null:Math.trunc(e)}let iG=O.l.create("HeartbeatPlugin"),iK=O.l.create("MuxPlugin");function iW(e){if(null!=e)return Math.floor(1e3*e)}var iz=class{reset(){this.update(this.defaultValue_)}update(e){let t=this.value;this.value={...t,...e},(0,V.default)(t,this.value)||this.onUpdate_(this.value)}constructor(e,t){(0,L._)(this,"defaultValue_",void 0),(0,L._)(this,"onUpdate_",void 0),(0,L._)(this,"value",void 0),this.defaultValue_=e,this.onUpdate_=t,this.value=e}};let iX=O.l.create("Scheduler"),iY=Symbol.for("Scheduler.abort");var iJ=class{enqueue(e){this.queue_.push(e),this.dequeue()}dequeue(){if(this.workingTask_)return;let e=this.queue_.shift();if(!e)return;let t={cancelled:!1};this.workingTask_={callback:e,ctx:t};let n=e=>{e&&(e===iY?iX.info("Aborted"):this.onError_(e)),this.workingTask_=null,this.dequeue()};e(t).then(n).catch(n)}flush(){this.workingTask_&&(this.workingTask_.ctx.cancelled=!0),this.queue_=[]}static stillRunning(e){if(e.cancelled)throw iY}static runWithTimeout(e,t){let n;return Promise.race([e(),new Promise((e,i)=>{n=window.setTimeout(()=>{let e=Error("Timed out after ".concat(t,"s"));e.name="TimeoutError",i(e)},iI.ms(t))})]).finally(()=>clearTimeout(n))}constructor(e){(0,L._)(this,"onError_",void 0),(0,L._)(this,"queue_",[]),(0,L._)(this,"workingTask_",null),this.onError_=e}};let iQ=O.l.create("Player"),i$='Property is only available when player is loaded, make sure you are in "LoadStatus.LOADED".';var iZ=(x=class e extends n4{static async isSupported(){return"fetch"in window&&await iF.isSupported()}static async loadScripts(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];await iu.load(t)}loadFromButter(e){this.unload(),this.scheduler_.enqueue(async t=>{iQ.info("LoadFromButter",e);let{loadParams:n,...i}=e;iQ.info("Requesting Butter config",i);let r=await O.i.getConfig(this.device,i);iJ.stillRunning(t),iQ.info("Received Butter config",r);let a=O.i.mapConfigToLoadParams(i,r);n&&(iQ.info("Merging loadParams",n),a=B(a,n)),await this.loadInner_(a,t)})}async load(e){this.unload(),this.scheduler_.enqueue(async t=>{iQ.info("Load",e),await this.loadInner_(e,t)})}async loadInner_(e,t){this.normalizeLoadParams_(e),e.unstable_recycleMediaElements&&(this.recycleMediaElements_(),iQ.info("Recycled media elements")),await this.autoplayManager_.promise,iJ.stillRunning(t),this.textTrackStyle_.reset(),e.textTrackStyle&&this.textTrackStyle_.update(e.textTrackStyle);let n=iF.create(this,e);if(this.controller_=n,this.setLoadStatus_(O.p.LOADING),await n.load(),iJ.stillRunning(t),void 0!==e.volume&&(iQ.info("Initial volume set",e.volume),this.setVolume(e.volume)),e.autoPlay){let t=e=>!O.s.is(e)||e.code!==O.c.AUTOPLAY_FAILED;try{this.play(!1),iQ.info("Autoplay success")}catch(n){if(t(n)&&iQ.error("Didn't expect this error in autoplay logic",n),e.allowMutedAutoplay){this.setVolume(0);try{this.play(!1),iQ.info("Autoplay failed, retried muted")}catch(e){t(e)&&iQ.error("Didn't expect this error in muted autoplay logic",e)}}}}this.setLoadStatus_(O.p.LOADED)}normalizeLoadParams_(e){var t,n;e.sessionId||(e.sessionId=O.o.uuid()),(null==(t=e.metadata)?void 0:t.markers)&&e.metadata.markers.sort((e,t)=>e.startsAt-t.startsAt),(null==(n=e.metadata)?void 0:n.chapters)&&e.metadata.chapters.sort((e,t)=>e.startsAt-t.startsAt);let i=e=>iQ.alwaysWarn("Usage of an unstable loadParams property: ".concat(e));void 0!==e.unstable_textMode&&i('textMode is set to "'.concat(e.unstable_textMode,'"')),void 0!==e.unstable_timeSyncTick&&i('timeSyncTick is set to "'.concat(e.unstable_timeSyncTick,'"'))}async unload(){this.scheduler_.flush(),this.scheduler_.enqueue(async()=>{this.error=null,this.loadStatus!==O.p.IDLE&&(iQ.info("Unload"),this.setLoadStatus_(O.p.IDLE),this.controller_&&(await this.controller_.destroy(),this.controller_=null))})}destroy(){i0.delete(this),this.unload(),this.resizeObserver_.destroy(),this.container.innerHTML=""}get loadParams(){var e,t;return null!=(e=null==(t=this.controller_)?void 0:t.loadParams)?e:null}get metadata(){var e,t;return null!=(e=null==(t=this.controller_)?void 0:t.loadParams.metadata)?e:null}get marker(){return(0,O.u)(this.controller_,i$),this.controller_.marker}get chapter(){return(0,O.u)(this.controller_,i$),this.controller_.chapter}get stats(){return(0,O.u)(this.controller_,i$),this.controller_.stats}get autoplayStatus(){return this.autoplayManager_.status}get playheadState(){return(0,O.u)(this.controller_,i$),this.controller_.playheadState}get startDate(){return(0,O.u)(this.controller_,i$),this.controller_.startDate}get volume(){return this.elements_.video.volume}get primary(){return(0,O.u)(this.controller_,i$),this.controller_.primary}get content(){return(0,O.u)(this.controller_,i$),this.controller_.content}get isLive(){return(0,O.u)(this.controller_,i$),this.controller_.isLive}get isLiveEdge(){return(0,O.u)(this.controller_,i$),this.controller_.isLiveEdge}get isStarted(){return(0,O.u)(this.controller_,i$),this.controller_.isStarted}get isSeeking(){return(0,O.u)(this.controller_,i$),this.controller_.isSeeking}get isBuffering(){return(0,O.u)(this.controller_,i$),this.controller_.isBuffering}get adBreak(){return(0,O.u)(this.controller_,i$),this.controller_.adBreak}get ad(){return(0,O.u)(this.controller_,i$),this.controller_.ad}get pauseAd(){return(0,O.u)(this.controller_,i$),this.controller_.pauseAd}get broadcast(){return(0,O.u)(this.controller_,i$),this.controller_.broadcast}get isAutoVideoQuality(){return(0,O.u)(this.controller_,i$),this.controller_.isAutoVideoQuality}get videoQualities(){return(0,O.u)(this.controller_,i$),this.controller_.videoQualities}get textTracks(){return(0,O.u)(this.controller_,i$),this.controller_.textTracks}get textTrackStyle(){return this.textTrackStyle_.value}get audioTracks(){return(0,O.u)(this.controller_,i$),this.controller_.audioTracks}selectVideoQuality(e){var t;null==(t=this.controller_)||t.selectVideoQuality(e)}selectTextTrack(e){var t;null==(t=this.controller_)||t.selectTextTrack(e)}setTextTrackStyle(e){null===e?this.textTrackStyle_.reset():this.textTrackStyle_.update(e)}selectAudioTrack(e){var t;null==(t=this.controller_)||t.selectAudioTrack(e)}getThumbnail(e){var t,n;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200;return null!=(t=null==(n=this.controller_)?void 0:n.getThumbnail(e,i
1))?t:null}getChapter(e){var t,n;return null!=(t=null==(n=this.controller_)?void 0:n.getChapter(e))?t:null}getElements(){return this.elements_}play(){var e;let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];if(!this.autoplayManager_.isAllowed(t))throw new O.s(O.c.AUTOPLAY_FAILED);null==(e=this.controller_)||e.play(t)}pause(){var e;let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];null==(e=this.controller_)||e.pause(!0,t)}setVolume(e){let t=iI.clamp(e,0,1);t&&this.autoplayManager_.unmute();let{video:n,adVideo:i}=this.elements_;n.volume=i.volume=t,n.muted=i.muted=0===t,this.emit(n2.VolumeChange)}startSeeking(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null==(e=this.controller_)||e.startSeeking(t)}internal_getController(){return this.controller_}setLoadStatus_(e){this.loadStatus!==e&&(iQ.info("Updated loadStatus to ".concat(e," (from ").concat(this.loadStatus,")")),this.loadStatus=e,this.emit(n2.LoadStatusChange,{loadStatus:e}))}bindPlugins_(){var e,t,n,i;let r,a,o,s,u,l;e=this,r=null,a=()=>{r&&(r.destroy(),r=null)},o=()=>{var t,n,i,o;a();let s=null!=(t=null==(i=e.loadParams)||null==(n=i.tracking)?void 0:n.cim)?t:null==(o=e.broadcast)?void 0:o.cim;if(s){iV.info("Create");try{let t,n,i,a,o,u,l;t=t=>{let n={};"play"===t&&(n=a()),o.programEvent(s.materialId,e.content.time,t,n),iV.info(t)},n="pause",i=e=>{n!==e&&t(n=e)},a=()=>({volume:Math.floor(100*e.volume),resolution:"".concat(e.stats.width,"x").concat(e.stats.height)}),iu.load([O.g.GEMIUS_PLAYER]),(0,O.u)(window.GemiusPlayer),(o=new window.GemiusPlayer("popcornPlayer_v5",s.identifier,a())).newProgram(s.materialId,{programName:s.name.replace(/\W/g,""),programType:"video",programDuration:s.duration,se:s.section,tv:s.tv,channel:s.channel,st:s.sourceType,ct:s.contentType}),iV.info("newProgram",s),e.playheadState===O.h.PLAYING&&i("play"),(l=(u=new O.r).listen(e))(n2.PlayheadStateChange,t=>{e.adBreak||(t.playheadState===O.h.PLAYING&&i("play"),t.playheadState===O.h.PAUSED&&i("pause"),t.playheadState===O.h.ENDED&&i("complete"))}),l(n2.AdBreakStarted,()=>{i("pause")}),l(n2.AdBreakEnded,()=>{i("play")}),l(n2.SeekingChange,t=>{t.isSeeking?(e.playheadState===O.h.PLAYING||e.playheadState===O.h.PAUSED)&&i("seek"):e.playheadState!==O.h.PLAYING||e.adBreak||i("play")}),r={destroy(){u.removeAll(),t("close")}}}catch(e){iV.warn("Failed to create",e)}}},e.addEventListener(n2.LoadStatusChange,e=>{e.loadStatus===O.p.LOADED&&o(),e.loadStatus===O.p.IDLE&&a()}),e.addEventListener(n2.BroadcastChange,e=>{var t,n;(null==(t=e.broadcast)?void 0:t.id)!==(null==(n=e.oldBroadcast)?void 0:n.id)&&o()}),t=this,s=null,t.addEventListener(n2.LoadStatusChange,e=>{if(e.loadStatus===O.p.LOADING){var n;let{loadParams:e}=t;if(null==e||null==(n=e.tracking)?void 0:n.mux){if(window.__LFVP_WEB_E2E__)return void iK.warn("In E2E, config instructs to track but it is force disabled.");iK.info("Create"),s=function(e,t){var n,i,r;let a=Date.now(),{loadParams:o}=e;(0,O.u)(null==o?void 0:o.sessionId);let s=o.sessionId,u=250,l=1e3;"browser"!==e.device.name&&(u=2e3,l=3e3),nz.init(s,{getPlayheadTime:()=>iW(e.primary.time),getStateData(){var t;if(e.loadStatus===O.p.LOADED)return{view_drm_type:e.stats.keySystem,view_dropped_frame_count:e.stats.droppedFrames,player_is_paused:e.playheadState!==O.h.PLAYING,player_autoplay_on:y,player_software_name:"shaka",player_software_version:iZ.SHAKA_VERSION,player_width:e.container.clientWidth,player_height:e.container.clientHeight,video_stream_type:e.isLive?"live":"on-demand",video_source_duration:iW(e.primary.end),video_source_url:e.stats.uri,video_source_width:e.stats.videoWidth,video_source_height:e.stats.videoHeight,video_source_bitrate:e.stats.videoBitrate,video_source_fps:e.stats.videoFps,video_source_codec:e.stats.videoCodec,video_audio_codec:e.stats.audioCodec,custom_3:null==(t=e.audioTracks.find(e=>e.isActive))?void 0:t.channels.toString()}},data:{env_key:t.envKey,sub_property_id:t.subPropertyId,player_init_time:nz.utils.now(),player_name:"popcornPlayer",player_version:"5.1.11",viewer_user_id:t.userId,view_session_id:o.sessionId,video_id:null==(n=o.metadata)?void 0:n.id,video_content_type:null==(i=o.metadata)?void 0:i.type,video_title:null==(r=o.metadata)?void 0:r.title,custom_2:e.device.app,...function(e){if("telenetstb"===e.name){let t="EOS",n="1";return"eos2"===e.model&&(n="2"),"apollo1"===e.model&&(t="Apollo",n="1"),{viewer_device_name:"TelenetSTB",viewer_device_category:"tv",viewer_device_manufacturer:"Liberty Global",viewer_os_family:t,viewer_os_version:n}}if("tivoauto"===e.name){let t="Android";return"linux"===e.os&&(t="GNU/Linux"),{viewer_device_category:"car",viewer_os_family:t}}return"webos"===e.name?{viewer_os_family:"webOS",viewer_os_version:e.version}:"tizen"===e.name?{viewer_os_family:"Tizen",viewer_os_version:e.version}:"titanos"===e.name?{viewer_os_family:"TitanOS"}:"vidaa"===e.name?{viewer_os_family:"VIDAA"}:null}(e.device)},automaticErrorTracking:!1,minimumRebufferDuration:u,sustainedRebufferThreshold:l});let d=(e,t)=>{g||(nz.emit(s,e,t),"timeupdate"===e||"requestcompleted"===e||iK.info(e,t))},c="pause",h=t=>{c!==t&&(c=t,e.adBreak?d("ad".concat(c)):d(c))},p=!1,f=()=>{p&&d("seeked"),p=!1},g=!1,m=()=>{g||d("destroy"),g=!0},v=e=>{try{return JSON.stringify(e,(e,t)=>t instanceof Error?{...t,code:"code"in t?t.code:void 0,name:t.name,message:t.message,stack:void 0}:t instanceof n6.util.Error?{...t,stack:void 0}:t)}catch(e){return}},y=!1,b=!1;d("playerready"),o.autoPlay&&h("play");let w=new O.r,T=w.listen(e);return T(n2.LoadStatusChange,t=>{t.loadStatus===O.p.LOADED&&(e.playheadState===O.h.IDLE?h("pause"):y=!0)}),T(n2.PlayheadStateChange,e=>{if(e.playheadState===O.h.PLAY&&h("play"),e.playheadState===O.h.PLAYING){if(b)return;h("playing")}e.playheadState===O.h.PAUSED&&h("pause"),e.playheadState===O.h.ENDED&&h("ended")}),T(n2.TimesChange,()=>{d("timeupdate",{player_playhead_time:iW(e.primary.time)})}),T(n2.AdBreakStarted,()=>
1{b=!0,f(),d("pause"),d("adbreakstart")}),T(n2.AdBreakEnded,()=>{b=!1,d("adbreakend"),h("play");let{video:t}=e.getElements();t.readyState<2?w.listenOnce(t)("playing",()=>{h("playing")}):h("playing")}),T(n2.AdStarted,()=>{b=!1,"play"===c?d("adplay"):h("play"),h("playing")}),T(n2.AdEnded,()=>{d("adended")}),T(n2.SeekingChange,e=>{e.isSeeking?p||(p=!0,d("seeking")):f()}),T(n2.Error,t=>{var n,i,r;let o=(n=e.device,i=t.error,r=a,Date.now()-r>36e6||"telenetstb"===n.name&&i.code===O.c.SHAKA_ERROR&&i.data.code===n6.util.Error.Code.RESTRICTIONS_CANNOT_BE_MET?"warning":"fatal");d("error",{player_error_code:t.error.code,player_error_message:t.error.toString(),player_error_severity:o,player_error_context:v(t.error)}),m()}),T(n2.Warning,e=>{d("error",{player_error_code:e.error.code,player_error_message:e.error.toString(),player_error_severity:"warning",player_error_context:v(e.error)})}),T(n2.Network,e=>{var t;let n;"license"===e.requestType?n="encryption":"manifest"===e.requestType?n="manifest":"segment"===e.requestType&&(n="video"===e.contentType?"video":"audio"===e.contentType?"audio":"text"===e.contentType?"subtitle":"media");let i={request_type:n,request_start:e.startTime,request_bytes_loaded:e.bytes,request_response_start:e.startTime,request_response_end:e.endTime,request_url:e.url};"completed"===e.type&&d("requestcompleted",i),"failed"===e.type&&d("requestfailed",{...i,request_error:"RequestError",request_error_code:null!=(t=e.statusCode)?t:500,request_error_text:"A request failed"}),"canceled"===e.type&&d("requestcanceled",i)}),T(n2.StatsChange,t=>{e.isStarted&&"video"===t.type&&d("renditionchange",{video_source_width:e.stats.videoWidth,video_source_height:e.stats.videoHeight,video_source_bitrate:e.stats.videoBitrate,video_source_fps:e.stats.videoFps,video_source_codec:e.stats.videoCodec})}),{destroy(){w.removeAll(),m()}}}(t,e.tracking.mux)}}e.loadStatus===O.p.IDLE&&s&&(s.destroy(),s=null)}),n=this,u=null,n.addEventListener(n2.LoadStatusChange,e=>{if(e.loadStatus===O.p.LOADED){(0,O.u)(n.loadParams);let{butterParams:e,heartbeat:t}=n.loadParams;if(!e||!t)return;let i=Date.now()+1e3*t.expirationSeconds;(u=new O.t(async()=>{if(Date.now()>i){iG.info("Stopped poller due to expiration"),null==u||u.stop();return}await O.i.getHeartbeat(n.device,e,t)},t.pollSeconds)).start(),iG.info("Polling heartbeat every ".concat(t.pollSeconds,"s"))}e.loadStatus===O.p.IDLE&&(null==u||u.stop(),u=null)}),i=this,l=null,i.addEventListener(n2.LoadStatusChange,e=>{if(e.loadStatus===O.p.LOADED){var t,n,r;let e=null==(n=i.loadParams)||null==(t=n.tracking)?void 0:t.gtm;if(e){let t,n,a,o,s,u,d,c,h,p;iH.info("Create"),t=new O.r,(n=window)[a=null!=(r=e.dataLayerName)?r:"dataLayer"]||(iH.warn("Enabled GTM but no dataLayer found in global. Plugin might not work."),n[a]=[]),o=n[a],s=(e,t)=>{let n=u(t);o.push({event:"player:".concat(e),...n}),iH.info(e,n)},u=e=>{var t,n,r,a,o,s,u,l,d,c,h,p,f,g,m,v,y;let b=null!=(t=null==e?void 0:e.broadcast)?t:i.broadcast,w=null!=(n=null==e?void 0:e.marker)?n:i.marker,T=null!=(r=null==e?void 0:e.chapter)?r:i.chapter,S=iq(i.content.time),x=iq(i.content.duration);return i.isLive&&(S=null,x=null),{player:{version:"5.1.11",session_id:null!=(a=null==(h=i.loadParams)?void 0:h.sessionId)?a:null,volume:i.volume,playback_device:i.device.name,playback_source:"stream",marker:null!=(o=null==w?void 0:w.type)?o:null,chapter_position:null!=(s=null==T?void 0:T.startsAt)?s:null,asset_id:null!=(u=null==(f=i.loadParams)||null==(p=f.metadata)?void 0:p.id)?u:null,asset_title:null!=(l=null==(m=i.loadParams)||null==(g=m.metadata)?void 0:g.title)?l:null,duration:x,position:S,live:i.isLive,broadcast_asset_id:null!=(d=null==b||null==(v=b.metadata)?void 0:v.id)?d:null,broadcast_asset_title:null!=(c=null==b||null==(y=b.metadata)?void 0:y.title)?c:null,broadcast_position:b?iq(i.content.time):null,broadcast_duration:b?iq(i.content.duration):null}}},i.playheadState===O.h.PLAY&&s("play"),s("loaded"),d=t.listen(i),c=t.listenOnce(i),d(n2.Started,()=>{if(i.adBreak?(iH.info("Started in break, postpone started"),c(n2.AdBreakEnded,()=>s("started"))):s("started"),i.isLive){let e=iU(()=>{s("livestream_pulse")},60,!0);d(n2.TimesChange,()=>{i.playheadState===O.h.PLAYING&&e()}),d(n2.PlayheadStateChange,t=>{t.playheadState===O.h.PAUSED?e.suspend():e.resume()})}}),d(n2.PlayheadStateChange,e=>{e.playheadState===O.h.PLAY&&s(i.isStarted?"resume":"play"),e.playheadState===O.h.PAUSED&&s("pause"),e.playheadState===O.h.ENDED&&s("ended")}),d(n2.SeekingChange,e=>{e.isSeeking||s("seeked")}),d(n2.Error,()=>{s("error")}),d(n2.UiIntent,e=>{"toChapter"===e.type&&s("seek_to_chapter",{chapter:e.chapter})}),h=[10,20,30,40,50,60,70,80,90],p=new Set,d(n2.TimesChange,()=>{var e;if(!i.isStarted||i.isLive)return;let t=i.content.time/(null!=(e=i.content.duration)?e:i.content.end
1)*100;for(let e of h)t>e&&!p.has(e)&&(p.add(e),s("viewed_".concat(e)))}),d(n2.BroadcastChange,e=>{var t,n;(null==(t=e.oldBroadcast)?void 0:t.id)!==(null==(n=e.broadcast)?void 0:n.id)&&(e.oldBroadcast&&s("livestream_broadcast_ended",{broadcast:e.oldBroadcast}),e.broadcast&&s("livestream_broadcast_started",{broadcast:e.broadcast}))}),l={destroy(){t.removeAll()}}}}e.loadStatus===O.p.IDLE&&l&&(iH.info("Destroy"),l.destroy(),l=null)})}updateTextContainer_(){let{textContainer:e}=this.elements_,t=this.textTrackStyle_.value,n=this.container.getBoundingClientRect(),i=iP.fitToBox(n,1920/1080),r=(n.height-i.height)/2,a=(n.width-i.width)/2,o=r+i.height*t.marginTop/100,s=r+i.height*t.marginBottom/100,u=a+i.width*t.marginLeft/100,l=a+i.width*t.marginRight/100,d=i.height*(t.fontSizeFactor/100);iP.applyStyles(e,{top:"".concat(o,"px"),bottom:"".concat(s,"px"),left:"".concat(u,"px"),right:"".concat(l,"px"),fontSize:"".concat(d,"px")})}static createElements_(e){e.classList.add("player__root");let t=iP.createVideoElement();e.appendChild(t);let n=iP.createElement("div");n.classList.add("player__textcontainer"),e.appendChild(n);let i=iP.createElement("div");i.classList.add("player__adcontainer"),e.appendChild(i);let r=iP.createVideoElement();i.appendChild(r);let a=iP.createElement("div");return a.classList.add("player__pausead"),e.appendChild(a),{video:t,textContainer:n,adContainer:i,adVideo:r,pauseAd:a}}recycleMediaElements_(){let{video:e}=this.elements_;if(e.src){let t;e.src="";try{e.load()}catch(e){t=e}iQ.alwaysWarn("Recycling video element but the source is still active.",t)}let t=iP.createVideoElement();iP.replaceElement(e,t),this.elements_.video=t}constructor(t,n){var i,r=()=>super.emit;super(),i=this,(0,L._)(this,"container",void 0),(0,L._)(this,"controller_",null),(0,L._)(this,"autoplayManager_",void 0),(0,L._)(this,"elements_",void 0),(0,L._)(this,"scheduler_",void 0),(0,L._)(this,"resizeObserver_",void 0),(0,L._)(this,"textTrackStyle_",void 0),(0,L._)(this,"loadStatus",O.p.IDLE),(0,L._)(this,"device",void 0),(0,L._)(this,"error",null),(0,L._)(this,"emit",function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t[0]===n2.Error){let e=t[1];i.error=e.error,iQ.error(e.error)}r().call(i,...t)}),this.container=t,i0.add(this),this.elements_=e.createElements_(t),this.device=O.o.formatDevice(n.device),iN.patchForDevice(this.device),this.autoplayManager_=new n9(this),this.bindPlugins_(),this.scheduler_=new iJ(e=>{let t=O.s.is(e)?e:new O.s(O.c.UNKNOWN,e);this.emit(n2.Error,{error:t})}),this.textTrackStyle_=new iz({marginLeft:0,marginRight:0,marginTop:10,marginBottom:10,fontSizeFactor:4},e=>{this.updateTextContainer_(),this.emit(n2.TextTrackStyleChange,{textTrackStyle:e})}),this.resizeObserver_=new ia(this.container,()=>{this.updateTextContainer_()})}},(0,L._)(x,"VERSION","5.1.11"),(0,L._)(x,"SHAKA_VERSION",n6.Player.version),x);let i0=new Set;"u">typeof window&&Object.assign(window,{PopcornPlayer:{registry:i0,version:iZ.VERSION,shaka:n6,get all(){return Array.from(i0)}}}),e.s(["Events",0,n2,"Player",0,iZ,"UI_EVENT_HANDLERS_SYMBOL",0,n3],73869)},24627,(e,t,n)=>{"use strict";var i=Object.prototype.hasOwnProperty,r="~";function a(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,i,a){if("function"!=typeof n)throw TypeError("The listener must be a function");var s=new o(n,i||e,a),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function u(e,t,n,i,a){if("function"!=typeof n)throw TypeError("The listener must be a function");var s=new o(n,i||e,a),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].unshift(s):(e._events[u]=s,e._eventsCount++),e}function l(e,t){0==--e._eventsCount?e._events=new a:delete e._events[t]}function d(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(r=!1)),d.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)i.call(e,t)&&n.push(r?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},d.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},d.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},d.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var u,l,d=this._events[s],c=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),c){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,n),!0;case 4:return d.fn.call(d.context,t,n,i),!0;case 5:return d.fn.call(d.context,t,n,i,a),!0;case 6:return d.fn.call(d.context,t,n,i,a,o),!0}for(l=1,u=Array(c-1);l<c;l++)u[l-1]=arguments[l];d.fn.apply(d.context,u)}else{var h,p=d.length;for(l=0;l<p;l++)switch(d[l].once&&this.removeListener(e,d[l].fn,void 0,!0),c){case 1:d[l].fn.call(d[l].context);break;case 2:d[l].fn.call(d[l].context,t);break;case 3:d[l].fn.call(d[l].context,t,n);break;case 4:d[l].fn.call(d[l].context,t,n,i);break;default:if(!u)for(h=1,u=Array(c-1);h<c;h++)u[h-1]=arguments[h];d[l].fn.apply(d[l].context,u)}}return!0},d.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},d.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},d.prototype.prepend=function(e,t,n){return u(this,e,t,n,!1)},d.prototype.prependOnce=function(e,t,n){return u(this,e,t,n,!0)},d.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return l(this,a),this;var o=this._events[a];if(o.fn)o.fn!==t||i&&!o.once||n&&o.context!==n||l(this,a);else{for(var s=0,u=[],d=o.length;s<d;s++)(o[s].fn!==t||i&&!o[s].once||n&&o[s].context!==n)&&u.push(o[s]);u.length?this._events[a]=1===u.length?u[0]:u:l(this,a)}return this},d.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&l(this,t)):(this._events=new a,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prototype.prependListener=d.prototype.prepend,d.prefixed=r,d.EventEmitter=d,t.exports=d},10612,(e,t,n)=>{"use strict";
1t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;if(Array.isArray(t)){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((i=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,a[r]))return!1;for(r=i;0!=r--;){var i,r,a,o=a[r];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}},83802,e=>{"use strict";e.s(["_",0,function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}])},36356,(e,t,n)=>{e.e,t.exports=(()=>{"use strict";let e,t;var n={d:(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},i={};n.d(i,{default:()=>d});let r=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n]},a=e=>null!==e&&"Object"===(null==e?void 0:e.constructor.name),o=()=>{if(!e){e=!0;try{(t=u.storage||localStorage).getItem("")}catch(i){let e,n;t=n={__proto__:e={getItem:e=>n[e]||null,setItem:(e,t)=>{n[e]=t},removeItem:e=>{n[e]=void 0},clear:()=>{n={__proto__:e}}}}}l()}},s=function(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return n?[...JSON.stringify(e)].map(e=>String.fromCharCode(e.charCodeAt(0)+t)).join(""):JSON.parse([...e].map(e=>String.fromCharCode(e.charCodeAt(0)-t)).join(""))},u={ttl:null,encrypt:!1,encrypter:s,decrypter:(e,t)=>s(e,t,!1),secret:75,storage:void 0};Object.seal(u);let l=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];for(let n of(o(),Object.keys(t))){let i,r=t.getItem(n);try{i=JSON.parse(r||"")}catch(e){continue}a(i)&&"\0"in i&&(Date.now()>i.ttl||e)&&t.removeItem(n)}},d={config:u,set:function(e,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o();let a={...u,...i,encrypt:!1!==i.encrypt&&(i.encrypt||u.encrypt),ttl:null===i.ttl?null:i.ttl||u.ttl};try{let i=a.ttl&&!isNaN(a.ttl)&&a.ttl>0,o=i?{"\0":n,ttl:Date.now()+1e3*a.ttl}:n;a.encrypt&&(i?o["\0"]=(a.encrypter||r)(o["\0"],a.secret):o=(a.encrypter||r)(o,a.secret)),t.setItem(e,JSON.stringify(o))}catch(e){return!1}},get:function(e){let n,i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o();let l=t.getItem(e),d={...u,...s,encrypt:!1!==s.encrypt&&(s.encrypt||u.encrypt),ttl:null===s.ttl?null:s.ttl||u.ttl};try{n=JSON.parse(l||""),i=a(n)&&"\0"in n,(d.decrypt||d.encrypt)&&(i?n["\0"]=(d.decrypter||r)(n["\0"],d.secret):n=(d.decrypter||r)(n,d.secret))}catch(e){}return i?Date.now()>n.ttl?(t.removeItem(e),null):n["\0"]:void 0!==n?n:l},flush:l,clear:()=>{o(),t.clear()},remove:e=>{o(),t.removeItem(e)}};return i.default})()},29387,e=>{"use strict";for(var t,n,i,r,a,o=e.i(83802),s=e.i(36356),u=256,l=[];u--;)l[u]=(u+256).toString(16).substring(1);let d={MP4:"mp4",DASH:"dash",HLS:"hls"};function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value is null";if(null==e)throw Error(t)}var h=(t=class e{static create(t){return new e(t)}info(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];this.enabled_&&console.log(...this.prefix_,...t)}warn(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];this.enabled_&&console.warn(...this.prefix_,...t)}alwaysWarn(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];console.warn(...this.prefix_,...t)}error(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];this.enabled_&&console.error(...this.prefix_,...t)}static toHsl_(e){let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t),t&=t;return"hsl(".concat(Math.abs(137*t)%360,", ").concat(50+Math.abs(t)%50,"%, ").concat(40+Math.abs(73*t)%20,"%)")}constructor(t){(0,o._)(this,"enabled_",s.default.get(e.LOG_ID_KEY_)),(0,o._)(this,"prefix_",[]),this.prefix_.push("%c".concat(t),"color: ".concat(e.toHsl_(t))),e.ALWAYS_ENABLED&&(this.enabled_=!0)}},(0,o._)(t,"LOG_ID_KEY_","LOG"),(0,o._)(t,"ALWAYS_ENABLED",!1),t);let p={UNKNOWN:1e3,AUTOPLAY_FAILED:1001,SHAKA_ERROR:1002,EXPIRED:2e3,GEOBLOCKED:2001,RATE_LIMITED:2002,VPN_DETECTED:2003,BUTTER_ERROR:2004,NO_SUPPORTED_STREAM_FOUND:3001,DEVICE_UNKNOWN:4e3};var f=class e{static is(t){return t instanceof e}get extendedCode(){return this.toString()}toString(){if(this.code===p.SHAKA_ERROR){let e=this.data;return"".concat(this.code,".").concat(e.code)}if(this.code===p.BUTTER_ERROR){let e=this.data;return"".concat(this.code,".").concat(e.code)}
1return this.code.toString()}constructor(e,t){(0,o._)(this,"code",void 0),(0,o._)(this,"data",void 0),(0,o._)(this,"message",void 0),this.code=e,this.data=t,this.message="PlayerError ".concat(this.extendedCode)}},g=(n=class e{static sortByDeterminedOrder(e,t,n){let i=[];return[...e.filter(e=>!!n.includes(t(e))||(i.push(e),!1)).sort((e,i)=>n.indexOf(t(e))-n.indexOf(t(i))),...i]}static mapReduce(t,n){return Object.entries(t).reduce((t,i)=>{let[r,a]=i,o=n(a,r);return o!==e.SKIP_MAP_REDUCE&&(t[r]=o),t},{})}},(0,o._)(n,"SKIP_MAP_REDUCE",Symbol("SKIP_MAP_REDUCE")),n),m=(i=class e{static formatDevice(t){var n,i;let r={id:null!=(n=t.id)?n:e.getDeviceId_(),app:t.app};if("webos"===t.name||"tizen"===t.name){c(t.version,"A version is required for this device.");let n=e.formatSemver_(t.version);return c(n,"The version provided does not resolve to a semver."),{name:t.name,version:n,...r}}if("tivoauto"===t.name){let e=navigator.userAgent.includes("Model/BMW-Andr0id")?"android":"linux";return{name:t.name,os:e,...r}}if("telenetstb"===t.name){let e="eos1";return navigator.userAgent.includes("EOS2STB")?e="eos2":navigator.userAgent.includes("APPSTB")&&(e="apollo1"),{name:t.name,version:null!=(i=t.version)?i:"0.00_0000_master_unknown",model:e,...r}}if("titanos"===t.name||"vidaa"===t.name||"browser"===t.name||"tivo"===t.name)return{name:t.name,...r};throw new f(p.DEVICE_UNKNOWN,t)}static uuid(){var e,t=0,n="";if(!a||u+16>256){for(a=Array(t=256);t--;)a[t]=256*Math.random()|0;t=u=0}for(;t<16;t++)e=a[u+t],6==t?n+=l[15&e|64]:8==t?n+=l[63&e|128]:n+=l[e],1&t&&t>1&&t<11&&(n+="-");return u++,n}static isApple(e){return"browser"===e.name&&(navigator.vendor||"").includes("Apple")}static isTV(e){return"telenetstb"===e.name||"titanos"===e.name||"tizen"===e.name||"vidaa"===e.name||"webos"===e.name}static getDeviceId_(){let t=s.default.get(e.LOCAL_DEVICE_ID_KEY_);return t||(t=e.uuid(),s.default.set(e.LOCAL_DEVICE_ID_KEY_,t)),t}static formatSemver_(e){let t=e.match(/\d+(\.\d+)?(\.\d+)?/);if(!t)return null;let n=t[0].split(".").map(e=>+e);for(;n.length<3;)n.push(0);return n.slice(0,3).join(".")}},(0,o._)(i,"LOCAL_DEVICE_ID_KEY_","popcornPlayerId"),i),v=class e{static get(t,n){return new e().get(t,n)}static post(t,n,i){return new e().post(t,n,i)}get(e,t){return this.request_("get",e,t)}post(e,t,n){return this.request_("post",e,n,t)}put(e,t,n){return this.request_("put",e,n,t)}async request_(e,t){let n,i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;a&&(n=JSON.stringify(a),r["content-type"]="application/json");let o=this.options_.url?"".concat(this.options_.url).concat(t):t,s={...this.options_.headers,...r},u={};for(let[e,t]of Object.entries(s))null!=t&&(u[e]=t);let l=await fetch(o,{method:e,headers:u,body:n});try{i=await l.text(),"string"==typeof i&&(i=JSON.parse(i))}catch(e){}if(!l.ok)throw new y(l.status,i);return i}constructor(e={}){(0,o._)(this,"options_",void 0),this.options_=e}},y=class{getData(){return this.data_}constructor(e,t){(0,o._)(this,"status",void 0),(0,o._)(this,"data_",void 0),this.status=e,this.data_=t}};let b=h.create("Butter");var w=(r=class e{static async getConfig(t,n){var i,r;let a=e.createRequest_(t,n);try{let r=await a.post("/play-config/".concat(n.id),{deviceType:e.mapDeviceType_(t),osVersion:"version"in t?t.version:void 0,zone:null!=(i=n.zone)?i:e.mapZone_(n),isSafariNative:m.isApple(t),ads:{provider:{advertisingDeviceId:t.id,advertisingNetworkUserId:e.mapUserIdForAdvertising_(n),gdprConsentString:n.userConsentString}}},{"x-dpg-correlation-id":t.id,"x-client-app":t.app});return e.adjustInconsistentConfig_(n,r),r}catch(t){if(t instanceof y){let n=t.getData();throw new f(null!=(r=e.CONFIG_ERROR_MAP_[n.code])?r:p.BUTTER_ERROR,n)}throw t}}static mapConfigToLoadParams(t,n){var i;let r={butterParams:t,sessionId:null==(i=n.video.analytics)?void 0:i.playbackSessionId,streams:e.mapStreams_(n),schedule:e.mapSchedule_(n),heartbeat:e.mapHeartbeat_(n),advertising:e.mapAdvertising_(n),tracking:e.mapTracking_(n),metadata:e.mapMetadata_(n.video.metadata),thumbnails:e.mapThumbnails_(n),textTracks:e.mapTextTracks_(n)};if(t.unstable_streamUrl)for(let e of r.streams)e.url=t.unstable_streamUrl;return r}static mapStreams_(t){return t.video.streams.map(t=>{let n;if(t.drm){var i,r;let e=null==(r=Object.values(t.drm)[0])||null==(i=r.drmtoday)?void 0:i.authToken;c(e,"authToken missing but drm is set in Butter config"),n={licenseUrls:g.mapReduce(t.drm,e=>e.licenseUrl),certificateUrls:g.mapReduce(t.drm,e=>{var t;return null!=(t=e.certificate)?t:g.SKIP_MAP_REDUCE}),authToken:e}}return{type:e.TO_STREAM_TYPE_MAP_[t.type],url:t.url,drm:n,adUrl:t.adTrackingUrl}})}static mapMetadata_(e){let t,n,i,r;if(null==e?void 0:e.title){var a,o,s,u;t=e.title,(null==(a=e.episode)?void 0:a.order)&&(t="E".concat(e.episode.order," ").concat(t)),(null==(s=e.episode)||null==(o=s.season)?void 0:o.order)&&(t="S".concat(e.episode.season.order," ").concat(t)),(null==(u=e.program)?void 0:u.title)&&(t="".concat(e.program.title," ").concat(t))}if((null==e?void 0:e.legalTags)&&(n=e.legalTags),null==e?void 0:e.markers)for(let t of(i=[],e.markers))i.push({type:t.type,startsAt:t.start,duration:t.end-t.start,ski
1pTo:t.skipTo});if(null==e?void 0:e.chapters)for(let t of(r=[],e.chapters))r.push({startsAt:t.start,title:t.title,imageUrl:t.image});return{id:null==e?void 0:e.id,type:null==e?void 0:e.videoType,title:t,legalTags:n,markers:i,chapters:r}}static mapThumbnails_(e){var t;if(!(null==(t=e.video.thumbnails)?void 0:t[0]))return;let n=e.video.thumbnails.reduce((e,t)=>t.spriteWidth>e.spriteWidth?t:e,e.video.thumbnails[0]);return{url:n.url,width:n.spriteWidth,height:n.spriteHeight}}static mapTextTracks_(e){var t;if(null==(t=e.video.subtitles)?void 0:t[0])return e.video.subtitles.map(e=>{let t=!1,n=e.language;return n.endsWith("-tt")&&(n=n.substring(0,n.length-3),t=!0),{language:n,src:e.url,isCaptions:t}})}static mapSchedule_(e){if(!e.video.channelScheduleReference)return;let t=new URL(e.video.channelScheduleReference.url);return{path:"".concat(t.pathname).concat(t.search),pollSeconds:e.video.channelScheduleReference.frequency/1e3}}static mapHeartbeat_(e){var t;if(e.heartbeat)return{token:e.heartbeat.token,pollSeconds:e.heartbeat.frequency/1e3,expirationSeconds:(null!=(t=e.heartbeat.expiration)?t:864e5)/1e3}}static mapAdvertising_(t){var n,i,r,a,o,s;let u=null==(i=t.video.ads)||null==(n=i.pauseAds)?void 0:n.map(e=>({imageUrl:e.imageUrl,clickThroughUrl:e.clickThrough,impressionUrls:e.tracking}));if(null==(a=t.video.ads)||null==(r=a.freewheel)?void 0:r.clientSide){let e=t.video.ads.freewheel;return{type:"client",duration:e.duration,serverUrl:e.serverUrl,networkId:e.networkId,profileId:e.profileId,assetId:e.assetId,siteSectionId:e.siteSectionId,customKeyValues:e.customParameters,userId:e.userId,userConsentString:e.gdprConsent,pauseAds:u}}if((null==(o=t.video.ads)?void 0:o.serverSide)||(null==(s=t.video.ads)?void 0:s.mediatailor))return{type:"server",pollSeconds:t.video.ads.mediatailor?t.video.ads.mediatailor.frequency/1e3:void 0,omid:e.mapOmidParams_(t),pauseAds:u}}static mapOmidParams_(e){var t,n;if(null==(n=e.video.ads)||null==(t=n.om)?void 0:t.prestoads)return{licenseKey:e.video.ads.om.prestoads.licenseKey}}static mapTracking_(t){return{mux:e.mapMuxParams_(t.video.analytics),cim:e.mapCimParams_(t.video.analytics)}}static mapCimParams_(e){var t;if(null==e?void 0:e.cim)return{identifier:e.cim.identifier,materialId:e.cim.materialId,sourceType:e.cim.sourceType,contentType:e.cim.contentType,tv:e.cim.linkTv,name:e.cim.name,section:e.cim.section,duration:null!=(t=e.cim.duration)?t:-1,channel:e.cim.channel}}static mapMuxParams_(e){if(null==e?void 0:e.mux)return{envKey:e.mux.environmentKey,subPropertyId:e.mux.subPropertyId,userId:e.mux.userId}}static createRequest_(t,n){var i,r;let a=null!=(i=n.env)?i:"production",o=null!=(r=e.API_KEYS_["".concat(n.brand,".").concat(t.name,".").concat(a)])?r:n.apiKey;return c(o,"Could not find an API key, by neither brand or explicitly defined. If you want one added, file a feature request."),new v({url:e.BASE_URL_[a],headers:{"x-api-key":o,"popcorn-sdk-version":"8",authorization:n.authToken?"Bearer ".concat(n.authToken):null}})}static mapDeviceType_(e){return({browser:"web",titanos:"philips-tv",telenetstb:"eos-stb",tizen:"samsung-tv",vidaa:"hisense-tv",webos:"lg-tv",tivoauto:"tivo",tivo:"tivo-tv"})[e.name]}static mapUserIdForAdvertising_(e){var t;if(!1!==e.userIdForAdvertising)return null!=(t=e.userIdForAdvertising)?t:e.userId}static mapZone_(e){if(["vtmgo","streamz","rtlplay"].includes(e.brand))return e.brand}static adjustInconsistentConfig_(t,n){var i,r,a,o,s;let u=[];(null==(i=n.video.metadata)?void 0:i.channel)&&(n.video.dvr&&(n.video.dvr=void 0,u.push("Removed video.dvr for channel")),(null==(s=n.video.analytics)?void 0:s.cim)&&(n.video.analytics.cim=void 0,u.push("Removed video.analytics.cim for channel")),n.video.metadata={id:n.video.metadata.channel.id,videoType:"channel",title:n.video.metadata.channel.title},u.push("Updated video.metadata for channel")),(null==(r=n.video.ads)?void 0:r.freewheel)&&(n.video.ads.freewheel.duration||(n.video.ads.freewheel.duration=n.video.duration,u.push("Added duration to video.ads.freewheel")),n.video.ads.freewheel.userId||(n.video.ads.freewheel.userId=e.mapUserIdForAdvertising_(t),u.push("Added userId to video.ads.freewheel")),n.video.ads.freewheel.gdprConsent||(n.video.ads.freewheel.gdprConsent=t.userConsentString,u.push("Added gdprConsent to video.ads.freewheel"))),(null==(a=n.video.analytics)?void 0:a.mux)&&!n.video.analytics.mux.userId&&(n.video.analytics.mux.userId=t.userId,u.push("Added userId to video.analytics.mux.userId")),(null==(o=n.video.analytics)?void 0:o.cim)&&!n.video.analytics.cim.duration&&(n.video.analytics.cim.duration=n.video.duration,u.push("Added duration to video.analytics.cim.duration")),u.length&&b.warn("Applied patches to config",u)}static async getSchedule(t,n,i){return await e.createRequest_(t,n).get(i)}static mapSharedBroadcastParams(t){return{cim:e.mapCimParams_(t.analytics),metadata:e.mapMetadata_(t.metadata)}}static async getHeartbeat(t,n,i){return await e.createRequest_(t,n).put("/heartbeat",{token:i.token},{"x-dpg-correlation-id":t.id})}},(0,o._)(r,"BASE_URL_",{production:"https://videoplayer-service.dpgmedia.net",acceptance:"https://videoplayer-service-acc.api.popcorn.persgroep.cloud",development:"https://videoplayer-service-dev.api.popcorn.persgroep.cloud"}),(0,o._)(r,"TO_STREAM_TYPE_MAP_",{mp4:d.MP4,dash:d.DASH,hls:d.HLS}),(0,o._)(r,"CONFIG_ERROR_MAP_",{103:p.EXPIRED,110:p.GEOBLOCKED,111:p.RATE_LIMITED,113:p.VPN_DETECTED}),(0,o._)(r,"API_KEYS_",{"vtmgo.browser.production":"jL3yNhGpDsaew9CqJrDPq2UzMrlmNVbnadUXVOET","vtmgo.titanos.production":"TuvRcW2EfbUvB5UX5x4YNcINhPHG2yBKS5p5Riyd","vtmgo.telenetstb.production":"F9Bz0sf8yqGaksscZLIxLsY4DuCuSJEOavSI5DcO","vtmgo.tivoauto.production":"a6sORaokP11Neda4KUzZu160v17WitT739re2MMa","vtmgo.tizen.production":"PPeVhJIJkW15NgmuyoZ4x1VzrEBQ2BoE2ZqKNxpJ","vtmgo.vidaa.production":"3H7yFJyT782rWjKKSnayRbCFOrgwhdmC9xrnp6h2","vtmgo.webos.production":"mIrNFiTTJN1j44G
1EDWAD62EZdtdHhkmU3ItukfAX","vtmgo.tivo.production":"d418b349-6176-4999-9bfa-8c7771f1a762","streamz.browser.production":"nG4cXclG04aVilc8HmwYZ8yW2d4IXP0f2OLBhRn4","streamz.titanos.production":"ukDq3V7ByJucOpdTgMQRaAPOWu87d746cpM5vesC","streamz.telenetstb.production":"3QCTLwXouhYa2mom29CLn1R5OPawDxbcMdo6yeYf","streamz.tizen.production":"GLmHWRNfls7Y4COdA9GdNFISnc2yWutDIn9NXbXa","streamz.vidaa.production":"sjcNExoxSfiPJnESp7qabRIyYt39HQTuWgGPW4Rn","streamz.webos.production":"LfzIN3JsdgoYb648DzLuIaPfoTVYmD1n2iKagfGj","streamz.tivo.production":"","rtlplay.browser.production":"2W7kCXUTyUgKf7HKlK9qcYJvFmiPFaBEFT90eC2b","rtlplay.titanos.production":"ybwrLqDeRgVkxOZ1l94uQQ2wW0ft2dvsZHmxOJcE","rtlplay.telenetstb.production":"ETrSFD41N6ntFvMXDLm1WwnpWZw89z34xniiW79t","rtlplay.tizen.production":"B615oOGjEPzndEXtc8rk4aXfMeIO5rKwHs3F2Plg","rtlplay.vidaa.production":"YjLiQSMVq6ld7F5s3xvUsq8dPcdaC1F0JCoFIRJv","rtlplay.webos.production":"1M65Nd8oLudLVd3xXl7zoy3iYrVbTpDM78n0a1d8","rtlplay.tivo.production":"","videoland.browser.production":"3oV43OBTUtQyyLCE9jYVRuYwCHMestTT21vveANG","videoland.titanos.production":"HVkO0FZBCNVrAvmeF9e9YlXyCan0DOq3qv2vbFpo","videoland.telenetstb.production":"ohkBXyywX4nZ5FTpmaeNyoQdRCW37hMdsEooOTld","videoland.tivoauto.production":"smYfQbNMEZlWXDHZn5iwKsuwv3YEY43egoggJKPj","videoland.tizen.production":"VHfMz6lPNzXmonCLgISkPlGhQiI8zvKB7r5tt2CM","videoland.vidaa.production":"enUjf5XnR47q79M0CfqFq1OwDYKOeNXHrskT5Zix","videoland.webos.production":"AUA340AbjSBg0IqF20iS11k5UxPt5iqff7xn0kIB","videoland.tivo.production":"e1742f8c-3ced-4fab-97a6-baf659053db5"}),r),T=class{removeAll(){for(let e of this.bindings_)e.remove();this.bindings_.clear()}constructor(){(0,o._)(this,"bindings_",new Set),(0,o._)(this,"listen",e=>{var t=this;return function(n,i){for(var r=arguments.length,a=Array(r>2?r-2:0),o=2;o<r;o++)a[o-2]=arguments[o];let s=S(e,n,i,!1,a);t.bindings_.add(s)}}),(0,o._)(this,"listenOnce",e=>{var t=this;return function(n,i){for(var r=arguments.length,a=Array(r>2?r-2:0),o=2;o<r;o++)a[o-2]=arguments[o];let s=S(e,n,i,!0,a);t.bindings_.add(s)}}),(0,o._)(this,"unlisten",e=>(t,n)=>{let i=Array.from(this.bindings_).find(i=>i.target===e&&i.type===t&&i.listener===n);i&&(i.remove(),this.bindings_.delete(i))})}};function S(e,t,n,i){var r,a,o,s,u,l,d;let c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],h={add:null!=(r=null==(o=e.addEventListener)?void 0:o.bind(e))?r:null==(s=e.on)?void 0:s.bind(e),remove:null!=(a=null==(u=e.removeEventListener)?void 0:u.bind(e))?a:null==(l=e.off)?void 0:l.bind(e)},p=()=>{var e;null==(e=h.remove)||e.call(h,t,f)},f=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];try{n.apply(void 0,t),i&&p()}catch(e){throw console.error(e),e}};return null==(d=h.add)||d.call(h,t,f,...c),{target:e,type:t,listener:n,once:i,remove:p}}var x=class{tickNow(){return this.stop(),this.onTick_(),this}tickAfter(e){return this.stop(),this.ticker_=new E(()=>{this.onTick_()}).tickAfter(e),this}tickEvery(e){this.stop();let t=new E(()=>{t.tickAfter(e),this.onTick_()}).tickAfter(e);return this.ticker_=t,this}stop(){var e;null==(e=this.ticker_)||e.stop(),this.ticker_=null}constructor(e){(0,o._)(this,"onTick_",void 0),(0,o._)(this,"ticker_",null),this.onTick_=e}},A=class{async start(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.ticker_.tickAfter(this.interval_),e&&await this.onTick_()}stop(){this.ticker_.stop()}constructor(e,t){(0,o._)(this,"onTick_",void 0),(0,o._)(this,"interval_",void 0),(0,o._)(this,"ticker_",new E(async()=>{this.ticker_.tickAfter(this.interval_),await this.onTick_()})),this.onTick_=e,this.interval_=t}},E=class{tickAfter(e){this.stop();let t=!0;this.cancelPending_=()=>{clearTimeout(n),t=!1};let n=setTimeout(()=>{t&&this.onTick_()},1e3*e);return this}stop(){this.cancelPending_&&(this.cancelPending_(),this.cancelPending_=null)}constructor(e){(0,o._)(this,"onTick_",void 0),(0,o._)(this,"cancelPending_",void 0),this.onTick_=e,this.cancelPending_=null}};e.s(["_",0,d,"a",0,v,"c",0,p,"d",0,{STEREO:"stereo",SURROUND:"surround"},"f",0,{DISABLED:"disabled",ALLOWED:"allowed",MUTED:"muted"},"g",0,{FREEWHEEL:"freewheel",GEMIUS_PLAYER:"gemiusPlayer"},"h",0,{IDLE:"idle",PLAY:"play",PLAYING:"playing",PAUSED:"paused",ENDED:"ended"},"i",0,w,"l",0,h,"m",0,{PREVIOUSLY:"previously",OPENING_SCENE:"openingScene",INTRO:"intro",END_CREDITS:"endCredits"},"n",0,x,"o",0,m,"p",0,{IDLE:"idle",LOADING:"loading",LOADED:"loaded"},"r",0,T,"s",0,f,"t",0,A,"u",0,c,"v",0,{EXTERNAL:"external",STREAM:"stream"},"y",0,{CAPTION:"caption",DESCRIPTION:"description"}],29387)}]);

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.